/* ==========================================================================
   Lofi Pomodoro Clock - Deep Aurora Fluid Cinema Stylesheet
   Apple / Linear Grade Obsidian Void, Dynamic Fluid Aurora & Tabular Monolith
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-display: "Archivo Black", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-grotesk: "Space Grotesk", "Inter", "Segoe UI", sans-serif;

  /* Theme Defaults (Poster Red — signature tomato accent) */
  --bg-gradient: radial-gradient(ellipse at 15% 20%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
                 radial-gradient(ellipse at 85% 75%, rgba(6, 182, 212, 0.14) 0%, transparent 45%),
                 radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
                 #050609;
  --accent-color: #ff3b30;
  --accent-glow: rgba(255, 59, 48, 0.5);
  --accent-secondary: #ff8a00;
  --accent-gradient: linear-gradient(135deg, #ff3b30 0%, #ff7a00 100%);
  --card-bg: rgba(12, 13, 18, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: rgba(248, 250, 252, 0.65);
  --text-dim: rgba(248, 250, 252, 0.35);

  --ring-bg: rgba(255, 255, 255, 0.06);
  --ring-color: #06b6d4;
}

/* Theme Variations */
body.theme-cozy-fireplace {
  --bg-gradient: radial-gradient(ellipse at 50% 90%, rgba(249, 115, 22, 0.32) 0%, transparent 60%),
                 radial-gradient(ellipse at 25% 65%, rgba(220, 38, 38, 0.22) 0%, transparent 55%),
                 radial-gradient(ellipse at 75% 65%, rgba(245, 158, 11, 0.20) 0%, transparent 55%),
                 radial-gradient(ellipse at 50% 25%, rgba(185, 28, 28, 0.12) 0%, transparent 60%),
                 #0a0504;
  --accent-color: #f97316;
  --accent-glow: rgba(249, 115, 22, 0.60);
  --accent-secondary: #ef4444;
  --accent-gradient: linear-gradient(135deg, #f97316 0%, #ef4444 55%, #b91c1c 100%);
  --card-bg: rgba(18, 10, 8, 0.72);
  --ring-color: #f97316;
}

body.theme-lofi-room {
  --bg-gradient: radial-gradient(ellipse at 20% 25%, rgba(245, 158, 11, 0.15) 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, rgba(239, 68, 68, 0.12) 0%, transparent 45%),
                 radial-gradient(ellipse at 50% 90%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
                 #060608;
  --accent-color: #ff3b30;
  --accent-glow: rgba(255, 59, 48, 0.5);
  --accent-secondary: #ff8a00;
  --accent-gradient: linear-gradient(135deg, #ff3b30 0%, #ff7a00 100%);
  --card-bg: rgba(15, 13, 16, 0.65);
  --ring-color: #ff3b30;
}

body.theme-rainy-cafe {
  --bg-gradient: radial-gradient(ellipse at 15% 20%, rgba(56, 189, 248, 0.16) 0%, transparent 45%),
                 radial-gradient(ellipse at 85% 75%, rgba(37, 99, 235, 0.14) 0%, transparent 45%),
                 radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                 #04070e;
  --accent-color: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.45);
  --accent-secondary: #2563eb;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 50%, #2563eb 100%);
  --card-bg: rgba(10, 16, 26, 0.65);
  --ring-color: #38bdf8;
}

body.theme-tokyo-dusk {
  --bg-gradient: radial-gradient(ellipse at 25% 20%, rgba(192, 132, 252, 0.16) 0%, transparent 45%),
                 radial-gradient(ellipse at 75% 75%, rgba(236, 72, 153, 0.14) 0%, transparent 45%),
                 radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                 #08040d;
  --accent-color: #c084fc;
  --accent-glow: rgba(192, 132, 252, 0.45);
  --accent-secondary: #ec4899;
  --accent-gradient: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #ec4899 100%);
  --card-bg: rgba(18, 11, 26, 0.65);
  --ring-color: #c084fc;
}

body.theme-zen-garden {
  --bg-gradient: radial-gradient(ellipse at 20% 25%, rgba(52, 211, 153, 0.16) 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
                 radial-gradient(ellipse at 50% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
                 #030906;
  --accent-color: #34d399;
  --accent-glow: rgba(52, 211, 153, 0.4);
  --accent-secondary: #059669;
  --accent-gradient: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  --card-bg: rgba(8, 18, 14, 0.65);
  --ring-color: #34d399;
}

body.theme-deep-space {
  --bg-gradient: radial-gradient(ellipse at 15% 15%, rgba(34, 211, 238, 0.15) 0%, transparent 45%),
                 radial-gradient(ellipse at 85% 85%, rgba(129, 140, 248, 0.14) 0%, transparent 45%),
                 radial-gradient(ellipse at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
                 #030509;
  --accent-color: #22d3ee;
  --accent-glow: rgba(34, 211, 238, 0.4);
  --accent-secondary: #818cf8;
  --accent-gradient: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #818cf8 100%);
  --card-bg: rgba(7, 12, 22, 0.65);
  --ring-color: #22d3ee;
}

body.theme-minimal-slate {
  --bg-gradient: radial-gradient(ellipse at 50% 20%, rgba(244, 63, 94, 0.12) 0%, transparent 50%),
                 radial-gradient(ellipse at 80% 80%, rgba(148, 163, 184, 0.08) 0%, transparent 45%),
                 #04060b;
  --accent-color: #f43f5e;
  --accent-glow: rgba(244, 63, 94, 0.35);
  --accent-secondary: #e11d48;
  --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --card-bg: rgba(11, 14, 22, 0.7);
  --ring-color: #f43f5e;
}

/* Global Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  transition: background 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Full Width Atmospheric Background Canvas */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
}

/* Glassmorphism Surface Base */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  transform: translateZ(0);
}

/* Layout Container - 100vw x 100vh Full-Width Full-Height Architecture */
.app-wrapper {
  position: relative;
  z-index: 10;
  height: 100vh;
  max-height: 100vh;
  width: 100vw;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top Navigation Bar - Flat Poster Strip */
.top-nav {
  width: 100vw;
  max-width: 100vw;
  height: 58px;
  padding: 0 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: rgba(8, 8, 10, 0.92);
  border-bottom: 2px solid rgba(255, 255, 255, 0.14);
  z-index: 30;
  flex-shrink: 0;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  user-select: none;
}

.brand-icon {
  width: 2.35rem;
  height: 2.35rem;
  background: var(--accent-color);
  border-radius: 8px;
  padding: 3px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}

.brand-badge:hover .brand-icon {
  transform: rotate(-6deg) scale(1.06);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-transform: uppercase;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.podor-home-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  text-decoration: none;
  color: #ffffff;
  font-family: var(--font-grotesk);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.podor-home-brand:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-btn {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.nav-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ==========================================================================
   Full-Width Edge-to-Edge Split Stage (Zero Dead Margins)
   ========================================================================== */
.main-stage {
  flex: 1;
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: calc(100vh - 58px);
  max-height: calc(100vh - 58px);
  overflow: hidden;
}

/* Single-Screen 100vw when companion panel is collapsed */
.companion-stage-pane.hidden-panel,
#companion-panel.hidden-panel {
  display: none !important;
}

/* ==========================================================================
   Left: The Monumental Master Time Stage (Border-Right, Cinematic Bleed)
   ========================================================================== */
.hero-stage-pane {
  flex: 1 1 0%;
  min-width: 0;
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 0.9rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-right: 2px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  overflow: hidden;
  transition: padding 0.3s ease, background 0.8s ease;
}

/* The Colossal Tomato Disc - hero motif, recolors on break, breathes while running */
.hero-stage-pane::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76vmin;
  height: 76vmin;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 59, 48, 0.28) 0%, rgba(255, 59, 48, 0.1) 42%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transition: background 0.8s ease;
}

body.mode-break-active .hero-stage-pane::before {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.26) 0%, rgba(16, 185, 129, 0.09) 42%, transparent 68%);
}

body:has(#btn-start-pause.running) .hero-stage-pane::before {
  animation: discBreathe 3.6s ease-in-out infinite;
}

@keyframes discBreathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  50% { transform: translate(-50%, -50%) scale(1.07); opacity: 1; }
}

/* Monumental Full-Bleed Watermark Typography (FOCUS / BREAK) */
.hero-stage-pane::after {
  content: "FOCUS";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -53%);
  font-family: var(--font-display);
  font-size: clamp(9rem, 23vw, 27rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.11);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: -webkit-text-stroke-color 0.6s ease;
}

body.mode-break-active .hero-stage-pane::after {
  content: "BREAK";
  -webkit-text-stroke-color: rgba(52, 211, 153, 0.17);
}

.main-stage.panel-collapsed .hero-stage-pane,
.main-stage:has(#companion-panel.hidden-panel) .hero-stage-pane {
  padding: 1.25rem 3vw;
  transition: padding 0.35s ease;
}

.main-stage.panel-collapsed:not(.tasks-open) .hero-stage-pane,
.main-stage.tasks-minimized .hero-stage-pane {
  border-right: none;
  padding: 2rem 6vw;
}

/* Top Command Strip - mode tabs centered */
.hero-top-command-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 10;
}

