/* ==========================================================================
   TURF CLOCK — Ceramic White × Jet Black Modular SF Chronograph
   Inspired by @carlhauser 08 Dial & Aurora/Lacaille/Talon Precision HUD
   ========================================================================== */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --bg-canvas: #dcdfe4;
  --bg-canvas-deep: #cfd4dc;
  --ceramic: #f7f8fa;
  --ceramic-pure: #ffffff;
  --ink: #0f1116;
  --ink-soft: #4c5260;
  --ink-muted: #8a909e;
  --line: rgba(15, 17, 22, 0.11);
  --line-strong: rgba(15, 17, 22, 0.24);

  /* Carlhauser / Aurora Signature Vermilion Orange × Deep Ocean Teal */
  --accent-primary: #f25c2a;
  --accent-secondary: #135d72;
  --accent-glow: #ff8a5b;
  --accent-rgb: 242, 92, 42;
  --accent2-rgb: 19, 93, 114;

  --gold: #d97706;
  --shadow-ceramic: 0 18px 40px rgba(15, 17, 22, 0.12), 0 2px 6px rgba(15, 17, 22, 0.06), inset 0 1px 0 #ffffff;
  --shadow-key: 0 4px 10px rgba(15, 17, 22, 0.07), inset 0 1px 0 #ffffff;

  --radius-card: 22px;
  --radius-pill: 999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --dock-height: 64px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

body[data-phase="ready"] {
  --accent-primary: #10b981;
  --accent-secondary: #0ea5e9;
  --accent-rgb: 16, 185, 129;
  --accent2-rgb: 14, 165, 233;
}
body[data-phase="build"] {
  --accent-primary: #f59e0b;
  --accent-secondary: #ef4444;
  --accent-rgb: 245, 158, 11;
  --accent2-rgb: 239, 68, 68;
}
body[data-phase="tense"] {
  --accent-primary: #8b5cf6;
  --accent-secondary: #ec4899;
  --accent-rgb: 139, 92, 246;
  --accent2-rgb: 236, 72, 153;
}
body[data-phase="final"],
body[data-phase="post"] {
  --accent-primary: #ef4444;
  --accent-secondary: #f59e0b;
  --accent-rgb: 239, 68, 68;
  --accent2-rgb: 245, 158, 11;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}

button, input, select {
  font: inherit;
  color: inherit;
}

.icon-btn svg,
.key-svg,
.inline-svg,
.dock-svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.is-hidden {
  display: none !important;
}

/* ==================== OBLIVION STEEL-PLATINUM × VIBRANT AURA BACKDROP ==================== */
.tech-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* Richer steel-platinum ground so pure white 3D ceramic pops with sculpted depth */
  background:
    radial-gradient(rgba(15, 17, 22, 0.09) 1px, transparent 1px),
    linear-gradient(155deg, #c6cdd8 0%, #b7c0ce 48%, #c2c9d6 100%);
  background-size: 24px 24px, 100% 100%;
}

.color-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.62;
  will-change: transform;
  animation: orbDrift 13s ease-in-out infinite alternate;
}

.color-orb-1 {
  width: 380px; height: 380px;
  top: -70px; left: -70px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.65), rgba(37, 99, 235, 0.35) 60%, transparent);
}

.color-orb-2 {
  width: 400px; height: 400px;
  top: 22%; right: -110px;
  background: radial-gradient(circle, rgba(242, 92, 42, 0.62), rgba(236, 72, 153, 0.32) 60%, transparent);
  animation-delay: -5s;
}

.color-orb-3 {
  width: 360px; height: 360px;
  bottom: 2%; left: 6%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.48), rgba(6, 182, 212, 0.36) 60%, transparent);
  animation-delay: -9s;
}

@keyframes orbDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(26px, -22px, 0) scale(1.12); }
}

/* ==================== TOP BAR ==================== */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 16px 8px;
  background: rgba(231, 234, 239, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
}

.brand-code {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 6px;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.brand-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--ceramic-pure);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: var(--shadow-key);
}

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.jst-readout {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ==================== MAIN SHELL ==================== */
.app-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2px 14px calc(var(--dock-height) + var(--safe-bottom) + 26px);
}

.view-section { display: none; }
.view-section.is-active { display: block; }

/* ==================== CONTEXT STRIP ==================== */
.context-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.coord-block {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.date-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.coord-mono {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}

.context-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phase-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
}

.chip-btn {
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--ink);
  background: var(--ceramic-pure);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.cast-mode-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: var(--ceramic);
  border: 1px solid var(--line);
}

.mini-seg {
  border: none;
  background: transparent;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-muted);
  cursor: pointer;
}

.mini-seg.is-active {
  background: var(--ink);
  color: #fff;
}

/* ==================== EXACT CARLHAUSER 08/096 CERAMIC CHASSIS ==================== */
.hero-cockpit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dial-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.oblivion-unit {
  position: relative;
  width: min(98vw, 418px);
  aspect-ratio: 540 / 500;
  display: grid;
  place-items: center;
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
}

.chassis-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}

/* Inner Hexagonal Full-Color Portal (Matches Oblivion Hexagon Geometry) */
.hex-lens-portal {
  position: absolute;
  left: 22.8%;
  top: 24.4%;
  width: 51.5%;
  height: 50.8%;
  clip-path: polygon(24% 0%, 76% 0%, 100% 50%, 76% 100%, 24% 100%, 0% 50%);
  -webkit-clip-path: polygon(24% 0%, 76% 0%, 100% 50%, 76% 100%, 24% 100%, 0% 50%);
  background: #0d3b49;
  overflow: hidden;
  z-index: 3;
}

.fluid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Razor-Sharp HTML Slanted Callout Stack (Eliminates SVG Text Blur!) */
.oblivion-callout-html {
  position: absolute;
  right: 0.5%;
  top: 37%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  pointer-events: none;
}

.ob-title-plate {
  background: #ffffff;
  color: #0f1116;
  font-family: var(--font-sans);
  font-size: clamp(12px, 3.3vw, 15px);
  font-weight: 900;
  letter-spacing: 0.03em;
  padding: 5px 14px 5px 12px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 8px 100%);
  box-shadow: 0 10px 24px rgba(15, 17, 22, 0.22);
  white-space: nowrap;
}

.ob-stat-plate {
  background: rgba(255, 255, 255, 0.94);
  color: #1f2430;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2.5px 12px 2.5px 10px;
  margin-left: 8px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 100%, 5px 100%);
  box-shadow: 0 5px 14px rgba(15, 17, 22, 0.14);
  white-space: nowrap;
}

.ob-stat-plate:nth-child(3) { margin-left: 13px; }
.ob-stat-plate:nth-child(4) { margin-left: 18px; }

.tac-key.is-gold {
  background: linear-gradient(145deg, #f5c451 0%, #d97706 100%);
  color: #0f1116;
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.34), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.tac-key.is-gold .key-led {
  background: #0f1116;
}

/* ==================== RESULT FLASH & HEROES WINNING RUN OVERLAY ==================== */
.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background:
    radial-gradient(circle at 20% 15%, rgba(245, 196, 81, 0.34), transparent 50%),
    radial-gradient(circle at 82% 80%, rgba(139, 92, 246, 0.28), transparent 52%),
    linear-gradient(160deg, #c6cdd8 0%, #b5bfce 100%);
  overflow-y: auto;
  padding: max(14px, env(safe-area-inset-top)) 14px calc(28px + var(--safe-bottom));
}

.result-shell {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.result-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.result-live-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: 5px;
  background: #0f1116;
  color: #f5c451;
}

.result-race-label {
  font-size: 13px;
  font-weight: 900;
  color: #0f1116;
}

.winner-hero-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.88), rgba(240, 245, 255, 0.62));
  backdrop-filter: blur(40px) saturate(240%);
  -webkit-backdrop-filter: blur(40px) saturate(240%);
  border: 1.5px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 56px rgba(15, 17, 22, 0.18), inset 0 2px 2px #ffffff;
}

@media (min-width: 680px) {
  .winner-hero-card {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
  }
}

.winner-stage {
  position: relative;
  height: 230px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 45%, #f5c451 0%, #c2410c 52%, #111318 100%);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.45);
}

.winner-halo {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.45);
  animation: slowSpin 16s linear infinite;
}

.winner-cutout-img {
  position: relative;
  z-index: 2;
  width: 96%;
  height: 96%;
  object-fit: contain;
  transform: scale(1.14) translateY(4%);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
}

.winner-bgm-pill {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(15, 17, 22, 0.84);
  color: #f5c451;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.winner-profile-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wp-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wp-first-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f5c451, #d97706);
  color: #0f1116;
}

.wp-time {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 900;
  color: #0f1116;
}

.wp-name {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.wp-jp {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.wp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.wp-cell {
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 17, 22, 0.08);
}

.wp-cell span {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}

.wp-cell strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #0f1116;
  margin-top: 1px;
}

/* Official 1st-5th Finish Order Board */
.finish-board {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fin-row {
  display: grid;
  grid-template-columns: 32px 26px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(15, 17, 22, 0.09);
}

.fin-row.is-first {
  background: #0f1116;
  color: #ffffff;
  border-color: #f5c451;
}

.fin-rank {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.fin-row.is-first .fin-rank { color: #f5c451; }

.waku-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(0, 0, 0, 0.18);
}
.waku-1 { background: #ffffff; color: #111; }
.waku-2 { background: #181a20; color: #fff; }
.waku-3 { background: #dc2626; color: #fff; }
.waku-4 { background: #2563eb; color: #fff; }
.waku-5 { background: #eab308; color: #111; }
.waku-6 { background: #16a34a; color: #fff; }
.waku-7 { background: #ea580c; color: #fff; }
.waku-8 { background: #ec4899; color: #fff; }

.fin-horse { font-size: 14px; font-weight: 900; }
.fin-jockey { font-size: 10px; opacity: 0.72; margin-top: 1px; }
.fin-metrics { text-align: right; font-family: var(--font-mono); }
.fin-time { font-size: 12px; font-weight: 800; }
.fin-margin { font-size: 9px; opacity: 0.7; }

.cast-portal {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 74%, rgba(0, 0, 0, 0.88) 88%, transparent 100%);
  mask-image: radial-gradient(circle at 50% 48%, #000 74%, rgba(0, 0, 0, 0.88) 88%, transparent 100%);
}

.cast-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(var(--sc, 1.15));
  transform-origin: var(--ox, 50%) var(--oy, 50%);
  filter: drop-shadow(0 8px 18px rgba(8, 16, 24, 0.38)) contrast(1.04) saturate(1.08);
  transition: opacity 0.65s var(--ease-out), transform 0.85s var(--ease-out);
  will-change: opacity, transform;
}

.cast-img.is-active {
  opacity: 1;
}

.lens-reticle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ==================== ENHANCED SCULPTED LIQUID GLASS CHRONOGRAPH ==================== */
@keyframes glassSweep {
  0%   { transform: translateX(-120%) skewX(-24deg); }
  55%  { transform: translateX(220%) skewX(-24deg); }
  100% { transform: translateX(220%) skewX(-24deg); }
}

.liquid-glass-bar {
  position: relative;
  width: 100%;
  margin-top: 2px;
  padding: 15px 17px 14px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(130% 100% at 12% -10%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.38) 45%, rgba(224, 236, 255, 0.24) 100%),
    linear-gradient(128deg, rgba(139, 92, 246, 0.16) 0%, rgba(255, 255, 255, 0.28) 46%, rgba(242, 92, 42, 0.16) 76%, rgba(14, 165, 233, 0.22) 100%);
  backdrop-filter: blur(48px) saturate(290%) contrast(1.04);
  -webkit-backdrop-filter: blur(48px) saturate(290%) contrast(1.04);
  border: 1.2px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 54px rgba(15, 23, 42, 0.15),
    0 4px 14px rgba(139, 92, 246, 0.12),
    inset 0 3px 3px rgba(255, 255, 255, 1),
    inset 0 -4px 12px rgba(99, 102, 241, 0.22),
    inset 0 14px 28px rgba(255, 255, 255, 0.48);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.liquid-glass-bar::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  pointer-events: none;
  animation: glassSweep 6.5s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

.glass-prism-rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.8px;
  background: linear-gradient(112deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(56, 189, 248, 0.72) 24%,
    rgba(168, 85, 247, 0.65) 52%,
    rgba(242, 92, 42, 0.6) 76%,
    rgba(255, 255, 255, 0.96) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass-top-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.glass-timer-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.hero-race-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cd-main {
  font-family: var(--font-sans);
  font-size: clamp(32px, 9.2vw, 42px);
  font-weight: 200;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: var(--ink);
}

.cd-cs {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed, #ec4899, #f25c2a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 2px;
}

.glass-seg-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 3px;
  margin-top: 2px;
}

.glass-seg-bar span {
  height: 5px;
  border-radius: 99px;
  background: rgba(15, 17, 22, 0.1);
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.glass-seg-bar span.is-lit {
  background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6, #0ea5e9);
}

.chrono-race-col,
.chrono-clock-col {
  position: relative;
  z-index: 2;
}

.chrono-race-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chrono-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.race-course-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(15, 17, 22, 0.88);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.grade-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--ink);
  color: #ffffff;
}

.grade-badge.grade-g1 { background: linear-gradient(135deg, #f25c2a, #d946ef); color: #ffffff; }
.grade-badge.grade-g2 { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #ffffff; }
.grade-badge.grade-g3 { background: linear-gradient(135deg, #06b6d4, #10b981); color: #ffffff; }

.chrono-sub-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: rgba(15, 17, 22, 0.68);
  white-space: nowrap;
}

.title-mask {
  overflow: hidden;
}

.hero-race-title {
  margin: 0;
  font-size: clamp(16px, 4.4vw, 19px);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.k-char { display: inline-block; }

.chrono-clock-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.countdown-readout {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cd-main {
  font-family: var(--font-mono);
  font-size: clamp(22px, 6.4vw, 29px);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.cd-cs {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #ec4899, #f25c2a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 1px;
}

.wave-canvas {
  width: 112px;
  height: 16px;
  margin-top: 3px;
}

/* SUNO Quick Add Pill in Mini Deck */
.suno-add-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(168, 85, 247, 0.45);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), rgba(236, 72, 153, 0.14));
  color: #6b21a8;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.suno-playlist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--ceramic);
  border: 1px solid var(--line);
}

.track-item.is-playing {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.track-play-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.track-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ceramic Cast Control Dock */
.cast-caption-bar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
  background: var(--ceramic-pure);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-key);
}

.cast-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink);
  min-width: 96px;
  text-align: center;
  padding: 0 4px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--ceramic);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, color 0.15s;
}

.icon-btn svg {
  width: 13px;
  height: 13px;
}

.icon-btn:active { transform: scale(0.92); }
.icon-btn.is-dark { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ==================== MODULAR HARDWARE BUTTON MATRIX ==================== */
.cockpit-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.key-grid { display: grid; gap: 6px; }
.key-grid-4 { grid-template-columns: repeat(4, 1fr); }
.key-grid-5 { grid-template-columns: repeat(5, 1fr); }
.key-grid-6 { grid-template-columns: repeat(6, 1fr); }

.tac-key {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 58px;
  padding: 6px 4px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f7 100%);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-key);
  transition: transform 0.12s, background 0.18s, color 0.18s, border-color 0.18s;
}

.tac-key:active { transform: scale(0.95); }

.tac-key .key-led {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(15, 17, 22, 0.18);
}

.tac-key[aria-pressed="true"],
.tac-key.is-on {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.tac-key[aria-pressed="true"] .key-led,
.tac-key.is-on .key-led {
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

.tac-key.is-dark {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.tac-key.is-dark .key-led {
  background: var(--accent-primary);
}

.key-svg {
  width: 17px;
  height: 17px;
}

.key-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.matrix-card {
  background: var(--ceramic-pure);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 10px;
  box-shadow: var(--shadow-ceramic);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.matrix-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 6px;
}

.row-code {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-align: right;
  padding-right: 2px;
}

.tac-chip {
  height: 31px;
  padding: 0 6px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--ceramic);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s;
}

.tac-chip:active { transform: scale(0.95); }

.tac-chip.is-active,
.tac-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.inline-svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.color-key {
  height: 29px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--ceramic);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.color-key i {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.color-key.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Mini Deck */
.mini-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 16px;
  background: var(--ceramic-pure);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-key);
}

.mini-deck-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.deck-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
}

.deck-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-deck-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ==================== TIMELINE ==================== */
.timeline-section { margin-top: 18px; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.section-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
}

.track-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.track-pills::-webkit-scrollbar { display: none; }

.track-pill {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--ceramic-pure);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}

.track-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.timeline-rail {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2px 2px 8px;
}

.race-card {
  flex: 0 0 156px;
  scroll-snap-align: start;
  text-align: left;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--ceramic-pure);
  box-shadow: var(--shadow-key);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.15s, border-color 0.2s;
}

.race-card.is-target {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.race-card.is-target .rc-course,
.race-card.is-target .rc-meta {
  color: rgba(255, 255, 255, 0.65);
}

.race-card.is-past {
  opacity: 0.4;
  cursor: not-allowed;
}

.rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rc-time {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
}

.rc-course {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
}

.rc-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
}

/* ==================== VIEWS 2 & 3 ==================== */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.view-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.count-tag {
  font-size: 11px;
  color: var(--ink-muted);
  margin-left: 4px;
}

.btn-dark-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.ceramic-card {
  background: var(--ceramic-pure);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-ceramic);
}

.sub-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.custom-select-wrap {
  position: relative;
  display: inline-flex;
  width: 100%;
}

.custom-select-wrap select {
  width: 100%;
  background: var(--ceramic-pure);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  outline: none;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

.toggle-chip {
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ceramic-pure);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
}

.toggle-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #f5c451;
}

.race-list-container {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.list-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--ceramic-pure);
  box-shadow: var(--shadow-key);
  cursor: pointer;
}

.list-row.is-past { opacity: 0.45; cursor: default; }

.list-time {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}

.list-main-title {
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.list-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.list-arrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.segmented-control {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--bg-canvas);
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--ink);
  color: #fff;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--ink);
  cursor: pointer;
}

.setting-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.toggle-row strong {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.toggle-row input[type="checkbox"] {
  width: 42px;
  height: 24px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-canvas-deep);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.18);
  transition: transform 0.2s;
}

.toggle-row input[type="checkbox"]:checked { background: var(--ink); }
.toggle-row input[type="checkbox"]:checked::after { transform: translateX(18px); }

.manual-list { display: flex; flex-direction: column; gap: 8px; }
.manual-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--ceramic);
  border: 1px solid var(--line);
}
.manual-actions { display: flex; gap: 6px; }
.empty-inline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
  padding: 12px 6px;
}

/* ==================== FLOATING CERAMIC DOCK ==================== */
.floating-dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 40;
  width: min(calc(100% - 36px), 340px);
  height: 58px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 17, 22, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 14px 36px rgba(15, 17, 22, 0.16);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  border-radius: 999px;
  color: var(--ink-muted);
  cursor: pointer;
}

.dock-btn.is-active {
  background: var(--ink);
  color: #ffffff;
}

.dock-svg { width: 16px; height: 16px; }

.dock-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* ==================== FOCUS MODE ==================== */
body.is-focused .top-bar,
body.is-focused .context-strip,
body.is-focused .cockpit-panel,
body.is-focused .timeline-section,
body.is-focused .floating-dock { display: none !important; }

body.is-focused .app-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}

body.is-focused .ceramic-chassis {
  width: min(92vw, 440px);
  height: min(92vw, 440px);
}

.focus-exit-btn {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* ==================== 3D CAMERA MULTI-WIDGET GATE RELEASE ==================== */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.22), transparent 48%),
    radial-gradient(circle at 82% 78%, rgba(242, 92, 42, 0.2), transparent 50%),
    radial-gradient(circle at 50% 45%, #edf0f7 0%, #d9dfea 62%, #cbd3e2 100%);
  color: var(--ink);
  perspective: 1200px;
  overflow: hidden;
}

.gate-camera-rig {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.gate-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.gate-timer-array {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
  transform-style: preserve-3d;
}

.ceramic-clone-timer {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  transition: transform 0.38s var(--ease-out);
}

.ceramic-clone-timer svg { width: 100%; height: 100%; overflow: visible; }
.ceramic-clone-timer.is-snap { transform: scale(1.08) translateZ(30px); }

/* WatchOS Complication & Violet Fluid Widgets inside Gate Release */
.watch-widget {
  position: absolute;
  width: 112px;
  height: 112px;
  border-radius: 26px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  font-family: var(--font-mono);
  box-shadow: 0 18px 40px rgba(15, 17, 22, 0.24), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px);
  transition: transform 0.35s var(--ease-out);
}

