/* Cued — app-specific layout. Loaded after styles.css. */

/* ============================= Frosted design language =============================
   The app-wide visual system: the pacing-gradient colours live in the page
   background as soft radial washes; content sits on frosted glass over them;
   controls are "flat lenses" (light convex interior, thin ink outline); the
   odd-one-out object in a list is dark smoked glass; hovering a row makes
   the pace rule glow beneath it. Stage (presentation) pages stay near-black. */

body:not(.stage-body) {
  background:
    radial-gradient(120% 60% at 8% 0%, rgba(153,224,255,0.42), transparent 55%),
    radial-gradient(110% 55% at 96% 4%, rgba(255,69,142,0.2), transparent 55%),
    radial-gradient(120% 70% at 60% 100%, rgba(237,187,0,0.2), transparent 58%),
    var(--color-bg);
  background-attachment: fixed;
}

/* Flat-lens button: light convex interior, thin ink outline */
.btn-lens {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  border: 1.5px solid rgba(0,73,97,0.65); color: var(--color-accent-800);
  font-family: var(--font-heading); font-weight: 600; font-size: 13.5px;
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 48%, #d9eff7 100%);
  border-radius: 999px; padding: 8px 16px; text-decoration: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.btn-lens:hover, .btn-lens:focus-visible { border-color: rgba(0,136,176,0.9); box-shadow: 0 4px 16px rgba(0,136,176,0.25); }

/* Quiet glass pill (secondary actions on light pages) */
.pill-ghost {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 999px;
  border: 1px solid rgba(32,30,29,0.22); background: rgba(255,255,255,0.35); color: rgba(32,30,29,0.75);
  font-family: var(--font-heading); font-weight: 600; font-size: 12.5px; padding: 7px 14px; text-decoration: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.pill-ghost:hover { background: rgba(255,255,255,0.7); border-color: rgba(32,30,29,0.35); color: var(--color-text); }

/* Prism play button. Rest: flat lens. Hover: the pacing colour wheel
   surfaces behind a fixed lens layer, rotating with a wave-like cadence,
   while the outer halo breathes between the rule's cyan and magenta ends. */
.prism-play {
  position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  padding: 0; overflow: hidden; border: 1.5px solid rgba(0,73,97,0.65);
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 48%, #d9eff7 100%);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: border-color .3s ease;
}
.prism-play .wheel {
  position: absolute; inset: -30%; border-radius: 50%; opacity: 0; transition: opacity .35s ease;
  background: conic-gradient(from 0deg, #99e0ff, #0088b0 26%, #edbb00 58%, #ff458e 82%, #99e0ff);
}
.prism-play .lens {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,0.75), rgba(255,255,255,0.12) 40%, transparent 58%);
  box-shadow: inset 0 -7px 12px rgba(11,20,28,0.32), inset 0 3px 5px rgba(255,255,255,0.45);
}
.prism-play .glyph {
  position: relative; z-index: 2; color: var(--color-accent-800); font-size: 12px; line-height: 1;
  transition: color .3s ease, text-shadow .3s ease;
}
.prism-play:hover, .prism-play:focus-visible { border-color: rgba(255,255,255,0.4); animation: cuedPrismPulse 3.5s ease-in-out infinite; }
.prism-play:hover .wheel, .prism-play:focus-visible .wheel { opacity: 1; animation: cuedPrismSpin 7s cubic-bezier(.45,.05,.55,.95) infinite; }
.prism-play:hover .lens, .prism-play:focus-visible .lens { opacity: 1; }
.prism-play:hover .glyph, .prism-play:focus-visible .glyph { color: #fff; text-shadow: 0 1px 3px rgba(11,20,28,0.4); }
@keyframes cuedPrismSpin { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.09); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes cuedPrismPulse { 0%,100% { box-shadow: 0 4px 14px rgba(0,136,176,0.4); } 50% { box-shadow: 0 6px 22px rgba(255,69,142,0.45); } }
@media (prefers-reduced-motion: reduce) {
  .prism-play:hover, .prism-play:focus-visible,
  .prism-play:hover .wheel, .prism-play:focus-visible .wheel { animation: none; }
}

/* ============================= Auth ============================= */
.auth-shell {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: var(--space-6) var(--space-4); gap: var(--space-6);
}
.auth-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: var(--space-4); }
.auth-card form { display: flex; flex-direction: column; gap: var(--space-3); }
.auth-switch { font-size: 14px; color: rgba(32,30,29,0.7); text-align: center; }

/* ============================= Top nav ============================= */
.app-nav { border-bottom: 1px solid var(--color-divider); background: var(--color-bg); position: sticky; top: 0; z-index: 20; }

/* ============================= Dashboard ============================= */
.dashboard { max-width: 560px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); }
.deck-list { display: flex; flex-direction: column; gap: 11px; }

.dashboard-head { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 20px; }

/* Gentle "confirm your email" nag until the address is verified. */
.verify-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 10px 14px; border-radius: 12px; font-size: 13px; color: rgba(32,30,29,0.75);
  background: rgba(255,255,255,0.5);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(237,187,0,0.5);
}
.verify-banner span { flex: 1; min-width: 200px; }
.verify-banner button {
  border: 1px solid rgba(0,73,97,0.5); background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 55%, #d9eff7 100%);
  color: var(--color-accent-800); font: 600 12.5px/1 var(--font-heading); border-radius: 999px;
  padding: 6px 13px; cursor: pointer;
}
.verify-banner button:hover { border-color: rgba(0,136,176,0.9); }

.deck-row {
  position: relative; display: flex; align-items: center; gap: var(--space-3); padding: 14px 15px;
  background: rgba(255,255,255,0.5); color: inherit; text-decoration: none;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.75); border-radius: 14px;
  box-shadow: 0 1px 1px rgba(255,255,255,0.6) inset, 0 6px 22px rgba(32,30,29,0.08);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.deck-row:hover { border-color: rgba(255,255,255,0.95); box-shadow: 0 1px 1px rgba(255,255,255,0.7) inset, 0 8px 26px rgba(32,30,29,0.11); }