.intention-box {
  flex: 1;
  max-width: 580px;
}

.intention-inner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.55rem 1.15rem;
  transition: all 0.2s ease;
}

.intention-inner:focus-within {
  border-color: var(--accent-color);
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 4px 4px 0 var(--accent-glow);
}

.intention-prefix {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--accent-color);
  user-select: none;
  white-space: nowrap;
}

.intention-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

.intention-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Mode Tabs - Chunky Segmented Control */
.hifi-rack-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.14);
  padding: 0.3rem;
  border-radius: 10px;
}

.mode-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.tab-indicator-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
}

.mode-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.mode-tab-btn.active {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.mode-tab-btn.active .tab-indicator-led {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

/* Studio Broadcast Status Strip */
.studio-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.3rem 0.5rem;
  margin-top: 0.6rem;
  z-index: 10;
}

.studio-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
  display: inline-block;
  margin-right: 0.5rem;
}

.hifi-meta-tag {
  font-family: var(--font-grotesk);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
}

.tag-accent {
  color: var(--accent-color);
  font-weight: 700;
  margin-right: 0.25rem;
}

/* Timer State Badge */
.timer-badge {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.3rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}

.focus-badge {
  background: #ff3b30;
  color: #ffffff;
}

.break-badge {
  background: #10b981;
  color: #ffffff;
}

