/* ==========================================================================
   Chromatic Memory v2.0 (色彩的絕對音感)
   Pantone Archival Minimalism × Dieter Rams (Braun) Tactile Industrial Design
   ========================================================================== */

:root {
  --paper: #F5F4F0;
  --chassis: #EAE8E1;
  --chassis-hi: #F8F7F3;
  --chassis-lo: #D9D6CA;
  --ink: #141413;
  --ink-muted: #686660;
  --ink-faint: #9B9890;
  --braun-orange: #E84C22;
  --braun-orange-dark: #C43A14;
  --braun-teal: #0F766E;
  --hairline: rgba(20, 20, 19, 0.11);
  --hairline-strong: rgba(20, 20, 19, 0.22);
  --sans: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  --shadow-soft: 0 14px 36px rgba(20, 20, 19, 0.08);
  --shadow-console: 0 26px 64px rgba(0, 0, 0, 0.26), 0 2px 8px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle Museum Paper Grain Texture */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.mono { font-family: var(--mono); }

.screen {
  display: none;
  min-height: 100vh;
  width: 100%;
}

.screen.active { display: block; }

/* ==================== STUDIO HEADER ==================== */
.lobby-shell, .summary-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 32px 52px;
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand-sep { color: var(--ink-faint); }
.brand-en { color: var(--ink-muted); }

.braun-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--braun-orange);
  box-shadow: 0 0 0 2px rgba(232, 76, 34, 0.18), 0 0 10px rgba(232, 76, 34, 0.48);
  display: inline-block;
  flex-shrink: 0;
}

.braun-led-sm { width: 7px; height: 7px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  font-size: 11px;
  color: var(--ink-muted);
}

.stat-pill strong {
  color: var(--braun-orange);
  font-size: 12px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--chassis);
  border: 1px solid var(--hairline);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease;
}

.pill-btn:hover {
  background: #E2DFD6;
  border-color: var(--hairline-strong);
}

.pill-btn:active { transform: scale(0.97); }

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.mono-badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(20, 20, 19, 0.08);
  color: var(--ink-muted);
}

/* ==================== LOBBY HERO & 4 MODES ==================== */
.lobby-main { padding-top: 38px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 44px;
  align-items: start;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--hairline);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--braun-orange);
  margin: 0 0 12px;
}

.hero-title {
  font-size: clamp(36px, 4.8vw, 54px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 14px;
}

.hero-lead {
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink-muted);
  max-width: 560px;
  margin: 0 0 24px;
}

/* 4-Mode Braun Instrument Grid */
.mode-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.mode-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 15px 16px;
  border-radius: 13px;
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  box-shadow: 0 2px 0 rgba(20, 20, 19, 0.05);
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.mode-tile:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 10px 24px rgba(20, 20, 19, 0.09);
}

.mode-tile:active { transform: translateY(1px); }

.mode-tile-primary {
  background: var(--ink);
  color: #F9F8F5;
  border-color: #000;
  box-shadow: 0 4px 0 #000, 0 12px 26px rgba(20, 20, 19, 0.18);
}

.mode-tile-primary:hover {
  background: #1F1F1D;
  border-color: #000;
}

.mode-tile-primary .mode-desc { color: rgba(249, 248, 245, 0.72); }
.mode-tile-primary .mode-code { color: rgba(249, 248, 245, 0.65); }

.mode-tile-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mode-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.mode-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.mode-ind-orange { background: var(--braun-orange); }
.mode-ind-teal { background: var(--braun-teal); }
.mode-ind-dark { background: var(--ink); }

.mode-name {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.mode-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* Primary & Secondary Buttons */
.btn-primary-braun {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 24px;
  border-radius: 12px;
  background: var(--ink);
  color: #F9F8F5;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 0 #000, 0 10px 24px rgba(20, 20, 19, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.18s ease;
}

.btn-primary-braun:hover {
  background: #222220;
  transform: translateY(-1px);
}

.btn-primary-braun:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #000;
}

.btn-primary-braun .btn-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--braun-orange);
}

.btn-primary-braun .btn-sub {
  font-size: 11px;
  opacity: 0.6;
  letter-spacing: 0.06em;
}

.btn-compact {
  padding: 11px 18px;
  font-size: 14px;
  box-shadow: 0 3px 0 #000;
}

.btn-secondary-swiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--ink);
  border: 1.5px solid var(--hairline-strong);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.btn-secondary-swiss:hover {
  background: var(--chassis-hi);
  border-color: var(--ink);
}

/* Mechanical Toggle */
.mode-strip { padding-top: 4px; }