.deck-row::before {
  content: ''; position: absolute; left: 8%; right: 8%; bottom: -8px; height: 16px; border-radius: 50%;
  background: var(--pacing-gradient); filter: blur(15px); opacity: 0; z-index: -1; transition: opacity .3s ease;
}
.deck-row:hover::before { opacity: 0.55; }
.deck-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; }
.deck-row-name { font-family: var(--font-heading); font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-row-meta { font-size: 12.5px; color: rgba(32,30,29,0.55); font-variant-numeric: tabular-nums; }
.deck-row-actions { display: flex; gap: 2px; flex: none; padding-left: 11px; border-left: 1px solid rgba(32,30,29,0.14); }
.deck-row-actions .btn-icon { border-radius: 10px; }
.deck-row-actions .btn-icon:hover { background: rgba(255,255,255,0.7); }

/* Timer Only: the list's one dark smoked-glass row, held slightly apart
   from the speeches below it */
.deck-row-timer {
  background: rgba(24,22,21,0.82); color: #f6f4f2;
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 6px 22px rgba(32,30,29,0.18);
  margin-bottom: 13px;
}
.deck-row-timer:hover { border-color: rgba(255,255,255,0.26); box-shadow: 0 6px 22px rgba(32,30,29,0.18); }
.deck-row-timer .deck-row-name { color: #f6f4f2; font-size: 15.5px; }
.deck-row-timer-icon { flex: none; font-size: 18px; }
.deck-row-timer-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.deck-row-timer .target-time-picker { flex-wrap: wrap; }
.deck-row-timer .target-time-picker .input {
  background: rgba(255,255,255,0.1); color: #f6f4f2; border-color: rgba(255,255,255,0.2); min-height: 34px;
}
.deck-row-timer .target-time-picker .input:hover { border-color: rgba(255,255,255,0.4); }
.deck-row-timer .target-time-picker select.input option { color: var(--color-text); }
.deck-row-timer .text-muted { color: rgba(246,244,242,0.55); }

.target-time-picker { display: flex; align-items: center; gap: 6px; }
.target-time-picker input[type="number"] { width: 68px; }
.target-time-picker select { width: 74px; }
.target-time-picker .text-muted { font-size: 13px; }

/* ============================= New speech wizard ============================= */
.wizard-shell {
  max-width: 560px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-4);
}

/* ============================= Editor (Green Room) ============================= */
.editor-shell { display: flex; flex-direction: column; min-height: 100vh; }
.editor-topbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: var(--space-3) var(--space-4) 0; padding: 9px 13px;
  background: rgba(255,255,255,0.4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.7); border-radius: 14px;
}
.editor-topbar .deck-name-input { font: 600 16px/1.2 var(--font-heading); letter-spacing: -0.01em; border: 0; background: none; padding: 4px 2px; min-height: unset; max-width: 40vw; }
.editor-topbar .deck-name-input:hover, .editor-topbar .deck-name-input:focus-visible { background: rgba(255,255,255,0.6); border-radius: 8px; }
.editor-topbar .spacer { flex: 1; }
.editor-meta { font-size: 12.5px; color: rgba(32,30,29,0.55); white-space: nowrap; font-variant-numeric: tabular-nums; }
.editor-meta.meta-warn { color: var(--color-accent-2-700); }

/* Mobile: the topbar collapses to one row -- back, name, Present, and a
   "⋯" toggle that reveals the secondary actions (target time, meta,
   view switch, Export PDF, Practice) in a wrapped row beneath. */
.topbar-more {
  display: none; flex: none; width: 34px; height: 34px; border: 0; background: none; cursor: pointer;
  border-radius: 10px; font-size: 18px; line-height: 1; color: rgba(32,30,29,0.55);
  align-items: center; justify-content: center;
}
.topbar-more:hover { background: rgba(255,255,255,0.6); color: var(--color-text); }
@media (max-width: 899px) {
  .topbar-more { display: flex; }
  .editor-topbar .spacer { display: none; }
  .editor-topbar .deck-name-input { flex: 1; min-width: 0; max-width: none; }
  .editor-topbar .editor-meta,
  .editor-topbar .pill-ghost,
  .editor-topbar #settingsBtn { display: none; }
  .editor-topbar.expanded { row-gap: 8px; }
  .editor-topbar.expanded .pill-ghost,
  .editor-topbar.expanded #settingsBtn { display: inline-flex; }
  .editor-topbar.expanded .editor-meta { display: inline; }
}

.editor-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.editor-pane-label { font: 400 12px/1 var(--font-heading); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(32,30,29,0.6); padding: var(--space-3) var(--space-4) var(--space-1); }
.editor-hint { font-size: 12px; color: rgba(32,30,29,0.55); padding: 0 var(--space-4) var(--space-2); }

.script-pane { display: flex; flex-direction: column; padding: 0 var(--space-4) var(--space-3); gap: var(--space-2); }
.script-textarea {
  flex: 1; min-height: 260px; width: 100%; resize: vertical; padding: var(--space-3) 18px;
  border: 1px solid rgba(255,255,255,0.85); border-radius: 12px;
  background: rgba(255,255,255,0.62);
  box-shadow: 0 1px 1px rgba(255,255,255,0.6) inset;
  font: 400 16px/1.7 var(--font-body); color: var(--color-text); outline: none;
}
.script-textarea:focus-visible { border-color: var(--color-accent-400); }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 7px 12px; border: 1px solid rgba(32,30,29,0.22); border-radius: 999px;
  background: rgba(255,255,255,0.4); font: 400 12.5px/1 var(--font-body); letter-spacing: 0.03em;
  color: rgba(32,30,29,0.7); cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.chip:hover { background: rgba(255,255,255,0.8); color: var(--color-text); }