.long-break-badge {
  background: #2563eb;
  color: #ffffff;
}

/* ==========================================================================
   THE VINTAGE HI-FI MASTER TAPE CONSOLE (DUAL VU METERS & SPLIT-FLAP CLOCK)
   1970s Hi-Fi Golden Era Studio Aesthetic: Walnut Woodgrain, Brushed Aluminum,
   Warm Incandescent Backlit VU Meters, and Electro-Mechanical Split-Flap Cards
   ========================================================================== */
.vintage-master-console {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0.75rem auto;
  display: flex;
  align-items: stretch;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  user-select: none;
}

/* Poster edition: wood cheeks & screws removed from the DOM; hide any strays */
.console-wood-cheek,
.console-screw {
  display: none !important;
}

.console-wood-cheek::before {
  content: none;
}

/* Main Faceplate - flat, transparent, edge-to-edge */
.console-faceplate {
  flex: 1;
  background: transparent;
  padding: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border-top: none;
  border-bottom: none;
}

/* Studio Hex/Milled Corner Screws */
.console-screw {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #e2e8f0 0%, #94a3b8 60%, #475569 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 1px 3px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.6);
}

.console-screw::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 20%;
  right: 20%;
  height: 1.5px;
  background: #1e293b;
  transform: translateY(-50%) rotate(42deg);
}

.screw-tl { top: 10px; left: 10px; }
.screw-tr { top: 10px; right: 10px; }
.screw-bl { bottom: 10px; left: 10px; }
.screw-br { bottom: 10px; right: 10px; }

/* Console Header Branding Row */
.console-brand-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem 0.55rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.console-brand-title {
  font-family: var(--font-grotesk);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.console-flow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
}

/* Progress Display Mode Selector (倒计时 / 百分比 % / 已刻录时长) */
.progress-display-selector {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.14);
  padding: 0.2rem;
  border-radius: 8px;
  gap: 0.25rem;
}

.prog-mode-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.15s ease;
}

.prog-mode-btn:hover {
  color: #ffffff;
}

.prog-mode-btn.active {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   THE COLOSSAL MECHANICAL MASTER DISPLAY (Massive Monumental Numbers)
   ========================================================================== */
.vintage-split-flap-board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.2rem, 0.7vw, 0.6rem);
  padding: 0.25rem 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  margin: 0;
  width: 100%;
}

.vintage-split-flap-board:hover .flap-num {
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55), 0 0 90px var(--accent-glow);
}

/* Individual Digit Slot - transparent, the number IS the card */
.flap-card {
  position: relative;
  width: clamp(100px, 19vh, 240px);
  height: clamp(170px, 35vh, 400px);
  background: transparent;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  user-select: none;
}

.flap-leaf {
  width: 100%;
  height: 50%;
  position: relative;
  overflow: hidden;
  background: transparent;
  display: flex;
  justify-content: center;
}

.flap-leaf.flap-top {
  align-items: flex-end;
  border-bottom: none;
}

