/* Relic Architect V2.0 — Samsung S24 Ultra timetable */

:root {
  --bg: #0b0216;
  --container: #1b0a2a;
  --container-deep: #12051d;
  --cell: #150724;
  --gold: #ff8c00;
  --complete: #0c6b32;
  --cite: #d8b4fe;
  --text: #f6eefe;
  --muted: #cbb6e4;
  --touch: 44px;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.35;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}

button, a, input, label {
  touch-action: manipulation;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 8px calc(16px + env(safe-area-inset-bottom));
}

.card {
  position: relative;
  background: var(--container-deep);
  border: 1px solid rgba(216, 180, 254, 0.28);
  border-radius: 16px;
  overflow: hidden;
}

.card > :not(.ambient-field) {
  position: relative;
  z-index: 1;
}

/* The header must not trap the hamburger. Its z-index lives above the drawer. */
.card > .header {
  z-index: auto;
}

.header {
  position: relative;
  background: transparent;
  text-align: left;
  padding: 10px 12px 6px;
}

.brand-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.nav-toggle {
  position: relative;
  z-index: 1200;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  transform: rotate(0deg);
  transform-origin: center center;
  transition: transform 0.32s ease;
}

.nav-toggle-bars span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  transform: rotate(90deg);
}

.brand-main {
  min-width: 0;
  flex: 1 1 auto;
  padding-top: 2px;
}

.nexus-mark {
  margin: 0;
  color: #ff8c00;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.2;
}

.brand-main h1,
.brand-lockup h2 {
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px solid rgba(216, 180, 254, 0.35);
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 1.42rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 800;
}

.schedule-mode {
  margin: 6px 0 0;
  color: #d8b4fe;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

body.is-food .schedule-mode,
body.is-hub .schedule-mode {
  display: none;
}

/* Hub header: hamburger and clock stay on the top row; the title block is centred under them. */
body.is-hub .brand-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "toggle spacer clock"
    "title title title";
  align-items: center;
  column-gap: 8px;
}

body.is-hub .nav-toggle {
  grid-area: toggle;
}

body.is-hub .header-corner {
  grid-area: clock;
  max-width: none;
}

body.is-hub .brand-main {
  grid-area: title;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  padding-top: 2px;
  text-align: center;
}

body.is-hub .card > .ambient-field {
  display: none;
}

.header-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex: 0 0 auto;
  max-width: 42%;
  padding-top: 1px;
  text-align: right;
}

.sync-dot {
  position: relative;
  width: 14px;
  height: 14px;
  margin: 0 0 3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(255, 140, 0, 0.55);
  flex: 0 0 auto;
}

.sync-dot.is-busy {
  background: conic-gradient(from 0deg, rgba(255, 140, 0, 0.2), var(--gold) 40%, rgba(255, 140, 0, 0.2) 64%, rgba(255, 140, 0, 0.2));
  box-shadow: none;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: sync-ring 0.75s linear infinite, sync-fade 1.15s ease-in-out infinite;
}

.sync-dot.is-error {
  background: #ffb4a8;
  box-shadow: 0 0 6px rgba(255, 180, 168, 0.75);
  -webkit-mask: none;
  mask: none;
  animation: none;
}

@keyframes sync-ring {
  to { transform: rotate(360deg); }
}