.watch-widget.w-energy {
  background: radial-gradient(circle at 50% 30%, #065f46, #022c22);
  border: 1px solid rgba(52, 211, 153, 0.45);
}
.watch-widget.w-violet {
  background: radial-gradient(circle at 25% 50%, #a855f7, #1e1b4b 72%);
  border: 1px solid rgba(232, 121, 249, 0.5);
}
.watch-widget.w-amber {
  background: radial-gradient(circle at 50% 60%, #c2410c, #431407);
  border: 1px solid rgba(251, 146, 60, 0.5);
}
.watch-widget.w-ocean {
  background: radial-gradient(circle at 50% 20%, #1d4ed8, #0f172a);
  border: 1px solid rgba(96, 165, 250, 0.45);
}

.watch-widget .w-eyebrow { font-size: 8px; letter-spacing: 0.1em; opacity: 0.72; }
.watch-widget .w-val { font-size: 20px; font-weight: 800; margin: 2px 0; }
.watch-widget .w-sub { font-size: 8px; opacity: 0.75; }
.watch-widget.is-snap { transform: scale(1.1) translateZ(45px); }

/* Center Hero Decorated Horse Medallion */
.gate-center-stage {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.gate-horse-medallion {
  position: relative;
  width: min(68vw, 286px);
  height: min(68vw, 286px);
  display: grid;
  place-items: center;
}

.medallion-ring-svg {
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  pointer-events: none;
  animation: slowSpin 14s linear infinite;
}

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.gate-cutout-ring {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 0%, #e9edf3 100%);
  padding: 10px;
  box-shadow:
    0 26px 64px rgba(15, 17, 22, 0.22),
    0 0 36px rgba(139, 92, 246, 0.22),
    inset 0 2px 3px #ffffff;
  overflow: hidden;
}

.gate-cutout-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(var(--sc, 1.2));
  transition: transform 0.45s var(--ease-out);
}

.medallion-horse-tag {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 17, 22, 0.28);
}

.gate-hud-glass {
  width: min(88vw, 356px);
  padding: 16px 22px;
  border-radius: 26px;
  text-align: center;
  background: linear-gradient(155deg, rgba(255,255,255,0.82), rgba(240,245,255,0.56));
  backdrop-filter: blur(38px) saturate(240%);
  -webkit-backdrop-filter: blur(38px) saturate(240%);
  border: 1.2px solid rgba(255,255,255,0.96);
  box-shadow: 0 22px 52px rgba(15, 17, 22, 0.16), inset 0 2px 2px #ffffff;
}

.gate-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.gate-race-name {
  font-size: clamp(18px, 5.2vw, 24px);
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 6px;
}

.gate-digits {
  font-family: var(--font-mono);
  font-size: clamp(44px, 13vw, 68px);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.gate-meter {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin: 14px 0 10px;
}

.gate-meter span {
  height: 6px;
  border-radius: 99px;
  background: rgba(15, 17, 22, 0.12);
  transition: background 0.18s var(--ease-out);
}

.gate-meter span.is-lit {
  background: var(--ink);
}

.gate-status {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.gate-close-btn {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(15, 17, 22, 0.14);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  box-shadow: var(--shadow-key);
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* ==================== BOTTOM SHEET ==================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 17, 22, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bottom-sheet {
  width: 100%;
  max-width: 500px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--ceramic-pure);
  border-radius: 26px 26px 0 0;
  padding: 12px 18px calc(22px + var(--safe-bottom));
  box-shadow: 0 -16px 40px rgba(15, 17, 22, 0.2);
}

.sheet-handle { width: 38px; height: 4px; border-radius: 99px; background: var(--bg-canvas-deep); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { margin: 0; font-family: var(--font-mono); font-size: 14px; font-weight: 800; letter-spacing: 0.1em; }
.sheet-form { display: flex; flex-direction: column; gap: 11px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-family: var(--font-mono); font-size: 10px; font-weight: 800; color: var(--ink-muted); }
.field input { width: 100%; background: var(--ceramic); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; font-size: 13px; color: var(--ink); outline: none; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 6px; }
.btn-outline { height: 42px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; font-family: var(--font-mono); font-size: 12px; font-weight: 800; cursor: pointer; }
.btn-dark { height: 42px; border-radius: 12px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-family: var(--font-mono); font-size: 12px; font-weight: 800; cursor: pointer; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + var(--safe-bottom));
  transform: translate(-50%, 14px);
  z-index: 120;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==================== DESKTOP COCKPIT (>= 860px) ==================== */
/* Multi-Clock Swarm inside 10s Gate Release Spectacle */
.gate-clock-swarm {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.swarm-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 50%;
  border: 1.2px solid rgba(255, 255, 255, 0.28);
  background: rgba(12, 16, 28, 0.56);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 0 22px rgba(242, 92, 42, 0.28);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s;
}

.swarm-node.is-flash {
  border-color: #f25c2a;
  box-shadow: 0 0 32px rgba(242, 92, 42, 0.85), inset 0 0 14px rgba(56, 189, 248, 0.55);
  transform: scale(1.16);
}

.swarm-node svg {
  width: 78%;
  height: 78%;
  position: absolute;
  inset: 11%;
  opacity: 0.72;
}

.swarm-pill {
  position: absolute;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(15, 19, 32, 0.72);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.swarm-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.swarm-pill.is-flash {
  border-color: #fde047;
  background: rgba(242, 92, 42, 0.82);
  transform: scale(1.12);
}

.swarm-pill.is-flash i {
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
}

/* Past Winners & Record Slanted Plates (Oblivion / Karooc Callout Style) */
.gate-history-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 7;
}

.hist-plate {
  padding: 5px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  box-shadow: 0 8px 22px rgba(15, 17, 22, 0.18);
  white-space: nowrap;
  transition: transform 0.28s var(--ease-out);
}

.hist-plate.is-record {
  background: var(--ink);
  color: #ffffff;
}

.hist-plate.is-winner {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.karooc-unit {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.42s var(--ease-out);
}

.karooc-unit.is-snap {
  transform: scale(1.08) translateZ(40px);
}

body.is-focused .oblivion-unit {
  width: min(98vw, 480px);
}

@media (min-width: 860px) {
  .top-bar { padding: 14px 28px; }
  .app-shell { padding: 8px 28px 136px; }
  .hero-cockpit {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 32px;
    padding: 4px 0 6px;
  }
  .oblivion-unit { width: 472px; }
  .cd-main { font-size: 40px; }
  .cd-cs { font-size: 17px; }
  .section-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .bottom-sheet { border-radius: 26px; margin-bottom: 24px; }
  .sheet-backdrop { align-items: center; }
}

body.is-reduced-motion *,
body.is-reduced-motion *::before,
body.is-reduced-motion *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}

/* =====================================================================
   V10: CALIBRE 096 CIRCULAR HOROLOGY + CINEMA GATE + 5-YEAR ARCHIVE
   ===================================================================== */

/* Crown Editorial Telemetry Strip (Zero Overlap Above Bezel) */
.crown-telemetry-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.crown-pill {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.crown-pill.is-accent {
  background: rgba(15, 17, 22, 0.88);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Circular Calibre 096 Chronograph Case */
.calibre-watch {
  position: relative;
  width: min(86vw, 356px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s var(--ease-out);
  will-change: transform;
}

.calibre-svg {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  overflow: visible;
}

/* Circular Recessed Sapphire Portal (Matches r=168 / 500 = 67.2% diameter) */
.sapphire-portal {
  position: absolute;
  inset: 16.4%;
  z-index: 2;
  border-radius: 50%;
  overflow: hidden;
  background: #10131a;
  box-shadow:
    inset 0 12px 26px rgba(0, 0, 0, 0.42),
    inset 0 -8px 18px rgba(255, 255, 255, 0.18),
    0 0 0 1.5px rgba(255, 255, 255, 0.72);
}

.sapphire-portal .fluid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.sapphire-portal .cast-portal {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
}

.sapphire-dome-glint {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(88% 54% at 34% 12%, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.08) 42%, transparent 66%),
    radial-gradient(100% 100% at 50% 50%, transparent 74%, rgba(9, 11, 18, 0.28) 100%);
}

/* Crisp Editorial Liquid Glass Countdown Numerals */
.liquid-glass-bar .cd-main {
  font-family: var(--font-sans);
  font-size: clamp(32px, 9.2vw, 42px);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 0.96;
  color: var(--ink);
}

.liquid-glass-bar .cd-cs {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
}

/* Fanfare Select & Audition Grid in SYSTEM */
.fanfare-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ff-chip {
  padding: 9px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ceramic-pure);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.16s var(--ease-out), background 0.16s, color 0.16s, border-color 0.16s;
}

.ff-chip:active { transform: scale(0.96); }

.ff-chip.is-active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
  box-shadow: 0 6px 16px rgba(15, 17, 22, 0.18);
}

/* ==================== ANAMORPHIC CINEMA BROADCAST GATE RELEASE ==================== */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(90% 60% at 50% 38%, rgba(var(--accent-rgb, 242, 92, 42), 0.24) 0%, rgba(11, 14, 22, 0.96) 62%, #06080d 100%);
  color: #ffffff;
  overflow: hidden;
}

.gate-shutter {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: #06080d;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.72s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}

.gate-shutter-top { top: 0; transform: translateY(-100%); border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
.gate-shutter-bottom { bottom: 0; transform: translateY(100%); border-top: 1px solid rgba(255, 255, 255, 0.35); }

.gate-overlay.is-locking .gate-shutter-top { opacity: 1; transform: translateY(-84%); }
.gate-overlay.is-locking .gate-shutter-bottom { opacity: 1; transform: translateY(84%); }

.gate-flash-veil {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95), rgba(253, 224, 71, 0.55) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.55s ease-out;
}

.gate-flash-veil.is-flash { opacity: 1; transition: opacity 0.08s ease-in; }

.gate-cine-top {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) 16px 12px;
  background: linear-gradient(180deg, rgba(6, 8, 13, 0.88) 0%, rgba(6, 8, 13, 0) 100%);
}

.cine-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.cine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 10px #f43f5e;
}

.cine-progress-rail {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.cine-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #38bdf8, #a855f7, #f59e0b);
  transition: width 0.08s linear;
}

.gate-cine-top .gate-close-btn {
  position: static;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.gate-camera-rig {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.gate-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gate-center-stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  text-align: center;
}

.gate-editorial-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.65);
}

.gate-center-stage .gate-race-name {
  font-size: clamp(22px, 6.2vw, 32px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.gate-aperture-wrap {
  position: relative;
  width: min(68vw, 264px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.aperture-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gate-aperture-wrap .gate-cutout-ring {
  position: relative;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.58), inset 0 0 24px rgba(255, 255, 255, 0.14);
}

.gate-aperture-wrap .gate-cutout-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(var(--sc, 1.15));
  transition: opacity 0.28s ease;
}

.gate-aperture-wrap .medallion-horse-tag {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(9, 11, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffffff;
  white-space: nowrap;
}

.gate-center-stage .gate-digits {
  font-family: var(--font-sans);
  font-size: clamp(46px, 13.5vw, 68px);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 36px rgba(255, 255, 255, 0.28);
  margin-top: 6px;
}

.gate-center-stage .gate-status {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: #fbbf24;
}

.gate-cine-bottom {
  position: relative;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px calc(18px + var(--safe-bottom));
  background: linear-gradient(0deg, rgba(6, 8, 13, 0.92) 0%, rgba(6, 8, 13, 0) 100%);
}

.cine-meta-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cine-meta-pill.is-record {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fde68a;
}

.cine-meta-pill.is-winner {
  background: rgba(255, 255, 255, 0.92);
  color: #0f1116;
}

/* ==================== 5-YEAR OFFICIAL RESULT ARCHIVE ==================== */
.result-year-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.res-year-btn {
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.15s;
}

.res-year-btn:active { transform: scale(0.96); }

.res-year-btn.is-active {
  background: #ffffff;
  color: #0f1116;
  border-color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* Support Full-Bleed Real Photography & Cutout Modes Cleanly in Winner Stage */
.winner-stage.is-photo {
  padding: 0;
  background: #0d111a;
}

.winner-stage.is-photo .winner-cutout-img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center 32%;
  filter: none;
}

.winner-stage.is-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(9, 11, 18, 0.72) 100%);
  pointer-events: none;
}

@media (min-width: 860px) {
  .calibre-watch { width: 416px; }
}

/* =====================================================================
   V12: BOLD CLOSE-UP 3D HOROLOGY STAGE + KINETIC GATE + GⅠ SHOWCASE
   ===================================================================== */

/* Enlarged Watch Case + Wide 75.2% Sapphire Portal + Luminous Silk Halo */
.calibre-watch {
  width: min(92vw, 392px);
  margin: 4px auto 12px;
}

.sapphire-portal {
  inset: 12.4%;
}

.watch-silk-halo {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  background:
    conic-gradient(from 0deg,
      rgba(var(--accent-rgb, 242, 92, 42), 0.34),
      rgba(139, 92, 246, 0.28),
      rgba(var(--accent2-rgb, 14, 165, 233), 0.34),
      rgba(245, 158, 11, 0.28),
      rgba(var(--accent-rgb, 242, 92, 42), 0.34));
  filter: blur(28px);
  opacity: 0.78;
  animation: haloSpin 18s linear infinite;
}

@keyframes haloSpin {
  to { transform: rotate(360deg); }
}

/* 4 Floating Liquid-Glass Horology Satellites Around Bezel Corners */
.watch-sat {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(210%);
  -webkit-backdrop-filter: blur(18px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12), inset 0 1px 1px #ffffff;
  pointer-events: none;
}

.sat-kicker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(15, 17, 22, 0.54);
}

.sat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
}

.sat-val {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}

.sat-tl { top: 2%; left: -2%; }
.sat-tr { top: 2%; right: -2%; text-align: right; }
.sat-bl { bottom: 2%; left: -2%; }
.sat-br { bottom: 2%; right: -2%; text-align: right; }

/* ==================== KINETIC BROADCAST GATE RELEASE ==================== */
.gate-kinetic-bg {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.12;
}

.kinetic-line {
  font-family: var(--font-sans);
  font-size: clamp(56px, 16vw, 148px);
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85);
}

.kinetic-line-1 { animation: kineticSlideL 18s linear infinite; }
.kinetic-line-2 { animation: kineticSlideR 22s linear infinite; }

@keyframes kineticSlideL {
  0% { transform: translateX(6%); }
  100% { transform: translateX(-32%); }
}

@keyframes kineticSlideR {
  0% { transform: translateX(-28%); }
  100% { transform: translateX(8%); }
}

.gate-aperture-wrap {
  width: min(76vw, 316px);
}

.gate-aperture-wrap .gate-cutout-ring {
  width: 78%;
  height: 78%;
}

.gate-pod {
  position: absolute;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(9, 12, 20, 0.72);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  text-align: left;
  pointer-events: none;
}

.gate-pod span {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.56);
}

.gate-pod strong {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

.gpod-tl { top: -6%; left: -12%; }
.gpod-tr { top: -6%; right: -12%; text-align: right; }
.gpod-bl { bottom: 6%; left: -14%; }
.gpod-br { bottom: 6%; right: -14%; text-align: right; }

@media (max-width: 480px) {
  .gpod-tl { left: -4%; }
  .gpod-tr { right: -4%; }
  .gpod-bl { left: -4%; }
  .gpod-br { right: -4%; }
}

/* ==================== LUXURY GⅠ CHAMPIONSHIP WINNER SHOWCASE ==================== */
.winner-hero-card {
  border: 1px solid rgba(251, 191, 36, 0.34);
  background:
    linear-gradient(155deg, rgba(24, 28, 42, 0.96) 0%, rgba(11, 14, 22, 0.98) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(253, 224, 71, 0.35);
}

.winner-stage.is-photo {
  min-height: 248px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.winner-photo-head {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.winner-edition-ribbon {
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #0f1116;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

.winner-time-glass {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(9, 11, 18, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.wp-country-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
}

.winner-profile-panel .wp-name {
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 52%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(24px, 6.8vw, 32px);
  letter-spacing: 0.05em;
}

.wp-trophy-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 12px;
}

.wp-trophy-chip {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.38);
  color: #fde68a;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* High-Contrast Typography inside Dark Obsidian-Gold Winner Card & Light Year Strip */
.winner-profile-panel .wp-time {
  color: #fde68a;
  font-weight: 900;
}

.winner-profile-panel .wp-jp {
  color: rgba(255, 255, 255, 0.9);
}

.winner-profile-panel .wp-cell {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.winner-profile-panel .wp-cell span {
  color: rgba(255, 255, 255, 0.56);
}

.winner-profile-panel .wp-cell strong {
  color: #ffffff;
}

.res-year-btn {
  background: rgba(15, 17, 22, 0.08);
  color: #0f1116;
  border-color: rgba(15, 17, 22, 0.14);
}

.res-year-btn.is-active {
  background: #0f1116;
  color: #ffffff;
  border-color: #0f1116;
}

@media (min-width: 860px) {
  .calibre-watch { width: 392px; margin: 0 auto 8px; }
  .sat-tl { top: 4%; left: -12%; }
  .sat-tr { top: 4%; right: -12%; }
  .sat-bl { bottom: 4%; left: -12%; }
  .sat-br { bottom: 4%; right: -12%; }
  .winner-stage.is-photo { min-height: 310px; }
}

/* =====================================================================
   V14: PANORAMIC SAPPHIRE MONOLITH + WIDESCREEN CHAMPION MONTAGE GATE
   ===================================================================== */

/* Architectural Chamfered Ceramic-Titanium Monolith (Breaks Free of Circle!) */
.monolith-chassis {
  position: relative;
  width: 100%;
  margin: 0 auto 10px;
  padding: 10px;
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(235, 240, 248, 0.92) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    0 24px 56px rgba(13, 17, 26, 0.16),
    0 4px 14px rgba(13, 17, 26, 0.08),
    inset 0 2px 2px #ffffff;
  transition: transform 0.35s var(--ease-out);
  will-change: transform;
}

.monolith-silk-halo {
  position: absolute;
  inset: -4%;
  border-radius: 38px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(125deg,
    rgba(var(--accent-rgb, 242, 92, 42), 0.36) 0%,
    rgba(139, 92, 246, 0.28) 50%,
    rgba(var(--accent2-rgb, 14, 165, 233), 0.36) 100%);
  filter: blur(26px);
  opacity: 0.78;
}

.monolith-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.15;
  border-radius: 22px;
  overflow: hidden;
  background: #0d111a;
  box-shadow:
    inset 0 10px 26px rgba(0, 0, 0, 0.42),
    inset 0 -6px 18px rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(15, 17, 22, 0.18);
}

.monolith-viewport .fluid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.monolith-viewport .cast-portal {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 0;
}

.monolith-glass-sheen {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.04) 28%, transparent 52%),
    linear-gradient(180deg, rgba(8, 10, 18, 0.24) 0%, transparent 26%, transparent 66%, rgba(8, 10, 18, 0.52) 100%);
}

/* Precision Optical Corner Reticle Brackets */
.monolith-corners {
  position: absolute;
  inset: 10px;
  z-index: 5;
  pointer-events: none;
}

.monolith-corners span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255, 255, 255, 0.55);
  border-style: solid;
}

.monolith-corners span:nth-child(1) { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; border-radius: 4px 0 0 0; }
.monolith-corners span:nth-child(2) { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; border-radius: 0 4px 0 0; }
.monolith-corners span:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; border-radius: 0 0 0 4px; }
.monolith-corners span:nth-child(4) { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; border-radius: 0 0 4px 0; }

/* Top-Left Architectural Telemetry Stack */
.mono-hud-tl {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.mono-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  white-space: nowrap;
}

.mono-pill.is-obsidian {
  background: rgba(9, 12, 20, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fde68a;
}

.mono-pill.is-glass {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

/* Top-Right Asymmetric Precision Analog Chronograph Sub-Dial */
.analog-subdial {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

.subdial-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Bottom-Left & Bottom-Right Monolith HUD */
.mono-hud-bl {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

.mono-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(9, 12, 20, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mono-stat span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.62);
}

.mono-stat strong {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
}

.mono-hud-br {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  text-align: right;
}

.mono-hud-br span {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.68);
}

.mono-hud-br strong {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
}

/* ==================== FULL-BLEED WIDESCREEN CHAMPION MONTAGE GATE ==================== */
.gate-cinema-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #06080d;
}

.gate-hero-photo {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: center 34%;
  opacity: 0;
  transform: scale(1.04) translate3d(0, 0, 0);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 2.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.gate-hero-photo.is-active {
  opacity: 1;
  transform: scale(1.13) translate3d(-1.5%, -1%, 0);
}

.gate-hero-photo.is-active.is-pan-alt {
  transform: scale(1.13) translate3d(1.5%, -1%, 0);
}

.gate-cinema-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(6, 8, 13, 0.78) 0%, rgba(6, 8, 13, 0.18) 32%, rgba(6, 8, 13, 0.25) 56%, rgba(6, 8, 13, 0.92) 100%),
    radial-gradient(circle at 50% 42%, transparent 45%, rgba(6, 8, 13, 0.56) 100%);
  pointer-events: none;
}

.gate-cinema-backdrop .gate-canvas {
  z-index: 3;
}

.gate-broadcast-header {
  position: relative;
  z-index: 20;
  padding: 6px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.gate-broadcast-header .gate-race-name {
  font-size: clamp(24px, 6.5vw, 38px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.55);
}

.gate-cam-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fde68a;
}

.gate-widescreen-hud {
  position: relative;
  z-index: 20;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px calc(22px + var(--safe-bottom));
}

.gate-champion-plate {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gcp-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.gcp-year {
  font-family: var(--font-mono);
  font-size: clamp(28px, 7.5vw, 42px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 55%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gcp-edition {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.72);
}

.gcp-name {
  font-size: clamp(26px, 8vw, 48px);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.02;
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.gcp-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.gcp-dot { color: #fbbf24; }

.gate-countdown-deck {
  align-self: flex-start;
  padding: 12px 18px;
  border-radius: 20px;
  background: rgba(9, 12, 20, 0.62);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
}

.gate-countdown-deck .gate-digits {
  font-family: var(--font-sans);
  font-size: clamp(38px, 11vw, 58px);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #ffffff;
}

.gate-countdown-deck .gate-status {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #fbbf24;
}

@media (min-width: 860px) {
  .monolith-viewport { aspect-ratio: 16 / 10.6; }
  .analog-subdial { width: 96px; height: 96px; top: 14px; right: 14px; }
  .gate-widescreen-hud {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 24px 38px 34px;
  }
  .gate-countdown-deck { align-self: flex-end; text-align: right; }
}

/* =====================================================================
   V15: AVANT-GARDE FINE-LINE GEOMETRIC CHRONOGRAPH + PORTRAIT GATE FIX
   ===================================================================== */

.geo-chronograph {
  position: relative;
  width: min(90vw, 400px);
  aspect-ratio: 1 / 1;
  margin: 6px auto 12px;
}

@media (min-width: 860px) {
  .geo-chronograph {
    width: 420px;
  }
}

.geo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.geo-silk-aura {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  z-index: 0;
  background: radial-gradient(
    circle,
    rgba(var(--accent-rgb, 242, 92, 42), 0.32),
    rgba(139, 92, 246, 0.18) 55%,
    transparent 72%
  );
  filter: blur(30px);
  pointer-events: none;
}

.geo-lens-portal {
  position: absolute;
  inset: 16.4%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  background: #0d111a;
  box-shadow:
    0 0 0 1px rgba(15, 17, 22, 0.25),
    0 18px 40px rgba(13, 17, 26, 0.22),
    inset 0 8px 22px rgba(0, 0, 0, 0.4);
}

.geo-lens-portal .fluid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.geo-lens-portal .cast-portal {
  position: absolute;
  inset: 0;
  z-index: 2;
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 58%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 46%, #000 58%, transparent 74%);
}

.geo-lens-glint {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(84% 52% at 28% 14%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.06) 44%, transparent 68%),
    radial-gradient(100% 100% at 50% 50%, transparent 70%, rgba(8, 10, 18, 0.36) 100%);
}

.geo-node {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 34%;
  pointer-events: none;
}

.geo-node span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  white-space: nowrap;
}

.geo-node strong {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.gn-tl { top: 0; left: 0; }
.gn-tr { top: 0; right: 0; text-align: right; align-items: flex-end; }
.gn-bl { bottom: 0; left: 0; }
.gn-br { bottom: 0; right: 0; text-align: right; align-items: flex-end; }

/* Portrait Gate Release Photo Fit + Blurred Backdrop Fill */
.gate-photo-fill {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: blur(26px) brightness(0.5) saturate(1.3);
  z-index: 0;
}

.gate-hero-photo {
  z-index: 1;
}

@media (max-aspect-ratio: 1 / 1) {
  .gate-hero-photo {
    inset: auto;
    top: 17%;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    z-index: 1;
  }

  .gate-hero-photo.is-active,
  .gate-hero-photo.is-active.is-pan-alt {
    transform: scale(1.02);
  }
}

/* =====================================================================
   V16: RACING SILKS (勝負服) DYNAMIC BACKDROP + GEOMETRIC ANALOG GATE
   ===================================================================== */

:root {
  --silk-1-rgb: 28, 178, 210;
  --silk-2-rgb: 218, 38, 56;
}

/* Top Page Ground Driven by Active Horse/Amaneki Racing Silks */
.tech-backdrop {
  background:
    radial-gradient(rgba(15, 17, 22, 0.075) 1px, transparent 1px),
    linear-gradient(142deg,
      rgba(var(--silk-1-rgb), 0.24) 0%,
      rgba(232, 236, 244, 0.92) 44%,
      rgba(var(--silk-2-rgb), 0.22) 100%),
    #cdd4e0;
  background-size: 24px 24px, 100% 100%, 100% 100%;
  transition: background 0.8s ease;
}

.color-orb-1 {
  background: radial-gradient(circle, rgba(var(--silk-1-rgb), 0.62), rgba(var(--silk-1-rgb), 0.22) 60%, transparent);
}

.color-orb-2 {
  background: radial-gradient(circle, rgba(var(--silk-2-rgb), 0.56), rgba(var(--silk-1-rgb), 0.2) 60%, transparent);
}

.color-orb-3 {
  background: radial-gradient(circle, rgba(var(--silk-1-rgb), 0.44), rgba(var(--silk-2-rgb), 0.26) 60%, transparent);
}

/* Authentic Architectural JRA Racing Silks (勝負服) Pattern Layer */
.silk-pattern-layer {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

body[data-silk-pattern="dots"] .silk-pattern-layer {
  background:
    radial-gradient(circle, rgba(var(--silk-2-rgb), 0.52) 6px, transparent 6.6px),
    linear-gradient(135deg, rgba(var(--silk-1-rgb), 0.24), transparent 65%);
  background-size: 46px 46px, 100% 100%;
}

body[data-silk-pattern="sash"] .silk-pattern-layer {
  background: linear-gradient(
    -30deg,
    transparent 34%,
    rgba(var(--silk-2-rgb), 0.42) 34.2%,
    rgba(var(--silk-2-rgb), 0.42) 44%,
    rgba(var(--silk-1-rgb), 0.34) 44.2%,
    rgba(var(--silk-1-rgb), 0.34) 48%,
    transparent 48.2%
  );
}

body[data-silk-pattern="stripe"] .silk-pattern-layer {
  background: repeating-linear-gradient(
    90deg,
    rgba(var(--silk-1-rgb), 0.28) 0 28px,
    transparent 28px 56px,
    rgba(var(--silk-2-rgb), 0.22) 56px 70px,
    transparent 70px 112px
  );
}

body[data-silk-pattern="band"] .silk-pattern-layer {
  background: linear-gradient(
    180deg,
    transparent 24%,
    rgba(var(--silk-1-rgb), 0.32) 24.2%,
    rgba(var(--silk-1-rgb), 0.32) 36%,
    rgba(var(--silk-2-rgb), 0.38) 36.2%,
    rgba(var(--silk-2-rgb), 0.38) 40.5%,
    transparent 40.7%
  );
}

body[data-silk-pattern="check"] .silk-pattern-layer {
  background:
    repeating-linear-gradient(45deg, rgba(var(--silk-1-rgb), 0.22) 0 26px, transparent 26px 52px),
    repeating-linear-gradient(-45deg, rgba(var(--silk-2-rgb), 0.24) 0 26px, transparent 26px 52px);
}

body[data-silk-pattern="chevron"] .silk-pattern-layer {
  background:
    linear-gradient(135deg, rgba(var(--silk-1-rgb), 0.32) 22%, transparent 22.3%),
    linear-gradient(225deg, rgba(var(--silk-2-rgb), 0.32) 22%, transparent 22.3%);
  background-size: 140px 140px;
}

body[data-silk-pattern="aura"] .silk-pattern-layer {
  opacity: 0.3;
  background:
    radial-gradient(85% 60% at 18% 22%, rgba(var(--silk-1-rgb), 0.42), transparent 62%),
    radial-gradient(80% 60% at 84% 76%, rgba(var(--silk-2-rgb), 0.36), transparent 62%);
}

/* ==================== FULL-BLEED CLOSE-UP GATE + GEOMETRIC ANALOG CLOCK ==================== */
.gate-hero-photo {
  object-position: var(--focal, 50% 28%);
}

@media (max-aspect-ratio: 1 / 1) {
  .gate-hero-photo {
    inset: -3%;
    top: -3%;
    left: -3%;
    width: 106%;
    height: 106%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: var(--focal, 50% 28%);
    z-index: 1;
  }
}

.gate-geo-stage {
  position: relative;
  z-index: 15;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 4px 16px;
}

.gate-geo-svg {
  width: min(74vw, 326px);
  aspect-ratio: 1 / 1;
  overflow: visible;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.48));
}

.gate-countdown-deck {
  padding: 12px 20px;
  border-radius: 22px;
  border-top: 1px solid rgba(253, 224, 71, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.gate-big-digits {
  font-family: var(--font-sans);
  font-size: clamp(58px, 16.5vw, 108px);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  line-height: 0.94;
  color: #ffffff;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.65);
}

.gate-big-digits .gate-tenths {
  font-family: var(--font-mono);
  font-size: 0.48em;
  font-weight: 800;
  color: #fde047;
  margin-left: 2px;
}

@media (min-width: 860px) {
  .gate-geo-svg {
    width: 348px;
  }
}

/* =====================================================================
   V17: OUTER GEOMETRIC MOTION + INNER LENS SILKS + STRONGER LIQUID GLASS
        + DIGITAL METER FONT + RACE-SWITCH FX + SILKS CHAMPION UI + GATE
   ===================================================================== */

:root {
  --font-meter: 'Orbitron', 'Chakra Petch', 'SF Pro Display', ui-monospace, monospace;
}

/* 1. Pure Architectural Geometric Outer Backdrop (Silks moved INSIDE circular lens) */
.tech-backdrop {
  background:
    radial-gradient(rgba(15, 17, 22, 0.065) 1px, transparent 1px),
    linear-gradient(150deg, #e7ebf2 0%, #d8dee9 52%, #cfd6e3 100%);
  background-size: 24px 24px, 100% 100%;
  transition: background 0.6s ease;
}

.bg-geo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
}

.color-orb {
  z-index: 0;
  opacity: 0.34;
}

.color-orb-1 {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.36), rgba(99, 102, 241, 0.12) 60%, transparent);
}

.color-orb-2 {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), rgba(56, 189, 248, 0.1) 60%, transparent);
}

.color-orb-3 {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.24), rgba(56, 189, 248, 0.1) 60%, transparent);
}