.flap-leaf.flap-bottom {
  align-items: flex-start;
  border-top: none;
}

/* The Colossal Poster Number - monumental floating digits */
.flap-num {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(11rem, 30vh, 24rem);
  font-weight: 400;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55), 0 0 60px var(--accent-glow);
}

.flap-top .flap-num {
  bottom: -0.48em;
}

.flap-bottom .flap-num {
  top: -0.52em;
}

/* Split-flap mechanics retired in poster edition */
.flap-seam,
.flap-hinge-pin {
  display: none;
}

/* Flap Colon Divider */
.flap-colon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.6rem, 4vh, 3rem);
  padding: 0 clamp(0.2rem, 0.5vw, 0.45rem);
}

.colon-peg {
  width: clamp(12px, 2vh, 18px);
  height: clamp(12px, 2vh, 18px);
  border-radius: 3px;
  background: var(--accent-color);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* Flap Unit Symbol (%) */
.flap-unit-symbol {
  font-family: var(--font-display);
  font-size: clamp(6rem, 15vh, 11rem);
  color: var(--accent-color);
  margin-left: 0.25rem;
  line-height: 1;
  text-shadow: 0 0 24px var(--accent-glow);
}

/* Direct Input Form Overlay */
.vintage-flap-input {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 9vw, 6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  width: 300px;
  background: #0a0a0c;
  border: 3px solid var(--accent-color);
  border-radius: 8px;
  color: #fff;
  text-align: center;
  outline: none;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5);
  margin: 0.5rem 0;
}

/* ==========================================================================
   PHYSICAL VINYL MICROGROOVE TRACK MATRIX & PROGRESS
   ========================================================================== */
.vinyl-microgroove-chassis {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.75rem 1.05rem;
  margin-top: 0.5rem;
}

.groove-telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.telemetry-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.microgroove-blocks-track {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-bottom: 0.5rem;
}

.groove-block {
  flex: 1;
  height: 16px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  position: relative;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.groove-block.is-etched {
  background: var(--accent-color);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
}

.groove-block.is-current {
  background: #ffffff;
  box-shadow: 0 0 14px #ffffff;
}

/* Break Zen Sanctuary */
.zen-break-sanctuary {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.55rem;
  margin: 0.9rem auto 0.6rem;
  padding: 0 1rem;
}

.zen-studio-lamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.14);
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  padding: 0.45rem 1.35rem;
  border-radius: 9999px;
  color: #6ee7b7;
  font-family: var(--font-grotesk);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
  margin: 0;
}

.zen-lamp-bulb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
  flex-shrink: 0;
}

.zen-subtext {
  font-family: var(--font-grotesk);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 480px;
  line-height: 1.5;
  margin: 0;
}

/* Console Metrics HUD Row */
.console-metrics-row {
  margin-top: 0.75rem;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1.1rem;
  font-family: var(--font-grotesk);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   LINEAR VINTAGE ANALOG RADIO TUNER / TAPE TIMELINE
   ========================================================================== */
.vintage-tuner-timeline {
  max-width: 660px;
  margin: 0.85rem auto 1.25rem;
}

.vintage-scale-bg {
  height: 10px;
  background: #090a0d;
  border: 1px solid #232732;
  border-radius: 4px;
  position: relative;
  overflow: visible;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
}

.vintage-scale-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0px,
    rgba(255, 255, 255, 0.2) 1px,
    transparent 1px,
    transparent 8px
  );
  opacity: 0.5;
  pointer-events: none;
}

.vintage-tuner-fill {
  height: 100%;
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 60%, #fbbf24 100%);
  border-radius: 3px;
  position: relative;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  transition: width 0.4s ease;
}

.vintage-tuner-needle {
  position: absolute;
  right: -3px;
  top: -6px;
  width: 6px;
  height: 22px;
  border-radius: 2px;
  background: #ff4500;
  border: 1px solid #ffffff;
  box-shadow: 0 0 10px #ff4500, 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   Laser Groove Timeline Progress Bar
   ========================================================================== */
.laser-groove-wrapper {
  width: 100%;
  max-width: 720px;
  margin: 1.25rem 0 1.75rem;
  z-index: 5;
}

.groove-markers {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  padding: 0 0.25rem;
}

.laser-track-bg {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  position: relative;
  overflow: visible;
}

.laser-track-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 2px;
  position: relative;
  box-shadow: 0 0 14px var(--accent-glow);
  transition: width 0.4s ease;
}

.laser-head-needle {
  position: absolute;
  right: -5px;
  top: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 16px #ffffff, 0 0 25px var(--accent-glow);
}