@keyframes sync-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.corner-today {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.corner-today strong {
  color: var(--text);
  font-weight: 800;
}

.corner-clock {
  margin: 0;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.live-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px 0;
  background: rgba(18, 5, 29, 0.72);
  text-align: center;
}

.identity {
  margin: 0;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.blurb {
  margin: 0;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.week-meta, .storage-note, .who {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.banner {
  margin: 0;
  padding: 10px 12px;
  background: #241036;
  color: var(--text);
  font-size: 0.78rem;
  text-align: center;
}

.banner.coach { color: var(--gold); }
.banner.warn { color: var(--cite); }
.banner.warn.is-error { color: #ffb4a8; background: #3a1020; }

.phase-bar, .month-bar, .week-tabs {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: rgba(18, 5, 29, 0.72);
}

.phase-bar { grid-template-columns: 1fr 1fr; }
.live-stack + .phase-bar { padding-top: 6px; }
.month-bar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.month-bar[data-branch="bridge"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mbtn[hidden] { display: none !important; }
.week-tabs { grid-template-columns: 1fr 1fr; }

.phase {
  min-height: var(--touch);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: rgba(21, 7, 36, 0.88);
  text-align: center;
}

.phase.is-active {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.ph-label {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.phase.is-active .ph-label { color: var(--gold); }

.ph-range {
  color: var(--muted);
  font-size: 0.64rem;
}

.mbtn, .wtab, .mode-btn, .player-ctrl, .player-close, .start-gate {
  min-height: var(--touch);
  min-width: var(--touch);
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: rgba(21, 7, 36, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 6px 4px;
}

.wtab {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  line-height: 1.15;
  padding: 6px 4px;
}

.wtab-label { display: block; text-align: center; }

.week-slots {
  display: flex;
  gap: 4px;
  width: 100%;
}

.week-slot {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 36px;
  padding: 4px 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 140, 0, 0.45);
  background: #150724;
  color: #f6eefe;
}

.week-slot-kicker {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ff8c00;
  line-height: 1;
}

.week-slot-count {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  color: #d8b4fe;
}

.week-slot-dual-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 100%;
}

.week-slot-single.is-started,
.week-slot-dual.is-started {
  border-color: #ff8c00;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.45);
}

.week-slot-single-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 100%;
}

.wtab.is-complete .week-slot-single {
  background: #12051d;
  border-color: rgba(255, 140, 0, 0.75);
}

.wtab.is-complete .week-slot-dual {
  background: rgba(0, 0, 0, 0.2);
  border-color: #ff8c00;
}

.wtab.is-complete .week-slot-dual .week-slot-count {
  color: #ff8c00;
}

/* v20: a dual day is a green achievement. The week chip stays green only at 100% dual. */
.week-slot-dual.is-started,
.week-slot-dual.is-full {
  border-color: #3dff7a;
  box-shadow: 0 0 12px rgba(61, 255, 122, 0.75);
}

.week-slot-dual.is-started .week-slot-kicker,
.week-slot-dual.is-full .week-slot-kicker,
.week-slot-dual.is-full .week-slot-count {
  color: #b8ffd0;
}

.week-slot-dual.is-full,
.wtab.is-complete .week-slot-dual {
  background: #0d3d22;
  border-color: #3dff7a;
  box-shadow: 0 0 16px rgba(61, 255, 122, 0.9);
}

.wtab.is-complete .week-slot-dual .week-slot-count,
.wtab.is-complete .week-slot-dual .week-slot-kicker {
  color: #d8ffe8;
}

/* v20.1: selected week chips stay gold until every day is dual.
   The DUAL slot itself turns green as soon as one day is dual. */
.wtab .week-slot-dual.is-started,
.wtab .week-slot-dual.is-full,
.wtab.is-selected .week-slot-dual.is-started,
.wtab.is-selected .week-slot-dual.is-full {
  border-color: #3dff7a;
  box-shadow: 0 0 12px #3dff7a;
}

.wtab .week-slot-dual.is-started .week-slot-kicker,
.wtab.is-selected .week-slot-dual.is-started .week-slot-kicker,
.wtab .week-slot-dual.is-full .week-slot-kicker,
.wtab.is-selected .week-slot-dual.is-full .week-slot-kicker {
  color: #3dff7a;
}

.wtab .shield-tick {
  width: 16px;
  height: 19px;
}

/* v20.2: SINGLE n/n locks green. Partial single stays gold.
   The week chip stays rich green only when every training day is dual. */
.wtab .week-slot-single.is-full,
.wtab.is-complete .week-slot-single.is-full,
.wtab.is-selected .week-slot-single.is-full {
  background: #0d3d22;
  border-color: #3dff7a;
  box-shadow: 0 0 12px #3dff7a;
}

.wtab .week-slot-single.is-full .week-slot-kicker,
.wtab .week-slot-single.is-full .week-slot-count,
.wtab.is-complete .week-slot-single.is-full .week-slot-kicker,
.wtab.is-complete .week-slot-single.is-full .week-slot-count,
.wtab.is-selected .week-slot-single.is-full .week-slot-kicker,
.wtab.is-selected .week-slot-single.is-full .week-slot-count {
  color: #3dff7a;
}

.wtab .week-slot-single.is-full .shield-tick path:first-of-type,
.wtab .week-slot-single.is-target .shield-tick path:first-of-type {
  fill: #3dff7a;
}

.wtab .week-slot-single.is-target,
.wtab.is-complete .week-slot-single.is-target,
.wtab.is-week-complete .week-slot-single.is-target,
.wtab.is-selected .week-slot-single.is-target {
  background: #0d3d22;
  border-color: #3dff7a;
  box-shadow: 0 0 12px #3dff7a;
}

.wtab .week-slot-single.is-target .week-slot-kicker,
.wtab .week-slot-single.is-target .week-slot-count,
.wtab.is-selected .week-slot-single.is-target .week-slot-kicker,
.wtab.is-selected .week-slot-single.is-target .week-slot-count {
  color: #3dff7a;
}

.mbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.shield-complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  margin: 0;
  line-height: 1;
}

.shield-complete[hidden] { display: none !important; }

.shield-tick {
  width: 22px;
  height: 26px;
  flex: 0 0 auto;
  display: block;
  background: transparent;
  padding: 0;
  box-sizing: border-box;
}

.shield-count {
  color: #ff8c00;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.mbtn.is-complete,
.wtab.is-complete,
.wtab.is-week-complete,
.mbtn.is-complete.is-selected,
.wtab.is-complete.is-selected,
.wtab.is-week-complete.is-selected {
  background: linear-gradient(180deg, #1c9a48 0%, #0a5c28 100%);
  color: #f4fff6;
  border-color: #ff8c00;
}

.mbtn.is-complete.is-selected,
.wtab.is-complete.is-selected {
  box-shadow: inset 0 0 0 2px #ff8c00;
}

.mbtn .shield-tick {
  width: 16px;
  height: 19px;
}

.mbtn .shield-count { font-size: 0.62rem; }

.year-badge { display: none; margin: 6px 0 2px; }
.year-badge[hidden] { display: none !important; }
.year-badge.is-complete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--touch);
  padding: 4px 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1c9a48 0%, #0a5c28 100%);
  border: 1px solid #ff8c00;
  color: #f4fff6;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.mbtn.is-selected, .wtab.is-selected {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

.mbtn.is-live {
  box-shadow: 0 0 0 1px var(--gold);
}

.week-meta {
  margin: 0;
  padding: 0 10px 8px;
  background: var(--container-deep);
}

.table-wrap {
  background: var(--container-deep);
  padding: 0;
}

.timetable {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
}

.timetable col.col-day { width: 20%; }
.timetable col.col-relics { width: 70%; }
.timetable col.col-done { width: 10%; }

.timetable th,
.timetable td {
  background: var(--cell);
  color: var(--text);
  border: 1px solid rgba(216, 180, 254, 0.16);
  vertical-align: middle;
}

.timetable th {
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  font-weight: 800;
  text-align: center;
  padding: 8px 2px;
}

.timetable th:nth-child(2) { text-align: left; padding-left: 6px; }

.day-cell { padding: 6px 3px; }
.day-name {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.day-key {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.today-pill {
  display: inline-block;
  margin-top: 3px;
  color: var(--bg);
  background: var(--gold);
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1px 4px;
}

tr.today td {
  box-shadow: inset 0 0 0 1px var(--gold);
}

.relics-cell { padding: 4px; }

.relic-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cite-link.is-lead { color: var(--gold); }

.cite-link.is-line-on {
  color: #ff8a00;
  text-decoration-line: underline line-through;
  text-decoration-color: #ff8a00;
}

.cite-link {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  padding: 6px 6px;
  color: var(--cite);
  background: transparent;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.cite-link:focus-visible,
.mbtn:focus-visible,
.wtab:focus-visible,
.nav-toggle:focus-visible,
.mode-btn:focus-visible,
.tick-hit:focus-visible,
.player-ctrl:focus-visible,
.player-close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.doc-text {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  padding: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.done-cell {
  position: relative;
  padding: 4px 0;
  text-align: center;
  vertical-align: top;
  overflow: hidden;
}

.tick-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.tick-hit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.tick-box {
  position: relative;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid #ff8a00;
  border-radius: 6px;
  background: transparent;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  flex: 0 0 24px;
}

.tick-hit.is-on .tick-box {
  background: rgba(255, 138, 0, 0.12);
}

.tick-hit .mark-tick {
  width: 16px;
  height: 16px;
  display: block;
}

.tick-hit .mark-tick path {
  fill: none;
  stroke: #ff8a00;
}

.lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

tr.is-ticked td {
  background: #1a0c2e;
}

.schedule-switch {
  padding: 8px 8px 0;
  background: var(--container);
}

.mode-btn {
  width: 100%;
  min-height: var(--touch);
  background: #150724;
  color: #ff8c00;
  border-color: #ff8c00;
  white-space: normal;
  line-height: 1.25;
  padding: 8px 10px;
}

.footer {
  text-align: center;
  padding: 14px 10px 18px;
  background: var(--container);
}

.motto {
  margin: 0 auto;
  max-width: 22rem;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.07em;
  font-size: 1.15rem;
  line-height: 1.35;
  text-wrap: balance;
}

/* ——— Player ——— */
.player {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  background: var(--bg);
}

.player[hidden] { display: none; }

/* Hold the open off the timetable until the first media frame exists. */
.player.is-awaiting-frame {
  opacity: 0;
  pointer-events: none;
}

#relic-deck-park {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

#relic-deck-park .deck-video {
  width: 1px;
  height: 1px;
}

.player-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: transparent;
  touch-action: pan-y;
}

.player-stage > .deck-video,
#relic-active-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  background-image: none;
  outline: none;
  transition: transform 0.38s ease;
}

.player-stage.is-forensic-open #relic-active-video {
  transform: translateY(-7vh);
}

#relic-active-video::-webkit-media-controls,
#relic-active-video::-webkit-media-controls-enclosure,
#relic-active-video::-webkit-media-controls-panel,
#relic-active-video::-webkit-media-controls-play-button,
#relic-active-video::-webkit-media-controls-start-playback-button,
#relic-active-video::-webkit-media-controls-overlay-play-button,
#relic-active-video::-webkit-media-controls-overlay-enclosure,
#relic-frame-warm::-webkit-media-controls,
#relic-frame-warm::-webkit-media-controls-enclosure,
#relic-frame-warm::-webkit-media-controls-panel,
#relic-frame-warm::-webkit-media-controls-play-button,
#relic-frame-warm::-webkit-media-controls-start-playback-button,
#relic-frame-warm::-webkit-media-controls-overlay-play-button,
#relic-frame-warm::-webkit-media-controls-overlay-enclosure {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

.timer-dock {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: calc(100% - 36px);
}

#relic-set-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  min-height: var(--touch);
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 140, 0, 0.55);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #ff8c00;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#relic-set-timer[aria-expanded="true"] {
  border-color: #ff8c00;
  box-shadow: inset 0 0 0 1px #ff8c00;
}

#relic-set-timer:focus-visible,
.timer-mod:focus-visible {
  outline: 2px solid #ff8c00;
  outline-offset: 2px;
}

.timer-mods {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 140, 0, 0.45);
  border-radius: 8px;
  background: #0b0216;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}

.timer-mods[hidden] { display: none; }

.timer-module {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.timer-module + .timer-module {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 140, 0, 0.28);
}

.timer-module-label {
  margin: 0;
  color: #ff8c00;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
}

.timer-module-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.timer-mod {
  min-width: var(--touch);
  min-height: var(--touch);
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 140, 0, 0.4);
  border-radius: 8px;
  background: #150724;
  color: #ff8c00;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.timer-mod.is-selected {
  background: #ff8c00;
  color: #0b0216;
  border-color: #ff8c00;
}

.media-note,
.empty-overlay,
.start-gate {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 28px 22px;
  text-align: center;
  background: rgba(11, 2, 22, 0.9);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
}

.media-note {
  z-index: 3;
  background: #000;
  padding: 72px 22px 96px;
}

.start-gate {
  z-index: 6;
  width: 100%;
  height: 100%;
  border-radius: 0;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.media-note[hidden],
.empty-overlay[hidden],
.start-gate[hidden] { display: none; }

.player-hud {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.player-hud.is-hud-instant {
  transition: none;
}

.player-stage.is-hud-idle .player-hud {
  opacity: 0;
  visibility: hidden;
}

.player-hud .player-close,
.player-hud .timer-dock,
.player-hud .player-controls {
  pointer-events: auto;
}

.forensic-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: 68vh;
  margin: 0;
  padding: 0;
  transform: translateY(calc(100% - 44px));
  transition: transform 0.38s ease;
  pointer-events: none;
}

.player-stage.is-forensic-open .forensic-dock {
  transform: translateY(0);
}

.forensic-tab,
.forensic-panel {
  pointer-events: auto;
}

.forensic-tab {
  align-self: center;
  z-index: 2;
  width: 140px;
  min-height: 44px;
  margin: 0;
  padding: 18px 24px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ff8c00;
  font: inherit;
  line-height: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.forensic-handle {
  display: block;
  width: 72px;
  height: 3px;
  margin: 0 auto;
  border-radius: 999px;
  background: #ff8c00;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.55);
  pointer-events: none;
}

.player-stage.is-hud-idle:not(.is-forensic-open) .forensic-tab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.forensic-tab:focus-visible {
  outline: 2px solid #ff8c00;
  outline-offset: 2px;
}

.forensic-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: rgba(11, 2, 22, 0.94);
  border-top: 1px solid rgba(255, 140, 0, 0.55);
  color: #f6eefe;
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.45);
}

.forensic-scroll {
  flex: 1 1 auto;
  min-height: 44px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px calc(16px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.forensic-cabin {
  margin: 0 0 4px;
  color: rgba(255, 140, 0, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.forensic-cabin:empty { display: none; }

.forensic-title {
  margin: 0 0 8px;
  color: #ff8c00;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.forensic-metrics {
  margin: 0 0 12px;
  color: #ff8c00;
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.forensic-kicker {
  margin: 10px 0 4px;
  color: #ff8c00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.forensic-lead {
  margin: 0 0 4px;
  color: #f6eefe;
  font-size: 0.92rem;
  line-height: 1.4;
}

.forensic-lead .forensic-kicker {
  margin: 0;
}

.forensic-body {
  margin: 0;
  color: #f6eefe;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-line;
}

.forensic-breath {
  margin: 14px 0 0;
  color: rgba(216, 180, 254, 0.78);
  font-size: 0.78rem;
  line-height: 1.35;
}

.forensic-breath[hidden] { display: none; }
.forensic-lead[hidden] { display: none; }

.player-close {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  left: calc(8px + env(safe-area-inset-left));
  z-index: 40;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.clip-label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(52px + env(safe-area-inset-bottom));
  z-index: 8;
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(11, 2, 22, 0.72);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
}

.player-controls {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.38s ease;
}

.player-stage.is-forensic-open .player-controls {
  transform: translate(-50%, calc(-50% - 12vh));
}

.player-ctrl {
  width: 72px;
  height: 72px;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
}

.player-ctrl:active {
  background: rgba(255, 255, 255, 0.48);
}

@media (prefers-reduced-motion: reduce) {
  .player-hud,
  .forensic-dock,
  .forensic-tab,
  #relic-active-video,
  .player-controls { transition: none; }
}

body.player-open,
body.nav-open { overflow: hidden; }

body.player-open .nav-toggle,
body.player-open .nav-drawer,
body.player-open .nav-scrim {
  display: none;
  pointer-events: none;
}

/* A food room covers the stage without pausing the set that is already running. */
body.is-food #relic-player {
  visibility: hidden;
  pointer-events: none;
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(11, 2, 22, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

body.nav-open .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1110;
  display: flex;
  flex-direction: column;
  width: min(92vw, 420px);
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #12051d;
  border-right: 1px solid rgba(216, 180, 254, 0.28);
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.35);
  transform: translateX(-100%);
  transition: transform 0.32s ease;
}

.nav-drawer-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
}

/* v24.4 — calm NiX bars and circles under the purple field. */
.ambient-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-nix,
.ambient-orb {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: #d8b4fe;
  pointer-events: none;
  animation-duration: 28s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-delay: var(--d, 0s);
}

.ambient-nix.is-lilac,
.ambient-orb.is-lilac { color: #d8b4fe; }

.ambient-nix {
  width: 3px;
  height: var(--s, 18px);
  border-radius: 1px;
  background: currentColor;
  box-shadow:
    calc(var(--s, 18px) * 0.28) 0 0 currentColor,
    calc(var(--s, 18px) * 0.56) 0 0 currentColor;
  opacity: 0.22;
}

.ambient-orb {
  width: var(--s, 28px);
  height: var(--s, 28px);
  border-radius: 50%;
  opacity: 0.2;
}

.ambient-orb.is-stroke {
  background: transparent;
  border: 1.5px solid currentColor;
}

.ambient-orb.is-fill {
  background: currentColor;
  border: 0;
  opacity: 0.12;
}

.drift-a { animation-name: ambient-drift-a; animation-duration: 18s; }
.drift-b { animation-name: ambient-drift-b; animation-duration: 24s; }
.drift-c { animation-name: ambient-drift-c; animation-duration: 16s; }
.drift-d { animation-name: ambient-drift-d; animation-duration: 22s; }

@keyframes ambient-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(36px, -48px, 0) scale(1.08); }
}

@keyframes ambient-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-42px, 32px, 0) scale(0.92); }
}

@keyframes ambient-drift-c {
  from { transform: translate3d(0, 0, 0) scale(0.96); }
  to { transform: translate3d(28px, 40px, 0) scale(1.07); }
}

@keyframes ambient-drift-d {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-32px, -36px, 0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-nix,
  .ambient-orb {
    animation: none;
  }
}

body.nav-open .nav-drawer {
  transform: translateX(0);
}

.nav-drawer-head {
  display: flex;
  align-items: center;
  flex: 0 0 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-drawer h2 {
  margin: 3px 0 0;
  padding-top: 4px;
  border-top: 1px solid rgba(216, 180, 254, 0.35);
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.nav-drawer-nav {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  gap: 0;
}

#nav-cabins-label {
  margin-top: 12px;
}

.nav-drawer-nav > .account-banner:not([hidden]) {
  margin-top: auto;
}

.nav-drawer-nav > [data-os-door="account"] {
  margin-top: auto;
  border-top: 1px solid rgba(216, 180, 254, 0.28);
}

.nav-drawer-nav > .account-banner:not([hidden]) + [data-os-door="account"] {
  margin-top: 0;
}

.nav-kicker {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.nav-rows {
  display: flex;
  flex-direction: column;
}

#btn-future-lock,
#btn-future-lock.is-active {
  min-height: 44px;
  color: var(--text);
  box-shadow: none;
}

#btn-future-lock .nav-row-tag,
#btn-future-lock.is-active .nav-row-tag {
  color: var(--cite);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 4px 8px 10px;
  border: 0;
  border-bottom: 1px solid rgba(216, 180, 254, 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.nav-row,
.nav-row-label {
  white-space: normal;
}

.nav-row-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.nav-row-tag {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--cite);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: right;
}

.nav-row.is-active {
  color: #ff8c00;
  box-shadow: inset 2px 0 0 #ff8c00;
}

.nav-row.is-active .nav-row-tag {
  color: #ff8c00;
}

.nav-row.is-static {
  color: var(--muted);
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.nav-row:focus-visible {
  outline: 2px solid #ff8c00;
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bars,
  .nav-scrim,
  .nav-drawer,
  .cabin-panel,
  .cabin-panel-inner,
  .cabin-panel .nav-row,
  .cabin-panel .nav-kicker,
  .cabin-chevron,
  .sub-panel,
  .sub-panel-inner {
    transition: none;
  }
}

/* Column law, last so later edits cannot drift the grid. */
table.timetable {
  table-layout: fixed;
  width: 100%;
}
table.timetable col.col-day { width: 20%; }
table.timetable col.col-relics { width: 70%; }
table.timetable col.col-done { width: 10%; }
table.timetable th,
table.timetable td {
  background-color: #150724;
}
table.timetable tr.is-ticked td { background-color: #1a0c2e; }

/* v17 fuel board. Training column law above stays on the three-column timetable. */
table.fuel-table col.col-day { width: 22%; }
table.fuel-table col.col-relics { width: 78%; }

.food-board {
  padding: 0 0 8px;
  background: var(--container-deep);
}

.food-back,
.food-jump,
.fuel-cue {
  display: flex;
  align-items: center;
  width: calc(100% - 16px);
  min-height: var(--touch);
  margin: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 140, 0, 0.55);
  border-left: 2px solid #ff8c00;
  border-radius: 8px;
  background: var(--cell);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.food-title {
  margin: 0 8px 4px;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.food-title:focus {
  outline: none;
}

.food-title:focus-visible {
  outline: 2px solid #ff8c00;
  outline-offset: 2px;
}

.fuel-sunday,
.fuel-meta,
.fuel-morning,
.recipe-kicker,
.recipe-params {
  margin: 0;
  overflow-wrap: anywhere;
}

.fuel-sunday,
.fuel-meta,
.fuel-morning {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.fuel-sunday {
  margin: 0 8px 4px;
}

.food-jumps {
  display: flex;
  flex-direction: column;
}

.food-jump {
  color: var(--cite);
}

.fuel-cue {
  width: 100%;
  margin: 6px 0 0;
  color: var(--gold);
}

.fuel-cue-extract {
  color: var(--cite);
}

.cabin-line {
  display: block;
  color: var(--cite);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.fuel-meta,
.fuel-morning {
  margin-top: 4px;
}

.recipe-card {
  margin: 0 8px 12px;
  padding: 12px;
  background: var(--cell);
  border: 1px solid rgba(255, 140, 0, 0.45);
  border-left: 2px solid #ff8c00;
  border-radius: 8px;
}

.recipe-kicker {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.recipe-card h3 {
  margin: 4px 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.2;
}

.recipe-params {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.recipe-card h4 {
  margin: 12px 0 6px;
  padding-bottom: 4px;
  border-bottom: 2px solid #c9a227;
  color: #1f1812;
  font-size: 0.84rem;
}

.recipe-card ul,
.recipe-card ol {
  margin: 0;
  padding-left: 1.15rem;
}

.recipe-card li {
  margin: 0 0 6px;
  color: #1f1812;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.recipe-card .recipe-ingredients li {
  color: #1f1812;
}

.macro-tag {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  margin: 12px 0 0;
  padding: 8px 10px;
  border: 1px solid #ff8c00;
  border-radius: 8px;
  background: var(--container);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.food-back:focus-visible,
.food-jump:focus-visible,
.fuel-cue:focus-visible,
.food-date:focus-visible {
  outline: 2px solid #ff8c00;
  outline-offset: 2px;
}

/* v19 Food OS rooms. The training table above keeps its three columns. */
.food-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fuel-meal-name,
.food-cabin-chip,
.food-subhead,
.food-laws,
.food-plain,
.recipe-lock {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.fuel-meal-name {
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 800;
}

.fuel-morning,
.fuel-meal-name {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.fuel-morning {
  color: #f3d48a;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.fuel-portions {
  display: flex;
  gap: 6px;
  margin: 0;
}

.fuel-portions span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1f1812;
  color: #fcf5e8;
  font-size: 0.72rem;
  font-weight: 800;
}

.food-cabin-chip {
  color: var(--cite);
  font-size: 0.72rem;
  font-weight: 700;
}

.food-subhead {
  margin: 14px 8px 4px;
  color: var(--gold);
  font-size: 0.84rem;
}

.food-laws,
.food-plain {
  margin: 0 8px 8px;
  padding-left: 1.1rem;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
}

.food-laws li,
.food-plain li {
  margin: 0 0 6px;
}

.food-jump {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  color: #1f1812;
  background: #fcf5e8;
  border-color: #c9a227;
}

.food-jump span {
  display: block;
  color: #2c2118;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.recipe-card {
  margin: 8px;
  padding: 14px 12px 12px;
  background: #fcf5e8;
  color: #2c2118;
  border: 8px solid #1f1812;
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px #c9a227;
}

.recipe-card[data-kind="extraction"] {
  background: #e7f4f1;
  border-color: #12332e;
  box-shadow: inset 0 0 0 2px #1a7a6d;
}

.recipe-card[data-kind="extraction"] h4 {
  color: #0e4f48;
  border-bottom-color: #1a7a6d;
}

.recipe-card[data-kind="extraction"] .recipe-kicker {
  color: #0e4f48;
}

.recipe-kicker,
.recipe-card h4,
.recipe-tip {
  color: #1f1812;
}

.recipe-card h3 {
  margin: 2px 0 0;
  color: #1f1812;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.15;
}

.recipe-tagline,
.recipe-script {
  margin: 4px 0 0;
  color: #2c2118;
  font-family: Georgia, "Palatino Linotype", serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.3;
}

.recipe-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.recipe-facts li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #c9a227;
  background: #fffdf8;
  color: #2c2118;
  font-size: 0.72rem;
}

.recipe-facts strong {
  color: #1f1812;
  font-size: 0.78rem;
}

.recipe-lock,
.extract-sequence {
  margin: 8px 0;
  color: #1f1812;
  font-size: 0.78rem;
  font-weight: 700;
}

.extract-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.extract-sequence li {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 6px 8px;
  background: #1f1812;
  color: #fcf5e8;
  font-size: 0.72rem;
}

.recipe-method {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe-method li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: start;
  margin: 0 0 8px;
  color: #2c2118;
}

.method-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1f1812;
  color: #c9a227;
  font-weight: 800;
}

.recipe-method strong {
  color: #1f1812;
}

.recipe-weekbox {
  margin-top: 12px;
  padding: 10px;
  background: #1f1812;
  color: #fcf5e8;
  border-top: 3px solid #c9a227;
}

.recipe-weekbox h4,
.recipe-weekbox p,
.recipe-weekbox strong {
  color: #fcf5e8;
}

.recipe-weekbox p {
  margin: 4px 0 0;
  font-size: 0.78rem;
}

.recipe-tip {
  margin: 10px 0 0;
  color: #1f1812;
  font-size: 0.78rem;
  font-weight: 700;
}

.food-tools,
.card-actions,
.card-editor,
.food-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px;
}

.food-tools button,
.card-actions button,
.card-editor button,
.food-note input,
.food-note select,
.food-note textarea,
.card-editor input,
.card-editor textarea,
.food-json {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 10px;
  border: 1px solid #c9a227;
  border-radius: 8px;
  background: #fcf5e8;
  color: #1f1812;
  font: inherit;
  font-weight: 700;
}

.food-tools button,
.card-actions button,
.card-editor button {
  background: #1f1812;
  color: #fcf5e8;
  font-weight: 800;
}

.food-json-label,
.card-editor label,
.food-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 100%;
  color: #f6eefe;
  font-size: 0.78rem;
  font-weight: 800;
}

.food-json,
.card-editor textarea {
  width: 100%;
  min-height: 88px;
}

.card-editor {
  margin: 8px;
  padding: 12px;
  background: #fcf5e8;
  color: #1f1812;
  border: 8px solid #1f1812;
}

.card-editor label {
  color: #1f1812;
}

.scan-strip,
.scan-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px;
}

.scan-strip h3 {
  flex: 1 1 100%;
  margin: 0;
  color: #f6eefe;
  font-size: 0.95rem;
}

.scan-label,
.scan-file {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 100%;
  color: #f6eefe;
  font-size: 0.78rem;
  font-weight: 800;
}

.scan-strip button,
.scan-strip textarea,
.scan-strip input,
.scan-file input,
.scan-preview button,
.scan-preview input,
.scan-preview textarea {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 10px;
  border: 1px solid #c9a227;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
}

.scan-strip button,
.scan-preview button {
  background: #1f1812;
  color: #fcf5e8;
  font-weight: 800;
}

.scan-strip textarea,
.scan-file input {
  width: 100%;
  background: #fcf5e8;
  color: #1f1812;
}

.scan-preview {
  padding: 12px;
  background: #fcf5e8;
  color: #1f1812;
  border: 8px solid #1f1812;
}

.scan-preview h3,
.scan-preview label,
.scan-preview p,
.scan-preview .scan-note,
.scan-json {
  color: #1f1812;
}

.scan-preview h3 {
  flex: 1 1 100%;
  margin: 0;
}

.scan-preview label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 100%;
  font-size: 0.78rem;
  font-weight: 800;
}

.scan-preview input,
.scan-preview textarea,
.scan-json {
  width: 100%;
  background: #fff;
  color: #1f1812;
  border: 1px solid #c9a227;
}

.scan-json {
  flex: 1 1 100%;
  margin: 0;
  padding: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow: auto;
  font-size: 0.72rem;
  font-weight: 700;
}

.scan-photo {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #1f1812;
}

.scan-flag {
  color: #1f1812;
  background: #fcf5e8;
  border: 1px solid #c9a227;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.recipe-citations,
.recipe-citations li,
.line-citations,
.line-citations li,
.week-citations,
.week-citations li {
  color: #1f1812;
}

.recipe-citations,
.line-citations,
.week-citations {
  background: #fcf5e8;
}

.recipe-citations,
.line-citations,
.week-citations {
  margin: 8px 0 0;
  padding: 8px 8px 8px 1.4rem;
  border: 1px solid #c9a227;
}

@media (max-width: 412px) {
  .recipe-facts {
    grid-template-columns: 1fr;
  }

  .recipe-card h3 {
    font-size: 1.28rem;
  }
}

/* v21 Food+Prep. Scoped to the food board so training slots stay untouched. */
.food-rooms {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px;
}

.food-rooms button {
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid #c9a227;
  border-radius: 8px;
  background: #fff9ee;
  color: #1a3e2f;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.food-rooms button[aria-pressed="true"] {
  background: #1a3e2f;
  color: #fff9ee;
}

.food-week-range,
.food-refuse,
.food-undo,
.food-snack,
.food-sunday-label {
  margin: 8px;
  color: #1a3e2f;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.food-refuse {
  padding: 10px 12px;
  border: 2px solid #c9a227;
  border-radius: 8px;
  background: #fff9ee;
  color: #5c4033;
}

.food-pack-jump,
.food-undo button,
.food-day-actions button,
.food-chip,
.food-filters button,
.food-lib-row button,
.food-budget button {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border: 2px solid #1a3e2f;
  border-radius: 8px;
  background: #f7f1e3;
  color: #1a3e2f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.food-day {
  margin: 8px;
  padding: 10px;
  border: 2px solid #1a3e2f;
  border-radius: 10px;
  background: #fff9ee;
  color: #5c4033;
  opacity: 1;
}

.food-day.is-sunday {
  background: #f7f1e3;
  border-color: #c9a227;
  opacity: 1;
  filter: none;
}

.food-day.is-pinned {
  box-shadow: inset 0 0 0 2px #c9a227;
}

.food-day-head h3,
.food-day-head p {
  margin: 0;
  color: #1a3e2f;
}

.food-slot {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid #c9a227;
  border-radius: 8px;
  background: #fff;
  color: #5c4033;
}

.food-slot span {
  color: #1a3e2f;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.food-slot.is-valid {
  background: #e7f0e4;
  box-shadow: inset 0 0 0 2px #1a3e2f;
}

.food-slot.is-invalid {
  background: #fff9ee;
  box-shadow: inset 0 0 0 2px #c9a227;
}

.food-note {
  display: block;
  margin: 6px 0;
  color: #1a3e2f;
  font-size: 0.78rem;
  font-weight: 800;
}

.food-note textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #c9a227;
  border-radius: 8px;
  background: #fff;
  color: #5c4033;
  font: inherit;
}

.food-day-actions,
.food-library,
.food-filters,
.food-lib-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.food-library,
.food-filters {
  margin: 8px;
}

.food-chip {
  background: #e7f0e4;
}

.food-budget {
  margin: 8px;
  padding: 12px;
  border: 8px solid #1a3e2f;
  background: #fff9ee;
  color: #5c4033;
}

.food-budget p {
  margin: 0 0 6px;
  font-weight: 800;
}

.food-board .recipe-card.food-forensic,
.food-board .food-forensic.food-collection {
  background: #fff9ee;
  color: #5c4033;
  border: 8px solid #1a3e2f;
  box-shadow: inset 0 0 0 2px #c9a227;
}

.food-board .recipe-card.food-forensic[data-kind="extraction"] {
  background: #f7f1e3;
  border-color: #1a3e2f;
  box-shadow: inset 0 0 0 2px #7d9a78;
}

.food-board .recipe-card.food-forensic h3,
.food-board .food-collection h3,
.food-board .recipe-card.food-forensic .recipe-kicker,
.food-board .recipe-card.food-forensic h4 {
  color: #1a3e2f;
  border-bottom-color: #c9a227;
}

.food-board .recipe-card.food-forensic .recipe-tagline,
.food-board .recipe-card.food-forensic .recipe-script,
.food-board .recipe-card.food-forensic li,
.food-board .recipe-card.food-forensic p {
  color: #5c4033;
}

.food-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.food-quick span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #c9a227;
  background: #f7f1e3;
  color: #1a3e2f;
  font-size: 0.78rem;
  font-weight: 800;
}

.food-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.food-board .recipe-card.food-forensic .recipe-tip {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #e7f0e4;
  color: #1a3e2f;
  font-weight: 700;
}

.food-collection p {
  margin: 4px 0 8px;
  color: #5c4033;
  font-weight: 700;
}

.food-board .food-json-label {
  color: #f7f1e3;
}

.food-cabinet-scroller {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.food-mini {
  flex: 0 0 168px;
  min-height: 120px;
  scroll-snap-align: start;
  padding: 10px;
  border: 2px solid #1a3e2f;
  border-radius: 10px;
  background: #fff9ee;
  color: #1a3e2f;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.food-mini span,
.food-made {
  display: block;
  margin: 4px 8px;
  color: #5c4033;
  font-size: 0.78rem;
  font-weight: 700;
}

.food-mini[aria-pressed="true"],
.food-filters button[aria-pressed="true"] {
  background: #1a3e2f;
  color: #fff9ee;
}

.food-fly-btn,
.food-hg-actions button,
.food-editor button,
.food-editor input,
.food-editor textarea,
.food-filters button {
  min-height: 44px;
  min-width: 44px;
}

.food-fly-actions,
.food-hg-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

.food-fly-btn {
  margin: 8px;
  padding: 10px 12px;
  border: 2px solid #1a3e2f;
  border-radius: 8px;
  background: #f7f1e3;
  color: #1a3e2f;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.food-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px;
  color: #1a3e2f;
  font-weight: 800;
}

.food-editor input,
.food-editor textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #c9a227;
  border-radius: 8px;
  background: #fff;
  color: #5c4033;
  font: inherit;
}

.nav-row.is-fly-target,
.food-rooms button.is-fly-target {
  outline: 3px solid #c9a227;
  outline-offset: 2px;
}

.food-fly-ghost {
  position: fixed;
  z-index: 1200;
  left: 48px;
  top: 160px;
  display: flex;
  align-items: center;
  width: 280px;
  height: 96px;
  padding: 8px;
  overflow: hidden;
  border: 2px solid #1a3e2f;
  border-radius: 10px;
  background: #fff9ee;
  color: #1a3e2f;
  font-weight: 800;
  transition: left 0.65s ease, top 0.65s ease, width 0.65s ease, height 0.65s ease;
}

.smoothie-board .food-mini {
  border-color: #1f7a62;
  background: #e7f6ee;
  color: #14382c;
}

.nav-row.is-smoothie-target,
.smoothie-board .food-rooms button.is-smoothie-target {
  outline: 3px solid #1f7a62;
  outline-offset: 2px;
}

.smoothie-fly-ghost {
  position: fixed;
  z-index: 1200;
  left: 36px;
  top: 180px;
  display: flex;
  align-items: center;
  width: 260px;
  height: 88px;
  padding: 8px 14px;
  overflow: hidden;
  border: 2px solid #1f7a62;
  border-radius: 44px 44px 16px 44px;
  background: #e7f6ee;
  color: #14382c;
  font-weight: 800;
  pointer-events: none;
  box-shadow: 0 0 0 10px rgba(31, 122, 98, 0.16), 0 16px 32px rgba(20, 90, 70, 0.28);
  transition: left 0.9s cubic-bezier(0.16, 1.15, 0.3, 1), top 0.9s cubic-bezier(0.16, 1.15, 0.3, 1), width 0.9s cubic-bezier(0.34, 1.4, 0.64, 1), height 0.9s cubic-bezier(0.34, 1.4, 0.64, 1), transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.9s ease;
}

.smoothie-fly-ghost.is-pouring {
  transform: scale(0.62) rotate(-14deg);
  box-shadow: 0 0 0 4px rgba(125, 196, 168, 0.35);
}

body.is-food .live-stack,
body.is-food .mode-pair,
body.is-food .phase-bar,
body.is-food .month-bar,
body.is-food .week-tabs,
body.is-food .week-meta,
body.is-food .schedule-switch,
body.is-food #btn-future-lock,
body.is-hub .live-stack,
body.is-hub .mode-pair,
body.is-hub .phase-bar,
body.is-hub .month-bar,
body.is-hub .week-tabs,
body.is-hub .week-meta,
body.is-hub .schedule-switch,
body.is-hub #btn-future-lock,
body.is-hub #training-board,
body.is-hub #planner-board,
body.is-hub #banner-live,
body.is-hub #banner-coach {
  display: none;
}

.cabin-list {
  display: flex;
  flex-direction: column;
}

.cabin-toggle {
  min-height: 44px;
}

.cabin-toggle .nav-row-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cabin-chevron {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 300ms ease-out;
}

.cabin.is-open > .cabin-toggle {
  color: #ff8c00;
  box-shadow: inset 2px 0 0 #ff8c00;
}

.cabin.is-open > .cabin-toggle .cabin-chevron {
  transform: rotate(45deg);
}

.cabin-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 300ms ease-out, opacity 300ms ease-out;
}

.cabin-panel[hidden] {
  display: grid !important;
}

.cabin.is-open > .cabin-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.cabin:not(.is-open) > .cabin-panel {
  pointer-events: none;
}

.cabin-panel-inner {
  min-height: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: transform 300ms ease-out;
}

.cabin.is-open > .cabin-panel > .cabin-panel-inner {
  transform: translateY(0);
}

.cabin-panel .nav-kicker,
.cabin-panel .nav-row {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.cabin.is-open .cabin-panel .nav-kicker,
.cabin.is-open .cabin-panel .nav-row {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--stagger, 1) * 30ms);
}

.cabin-panel .nav-row {
  padding-left: 22px;
}

.sub-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 300ms ease-out, opacity 300ms ease-out;
}

.sub-cabin.is-open > .sub-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.sub-cabin:not(.is-open) > .sub-panel {
  pointer-events: none;
}

.sub-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.sub-cabin.is-open > .sub-toggle .cabin-chevron {
  transform: rotate(45deg);
}

.sub-panel .nav-row {
  padding-left: 40px;
}

/* Closed accordions keep their rows in the DOM. Zero their boxes so a
   collapsed row cannot overlap the next visible row or Account. */
.cabin:not(.is-open) > .cabin-panel .nav-row,
.sub-cabin:not(.is-open) > .sub-panel .nav-row {
  height: 0;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  overflow: hidden;
}

.cabin-panel .nav-kicker {
  margin-left: 22px;
  margin-top: 8px;
}

.cabin-list > .cabin:last-child.is-open .cabin-panel-inner > :last-child .nav-row:last-child {
  border-bottom: 0;
}

.drawer-door,
.cabin-toggle.drawer-door .nav-row-label,
.drawer-door .nav-row-label {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-row.is-soon,
.cabin-panel .nav-row.is-static {
  color: rgba(203, 182, 228, 0.72);
  pointer-events: auto;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .cabin-panel,
  .cabin-panel-inner,
  .cabin-panel .nav-kicker,
  .cabin-panel .nav-row,
  .cabin.is-open .cabin-panel .nav-kicker,
  .cabin.is-open .cabin-panel .nav-row,
  .cabin-chevron,
  .cabin.is-open > .cabin-toggle .cabin-chevron,
  .sub-panel,
  .sub-panel-inner,
  .sub-cabin.is-open > .sub-toggle .cabin-chevron {
    transition: none;
  }
}

.os-bar {
  display: flex;
  gap: 8px;
  padding: 8px;
}

.draft-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.draft-cell.is-landed {
  outline: 3px solid #c9a227;
  outline-offset: 2px;
}

.draft-slot {
  flex: 0 0 78px;
  color: #1a3e2f;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.draft-card,
.draft-empty,
.draft-remove,
.slot-tick,
.pack-ask button {
  min-height: 44px;
  min-width: 44px;
}

.draft-card,
.draft-empty {
  flex: 1 1 auto;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.15;
  text-align: left;
  white-space: normal;
}

.draft-remove {
  flex: 0 0 auto;
  padding: 8px 12px;
  white-space: nowrap;
}

.slot-tick {
  flex: 0 0 44px;
  width: 44px;
  padding: 4px;
}

.slot-tick[aria-pressed="true"] {
  background: #1a3e2f;
  color: #fff9ee;
}

.smoothie-board .slot-tick[aria-pressed="true"] {
  background: #1f7a62;
  color: #e7f6ee;
}

.recipe-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.recipe-actions .slot-tick {
  margin-left: auto;
}

.pack-ask {
  margin: 12px 0;
  padding: 12px;
  border: 2px solid #1a3e2f;
  border-radius: 10px;
  background: #fff9ee;
  color: #1a3e2f;
}

.pack-ask p {
  margin: 0 0 8px;
  font-weight: 800;
}

.os-bar .os-quick {
  flex: 1 1 auto;
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.os-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 2px solid #1a3e2f;
  border-radius: 8px;
  background: #1a3e2f;
  color: #fff9ee;
  font: inherit;
  font-weight: 800;
  text-align: center;
}

.smoothie-board .os-quick {
  border-color: #1f7a62;
  background: #1f7a62;
}

.planner-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}

.planner-tabs button,
.planner-bar button,
.planner-daybar button,
.planner-primary,
.planner-actions button,
.planner-chip,
.planner-slot,
.planner-lock,
.planner-card-open,
.planner-today button,
.planner-sheet button,
.planner-editor button,
.planner-week-head button,
.planner-notice button,
.planner-lock-banner button,
.planner-prep-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d8c4f0;
  background: #241433;
  color: #f6eefe;
  font: inherit;
  font-weight: 700;
}

.planner-tabs button {
  flex: 1 1 0;
}

.planner-tabs button.is-active,
.planner-chip.is-active,
.planner-primary,
.planner-lock {
  background: #ff8c00;
  color: #1a0a00;
  border-color: #ff8c00;
}

.planner-bar,
.planner-actions,
.planner-chips,
.planner-week-head,
.planner-today {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0;
}

.planner-title {
  margin: 0;
  color: #f6eefe;
  font-size: 1.25rem;
}

.planner-status,
.planner-empty,
.planner-why,
.planner-brazil,
.planner-detail,
.planner-editor,
.planner-card,
.planner-day,
.planner-prep-list {
  color: #f6eefe;
}

.planner-why,
.planner-brazil,
.planner-status {
  color: #f3e8ff;
  font-size: 0.95rem;
}

.planner-card,
.planner-day,
.planner-editor,
.planner-sheet,
.planner-today {
  background: #1b0a2a;
  border: 1px solid #5c4678;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
}

.planner-card-open,
.planner-slot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}

.planner-slot {
  flex-direction: column;
  align-items: flex-start;
}

.planner-card-open strong,
.planner-slot strong {
  min-width: 0;
}

.planner-tag {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #12051d;
  color: #f6eefe;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.planner-help,
.planner-kicker {
  margin: 4px 0;
  color: #cbb6e0;
  text-align: center;
}

.planner-help {
  font-size: 0.82rem;
  line-height: 1.35;
}

.planner-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.planner-slot-toggles,
.planner-fits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
}

.planner-fits {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planner-slot-toggles button,
.planner-fits button {
  width: 100%;
  min-height: 44px;
  padding: 8px 4px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.planner-slot-toggles button:not(.is-active),
.planner-fits button:not(.is-active) {
  background: transparent;
  color: #f6eefe;
  border-color: #8d74a8;
}

.planner-daybar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.planner-daybar button {
  flex: 0 0 auto;
  padding: 8px;
  font-size: 0.85rem;
}

.planner-daybar .planner-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.15;
  white-space: normal;
}

.planner-today-copy {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.planner-today-copy span {
  color: #f3e8ff;
  font-weight: 800;
}

.planner-slot.is-gap {
  outline: 3px solid #ff8c00;
}

.planner-search,
.planner-editor label,
.planner-check {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #f6eefe;
  margin: 8px 0;
}

.planner-editor input,
.planner-editor select,
.planner-search input,
.planner-sheet input,
.planner-sheet select {
  min-height: 44px;
  background: #12051d;
  color: #f6eefe;
  border: 1px solid #d8c4f0;
  border-radius: 8px;
  padding: 8px;
  font: inherit;
}

.planner-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
}

.planner-row input,
.planner-row select {
  flex: 1 1 120px;
}

.planner-error,
.planner-notice {
  background: #3a2410;
  color: #fff7e8;
  border: 1px solid #ff8c00;
  border-radius: 8px;
  padding: 10px;
}

#nexus-banner {
  position: fixed;
  left: 50%;
  bottom: var(--bottom-nav-h, 0px);
  transform: translateX(-50%);
  width: min(480px, 100%);
  z-index: 30;
  pointer-events: none;
}

#nexus-banner[hidden] {
  display: none !important;
}