.chip.active {
  border: 1.5px solid rgba(0,73,97,0.4); color: var(--color-accent-800); font-weight: 600;
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 48%, #d9eff7 100%);
}
.chip-strong { font-weight: 700; }
.chip-underline { text-decoration: underline; }
.chip-highlight { background: rgba(203,238,255,0.75); }
.chip-newcard {
  font-weight: 600; color: var(--color-accent-700); border: 1.5px solid transparent; padding: 7px 13px;
  background:
    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)) padding-box,
    linear-gradient(120deg, #99e0ff, #0088b0 30%, #edbb00 68%, #ff458e) border-box;
}
.chip-newcard:hover {
  color: var(--color-accent-800);
  background:
    linear-gradient(rgba(255,255,255,0.75), rgba(255,255,255,0.75)) padding-box,
    linear-gradient(120deg, #99e0ff, #0088b0 30%, #edbb00 68%, #ff458e) border-box;
}

.cards-pane { display: flex; flex-direction: column; padding: 0 var(--space-4) var(--space-6); gap: var(--space-3); }
.card-list { display: flex; flex-direction: column; gap: var(--space-3); }
.card-item { position: relative; display: flex; gap: var(--space-3); align-items: flex-start; }
.card-item.dragging { opacity: 0.4; }
.card-item.drop-before::before,
.card-item.drop-after::after {
  content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px;
  background: var(--color-accent);
}
.card-item.drop-before::before { top: calc(-1 * var(--space-3) / 2 - 1px); }
.card-item.drop-after::after { bottom: calc(-1 * var(--space-3) / 2 - 1px); }
.card-num-col { width: 30px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 3px; }
.card-num { font: 600 14px/1 var(--font-heading); color: var(--color-accent); font-variant-numeric: tabular-nums; }
.card-drag-handle { cursor: grab; font-size: 13px; color: var(--color-neutral-400); touch-action: none; }
.card-body-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card-action-label { align-self: flex-start; padding: 4px 9px; background: var(--color-accent-2-200); border-radius: var(--radius-md); font: 600 11px/1 var(--font-heading); letter-spacing: 0.1em; color: var(--color-accent-2-700); }
.card-text { font-size: 15px; line-height: 1.5; margin: 0; white-space: pre-line; }
.card-text mark { background: var(--color-accent-200); border-radius: var(--radius-sm); padding: 0 2px; color: inherit; }
.card-foot { display: flex; align-items: baseline; gap: 12px; font-size: 13px; color: rgba(32,30,29,0.6); }
.card-foot button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--color-accent-700); }
.card-foot button.danger { color: var(--color-accent-2-700); }

@media (min-width: 900px) {
  .editor-body { flex-direction: row; align-items: stretch; }
  .script-pane { flex: 1.4; min-width: 0; border-right: 1px solid var(--color-divider); }
  .cards-pane { flex: 1; min-width: 0; max-width: 480px; }
  .card-list { max-height: 70vh; overflow: auto; padding-right: 4px; }
  .script-textarea { min-height: 480px; }
}

/* ============================= Cards view (PowerPoint-style outline + canvas) ============================= */
.cards-editor-shell { flex: 1; display: flex; min-height: 0; }

.cards-outline {
  width: 270px; flex: none; border-right: 1px solid var(--color-divider);
  overflow-y: auto; padding: var(--space-3); display: flex; flex-direction: column; gap: 10px;
}
/* The outline stays a scroll container even mid-drag: dragging into its
   last ~48px auto-scrolls it (see autoScrollTick in cards.js), so a touch
   drag can reach cards that are off-screen. */