/* 2. Racing Silks (勝負服) Pattern INSIDE the Central Circular Lens */
.geo-lens-portal {
  background: radial-gradient(
    circle at 32% 28%,
    rgba(var(--silk-1-rgb), 0.28) 0%,
    rgba(244, 247, 252, 0.88) 54%,
    rgba(var(--silk-2-rgb), 0.24) 100%
  );
  transition: background 0.65s ease;
}

.lens-silk-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  opacity: 0.56;
  pointer-events: none;
  transition: opacity 0.45s ease, background 0.5s ease;
}

body[data-silk-pattern="dots"] .lens-silk-pattern {
  background:
    radial-gradient(circle, rgba(var(--silk-2-rgb), 0.68) 6.5px, transparent 7.2px),
    linear-gradient(140deg, rgba(var(--silk-1-rgb), 0.42), rgba(var(--silk-1-rgb), 0.12) 70%);
  background-size: 36px 36px, 100% 100%;
}

body[data-silk-pattern="sash"] .lens-silk-pattern {
  background: linear-gradient(
    -34deg,
    rgba(var(--silk-1-rgb), 0.24) 0%,
    rgba(var(--silk-1-rgb), 0.24) 34%,
    rgba(var(--silk-2-rgb), 0.72) 34.4%,
    rgba(var(--silk-2-rgb), 0.72) 48%,
    rgba(255, 255, 255, 0.6) 48.4%,
    rgba(255, 255, 255, 0.6) 53%,
    rgba(var(--silk-1-rgb), 0.36) 53.4%,
    rgba(var(--silk-1-rgb), 0.22) 100%
  );
}

body[data-silk-pattern="stripe"] .lens-silk-pattern {
  background: repeating-linear-gradient(
    90deg,
    rgba(var(--silk-1-rgb), 0.46) 0 18px,
    rgba(255, 255, 255, 0.25) 18px 34px,
    rgba(var(--silk-2-rgb), 0.42) 34px 46px,
    transparent 46px 64px
  );
}

body[data-silk-pattern="band"] .lens-silk-pattern {
  background: linear-gradient(
    180deg,
    rgba(var(--silk-1-rgb), 0.22) 0%,
    rgba(var(--silk-1-rgb), 0.22) 30%,
    rgba(var(--silk-1-rgb), 0.62) 30.5%,
    rgba(var(--silk-1-rgb), 0.62) 48%,
    rgba(var(--silk-2-rgb), 0.72) 48.5%,
    rgba(var(--silk-2-rgb), 0.72) 56%,
    rgba(var(--silk-1-rgb), 0.18) 56.5%,
    transparent 100%
  );
}

body[data-silk-pattern="check"] .lens-silk-pattern {
  background:
    repeating-linear-gradient(45deg, rgba(var(--silk-1-rgb), 0.42) 0 18px, transparent 18px 36px),
    repeating-linear-gradient(-45deg, rgba(var(--silk-2-rgb), 0.44) 0 18px, transparent 18px 36px);
}

body[data-silk-pattern="chevron"] .lens-silk-pattern {
  background:
    linear-gradient(135deg, rgba(var(--silk-1-rgb), 0.56) 24%, transparent 24.4%),
    linear-gradient(225deg, rgba(var(--silk-2-rgb), 0.56) 24%, transparent 24.4%);
  background-size: 76px 76px;
}

body[data-silk-pattern="aura"] .lens-silk-pattern {
  opacity: 0.62;
  background:
    radial-gradient(75% 65% at 22% 24%, rgba(var(--silk-1-rgb), 0.58), transparent 64%),
    radial-gradient(75% 65% at 80% 78%, rgba(var(--silk-2-rgb), 0.52), transparent 64%);
}

/* 3. Stronger Liquid Glass + Bold Digital-Meter Numerals + Race-Switch Scanline FX */
.liquid-glass-bar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(244, 248, 255, 0.44) 48%,
    rgba(255, 255, 255, 0.62) 100%
  );
  backdrop-filter: blur(58px) saturate(320%) contrast(1.06);
  -webkit-backdrop-filter: blur(58px) saturate(320%) contrast(1.06);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 22px 48px rgba(15, 17, 22, 0.14),
    0 2px 10px rgba(15, 17, 22, 0.06),
    inset 0 2px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1.5px 0 rgba(15, 17, 22, 0.08),
    inset 0 0 28px rgba(255, 255, 255, 0.45);
}

.liquid-glass-bar .cd-main {
  font-family: var(--font-meter);
  font-weight: 700;
  font-size: clamp(25px, 7.2vw, 37px);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.liquid-glass-bar .cd-cs {
  font-family: var(--font-meter);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.race-switch-wipe {
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    105deg,
    transparent 12%,
    rgba(56, 189, 248, 0.16) 36%,
    rgba(255, 255, 255, 0.92) 50%,
    rgba(139, 92, 246, 0.22) 62%,
    transparent 86%
  );
  transform: translateX(-125%);
}

.race-switch-wipe.is-wiping {
  animation: raceSwitchSweep 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes raceSwitchSweep {
  0% {
    opacity: 0;
    transform: translateX(-125%);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(135%);
  }
}

/* Strengthen Liquid Glass on Top Bar & Matrix Card */
.top-bar,
.matrix-card,
.mini-deck,
.cast-caption-bar {
  backdrop-filter: blur(36px) saturate(240%);
  -webkit-backdrop-filter: blur(36px) saturate(240%);
  box-shadow:
    0 12px 32px rgba(15, 17, 22, 0.09),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.92);
}

/* 4. Per-Champion Racing Silks (勝負服) Result UI + Strict Mobile 390px Zero-Overflow */
.result-shell {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.result-topbar {
  gap: 8px;
}

.result-head-left {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-live-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.result-race-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-year-strip {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.result-year-strip::-webkit-scrollbar {
  display: none;
}

.winner-hero-card {
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(var(--champ-c1, 16, 68, 178), 0.42);
  box-shadow:
    0 22px 48px rgba(15, 17, 22, 0.14),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.9);
}

.winner-silk-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.26;
  transition: background 0.5s ease;
}

.winner-hero-card[data-champ-pattern="sash"] .winner-silk-bg {
  background: linear-gradient(
    -28deg,
    rgba(var(--champ-c1, 16, 68, 178), 0.22) 0%,
    rgba(var(--champ-c1, 16, 68, 178), 0.22) 38%,
    rgba(var(--champ-c2, 248, 250, 252), 0.85) 38.4%,
    rgba(var(--champ-c2, 248, 250, 252), 0.85) 49%,
    rgba(var(--champ-c1, 16, 68, 178), 0.42) 49.4%,
    transparent 76%
  );
}

.winner-hero-card[data-champ-pattern="band"] .winner-silk-bg {
  background: linear-gradient(
    180deg,
    rgba(var(--champ-c1, 16, 134, 82), 0.28) 0%,
    rgba(var(--champ-c1, 16, 134, 82), 0.28) 46%,
    rgba(var(--champ-c2, 214, 40, 48), 0.62) 46.4%,
    rgba(var(--champ-c2, 214, 40, 48), 0.62) 56%,
    rgba(var(--champ-c1, 16, 134, 82), 0.24) 56.4%,
    transparent 100%
  );
}

.winner-hero-card[data-champ-pattern="check"] .winner-silk-bg {
  background:
    repeating-linear-gradient(45deg, rgba(var(--champ-c1, 198, 152, 42), 0.34) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(-45deg, rgba(var(--champ-c2, 28, 34, 48), 0.28) 0 22px, transparent 22px 44px);
}

.winner-hero-card[data-champ-pattern="dots"] .winner-silk-bg {
  background:
    radial-gradient(circle, rgba(var(--champ-c2, 218, 38, 56), 0.62) 5.5px, transparent 6px),
    linear-gradient(140deg, rgba(var(--champ-c1, 28, 178, 210), 0.38), transparent 72%);
  background-size: 32px 32px, 100% 100%;
}

.winner-hero-card[data-champ-pattern="stripe"] .winner-silk-bg {
  background: repeating-linear-gradient(
    90deg,
    rgba(var(--champ-c1, 24, 136, 68), 0.38) 0 20px,
    rgba(255, 255, 255, 0.32) 20px 36px,
    rgba(var(--champ-c2, 218, 42, 54), 0.34) 36px 48px,
    transparent 48px 68px
  );
}

.winner-stage,
.winner-profile-panel {
  position: relative;
  z-index: 2;
}

.winner-stage.is-photo .winner-cutout-img {
  transform: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.wp-silk-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(var(--champ-c1, 16, 68, 178), 0.52);
  backdrop-filter: blur(14px);
  max-width: 100%;
}

.wp-silk-swatch {
  width: 22px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: linear-gradient(
    115deg,
    rgb(var(--champ-c1, 16, 68, 178)) 0%,
    rgb(var(--champ-c1, 16, 68, 178)) 52%,
    rgb(var(--champ-c2, 248, 250, 252)) 52.5%,
    rgb(var(--champ-c2, 248, 250, 252)) 100%
  );
}

.wp-silk-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wp-rank-row {
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.wp-country-tag {
  flex-basis: 100%;
  font-size: 11px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.82);
}

.wp-name {
  font-size: clamp(22px, 6.4vw, 34px);
  line-height: 1.08;
  word-break: break-word;
}

.wp-trophy-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.wp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.winner-profile-panel .wp-cell {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(12, 16, 26, 0.56);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(var(--champ-c1, 16, 68, 178), 0.36);
}

.winner-profile-panel .wp-cell span {
  color: rgba(255, 255, 255, 0.64);
}

.winner-profile-panel .wp-cell strong {
  display: block;
  color: #ffffff;
  font-size: 11.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fin-row {
  display: grid;
  grid-template-columns: 26px 24px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 11px;
  align-items: center;
}

.fin-main {
  min-width: 0;
}

.fin-horse,
.fin-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fin-time-wrap {
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 5. Upgraded GATE Geometric Analog Watch + Bold Digital Meter Countdown + 16-Seg Bar */
.gate-geo-svg {
  width: min(76vw, 340px);
}

.gate-countdown-deck {
  background: rgba(8, 11, 18, 0.56);
  backdrop-filter: blur(30px) saturate(210%);
  -webkit-backdrop-filter: blur(30px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: 1.5px solid rgba(253, 224, 71, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.gate-big-digits {
  font-family: var(--font-meter);
  font-size: clamp(42px, 12.2vw, 84px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow:
    0 0 26px rgba(56, 189, 248, 0.34),
    0 10px 30px rgba(0, 0, 0, 0.72);
}

.gate-big-digits .gate-tenths {
  font-family: var(--font-meter);
  font-size: 0.48em;
  font-weight: 800;
  color: #fde047;
}

.gate-seg-bar {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 3px;
  width: 100%;
  margin: 8px 0 6px;
}

.gate-seg-bar span {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.gate-seg-bar span.is-lit {
  background: linear-gradient(90deg, #38bdf8, #fde047);
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.65);
}

@media (min-width: 860px) {
  .gate-geo-svg {
    width: 376px;
  }

  .wp-country-tag {
    flex-basis: auto;
  }
}

/* =====================================================================
   V18: AUTHENTIC JRA 胴 (BODY) SILK SVG + ENHANCED TOP HERO GEOMETRY
   ===================================================================== */

.geo-lens-portal .fluid-canvas {
  opacity: 0.34;
}

.lens-silk-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: 50%;
  opacity: 0.64;
  pointer-events: none;
  display: block;
  transition: opacity 0.45s ease;
}

.winner-silk-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.28;
  pointer-events: none;
  display: block;
}

.winner-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 24, 0.36) 0%,
    rgba(10, 14, 24, 0.68) 48%,
    rgba(8, 11, 20, 0.86) 100%
  );
}

.geo-svg circle[r="2.2"],
.geo-svg circle[r="1.8"] {
  animation: geoVertexPulse 3.2s ease-in-out infinite alternate;
}

@keyframes geoVertexPulse {
  0% { opacity: 0.48; }
  100% { opacity: 1; }
}

/* =====================================================================
   V19: BRUSHED GOLD CHAMPION CARD + ULTRA-TRANSPARENT LIQUID GLASS CLOCK
        + SQUARED-OFF RACING NUMERALS + HARMONIZED SILKS + JC VIDEO LAYER
   ===================================================================== */

:root {
  --font-meter: 'Chakra Petch', 'Rajdhani', 'DIN Alternate', ui-sans-serif, sans-serif;
}

/* 1. Harmonized Editorial Racing Silks inside Top Hero Lens */
.lens-silk-svg {
  opacity: 0.46;
  filter: saturate(0.72) contrast(0.92);
}

/* 2. Ultra-Transparent Liquid Glass Main Clock + Prominent Squared-Off Numerals */
.liquid-glass-bar {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.36) 0%,
    rgba(244, 248, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.28) 100%
  );
  backdrop-filter: blur(26px) saturate(260%) brightness(1.06);
  -webkit-backdrop-filter: blur(26px) saturate(260%) brightness(1.06);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 24px 52px rgba(15, 17, 22, 0.12),
    0 2px 10px rgba(15, 17, 22, 0.05),
    inset 0 2px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1.5px 0 rgba(255, 255, 255, 0.34);
}

.liquid-glass-bar .cd-main {
  font-family: var(--font-meter);
  font-weight: 700;
  font-size: clamp(32px, 9.2vw, 48px);
  letter-spacing: 0.05em;
  line-height: 0.98;
  color: #090d16;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88),
    0 4px 16px rgba(15, 23, 42, 0.14);
}

.liquid-glass-bar .cd-cs {
  font-family: var(--font-meter);
  font-weight: 700;
  font-size: clamp(16px, 4.4vw, 22px);
  letter-spacing: 0.04em;
}

/* 3. Luxurious Brushed Gold Gradient Champion Card (RESULT) */
.winner-silk-svg {
  display: none;
}

#res-winner-card {
  background: linear-gradient(
    145deg,
    #2a200d 0%,
    #6e5420 26%,
    #b8913b 50%,
    #564017 76%,
    #181207 100%
  );
  border: 1.5px solid rgba(246, 212, 118, 0.62);
  box-shadow:
    0 24px 54px rgba(15, 17, 22, 0.22),
    inset 0 1.5px 0 rgba(255, 238, 178, 0.55);
}

.winner-hero-card::before {
  background: linear-gradient(
    180deg,
    rgba(20, 15, 6, 0.14) 0%,
    rgba(22, 17, 7, 0.54) 46%,
    rgba(14, 10, 4, 0.84) 100%
  );
}

.winner-profile-panel .wp-cell {
  background: rgba(18, 14, 6, 0.52);
  border: 1px solid rgba(246, 212, 118, 0.34);
}

.winner-profile-panel .wp-cell span {
  color: rgba(253, 230, 138, 0.78);
}

.wp-silk-row {
  background: rgba(24, 18, 8, 0.52);
  border: 1px solid rgba(246, 212, 118, 0.44);
}

/* 4. GATE: Ultra-Transparent Liquid Glass Clock + Prominent Squared Numerals + JC Video Slot */
.gate-jc-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.gate-countdown-deck {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(10, 14, 24, 0.22) 55%,
    rgba(255, 255, 255, 0.08) 100%
  );
  backdrop-filter: blur(20px) saturate(210%);
  -webkit-backdrop-filter: blur(20px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-top: 1.5px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.36),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45);
}

