/* ==========================================================================
   TABATA TIMERS ONLINE - 2010 SKEUOMORPHIC STYLESHEET
   Authentic hardware chronometer design with rich tactile feedback,
   brushed metals, glass glare, glossy 3D buttons, and recessed LCD bezel.
   ========================================================================== */

/* --- CSS Reset & Variables --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Hardware Palette */
  --chassis-bg: #22252a;
  --chassis-border: #141618;
  --metal-highlight: #4a4f58;
  --metal-shadow: #111215;
  
  /* LCD Colors */
  --lcd-bg-ready: #121510;
  --lcd-glow-ready: #7fff00;
  --lcd-bg-work: #0d2212;
  --lcd-text-work: #39ff14;
  --lcd-bg-rest: #06182a;
  --lcd-text-rest: #00d2ff;
  --lcd-bg-prep: #261f0d;
  --lcd-text-prep: #ffcc00;
  
  /* Skeuomorphic Button Colors */
  --btn-green-top: #52c234;
  --btn-green-mid: #2c9c1b;
  --btn-green-bot: #1b6810;
  --btn-green-rim: #10420a;
  
  --btn-red-top: #ff5b5b;
  --btn-red-mid: #d32020;
  --btn-red-bot: #901010;
  --btn-red-rim: #500808;
  
  --btn-pause-top: #ffc837;
  --btn-pause-mid: #d48b11;
  --btn-pause-bot: #9a5f08;
  --btn-pause-rim: #5f3902;

  --metal-btn-top: #525862;
  --metal-btn-mid: #353a42;
  --metal-btn-bot: #21252b;

  /* Ultra-lightweight Zero-Download System Typography (0 KB font downloads) */
  --font-digital: ui-monospace, "SF Mono", "Courier New", Courier, monospace;
  --font-hud: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-content: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: #121417;
}

body {
  font-family: var(--font-content);
  color: #d1d5db;
  line-height: 1.6;
  min-height: 100vh;
  /* 2012 Refined Dark Micro-Carbon / Brushed Texture */
  background-color: #111317;
  background-image: 
    radial-gradient(circle at 50% 25%, rgba(45, 52, 65, 0.5) 0%, transparent 80%),
    linear-gradient(45deg, #17191f 25%, transparent 25%), 
    linear-gradient(-45deg, #17191f 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #17191f 75%), 
    linear-gradient(-45deg, transparent 75%, #17191f 75%);
  background-size: 100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px;
}

/* ==========================================================================
   HEADER (2012 Anodized Dark Metal Bar)
   ========================================================================== */
.site-header {
  height: 48px;
  background: linear-gradient(180deg, #2d313a 0%, #1c1e25 100%);
  border-bottom: 1px solid #0a0b0d;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #52ff52, #1b851b);
  box-shadow: 
    0 0 10px #39ff14,
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.9);
}

.brand-title {
  font-family: var(--font-hud);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f3f4f6;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 -1px 0 rgba(255, 255, 255, 0.25);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-tagline {
  font-size: 0.8rem;
  color: #9ca3af;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.header-guide-link {
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #3d424c 0%, #252830 100%);
  border: 1px solid #14161b;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 1px 3px rgba(0, 0, 0, 0.6);
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.9);
  transition: all 0.15s ease;
}

.header-guide-link:hover {
  color: #39ff14;
  border-color: #328328;
}

/* ==========================================================================
   MAIN LAYOUT & 100VH HERO VIEWPORT
   ========================================================================== */
.main-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Fits entire timer cleanly centered within desktop viewport */
.timer-viewport-section {
  min-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 0 16px 0;
  box-sizing: border-box;
}

/* ==========================================================================
   2012 SKEUOMORPHIC ANODIZED TITANIUM HARDWARE CHASSIS
   CNC Milled Chamfer, Precision Bevel, Substantial 880px Presence
   ========================================================================== */
.hardware-console {
  position: relative;
  width: 100%;
  max-width: 880px;
  background: 
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 18%, transparent 50%),
    linear-gradient(135deg, #2f343d 0%, #1e2128 45%, #15171d 100%);
  border: 1px solid #383e4a;
  border-radius: 20px;
  padding: 24px 30px 20px 30px;
  box-shadow: 
    0 30px 65px -15px rgba(0, 0, 0, 0.95),
    0 12px 28px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.8),
    0 0 0 1px #0c0d10;
  margin: 0 auto;
  transition: all 0.3s ease;
}

/* 2012 Precision Countersunk Hex Machine Bolts */
.screw {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 45%, #9ba3b0 0%, #4a515c 65%, #22262d 100%);
  border: 1px solid #121417;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(0, 0, 0, 0.6);
}

.screw span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #14161a;
  border-radius: 1px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.25);
}