body.nav-open #nexus-banner,
body.player-open #nexus-banner {
  display: none !important;
}

.nexus-banner-bar {
  display: flex;
  align-items: stretch;
  min-height: 48px;
  box-sizing: border-box;
  background: rgba(18, 5, 29, 0.96);
  border: 0;
  border-top: 1px solid rgba(216, 180, 254, 0.28);
  border-radius: 0;
  box-shadow: none;
  padding-bottom: env(safe-area-inset-bottom);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms linear, transform 160ms linear;
}

#nexus-banner.is-in .nexus-banner-bar {
  opacity: 1;
  transform: none;
}

#nexus-banner.is-out .nexus-banner-bar {
  opacity: 0;
  transition-duration: 200ms;
}

.nexus-banner-dismiss,
.nexus-banner-undo {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  appearance: none;
}

.nexus-banner-dismiss {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  color: #f6eefe;
  font: 600 0.78rem/1.3 var(--font);
  text-align: left;
}

.nexus-banner-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}

.nexus-banner-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.nexus-banner-undo {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 44px;
  padding: 12px 16px;
  border: 0;
  border-left: 1px solid rgba(216, 180, 254, 0.18);
  color: #ff8c00;
  font: 800 0.68rem/1 var(--font);
  letter-spacing: 0.12em;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .nexus-banner-bar,
  #nexus-banner.is-out .nexus-banner-bar {
    transition: none;
    transform: none;
  }
}