.gate-big-digits {
  font-family: var(--font-meter);
  font-weight: 700;
  font-size: clamp(56px, 15.6vw, 108px);
  letter-spacing: 0.04em;
  line-height: 0.94;
  color: #ffffff;
  text-shadow:
    0 0 34px rgba(255, 255, 255, 0.34),
    0 8px 28px rgba(0, 0, 0, 0.68);
}

.gate-big-digits .gate-tenths {
  font-family: var(--font-meter);
  font-weight: 700;
  color: #fde047;
}

/* =====================================================================
   V20: SHOWSTOPPING DRAMATIC TOP HERO + PRISMATIC LIQUID GLASS
        + SHIPPORI MINCHO RACE TITLES + FADED SILKS + BESPOKE GATE CLOCK
   ===================================================================== */

:root {
  --font-race-jp: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}

/* 1. Prestigious JRA GⅠ Poster Typography for Japanese Race Titles */
.hero-race-title,
.gate-race-name,
.result-race-label,
.wp-jp {
  font-family: var(--font-race-jp);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-race-title {
  font-size: clamp(16px, 4.4vw, 22px);
  color: #080c16;
}

.gate-race-name {
  font-size: clamp(24px, 7.2vw, 44px);
  letter-spacing: 0.06em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.72), 0 0 28px rgba(253, 224, 71, 0.25);
}

/* 2. Soft Faded Editorial Racing Silks (Zero Diagonal Lines) */
.lens-silk-svg {
  opacity: 0.38;
  filter: saturate(0.68) contrast(0.92);
}

/* 3. Dramatic Showstopping Top Hero + Sweeping Prismatic Aurora Light Shafts */
.tech-backdrop::before {
  content: '';
  position: absolute;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    conic-gradient(
      from 140deg at 50% 38%,
      rgba(56, 189, 248, 0.26) 0deg,
      rgba(139, 92, 246, 0.18) 80deg,
      rgba(253, 224, 71, 0.16) 150deg,
      rgba(244, 63, 94, 0.14) 220deg,
      rgba(14, 165, 233, 0.22) 300deg,
      rgba(56, 189, 248, 0.26) 360deg
    );
  filter: blur(64px);
  animation: prismAuroraDrift 18s ease-in-out infinite alternate;
}

@keyframes prismAuroraDrift {
  0% { transform: rotate(-10deg) scale(1.02); opacity: 0.72; }
  50% { transform: rotate(8deg) scale(1.08); opacity: 0.96; }
  100% { transform: rotate(-6deg) scale(1.04); opacity: 0.8; }
}

.color-orb {
  opacity: 0.58;
}

.geo-svg #dial-progress-arc {
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb, 56, 189, 248), 0.72));
}

.geo-svg #mech-orb-sat {
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb, 56, 189, 248), 0.75));
}

/* 4. Prismatic Iridescent Liquid Glass (Main Clock + Cockpit) */
.liquid-glass-bar {
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.44) 0%,
    rgba(235, 244, 255, 0.16) 46%,
    rgba(255, 255, 255, 0.34) 100%
  );
  backdrop-filter: blur(28px) saturate(310%) contrast(1.06) brightness(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(310%) contrast(1.06) brightness(1.08);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 26px 60px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(56, 189, 248, 0.22),
    0 0 36px rgba(139, 92, 246, 0.14),
    inset 0 2.5px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 rgba(255, 255, 255, 0.42);
}

.liquid-glass-bar::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -60%;
  width: 55%;
  height: 190%;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 32%,
    rgba(255, 255, 255, 0.58) 50%,
    rgba(56, 189, 248, 0.16) 62%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: liquidSpecularSweep 6.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes liquidSpecularSweep {
  0%, 58% { transform: translateX(-40%) skewX(-18deg); opacity: 0; }
  66% { opacity: 1; }
  100% { transform: translateX(360%) skewX(-18deg); opacity: 0; }
}

.glass-prism-rim {
  opacity: 0.92;
  background: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.85),
    rgba(139, 92, 246, 0.85),
    rgba(253, 224, 71, 0.85),
    rgba(244, 63, 94, 0.85),
    rgba(56, 189, 248, 0.85)
  );
  background-size: 240% 100%;
  animation: prismRimFlow 7s linear infinite;
}

@keyframes prismRimFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 240% 50%; }
}

.matrix-card,
.mini-deck,
.cast-caption-bar,
.floating-dock {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.62) 0%,
    rgba(242, 247, 255, 0.36) 100%
  );
  backdrop-filter: blur(34px) saturate(260%);
  -webkit-backdrop-filter: blur(34px) saturate(260%);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.11),
    0 0 22px rgba(56, 189, 248, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.95);
}

/* 5. JC Special Video Mode + Bespoke Transparent Liquid Glass GATE Digital Chronograph */
.gate-overlay.is-video-mode .gate-hero-photo,
.gate-overlay.is-video-mode .gate-photo-fill {
  opacity: 0 !important;
  pointer-events: none;
}

.gate-countdown-deck {
  position: relative;
  padding: 12px 18px 11px;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(10, 15, 28, 0.28) 54%,
    rgba(56, 189, 248, 0.12) 100%
  );
  backdrop-filter: blur(22px) saturate(240%);
  -webkit-backdrop-filter: blur(22px) saturate(240%);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-top: 1.5px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(56, 189, 248, 0.18),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55);
}

.gcd-reticle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: rgba(253, 224, 71, 0.85);
  border-style: solid;
  pointer-events: none;
}
.gcd-tl { top: 5px; left: 5px; border-width: 1.5px 0 0 1.5px; }
.gcd-tr { top: 5px; right: 5px; border-width: 1.5px 1.5px 0 0; }
.gcd-bl { bottom: 5px; left: 5px; border-width: 0 0 1.5px 1.5px; }
.gcd-br { bottom: 5px; right: 5px; border-width: 0 1.5px 1.5px 0; }

.gcd-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.82);
}

.gcd-live-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gcd-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: gcdLedBlink 1s ease-in-out infinite;
}

@keyframes gcdLedBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.gcd-ms {
  font-family: var(--font-meter);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.gate-big-digits .gate-colon {
  display: inline-block;
  margin: 0 2px;
  color: rgba(56, 189, 248, 0.92);
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.72);
  animation: gateColonPulse 1s steps(2, start) infinite;
}

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

.gate-seg-bar {
  grid-template-columns: repeat(20, 1fr);
  gap: 2.5px;
}

.gate-seg-bar span {
  height: 5px;
  border-radius: 1.5px;
}

/* =====================================================================
   V21: THIN+BOLD ANGULAR TYPOGRAPHY (NO MINCHO) + SKILL-BACKED LIQUID GLASS
        (glass-dark-mode-clock + beautiful-shadows + progressive-blur)
        + MOBILE 390PX ZERO-OVERFLOW BUTTONS
   ===================================================================== */

:root {
  --font-race-jp: 'Zen Kaku Gothic New', 'Chakra Petch', sans-serif;
  --font-meter: 'Chakra Petch', 'Rajdhani', sans-serif;
  --font-thin-geo: 'Rajdhani', 'Chakra Petch', sans-serif;
}

/* 1. Thin Angular (300/400) + Bold Angular (700) Geometric Typography — ZERO Mincho */
.hero-race-title,
.gate-race-name,
.result-race-label,
.wp-jp {
  font-family: var(--font-race-jp);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.geo-node span,
.chrono-sub-meta,
.coord-mono,
.gcd-meta-row,
.gate-editorial-kicker,
.gate-status,
.wp-cell span {
  font-family: var(--font-thin-geo);
  font-weight: 400;
  letter-spacing: 0.14em;
}

.liquid-glass-bar .cd-main {
  font-family: var(--font-meter);
  font-weight: 700;
}

.liquid-glass-bar .cd-cs {
  font-family: var(--font-thin-geo);
  font-weight: 300;
  color: rgba(15, 23, 42, 0.72);
}

/* 2. Authentic Apple-Grade Liquid Glass (beautiful-shadows + optical clarity, NO rainbow rim) */
.glass-prism-rim {
  display: none;
}

.liquid-glass-bar {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.48) 0%,
    rgba(255, 255, 255, 0.14) 52%,
    rgba(255, 255, 255, 0.32) 100%
  );
  backdrop-filter: blur(22px) saturate(185%) brightness(1.04);
  -webkit-backdrop-filter: blur(22px) saturate(185%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow:
    0 2.8px 2.2px rgba(0, 0, 0, 0.034),
    0 6.7px 5.3px rgba(0, 0, 0, 0.048),
    0 12.5px 10px rgba(0, 0, 0, 0.06),
    0 22.3px 17.9px rgba(0, 0, 0, 0.072),
    0 41.8px 33.4px rgba(0, 0, 0, 0.086),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.98),
    inset 1px 0 0 rgba(255, 255, 255, 0.46),
    inset 0 -1px 0 rgba(15, 23, 42, 0.06);
}

.matrix-card,
.mini-deck,
.cast-caption-bar,
.floating-dock {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.56) 0%,
    rgba(255, 255, 255, 0.24) 55%,
    rgba(255, 255, 255, 0.42) 100%
  );
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0px 0px 0px 1px rgba(0, 0, 0, 0.06),
    0px 1px 1px -0.5px rgba(0, 0, 0, 0.06),
    0px 3px 3px -1.5px rgba(0, 0, 0, 0.06),
    0px 6px 6px -3px rgba(0, 0, 0, 0.06),
    0px 12px 12px -6px rgba(0, 0, 0, 0.06),
    0px 24px 24px -12px rgba(0, 0, 0, 0.06),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.96);
}

.tac-key,
.tac-chip {
  box-shadow:
    0px 2px 3px -1px rgba(0, 0, 0, 0.1),
    0px 1px 0px 0px rgba(25, 28, 33, 0.02),
    0px 0px 0px 1px rgba(25, 28, 33, 0.08);
}

/* 3. Dark Smoked Instrument Glass GATE Clock (glass-dark-mode-clock skill) */
.gate-countdown-deck {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(8, 10, 16, 0.46) 54%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.44),
    0 2px 6px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.gcd-reticle {
  border-color: rgba(255, 255, 255, 0.56);
}

.gcd-led {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
}

.gcd-ms {
  font-family: var(--font-thin-geo);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.86);
}

.gate-big-digits .gate-colon {
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.45);
}

.gate-big-digits .gate-tenths {
  font-family: var(--font-thin-geo);
  font-weight: 300;
  color: #fde68a;
}

.gate-seg-bar span.is-lit {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), #fde68a);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.48);
}

/* 4. Progressive Bottom Edge Blur (progressive-blur skill) */
.bottom-progressive-blur {
  position: fixed;
  z-index: 40;
  inset: auto 0 0 0;
  height: 92px;
  pointer-events: none;
}

.bottom-progressive-blur > div {
  position: absolute;
  inset: 0;
}