.outline-item {
  position: relative;
  display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.45); color: var(--color-text); font: inherit; flex: none;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color .25s ease;
}
.outline-item::after {
  content: ''; position: absolute; left: 10%; right: 10%; bottom: -6px; height: 12px; border-radius: 50%;
  background: var(--pacing-gradient); filter: blur(12px); opacity: 0; z-index: -1; transition: opacity .3s ease;
}
.outline-item:hover::after { opacity: 0.45; }
.outline-item:hover { border-color: rgba(255,255,255,0.95); }
.outline-item.selected { border-color: rgba(255,255,255,0.95); }
.outline-item.selected::after { opacity: 0.6; }
.outline-item.selected::before {
  content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 2.5px;
  background: var(--pacing-gradient); border-radius: 0 0 3px 3px;
}
.outline-item.dragging {
  z-index: 10; cursor: grabbing; box-shadow: var(--shadow-lg);
  transition: none; /* the transform follows the pointer every frame -- no easing lag */
}
.outline-item.drop-before::before,
.outline-item.drop-after::after {
  content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px;
  background: var(--color-accent); z-index: 1;
}
.outline-item.drop-before::before { top: -6px; }
.outline-item.drop-after::after { bottom: -6px; }
.outline-item-head { display: flex; align-items: center; gap: 6px; }
.outline-drag-handle {
  flex: none; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none;
  font-size: 14px; line-height: 1; color: rgba(32,30,29,0.4); padding: 6px 3px; margin: -6px -3px -6px -6px;
}
.outline-drag-handle:hover { color: rgba(32,30,29,0.7); }
.outline-item-num { font: 600 12px/1 var(--font-heading); color: var(--color-accent); font-variant-numeric: tabular-nums; }
.outline-item-dur-wrap { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.outline-item-dur { font-size: 11px; color: rgba(32,30,29,0.55); font-variant-numeric: tabular-nums; }
.outline-clock-indicator { font-size: 12px; line-height: 1; opacity: 0.4; }
.outline-clock-indicator.is-set { opacity: 1; filter: saturate(2); }
.outline-item-preview {
  font-size: 13px; line-height: 1.4; color: rgba(32,30,29,0.85); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.outline-item-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.outline-item-tag {
  font: 600 10px/1 var(--font-heading); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-accent-2-700); background: var(--color-accent-2-100); padding: 3px 6px; border-radius: var(--radius-sm);
}
/* Thin "insert card here" affordance between outline items -- a line with
   a small + badge, always visible (not hover-only: this has to work with
   a finger on a phone, not just a mouse hovering). Row direction fills the
   width in the desktop column layout; flipped to fill the height in the
   mobile row strip below. */
.outline-insert {
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  width: 100%; height: 16px; margin: -3px 0; padding: 0; border: 0; background: none; cursor: pointer;
}
.outline-insert-line { flex: 1; height: 1px; background: var(--color-divider); transition: background .15s ease; }
.outline-insert-icon {
  flex: none; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 600 13px/1 var(--font-heading); color: rgba(32,30,29,0.4); border: 1px solid rgba(32,30,29,0.2);
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 60%, #d9eff7 100%);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.outline-insert:hover .outline-insert-icon, .outline-insert:focus-visible .outline-insert-icon {
  color: #fff; border-color: var(--color-accent); background: var(--color-accent);
}
.outline-insert:hover .outline-insert-line, .outline-insert:focus-visible .outline-insert-line { background: var(--color-accent-400); }

.cards-canvas {
  flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column;
  margin: var(--space-3) var(--space-3) var(--space-3) 0; border-radius: 14px;
  background: rgba(255,255,255,0.5);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 1px 1px rgba(255,255,255,0.6) inset, 0 6px 22px rgba(32,30,29,0.08);
}
.canvas-toolbar {
  flex: none; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid rgba(32,30,29,0.1); flex-wrap: wrap;
}
.canvas-toolbar .canvas-position { font-size: 13px; color: rgba(32,30,29,0.6); font-variant-numeric: tabular-nums; }
.canvas-toolbar .spacer { flex: 1; }
.canvas-body { flex: 1; padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; }
.canvas-card { max-width: 640px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 22px; }
.canvas-card.view-mode { cursor: text; }

/* Inline per-card timing slider */
.canvas-timing { max-width: 640px; width: 100%; margin: 0 auto var(--space-6); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.canvas-timing-label { font: 600 15px/1 var(--font-heading); color: var(--color-text); font-variant-numeric: tabular-nums; }
.canvas-timing-track-wrap { display: flex; align-items: center; gap: 10px; width: 100%; }
.canvas-timing-endpoint { flex: none; font-size: 12px; color: rgba(32,30,29,0.5); font-variant-numeric: tabular-nums; }
.canvas-timing-track { position: relative; flex: 1; height: 24px; display: flex; align-items: center; }
.canvas-timing-chevron {
  position: absolute; top: -7px; width: 0; height: 0; transform: translateX(-50%); pointer-events: none;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--color-neutral-600);
}
.canvas-timing-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: var(--radius-md);
  background: var(--pacing-gradient); cursor: pointer; margin: 0;
}
.canvas-timing-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 55%, #d9eff7 100%);
  border: 1.5px solid rgba(0,73,97,0.65); box-shadow: var(--shadow-sm); cursor: grab;
}
.canvas-timing-slider::-webkit-slider-thumb:active { cursor: grabbing; }
.canvas-timing-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 55%, #d9eff7 100%);
  border: 1.5px solid rgba(0,73,97,0.65); box-shadow: var(--shadow-sm); cursor: grab;
}
.canvas-timing-slider::-moz-range-track { background: transparent; }
.canvas-timing-auto-link {
  background: none; border: 0; padding: 0; cursor: pointer; font-size: 13px; color: var(--color-accent-700);
}
.canvas-timing-auto-link:hover { color: var(--color-accent-900); }
.canvas-empty { max-width: 480px; margin: auto; text-align: center; display: flex; flex-direction: column; gap: 14px; color: rgba(32,30,29,0.6); }

.canvas-block-action {
  align-self: flex-start; font: 600 13px/1 var(--font-heading); letter-spacing: 0.14em;
  color: var(--color-accent-2-700); background: var(--color-accent-2-100); padding: 7px 13px; border-radius: var(--radius-md);
}
.canvas-block-text { font: 400 clamp(22px, 3.4vw, 32px)/1.44 var(--font-body); color: var(--color-text); margin: 0; white-space: pre-line; }
.canvas-block-text mark { background: var(--color-accent-200); border-radius: var(--radius-sm); padding: 0 3px; color: inherit; }
.canvas-placeholder-hint { font: 400 15px/1.5 var(--font-body); color: rgba(32,30,29,0.45); font-style: italic; }

.canvas-textarea {
  width: 100%; resize: none; overflow: hidden; border: 0; background: none; outline: none; padding: 0;
  font: 400 clamp(22px, 3.4vw, 32px)/1.44 var(--font-body); color: var(--color-text);
}
.canvas-edit-hint { font-size: 12px; color: rgba(32,30,29,0.5); }
.canvas-edit-actions { display: flex; gap: 8px; }

@media (max-width: 899px) {
  .cards-editor-shell { flex-direction: column; }
  .cards-outline { width: 100%; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--color-divider); }
  .outline-item { width: 170px; }
  .outline-item.drop-before::before,
  .outline-item.drop-after::after { left: auto; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .outline-item.drop-before::before { top: 0; left: -6px; }
  .outline-item.drop-after::after { top: 0; left: auto; right: -6px; bottom: 0; }
  .outline-insert { flex-direction: column; width: 16px; height: auto; align-self: stretch; margin: 0 -3px; }
  .outline-insert-line { width: 1px; height: auto; }
  .canvas-body { padding: var(--space-6) var(--space-4); }
  .canvas-toolbar { padding: var(--space-2) var(--space-4); }
}