.planner-lock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid #ff8c00;
  border-radius: 10px;
  background: #3a2410;
  color: #fff7e8;
}

.planner-lock-banner p {
  margin: 0;
}

.planner-lock-banner button,
.planner-prep-toggle {
  min-height: 48px;
  min-width: 44px;
}

.planner-prep-toggle {
  width: 100%;
  box-sizing: border-box;
}

.planner-slot.is-locked {
  border-color: #ff8c00;
  background: #140818;
}

.planner-sheet .planner-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
}

.planner-sheet .planner-pick strong {
  min-width: 0;
}

.planner-prep {
  margin-left: 8px;
  color: #ff8c00;
  font-weight: 800;
}

#planner-sheet-host {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

#planner-sheet-host:empty {
  display: none;
}

.planner-sheet-layer {
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.planner-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(8, 2, 16, 0.62);
}

.planner-sheet {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  box-sizing: border-box;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
}

body.is-food .storage-note {
  display: none;
}

#hub-root {
  width: 100%;
  max-width: 480px;
  min-width: 0;
  margin: 0 auto;
  padding: 8px 0 24px;
}

.hub-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0 0 12px;
}

.hub-tab {
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 10px 2px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #cbb6e4;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.hub-tab[aria-selected="true"] {
  color: #f6eefe;
  border-bottom-color: #ff8c00;
}