/* ==========================================================================
   Bottom Command Bar: Synthesizer Presets, Frequency Tuner & Cockpit
   ========================================================================== */
.hero-bottom-command-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 10;
}

.hifi-preset-deck {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hifi-preset-label {
  font-family: var(--font-grotesk);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.12em;
  margin-right: 0.3rem;
}

.hifi-preset-btn {
  font-family: var(--font-grotesk);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.hifi-preset-btn:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.hifi-tuner-pill {
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
}

.tuner-number-input {
  width: 52px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  outline: none;
}

.tuner-set-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-color);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tuner-set-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Primary Tactile Cockpit Controls */
.hifi-controls-cockpit {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-hifi-primary {
  position: relative;
  background: var(--accent-gradient);
  border: 2px solid #ffffff;
  color: #ffffff;
  padding: 1.15rem 3.6rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 230px;
}

.btn-hifi-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.55);
}

.btn-hifi-primary:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

/* Expanding Pulse Halo around the Primary Button */
.btn-glow-pulse {
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: btnPulseHalo 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

@keyframes btnPulseHalo {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); opacity: 0.9; }
  70% { box-shadow: 0 0 0 22px transparent; opacity: 0; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 0; }
}

.btn-hifi-round {
  width: 4rem;
  height: 4rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hifi-round:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-color);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
}

.btn-hifi-round:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Right: The Ethereal Floating Companion Deck
   ========================================================================== */
.companion-stage-pane {
  position: relative;
  width: clamp(360px, 32vw, 440px);
  flex-shrink: 0;
  height: 100%;
  max-height: 100%;
  padding: 1rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  background: #0a0a0d;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.3s ease;
}

.deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

.deck-header h3 {
  font-family: var(--font-grotesk) !important;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
}

.aurora-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
  display: inline-block;
  animation: dotBlink 2s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* View Mode Switcher: Turntable vs Live Video */
.deck-view-switch {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.14);
  padding: 0.2rem;
  border-radius: 8px;
  gap: 0.25rem;
}

.view-switch-btn {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-switch-btn:hover {
  color: #ffffff;
}

.view-switch-btn.active {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   THE REALISTIC VINYL TURNTABLE DECK
   ========================================================================== */
.turntable-chassis {
  background: #101014;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.turntable-platter {
  position: relative;
  width: clamp(190px, 22vh, 240px);
  height: clamp(190px, 22vh, 240px);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  background: #0d0e12;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 0 14px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.55rem;
}

/* Vinyl Disc */
.vinyl-disc {
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #0b0b0d 0px, #18191d 1.5px, #0b0b0d 3px);
  position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vinyl-disc.is-spinning {
  animation: spinVinyl 2.2s linear infinite;
}

@keyframes spinVinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.vinyl-grooves-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 38%, rgba(255, 255, 255, 0.03) 40%, transparent 42%, rgba(255, 255, 255, 0.03) 70%, transparent 72%);
  pointer-events: none;
}

.vinyl-sheen-highlight {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 45deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.12) 35deg,
    transparent 70deg,
    transparent 180deg,
    rgba(255, 255, 255, 0.12) 215deg,
    transparent 250deg
  );
  pointer-events: none;
}

/* Vinyl Center Label */
.vinyl-center-label {
  width: 76px;
  height: 76px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-color);
  border: 4px solid #0a0a0c;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.label-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
}

.label-brand {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  line-height: 1;
}

.label-room {
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 2px 0;
}

.label-speed {
  font-family: var(--font-mono);
  font-size: 6px;
  color: rgba(255, 255, 255, 0.65);
}

.label-spindle-hole {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
  border: 1px solid #444;
  margin-top: 3px;
}

/* Chrome Mechanical Tonearm Assembly */
.tonearm-assembly {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 90px;
  height: 170px;
  pointer-events: none;
  transform-origin: 20px 20px;
  transform: rotate(0deg);
  transition: transform 1.2s cubic-bezier(0.34, 1.2, 0.64, 1);
  z-index: 10;
}

.tonearm-assembly.arm-on-record {
  transform: rotate(26deg);
}

.tonearm-base {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #e2e8f0 0%, #94a3b8 70%, #475569 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
}