/* ============================= Stage / Presentation ============================= */
body.stage-body { background: #000; }
.stage-page { background: #000; color: #fff; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.stage-masthead {
  flex: none; background: rgba(255,255,255,0.06); padding: max(env(safe-area-inset-top), 22px) 24px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.stage-clock-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.stage-clock { background: none; border: 0; padding: 0; cursor: pointer; font: 600 46px/1 var(--font-heading); letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.stage-clock-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-bottom: 5px; }
.stage-slot-label { font: 400 13px/1 var(--font-body); color: rgba(255,255,255,0.5); font-variant-numeric: tabular-nums; }
.stage-over-label { font: 400 13px/1 var(--font-body); font-style: italic; color: rgba(255,255,255,0.42); }
.stage-bar { position: relative; height: 7px; width: 100%; border-radius: var(--radius-md); overflow: hidden; background: rgba(255,255,255,0.08); }
.stage-bar-track { position: absolute; inset: 0; background: var(--pacing-gradient); opacity: 0.2; }
.stage-bar-fill { position: absolute; top: 0; left: 0; bottom: 0; overflow: hidden; width: 0%; transition: width .25s linear; }
.stage-bar-fill > span { position: absolute; inset: 0; width: 100vw; background: var(--pacing-gradient); }

/* Controls row lives INSIDE the masthead, below the pace bar -- never
   floating over it, so it can't overlap the clock/bar on any screen size. */
.stage-masthead-controls { display: flex; align-items: center; gap: 10px; flex: none; }
.stage-icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7); cursor: pointer; font-size: 16px; flex: none;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.stage-icon-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.stage-icon-btn.hidden { display: none; }

/* Sits bottom-right of the card's own content area (.stage-main is
   position:relative), not the masthead -- it tracks THIS card's time. */
.card-time-wheel {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  width: 58px; height: 58px; flex: none;
  border-radius: 50%; background: rgba(255,255,255,0.14); /* the track the fill reveals over */
}
/* The spectrum is FIXED around the wheel; filling reveals it via a moving
   mask rather than stretching the gradient to fit the filled arc. */
.card-time-wheel-fill {
  --wheel-pct: 0%;
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(
    var(--color-accent-300) 0%,
    var(--color-accent) 34%,
    var(--color-process-yellow) 72%,
    var(--color-accent-2-500) 100%
  );
  -webkit-mask: conic-gradient(#000 0 var(--wheel-pct), transparent var(--wheel-pct));
  mask: conic-gradient(#000 0 var(--wheel-pct), transparent var(--wheel-pct));
}
.card-time-wheel-hole {
  position: absolute; inset: 6px; border-radius: 50%; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.card-time-wheel-hole span { font: 400 12px/1 var(--font-body); color: rgba(255,255,255,0.8); font-variant-numeric: tabular-nums; }

@keyframes cuedPauseGlow { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.tp-pause-active { animation: cuedPauseGlow 1s ease-in-out infinite; color: #fff !important; }

/* Start / pause */
.stage-start-overlay {
  position: fixed; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); transition: opacity .2s ease;
}
.stage-start-overlay.hidden { display: none; }
/* Smoked-ring start button: a dark glass core wrapped in the pacing-colour
   ring, slowly turning at rest with the pace rule glowing beneath. On tap
   it becomes the countdown -- the glyph turns into a pulsing 3/2/1 numeral
   while the ring winds smoothly down from full spectrum to empty (driven
   per-frame from present.js/timer.js via --cd-pct). */
.stage-start-btn {
  position: relative; width: 116px; height: 116px; border-radius: 50%; border: 0; cursor: pointer;
  padding: 0; background: none;
  transition: transform .25s ease, opacity .25s ease;
}
.stage-start-btn::after {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: -10px; height: 18px; border-radius: 50%;
  background: var(--pacing-gradient); filter: blur(16px); opacity: 0.4; z-index: -1;
}
.stage-start-btn .start-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #99e0ff, #0088b0 26%, #edbb00 58%, #ff458e 82%, #99e0ff);
  animation: cuedRingSpin 10s linear infinite;
}
.stage-start-btn .start-core {
  position: absolute; inset: 4px; border-radius: 50%;
  background: rgba(24,22,21,0.9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  transition: background .25s ease;
}
.stage-start-btn:hover .start-core { background: rgba(24,22,21,0.72); }
.stage-start-btn .start-glyph { color: #f6f4f2; font-size: 34px; line-height: 1; }
.stage-start-btn.counting { cursor: pointer; }
/* Faint track that the draining ring reveals as it winds down. Sits
   behind the ring (children paint over their parent's ::before). */
.stage-start-btn::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
/* The colours stay FIXED around the wheel (same spectrum as the per-card
   pacing wheel); only a mask moves, revealing less and less of the ring
   as the countdown drains -- never re-stretching the gradient. */
.stage-start-btn.counting .start-ring {
  animation: none; --cd-pct: 100%;
  background: conic-gradient(#99e0ff 0%, #0088b0 34%, #edbb00 72%, #ff458e 100%);
  -webkit-mask: conic-gradient(#000 0 var(--cd-pct), transparent var(--cd-pct));
  mask: conic-gradient(#000 0 var(--cd-pct), transparent var(--cd-pct));
}
.stage-start-btn.counting .start-glyph {
  font: 600 54px/1 var(--font-heading); font-variant-numeric: tabular-nums;
  animation: cuedCdPulse 1s ease-in-out infinite;
}
.stage-start-overlay.starting .stage-start-btn { transform: scale(0.6); opacity: 0; }
@keyframes cuedRingSpin { to { transform: rotate(360deg); } }
@keyframes cuedCdPulse { 0% { transform: scale(0.82); opacity: 0.35; } 35% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(0.95); opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) {
  .stage-start-btn .start-ring { animation: none; }
  .stage-start-btn.counting .start-glyph { animation: none; }
}

.stage-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 26px 26px 0; position: relative; min-height: 0; }
.stage-block-action { align-self: flex-start; font: 600 14px/1 var(--font-heading); letter-spacing: 0.14em; color: var(--color-accent-2-400); }
.stage-block-text { font: 400 clamp(22px, 5.4vw, 30px) / 1.36 var(--font-body); color: #fff; margin: 0; white-space: pre-line; }
.stage-block-text mark { background: none; color: var(--color-accent-300); }
.stage-block-text u { text-decoration-color: rgba(255,255,255,0.6); }
.tp-word { transition: opacity .15s linear; opacity: 0.32; }
.tp-word.tp-said { opacity: 0.6; }
.tp-word.tp-current { opacity: 1; text-shadow: 0 0 18px rgba(153,224,255,0.5); }

.stage-tap-zone { position: absolute; top: 0; bottom: 0; z-index: 1; }
.stage-tap-prev { left: 0; width: 30%; }
.stage-tap-next { right: 0; width: 70%; }

/* Per-card rule directly under the elapsed-time bar: one segment per card,
   width proportional to that card's resolved time on the same axis as the
   bar above, so "am I on pace?" is a straight visual comparison. */
.stage-card-rule {
  display: flex; gap: 2px; height: 7px; align-items: flex-end;
  overflow: hidden; margin-top: -6px;
}
.stage-card-seg { flex: 0 0 auto; height: 2.5px; border-radius: 1px; background: rgba(255,255,255,0.14); transition: background .2s ease, height .2s ease; }
.stage-card-seg.done { background: rgba(255,255,255,0.4); }
.stage-card-seg.now { height: 7px; background: #fff; }

.stage-controls {
  flex: none; display: flex; align-items: stretch; gap: 1px; background: rgba(255,255,255,0.12);
  margin-bottom: max(env(safe-area-inset-bottom), 20px);
}
.stage-btn { flex: 1; min-height: 74px; border: 0; background: #000; color: rgba(255,255,255,0.72); font: 400 17px/1 var(--font-body); letter-spacing: 0.02em; cursor: pointer; }
.stage-btn:hover { background: #0a1418; color: #fff; }
.stage-btn:disabled { color: rgba(255,255,255,0.22); cursor: default; }
.stage-btn:disabled:hover { background: #000; }
.stage-btn-next { font-weight: 600; color: #fff; }
.stage-position { width: 84px; flex: none; background: #000; display: flex; align-items: center; justify-content: center; font: 400 14px/1 var(--font-body); color: rgba(255,255,255,0.42); font-variant-numeric: tabular-nums; }

/* Continuous scroll view */
.stage-scroll { flex: 1; overflow-y: auto; padding: 100px 26px 140px; scroll-snap-type: y proximity; }
.stage-scroll-card { padding: 28px 0; scroll-snap-align: start; }
.stage-scroll-card + .stage-scroll-card { border-top: 6px solid rgba(255,255,255,0.16); }
.stage-scroll-card.current .stage-block-text { color: #fff; }
.stage-scroll-card:not(.current) .stage-block-text { color: rgba(255,255,255,0.38); }

.stage-settings-btn {
  position: fixed; top: max(env(safe-area-inset-top), 14px); right: 14px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}

/* Structural wrapper: stage-content (main+ticks) beside stage-controls.
   Portrait stacks them; landscape (thumb-side) sets them side by side. */
.stage-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.stage-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* Landscape: masthead across the top, thumb column on the trailing edge */
@media (orientation: landscape) and (max-height: 600px) {
  .stage-masthead { flex-direction: row; align-items: center; padding: 12px 22px; gap: 20px; }
  .stage-clock-row { flex: none; }
  .stage-clock { font: 600 32px/1 var(--font-heading); }
  .stage-bar { flex: 1; }
  .stage-body[data-thumb="right"] { flex-direction: row; }
  .stage-body[data-thumb="left"] { flex-direction: row-reverse; }
  .stage-main { padding: 14px 24px 6px; gap: 14px; }
  .stage-block-text { font-size: clamp(18px, 3.6vw, 26px); }
  .stage-controls { width: 104px; flex: none; flex-direction: column; margin-bottom: 0; }
  .stage-btn { min-height: unset; }
  .stage-btn-prev { flex: 1; }
  .stage-btn-next { flex: 2; }
  .stage-position { display: none; }
}

/* Wrap-up / over pulses, used as the iOS haptic substitute */
@keyframes cuedPulseWarn { 0%,100% { box-shadow: inset 0 0 0 0 transparent; } 50% { box-shadow: inset 0 0 0 6px rgba(237,187,0,0.35); } }
@keyframes cuedPulseOver { 0%,100% { box-shadow: inset 0 0 0 0 transparent; } 50% { box-shadow: inset 0 0 0 6px rgba(255,69,142,0.4); } }
.stage-page.pulse-warn { animation: cuedPulseWarn 0.9s ease-in-out 2; }
.stage-page.pulse-over { animation: cuedPulseOver 0.9s ease-in-out 2; }

/* ============================= Stage dialogs (pre-roll & settings) =============================
   On stage pages the dialog is dark smoked glass over the near-black, with
   the pace rule glowing faintly beneath it. Selected chips are flat lenses
   that pop against the dark; End & exit / Restart become quiet text so
   nothing competes with Done. */
.stage-body .dialog-backdrop { background: rgba(0,0,0,0.6); }
.stage-body .dialog {
  position: relative; border-radius: 16px; color: #f6f4f2;
  background: rgba(24,22,21,0.82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.stage-body .dialog::before {
  content: ''; position: absolute; left: 10%; right: 10%; bottom: -10px; height: 20px; border-radius: 50%;
  background: var(--pacing-gradient); filter: blur(18px); opacity: 0.35; z-index: -1;
}
.stage-body .dialog-title { color: #f6f4f2; }
.stage-body .dialog .field > label {
  font: 600 10.5px/1 var(--font-heading); letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(246,244,242,0.45);
}
.stage-body .dialog .chip {
  color: rgba(246,244,242,0.65); border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06);
}
.stage-body .dialog .chip:hover { background: rgba(255,255,255,0.13); color: #fff; }
.stage-body .dialog .chip.active {
  border: 1.5px solid rgba(0,73,97,0.4); color: var(--color-accent-800); font-weight: 600;
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 48%, #d9eff7 100%);
}
.stage-body .dialog .btn-secondary {
  border: 0; background: none; color: rgba(246,244,242,0.5); padding: 6px 8px;
}
.stage-body .dialog .btn-secondary:hover { color: #fff; background: none; }
.stage-body .dialog .btn-primary {
  border: 1.5px solid rgba(0,73,97,0.65); color: var(--color-accent-800); border-radius: 999px;
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 48%, #d9eff7 100%);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.stage-body .dialog .btn-primary:hover { border-color: rgba(0,136,176,0.9); box-shadow: 0 4px 16px rgba(0,136,176,0.35); background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 48%, #d9eff7 100%); }

/* ============================= Timer Only ============================= */
.timer-only-page { align-items: center; justify-content: center; position: relative; }
.timer-only-exit {
  position: fixed; top: max(env(safe-area-inset-top), 14px); left: 14px; z-index: 5; text-decoration: none;
}
.timer-only-pause { position: fixed; top: max(env(safe-area-inset-top), 14px); right: 14px; z-index: 5; }
.timer-only-pause.hidden { display: none; }
.timer-only-center {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  width: min(560px, 92vw); padding: var(--space-4);
}
.timer-only-clock {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 600 clamp(64px, 22vw, 168px)/1 var(--font-heading); letter-spacing: -0.02em;
  color: #fff; font-variant-numeric: tabular-nums;
}
.timer-only-sub { display: flex; align-items: baseline; gap: 8px; font-size: 15px; }
.timer-only-bar { width: 100%; }
.timer-only-controls {
  position: fixed; bottom: max(env(safe-area-inset-bottom), 20px); left: 0; right: 0;
  display: flex; justify-content: center; z-index: 5;
}
.timer-only-controls.hidden { display: none; }
.timer-only-restart-btn {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.75); border: 0; border-radius: 999px;
  padding: 10px 22px; font: 500 14px/1 var(--font-body); cursor: pointer;
}
.timer-only-restart-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ============================= Landing page ============================= */
.landing-shell {
  max-width: 880px; margin: 0 auto; min-height: 100vh;
  padding: var(--space-4) var(--space-4) var(--space-8);
  display: flex; flex-direction: column;
}
.landing-nav { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(1.6rem, 5vh, 3rem); }
.landing-nav .spacer { flex: 1; }
.landing-nav-link { font-size: 13.5px; color: rgba(32,30,29,0.65); text-decoration: none; }
.landing-nav-link:hover { color: var(--color-text); }
.btn-lens-sm { font-size: 13px; padding: 7px 15px; }
.btn-lens-lg { font-size: 14.5px; padding: 11px 24px; }
.quiet-link { font-size: 13.5px; color: rgba(32,30,29,0.55); text-decoration: none; padding: 6px 4px; }
.quiet-link:hover { color: var(--color-text); }

.landing-top { display: flex; gap: 2.4rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.8rem; }
.landing-copy { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 18px; }
.landing-headline { font: 600 clamp(32px, 5vw, 42px)/1.12 var(--font-heading); letter-spacing: -0.02em; margin: 0; text-wrap: balance; max-width: 15ch; }
.landing-subline { font-size: 16px; line-height: 1.6; color: rgba(32,30,29,0.65); margin: 0; max-width: 44ch; }
.landing-cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* The floating stage-view mock: a landscape phone showing a live card. */
.stage-mock { flex: 1 1 320px; min-width: 290px; max-width: 430px; min-height: 206px; border-radius: 20px;
  background: #0a0a0a; padding: 15px 18px; color: #fff; align-self: center;
  box-shadow: 0 24px 50px rgba(32,30,29,0.35), 0 0 0 1px rgba(32,30,29,0.2);
  display: flex; flex-direction: column; gap: 9px;
}
@media (max-width: 700px) { .stage-mock { max-width: none; min-width: 0; } }
.sm-clockrow { display: flex; align-items: baseline; justify-content: space-between; }
.sm-clock { font: 600 24px/1 var(--font-heading); font-variant-numeric: tabular-nums; }
.sm-of { font-size: 10px; color: rgba(255,255,255,0.45); }
.sm-bar { position: relative; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.sm-bar-fill { position: absolute; inset: 0; width: 46%; background: var(--pacing-gradient); }
.sm-cardrule { display: flex; gap: 1.5px; height: 5px; align-items: flex-end; }
.sm-seg { height: 2px; border-radius: 1px; background: rgba(255,255,255,0.14); }
.sm-seg.done { background: rgba(255,255,255,0.4); }
.sm-seg.now { height: 5px; background: #fff; }
.sm-card { flex: 1; padding: 14px 4px 2px; display: flex; flex-direction: row; align-items: flex-end; gap: 14px; }
.sm-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; align-self: stretch; }
.sm-action { align-self: flex-start; font: 600 10px/1 var(--font-heading); letter-spacing: 0.15em; color: var(--color-accent-2-400); }
.sm-text { font-size: 18px; line-height: 1.5; margin: 0; color: #fff; }
.sm-text mark { background: none; color: var(--color-accent-300); }
.sm-foot { flex: none; display: flex; }
.sm-wheel { position: relative; width: 30px; height: 30px; }
.sm-wheel .t { position: absolute; inset: 0; border-radius: 50%; background: rgba(255,255,255,0.12); }
.sm-wheel .d { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#99e0ff 0%, #0088b0 34%, #edbb00 72%, #ff458e 100%);
  -webkit-mask: conic-gradient(#000 0 62%, transparent 62%);
  mask: conic-gradient(#000 0 62%, transparent 62%);
}
.sm-wheel .h { position: absolute; inset: 3.5px; border-radius: 50%; background: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  font-size: 7.5px; color: rgba(255,255,255,0.8); font-variant-numeric: tabular-nums;
}

/* The through-line: the pace rule as a journey, cue cards riding it. */
.through { position: relative; margin: 0.6rem 0 0.4rem; }
.through-bar { position: relative; height: 12px; border-radius: 6px; background: rgba(32,30,29,0.07); overflow: hidden; }
.through-fill { position: absolute; inset: 0; background: var(--pacing-gradient); }
.through-cards { position: absolute; left: 0; right: 0; top: -14px; height: 40px; pointer-events: none; }
.tc { position: absolute; top: 0; width: 26px; height: 36px; border-radius: 4px; background: #fff;
  border: 1px solid rgba(32,30,29,0.16); box-shadow: 0 3px 8px rgba(32,30,29,0.14);
  transform: translateX(-50%) rotate(var(--tc-r, 0deg));
}
.tc::before { content: ''; position: absolute; top: 4px; left: 4px; right: 4px; height: 2px; border-radius: 1px; background: var(--tc-c, var(--color-accent)); }
.tc::after { content: ''; position: absolute; top: 10px; left: 4px; right: 7px; height: 14px;
  background: repeating-linear-gradient(to bottom, rgba(32,30,29,0.16) 0 1px, transparent 1px 5px);
}
.through-caps { display: flex; justify-content: space-between; margin-top: 12px;
  font: 600 10.5px/1 var(--font-heading); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(32,30,29,0.45);
}

.landing-feats { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.feat { display: flex; align-items: flex-start; gap: 9px; flex: 1; min-width: 190px; max-width: 240px; }
.feat .dot { flex: none; width: 12px; height: 12px; margin-top: 3px; border-radius: 50%;
  border: 1.5px solid rgba(0,73,97,0.6);
  background: radial-gradient(circle at 42% 36%, #ffffff, #d9eff7 100%);
}
.feat p { margin: 0; font-size: 13px; line-height: 1.45; color: rgba(32,30,29,0.7); }
.feat strong { display: block; font-size: 13.5px; color: var(--color-text); font-weight: 600; }
.landing-foot { margin-top: auto; padding-top: 2.4rem; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(32,30,29,0.4); }

/* ============================= Paywall =============================
   "Unlock Cued": one pacing wheel, partly revealed. Deliberately
   self-contained (explicit dark-glass colours) so it reads the same
   whether it opens over a light editor page or a dark stage. */
.paywall-dialog {
  position: relative;
  background: rgba(24,22,21,0.92) !important;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 16px !important; color: #f6f4f2 !important;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5) !important;
  max-width: 400px; align-items: center; text-align: center;
}
.paywall-dialog::before {
  content: ''; position: absolute; left: 10%; right: 10%; bottom: -10px; height: 20px; border-radius: 50%;
  background: var(--pacing-gradient); filter: blur(18px); opacity: 0.35; z-index: -1;
}
.paywall-rule { height: 3px; width: 52px; border-radius: 2px; background: var(--pacing-gradient); }
.paywall-tagline { font: 600 24px/1.25 var(--font-heading); letter-spacing: -0.015em; color: #f6f4f2; text-wrap: balance; }
.paywall-sub { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(246,244,242,0.6); max-width: 34ch; }

.paywall-wheel { position: relative; width: 150px; height: 150px; margin: 4px 0 0; }
.pw-disc-ghost {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0.14;
  background: conic-gradient(#99e0ff 0%, #0088b0 34%, #edbb00 72%, #ff458e 100%);
}
.pw-disc-lit {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#99e0ff 0%, #0088b0 34%, #edbb00 72%, #ff458e 100%);
  -webkit-mask: conic-gradient(#000 0 30%, transparent 30%);
  mask: conic-gradient(#000 0 30%, transparent 30%);
  transition: opacity .4s ease;
}
.pw-disc-full {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity .5s ease;
  background: conic-gradient(from 0deg, #99e0ff, #0088b0 26%, #edbb00 58%, #ff458e 82%, #99e0ff);
}
.paywall-dialog.unlocked .pw-disc-full { opacity: 1; animation: cuedRingSpin 12s linear infinite; }
.paywall-dialog.unlocked .pw-disc-lit { opacity: 0; }
.pw-hub {
  position: absolute; inset: 11px; border-radius: 50%; background: #141312;
  display: flex; align-items: center; justify-content: center;
}
.pw-word { position: absolute; transition: opacity .4s ease; }
.pw-word-preview { font: 600 11px/1 var(--font-heading); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(246,244,242,0.55); opacity: 1; }
.pw-word-cued { font: 600 26px/1 var(--font-heading); letter-spacing: -0.02em; color: #fff; opacity: 0; }
.paywall-dialog.unlocked .pw-word-preview { opacity: 0; }
.paywall-dialog.unlocked .pw-word-cued { opacity: 1; }
/* flat-lens lock on the seam where the preview arc stops (30% = 108deg) */
.pw-seamlock {
  position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
  transform: rotate(108deg) translateY(-75px) rotate(-108deg);
  border: 1.5px solid rgba(0,73,97,0.65);
  background: radial-gradient(circle at 42% 36%, #ffffff, #eef9fd 55%, #d9eff7 100%);
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--color-accent-800);
  transition: opacity .4s ease;
}
.paywall-dialog.unlocked .pw-seamlock { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .paywall-dialog.unlocked .pw-disc-full { animation: none; } }

.paywall-caption { margin: 0; font-size: 12px; color: rgba(246,244,242,0.45); font-variant-numeric: tabular-nums; }
.paywall-price { margin: 6px 0 0; font-size: 12px; color: rgba(246,244,242,0.55); font-variant-numeric: tabular-nums; }
.paywall-dialog.unlocked .paywall-caption-preview { display: none; }
.paywall-caption-unlocked { display: none; color: var(--color-accent-300); }
.paywall-dialog.unlocked .paywall-caption-unlocked { display: block; }

.paywall-note { margin: 0; font-size: 13px; color: var(--color-accent-300); }
.paywall-actions { justify-content: center; }
.paywall-quiet { border: 0; background: none; cursor: pointer; font-family: inherit; font-size: 13px; color: rgba(246,244,242,0.5); padding: 6px 8px; }
.paywall-quiet:hover { color: #fff; }
.paywall-cta { font-size: 14.5px; padding: 10px 22px; }

/* ============================= Practice mode ============================= */
.practice-topline { position: fixed; top: max(env(safe-area-inset-top), 14px); left: 14px; z-index: 5; font: 400 12px/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.practice-summary { min-height: 100vh; background: var(--color-bg); color: var(--color-text); display: flex; align-items: center; justify-content: center; padding: var(--space-6); }
.practice-summary-card { width: min(520px, 100%); display: flex; flex-direction: column; gap: var(--space-4); }
.practice-summary-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.practice-summary-table th { text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(32,30,29,0.6); padding: 6px 8px; border-bottom: 1px solid var(--color-divider); }
.practice-summary-table td { padding: 6px 8px; border-bottom: 1px solid rgba(32,30,29,0.08); font-variant-numeric: tabular-nums; }

/* ============================= Admin ============================= */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(32,30,29,0.55); padding: 8px 10px; border-bottom: 1px solid var(--color-divider);
}
.table td { padding: 8px 10px; border-bottom: 1px solid rgba(32,30,29,0.08); vertical-align: top; }
.table tbody tr:hover { background: rgba(32,30,29,0.03); }