.rams-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.rams-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--chassis-lo);
  border: 1px solid var(--hairline-strong);
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.rams-toggle input:checked + .toggle-track {
  background: var(--braun-orange);
  border-color: var(--braun-orange-dark);
}

.rams-toggle input:checked + .toggle-track .toggle-knob {
  transform: translateX(20px);
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-text strong { font-size: 13px; font-weight: 600; }
.toggle-text small { font-size: 12px; color: var(--ink-muted); }

/* ==================== INTERACTIVE DRAGGABLE LOBBY SPECIMEN ==================== */
.hero-specimen-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-specimen {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}

.specimen-stage {
  position: relative;
  height: 290px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.specimen-layer {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.specimen-left {
  clip-path: inset(0 50% 0 0);
  align-items: flex-start;
}

.specimen-right {
  clip-path: inset(0 0 0 50%);
  align-items: flex-end;
  text-align: right;
}

.spec-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.84;
}

.spec-hex {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.92;
}

.demo-wipe {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 36px;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-wipe-line {
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}

.demo-wipe-knob {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--chassis-hi);
  color: var(--ink);
  border: 1.5px solid rgba(20, 20, 19, 0.24);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.specimen-meta {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #FFFFFF;
}

.specimen-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.specimen-sub {
  font-size: 11px;
  color: var(--ink-muted);
}

.specimen-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.specimen-de {
  padding: 5px 10px;
  border-radius: 6px;
  background: #141413;
  color: #F9F8F5;
  font-size: 13px;
  font-weight: 700;
}

.demo-cycle-btn {
  font-size: 11px;
  color: var(--ink-muted);
  padding: 3px 6px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.demo-cycle-btn:hover {
  color: var(--braun-orange);
  background: var(--chassis);
}

.specimen-caption {
  margin: 0;
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
}

/* ==================== 9 CURATED DECKS GRID ==================== */
.decks-section { padding-top: 44px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.section-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}

.section-hint {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.decks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.deck-card {
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.deck-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(20, 20, 19, 0.1);
  border-color: var(--hairline-strong);
}

.deck-strip {
  height: 14px;
  display: flex;
  width: 100%;
  transition: height 0.22s ease;
}

.deck-card:hover .deck-strip { height: 22px; }
.deck-strip span { flex: 1; }

.deck-body {
  padding: 18px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.deck-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.deck-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}

.deck-arrow {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-faint);
  transition: transform 0.18s ease, color 0.18s ease;
}

.deck-card:hover .deck-arrow {
  transform: translateX(4px);
  color: var(--braun-orange);
}

.deck-name {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 3px;
}

.deck-name-en {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.deck-desc {
  font-size: 13px;
  line-height: 1.58;
  color: var(--ink-muted);
  margin: 0 0 14px;
  flex: 1;
}

.deck-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
}

.deck-prog-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--chassis);
  overflow: hidden;
}

.deck-prog-fill {
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
}

.studio-footer {
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* ==================== SCREEN 2: FULLSCREEN PLAY CANVAS ==================== */
#play-screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.color-canvas {
  position: absolute;
  inset: 0;
  background-color: #6B8B8A;
  transition: background-color 0.04s linear;
  z-index: 1;
}

/* Flash Memory 0.8s Retinal Imprint Overlay */
.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.flash-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.flash-center {
  text-align: center;
  padding: 24px 32px;
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.flash-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  opacity: 0.82;
}

.flash-big {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  margin-bottom: 18px;
}

.flash-bar-track {
  width: 220px;
  height: 4px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.28);
  margin: 0 auto;
  overflow: hidden;
}

.flash-bar-fill {
  height: 100%;
  width: 100%;
  background: currentColor;
  transform-origin: left center;
}

/* Adaptive Contrast Themes on Canvas */
#play-screen.ink-dark {
  --canvas-ink: #141413;
  --canvas-ink-muted: rgba(20, 20, 19, 0.66);
  --canvas-pill-bg: rgba(20, 20, 19, 0.08);
  --canvas-pill-border: rgba(20, 20, 19, 0.16);
}

#play-screen.ink-light {
  --canvas-ink: #F9F8F5;
  --canvas-ink-muted: rgba(249, 248, 245, 0.72);
  --canvas-pill-bg: rgba(249, 248, 245, 0.12);
  --canvas-pill-border: rgba(249, 248, 245, 0.24);
}

/* Top Floating HUD */
.play-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  color: var(--canvas-ink);
  transition: color 0.22s ease;
}

.hud-btn {
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--canvas-pill-bg);
  border: 1px solid var(--canvas-pill-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 600;
  color: var(--canvas-ink);
  transition: transform 0.12s ease, opacity 0.18s ease;
}