.tonearm-counterweight {
  position: absolute;
  top: 0px;
  left: 14px;
  width: 14px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(to right, #94a3b8, #475569);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.tonearm-pivot {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

.tonearm-bar {
  position: absolute;
  top: 20px;
  left: 19px;
  width: 4px;
  height: 130px;
  background: linear-gradient(to right, #cbd5e1, #64748b, #cbd5e1);
  border-radius: 2px;
  box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.4);
}

.tonearm-headshell {
  position: absolute;
  bottom: 0px;
  left: 14px;
  width: 14px;
  height: 24px;
  background: #1e293b;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.tonearm-cartridge-light {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  margin: 4px auto 0;
}

.turntable-footer-strip {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-grotesk);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  padding: 0 0.25rem;
}

/* Live status indicator (populated by bilibili.js) */
#bili-status-indicator {
  font-family: var(--font-grotesk);
  min-height: 1.25rem;
}

/* Uppercase micro-labels across the utility shelf */
.shelf-label {
  font-family: var(--font-grotesk);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.bili-player-viewport {
  width: 100%;
  height: clamp(200px, 28vh, 320px);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  position: relative;
  box-shadow: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Studio Utility Shelf */
.studio-utility-shelf {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.8rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.deck-controls-toggle-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-family: var(--font-grotesk);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.deck-controls-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Video Focus Mode: when focus timer is running with Live Video view */
.companion-stage-pane.video-focus-active {
  justify-content: flex-start;
  gap: 0.75rem;
}

.companion-stage-pane.video-focus-active:not(.controls-revealed) #deck-utility-controls {
  display: none !important;
}

.companion-stage-pane.video-focus-active .bili-player-viewport {
  height: clamp(220px, 38vh, 360px);
  flex-shrink: 0;
}

.companion-stage-pane.video-focus-active .studio-utility-shelf {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.companion-stage-pane.video-focus-active #deck-tasks-section {
  border-top: none;
  padding-top: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.companion-stage-pane.video-focus-active #deck-tasks-section .task-items-scroll {
  flex: 1;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
}

.bili-channel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bili-channel-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.13);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.bili-channel-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translate(-1px, -1px);
}

.bili-channel-pill.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}

.btn-direct-open {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: var(--font-grotesk);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.42rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  text-transform: none;
  letter-spacing: 0.03em;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.btn-direct-open:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}

.btn-direct-open:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.custom-select {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  outline: none;
  font-size: 0.82rem;
  cursor: pointer;
  width: 100%;
}