.hub-tab:focus-visible {
  outline: 2px solid #ff8c00;
  outline-offset: 2px;
}

.hub-weeks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
}

.hub-week {
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(216, 180, 254, 0.35);
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: #f6eefe;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hub-week[aria-pressed="true"] {
  border-color: #ff8c00;
  color: #ff8c00;
}

.hub-week-head {
  margin: 0 0 8px;
  color: #f6eefe;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-align: center;
}

.hub-locks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  margin: 0 0 12px;
}

.hub-lock {
  color: #cbb6e4;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.hub-empty-week,
.hub-daily,
.hub-quiet,
.hub-brazil,
.hub-more {
  margin: 4px 0;
  color: #cbb6e4;
  font-size: 13px;
  line-height: 1.4;
}

.hub-daily {
  margin: 14px 0 0;
  text-align: center;
}

.hub-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.hub-day {
  display: flex;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(216, 180, 254, 0.25);
  border-radius: 12px;
  background: #1b0a2a;
  box-shadow: none;
  box-sizing: border-box;
}

.hub-day.is-focus {
  border-left: 2px solid #ff8c00;
}

.hub-day-date {
  flex: 0 0 42px;
  min-width: 42px;
}

.hub-dow {
  display: block;
  color: #cbb6e4;
  font-size: 11px;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: lowercase;
}

.hub-date {
  display: block;
  color: #f6eefe;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.hub-day.is-focus .hub-date {
  color: #ff8c00;
}

.hub-day-slots {
  flex: 1;
  min-width: 0;
}

.hub-slot-label {
  margin: 0;
  color: #cbb6e4;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hub-meal {
  margin: 0 0 4px;
  color: #f6eefe;
  font-size: 14px;
  line-height: 1.3;
}

.hub-smoothie {
  margin: 2px 0 2px 14px;
  color: #ff8c00;
  font-size: 13px;
  line-height: 1.35;
}

.hub-smoothie::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 8px;
  margin-right: 6px;
  vertical-align: middle;
  background-image: radial-gradient(circle, #ff8c00 1.15px, transparent 1.35px);
  background-size: 5px 8px;
  background-repeat: repeat-x;
  background-position: left center;
}

.hub-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid rgba(216, 180, 254, 0.18);
  border-radius: 16px;
  background: #1b0a2a;
  box-shadow: none;
  box-sizing: border-box;
  color: #f6eefe;
}