.bottom-progressive-blur > div:nth-of-type(1) {
  z-index: 1;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  mask: linear-gradient(to bottom, transparent 0%, #000 20%, #000 35%, transparent 50%);
  -webkit-mask: linear-gradient(to bottom, transparent 0%, #000 20%, #000 35%, transparent 50%);
}

.bottom-progressive-blur > div:nth-of-type(2) {
  z-index: 2;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  mask: linear-gradient(to bottom, transparent 15%, #000 35%, #000 50%, transparent 65%);
  -webkit-mask: linear-gradient(to bottom, transparent 15%, #000 35%, #000 50%, transparent 65%);
}

.bottom-progressive-blur > div:nth-of-type(3) {
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask: linear-gradient(to bottom, transparent 30%, #000 50%, #000 65%, transparent 80%);
  -webkit-mask: linear-gradient(to bottom, transparent 30%, #000 50%, #000 65%, transparent 80%);
}

.bottom-progressive-blur > div:nth-of-type(4) {
  z-index: 4;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask: linear-gradient(to bottom, transparent 45%, #000 65%, #000 82%, transparent 96%);
  -webkit-mask: linear-gradient(to bottom, transparent 45%, #000 65%, #000 82%, transparent 96%);
}

.bottom-progressive-blur > div:nth-of-type(5) {
  z-index: 5;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  mask: linear-gradient(to bottom, transparent 62%, #000 84%, #000 100%);
  -webkit-mask: linear-gradient(to bottom, transparent 62%, #000 84%, #000 100%);
}

.bottom-progressive-blur > div:nth-of-type(6) {
  z-index: 6;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  mask: linear-gradient(to bottom, transparent 78%, #000 100%);
  -webkit-mask: linear-gradient(to bottom, transparent 78%, #000 100%);
}

/* 5. Mobile 390px Zero-Overflow & Clean-Wrap Cockpit Controls */
.app-shell {
  padding-bottom: calc(118px + env(safe-area-inset-bottom));
}

.matrix-row {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 5px;
}

.matrix-row > *,
.key-grid > * {
  min-width: 0;
}

@media (max-width: 480px) {
  .key-grid {
    gap: 4px;
  }

  .tac-key {
    height: 54px;
    padding: 5px 2px;
    border-radius: 14px;
  }

  .key-lbl {
    font-size: 8.5px;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .tac-chip {
    font-size: 9px;
    padding: 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .matrix-row .key-grid-5 .tac-chip {
    flex-direction: column;
    justify-content: center;
    height: 40px;
    padding: 4px 2px;
    gap: 2px;
    font-size: 8px;
    line-height: 1;
  }

  .matrix-row .key-grid-5 .tac-chip .inline-svg {
    width: 12px;
    height: 12px;
  }

  .mini-deck {
    padding: 8px 10px;
    gap: 6px;
  }

  .mini-deck-info {
    min-width: 0;
    flex: 1;
  }

  .deck-title {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mini-deck-actions {
    flex-shrink: 0;
    gap: 4px;
  }

  .suno-add-chip {
    padding: 0 8px;
    font-size: 9px;
    white-space: nowrap;
  }
}

/* =====================================================================
   V22: RESTORE CHAMPION CARD SILKS + LUXURY GOLD GRADIENT ON 1ST-PLACE ROW
   ===================================================================== */

.winner-silk-svg {
  display: block;
  opacity: 0.32;
}

#res-winner-card {
  background: #0d1220;
  border: 1.5px solid rgba(var(--champ-c1, 16, 68, 178), 0.48);
  box-shadow:
    0 24px 54px rgba(15, 17, 22, 0.22),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.22);
}

.winner-hero-card::before {
  background: linear-gradient(
    180deg,
    rgba(10, 14, 24, 0.22) 0%,
    rgba(10, 14, 24, 0.62) 48%,
    rgba(8, 11, 20, 0.86) 100%
  );
}

.winner-profile-panel .wp-cell {
  background: rgba(12, 16, 26, 0.56);
  border: 1px solid rgba(var(--champ-c1, 16, 68, 178), 0.36);
}

.winner-profile-panel .wp-cell span {
  color: rgba(255, 255, 255, 0.66);
}

.wp-silk-row {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(var(--champ-c1, 16, 68, 178), 0.52);
}

/* Luxury Metallic Brushed Gold Gradient on 1st-Place Finish-Order Row */
#res-finish-board .fin-row.is-first {
  background: linear-gradient(
    122deg,
    #5a3e08 0%,
    #a87c1e 26%,
    #e5be58 50%,
    #b68822 74%,
    #4a3206 100%
  );
  border: 1.5px solid rgba(254, 240, 138, 0.8);
  box-shadow:
    0 10px 26px rgba(161, 114, 18, 0.32),
    inset 0 1.5px 0 rgba(255, 250, 214, 0.84),
    inset 0 -1px 0 rgba(48, 30, 0, 0.35);
}

#res-finish-board .fin-row.is-first .fin-rank,
#res-finish-board .fin-row.is-first .fin-horse,
#res-finish-board .fin-row.is-first .fin-time {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(38, 22, 0, 0.72);
}

#res-finish-board .fin-row.is-first .fin-jockey,
#res-finish-board .fin-row.is-first .fin-margin {
  color: rgba(255, 250, 232, 0.94);
  text-shadow: 0 1px 3px rgba(38, 22, 0, 0.65);
}

/* =====================================================================
   V23: ZERO VERTICAL SHRINK IN GATE + 100% STROKE-FREE HERO + STUDIO SILKS
   ===================================================================== */

/* 1. Eliminate GATE Vertical Shrinking (No T-3s Black Shutters, Locked Center Watch, Stable HUD Height) */
.gate-shutter,
.gate-shutter-top,
.gate-shutter-bottom {
  display: none !important;
}

.gate-geo-stage {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 0;
}

.gate-champion-plate {
  min-height: 92px;
}

.gcp-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gate-jc-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: none !important;
}

/* 2. Stroke-Free Hero Lens + Clean Rich Studio Racing Silks (Zero Muddy Blobs) */
.geo-lens-portal {
  border: none !important;
  background: transparent !important;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.14) !important;
}

.geo-lens-portal .fluid-canvas {
  opacity: 0.08;
}

.lens-silk-svg {
  opacity: 0.72;
  filter: none;
}

/* 3. Ensure Silk SVGs & GATE Watch Never Inherit Unwanted Outline Strokes */
#gate-geo-svg,
#gate-geo-svg *,
.lens-silk-svg,
.lens-silk-svg *,
.winner-silk-svg,
.winner-silk-svg * {
  stroke: none;
  stroke-width: 0;
}

/* =====================================================================
   V24: CLEAR-GLASS EMPHASIZED SILKS + FULL-WIDTH BROADCAST GATE TIMER
   ===================================================================== */

/* 1. Clear-Glass Base + Emphasized JRA Motif Silks in Top Lens */
.lens-silk-svg {
  opacity: 0.88;
}

/* 2. Full-Width Floating JRA GⅠ × F1 Broadcast Lower Strip (Zero Cramped Box) */
.gate-widescreen-hud.gate-broadcast-dock {
  position: relative;
  z-index: 32;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 960px;
  margin: auto auto 0;
  padding: 12px 18px calc(18px + var(--safe-bottom));
  background: linear-gradient(
    180deg,
    rgba(6, 8, 14, 0) 0%,
    rgba(6, 8, 14, 0.36) 28%,
    rgba(6, 8, 14, 0.62) 100%
  );
  border: none;
  box-shadow: none;
}

.gbd-upper-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.gate-broadcast-dock .gate-champion-plate {
  min-height: 66px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  flex: 1;
  min-width: 0;
}

.gate-broadcast-dock .gcp-name {
  font-size: clamp(20px, 5.4vw, 30px);
  line-height: 1.05;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.72);
}

.gbd-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  text-align: right;
}

.gate-broadcast-dock .gate-status {
  font-family: var(--font-thin-geo);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #fde68a;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
}

/* Monumental Borderless Sculptural Broadcast Timer Ribbon */
.gbd-timer-ribbon {
  position: relative;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding: 6px 14px 4px;
  border-radius: 16px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(10, 12, 20, 0.24) 55%,
    rgba(255, 255, 255, 0.04) 100%
  );
  backdrop-filter: blur(16px) saturate(165%);
  -webkit-backdrop-filter: blur(16px) saturate(165%);
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.gate-broadcast-dock .gate-big-digits {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  line-height: 0.88;
  will-change: transform;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.gate-broadcast-dock .gate-big-digits .g-sec {
  font-family: var(--font-bold-geo);
  font-size: clamp(68px, 19.5vw, 128px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow:
    0 0 28px rgba(255, 255, 255, 0.34),
    0 6px 24px rgba(0, 0, 0, 0.58);
}

.gate-broadcast-dock .gate-big-digits .g-frac {
  font-family: var(--font-thin-geo);
  font-size: clamp(36px, 10.5vw, 68px);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #fde68a;
  text-shadow:
    0 0 20px rgba(253, 230, 138, 0.42),
    0 4px 14px rgba(0, 0, 0, 0.52);
}

.gate-broadcast-dock .gate-big-digits .g-unit {
  font-family: var(--font-thin-geo);
  font-size: clamp(13px, 3.2vw, 18px);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.72);
  margin-left: 6px;
}

@keyframes gateDigitPulse {
  0% { transform: scale(1.065); }
  100% { transform: scale(1); }
}

.gate-broadcast-dock .gate-big-digits.is-pulse {
  animation: gateDigitPulse 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.gate-broadcast-dock .gate-big-digits.is-final-3 .g-sec {
  color: #fef08a;
  text-shadow:
    0 0 36px rgba(253, 224, 71, 0.85),
    0 0 72px rgba(245, 158, 11, 0.55),
    0 6px 24px rgba(0, 0, 0, 0.65);
}

.gate-broadcast-dock .gate-big-digits.is-final-3 .g-frac {
  color: #ffffff;
  text-shadow: 0 0 24px rgba(253, 224, 71, 0.75);
}

.gate-broadcast-dock .gate-big-digits.is-open .g-sec {
  color: #ffffff;
  text-shadow:
    0 0 42px rgba(255, 255, 255, 0.95),
    0 0 84px rgba(253, 224, 71, 0.85);
}

/* Edge-to-Edge 24-Segment Broadcast Progress Bar */
.gate-broadcast-dock .gate-seg-bar {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  height: 5px;
  margin-top: 2px;
}

.gate-broadcast-dock .gate-seg-bar span {
  height: 100%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.14s ease, box-shadow 0.14s ease;
}

.gate-broadcast-dock .gate-seg-bar span.is-lit {
  background: linear-gradient(90deg, #ffffff 0%, #fde68a 100%);
  box-shadow: 0 0 10px rgba(253, 230, 138, 0.72);
}

/* =====================================================================
   V25: RICHER SILKS + LARGER GATE ANALOG WATCH + ZERO DIGIT WIGGLE
   ===================================================================== */

.lens-silk-svg {
  opacity: 0.94;
}

.gate-broadcast-dock .gate-big-digits.is-pulse {
  animation: none !important;
  transform: none !important;
}

.gate-geo-stage {
  padding-bottom: 150px;
}

.gate-geo-svg {
  width: min(94vw, 440px) !important;
  height: auto;
}

@media (min-width: 860px) {
  .gate-geo-stage {
    padding-bottom: 180px;
  }

  .gate-geo-svg {
    width: min(68vh, 520px) !important;
  }
}

/* =====================================================================
   V26: VIVID SILKS + CONTINUOUS GATE OPEN DRIFT
   ===================================================================== */

.lens-silk-svg {
  opacity: 0.98;
}

@keyframes gateOpenDrift {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.gate-overlay.is-gate-open .gate-jc-video {
  transform: scale(1) !important;
  animation: gateOpenDrift 8s ease-out forwards;
}

/* =====================================================================
   V27: ZERO LINE/TEXT OVERLAP ON HERO CORNER TELEMETRY LABELS
   ===================================================================== */

.geo-node {
  z-index: 6;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(226, 230, 238, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* =====================================================================
   V28: NEXT-GENERATION LIQUID GEOMETRY (OBSIDIAN + THREE.JS + OPTICAL GLASS)
   Skills: dark-glass-clean-layout, refract-liquid-glass, liquid-metal-border,
           gradient-border-flashlight, threejs-materials
   ===================================================================== */

body.theme-liquid-geometry {
  --bg: #05070b;
  --ink: #f8fafc;
  --muted: rgba(203, 213, 225, 0.68);
  --line: rgba(255, 255, 255, 0.12);
  --ceramic: rgba(14, 18, 28, 0.56);
  --ceramic-pure: rgba(18, 23, 36, 0.74);
  --accent-primary: #38bdf8;
  --accent-secondary: #a5b4fc;
  background: #04060a !important;
  color: #f8fafc;
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
}

body.theme-liquid-geometry .tech-backdrop {
  background: radial-gradient(115% 75% at 50% 10%, #111827 0%, #070a12 52%, #030508 100%) !important;
}

body.theme-liquid-geometry .toast {
  background: rgba(12, 16, 28, 0.92) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* Three.js WebGL Liquid Glass 3D Canvas Layer */
.webgl-liquid-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.92;
}

body.theme-liquid-geometry .bg-geo-canvas {
  opacity: 0.22;
  mix-blend-mode: screen;
}

body.theme-liquid-geometry .color-orb-1 {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
}

body.theme-liquid-geometry .color-orb-2 {
  background: radial-gradient(circle, rgba(165, 180, 252, 0.14) 0%, transparent 70%);
}

body.theme-liquid-geometry .color-orb-3 {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

/* Minimal Architectural Top Bar & Context Strip */
body.theme-liquid-geometry .top-bar {
  background: rgba(8, 11, 18, 0.54);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

body.theme-liquid-geometry .brand-code {
  background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
  color: #05070b;
}

body.theme-liquid-geometry .brand-name,
body.theme-liquid-geometry .jst-readout,
body.theme-liquid-geometry .date-label {
  color: #f8fafc;
}

body.theme-liquid-geometry .coord-mono {
  color: rgba(148, 163, 184, 0.72);
}

body.theme-liquid-geometry .source-pill,
body.theme-liquid-geometry .cast-mode-toggle {
  background: rgba(18, 24, 38, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

body.theme-liquid-geometry .mini-seg {
  color: rgba(203, 213, 225, 0.72);
}

body.theme-liquid-geometry .mini-seg.is-active,
body.theme-liquid-geometry .phase-tag {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(203, 213, 225, 0.88));
  color: #05070b;
}

/* Hero Architectural SVG Hairlines Inverted to Luminous Silver/Chrome on Dark Obsidian */
body.theme-liquid-geometry .geo-svg circle[stroke*="15,17,22"],
body.theme-liquid-geometry .geo-svg line[stroke*="15,17,22"],
body.theme-liquid-geometry .geo-svg polygon[stroke*="15,17,22"],
body.theme-liquid-geometry .geo-svg rect[stroke*="15,17,22"],
body.theme-liquid-geometry .geo-svg g[stroke*="15,17,22"] {
  stroke: rgba(226, 232, 240, 0.24) !important;
}

body.theme-liquid-geometry .geo-svg polygon[fill*="255,255,255"] {
  fill: rgba(255, 255, 255, 0.035) !important;
}

body.theme-liquid-geometry .geo-svg [fill*="15,17,22"],
body.theme-liquid-geometry .geo-svg [fill="#0f1116"] {
  fill: rgba(226, 232, 240, 0.76) !important;
}

body.theme-liquid-geometry .geo-svg text {
  fill: rgba(248, 250, 252, 0.86) !important;
  stroke: rgba(5, 7, 11, 0.92) !important;
}

body.theme-liquid-geometry #dial-ticks line {
  stroke: rgba(226, 232, 240, 0.34);
}

/* Full-Bleed Photographic Optical Liquid-Glass Hero Portal (Zero Racing Silk SVG) */
body.theme-liquid-geometry #lens-silk-svg {
  display: none !important;
}

body.theme-liquid-geometry .geo-lens-portal {
  background: #06080f !important;
  box-shadow:
    0 28px 68px rgba(0, 0, 0, 0.72),
    0 0 0 1.5px rgba(255, 255, 255, 0.28),
    0 0 38px rgba(56, 189, 248, 0.16),
    inset 0 2px 14px rgba(255, 255, 255, 0.32),
    inset 0 -8px 20px rgba(56, 189, 248, 0.18) !important;
}

body.theme-liquid-geometry .cast-img.is-photo-cast {
  object-fit: cover;
  filter: contrast(1.04) saturate(1.06);
}

body.theme-liquid-geometry .geo-lens-glint {
  background:
    radial-gradient(92% 52% at 32% 10%, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.05) 36%, transparent 62%),
    radial-gradient(100% 100% at 50% 50%, transparent 72%, rgba(56, 189, 248, 0.14) 90%, rgba(5, 7, 11, 0.56) 100%);
}

/* Corner Telemetry Nodes — Frosted Obsidian Liquid Glass */
body.theme-liquid-geometry .geo-node {
  background: rgba(12, 16, 26, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

body.theme-liquid-geometry .geo-node span {
  color: rgba(148, 163, 184, 0.82);
}

body.theme-liquid-geometry .geo-node strong {
  color: #f8fafc;
}

/* Dark Optical Liquid-Glass Shells + Pointer Flashlight Rim Glow (refract-liquid-glass + gradient-border-flashlight) */
body.theme-liquid-geometry .liquid-glass-bar,
body.theme-liquid-geometry .matrix-card,
body.theme-liquid-geometry .mini-deck,
body.theme-liquid-geometry .cast-caption-bar,
body.theme-liquid-geometry .ceramic-card,
body.theme-liquid-geometry .race-card,
body.theme-liquid-geometry .bottom-dock {
  position: relative;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(13, 17, 28, 0.62) 45%,
    rgba(9, 12, 20, 0.74) 100%
  ) !important;
  backdrop-filter: blur(28px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(185%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.34) !important;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(56, 189, 248, 0.12) !important;
  color: #f8fafc;
}

body.theme-liquid-geometry .liquid-glass-bar::after,
body.theme-liquid-geometry .matrix-card::after,
body.theme-liquid-geometry .mini-deck::after,
body.theme-liquid-geometry .tac-key::after,
body.theme-liquid-geometry .race-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  background: radial-gradient(
    260px circle at var(--fl-x, -300px) var(--fl-y, -300px),
    rgba(125, 211, 252, 0.18) 0%,
    rgba(165, 180, 252, 0.08) 42%,
    transparent 74%
  );
}

body.theme-liquid-geometry .is-fl-lit::after {
  opacity: 1 !important;
}

body.theme-liquid-geometry .hero-race-title,
body.theme-liquid-geometry .cd-main,
body.theme-liquid-geometry .deck-title,
body.theme-liquid-geometry .rc-name,
body.theme-liquid-geometry .cast-label {
  color: #f8fafc !important;
}

body.theme-liquid-geometry .cd-cs,
body.theme-liquid-geometry .chrono-sub-meta,
body.theme-liquid-geometry .row-code,
body.theme-liquid-geometry .rc-meta,
body.theme-liquid-geometry .rc-time {
  color: rgba(186, 230, 253, 0.82) !important;
}

/* Liquid-Metal Tactile Hardware Keys & Chips */
body.theme-liquid-geometry .tac-key,
body.theme-liquid-geometry .tac-chip,
body.theme-liquid-geometry .color-key,
body.theme-liquid-geometry .icon-btn,
body.theme-liquid-geometry .track-pill {
  background: rgba(20, 26, 40, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top-color: rgba(255, 255, 255, 0.26);
  color: #e2e8f0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

body.theme-liquid-geometry .tac-key.is-dark,
body.theme-liquid-geometry .tac-chip.is-active,
body.theme-liquid-geometry .color-key.is-active,
body.theme-liquid-geometry .track-pill.is-active,
body.theme-liquid-geometry .dock-btn.is-active {
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  color: #05070b !important;
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.28), inset 0 1px 0 #ffffff;
}

body.theme-liquid-geometry .tac-key.is-gold {
  background: linear-gradient(135deg, #fde68a 0%, #d97706 100%);
  color: #090b10 !important;
  border-color: rgba(254, 240, 138, 0.85);
}

body.theme-liquid-geometry .dock-btn {
  color: rgba(203, 213, 225, 0.72);
}

/* Smooth Cinematic Fade Return from GATE to TOP */
.gate-overlay {
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.gate-overlay.is-fading-out {
  opacity: 0 !important;
  filter: blur(14px);
  pointer-events: none;
}

/* Universal Mobile Draggable Liquid-Glass Mini PiP Widget */
.mobile-pip-widget {
  position: fixed;
  right: 12px;
  bottom: calc(94px + env(safe-area-inset-bottom));
  z-index: 180;
  width: min(268px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14) 0%, rgba(10, 14, 24, 0.84) 55%, rgba(6, 9, 16, 0.92) 100%);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-top: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62), 0 0 24px rgba(56, 189, 248, 0.22);
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.mobile-pip-widget:active {
  cursor: grabbing;
}

.mpip-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.mpip-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mpip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mpip-race {
  font-family: var(--font-jp-geo);
  font-size: 11px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mpip-close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mpip-digits {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.mpip-main {
  font-family: var(--font-bold-geo);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.mpip-cs {
  font-family: var(--font-thin-geo);
  font-size: 14px;
  font-weight: 400;
  color: #38bdf8;
}

/* =====================================================================
   V29: BRIGHT LUMINOUS FRONT LINES + LENS SOUNDWAVE + CINEMATIC GRADING
        + DARK OBSIDIAN HOLOGRAPHIC LIQUID-GLASS RESULT ARCHIVE
   ===================================================================== */

.archive-pill {
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-thin-geo);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  background: rgba(18, 24, 38, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.34);
  color: #bae6fd;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* 1. Crisp, Luminous, High-Visibility Front SVG Architectural Linework */
body.theme-liquid-geometry .geo-svg {
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.34));
}

body.theme-liquid-geometry .geo-svg circle[stroke*="15,17,22"],
body.theme-liquid-geometry .geo-svg line[stroke*="15,17,22"],
body.theme-liquid-geometry .geo-svg polygon[stroke*="15,17,22"],
body.theme-liquid-geometry .geo-svg rect[stroke*="15,17,22"],
body.theme-liquid-geometry .geo-svg g[stroke*="15,17,22"] {
  stroke: rgba(226, 232, 240, 0.56) !important;
}

body.theme-liquid-geometry #dial-ticks line {
  stroke: rgba(226, 232, 240, 0.62) !important;
}

body.theme-liquid-geometry #dial-progress-arc {
  stroke-width: 2.8 !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.72));
}

/* 2. Cinematic Filmic Photo Grading + Live Radial Holographic Soundwave on Hero Lens */
body.theme-liquid-geometry .cast-img.is-photo-cast {
  object-fit: cover;
  filter: contrast(1.12) saturate(1.08) brightness(0.95);
}

.lens-wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* 3. Fix Mobile Horizontal Width Lock Across Sections */
body.theme-liquid-geometry .app-shell,
body.theme-liquid-geometry .view-section,
body.theme-liquid-geometry .context-strip,
body.theme-liquid-geometry .hero-cockpit,
body.theme-liquid-geometry .timeline-section {
  max-width: 100%;
  box-sizing: border-box;
}

/* 4. Complete Dark Obsidian Holographic Liquid-Glass RESULT (5-Year Champion Archive) */
body.theme-liquid-geometry .result-overlay {
  background: rgba(3, 5, 10, 0.86) !important;
  backdrop-filter: blur(26px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%) !important;
}

body.theme-liquid-geometry .result-shell {
  background: linear-gradient(160deg, rgba(16, 22, 36, 0.86) 0%, rgba(7, 10, 18, 0.94) 100%) !important;
  border: 1px solid rgba(125, 211, 252, 0.28) !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.42) !important;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.78),
    0 0 42px rgba(56, 189, 248, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
  color: #f8fafc !important;
}

body.theme-liquid-geometry .result-live-badge {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #05070b;
  font-weight: 800;
}

body.theme-liquid-geometry .result-race-label {
  color: #f8fafc !important;
}

body.theme-liquid-geometry .year-tab,
body.theme-liquid-geometry .res-year-btn {
  background: rgba(18, 24, 38, 0.78) !important;
  border: 1px solid rgba(125, 211, 252, 0.24) !important;
  color: rgba(241, 245, 249, 0.90) !important;
}

body.theme-liquid-geometry .year-tab.is-active,
body.theme-liquid-geometry .res-year-btn.is-active {
  background: linear-gradient(135deg, #f8fafc 0%, #bae6fd 100%) !important;
  color: #05070b !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.42) !important;
}

body.theme-liquid-geometry #res-winner-card {
  position: relative;
  background: linear-gradient(165deg, rgba(14, 20, 34, 0.92) 0%, rgba(6, 9, 16, 0.96) 100%) !important;
  border: 1.5px solid rgba(125, 211, 252, 0.36) !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.64),
    0 0 36px rgba(56, 189, 248, 0.16),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.32) !important;
}

body.theme-liquid-geometry #res-winner-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(56, 189, 248, 0.12) 0%, transparent 32%, rgba(165, 180, 252, 0.10) 68%, rgba(253, 230, 138, 0.08) 100%);
}

body.theme-liquid-geometry .winner-profile-panel .wp-name,
body.theme-liquid-geometry .winner-profile-panel .wp-jp,
body.theme-liquid-geometry .winner-profile-panel .wp-time,
body.theme-liquid-geometry .winner-profile-panel .wp-cell strong,
body.theme-liquid-geometry .winner-profile-panel .wp-silk-tag {
  color: #f8fafc !important;
}

body.theme-liquid-geometry .winner-profile-panel .wp-country-tag,
body.theme-liquid-geometry .winner-profile-panel .wp-cell span {
  color: rgba(186, 230, 253, 0.78) !important;
}

body.theme-liquid-geometry .winner-profile-panel .wp-cell {
  background: rgba(14, 20, 34, 0.72) !important;
  border: 1px solid rgba(125, 211, 252, 0.22) !important;
}

body.theme-liquid-geometry .finish-board {
  background: rgba(10, 14, 24, 0.64) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px;
  padding: 8px;
}

body.theme-liquid-geometry #res-finish-board .fin-row {
  background: rgba(18, 24, 38, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

body.theme-liquid-geometry #res-finish-board .fin-row .fin-rank,
body.theme-liquid-geometry #res-finish-board .fin-row .fin-horse,
body.theme-liquid-geometry #res-finish-board .fin-row .fin-time {
  color: #f8fafc !important;
}

body.theme-liquid-geometry #res-finish-board .fin-row .fin-jockey,
body.theme-liquid-geometry #res-finish-board .fin-row .fin-margin {
  color: rgba(203, 213, 225, 0.84) !important;
}

body.theme-liquid-geometry #res-finish-board .fin-row.is-first {
  background: linear-gradient(122deg, #5a3e08 0%, #a87c1e 26%, #e5be58 50%, #b68822 74%, #4a3206 100%) !important;
  border: 1.5px solid rgba(254, 240, 138, 0.88) !important;
}

/* =====================================================================
   V30: CRISP SINGLE-LINE MOBILE WRAPPING + GUARANTEED GATE VIDEO LAYER
   ===================================================================== */

.gate-overlay.is-video-mode .gate-jc-video {
  z-index: 4;
  display: block;
}

.gate-overlay.is-video-mode .gate-photo-fill,
.gate-overlay.is-video-mode .gate-hero-photo {
  opacity: 0 !important;
}

.cast-caption-bar {
  max-width: 100%;
  overflow: hidden;
}

.cast-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  font-size: clamp(10px, 2.8vw, 12px);
  letter-spacing: 0.06em;
}

.geo-node strong,
.gcp-edition,
.hero-race-title,
.result-race-label,
.wp-country-tag,
.fin-horse {
  word-break: keep-all;
}

.gcp-top {
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
}

.gcp-edition {
  white-space: nowrap;
}

.geo-node {
  max-width: 44vw;
}

.geo-node strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* =====================================================================
   V31: HOLOGRAPHIC LIQUID-GLASS CHRONOGRAPH CHAMPION RESULT & MOBILE PiP
   ===================================================================== */

@keyframes holoShimmerBar {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Luxury Holographic Chronograph Framing on Champion RESULT Showcase */
.winner-chrono-reticle {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.72;
}

.winner-chrono-reticle svg {
  width: 100%;
  height: 100%;
  display: block;
}

body.theme-liquid-geometry #res-winner-card {
  border-top: 2px solid transparent !important;
  background-image:
    linear-gradient(165deg, rgba(12, 18, 32, 0.94) 0%, rgba(5, 8, 16, 0.98) 100%),
    linear-gradient(90deg, #38bdf8, #c4b5fd, #fde68a, #38bdf8) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  background-size: 100% 100%, 240% 100% !important;
  animation: holoShimmerBar 7s linear infinite;
}

body.theme-liquid-geometry .wp-trophy-strip span,
body.theme-liquid-geometry .wp-trophy-chip {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(167, 139, 250, 0.14)) !important;
  border: 1px solid rgba(186, 230, 253, 0.32) !important;
  color: #e0f2fe !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

body.theme-liquid-geometry .winner-time-glass,
body.theme-liquid-geometry .winner-edition-ribbon,
body.theme-liquid-geometry .winner-bgm-pill {
  background: rgba(8, 12, 22, 0.68) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border: 1px solid rgba(186, 230, 253, 0.34) !important;
  color: #f8fafc !important;
}

body.theme-liquid-geometry .wp-first-badge {
  background: linear-gradient(135deg, #fde68a, #f59e0b) !important;
  color: #090b10 !important;
  font-weight: 800;
}

/* Holographic Liquid-Glass Chronograph Mobile Mini PiP Widget */
.mobile-pip-widget {
  border: 1.5px solid transparent !important;
  background-image:
    linear-gradient(150deg, rgba(14, 20, 34, 0.88) 0%, rgba(6, 9, 18, 0.95) 100%),
    linear-gradient(120deg, #38bdf8, #c4b5fd, #fde68a, #38bdf8) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  background-size: 100% 100%, 240% 240% !important;
  animation: holoShimmerBar 6s linear infinite;
}

.mpip-chrono-lens {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mpip-chrono-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spinSlow 14s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.mpip-chrono-lens .mpip-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(186, 230, 253, 0.45);
}

/* =====================================================================
   V32: REFINED NON-NEON PLATINUM NIGHT + ARCHITECTURAL CRYSTAL DAY MODE
   ===================================================================== */

.theme-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-thin-geo);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  background: rgba(20, 26, 38, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  transition: transform 0.16s ease, background 0.22s ease, color 0.22s ease;
}

.theme-toggle-pill:active {
  transform: scale(0.95);
}

.theme-toggle-pill .inline-svg {
  width: 12px;
  height: 12px;
}

/* Tone down neon cyan in NIGHT mode to luxury platinum/silver/sapphire */
body.theme-liquid-geometry[data-theme="night"] {
  --accent-primary: #cbd5e1;
  --accent-secondary: #93c5fd;
}

body.theme-liquid-geometry[data-theme="night"] .geo-svg {
  filter: drop-shadow(0 0 4px rgba(226, 232, 240, 0.24));
}

body.theme-liquid-geometry[data-theme="night"] #dial-progress-arc {
  filter: drop-shadow(0 0 6px rgba(147, 197, 253, 0.48));
}

/* ==================== ARCHITECTURAL CRYSTAL DAY MODE ==================== */
body.theme-liquid-geometry[data-theme="day"] {
  --bg: #e7ebf2;
  --ink: #0f172a;
  --muted: rgba(51, 65, 85, 0.72);
  --line: rgba(15, 23, 42, 0.12);
  --ceramic: rgba(255, 255, 255, 0.62);
  --ceramic-pure: rgba(255, 255, 255, 0.84);
  --accent-primary: #1e293b;
  --accent-secondary: #64748b;
  background: #e7ebf2 !important;
  color: #0f172a;
}

body.theme-liquid-geometry[data-theme="day"] .tech-backdrop {
  background: radial-gradient(120% 80% at 50% 0%, #f6f8fb 0%, #e7ecf3 54%, #dce2ec 100%) !important;
}

body.theme-liquid-geometry[data-theme="day"] .top-bar {
  background: rgba(246, 248, 252, 0.72);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body.theme-liquid-geometry[data-theme="day"] .brand-code {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #ffffff;
}

body.theme-liquid-geometry[data-theme="day"] .brand-name,
body.theme-liquid-geometry[data-theme="day"] .jst-readout,
body.theme-liquid-geometry[data-theme="day"] .date-label,
body.theme-liquid-geometry[data-theme="day"] .hero-race-title,
body.theme-liquid-geometry[data-theme="day"] .cd-main,
body.theme-liquid-geometry[data-theme="day"] .deck-title,
body.theme-liquid-geometry[data-theme="day"] .rc-name,
body.theme-liquid-geometry[data-theme="day"] .cast-label,
body.theme-liquid-geometry[data-theme="day"] .geo-node strong {
  color: #0f172a !important;
}

body.theme-liquid-geometry[data-theme="day"] .coord-mono,
body.theme-liquid-geometry[data-theme="day"] .cd-cs,
body.theme-liquid-geometry[data-theme="day"] .chrono-sub-meta,
body.theme-liquid-geometry[data-theme="day"] .row-code,
body.theme-liquid-geometry[data-theme="day"] .rc-meta,
body.theme-liquid-geometry[data-theme="day"] .rc-time,
body.theme-liquid-geometry[data-theme="day"] .geo-node span {
  color: rgba(51, 65, 85, 0.78) !important;
}

body.theme-liquid-geometry[data-theme="day"] .theme-toggle-pill,
body.theme-liquid-geometry[data-theme="day"] .source-pill,
body.theme-liquid-geometry[data-theme="day"] .archive-pill {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), inset 0 1px 0 #ffffff;
}

body.theme-liquid-geometry[data-theme="day"] .phase-tag {
  background: #0f172a;
  color: #ffffff;
}

/* Day Mode Crisp Titanium Hero SVG Hairlines */
body.theme-liquid-geometry[data-theme="day"] .geo-svg {
  filter: none;
}

body.theme-liquid-geometry[data-theme="day"] .geo-svg circle[stroke*="15,17,22"],
body.theme-liquid-geometry[data-theme="day"] .geo-svg line[stroke*="15,17,22"],
body.theme-liquid-geometry[data-theme="day"] .geo-svg polygon[stroke*="15,17,22"],
body.theme-liquid-geometry[data-theme="day"] .geo-svg rect[stroke*="15,17,22"],
body.theme-liquid-geometry[data-theme="day"] .geo-svg g[stroke*="15,17,22"] {
  stroke: rgba(15, 23, 42, 0.34) !important;
}

body.theme-liquid-geometry[data-theme="day"] .geo-svg [fill*="15,17,22"],
body.theme-liquid-geometry[data-theme="day"] .geo-svg [fill="#0f1116"] {
  fill: rgba(15, 23, 42, 0.82) !important;
}

body.theme-liquid-geometry[data-theme="day"] .geo-svg text {
  fill: rgba(15, 23, 42, 0.88) !important;
  stroke: rgba(235, 239, 245, 0.96) !important;
}

body.theme-liquid-geometry[data-theme="day"] #dial-ticks line {
  stroke: rgba(15, 23, 42, 0.42) !important;
}

/* Day Mode Frosted Crystal Liquid-Glass Panels */
body.theme-liquid-geometry[data-theme="day"] .liquid-glass-bar,
body.theme-liquid-geometry[data-theme="day"] .matrix-card,
body.theme-liquid-geometry[data-theme="day"] .mini-deck,
body.theme-liquid-geometry[data-theme="day"] .cast-caption-bar,
body.theme-liquid-geometry[data-theme="day"] .ceramic-card,
body.theme-liquid-geometry[data-theme="day"] .race-card,
body.theme-liquid-geometry[data-theme="day"] .bottom-dock,
body.theme-liquid-geometry[data-theme="day"] .geo-node {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(241, 245, 249, 0.62) 55%,
    rgba(255, 255, 255, 0.72) 100%
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow:
    0 16px 38px rgba(15, 23, 42, 0.09),
    0 2px 8px rgba(15, 23, 42, 0.05),
    inset 0 1.5px 0 #ffffff !important;
  color: #0f172a;
}

body.theme-liquid-geometry[data-theme="day"] .tac-key,
body.theme-liquid-geometry[data-theme="day"] .tac-chip,
body.theme-liquid-geometry[data-theme="day"] .color-key,
body.theme-liquid-geometry[data-theme="day"] .icon-btn,
body.theme-liquid-geometry[data-theme="day"] .track-pill {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), inset 0 1px 0 #ffffff;
}

body.theme-liquid-geometry[data-theme="day"] .tac-key.is-dark,
body.theme-liquid-geometry[data-theme="day"] .tac-chip.is-active,
body.theme-liquid-geometry[data-theme="day"] .color-key.is-active,
body.theme-liquid-geometry[data-theme="day"] .track-pill.is-active,
body.theme-liquid-geometry[data-theme="day"] .dock-btn.is-active {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff !important;
  border-color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}

body.theme-liquid-geometry[data-theme="day"] .dock-btn {
  color: rgba(51, 65, 85, 0.72);
}

body.theme-liquid-geometry[data-theme="day"] .geo-lens-portal {
  box-shadow:
    0 24px 56px rgba(15, 23, 42, 0.18),
    0 0 0 1.5px rgba(255, 255, 255, 0.88),
    inset 0 2px 12px rgba(255, 255, 255, 0.65) !important;
}

/* Day Mode Crystal RESULT Showcase */
body.theme-liquid-geometry[data-theme="day"] .result-overlay {
  background: rgba(226, 232, 240, 0.78) !important;
}

body.theme-liquid-geometry[data-theme="day"] .result-shell {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.90) 0%, rgba(241, 245, 249, 0.94) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}

body.theme-liquid-geometry[data-theme="day"] .result-race-label {
  color: #0f172a !important;
}

body.theme-liquid-geometry[data-theme="day"] .res-year-btn {
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}

body.theme-liquid-geometry[data-theme="day"] .res-year-btn.is-active {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22) !important;
}

body.theme-liquid-geometry[data-theme="day"] .finish-board {
  background: rgba(241, 245, 249, 0.85) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row .fin-rank,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row .fin-horse,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row .fin-time {
  color: #0f172a !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row .fin-jockey,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row .fin-margin {
  color: #475569 !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-rank,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-horse,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-time,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-jockey,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-margin {
  color: #ffffff !important;
}

/* =====================================================================
   V33: HAUTE-HORLOGERIE PRECISION CHAMPION SHOWCASE + GUARANTEED 18K GOLD 1ST ROW
   ===================================================================== */

/* Replace loud rainbow border with ultra-refined brushed titanium + champagne hairline */
body.theme-liquid-geometry #res-winner-card {
  animation: none !important;
  background: linear-gradient(168deg, rgba(14, 18, 28, 0.96) 0%, rgba(7, 9, 15, 0.99) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-top: 1.5px solid rgba(239, 208, 114, 0.62) !important;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

body.theme-liquid-geometry #res-winner-card::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 45%, rgba(239, 208, 114, 0.04) 100%) !important;
}

body.theme-liquid-geometry .winner-chrono-reticle {
  opacity: 0.42;
}

body.theme-liquid-geometry .winner-chrono-reticle svg circle,
body.theme-liquid-geometry .winner-chrono-reticle svg line,
body.theme-liquid-geometry .winner-chrono-reticle svg path {
  stroke: rgba(239, 208, 114, 0.42) !important;
}

body.theme-liquid-geometry .wp-trophy-strip span,
body.theme-liquid-geometry .wp-trophy-chip {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(239, 208, 114, 0.34) !important;
  color: #f8e7b0 !important;
  letter-spacing: 0.08em;
}

body.theme-liquid-geometry .winner-profile-panel .wp-cell {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 10px;
}

body.theme-liquid-geometry .winner-profile-panel .wp-cell span {
  color: rgba(203, 213, 225, 0.62) !important;
  letter-spacing: 0.14em;
}

/* Guaranteed 18K Brushed Metallic Gold on 1st-Place Finish Row (BOTH NIGHT & DAY MODES!) */
body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first,
body.theme-liquid-geometry #res-finish-board .fin-row.is-first {
  background: linear-gradient(
    118deg,
    #63450b 0%,
    #b68722 26%,
    #ecd074 50%,
    #bd8e27 74%,
    #523807 100%
  ) !important;
  border: 1.5px solid rgba(254, 240, 138, 0.90) !important;
  box-shadow:
    0 10px 26px rgba(146, 102, 16, 0.38),
    inset 0 1.5px 0 rgba(255, 251, 224, 0.86),
    inset 0 -1px 0 rgba(48, 30, 0, 0.42) !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first *,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first * {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(38, 22, 0, 0.78) !important;
}

/* =====================================================================
   V34: REFINED PLATINUM & CHAMPAGNE MOBILE MINI PiP (NIGHT + DAY)
   ===================================================================== */

body.theme-liquid-geometry .mobile-pip-widget {
  animation: none !important;
  background: linear-gradient(155deg, rgba(16, 20, 30, 0.92) 0%, rgba(6, 9, 15, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-top: 1.5px solid rgba(239, 208, 114, 0.62) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

body.theme-liquid-geometry .mpip-cs {
  color: #efd072;
}

body.theme-liquid-geometry[data-theme="day"] .mobile-pip-widget {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.96) 100%) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-top: 1.5px solid rgba(182, 136, 34, 0.65) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16), inset 0 1px 0 #ffffff !important;
}

body.theme-liquid-geometry[data-theme="day"] .mpip-race,
body.theme-liquid-geometry[data-theme="day"] .mpip-main {
  color: #0f172a;
}

body.theme-liquid-geometry[data-theme="day"] .mpip-cs {
  color: #a87c1e;
}

body.theme-liquid-geometry[data-theme="day"] .mpip-close {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.14);
  color: #0f172a;
}


/* =====================================================================
   V35: FRAMELESS HAUTE-HORLOGERIE CHAMPION RESULT + TIMER + CALENDAR + EXCEL SHEET
   ===================================================================== */

/* 1. CHAMPION RESULT — Remove Heavy Nested Box Borders -> Seamless Frameless Glass */
body.theme-liquid-geometry .result-shell {
  border: 0.5px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 26px !important;
  background: linear-gradient(168deg, rgba(10, 14, 22, 0.90) 0%, rgba(5, 8, 14, 0.95) 100%) !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.72) !important;
}

body.theme-liquid-geometry[data-theme="day"] .result-shell {
  border: 0.5px solid rgba(15, 23, 42, 0.08) !important;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.92) 0%, rgba(242, 246, 251, 0.96) 100%) !important;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.14) !important;
}

body.theme-liquid-geometry #res-winner-card {
  border: none !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, rgba(18, 23, 34, 0.76) 0%, rgba(9, 12, 19, 0.92) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 42px rgba(0, 0, 0, 0.42) !important;
  overflow: hidden;
}

