/* TryOn 0.1.1 — Atelier wardrobe design tokens.
   Warm neutral paper + one warm clay accent (tied to the brand coral).
   System font stack only — no external fonts, per the build constraints. */

:root {
  color-scheme: light dark;

  /* Warm neutral paper palette */
  --paper: #f3eee4;
  --paper-deep: #ece4d6;
  --surface: #fbf8f2;
  --surface-raised: #ffffff;
  --ink: #2a2521;
  --ink-muted: #6f6557;
  --ink-faint: #9a8f7e;
  --line: #e3d9c7;
  --line-strong: #d2c5ac;

  /* One accent — warm clay */
  --accent: #bd5a39;
  --accent-hover: #a44a2d;
  --accent-soft: #f3e2d8;
  --accent-ink: #fff8f1;

  --success: #2f7d5b;
  --danger: #b23b2e;

  --shadow-sm: 0 1px 2px rgba(42, 37, 33, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(42, 37, 33, 0.18);
  --shadow-lg: 0 28px 60px -20px rgba(42, 37, 33, 0.28);

  /* Editorial condensed display + refined sans + CJK-capable fallbacks */
  --font-display: "Arial Narrow", "Aptos Narrow", "Roboto Condensed", "PingFang SC",
    "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  --font-body: "Avenir Next", "Segoe UI Variable", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 14px;
  --space-4: 22px;
  --space-5: 34px;
  --space-6: 54px;
  --space-7: 80px;

  --measure: 1180px;
  --studio: 420px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #18140f;
    --paper-deep: #14110d;
    --surface: #221d18;
    --surface-raised: #2a241e;
    --ink: #efe7d8;
    --ink-muted: #b6ab98;
    --ink-faint: #847866;
    --line: #38302a;
    --line-strong: #4a4036;
    --accent: #e0815c;
    --accent-hover: #ec9170;
    --accent-soft: #3a2418;
    --accent-ink: #1a1410;
    --success: #5db88a;
    --danger: #e07060;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 34px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 64px -22px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

/* An explicit `display` on a component (e.g. .error-banner) would otherwise
   override the UA [hidden] rule and leak a "hidden" node. Force it. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  /* Warm paper atmosphere: faint linen weave + soft vignette, no flat fill. */
  background-image:
    radial-gradient(120% 80% at 15% -10%, rgba(189, 90, 57, 0.05), transparent 60%),
    radial-gradient(100% 60% at 110% 10%, rgba(47, 125, 91, 0.04), transparent 55%),
    repeating-linear-gradient(0deg, rgba(42, 37, 33, 0.012) 0 2px, transparent 2px 4px);
  background-attachment: fixed;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  body {
    background-image:
      radial-gradient(120% 80% at 15% -10%, rgba(224, 129, 92, 0.08), transparent 60%),
      radial-gradient(100% 60% at 110% 10%, rgba(93, 184, 138, 0.05), transparent 55%),
      repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 4px);
  }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; margin: 0; }

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection { background: var(--accent); color: var(--accent-ink); }