.screw.top-left { top: 12px; left: 14px; }
.screw.top-right { top: 12px; right: 14px; }
.screw.bottom-left { bottom: 12px; left: 14px; }
.screw.bottom-right { bottom: 12px; right: 14px; }

/* Faceplate Status LED */
.console-plate-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 4px;
}

.status-led-group {
  display: flex;
  align-items: center;
}

.led-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #17191d;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #0d0e10;
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.1);
}

.led-bulb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a3f47;
  border: 1px solid #1c1e22;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
}

/* LED States */
.led-bulb.active-standby {
  background: radial-gradient(circle at 35% 35%, #ffd438, #d48b11);
  box-shadow: 0 0 10px #ffcc00, inset 0 1px 2px #fff;
}
.led-bulb.active-work {
  background: radial-gradient(circle at 35% 35%, #5aff5a, #1fad1f);
  box-shadow: 0 0 12px #39ff14, inset 0 1px 2px #fff;
}
.led-bulb.active-rest {
  background: radial-gradient(circle at 35% 35%, #38bdf8, #0284c7);
  box-shadow: 0 0 12px #00d2ff, inset 0 1px 2px #fff;
}
.led-bulb.active-prep {
  background: radial-gradient(circle at 35% 35%, #ffb300, #ff8f00);
  box-shadow: 0 0 12px #ff9800, inset 0 1px 2px #fff;
  animation: ledPulse 0.5s infinite alternate;
}
.led-bulb.active-paused {
  background: radial-gradient(circle at 35% 35%, #ffd438, #d48b11);
  box-shadow: 0 0 12px #ffcc00, inset 0 1px 2px #fff;
  animation: ledPulse 0.5s infinite alternate;
}

@keyframes ledPulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.led-label {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: #a0a8b4;
  font-weight: 700;
}

/* ==========================================================================
   RECESSED LCD BEZEL & SCREEN (2012 High-Definition Gym Chronometer)
   ========================================================================== */
.lcd-bezel {
  background: linear-gradient(180deg, #101216 0%, #1c2028 100%);
  border: 2px solid #090a0d;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 
    inset 0 4px 10px rgba(0, 0, 0, 0.95),
    0 1px 0 rgba(255, 255, 255, 0.22);
}

.lcd-screen {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #111a14 0%, #070d09 100%);
  border-radius: 9px;
  border: 2px solid #040806;
  box-shadow: 
    inset 0 10px 25px rgba(0, 0, 0, 0.98),
    inset 0 0 50px rgba(0, 0, 0, 0.85);
  padding: 26px 32px 20px 32px;
  transition: background 0.4s ease, border-color 0.4s ease;
  user-select: none;
}

/* Glass Glare / Gloss Specular Highlight Overlay (2012 Curved Sheen) */
.lcd-glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 58%;
  background: linear-gradient(
    140deg, 
    rgba(255, 255, 255, 0.18) 0%, 
    rgba(255, 255, 255, 0.05) 44%, 
    transparent 46%
  );
  pointer-events: none;
  z-index: 5;
}

/* Subtle LCD scanline grid texture */
.lcd-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12),
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 4;
}

/* Top LCD Status Strip */
.lcd-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  z-index: 6;
  position: relative;
}

.lcd-phase-pill {
  padding: 3px 14px;
  border-radius: 5px;
  background: #192b1b;
  color: #7fff00;
  border: 1px solid rgba(127, 255, 0, 0.4);
  text-shadow: 0 0 10px rgba(127, 255, 0, 0.7);
  letter-spacing: 1.5px;
  font-size: 0.88rem;
}

.lcd-audio-status {
  color: #8da48f;
  font-size: 0.88rem;
  letter-spacing: 1px;
}

.lcd-total-time {
  color: #8da48f;
  font-family: var(--font-digital);
  font-size: 1.05rem;
  letter-spacing: 1px;
}

/* Center Giant Digits (Bolder, 2012 Gym Clock Stature) */
.lcd-main-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0 10px 0;
  position: relative;
  z-index: 6;
}

.digit-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0.92;
}