body.theme-liquid-geometry .winner-chrono-reticle {
  display: none !important;
}

body.theme-liquid-geometry .winner-profile-panel .wp-grid {
  gap: 0 !important;
  border-top: 0.5px solid rgba(255, 255, 255, 0.10);
  margin-top: 10px;
}

body.theme-liquid-geometry .winner-profile-panel .wp-cell {
  background: transparent !important;
  border: none !important;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 !important;
  padding: 9px 6px !important;
}

body.theme-liquid-geometry .finish-board {
  background: transparent !important;
  border: none !important;
  padding: 2px 0 0 !important;
  box-shadow: none !important;
}

body.theme-liquid-geometry #res-finish-board .fin-row {
  border: none !important;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.035) !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row {
  border: none !important;
  border-bottom: 0.5px solid rgba(15, 23, 42, 0.07) !important;
  background: rgba(255, 255, 255, 0.72) !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first,
body.theme-liquid-geometry #res-finish-board .fin-row.is-first {
  border: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 220, 0.65),
    0 10px 26px rgba(146, 102, 16, 0.30) !important;
}

/* 2. CHRONOGRAPH MODE PILLS (RACE / TIMER / LAP) & INLINE TIMER DOCK */
.chrono-mode-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.cm-pill {
  border: none;
  background: transparent;
  color: rgba(203, 213, 225, 0.72);
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.cm-pill.is-active {
  background: rgba(248, 250, 252, 0.92);
  color: #090c14;
}

.chrono-sub-strip {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 2px;
}

.timer-dock {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.timer-dock.is-hidden,
.timer-presets.is-hidden {
  display: none !important;
}

.timer-presets,
.timer-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.tm-preset,
.tm-set-btn,
.tm-ctrl-btn {
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.tm-preset.is-active,
.tm-ctrl-btn.is-primary {
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  color: #090c14;
  border-color: transparent;
}

.tm-ctrl-btn.is-pip {
  margin-left: auto;
  border-color: rgba(239, 208, 114, 0.48);
  color: #f3d884;
}

.tm-custom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  font-size: 10px;
  color: #cbd5e1;
}

.tm-custom-wrap input {
  width: 34px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  outline: none;
}

/* 3. 5-TAB FLOATING DOCK MOBILE FIT (STRICT SINGLE ROW) */
.floating-dock {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  width: min(94vw, 376px) !important;
  gap: 2px !important;
  padding: 5px 6px !important;
}

.floating-dock .dock-btn {
  min-width: 0 !important;
  width: 100% !important;
  padding: 6px 2px !important;
}

.floating-dock .dock-label {
  font-size: 9px !important;
  letter-spacing: 0.06em;
}

/* 4. CALENDAR VIEW */
.cal-head-acts,
.sheet-head-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-outline-sm {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.cal-card,
.sheet-card {
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(155deg, rgba(16, 22, 34, 0.78) 0%, rgba(8, 12, 20, 0.88) 100%);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.cal-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-month-label {
  font-family: var(--font-thin-geo, 'Chakra Petch', sans-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #f8fafc;
}

.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.78);
  margin-bottom: 6px;
}

.cal-dow-row .is-sun { color: #f87171; }
.cal-dow-row .is-sat { color: #93c5fd; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-cell {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 0.5px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 13px;
  font-weight: 600;
}

.cal-cell.is-empty {
  background: transparent;
  pointer-events: none;
}

.cal-cell.is-sun { color: #fca5a5; }
.cal-cell.is-sat { color: #93c5fd; }
.cal-cell.is-today { border-color: rgba(239, 208, 114, 0.65); }
.cal-cell.is-selected {
  background: rgba(248, 250, 252, 0.92);
  color: #090c14 !important;
  font-weight: 800;
}

.cal-dots {
  display: flex;
  gap: 3px;
  height: 5px;
}

.cal-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.cal-dot.is-g1 { background: #efd072; }
.cal-dot.is-ev { background: #60a5fa; }

.cal-legend {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(203, 213, 225, 0.72);
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cal-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
}

.cal-agenda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border-left: 2px solid rgba(147, 197, 253, 0.65);
}

.cal-agenda-item.is-g1 {
  background: linear-gradient(120deg, rgba(182, 136, 34, 0.24), rgba(255, 255, 255, 0.04));
  border-left-color: #efd072;
}

.cal-agenda-item.is-done {
  opacity: 0.5;
  text-decoration: line-through;
}

.cal-ag-badge {
  padding: 2px 7px;
  border-radius: 6px;
  background: #efd072;
  color: #090c14;
  font-size: 10px;
  font-weight: 900;
}

.cal-ag-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-ag-main strong { font-size: 13px; color: #f8fafc; }
.cal-ag-main span { font-size: 10.5px; color: rgba(203, 213, 225, 0.70); }

.cal-check-btn,
.cal-del-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  cursor: pointer;
}

.cal-empty-msg {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.78);
  padding: 8px 2px;
}

.cal-add-form {
  display: grid;
  grid-template-columns: 78px 66px 1fr auto;
  gap: 6px;
}

.cal-add-form input,
.cal-add-form select,
.cfn-form input {
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.30);
  color: #f8fafc;
  font-size: 12px;
  outline: none;
  min-width: 0;
}

/* 5. EXCEL SPREADSHEET & ORIGINAL FUNCTION STUDIO */
.sheet-fx-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.sheet-cell-addr {
  min-width: 36px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(239, 208, 114, 0.18);
  color: #efd072;
  font-family: var(--font-thin-geo, 'Chakra Petch', sans-serif);
  font-size: 12px;
  font-weight: 700;
}

.sheet-fx-badge {
  font-style: italic;
  font-weight: 700;
  color: #93c5fd;
  font-size: 13px;
}

.sheet-fx-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.34);
  color: #f8fafc;
  font-family: ui-monospace, 'SFMono-Regular', monospace;
  font-size: 12px;
  outline: none;
}

.sheet-fx-apply {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: none;
  background: #f8fafc;
  color: #090c14;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.sheet-fn-chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.fn-chip {
  flex-shrink: 0;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
}

.sheet-table-wrap {
  overflow: auto;
  max-height: 360px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 8, 15, 0.62);
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.sheet-table th {
  position: sticky;
  top: 0;
  background: rgba(18, 24, 38, 0.94);
  color: rgba(203, 213, 225, 0.72);
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.sheet-table th.sh-row-hdr {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 28px;
  text-align: center;
}

.sh-td {
  min-width: 78px;
  padding: 6px 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
  white-space: nowrap;
  cursor: cell;
}

.sh-td.is-hdr {
  font-weight: 700;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.sh-td.is-num { text-align: right; }
.sh-td.is-fx { color: #efd072; font-weight: 700; }
.sh-td.is-sel {
  outline: 1.5px solid #93c5fd;
  outline-offset: -1.5px;
  background: rgba(147, 197, 253, 0.14);
}

.sheet-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sheet-tabs,
.sheet-grid-acts {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.sheet-tab {
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.sheet-tab.is-active {
  background: #f8fafc;
  color: #090c14;
  border-color: transparent;
}

/* Custom Original Function Studio */
.custom-fn-studio.is-hidden { display: none !important; }
.cfn-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cfn-hint { font-size: 11px; color: rgba(203, 213, 225, 0.78); margin: 0 0 10px; line-height: 1.45; }
.cfn-hint code { color: #efd072; }
.cfn-form { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.cfn-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cfn-list { display: flex; flex-direction: column; gap: 6px; }
.cfn-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.10);
}
.cfn-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfn-sig { color: #efd072; font-size: 12px; font-weight: 700; }
.cfn-body-txt { font-size: 10.5px; color: rgba(203, 213, 225, 0.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfn-acts { display: flex; gap: 4px; flex-shrink: 0; }
.cfn-use-btn, .cfn-del-btn {
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}

/* DAY MODE ADAPTATION FOR TIMER, CALENDAR, EXCEL SHEET */
body.theme-liquid-geometry[data-theme="day"] .chrono-mode-pills {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}
body.theme-liquid-geometry[data-theme="day"] .cm-pill { color: #475569; }
body.theme-liquid-geometry[data-theme="day"] .cm-pill.is-active { background: #0f172a; color: #ffffff; }
body.theme-liquid-geometry[data-theme="day"] .tm-preset,
body.theme-liquid-geometry[data-theme="day"] .tm-set-btn,
body.theme-liquid-geometry[data-theme="day"] .tm-ctrl-btn,
body.theme-liquid-geometry[data-theme="day"] .btn-outline-sm,
body.theme-liquid-geometry[data-theme="day"] .fn-chip,
body.theme-liquid-geometry[data-theme="day"] .sheet-tab {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.14);
  color: #0f172a;
}
body.theme-liquid-geometry[data-theme="day"] .tm-preset.is-active,
body.theme-liquid-geometry[data-theme="day"] .tm-ctrl-btn.is-primary,
body.theme-liquid-geometry[data-theme="day"] .sheet-tab.is-active,
body.theme-liquid-geometry[data-theme="day"] .sheet-fx-apply {
  background: #0f172a;
  color: #ffffff;
}
body.theme-liquid-geometry[data-theme="day"] .tm-ctrl-btn.is-pip { color: #9a6f1a; border-color: rgba(154, 111, 26, 0.45); }
body.theme-liquid-geometry[data-theme="day"] .cal-card,
body.theme-liquid-geometry[data-theme="day"] .sheet-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}
body.theme-liquid-geometry[data-theme="day"] .cal-month-label,
body.theme-liquid-geometry[data-theme="day"] .cal-cell,
body.theme-liquid-geometry[data-theme="day"] .cal-ag-main strong,
body.theme-liquid-geometry[data-theme="day"] .sh-td {
  color: #0f172a;
}
body.theme-liquid-geometry[data-theme="day"] .cal-cell { background: rgba(15, 23, 42, 0.03); }
body.theme-liquid-geometry[data-theme="day"] .cal-cell.is-selected { background: #0f172a; color: #ffffff !important; }
body.theme-liquid-geometry[data-theme="day"] .cal-add-form input,
body.theme-liquid-geometry[data-theme="day"] .cal-add-form select,
body.theme-liquid-geometry[data-theme="day"] .sheet-fx-input,
body.theme-liquid-geometry[data-theme="day"] .cfn-form input {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}
body.theme-liquid-geometry[data-theme="day"] .sheet-table-wrap {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.12);
}
body.theme-liquid-geometry[data-theme="day"] .sheet-table th {
  background: #e2e8f0;
  color: #334155;
  border-color: rgba(15, 23, 42, 0.10);
}
body.theme-liquid-geometry[data-theme="day"] .sh-td {
  border-color: rgba(15, 23, 42, 0.08);
}
body.theme-liquid-geometry[data-theme="day"] .sh-td.is-fx { color: #9a6f1a; }


/* =====================================================================
   V36: READABILITY & ALIGNMENT POLISH + STANDALONE PURE TIMER UI
   ===================================================================== */

.chrono-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.chrono-mode-bar .chrono-sub-meta {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.86) !important;
  white-space: nowrap;
}

body.theme-liquid-geometry[data-theme="day"] .chrono-mode-bar .chrono-sub-meta {
  color: rgba(30, 41, 59, 0.86) !important;
}

.glass-top-row.is-hidden,
.chrono-sub-meta.is-hidden,
.tm-ctrl-btn.is-hidden,
.lap-list.is-hidden {
  display: none !important;
}

.timer-setup-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timer-hms-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tm-hms-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.36);
  border: 0.5px solid rgba(255, 255, 255, 0.22);
  color: rgba(226, 232, 240, 0.84);
  font-size: 10.5px;
  font-weight: 700;
}

.tm-hms-box input {
  width: 34px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-thin-geo, 'Chakra Petch', sans-serif);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.tm-hms-sep {
  color: rgba(226, 232, 240, 0.65);
  font-weight: 700;
}

.timer-presets-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.tm-add-btn {
  border: 0.5px solid rgba(147, 197, 253, 0.36);
  background: rgba(147, 197, 253, 0.12);
  color: #dbeafe;
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.lap-list {
  margin-top: 4px;
  max-height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.10);
  padding-top: 6px;
}

.lap-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-thin-geo, 'Chakra Petch', sans-serif);
  font-size: 12px;
  color: #e2e8f0;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

/* Global Contrast & Legibility Boost (NIGHT & DAY) */
body.theme-liquid-geometry[data-theme="night"] .geo-node span,
body.theme-liquid-geometry[data-theme="night"] .coord-mono,
body.theme-liquid-geometry[data-theme="night"] .row-code,
body.theme-liquid-geometry[data-theme="night"] .sub-label {
  color: rgba(226, 232, 240, 0.82) !important;
}

body.theme-liquid-geometry[data-theme="night"] .geo-node strong,
body.theme-liquid-geometry[data-theme="night"] .hero-race-title,
body.theme-liquid-geometry[data-theme="night"] .view-title {
  color: #ffffff !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

body.theme-liquid-geometry[data-theme="day"] .tm-hms-box {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(15, 23, 42, 0.16);
  color: #334155;
}

body.theme-liquid-geometry[data-theme="day"] .tm-hms-box input {
  color: #0f172a;
}

body.theme-liquid-geometry[data-theme="day"] .tm-add-btn {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

body.theme-liquid-geometry[data-theme="day"] .lap-row {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.05);
}

body.theme-liquid-geometry .cal-add-form {
  grid-template-columns: 74px 62px minmax(0, 1fr) auto;
}


/* =====================================================================
   V38: QUIET-LUXURY CHAMPAGNE GOLD RESULT + PROMINENT SIMPLE TIMER ACCESS
   ===================================================================== */

/* 1. Replace Cheap Shiny Yellow Gold with Haute-Horlogerie Satin Champagne & Obsidian */
body.theme-liquid-geometry .wp-first-badge {
  background: rgba(20, 17, 12, 0.92) !important;
  border: 0.75px solid rgba(212, 184, 118, 0.58) !important;
  color: #e5cb8d !important;
  letter-spacing: 0.14em !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first,
body.theme-liquid-geometry #res-finish-board .fin-row.is-first {
  background: linear-gradient(135deg, rgba(36, 30, 20, 0.94) 0%, rgba(16, 14, 11, 0.98) 100%) !important;
  border: 0.5px solid rgba(212, 184, 118, 0.34) !important;
  border-left: 3px solid #d4b876 !important;
  box-shadow:
    inset 0 1px 0 rgba(229, 203, 141, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.44) !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first *,
body.theme-liquid-geometry #res-finish-board .fin-row.is-first * {
  color: #f8fafc !important;
  text-shadow: none !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-rank,
body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-time,
body.theme-liquid-geometry #res-finish-board .fin-row.is-first .fin-rank,
body.theme-liquid-geometry #res-finish-board .fin-row.is-first .fin-time {
  color: #e5cb8d !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-jockey,
body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-margin {
  color: rgba(226, 232, 240, 0.72) !important;
}

/* DAY MODE: Warm Champagne Silk 1st-Place Row (Zero Cheap Yellow) */
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first {
  background: linear-gradient(135deg, #fbf8f1 0%, #f1e8d4 100%) !important;
  border: 0.5px solid rgba(154, 123, 56, 0.32) !important;
  border-left: 3px solid #9a7b38 !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first * {
  color: #1c1914 !important;
  text-shadow: none !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-rank,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-time {
  color: #8c6b26 !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-jockey,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-margin {
  color: #575043 !important;
}

/* Also refine RESULT button on Home from loud yellow to satin champagne titanium */
body.theme-liquid-geometry .tac-key.is-gold {
  background: linear-gradient(160deg, rgba(46, 38, 24, 0.92) 0%, rgba(22, 19, 14, 0.96) 100%) !important;
  border: 0.75px solid rgba(212, 184, 118, 0.46) !important;
  color: #e5cb8d !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(229, 203, 141, 0.24) !important;
}

body.theme-liquid-geometry .tac-key.is-gold .key-svg,
body.theme-liquid-geometry .tac-key.is-gold .key-lbl {
  color: #e5cb8d !important;
  stroke: #e5cb8d !important;
}

body.theme-liquid-geometry[data-theme="day"] .tac-key.is-gold {
  background: linear-gradient(160deg, #faf6ec 0%, #efe6d0 100%) !important;
  border: 0.75px solid rgba(154, 123, 56, 0.36) !important;
  color: #7c5e1f !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08), inset 0 1px 0 #ffffff !important;
}

body.theme-liquid-geometry[data-theme="day"] .tac-key.is-gold .key-svg,
body.theme-liquid-geometry[data-theme="day"] .tac-key.is-gold .key-lbl {
  color: #7c5e1f !important;
  stroke: #7c5e1f !important;
}

/* 2. Prominent Simple Timer Header Pill & Full-Width Segmented Mode Bar */
.quick-timer-pill {
  border-color: rgba(212, 184, 118, 0.42) !important;
  color: #e5cb8d !important;
}

body.theme-liquid-geometry[data-theme="day"] .quick-timer-pill {
  border-color: rgba(154, 123, 56, 0.38) !important;
  color: #7c5e1f !important;
}

.chrono-mode-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 8px;
}

.chrono-mode-pills {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  padding: 3px;
}

.cm-pill {
  padding: 6px 8px;
  font-size: 11px;
  text-align: center;
}

.chrono-mode-bar .chrono-sub-meta {
  align-self: flex-end;
}


/* =====================================================================
   V39: DAY-FIRST CLARITY + CLEAR 3-ROW TIMER UI + UNIFIED PiP BUTTON TONE
   ===================================================================== */

.timer-hms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 6px;
  align-items: stretch;
}

.tm-hms-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  gap: 2px;
}

.tm-hms-card span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(203, 213, 225, 0.78);
}

.tm-hms-card input {
  width: 100%;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-thin-geo, 'Chakra Petch', sans-serif);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.timer-hms-grid .tm-set-btn {
  padding: 0 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.timer-controls {
  display: grid !important;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 6px !important;
}

.timer-controls .tm-ctrl-btn {
  height: 38px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0 !important;
}

/* Unified Tonmana for PiP Button (No Awkward Yellow Border) */
.tm-ctrl-btn.is-pip {
  background: rgba(255, 255, 255, 0.10) !important;
  border: 0.75px solid rgba(226, 232, 240, 0.30) !important;
  color: #f8fafc !important;
}

body.theme-liquid-geometry[data-theme="day"] .tm-hms-card {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(15, 23, 42, 0.14);
}

body.theme-liquid-geometry[data-theme="day"] .tm-hms-card span {
  color: #64748b;
}

body.theme-liquid-geometry[data-theme="day"] .tm-hms-card input {
  color: #0f172a;
}

body.theme-liquid-geometry[data-theme="day"] .tm-ctrl-btn.is-pip {
  background: rgba(15, 23, 42, 0.08) !important;
  border: 0.75px solid rgba(15, 23, 42, 0.22) !important;
  color: #0f172a !important;
}

body.theme-liquid-geometry[data-theme="day"] .quick-timer-pill {
  background: rgba(255, 255, 255, 0.86) !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}


/* =====================================================================
   V40: CHAMPION 1ST-PLACE HIGH-CONTRAST TYPOGRAPHY + PIXEL-PERFECT TIMER ALIGNMENT
   ===================================================================== */

/* 1. Champion 1st-Place Row & Winner Header — Editorial Horology Typography + Guaranteed Contrast */
body.theme-liquid-geometry .wp-name {
  font-family: 'Chakra Petch', 'Rajdhani', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
}

body.theme-liquid-geometry .wp-jp {
  font-family: 'Zen Kaku Gothic New', sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
}

body.theme-liquid-geometry #res-finish-board .fin-row.is-first .fin-rank {
  font-family: 'Chakra Petch', sans-serif !important;
  font-weight: 700 !important;
  font-size: 19px !important;
  font-variant-numeric: tabular-nums;
}

body.theme-liquid-geometry #res-finish-board .fin-row.is-first .fin-horse {
  font-family: 'Zen Kaku Gothic New', sans-serif !important;
  font-weight: 900 !important;
  font-size: 15.5px !important;
  letter-spacing: 0.05em !important;
}

body.theme-liquid-geometry #res-finish-board .fin-row.is-first .fin-time {
  font-family: 'Chakra Petch', 'Rajdhani', sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 0.06em !important;
  font-variant-numeric: tabular-nums;
}

/* DAY MODE: Ultra-Crisp Ink Contrast on Warm Champagne Silk 1st-Place Row */
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first {
  background: linear-gradient(135deg, #fbf7ee 0%, #efe5cc 100%) !important;
  border: 0.75px solid rgba(138, 101, 24, 0.36) !important;
  border-left: 4px solid #8a6518 !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-horse,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-time {
  color: #090b10 !important;
  text-shadow: none !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-rank {
  color: #5c4008 !important;
  text-shadow: none !important;
}

body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-jockey,
body.theme-liquid-geometry[data-theme="day"] #res-finish-board .fin-row.is-first .fin-margin {
  color: #2f2920 !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

/* NIGHT MODE: Crisp Pure White & Bright Champagne Contrast on Deep Obsidian 1st-Place Row */
body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first {
  background: linear-gradient(135deg, rgba(36, 30, 19, 0.96) 0%, rgba(14, 12, 9, 0.99) 100%) !important;
  border: 0.75px solid rgba(229, 200, 120, 0.42) !important;
  border-left: 4px solid #e5c878 !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-horse,
body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-time {
  color: #ffffff !important;
  text-shadow: none !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-rank {
  color: #f5dfa0 !important;
  text-shadow: none !important;
}

body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-jockey,
body.theme-liquid-geometry[data-theme="night"] #res-finish-board .fin-row.is-first .fin-margin {
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  text-shadow: none !important;
}

/* 2. Pixel-Perfect Timer Number & Button Center Alignment (Kill Hidden Number Spinners!) */
.tm-hms-card input[type="number"] {
  -webkit-appearance: none !important;
  -moz-appearance: textfield !important;
  appearance: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.15 !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums !important;
}

.tm-hms-card input[type="number"]::-webkit-inner-spin-button,
.tm-hms-card input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.tm-hms-card span {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1.1;
}

.timer-presets-row {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px !important;
}

.timer-presets-row .tm-preset,
.timer-presets-row .tm-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 2px !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.timer-hms-grid .tm-set-btn,
.timer-controls .tm-ctrl-btn {
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.countdown-readout {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 2px;
}


/* =====================================================================
   V41: MOBILE-PERFECT CALENDAR + ZERO-WRAP TIMER + LIVE LENS COLOR & AUTO SILK
   ===================================================================== */

/* 1. LENS COLOR AURA & RIM — Clearly Visible on Manual Color Select & 12-Palette AUTO Mode */
body.theme-liquid-geometry .geo-silk-aura {
  background: radial-gradient(
    circle,
    rgba(var(--accent-rgb, 14, 165, 233), 0.42),
    rgba(var(--accent2-rgb, 99, 102, 241), 0.22) 56%,
    transparent 74%
  ) !important;
  transition: background 0.55s ease;
}

body.theme-liquid-geometry .geo-lens-portal {
  box-shadow:
    0 20px 48px rgba(var(--accent-rgb, 14, 165, 233), 0.28),
    0 0 0 2px rgba(var(--accent-rgb, 14, 165, 233), 0.72),
    inset 0 2px 14px rgba(255, 255, 255, 0.42) !important;
  transition: box-shadow 0.45s ease !important;
}

body.theme-liquid-geometry #dial-progress-arc {
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb, 14, 165, 233), 0.55));
}

/* 2. TIMER — Strictly Zero Awkward Line-Breaks & Single-Row Action Bar (3 or 4 Buttons) */
.timer-controls {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  width: 100%;
}

.timer-controls .tm-ctrl-btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap !important;
  word-break: keep-all !important;
  padding: 0 6px !important;
  font-size: 11.5px !important;
}

.timer-controls .tm-ctrl-btn.is-primary {
  flex: 1.35 1 0;
}

.timer-hms-grid .tm-set-btn,
.tm-hms-card span,
.cm-pill,
.chrono-sub-meta {
  white-space: nowrap !important;
  word-break: keep-all !important;
}

/* 3. CALENDAR — Mobile-Clean Typography, High Contrast (DAY & NIGHT), 2-Row Form, Monthly Graded Strip */
.cal-nav-bar .cal-month-label {
  line-height: 1;
  white-space: nowrap;
}

.cal-dow-row span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  line-height: 1;
}

.cal-cell {
  padding: 2px 0;
  line-height: 1;
}

.cal-day-num {
  display: block;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cal-dot.is-g2 {
  background: #0d9488;
}

.cal-month-races {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cal-race-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
}

.cal-race-pill.is-g1 {
  border-color: rgba(212, 184, 118, 0.48);
  background: rgba(182, 136, 34, 0.18);
  color: #f8e7b0;
}

.crp-day {
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-weight: 700;
  opacity: 0.78;
}

.crp-grade {
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(13, 148, 136, 0.28);
  color: #5eead4;
}

.cal-race-pill.is-g1 .crp-grade {
  background: #d4b876;
  color: #14110b;
}

.crp-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-agenda-item.is-g2 {
  border-left-color: #0d9488;
}

.cal-ag-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.cal-ag-badge.is-g2 {
  background: #0d9488;
  color: #ffffff;
}

.cal-ag-main strong {
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.cal-ag-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cal-cat-pill {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  border: 0.5px solid transparent;
  white-space: nowrap;
}

/* 2-Row Mobile-Perfect Add Event Form (Zero Squishing or Wrapping!) */
body.theme-liquid-geometry .cal-add-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.cal-form-row1 {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 6px;
}

.cal-form-row2 {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.cal-add-form input,
.cal-add-form select {
  height: 36px !important;
  font-size: 12.5px !important;
  font-weight: 600;
}

.cal-form-row2 .btn-dark-sm {
  height: 36px;
  padding: 0 16px;
  white-space: nowrap;
}

/* DAY MODE: High-Contrast Calendar Text & Chips */
body.theme-liquid-geometry[data-theme="day"] .cal-dow-row { color: #475569; }
body.theme-liquid-geometry[data-theme="day"] .cal-dow-row .is-sun,
body.theme-liquid-geometry[data-theme="day"] .cal-cell.is-sun { color: #dc2626; }
body.theme-liquid-geometry[data-theme="day"] .cal-dow-row .is-sat,
body.theme-liquid-geometry[data-theme="day"] .cal-cell.is-sat { color: #2563eb; }
body.theme-liquid-geometry[data-theme="day"] .cal-legend,
body.theme-liquid-geometry[data-theme="day"] .cal-ag-main span,
body.theme-liquid-geometry[data-theme="day"] .cal-empty-msg {
  color: #334155 !important;
}
body.theme-liquid-geometry[data-theme="day"] .cal-agenda-item {
  background: rgba(15, 23, 42, 0.045);
}
body.theme-liquid-geometry[data-theme="day"] .cal-agenda-item.is-g1 {
  background: linear-gradient(120deg, #faf5e8 0%, #f1e6cc 100%);
  border-left-color: #8a6518;
}
body.theme-liquid-geometry[data-theme="day"] .cal-ag-badge {
  background: #8a6518;
  color: #ffffff;
}
body.theme-liquid-geometry[data-theme="day"] .cal-ag-badge.is-g2 {
  background: #0f766e;
  color: #ffffff;
}
body.theme-liquid-geometry[data-theme="day"] .cal-race-pill {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
body.theme-liquid-geometry[data-theme="day"] .cal-race-pill.is-g1 {
  background: #faf5e8;
  border-color: rgba(138, 101, 24, 0.38);
  color: #4a3408;
}
body.theme-liquid-geometry[data-theme="day"] .crp-grade {
  background: rgba(15, 118, 110, 0.14);
  color: #0f766e;
}
body.theme-liquid-geometry[data-theme="day"] .cal-race-pill.is-g1 .crp-grade {
  background: #8a6518;
  color: #ffffff;
}
body.theme-liquid-geometry[data-theme="day"] .cal-check-btn,
body.theme-liquid-geometry[data-theme="day"] .cal-del-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}


/* =====================================================================
   V42: CHIC FRAMELESS HAIRLINE MONTHLY GRADED RACE LIST (NO CHEAP PILLS)
   ===================================================================== */

.cal-month-races {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin-top: 8px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
}

.cal-race-pill {
  display: grid !important;
  grid-template-columns: 44px 36px 1fr;
  align-items: center;
  gap: 8px !important;
  width: 100%;
  padding: 10px 8px !important;
  border: none !important;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left;
  transition: background 0.16s ease;
}

.cal-race-pill:active {
  background: rgba(255, 255, 255, 0.05) !important;
}

.cal-race-pill.is-g1 {
  background: linear-gradient(90deg, rgba(212, 184, 118, 0.10) 0%, transparent 72%) !important;
  border-left: 2px solid #d4b876 !important;
  color: #f8fafc !important;
}

.cal-race-pill .crp-day {
  opacity: 0.68;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.cal-race-pill .crp-grade {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.85) !important;
}

.cal-race-pill.is-g1 .crp-grade {
  background: transparent !important;
  color: #e5cb8d !important;
}

.cal-race-pill .crp-name {
  font-size: 12.5px;
  color: #f1f5f9;
}

/* DAY MODE: Ultra-Refined Chic Hairline Schedule */
body.theme-liquid-geometry[data-theme="day"] .cal-month-races {
  border-top-color: rgba(15, 23, 42, 0.10);
}

body.theme-liquid-geometry[data-theme="day"] .cal-race-pill {
  background: transparent !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

body.theme-liquid-geometry[data-theme="day"] .cal-race-pill:active {
  background: rgba(15, 23, 42, 0.04) !important;
}

body.theme-liquid-geometry[data-theme="day"] .cal-race-pill.is-g1 {
  background: linear-gradient(90deg, rgba(138, 101, 24, 0.07) 0%, transparent 76%) !important;
  border-left: 2px solid #8a6518 !important;
}

body.theme-liquid-geometry[data-theme="day"] .cal-race-pill .crp-day {
  color: #475569 !important;
  opacity: 1;
}

body.theme-liquid-geometry[data-theme="day"] .cal-race-pill .crp-grade {
  color: #64748b !important;
}

body.theme-liquid-geometry[data-theme="day"] .cal-race-pill.is-g1 .crp-grade {
  color: #8a6518 !important;
}

body.theme-liquid-geometry[data-theme="day"] .cal-race-pill .crp-name {
  color: #090b10 !important;
}


/* V43: Pixel-Perfect Vertical Centering on Calendar Category Select & Time Input */
.cal-add-form select#cal-ev-cat {
  appearance: none !important;
  -webkit-appearance: none !important;
  height: 36px !important;
  line-height: 34px !important;
  padding: 0 30px 0 12px !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 12px 12px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
}

body.theme-liquid-geometry[data-theme="day"] .cal-add-form select#cal-ev-cat {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
}

.cal-add-form input#cal-ev-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 36px !important;
  line-height: 34px !important;
  padding: 0 8px !important;
}


/* =====================================================================
   V44: iOS SAFARI TRUE-CIRCLE LENS FIX + 1-LINE HEADER + G1-ONLY GATE & RESULT
   ===================================================================== */

/* 1. Kill Legacy Radial Fade Mask & Enforce Hardware-Clipped True Circle on iOS Safari */
.geo-lens-portal {
  border-radius: 50% !important;
  overflow: hidden !important;
  clip-path: circle(50% at 50% 50%) !important;
  -webkit-clip-path: circle(50% at 50% 50%) !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  isolation: isolate;
}

.geo-lens-portal .cast-portal {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  clip-path: circle(50% at 50% 50%) !important;
  -webkit-clip-path: circle(50% at 50% 50%) !important;
}

.geo-lens-portal .cast-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* 2. Keep iPhone Header Strictly Single-Line (No "TURF / CLOCK" Wrapping) */
.top-bar {
  padding-left: 10px !important;
  padding-right: 10px !important;
  gap: 6px !important;
}

.brand-btn {
  gap: 6px !important;
  flex-shrink: 0;
}

.brand-name {
  white-space: nowrap !important;
  font-size: clamp(11px, 3.1vw, 13.5px) !important;
  letter-spacing: 0.08em !important;
}

.status-cluster {
  gap: 5px !important;
  flex-shrink: 0;
}

.theme-toggle-pill,
.source-pill {
  padding: 0 7px !important;
  font-size: 9.5px !important;
  height: 26px !important;
  white-space: nowrap !important;
}

.jst-readout {
  font-size: 11px !important;
  white-space: nowrap !important;
}

/* 3. Non-G1 Races: Pure Liquid Mercury Backdrop + Giant Chronograph Only */
.gate-overlay.is-chrono-only {
  background: rgba(6, 9, 16, 0.42) !important;
  backdrop-filter: blur(8px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(140%) !important;
}

body[data-theme="day"] .gate-overlay.is-chrono-only {
  background: rgba(15, 23, 42, 0.56) !important;
}

.gate-overlay.is-chrono-only .gate-photo-fill,
.gate-overlay.is-chrono-only .gate-hero-photo,
.gate-overlay.is-chrono-only .gate-jc-video,
.gate-overlay.is-chrono-only .gate-champion-plate,
.gate-overlay.is-chrono-only .gate-cam-pill {
  display: none !important;
}

/* 4. Non-G1 Races: Hide RESULT Button & Rebalance Action Row to 4 Equal Keys */
.tac-key.is-hidden {
  display: none !important;
}

.key-grid-5.is-4cols {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}


/* =====================================================================
   V47: OPTICAL SPHERICAL CRYSTAL LENS DOME + UNIFIED HD MOBILE PiP
   ===================================================================== */

/* 1. Multi-Layer Optical Crystal Sphere Shading (Eliminates Flat Cutout Look & Unifies Tonmana!) */
.geo-lens-portal .cast-img {
  filter: contrast(1.04) saturate(1.05);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.theme-liquid-geometry[data-theme="day"] .geo-lens-portal .cast-img {
  filter: contrast(1.03) saturate(1.02) brightness(1.01);
}

body.theme-liquid-geometry .geo-lens-glint {
  background:
    /* Upper-left convex sapphire dome specular highlight */
    radial-gradient(64% 38% at 32% 16%, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0.14) 42%, transparent 72%),
    /* Soft secondary top-right studio rim glint */
    radial-gradient(36% 24% at 74% 22%, rgba(255, 255, 255, 0.18) 0%, transparent 70%),
    /* Lower-edge subtle transmitted glass caustics bounce */
    radial-gradient(58% 26% at 50% 92%, rgba(255, 255, 255, 0.24) 0%, rgba(var(--accent-rgb, 14, 165, 233), 0.12) 48%, transparent 78%),
    /* Physical spherical curvature rim shadow + internal refraction ring */
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(8, 12, 22, 0.22) 78%, rgba(4, 7, 15, 0.56) 95%, rgba(255, 255, 255, 0.28) 100%) !important;
  box-shadow:
    inset 0 2px 10px rgba(255, 255, 255, 0.42),
    inset 0 -10px 22px rgba(6, 10, 20, 0.42),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.26) !important;
}

body.theme-liquid-geometry[data-theme="day"] .geo-lens-glint {
  background:
    radial-gradient(64% 38% at 32% 16%, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.18) 44%, transparent 72%),
    radial-gradient(58% 26% at 50% 93%, rgba(255, 255, 255, 0.36) 0%, rgba(226, 232, 240, 0.16) 52%, transparent 80%),
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(15, 23, 42, 0.14) 80%, rgba(15, 23, 42, 0.34) 95%, rgba(255, 255, 255, 0.62) 100%) !important;
  box-shadow:
    inset 0 3px 12px rgba(255, 255, 255, 0.68),
    inset 0 -8px 18px rgba(15, 23, 42, 0.20),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.72) !important;
}

/* 2. Mobile HD PiP Widget — 100% Identical 16:9 Canvas Design to PC HD PiP */
body.theme-liquid-geometry .mobile-pip-widget {
  width: min(88vw, 336px) !important;
  aspect-ratio: 16 / 9;
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  gap: 0 !important;
  display: block;
}

body.theme-liquid-geometry .mobile-pip-widget.is-hidden {
  display: none !important;
}

.mpip-hd-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 15px;
}

.mobile-pip-widget .mpip-close {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  border: 0.5px solid rgba(255, 255, 255, 0.32);
  font-size: 14px;
  line-height: 1;
}


/* =====================================================================
   V48: REALISTIC CRYSTAL GLASS ORB (CONVEX SAPPHIRE SPHERE) TEXTURE
   ===================================================================== */

body.theme-liquid-geometry .geo-lens-glint {
  overflow: hidden;
  background:
    /* Subtle radial curvature shading (clear center -> physical glass thickness near edge) */
    radial-gradient(circle at 50% 48%,
      transparent 54%,
      rgba(15, 23, 42, 0.08) 70%,
      rgba(10, 16, 30, 0.28) 84%,
      rgba(4, 8, 18, 0.56) 94%,
      rgba(255, 255, 255, 0.42) 98%,
      rgba(255, 255, 255, 0.72) 100%) !important;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.78),
    inset 0 10px 24px rgba(255, 255, 255, 0.24),
    inset 0 -14px 26px rgba(6, 10, 22, 0.44),
    inset 0 0 0 2px rgba(255, 255, 255, 0.34),
    inset 0 0 0 5px rgba(255, 255, 255, 0.08) !important;
}

/* Crisp Glossy Crescent Specular Reflection on Upper-Left Glass Dome */
body.theme-liquid-geometry .geo-lens-glint::before {
  content: '';
  position: absolute;
  top: 4.5%;
  left: 14%;
  width: 66%;
  height: 34%;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.74) 0%,
    rgba(255, 255, 255, 0.26) 44%,
    rgba(255, 255, 255, 0.0) 86%
  );
  transform: rotate(-16deg);
  filter: blur(1.2px);
  pointer-events: none;
}

/* Transmitted Crystal Caustics Glow & Glass Rim Refraction on Lower Dome */
body.theme-liquid-geometry .geo-lens-glint::after {
  content: '';
  position: absolute;
  bottom: 3.5%;
  left: 16%;
  width: 68%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 82%,
    rgba(255, 255, 255, 0.62) 0%,
    rgba(var(--accent-rgb, 14, 165, 233), 0.26) 46%,
    transparent 78%
  );
  filter: blur(2.5px);
  pointer-events: none;
}

/* DAY MODE: Pure Clear Crystal Glass Orb */
body.theme-liquid-geometry[data-theme="day"] .geo-lens-glint {
  background:
    radial-gradient(circle at 50% 48%,
      transparent 56%,
      rgba(15, 23, 42, 0.05) 72%,
      rgba(15, 23, 42, 0.16) 86%,
      rgba(15, 23, 42, 0.32) 94%,
      rgba(255, 255, 255, 0.75) 98%,
      rgba(255, 255, 255, 0.96) 100%) !important;
  box-shadow:
    inset 0 3px 8px rgba(255, 255, 255, 0.92),
    inset 0 12px 26px rgba(255, 255, 255, 0.34),
    inset 0 -10px 22px rgba(15, 23, 42, 0.18),
    inset 0 0 0 2px rgba(255, 255, 255, 0.80),
    inset 0 0 0 6px rgba(255, 255, 255, 0.16) !important;
}

body.theme-liquid-geometry[data-theme="day"] .geo-lens-glint::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(255, 255, 255, 0.32) 45%,
    rgba(255, 255, 255, 0.0) 86%
  );
}