.hud-btn:hover { opacity: 0.88; }
.hud-btn:active { transform: scale(0.96); }

.hud-center {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--canvas-pill-bg);
  border: 1px solid var(--canvas-pill-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hud-deck { font-size: 12px; font-weight: 700; }

.hud-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hud-dot.done { opacity: 0.9; }
.hud-dot.current { opacity: 1; transform: scale(1.35); }

.hud-round { font-size: 12px; font-weight: 600; opacity: 0.86; }

/* Endless Survival LEDs */
.endless-hud {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.endless-sep { opacity: 0.35; }

.endless-lives {
  display: inline-flex;
  gap: 5px;
}

.life-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--braun-orange);
  box-shadow: 0 0 8px rgba(232, 76, 34, 0.7);
}

.life-led.lost {
  background: currentColor;
  opacity: 0.22;
  box-shadow: none;
}

.endless-limit {
  font-size: 11px;
  font-weight: 700;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Center Prompt Display */
.prompt-stage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -82%);
  z-index: 15;
  text-align: center;
  width: min(90vw, 720px);
  pointer-events: none;
  color: var(--canvas-ink);
  transition: opacity 0.28s ease, transform 0.32s ease, color 0.2s ease;
}

#play-screen.is-revealed .prompt-stage {
  opacity: 0;
  transform: translate(-50%, -95%) scale(0.96);
}

.prompt-serial {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  opacity: 0.72;
  margin-bottom: 10px;
}

.prompt-title {
  font-size: clamp(30px, 5.4vw, 58px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0 0 8px;
}

.prompt-en {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0.68;
  margin: 0 0 12px;
}

.prompt-cue {
  font-size: 15px;
  line-height: 1.6;
  color: var(--canvas-ink-muted);
  max-width: 500px;
  margin: 0 auto 18px;
}

.live-readout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--canvas-pill-bg);
  border: 1px solid var(--canvas-pill-border);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.readout-sep { opacity: 0.4; }

#play-screen.blind-mode .live-readout {
  opacity: 0;
  visibility: hidden;
}

/* ==================== SPLIT / TEAR REVEAL STAGE ==================== */
.reveal-stage {
  position: fixed;
  inset: 0;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#play-screen.is-revealed .reveal-stage {
  opacity: 1;
  pointer-events: auto;
}

.reveal-half { position: absolute; inset: 0; }

.reveal-left {
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.58s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  clip-path: inset(0 0 0 50%);
  transition: clip-path 0.58s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stage.is-dragging .reveal-left,
.reveal-stage.is-dragging .reveal-right,
.reveal-stage.is-dragging .wipe-divider {
  transition: none !important;
}

.reveal-corner {
  position: absolute;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.reveal-corner-left { left: 28px; align-items: flex-start; text-align: left; }
.reveal-corner-right { right: 28px; align-items: flex-end; text-align: right; }

.reveal-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; opacity: 0.74; }
.reveal-zh { font-size: 20px; font-weight: 800; }
.reveal-hex { font-size: 15px; font-weight: 700; margin-top: 4px; }
.reveal-hsb { font-size: 11px; opacity: 0.72; }

.wipe-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  transition: left 0.58s cubic-bezier(0.16, 1, 0.3, 1);
}

.wipe-line {
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 0 18px rgba(0, 0, 0, 0.25);
}

.wipe-handle {
  position: absolute;
  top: 36%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--chassis-hi);
  color: var(--ink);
  border: 1.5px solid rgba(20, 20, 19, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  transition: transform 0.15s ease;
}

.wipe-divider:hover .wipe-handle,
.reveal-stage.is-dragging .wipe-handle {
  transform: scale(1.1);
  border-color: var(--braun-orange);
}

/* ==================== FLOATING VERDICT CARD ==================== */
.verdict-card {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 130%);
  z-index: 28;
  width: min(92vw, 600px);
  background: rgba(245, 244, 240, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(20, 20, 19, 0.16);
  border-radius: 18px;
  padding: 20px 24px 18px;
  box-shadow: var(--shadow-console);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#play-screen.is-revealed .verdict-card {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.verdict-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.verdict-tier-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.verdict-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--braun-orange);
}

.verdict-tier-en {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}

.verdict-record {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(232, 76, 34, 0.14);
  color: var(--braun-orange);
}

.verdict-name { margin: 0 0 2px; font-size: 21px; font-weight: 800; }
.verdict-ref { font-size: 12px; color: var(--ink-muted); }