/* Faint unlit LCD segments background (88) */
.digital-faint {
  font-family: var(--font-digital);
  font-size: clamp(5.8rem, min(19vw, 20vh), 10.5rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.04);
  letter-spacing: 8px;
  font-variant-numeric: tabular-nums;
}

/* Lit active digits */
.digital-active {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-digital);
  font-size: clamp(5.8rem, min(19vw, 20vh), 10.5rem);
  font-weight: 900;
  color: #39ff14;
  letter-spacing: 8px;
  font-variant-numeric: tabular-nums;
  text-shadow: 
    0 0 14px rgba(57, 255, 20, 0.9),
    0 0 35px rgba(57, 255, 20, 0.55),
    0 0 75px rgba(57, 255, 20, 0.3);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.display-subtext {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  letter-spacing: 4px;
  color: #63856a;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Bottom LCD Round Counter & Gauges */
.lcd-bottom-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-top: 6px;
  z-index: 6;
  position: relative;
  flex-wrap: wrap;
  gap: 10px;
}

.round-counter-block {
  display: flex;
  flex-direction: column;
}

.counter-label {
  font-family: var(--font-hud);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: #6f8a75;
}

.counter-numbers {
  font-family: var(--font-digital);
  font-size: 1.6rem;
  font-weight: 700;
  color: #f3f4f6;
  line-height: 1.1;
}

.current-round {
  color: #39ff14;
  text-shadow: 0 0 12px rgba(57, 255, 20, 0.8);
}

.slash, .total-rounds {
  color: #556b5a;
}

/* Dynamic Round LED Segment Gauge (2012 Backlit Jewel Dots) */
.round-led-gauge {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.gauge-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #0f1411;
  border: 1px solid #18241b;
  font-family: var(--font-digital);
  font-size: 0.75rem;
  color: #2b4231;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
  transition: all 0.25s ease;
}

.gauge-dot.completed {
  background: #174d20;
  color: #52ff52;
  border-color: #329424;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.gauge-dot.current {
  background: #25802a;
  color: #ffffff;
  border-color: #52ff52;
  box-shadow: 0 0 12px #39ff14, inset 0 1px 2px #fff;
  font-weight: 700;
}


/* Dynamic Phase Themes for LCD Screen */
/* 1. PREPARE PHASE */
.lcd-screen.phase-prep {
  background: #211905;
  border-color: #4a3806;
}
.lcd-screen.phase-prep .digital-active {
  color: #ffb703;
  text-shadow: 0 0 25px rgba(255, 183, 3, 0.8), 0 0 45px rgba(255, 183, 3, 0.4);
}
.lcd-screen.phase-prep .lcd-phase-pill {
  background: #382705;
  color: #ffb703;
  border-color: #ffb703;
  text-shadow: 0 0 8px rgba(255, 183, 3, 0.7);
}

/* 2. WORK PHASE */
.lcd-screen.phase-work {
  background: #08260f;
  border-color: #125722;
}
.lcd-screen.phase-work .digital-active {
  color: #39ff14;
  text-shadow: 0 0 25px rgba(57, 255, 20, 0.85), 0 0 50px rgba(57, 255, 20, 0.4);
}
.lcd-screen.phase-work .lcd-phase-pill {
  background: #104218;
  color: #39ff14;
  border-color: #39ff14;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.8);
}

/* 3. REST PHASE (Deep Cyan / Sapphire Blue) */
.lcd-screen.phase-rest {
  background: #06182a;
  border-color: #0f3d68;
}
.lcd-screen.phase-rest .digital-active {
  color: #00d2ff;
  text-shadow: 0 0 25px rgba(0, 210, 255, 0.85), 0 0 50px rgba(0, 210, 255, 0.4);
}
.lcd-screen.phase-rest .lcd-phase-pill {
  background: #0b2e4d;
  color: #00d2ff;
  border-color: #00d2ff;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.8);
}
.lcd-screen.phase-rest .current-round {
  color: #00d2ff;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.7);
}