.hub-tile {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
}

.hub-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
}

.hub-row-copy {
  flex: 1;
  min-width: 0;
}

.hub-row-title {
  margin: 0 0 6px;
  color: #f6eefe;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.hub-metric {
  width: 100%;
  min-width: 0;
  margin: 0 0 8px;
}

.hub-metric:last-child {
  margin-bottom: 0;
}

.hub-track {
  position: relative;
  display: block;
  width: 100%;
  height: 4px;
  margin: 0 0 4px;
  border-radius: 2px;
  background: #150724;
  box-shadow: inset 0 0 0 1px rgba(216, 180, 254, 0.55);
  overflow: hidden;
}

.hub-fill {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #ff8c00;
}

.hub-metric-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: #cbb6e4;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.hub-pct {
  color: #f6eefe;
}

.account-banner {
  margin: 8px 0 0;
}

.account-banner-dismiss {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 12px;
  border: 0;
  border-top: 1px solid rgba(216, 180, 254, 0.28);
  background: #1b0a2a;
  color: #f6eefe;
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
}

.account-banner.is-in .account-banner-dismiss {
  animation: account-in 300ms ease-out;
}

.account-banner.is-out .account-banner-dismiss {
  opacity: 0;
  transition: opacity 300ms ease-out;
}

@keyframes account-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 340px) {
  .hub-tile {
    flex-basis: 88px;
    width: 88px;
    height: 88px;
  }

  .hub-pct {
    display: none;
  }
}

@media (min-width: 1280px) {
  .hub-tile {
    flex-basis: 96px;
    width: 96px;
    height: 96px;
  }
}

@media (min-width: 768px) {
  .hub-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
  }

  .hub-day {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-banner.is-in .account-banner-dismiss,
  .account-banner.is-out .account-banner-dismiss {
    animation: none;
    transition: none;
  }
}

/* v52 card decks. Appended only. Purple theme stays. */

body.is-deck .live-stack,
body.is-deck .mode-pair,
body.is-deck #btn-future-lock,
body.is-deck .phase-bar,
body.is-deck .month-bar,
body.is-deck .week-tabs,
body.is-deck .week-meta,
body.is-deck .schedule-switch,
body.is-deck .schedule-mode,
body.is-deck #training-board,
body.is-deck #planner-board,
body.is-deck #banner-live,
body.is-deck #banner-coach {
  display: none;
}

.deck-file { display: none; }

.deck-step {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.deck-step-btn,
.deck-add,
.deck-slot-add,
.deck-slot-name,
.deck-slot-arrow,
.deck-copy,
.deck-save,
.deck-clear,
.deck-text,
.deck-x,
.deck-chip,
.deck-mode,
.deck-backup,
.deck-pick,
.deck-tile,
.deck-copy-day {
  min-height: 44px;
  min-width: 44px;
}

.deck-step-btn,
.deck-x,
.deck-chip,
.deck-mode,
.deck-save,
.deck-clear,
.deck-text,
.deck-backup,
.deck-add,
.deck-copy,
.deck-slot-add,
.deck-slot-name,
.deck-slot-arrow {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.deck-step-btn {
  border-radius: 12px;
  background: var(--container);
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
}

.deck-step-label {
  margin: 0;
  text-align: center;
  font-weight: 700;
}

.deck-day {
  margin: 0 0 8px;
  padding: 12px;
  border: 1px solid rgba(216, 180, 254, 0.25);
  border-radius: 12px;
  background: var(--container);
}

.deck-day.is-focus { border-left: 2px solid var(--gold); }

.deck-day-title,
.deck-slot-label,
.deck-five,
.deck-col-title,
.deck-card-name,
.deck-card-meta,
.deck-overlay-title {
  margin: 0;
}

.deck-day-title { font-size: 16px; }

.deck-slot { margin-top: 8px; }

.deck-slot-label,
.deck-five,
.deck-tile-meta,
.deck-card-meta {
  color: var(--muted);
  font-size: 14px;
}

.deck-five { margin-top: 8px; }

.deck-slot-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deck-slot-name,
.deck-slot-add,
.deck-copy {
  text-align: left;
  padding: 0;
}

.deck-slot-add,
.deck-copy,
.deck-slot-arrow { color: var(--gold); }

.deck-slot-arrow {
  margin-left: auto;
  font-size: 22px;
}

.deck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deck-head h2 { margin: 0; font-size: 22px; }

.deck-add {
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
}

.deck-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.deck-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(216, 180, 254, 0.25);
  border-radius: 12px;
  background: var(--cell);
  color: var(--text);
  text-align: left;
}

.deck-thumb,
.deck-pick-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--container-deep);
}

.deck-tile-name,
.deck-pick-name { font-weight: 700; }

.deck-details { margin: 8px 0; color: var(--muted); }

.deck-paste-label,
.deck-field {
  display: block;
  width: 100%;
}

.deck-field {
  margin-top: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(216, 180, 254, 0.35);
  border-radius: 12px;
  background: var(--cell);
  color: var(--text);
  font: inherit;
}

.deck-log-line,
.deck-error { color: var(--gold); }

.deck-backup {
  margin-top: 16px;
  color: var(--muted);
  text-decoration: underline;
}

.deck-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  color: var(--text);
  overflow: auto;
}

.deck-overlay[hidden] { display: none; }

.deck-overlay-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deck-overlay-title { font-size: 18px; }

.deck-x {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--container);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.deck-x-right { position: absolute; top: 12px; right: 12px; }

.deck-picker-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 0;
  flex: 1;
}

.deck-picker-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--container);
  border-radius: 12px;
  padding: 8px;
}

.deck-picker-list {
  overflow: auto;
  max-height: calc(100dvh - 180px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deck-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--cell);
  color: var(--text);
  text-align: left;
}

.deck-pick.is-on { border-color: var(--gold); }

.deck-tick {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: transparent;
}

.deck-pick.is-on .deck-tick {
  background: var(--gold);
}

.deck-pick.is-on .deck-tick::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid #1b0a2a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.deck-picker-bar,
.deck-card-actions,
.deck-chips,
.deck-modes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.deck-save,
.deck-clear,
.deck-text,
.deck-chip,
.deck-mode,
.deck-copy-day {
  border-radius: 12px;
  background: var(--container);
  color: var(--text);
}

.deck-save {
  flex: 1;
  background: var(--gold);
  color: #1b0a2a;
  font-weight: 700;
}

.deck-save:disabled { opacity: 0.45; }