.verdict-right-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.verdict-radar-slot {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.verdict-radar-slot svg { width: 68px; height: 68px; }

.verdict-score-box {
  text-align: right;
  background: #141413;
  color: #F9F8F5;
  padding: 10px 14px;
  border-radius: 10px;
}

.verdict-de { font-size: 21px; font-weight: 700; line-height: 1.1; }
.verdict-acc { font-size: 11px; color: rgba(249, 248, 245, 0.72); margin-top: 4px; }

.verdict-diffs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.verdict-diffs span {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--chassis);
  border: 1px solid var(--hairline);
}

.verdict-insight {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 8px;
}

.verdict-lore {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 16px;
  padding-top: 8px;
  border-top: 1px dashed var(--hairline);
}

.verdict-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.verdict-left-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-chord-mech {
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--chassis);
  border: 1px solid var(--hairline-strong);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-chord-mech:hover {
  background: #DFDCD2;
  border-color: var(--braun-orange);
}

.btn-chord-mech:active { transform: scale(0.96); }
.wipe-tip { font-size: 11px; color: var(--ink-muted); }

/* ==================== DIETER RAMS DUAL-MODE CONSOLE ==================== */
.rams-console {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 25;
  width: min(92vw, 590px);
  background: linear-gradient(180deg, rgba(248, 247, 243, 0.95) 0%, rgba(232, 229, 220, 0.97) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-console), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 15px 22px 18px;
  color: var(--ink);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

#play-screen.is-revealed .rams-console {
  transform: translate(-50%, 135%);
  opacity: 0;
  pointer-events: none;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}

.console-brand { display: flex; align-items: center; gap: 8px; }
.console-model { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-muted); }

.speaker-grille {
  display: grid;
  grid-template-columns: repeat(6, 4px);
  gap: 4px;
  opacity: 0.42;
  transition: opacity 0.18s ease;
}

.speaker-grille span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
}

.speaker-grille.active { opacity: 0.92; }
.speaker-grille.active span:nth-child(odd) {
  background: var(--braun-orange);
  transform: scale(1.25);
}

/* Fader / Dial Switch */
.control-mode-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: rgba(20, 20, 19, 0.08);
  border: 1px solid var(--hairline);
}

.ctrl-switch-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.ctrl-switch-btn.active {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Sliders Stack (Mode A) */
.sliders-stack {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 16px;
}

.sliders-stack[hidden] { display: none; }

.slider-row {
  display: grid;
  grid-template-columns: 58px 1fr 94px;
  align-items: center;
  gap: 12px;
}

.slider-meta { display: flex; align-items: baseline; gap: 6px; }
.slider-key { font-size: 14px; font-weight: 800; color: var(--ink); }
.slider-label { font-size: 12px; color: var(--ink-muted); font-weight: 500; }

.val-stepper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.step-btn {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(20, 20, 19, 0.06);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.step-btn:hover { background: rgba(20, 20, 19, 0.14); color: var(--ink); }

.slider-val {
  min-width: 40px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  transition: opacity 0.2s ease;
}

#play-screen.blind-mode .slider-val,
#play-screen.blind-mode .dial-val {
  opacity: 0.16;
  filter: blur(4px);
}

.slider-track-wrap {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}

.track-bg {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.track-hue {
  background: linear-gradient(
    90deg,
    hsl(0, 72%, 52%),
    hsl(60, 72%, 52%),
    hsl(120, 72%, 46%),
    hsl(180, 72%, 46%),
    hsl(240, 72%, 56%),
    hsl(300, 72%, 52%),
    hsl(360, 72%, 52%)
  );
}

#play-screen.blind-mode .track-hue,
#play-screen.blind-mode .track-sat,
#play-screen.blind-mode .track-bri {
  background: repeating-linear-gradient(
    90deg,
    #C7C4BA 0px,
    #C7C4BA 10px,
    #B4B0A4 10px,
    #B4B0A4 12px
  ) !important;
}

.rams-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  margin: 0;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.rams-range:focus { outline: none; }

.rams-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFFFFF 0%, #ECEAE2 65%, #D2CFC4 100%);
  border: 1.5px solid rgba(20, 20, 19, 0.35);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24), inset 0 1px 1px #FFFFFF;
  cursor: grab;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.rams-range:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.12);
  border-color: var(--braun-orange);
}

.rams-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFFFFF 0%, #ECEAE2 65%, #D2CFC4 100%);
  border: 1.5px solid rgba(20, 20, 19, 0.35);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
  cursor: grab;
}

/* ==================== DIETER RAMS 3D ROTARY DIALS (MODE B) ==================== */
.dial-bank {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 6px 8px 16px;
}

.dial-bank[hidden] { display: none; }

.dial-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: ns-resize;
  touch-action: none;
}

