/* S2 · The Pressing — design tokens (Option A system: monochrome + Ferrari red, gold is earned) */
:root {
  --ground: #0c0c0e;
  --panel: #141416;
  --panel-2: #1a1a1e;
  --line: #232327;
  --line-2: #2e2e33;
  --ink: #eceae5;
  --muted: #8b8992;
  --soft: #c9c7ce;
  --red: #ff2800;
  --red-dim: #ff6a4d;
  --gold: #d4a853;
  --gold-soft: #ebd9a8;
  --ok: #7fbf8e;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Menlo, monospace;

  --r-card: 12px;
  --r-chip: 999px;
  --shadow-pop: 0 18px 44px -20px rgba(0, 0, 0, 0.6);
  --app-height: 100dvh;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
/* author display rules (e.g. .pill{display:inline-block}) must never defeat the hidden attribute */
[hidden] { display: none !important; }
html { background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* type roles */
.t-room { font-family: var(--serif); font-size: 17px; letter-spacing: 0.01em; }
.t-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.t-title { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.t-num { font-variant-numeric: tabular-nums; font-family: var(--mono); }

/* primitives */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); border-radius: var(--r-chip);
  padding: 6px 13px; font-size: 12.5px; color: var(--soft);
  background: var(--panel); cursor: pointer; user-select: none;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip:hover { border-color: #3a3a40; }
.chip.on { border-color: var(--red); color: #fff; background: rgba(255, 40, 0, 0.12); }
.chip.gold { border-color: var(--gold); color: var(--gold-soft); background: rgba(212, 168, 83, 0.1); }
.chip:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 2px solid var(--red); outline-offset: 2px;
}

.pill {
  display: inline-block; border-radius: 4px; padding: 2px 7px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; font-weight: 700;
}
.pill.demo { background: var(--line); color: #a9a7af; }
.pill.master { background: rgba(255, 40, 0, 0.16); color: var(--red-dim); }
.pill.public { background: rgba(70, 150, 90, 0.16); color: var(--ok); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 9px; padding: 11px 18px;
  font-size: 13.5px; font-weight: 600; font-family: var(--sans);
  background: var(--line); color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); }
.btn:active { transform: translateY(1px); }

.grade {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  background: var(--line); color: #a9a7af;
}
.grade.a { background: rgba(212, 168, 83, 0.16); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(212, 168, 83, 0.5); }

.hair { border: 0; border-top: 1px solid var(--line); margin: 0; }

.meter { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.meter .lab { width: 52px; color: var(--muted); }
.meter .bar { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter .bar b { display: block; height: 100%; background: #6e6c74; border-radius: 2px; }
.meter .bar b.hi { background: var(--gold); }
.meter .bar b.lo { background: var(--red); }
.meter .val { width: 30px; text-align: right; color: var(--soft); font-family: var(--mono); font-size: 11px; }

.sheet-grab { width: 38px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 10px auto 4px; flex: none; }

@media (prefers-reduced-motion: no-preference) {
  .spin { animation: s2-spin 5.6s linear infinite; }
  .spin.paused { animation-play-state: paused; }
  @keyframes s2-spin { to { transform: rotate(360deg); } }
  .pulse { animation: s2-pulse 1.5s ease-in-out infinite; }
  @keyframes s2-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
}