.deck-chip.is-on,
.deck-mode.is-on,
.deck-copy-day.is-on { outline: 2px solid var(--gold); }

.deck-card-stage {
  flex: 1;
  min-height: 240px;
  overflow: auto;
  touch-action: pinch-zoom;
  background: var(--container-deep);
  border-radius: 12px;
}

.deck-card-img {
  width: 100%;
  height: 100%;
  max-height: 70dvh;
  object-fit: contain;
  touch-action: pinch-zoom;
}

.deck-copy-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.deck-copy-dow,
.deck-copy-blank { text-align: center; color: var(--muted); font-size: 12px; }

.deck-copy-day.is-source { opacity: 0.35; }

.deck-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1400;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--container);
  color: var(--text);
}

.deck-empty { color: var(--muted); }

/* v53 deck polish. Header stays centred. Ambient marks stay off the words. The card image zooms on its own. */

body.is-deck .brand-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "toggle spacer clock"
    "title title title";
  align-items: center;
  column-gap: 8px;
}

body.is-deck .nav-toggle { grid-area: toggle; }

body.is-deck .header-corner {
  grid-area: clock;
  max-width: none;
}

body.is-deck .brand-main {
  grid-area: title;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  padding-top: 2px;
  text-align: center;
}

body.is-deck .card > .ambient-field { display: none; }

body.is-deck .deck-head {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  gap: 4px;
}

body.is-deck .deck-head h2,
body.is-deck .deck-add {
  width: 100%;
  text-align: center;
}

body.is-card-open { touch-action: none; }

#deck-card.deck-overlay {
  gap: 0;
  padding: 0;
  overflow: hidden;
  touch-action: none;
}

.deck-x-fixed {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  z-index: 8;
}

#deck-card .deck-card-stage {
  position: absolute;
  inset: 0;
  flex: none;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  border-radius: 0;
  background: #0b0216;
}

#deck-card .deck-card-img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  touch-action: none;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.deck-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: max(8px, env(safe-area-inset-top)) 8px 8px 8px;
  background: rgba(11, 2, 22, 0.82);
  transition: opacity 0.35s ease;
}

.deck-topbar .deck-x-fixed {
  position: static;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
}

.deck-topbar-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.deck-topbar .deck-card-name,
.deck-topbar .deck-card-meta {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-topbar .deck-card-name { font-size: 14px; line-height: 1.2; }

.deck-topbar .deck-card-meta { font-size: 12px; line-height: 1.2; }

.deck-bar-btn {
  flex: 0 0 auto;
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

#deck-card.is-chrome-hidden .deck-topbar {
  opacity: 0;
  pointer-events: none;
}

.deck-edit {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 60px;
  bottom: auto;
  z-index: 6;
  max-height: 70dvh;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  background: rgba(11, 2, 22, 0.94);
  transform: translateY(calc(-100% - 72px));
  transition: transform 0.28s ease;
  pointer-events: none;
}

.deck-edit.is-open {
  transform: translateY(0);
  pointer-events: auto;
}

.deck-field-label { display: block; }

.deck-field-label .deck-stepper-label { display: block; margin-bottom: 4px; }

.deck-stepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 36px 44px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.deck-stepper-label { font-weight: 700; }

.deck-stepper-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--container);
  color: var(--gold);
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.deck-stepper-btn:disabled { opacity: 0.35; }

.deck-stepper-value {
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.deck-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.deck-cancel {
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--container);
  color: var(--text);
  font: inherit;
}

.deck-edit .deck-field {
  margin-top: 0;
  font-size: 16px;
}

.deck-toast { transition: opacity 0.4s ease; }

.deck-toast.is-fading { opacity: 0; }

#deck-picker.deck-overlay { overflow: hidden; }

#deck-picker .deck-picker-cols {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
  min-height: 0;
  flex: 1;
}

.deck-picker-track {
  display: flex;
  width: 150%;
  height: 100%;
  touch-action: pan-y;
  transition: transform 220ms ease-out;
  will-change: transform;
}

.deck-picker-track.is-shift { transform: translateX(-33.3333%); }

.deck-picker-track .deck-picker-col,
.deck-picker-list,
.deck-pick,
.deck-pick img {
  touch-action: pan-y;
}

.deck-pick img,
.deck-pick-img {
  -webkit-user-drag: none;
}

.deck-picker-track .deck-picker-col {
  flex: 0 0 calc(100% / 3);
  width: calc(100% / 3);
  max-width: calc(100% / 3);
  box-sizing: border-box;
  padding: 0 8px;
  overflow: hidden;
}

.deck-picker-list {
  min-height: 0;
  max-height: calc(100dvh - 196px);
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.deck-picker-list > * { flex-shrink: 0; }

.deck-pills {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
}

.deck-pill {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 138, 0, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.train-lock {
  align-self: flex-end;
  min-height: 44px;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(216, 180, 254, 0.35);
  border-radius: 10px;
  background: #150724;
  color: #cbb6e4;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

.train-lock[aria-pressed="true"],
#btn-future-lock.train-lock[aria-pressed="true"] {
  border: 2px solid #ff8a00;
  color: #ff8a00;
}

#btn-future-lock.train-lock {
  color: #cbb6e4;
}

.mode-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 8px 0;
}

.mode-choice {
  min-height: 64px;
  padding: 10px 8px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #150724;
  color: #f6eefe;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.mode-choice[aria-pressed="true"] {
  border: 2px solid #ff8a00;
  color: #ff8a00;
}

.deck-pill.is-on {
  color: #ff8a00;
  box-shadow: 0 0 0 1px #ff8a00;
}

body.is-cards .schedule-mode,
body.is-cards .live-stack,
body.is-cards .mode-pair,
body.is-cards .phase-bar,
body.is-cards .month-bar,
body.is-cards .week-tabs,
body.is-cards .week-meta,
body.is-cards .schedule-switch,
body.is-cards #btn-future-lock,
body.is-cards #training-board,
body.is-cards #planner-board,
body.is-cards #banner-live,
body.is-cards #banner-coach {
  display: none;
}

.vc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 8px 18px;
}

.vc-cabin,
.vc-mod,
.vc-card {
  width: 100%;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #150724;
  color: #f6eefe;
  font: inherit;
  text-align: left;
}

.vc-cabin,
.vc-mod {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 10px 12px;
  font-weight: 800;
}

.vc-mod { min-height: 48px; background: #12051d; }

.vc-cabin[aria-expanded="true"],
.vc-mod[aria-expanded="true"] {
  border: 2px solid #ff8a00;
  color: #ff8a00;
}

.vc-count {
  color: #cbb6e4;
  font-size: 0.85rem;
  font-weight: 700;
}

.vc-cabin[aria-expanded="true"] .vc-count,
.vc-mod[aria-expanded="true"] .vc-count { color: #ff8a00; }

.vc-mods-inner,
.vc-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vc-mods-inner { padding-top: 6px; }
.vc-cards { padding: 6px 0 2px 8px; }

.vc-block.is-open .vc-mods-inner,
.vc-mod-block.is-open .vc-cards {
  animation: vc-open 180ms ease;
}

@keyframes vc-open {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.vc-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 44px;
  padding: 10px 12px;
  background: #1b0a2a;
}

.vc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.vc-card-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  line-height: 1.3;
}

.vc-in {
  flex: 0 0 auto;
  color: #ff8a00;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.vc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.vc-chip {
  padding: 2px 7px;
  border: 1px solid rgba(216, 180, 254, 0.35);
  border-radius: 999px;
  color: #cbb6e4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.vc-chip.is-mark {
  border-color: #ff8a00;
  color: #ff8a00;
}

.deck-flip {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1200px;
}

.deck-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s ease;
}

.deck-flip.is-flipped .deck-flip-inner { transform: rotateY(180deg); }

.deck-flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

.deck-flip-face.is-back { transform: rotateY(180deg); }

.deck-back-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-weight: 700;
}

.deck-bar-btn.is-muted { opacity: 0.55; }

.deck-upload-card {
  width: min(100%, 360px);
  margin: 0 auto;
  min-height: 220px;
}

.deck-upload-card img {
  width: 100%;
  max-height: 46dvh;
  object-fit: contain;
  border-radius: 16px;
}

.deck-front-line {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--cell);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.deck-stack-build {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 12px 0;
}

.deck-stack-slot {
  min-height: 72px;
  padding: 8px;
  border-radius: 12px;
  background: var(--cell);
  color: var(--text);
  text-align: left;
}

.deck-stack-slot.is-on { outline: 2px solid var(--gold); }

.deck-stack-kicker {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.deck-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}

.deck-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(246, 238, 254, 0.35);
}

.deck-dots i.is-on { background: var(--gold); }

.deck-bubble {
  margin: 8px 12px 0;
  padding: 10px;
  border: 1px solid rgba(216, 180, 254, 0.28);
  border-radius: 16px;
  background: #1b0a2a;
}

.deck-bubble-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.deck-bubble-tiles.is-single { grid-template-columns: 1fr; }

.deck-face {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 1px dashed rgba(255, 138, 0, 0.55);
  border-radius: 12px;
  background: #12051d;
  color: #cbb6e4;
  font: inherit;
  font-weight: 700;
  overflow: hidden;
}

.deck-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}

.deck-bubble .deck-front-line {
  width: 100%;
  margin-top: 8px;
  box-sizing: border-box;
}

.deck-bubble-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.deck-bubble-actions .deck-save { flex: 1; }

.deck-swap {
  margin-top: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #ff8a00;
  border-radius: 999px;
  background: transparent;
  color: #ff8a00;
  font: inherit;
  font-weight: 700;
}

.deck-daybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 12px 0;
  min-height: 44px;
}

.deck-daybar button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: #1b0a2a;
  color: #ff8a00;
  font: inherit;
  font-size: 22px;
  font-weight: 700;
}

.deck-day-label {
  color: #f6eefe;
  font-weight: 700;
}

.deck-plan-slots,
.deck-stack-build {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.deck-slot-mod {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 64px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: #150724;
  color: #f6eefe;
  text-align: left;
  font: inherit;
}

.deck-slot-mod.is-armed {
  box-shadow: 0 0 0 2px #ff8a00, 0 0 14px rgba(255, 138, 0, 0.55);
}

.deck-slot-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.deck-slot-thumb {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  background: #12051d;
}

.deck-slot-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #cbb6e4;
  font: inherit;
  line-height: 1;
}