.custom-select option {
  background: #0d0d10;
  color: #ffffff;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--accent-color);
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Quick Todo */
.task-form {
  display: flex;
  gap: 0.5rem;
}

.task-input-text {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
}

.task-input-text:focus {
  border-color: var(--accent-color);
}

.task-items-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.task-item.completed {
  opacity: 0.5;
  text-decoration: line-through;
}

/* ==========================================================================
   Dedicated Focus Tasks Dock (Visible when companion panel is collapsed)
   ========================================================================== */
.focus-tasks-widget {
  width: 320px;
  max-width: 360px;
  flex-shrink: 0;
  height: 100%;
  max-height: 100%;
  background: rgba(10, 11, 15, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-left: 2px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.focus-tasks-widget.hidden-widget {
  display: none !important;
}

.focus-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.focus-tasks-title {
  font-family: var(--font-grotesk);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.92);
}

.focus-tasks-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  color: var(--accent-secondary);
}

.focus-tasks-btn-icon {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.focus-tasks-btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.focus-tasks-body {
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.focus-tasks-body .task-items-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Minimized Floating Tasks Pill */
.focus-tasks-min-pill {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 25;
  background: rgba(14, 15, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  padding: 0.45rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-grotesk);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 3px 3px 0 rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.focus-tasks-min-pill:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.focus-tasks-min-pill.hidden-pill {
  display: none !important;
}

/* ==========================================================================
   Zen Mode & Fullscreen Distraction-Free
   ========================================================================== */
body.zen-mode .top-nav,
body.zen-mode .companion-stage-pane,
body.zen-mode #companion-panel,
body.zen-mode .hero-top-command-bar,
body.zen-mode .laser-groove-wrapper,
body.zen-mode .hero-bottom-command-bar,
body.zen-mode .focus-tasks-widget,
body.zen-mode .focus-tasks-min-pill {
  display: none !important;
}

body.zen-mode .main-stage {
  grid-template-columns: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

body.zen-mode .hero-stage-pane {
  background: transparent;
  border: none;
  box-shadow: none;
  height: 100vh;
  padding: 1.5rem 3rem;
  justify-content: center;
}

/* Floating Zen Exit Button */
.zen-exit-pill {
  display: none;
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  padding: 0.55rem 1.4rem;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 50;
  transition: all 0.2s ease;
}

.zen-exit-pill:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

body.zen-mode .zen-exit-pill {
  display: block;
}

/* ==========================================================================
   Modal Dialogs (Settings)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.25rem;
  border-radius: 12px;
  background: #0c0c0f;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-control-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

.form-control-input:focus {
  border-color: var(--accent-color);
}

/* Settings modal primary action (previously unstyled browser default) */
.btn-primary-action {
  background: var(--accent-color);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-family: var(--font-grotesk);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-action:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
}

.btn-primary-action:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Compact desktop / small laptop layout
   Keeps the full Bilibili companion while preventing the timer from clipping.
   ========================================================================== */
@media (min-width: 641px) and (max-width: 1100px) {
  .top-nav {
    padding: 0 1rem;
  }

  .nav-actions {
    gap: 0.4rem;
  }

  #theme-dropdown-select {
    width: auto;
    max-width: 150px;
  }

  #btn-toggle-particles > span.hidden,
  #btn-toggle-panel > span.hidden,
  #btn-toggle-tasks > span.hidden,
  #btn-zen-mode > span.hidden {
    display: none !important;
  }

  .companion-stage-pane {
    width: clamp(290px, 36vw, 380px);
    padding: 0.75rem 0.9rem;
  }

  .main-stage .hero-stage-pane {
    padding: 0.7rem 0.85rem;
  }

  .main-stage.panel-collapsed:not(.tasks-open) .hero-stage-pane {
    padding: 0.7rem 1rem;
  }

  .mode-tabs-wrapper {
    gap: 0.2rem;
    padding: 0.22rem;
  }

  .mode-tab-btn {
    padding: 0.42rem 0.65rem;
    font-size: 0.75rem;
  }

  .console-brand-title {
    display: none;
  }

  .progress-display-selector {
    margin-left: auto;
  }

  .prog-mode-btn {
    padding: 0.22rem 0.48rem;
    font-size: 0.64rem;
  }

  .vintage-split-flap-board {
    gap: clamp(2px, 0.35vw, 5px);
  }

  .flap-card {
    width: clamp(54px, min(17vh, 11.5vw), 140px);
    height: clamp(110px, min(30vh, 16.5vw), 220px);
  }

  .flap-num {
    font-size: clamp(5.5rem, min(25vh, 14vw), 13rem);
  }

  .flap-colon {
    gap: clamp(0.7rem, 2vh, 1.4rem);
    padding: 0 2px;
  }

  .vinyl-microgroove-chassis {
    padding: 0.6rem 0.75rem;
  }

  .hifi-preset-btn {
    padding: 0.42rem 0.75rem;
    font-size: 0.7rem;
  }

  .hifi-controls-cockpit {
    gap: 0.85rem;
  }

  .btn-hifi-primary {
    min-width: 170px;
    padding: 0.95rem 2rem;
    font-size: 1.05rem;
  }

  .btn-hifi-round {
    width: 3.4rem;
    height: 3.4rem;
  }

  .turntable-platter {
    width: clamp(130px, 18vh, 190px);
    height: clamp(130px, 18vh, 190px);
  }

  .turntable-chassis,
  .studio-utility-shelf {
    padding: 0.65rem 0.75rem;
  }

  .bili-player-viewport {
    height: clamp(180px, 25vh, 260px);
  }
}

/* Very short desktop windows: prioritize the clock, progress and controls. */
@media (min-width: 641px) and (max-height: 600px) {
  .main-stage .hero-stage-pane,
  .main-stage.panel-collapsed:not(.tasks-open) .hero-stage-pane {
    padding: 0.45rem 0.75rem;
    gap: 0.45rem;
    overflow-y: auto;
  }

  .hero-top-command-bar,
  .vintage-master-console,
  .hero-bottom-command-bar {
    flex-shrink: 0;
  }

  .console-brand-row,
  .console-metrics-row,
  .hifi-preset-deck {
    display: none;
  }

  .vintage-master-console {
    margin: 0.2rem auto;
  }

  .vintage-split-flap-board {
    margin: 0 auto;
  }

  .vinyl-microgroove-chassis {
    margin-top: 0.25rem;
    padding: 0.45rem 0.65rem;
  }

  .hero-bottom-command-bar {
    gap: 0.4rem;
    margin-top: 0.25rem;
  }

  .btn-hifi-primary {
    min-width: 155px;
    padding: 0.75rem 1.6rem;
  }

  .btn-hifi-round {
    width: 2.95rem;
    height: 2.95rem;
  }

  .companion-stage-pane {
    padding: 0.55rem 0.7rem;
  }
}

/* ==========================================================================
   Mobile Companion Hub (Strictly hidden on non-phones)
   ========================================================================== */
.mobile-companion-hub {
  display: none !important;
}

/* ==========================================================================
   MOBILE PHONE ONLY (narrow portrait/landscape phones)
   非手机宽度继续显示完整桌面伴学体验。
   ========================================================================== */
@media (max-width: 640px), (hover: none) and (pointer: coarse) and (max-width: 900px) {
  html, body {
    width: 100%;
    max-width: 100vw;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .app-wrapper {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Keep the phone header intentionally small: brand + audio mute only. */
  .top-nav {
    padding: calc(0.5rem + env(safe-area-inset-top)) 0.85rem 0.5rem;
    height: calc(52px + env(safe-area-inset-top));
    min-height: calc(52px + env(safe-area-inset-top));
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 0.5rem;
  }

  .podor-home-brand {
    padding: 0.3rem 0.65rem;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .nav-actions {
    width: auto;
    margin-left: auto;
    gap: 0;
    flex-shrink: 0;
  }

  .nav-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  .theme-selector-wrap,
  #btn-toggle-particles,
  #btn-toggle-tasks,
  #btn-zen-mode,
  #btn-settings {
    display: none !important;
  }

  /* Hide desktop companion deck and panel toggle on mobile phone */
  #btn-toggle-panel,
  #btn-fullscreen,
  .companion-stage-pane,
  #companion-panel,
  #focus-tasks-widget,
  #focus-tasks-min-pill {
    display: none !important;
  }

  /* Single-column main stage for mobile phone */
  .main-stage {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: calc(100vh - 52px - env(safe-area-inset-top)) !important;
    min-height: calc(100dvh - 52px - env(safe-area-inset-top)) !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 0 calc(1.25rem + env(safe-area-inset-bottom)) 0 !important;
  }

  .hero-stage-pane {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    border-bottom: none !important;
    padding: 0.9rem 0.75rem 1rem 0.75rem !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    overflow: visible !important;
    gap: 0.95rem;
  }

  .hero-stage-pane::before {
    width: 85vmin !important;
    height: 85vmin !important;
    opacity: 0.65;
  }

  .hero-stage-pane::after {
    display: none !important;
  }

  .mode-tabs-wrapper {
    width: 100%;
    max-width: 360px;
    gap: 0.2rem;
    padding: 0.25rem;
  }

  .mode-tab-btn {
    padding: 0.4rem 0.45rem;
    font-size: 0.76rem;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
  }

  .vintage-master-console {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .console-brand-row {
    display: none;
  }

  .console-brand-title {
    display: none;
  }

  .progress-display-selector {
    display: none;
  }

  /* Digits: strictly non-wrapping on phone */
  .vintage-split-flap-board {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(2px, 1.2vw, 5px);
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.25rem auto;
  }

  .flap-card {
    width: clamp(48px, 17vw, 70px) !important;
    height: clamp(84px, 22vw, 118px) !important;
    flex-shrink: 1 !important;
  }

  .flap-num {
    font-size: clamp(3.7rem, 15vw, 5.6rem) !important;
  }

  .flap-colon {
    gap: clamp(0.7rem, 2.8vw, 1.2rem) !important;
    padding: 0 2px !important;
    flex-shrink: 0 !important;
  }

  .colon-peg {
    width: clamp(7px, 2vw, 10px) !important;
    height: clamp(7px, 2vw, 10px) !important;
  }

  .microgroove-blocks-track {
    gap: 2px;
  }

  .groove-block {
    height: 12px;
  }

  .hifi-preset-deck {
    display: none;
  }

  .btn-hifi-primary {
    padding: 0.9rem 2.2rem;
    font-size: 1.05rem;
    min-width: 160px;
  }

  .btn-hifi-round {
    width: 3.3rem;
    height: 3.3rem;
  }

  /* Show Mobile Companion Hub only on mobile phone */
  .mobile-companion-hub {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0 0.75rem;
    gap: 0.85rem;
  }

  .mobile-ambient-card {
    width: 100%;
    background: rgba(14, 15, 20, 0.78);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  }

  .mobile-ambient-card:focus-within {
    border-color: var(--accent-color);
  }

  #mobile-ambient-select {
    min-width: 0;
  }

  .mobile-ambient-toggle-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-grotesk);
    font-weight: 700;
    font-size: 0.75rem;
    transition: all 0.15s ease;
  }

  .mobile-ambient-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }
}