/* 4. PAUSED STATE (High-visibility amber alert with breathing digits) */
.lcd-screen.is-paused .lcd-phase-pill {
  background: #382705 !important;
  color: #ffcc00 !important;
  border-color: #ffcc00 !important;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.85) !important;
  animation: phasePulse 0.9s infinite alternate;
}

.lcd-screen.is-paused .display-subtext {
  color: #ffcc00 !important;
  letter-spacing: 3px;
  animation: phasePulse 0.9s infinite alternate;
}

.lcd-screen.is-paused .digital-active {
  animation: digitPauseBlink 1.4s infinite ease-in-out;
}

@keyframes digitPauseBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes phasePulse {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* ==========================================================================
   TACTILE SKEUOMORPHIC 3D PUSH BUTTONS
   ========================================================================== */
.hardware-controls {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.skeuo-button {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  user-select: none;
  font-family: var(--font-hud);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  outline: none;
  transition: transform 0.08s ease;
}

.btn-outer {
  display: block;
  border-radius: 12px;
  padding: 3px;
  background: linear-gradient(180deg, #18191c 0%, #2f343d 100%);
  box-shadow: 
    0 1px 0 rgba(255, 255, 255, 0.2),
    0 6px 14px rgba(0, 0, 0, 0.75);
}

.btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 9px;
  color: #ffffff;
  font-size: 1.25rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.08s ease;
}

/* Gloss reflection on the top half of 3D buttons (2012 crisp split) */
.btn-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(
    180deg, 
    rgba(255, 255, 255, 0.45) 0%, 
    rgba(255, 255, 255, 0.12) 80%, 
    transparent 100%
  );
  border-radius: 8px 8px 3px 3px;
  pointer-events: none;
}

/* Primary Green (START - 2012 Sport Emerald) */
.primary-action .btn-inner {
  background: linear-gradient(
    180deg, 
    #52db34 0%, 
    #31b518 48%, 
    #21970f 50%, 
    #156a08 100%
  );
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 5px 0 #0d4205,
    0 8px 16px rgba(0, 0, 0, 0.65);
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.2);
}

.primary-action:hover .btn-inner {
  filter: brightness(1.08);
}

.primary-action:active,
.primary-action.is-pressed {
  transform: translateY(4px);
}
.primary-action:active .btn-inner,
.primary-action.is-pressed .btn-inner {
  box-shadow: 
    inset 0 3px 5px rgba(0, 0, 0, 0.8),
    0 1px 0 #0d4205;
}

/* Pause State (2012 Amber Gold) */
.primary-action.mode-pause .btn-inner {
  background: linear-gradient(
    180deg, 
    #ffd633 0%, 
    #e6a100 48%, 
    #cc8800 50%, 
    #8f5b00 100%
  );
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 5px 0 #5e3b00,
    0 8px 16px rgba(0, 0, 0, 0.65);
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Secondary Red (RESET - 2012 Sport Crimson) */
.reset-action .btn-inner {
  background: linear-gradient(
    180deg, 
    #ff5c5c 0%, 
    #e02424 48%, 
    #bf1818 50%, 
    #880d0d 100%
  );
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 5px 0 #520707,
    0 8px 16px rgba(0, 0, 0, 0.65);
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.2);
}

.reset-action:hover .btn-inner {
  filter: brightness(1.08);
}

.reset-action:active {
  transform: translateY(4px);
}
.reset-action:active .btn-inner {
  box-shadow: 
    inset 0 3px 5px rgba(0, 0, 0, 0.8),
    0 1px 0 #520707;
}

/* ==========================================================================
   AUXILIARY CONTROLS (2012 Brushed Aluminum Toggles)
   ========================================================================== */
.hardware-aux-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aux-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 7px;
  background: linear-gradient(180deg, #444a54 0%, #292d35 100%);
  border: 1px solid #14161a;
  color: #dbe1ea;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.6);
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.9);
  transition: all 0.15s ease;
}

.aux-toggle:hover {
  background: linear-gradient(180deg, #474d57 0%, #2a2f38 100%);
  color: #ffffff;
}

.aux-toggle:active {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
  transform: translateY(1px);
}

/* ==========================================================================
   COLLAPSIBLE WORKOUT PRESETS DRAWER (Skeuomorphic Mode Selector)
   ========================================================================== */
.preset-drawer {
  margin-top: 14px;
  background: #15181d;
  border: 2px solid #111215;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.85);
  animation: drawerSlide 0.2s ease;
}

@keyframes drawerSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 2px;
}