/* =====================================================================
   V49: RAZOR-SHARP GLASS ORB EDGE (ELIMINATE OUTER HALO BLUR / DOUBLE RIM)
   ===================================================================== */

body.theme-liquid-geometry .geo-silk-aura {
  inset: 18% !important;
  opacity: 0.42 !important;
  filter: blur(20px) !important;
}

body.theme-liquid-geometry .geo-lens-portal {
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(var(--accent-rgb, 14, 165, 233), 0.58) !important;
}

body.theme-liquid-geometry[data-theme="day"] .geo-lens-portal {
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(15, 23, 42, 0.20) !important;
}

body.theme-liquid-geometry .geo-lens-glint {
  background:
    radial-gradient(circle at 50% 48%,
      transparent 60%,
      rgba(10, 16, 30, 0.14) 78%,
      rgba(4, 8, 18, 0.42) 96%,
      rgba(4, 8, 18, 0.52) 100%) !important;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.65),
    inset 0 -8px 16px rgba(6, 10, 22, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.36) !important;
}

body.theme-liquid-geometry[data-theme="day"] .geo-lens-glint {
  background:
    radial-gradient(circle at 50% 48%,
      transparent 62%,
      rgba(15, 23, 42, 0.08) 80%,
      rgba(15, 23, 42, 0.24) 96%,
      rgba(15, 23, 42, 0.30) 100%) !important;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.85),
    inset 0 -6px 14px rgba(15, 23, 42, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72) !important;
}


