/* Hallmark · guihangmy design-system showcase · Floor: chrome colors through system tokens only, no transition:all, focus-visible on every control, reduced-motion fallback, overflow-x clip, sentence-case labels, capped centered container */
 /* Critique: chrome borrows the showcased system itself (.tabs, .card, .btn, tokens) so the page cannot drift from it; waivers: none. */

/* Showcase chrome — everything prefixed .ds- so it never collides with the
   showcased system. All chrome colors come from the system tokens, so the
   chrome itself themes with the switcher. */
html, body { overflow-x: clip; }

.ds-theme-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 16px; }

.ds-tabbar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ds-tabbar .tabs { flex-wrap: nowrap; }
.ds-tabbar .tabs a { flex: none; white-space: nowrap; }

[role="tabpanel"] { animation: ds-panel-in 180ms ease-out; }
@keyframes ds-panel-in { from { opacity: 0; transform: translateY(4px); } }

code { font-family: "JetBrains Mono", monospace; font-size: 13px; background: var(--surface2); padding: 1px 6px; border-radius: 6px; }

.ds-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.ds-swatch { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--card); }
.ds-swatch code { display: block; margin: 8px 0 2px; }
.ds-chip { display: block; height: 56px; border: 1px solid var(--line); border-radius: 8px; }
.ds-token-val { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); }

.ds-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
@media (max-width: 640px) { .ds-form-grid { grid-template-columns: 1fr; } }

.ds-frame { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--card); margin: 8px 0 16px; }

.ds-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.ds-icon { content-visibility: auto; contain-intrinsic-size: auto 110px; margin: 0; padding: 14px 6px 10px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.ds-icon figcaption { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); margin-top: 8px; overflow-wrap: break-word; }

:is(a, button, select, input, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  [role="tabpanel"] { animation: none; }
  .toast { animation: none; }
}

[data-theme="dark"], [data-theme="glass-dark"] { color-scheme: dark; }
[data-theme="clean"], [data-theme="ocean"], [data-theme="coffee"], [data-theme="glass"] { color-scheme: light; }

button, a { touch-action: manipulation; }

.ds-skip { position: absolute; left: -9999px; top: 0; background: var(--card); color: var(--ink); padding: 8px 14px; z-index: 2000; }
.ds-skip:focus-visible { left: 12px; top: 12px; }