.deck-tile.is-just-added {
  outline: 2px solid #ff8a00;
  outline-offset: 0;
}

.deck-undo {
  border: 0;
  background: transparent;
  color: #ff8a00;
  font: inherit;
  font-weight: 700;
  padding: 0;
}

.relic-line {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
}

.relic-line .cite-link { flex: 1; min-width: 0; padding-right: 2px; padding-left: 2px; }

.combo-play {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 6px 6px;
  border: 0;
  background: transparent;
  color: var(--cite);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.combo-play.is-line-on {
  color: #ff8a00;
  text-decoration-line: underline line-through;
  text-decoration-color: #ff8a00;
}

.plan-pick {
  flex: 0 0 18px;
  width: 18px;
  height: 22px;
  border: 1px solid rgba(216, 180, 254, 0.45);
  border-radius: 6px;
  background: #150724;
  color: #ff8a00;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

#sched-root { padding: 8px 8px 0; }

.sched-go,
.sched-save,
.sched-auto,
.sched-sec-btn,
.sched-play,
.plan-choice {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #150724;
  color: #f6eefe;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.sched-go { margin-bottom: 10px; padding: 10px 12px; }

.sched-h {
  margin: 0 0 6px;
  color: #cbb6e4;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sched-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
}

.sched-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 8px 6px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 14px;
  background: #1b0a2a;
  color: #f6eefe;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.sched-tab.is-on {
  border: 2px solid #ff8a00;
  color: #ff8a00;
  box-shadow: 0 0 12px rgba(255, 138, 0, 0.28);
}

.sched-tab-count {
  display: inline-block;
  margin-left: 2px;
  color: #cbb6e4;
}

.sched-tab.is-on .sched-tab-count { color: #ff8a00; }

#sched-list[hidden] { display: none; }

.sched-empty {
  margin: 4px 0 8px;
  color: #cbb6e4;
  font-size: 0.85rem;
  font-weight: 700;
}

.sched-fav {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 10px;
  background: #12051d;
  color: #f6eefe;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
}

.sched-fav.is-on {
  border-color: #ff8a00;
  background: rgba(255, 138, 0, 0.18);
}

.sched-row-actions { display: flex; flex: 0 0 auto; gap: 6px; }

.sched-group-row { flex-wrap: wrap; }

.sched-group-play,
.sched-group-new {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 14px;
  background: #1b0a2a;
  color: #f6eefe;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.sched-group-row .sched-group-play { flex: 1 1 100%; margin-bottom: 0; }

.sched-slot-badge {
  flex: 0 0 auto;
  color: #cbb6e4;
  font-size: 0.72rem;
  font-weight: 700;
}

.group-quick,
.group-day {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 14px;
  background: #1b0a2a;
}

.group-quick-label,
.group-day h3 {
  margin: 0;
  color: #f6eefe;
  font-size: 0.85rem;
  font-weight: 800;
}

.group-quick label,
.group-day label,
#group-place-sheet label {
  display: block;
  margin-top: 8px;
  color: #cbb6e4;
  font-size: 0.75rem;
  font-weight: 700;
}

.group-quick select,
.group-day select,
#group-place-sheet select {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #12051d;
  color: #f6eefe;
  font: inherit;
  font-weight: 700;
}

#group-fill,
#group-place-go {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: #ff8a00;
  color: #12051d;
  font: inherit;
  font-weight: 800;
}

#group-place-sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(11, 2, 22, 0.72);
}

#group-place-sheet[hidden] { display: none; }

.sched-toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: min(440px, calc(100% - 24px));
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #ff8a00;
  border-radius: 12px;
  background: #1b0a2a;
  color: #f6eefe;
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
}

.sched-toast[hidden] { display: none; }

.plan-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.sched-row > .sched-play {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.sched-group-row { flex-wrap: wrap; }

.sched-group-row .sched-row-actions {
  flex-wrap: wrap;
  width: 100%;
}

.sched-play {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 12px;
}

.sched-play-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}
.sched-play-count,
.sched-count { color: #cbb6e4; font-size: 0.8rem; font-weight: 700; }

.sched-row-actions { display: flex; flex: 0 0 auto; gap: 6px; }

.sched-row-actions .sched-fav {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
}

.sched-row-actions button,
.sched-item-moves button,
.sched-cancel,
.sched-confirm button,
.plan-clear,
.plan-close {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 10px;
  background: #12051d;
  color: #f6eefe;
  font: inherit;
  font-weight: 700;
}

.sched-confirm {
  flex: 1 1 100%;
  margin: 0;
  color: #f6eefe;
  font-size: 0.85rem;
}

.sched-confirm button { margin-left: 6px; }

.sched-name {
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #12051d;
  color: #f6eefe;
  font: inherit;
  font-weight: 700;
}

.sched-sec { margin-bottom: 6px; }

.sched-sec-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}

.sched-sec.is-on .sched-sec-btn {
  border: 2px solid #ff8a00;
  color: #ff8a00;
  box-shadow: 0 0 12px rgba(255, 138, 0, 0.28);
}

.sched-sec.is-on .sched-count { color: #ff8a00; }

.sched-items { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 2px 8px; }

.sched-sec:not(.is-on) .sched-items { display: none; }

.sched-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #1b0a2a;
}

.sched-item-title { font-weight: 700; line-height: 1.3; }
.sched-item-moves { display: flex; gap: 4px; flex: 0 0 auto; }

.sched-note {
  margin: 4px 0;
  color: #ff8a00;
  font-size: 0.8rem;
  font-weight: 700;
}

.sched-auto,
.sched-save { padding: 10px 12px; margin-top: 8px; }

.sched-actions { display: flex; gap: 6px; }
.sched-actions .sched-save { flex: 1; }
.sched-cancel { margin-top: 8px; }

.sched-msg { min-height: 1.2em; margin: 6px 0 0; color: #cbb6e4; font-size: 0.8rem; }

.sched-guide-btn,
.sched-guide-sec {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #150724;
  color: #f6eefe;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.sched-guide-sec[aria-expanded="true"],
.sched-guide-btn[aria-expanded="true"] {
  border: 2px solid #ff8a00;
  color: #ff8a00;
}

.sched-guide-lead,
.sched-guide-copy {
  margin: 6px 0;
  color: #f6eefe;
  font-size: 0.85rem;
  line-height: 1.4;
}

.sched-guide-copy ul,
.sched-guide-copy ol { margin: 6px 0; padding-left: 1.1em; }
.sched-guide-copy li { margin: 4px 0; }
.sched-guide-copy a { color: #ff8a00; }

.sched-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.sched-table th,
.sched-table td {
  padding: 4px;
  border-bottom: 1px solid rgba(216, 180, 254, 0.25);
  text-align: left;
  vertical-align: top;
}

#plan-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(11, 2, 22, 0.72);
}

#plan-sheet[hidden] { display: none; }

.plan-sheet-card {
  width: min(480px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 12px 12px 18px;
  border-radius: 16px 16px 0 0;
  background: #1b0a2a;
}

.plan-sheet-title {
  margin: 0 0 8px;
  font-weight: 800;
}

.plan-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding: 8px 12px;
}

.plan-clear,
.plan-close { width: 100%; margin-top: 6px; }

.vc-card-wrap { position: relative; }

.vc-card-wrap.has-eye .vc-card {
  padding-right: 52px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.vc-card-wrap.has-eye .vc-card-top { align-items: center; }

.vc-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ff8a00;
}

.vc-eye svg { display: block; }

.vc-mod.is-upload {
  border: 2px solid #ff8a00;
  color: #ff8a00;
  box-shadow: 0 0 12px rgba(255, 138, 0, 0.28);
}

.vc-mod.is-upload .vc-count { color: #ff8a00; }

#vc-tools { padding: 8px 8px 0; }

.vc-storage { margin-bottom: 8px; }

.vc-storage-track {
  height: 6px;
  border-radius: 999px;
  background: #150724;
  overflow: hidden;
}

.vc-storage-fill {
  height: 100%;
  width: 0;
  background: #ff8a00;
}

#vc-storage-label {
  display: block;
  margin-top: 4px;
  color: #cbb6e4;
  font-size: 0.75rem;
  font-weight: 700;
}

#vc-upload-btn,
.vc-save {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #1b0a2a;
  color: #f6eefe;
  font: inherit;
  font-weight: 800;
}

.vc-save:disabled { opacity: 0.7; }

.vc-upload-msg {
  min-height: 1.2em;
  margin: 6px 0 0;
  color: #cbb6e4;
  font-size: 0.8rem;
  font-weight: 700;
}

.vc-upload-msg.is-warn { color: #ff8a00; }

#vc-upload-box {
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 14px;
  background: #1b0a2a;
}

.vc-upload-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vc-upload-title {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 180, 254, 0.32);
  border-radius: 12px;
  background: #12051d;
  color: #f6eefe;
  font: inherit;
  font-weight: 700;
}

.vc-upload-cancel {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #cbb6e4;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.vc-upload-dest {
  margin: 8px 0 0;
  color: #cbb6e4;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.vc-upload-save {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #ff8a00;
  color: #12051d;
  font: inherit;
  font-weight: 800;
}

.vc-upload-save:disabled { opacity: 0.7; }

#vc-upload-save[hidden] { display: none; }

.vc-progress {
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: #150724;
  overflow: hidden;
}

.vc-progress > div {
  height: 100%;
  width: 0;
  background: #ff8a00;
}

.vc-progress[hidden],
#vc-storage[hidden],
#vc-preview[hidden] { display: none; }

.vc-del {
  margin-top: 4px;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #cbb6e4;
  font: inherit;
  font-weight: 700;
}

.vc-confirm {
  margin: 4px 0 0;
  color: #cbb6e4;
  font-size: 0.85rem;
  font-weight: 700;
}

.vc-confirm button {
  margin-left: 6px;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ff8a00;
  font: inherit;
  font-weight: 800;
}

#vc-preview {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 2, 22, 0.72);
}

.vc-preview-card {
  position: relative;
  width: min(480px, 100%);
  padding: 16px 12px 12px;
  border-radius: 16px;
  background: #1b0a2a;
}

.vc-preview-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f6eefe;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.vc-preview-title {
  margin: 0 44px 10px 0;
  color: #f6eefe;
  font-weight: 800;
}

#vc-preview-video {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #12051d;
  border-radius: 12px;
}