.dial-ring {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(from 225deg, rgba(20,20,19,0.16) 0deg 270deg, transparent 270deg 360deg);
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.16);
}

.dial-knob {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #FFFFFF 0%, #EAE7DE 58%, #CFCBC0 100%);
  border: 1.5px solid rgba(20, 20, 19, 0.3);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22), inset 0 2px 2px #FFFFFF;
  position: relative;
  transition: box-shadow 0.15s ease;
}

.dial-unit:active .dial-knob {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.26), 0 0 0 2px rgba(232, 76, 34, 0.35);
}

.dial-pointer {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3.5px;
  height: 16px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: var(--braun-orange);
}

.dial-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dial-key { font-size: 11px; font-weight: 700; color: var(--ink-muted); }
.dial-val { font-size: 13px; font-weight: 800; color: var(--ink); }

/* Console Footer */
.console-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-ghost-mech {
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(20, 20, 19, 0.06);
  border: 1px solid var(--hairline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-ghost-mech:hover { background: rgba(20, 20, 19, 0.12); color: var(--ink); }

.btn-lock-braun {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 12px;
  background: var(--braun-orange);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 0 var(--braun-orange-dark), 0 8px 20px rgba(232, 76, 34, 0.32);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
}

.btn-lock-braun:hover { filter: brightness(1.05); }
.btn-lock-braun:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--braun-orange-dark);
}

.lock-dot { width: 8px; height: 8px; border-radius: 50%; background: #FFFFFF; }
.lock-en { font-size: 11px; opacity: 0.78; letter-spacing: 0.08em; }

/* ==================== SCREEN 3: SUMMARY BRAIN CARD ==================== */
.summary-grid {
  padding-top: 32px;
  display: grid;
  grid-template-columns: minmax(290px, 440px) 1fr;
  gap: 44px;
  align-items: start;
}

.card-theme-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.theme-chip {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--chassis);
  border: 1px solid var(--hairline);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.theme-chip.active {
  background: var(--ink);
  color: #F9F8F5;
  border-color: var(--ink);
}

.canvas-frame {
  background: #FFFFFF;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  box-shadow: 0 20px 50px rgba(20, 20, 19, 0.12);
}

#brain-card-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.summary-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}

.summary-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-muted);
  margin: 0 0 22px;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.metric-tile {
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-label { font-size: 10px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.06em; }
.metric-val { font-size: 20px; font-weight: 800; }

.summary-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.summary-sub-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.breakdown-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin: 0 0 12px;
}

.breakdown-list { display: flex; flex-direction: column; gap: 10px; }

.breakdown-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.mini-split {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.mini-split span { flex: 1; }
.breakdown-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.breakdown-meta { font-size: 11px; color: var(--ink-muted); }

.breakdown-de {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  color: #FFFFFF;
}

/* ==================== ARCHIVE MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 20, 19, 0.55);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open { display: flex; }

.modal-sheet {
  background: var(--paper);
  border-radius: 18px;
  width: min(980px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--hairline);
}

.modal-title { margin: 0; font-size: 22px; font-weight: 800; }

.modal-stats {
  padding: 10px 24px;
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--chassis);
  border-bottom: 1px solid var(--hairline);
}

.archive-grid {
  padding: 20px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.archive-chip {
  background: #FFFFFF;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.archive-swatch { height: 74px; display: flex; }

.archive-swatch.locked {
  background: repeating-linear-gradient(-45deg, #EAE8E1, #EAE8E1 8px, #E0DDD4 8px, #E0DDD4 16px);
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.archive-swatch span { flex: 1; }
.archive-meta { padding: 10px 12px; }
.archive-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.archive-sub { font-size: 11px; color: var(--ink-muted); }

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 24px);
  z-index: 90;
  background: #141413;
  color: #F9F8F5;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .decks-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .lobby-shell, .summary-shell { padding: 18px 16px 36px; }
  .mode-cards-grid { grid-template-columns: 1fr; }
  .decks-grid { grid-template-columns: 1fr; }
  .summary-metrics { grid-template-columns: repeat(2, 1fr); }
  .play-hud { padding: 12px 14px; }
  .hud-deck { display: none; }
  .slider-row { grid-template-columns: 50px 1fr 82px; gap: 8px; }
  .rams-console { bottom: 12px; padding: 14px 15px 15px; }
  .verdict-card { bottom: 12px; padding: 15px 16px 14px; }
  .verdict-radar-slot { display: none; }
  .reveal-corner { top: 72px; }
  .reveal-corner-left { left: 16px; }
  .reveal-corner-right { right: 16px; }
  .reveal-zh { font-size: 16px; }
  .dial-ring { width: 68px; height: 68px; }
}