/* =====================================================================
   V50: EXACT 16.8% SVG-BEZEL MATCH (r=166) + CENTERED CRYSTAL DOME GLINT
   ===================================================================== */

body.theme-liquid-geometry .geo-lens-portal {
  inset: 16.8% !important;
}

body.theme-liquid-geometry .geo-lens-glint::before {
  top: 3%;
  left: 18%;
  width: 64%;
  height: 24%;
  transform: none !important;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.52) 0%,
    rgba(255, 255, 255, 0.16) 48%,
    rgba(255, 255, 255, 0.0) 88%
  ) !important;
  filter: blur(1.5px);
}

body.theme-liquid-geometry[data-theme="day"] .geo-lens-glint::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.62) 0%,
    rgba(255, 255, 255, 0.20) 48%,
    rgba(255, 255, 255, 0.0) 88%
  ) !important;
}


/* =====================================================================
   V51: BALANCED GOLDEN-RATIO PC DESKTOP 2-COLUMN COCKPIT (ZERO OVERLAP!)
   ===================================================================== */

@media (min-width: 960px) {
  .app-shell {
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding-bottom: 104px !important;
  }

  .hero-cockpit {
    display: grid !important;
    grid-template-columns: minmax(410px, 460px) minmax(440px, 540px) !important;
    grid-template-rows: auto auto !important;
    justify-content: center !important;
    align-items: start !important;
    column-gap: 44px !important;
    row-gap: 16px !important;
    max-width: 1080px !important;
    margin: 12px auto 0 !important;
  }

  /* Flatten .dial-stage into grid so Left=Chronograph+CastDock, Right=Readout+Controls! */
  .hero-cockpit > .dial-stage {
    display: contents !important;
  }

  .hero-cockpit .geo-chronograph {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    width: min(440px, 52vh) !important;
    margin: 0 auto !important;
    align-self: center !important;
  }

  .hero-cockpit .cast-caption-bar {
    grid-column: 1 !important;
    grid-row: 3 !important;
    margin: 2px auto 0 !important;
    width: fit-content !important;
  }

  .hero-cockpit .liquid-glass-bar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 540px !important;
    margin: 0 !important;
  }

  .hero-cockpit .cockpit-panel {
    grid-column: 2 !important;
    grid-row: 2 / span 2 !important;
    width: 100% !important;
    max-width: 540px !important;
    margin: 0 !important;
    align-self: start !important;
  }
}


/* =====================================================================
   V53: VISIBLE SAFARI-NATIVE HD PiP VIDEO PLAYER (MAC & IPHONE SAFARI)
   ===================================================================== */

body.theme-liquid-geometry .mobile-pip-widget {
  width: min(90vw, 360px) !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.mpip-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(10, 14, 24, 0.92);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.14);
  cursor: grab;
  user-select: none;
}

body.theme-liquid-geometry[data-theme="day"] .mpip-bar {
  background: rgba(244, 247, 251, 0.96);
  border-bottom-color: rgba(15, 23, 42, 0.10);
}

.mpip-bar-title {
  font-family: var(--font-thin-geo, 'Rajdhani', sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #e2e8f0;
}

body.theme-liquid-geometry[data-theme="day"] .mpip-bar-title {
  color: #0f172a;
}

.mpip-bar-acts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mpip-native-btn {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: none;
  background: #f8fafc;
  color: #090c14;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

body.theme-liquid-geometry[data-theme="day"] .mpip-native-btn {
  background: #0f172a;
  color: #ffffff;
}

.mobile-pip-widget .mpip-close {
  position: static !important;
  width: 24px;
  height: 24px;
}

.mpip-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070d;
}

.mpip-hd-video,
.mpip-hd-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
}

.mpip-hd-video.is-hidden,
.mpip-hd-canvas.is-hidden {
  display: none !important;
}