.drawer-title {
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 1.2px;
  font-size: 0.82rem;
  color: #9aa2b0;
  text-transform: uppercase;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.drawer-close-btn:hover {
  color: #ffffff;
}

.preset-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.preset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, #222630 0%, #16181f 100%);
  border: 1px solid #2d3340;
  color: #d1d5db;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 2px 4px rgba(0, 0, 0, 0.4);
  font-family: inherit;
  width: 100%;
}

.preset-card:hover {
  background: linear-gradient(180deg, #282d38 0%, #1a1d25 100%);
  border-color: #4b5563;
  transform: translateY(-1px);
}

.preset-card:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.preset-card.active-preset {
  background: linear-gradient(180deg, #132a19 0%, #0a170d 100%);
  border-color: #39ff14;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.preset-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Precision Radio LED jewel dot */
.preset-radio {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #475569;
  background: #0d0f13;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.preset-card.active-preset .preset-radio {
  border-color: #39ff14;
  background: #39ff14;
  box-shadow: 0 0 8px #39ff14, inset 0 1px 1px #ffffff;
}

.preset-text-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.preset-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.preset-name {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.6px;
  color: #f1f5f9;
}

.preset-card.active-preset .preset-name {
  color: #52ff52;
}

.preset-pill {
  font-family: var(--font-digital);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.5px;
}

.preset-pill.default-pill {
  color: #52ff52;
  border-color: rgba(82, 255, 82, 0.35);
  background: rgba(82, 255, 82, 0.1);
}

.preset-pill.hiit-pill {
  color: #ffcc00;
  border-color: rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.1);
}

.preset-pill.emom-pill {
  color: #00d2ff;
  border-color: rgba(0, 210, 255, 0.35);
  background: rgba(0, 210, 255, 0.1);
}

.preset-subtext {
  font-size: 0.74rem;
  color: #838d9d;
  letter-spacing: 0.3px;
}

.preset-card.active-preset .preset-subtext {
  color: #93a89a;
}

.preset-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.preset-duration-pill {
  font-family: var(--font-digital);
  font-size: 0.92rem;
  font-weight: 700;
  color: #cbd5e1;
  background: #101216;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid #232730;
  letter-spacing: 1px;
}

.preset-card.active-preset .preset-duration-pill {
  color: #39ff14;
  border-color: rgba(57, 255, 20, 0.4);
  background: #0b1a0f;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

/* Feature Announcement Callout in Section 4 */
.feature-announcement-card {
  margin-top: 20px;
  background: linear-gradient(180deg, #18202a 0%, #12161f 100%);
  border: 1px solid #233446;
  border-left: 4px solid #00d2ff;
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.feature-announcement-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.feature-tag {
  font-family: var(--font-hud);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #0b2e4d;
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.4);
  letter-spacing: 0.8px;
}

.feature-announcement-header h3 {
  font-size: 1.05rem;
  color: #f1f5f9;
  margin: 0;
}

.feature-announcement-card p {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.feature-preset-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-preset-list li {
  font-size: 0.88rem;
  color: #cbd5e1;
  padding-left: 14px;
  position: relative;
}

.feature-preset-list li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: #00d2ff;
}

.feature-tip {
  font-size: 0.85rem !important;
  color: #64748b !important;
  margin-bottom: 0 !important;
}

.feature-tip strong {
  color: #94a3b8;
}

.feature-tip kbd {
  background: #1e2430;
  border: 1px solid #334155;
  padding: 1px 5px;
  border-radius: 3px;
  color: #f1f5f9;
  font-family: monospace;
}

/* ==========================================================================
   COLLAPSIBLE HARDWARE SETTINGS DRAWER
   ========================================================================== */
.settings-drawer {
  margin-top: 16px;
  background: #191b20;
  border: 2px solid #111215;
  border-radius: 10px;
  padding: 16px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.8);
}

.drawer-title {
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 0.9rem;
  color: #9aa2b0;
  text-transform: uppercase;
  margin-bottom: 12px;
  text-shadow: 0 1px 1px #000;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-item label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-item input {
  background: #0d0e12;
  border: 1px solid #2e3440;
  border-radius: 6px;
  padding: 8px 10px;
  color: #39ff14;
  font-family: var(--font-digital);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  outline: none;
}

.setting-item input:focus {
  border-color: #52c234;
  box-shadow: 0 0 8px rgba(82, 194, 52, 0.4);
}

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

.btn-apply, .btn-restore {
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  cursor: pointer;
  border: 1px solid #111;
  text-transform: uppercase;
}

.btn-apply {
  background: linear-gradient(180deg, #329424 0%, #1e6414 100%);
  color: #fff;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.5);
}

.btn-restore {
  background: linear-gradient(180deg, #3f4550 0%, #282c33 100%);
  color: #cbd5e1;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), 0 2px 4px rgba(0,0,0,0.5);
}

/* Speaker Grille (Vintage Physical Detail) */
.speaker-grille {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.speaker-grille span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111215;
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   VIEWPORT BOTTOM BAR (Shortcuts & Quick Guide Scroll)
   ========================================================================== */
.viewport-bottom-bar {
  width: 100%;
  max-width: 900px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hotkey-hint {
  text-align: center;
  font-size: 0.8rem;
  color: #838d9d;
  margin-bottom: 0;
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.75rem;
  font-family: monospace;
  background: #252830;
  border: 1px solid #383d49;
  border-radius: 4px;
  color: #e2e8f0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.scroll-down-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #94a3b8;
  text-decoration: none;
  padding: 4px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.scroll-down-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #39ff14;
  border-color: rgba(57, 255, 20, 0.4);
}

.pill-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

.scroll-down-pill:hover .pill-arrow {
  transform: translateY(2px);
}



/* ==========================================================================
   SEO & AEO CONTENT GUIDE (High Legibility & Inset Panels)
   ========================================================================== */
.content-guide {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 50px;
}

.guide-card {
  background: linear-gradient(180deg, #1e2127 0%, #17191e 100%);
  border: 1px solid #282c35;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.guide-card h2 {
  font-family: var(--font-hud);
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: #f1f5f9;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.guide-card p {
  margin-bottom: 14px;
  color: #94a3b8;
  font-size: 0.98rem;
}

.guide-card p:last-child {
  margin-bottom: 0;
}

.guide-card strong {
  color: #f8fafc;
}

/* 20/10 Formula Visual Grid */
.formula-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.formula-box {
  flex: 1;
  min-width: 160px;
  padding: 16px;
  border-radius: 10px;
  background: #131519;
  border: 1px solid #252932;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.formula-time {
  font-family: var(--font-digital);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.work-box .formula-time {
  color: #39ff14;
  text-shadow: 0 0 12px rgba(57, 255, 20, 0.6);
}

.rest-box .formula-time {
  color: #00d2ff;
  text-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

.rounds-box .formula-time {
  color: #ffd438;
  text-shadow: 0 0 12px rgba(255, 212, 56, 0.6);
}

.formula-title {
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 1rem;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.formula-desc {
  font-size: 0.8rem;
  color: #8492a6;
}

.formula-plus, .formula-times {
  font-size: 1.8rem;
  font-weight: 700;
  color: #4b5563;
}

/* Exercise Bullet List */
.exercise-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.exercise-list li {
  position: relative;
  padding-left: 24px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.exercise-list li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  color: #39ff14;
  font-weight: bold;
}

/* Comparison Table */
.table-responsive {
  overflow-x: auto;
  margin-top: 14px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #232730;
}

.comparison-table th {
  background: #14161a;
  color: #94a3b8;
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 1px;
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Multilingual International Language Grid */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.lang-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #131519;
  border: 1px solid #232730;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.lang-card:hover {
  border-color: #00d2ff;
  transform: translateY(-2px);
}

.lang-flag {
  font-size: 1.4rem;
  line-height: 1;
}

.lang-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-name {
  font-size: 0.72rem;
  color: #7b889b;
  font-family: var(--font-hud);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-term {
  font-size: 0.88rem;
  color: #e2e8f0;
}

.lang-countries {
  font-size: 0.68rem;
  color: #728096;
  margin-top: 2px;
}

/* FAQ Accordion-like Cards for AEO */
.faq-item {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.faq-item h3 {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 6px;
  font-weight: 600;
}

.faq-item p {
  color: #94a3b8;
}

/* ==========================================================================
   FOOTER (2010 Inset Stitched Texture Look)
   ========================================================================== */
.site-footer {
  background: #0f1114;
  border-top: 2px solid #1a1c22;
  padding: 30px 20px;
  text-align: center;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.8);
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-hud);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f1f5f9;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 12px;
}

.footer-copy a {
  color: #94a3b8;
  text-decoration: none;
}

.footer-copy a:hover {
  text-decoration: underline;
  color: #39ff14;
}

.footer-links a {
  color: #7b889b;
  font-size: 0.85rem;
  text-decoration: none;
  margin: 0 6px;
}

.footer-links a:hover {
  color: #f8fafc;
}

/* ==========================================================================
   FULLSCREEN MODE OVERRIDES (2012 Gym Wall Clock with Bottom Ad Space)
   ========================================================================== */
:fullscreen,
:-webkit-full-screen {
  background: #090a0d !important;
}

#timer-viewport-screen:fullscreen,
#timer-viewport-screen:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  margin: 0;
  padding: 14px 24px 10px 24px;
  background: radial-gradient(circle at 50% 25%, #181c24 0%, #08090c 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

#timer-viewport-screen:fullscreen .hardware-console,
#timer-viewport-screen:-webkit-full-screen .hardware-console {
  width: 100%;
  max-width: 1100px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 34px 16px 34px;
  border-radius: 20px;
  box-shadow: 
    0 40px 90px rgba(0, 0, 0, 0.98),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.8),
    0 0 0 1px #0a0b0e;
  margin: 0 auto;
}

#timer-viewport-screen:fullscreen .lcd-bezel,
#timer-viewport-screen:-webkit-full-screen .lcd-bezel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

#timer-viewport-screen:fullscreen .lcd-screen,
#timer-viewport-screen:-webkit-full-screen .lcd-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 30px 16px 30px;
}

#timer-viewport-screen:fullscreen .lcd-main-display,
#timer-viewport-screen:-webkit-full-screen .lcd-main-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#timer-viewport-screen:fullscreen .digital-faint,
#timer-viewport-screen:fullscreen .digital-active,
#timer-viewport-screen:-webkit-full-screen .digital-faint,
#timer-viewport-screen:-webkit-full-screen .digital-active {
  font-size: clamp(8.5rem, min(30vw, 30vh), 18rem);
  letter-spacing: 8px;
}

#timer-viewport-screen:fullscreen .display-subtext,
#timer-viewport-screen:-webkit-full-screen .display-subtext {
  font-size: 1.1rem;
  letter-spacing: 6px;
  margin-top: 8px;
}

#timer-viewport-screen:fullscreen .viewport-bottom-bar,
#timer-viewport-screen:-webkit-full-screen .viewport-bottom-bar {
  margin-top: 14px;
  width: 100%;
  max-width: 1100px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile & Height-Constrained Screens)
   ========================================================================== */
/* Tablet Mode (iPad & medium screens 641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .timer-viewport-section {
    justify-content: center;
    padding: 12px 0 16px 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 44px;
    padding: 0 12px;
  }
  .brand-title {
    font-size: 1.05rem;
    letter-spacing: 0.8px;
  }
  .header-tagline {
    display: none;
  }
  .header-guide-link {
    font-size: 0.74rem;
    padding: 3px 8px;
  }
  .timer-viewport-section {
    min-height: calc(100dvh - 44px);
    padding: clamp(18px, 3.5vh, 28px) 8px 12px 8px;
    justify-content: flex-start;
  }
  .hardware-console {
    padding: 14px 14px 12px 14px;
    border-radius: 16px;
  }
  .screw {
    width: 11px;
    height: 11px;
  }
  .screw span {
    width: 4px;
    height: 4px;
  }
  .screw.top-left { top: 8px; left: 10px; }
  .screw.top-right { top: 8px; right: 10px; }
  .screw.bottom-left { bottom: 8px; left: 10px; }
  .screw.bottom-right { bottom: 8px; right: 10px; }
  .console-plate-header {
    margin-bottom: 6px;
  }
  .lcd-bezel {
    padding: 5px;
    border-radius: 10px;
  }
  .lcd-screen {
    padding: 12px 12px 10px 12px;
    border-radius: 7px;
  }
  .lcd-status-bar {
    font-size: 0.75rem;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
  }
  .lcd-phase-pill {
    padding: 2px 8px;
    font-size: 0.72rem;
  }
  .lcd-audio-status {
    font-size: 0.72rem;
  }
  .lcd-total-time {
    font-size: 0.82rem;
  }
  .lcd-main-display {
    padding: 6px 0 4px 0;
  }
  .digital-faint,
  .digital-active {
    font-size: clamp(4.5rem, 20vw, 7rem);
    letter-spacing: 4px;
  }
  .display-subtext {
    font-size: 0.72rem;
    letter-spacing: 2px;
    margin-top: 2px;
  }
  .lcd-bottom-info {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    margin-top: 6px;
  }
  .counter-label {
    font-size: 0.65rem;
    letter-spacing: 1px;
  }
  .counter-numbers {
    font-size: 1.35rem;
  }
  .round-led-gauge {
    gap: 3px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .gauge-dot {
    width: 18px;
    height: 18px;
    font-size: 0.62rem;
    border-radius: 3px;
  }
  .hardware-controls {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .btn-inner {
    padding: 12px 16px;
    font-size: 1.15rem;
    min-height: 48px;
  }
  .hardware-aux-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    width: 100%;
  }
  .aux-toggle {
    justify-content: center;
    padding: 8px 6px;
    font-size: 0.74rem;
    letter-spacing: 0.5px;
    min-height: 40px;
  .preset-cards-grid {
    gap: 6px;
  }
  .preset-card {
    padding: 8px 10px;
    min-height: 44px;
  }
  .preset-name {
    font-size: 0.84rem;
  }
  .preset-subtext {
    font-size: 0.7rem;
  }
  .preset-duration-pill {
    font-size: 0.85rem;
    padding: 2px 7px;
  }
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .setting-item input {
    padding: 7px 8px;
    font-size: 0.95rem;
  }
  .drawer-actions {
    flex-direction: column;
    gap: 8px;
  }
  .btn-apply, .btn-restore {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 0.8rem;
  }
  .viewport-bottom-bar {
    margin-top: 10px;
  }
  .hotkey-hint {
    display: none; /* Mobile touch devices do not have physical keyboard keys */
  }
  .scroll-down-pill {
    padding: 5px 14px;
    font-size: 0.75rem;
  }
  .formula-grid {
    flex-direction: column;
  }
  .formula-plus, .formula-times {
    display: none;
  }
  .formula-box {
    width: 100%;
  }
  .guide-card {
    padding: 18px 14px;
    border-radius: 12px;
  }
}

/* Extra small mobile screens (iPhone SE, narrow Androids < 380px) */
@media (max-width: 380px) {
  .brand-title {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
  }
  .header-guide-link {
    font-size: 0.68rem;
    padding: 2px 6px;
  }
  .lcd-status-bar {
    font-size: 0.68rem;
  }
  .lcd-phase-pill {
    padding: 2px 6px;
    font-size: 0.68rem;
  }
  .digital-faint,
  .digital-active {
    font-size: clamp(3.8rem, 18vw, 5.5rem);
    letter-spacing: 2px;
  }
  .gauge-dot {
    width: 15px;
    height: 15px;
    font-size: 0.55rem;
  }
}

/* Height-constrained viewports (laptops, rotated phones, short browser windows) */
@media (max-height: 760px) {
  .timer-viewport-section {
    justify-content: center;
    padding: 8px 0;
  }
  .hardware-console {
    padding: 12px 18px 10px 18px;
    max-width: 820px;
  }
  .console-plate-header {
    margin-bottom: 6px;
  }
  .lcd-screen {
    padding: 8px 18px;
  }
  .digital-faint,
  .digital-active {
    font-size: clamp(4.2rem, 15vh, 6.8rem);
  }
  .hardware-controls {
    margin-top: 10px;
    gap: 10px;
  }
  .btn-inner {
    padding: 10px 16px;
    font-size: 1.15rem;
  }
  .hardware-aux-bar {
    margin-top: 8px;
    padding-top: 8px;
  }
  .aux-toggle {
    padding: 5px 12px;
    font-size: 0.78rem;
  }
  .speaker-grille {
    display: none;
  }
}

@media (max-height: 580px) {
  .console-plate-header {
    display: none;
  }
  .viewport-footer-hint {
    display: none;
  }
  .digital-faint,
  .digital-active {
    font-size: clamp(3.2rem, 14vh, 4.8rem);
  }
}


