/* Arcade Classic style = Press Start 2P (same pixel arcade family as Arcade Classic Regular) */
@font-face {
  font-family: "Arcade Classic";
  src: url("../fonts/PressStart2P-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Chrome yellow + beige palette */
  --bg: #f3ead6;
  --bg-deep: #e6d7b8;
  --card: #faf6ec;
  --card-soft: #f5efe0;
  --border: rgba(120, 90, 30, 0.16);
  --text: #3d3424;
  --text-muted: #8a7a5c;
  --accent: #ffb000;
  --accent-strong: #e69500;
  --accent-soft: rgba(255, 176, 0, 0.18);
  --accent-glow: rgba(255, 176, 0, 0.4);
  --mint: #c4b48a;
  --warn: #ffb000;
  --danger: #c45c3e;
  --rest: #c4a574;
  --run: #ffb000;
  --strength: #b8956a;
  --hiit: #e69500;
  --quality: #c45c3e;
  --maze-blue: #c4a574;
  --maze-wall: #c9a227;
  --pac-yellow: #ffb000;
  --pellet: #ffe08a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(90, 70, 30, 0.12);
  --shadow-float: 0 16px 40px rgba(90, 70, 30, 0.16);
  --font: "Segoe UI", system-ui, sans-serif;
  --display: "Arcade Classic", "Press Start 2P", monospace;
  --max: 740px;
  --chrome: #ffb000;
  --beige: #f3ead6;
  --beige-deep: #e6d7b8;
  --beige-card: #faf6ec;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
  position: relative;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.arcade-text {
  font-family: "Arcade Classic", monospace;
  line-height: 1.7;
  text-transform: uppercase;
}

.sky-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -5%, rgba(255, 252, 245, 0.95), transparent 55%),
    radial-gradient(700px 400px at 95% 10%, rgba(255, 176, 0, 0.16), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(196, 165, 116, 0.18), transparent 45%),
    linear-gradient(180deg, #fbf7ee 0%, var(--bg) 40%, var(--bg-deep) 100%);
}

.app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1rem 3rem;
}

/* Header */
.header {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

/* Exhausted / KO runner mascot (RIP my Pace!) */
.brand-mascot {
  width: 3.1rem;
  height: 3.1rem;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, #faf6ec, #e6d7b8);
  border: 2px solid rgba(230, 149, 0, 0.45);
  box-shadow: 0 6px 14px rgba(90, 70, 30, 0.14);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ko-runner {
  position: relative;
  width: 40px;
  height: 28px;
  transform: rotate(-12deg);
}

.ko-head {
  position: absolute;
  left: 2px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f0d5b0;
  border: 1.5px solid #8a6a40;
  z-index: 2;
}

.ko-eye {
  position: absolute;
  top: 3px;
  width: 5px;
  height: 5px;
  color: #5a4030;
  font-size: 6px;
  font-weight: 900;
  line-height: 1;
}

.ko-eye::before {
  content: "×";
}

.ko-eye.l { left: 1px; }
.ko-eye.r { right: 1px; }

.ko-sweat {
  position: absolute;
  right: -5px;
  top: -2px;
  width: 4px;
  height: 6px;
  background: #7ec8f0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-35deg);
  opacity: 0.9;
}

.ko-body {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 18px;
  height: 7px;
  background: #ffb000;
  border: 1.5px solid #c48a00;
  border-radius: 3px;
  z-index: 1;
}

.ko-arm {
  position: absolute;
  width: 10px;
  height: 3px;
  background: #f0d5b0;
  border: 1px solid #8a6a40;
  border-radius: 2px;
  z-index: 0;
}

.ko-arm.a1 {
  left: 14px;
  top: 8px;
  transform: rotate(-40deg);
}

.ko-arm.a2 {
  left: 22px;
  top: 18px;
  transform: rotate(25deg);
}

.ko-leg {
  position: absolute;
  width: 11px;
  height: 3.5px;
  background: #5a7a9a;
  border: 1px solid #3d5068;
  border-radius: 2px;
  z-index: 0;
}

.ko-leg.l1 {
  left: 26px;
  top: 11px;
  transform: rotate(-15deg);
}

.ko-leg.l2 {
  left: 26px;
  top: 16px;
  transform: rotate(20deg);
}

.ko-zzz {
  position: absolute;
  right: 0;
  top: -2px;
  font-family: var(--display);
  font-size: 7px;
  color: #e69500;
  opacity: 0.85;
  animation: zzzFloat 1.4s ease-in-out infinite;
}

@keyframes zzzFloat {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-3px); opacity: 1; }
}

.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.nav-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--display);
  font-size: 0.48rem;
  font-weight: 400;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-transform: uppercase;
  line-height: 1.4;
}

.nav-btn:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-btn.active {
  background: var(--accent);
  color: #3d3424;
}

.nav-btn.ghost {
  margin-left: auto;
}

/* Views */
.view[hidden] {
  display: none !important;
}

.view.active {
  display: block;
  animation: rise 0.28s ease;
}

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

/* Cards */
.hero-card,
.form-card,
.timer-card,
.tips-card,
.history-card,
.day-card,
.stat-card,
.targets-card,
.surface-card,
.live-run-card,
.speech-bubble,
.quiz-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-strong);
}

h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-transform: uppercase;
}

.lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.optional,
.muted,
.hint {
  color: var(--text-muted);
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.hint.center {
  text-align: center;
}

/* ========== PAC-MAN TEXT MAZE QUIZ ========== */
.maze-stage {
  position: relative;
  padding: 0.25rem 0 1rem;
}

.maze-hud {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  color: var(--accent-strong);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.maze-board {
  background: #3d3424;
  border: 4px solid var(--maze-wall);
  border-radius: 12px;
  box-shadow:
    0 0 0 3px #e6d7b8,
    0 12px 32px rgba(90, 70, 30, 0.28);
  padding: 1rem 0.9rem 1.1rem;
  position: relative;
  overflow: hidden;
}

.maze-top-line,
.maze-bottom-line {
  height: 4px;
  border-radius: 2px;
  background: var(--maze-wall);
  box-shadow: 0 0 0 1px #ffe08a;
  margin: 0.35rem 0 0.75rem;
}

.maze-bottom-line {
  margin: 0.85rem 0 0;
}

.maze-prompt {
  margin: 0 0 0.9rem;
  color: #faf6ec;
  font-size: 0.58rem;
  line-height: 1.85;
  min-height: 2.6em;
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.35);
}

.pellet-lane {
  position: relative;
  height: 36px;
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  overflow: hidden;
}

.pellet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pellet);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(255, 184, 174, 0.6);
  transition: opacity 0.15s, transform 0.15s;
}

.pellet.eaten {
  opacity: 0;
  transform: scale(0);
}

.pellet.power {
  width: 12px;
  height: 12px;
  background: #fff;
  animation: powerPulse 0.6s steps(2) infinite;
}

@keyframes powerPulse {
  50% { opacity: 0.35; }
}

.pacman {
  position: absolute;
  left: 0;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background: var(--pac-yellow);
  z-index: 2;
  transition: left 0.45s linear;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.55);
  /* open mouth facing right */
  clip-path: polygon(100% 50%, 65% 0, 0 0, 0 100%, 65% 100%);
  animation: chomp 0.28s infinite;
}

.pacman.chomping {
  animation-duration: 0.12s;
}

@keyframes chomp {
  0%,
  100% {
    clip-path: polygon(100% 50%, 70% 10%, 0 0, 0 100%, 70% 90%);
  }
  50% {
    clip-path: polygon(100% 50%, 100% 0, 0 0, 0 100%, 100% 100%);
  }
}

.pac-eye {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #3d3424;
  border-radius: 50%;
  top: 6px;
  left: 10px;
  z-index: 3;
}

.maze-panel {
  background: rgba(61, 52, 36, 0.75);
  border: 2px solid var(--maze-wall);
  box-shadow: none;
  padding: 0.85rem;
  min-height: 120px;
  margin-bottom: 0.65rem;
}

.maze-panel input[type="text"],
.maze-panel input[type="number"],
.maze-panel input[type="date"] {
  background: #2a2418;
  border: 2px solid var(--maze-wall);
  color: #ffb000;
  font-family: "Arcade Classic", monospace;
  font-size: 0.55rem;
  padding: 0.85rem;
}

.maze-panel input::placeholder {
  color: #a89878;
  text-transform: uppercase;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.quiz-option {
  cursor: pointer;
  display: block;
}

.quiz-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz-option span {
  display: block;
  padding: 0.75rem 0.8rem;
  border-radius: 6px;
  border: 2px solid var(--maze-wall);
  background: #2a2418;
  color: #f5efe0;
  font-family: "Arcade Classic", monospace;
  font-size: 0.5rem;
  line-height: 1.7;
  text-transform: uppercase;
  transition: border-color 0.12s, background 0.12s, color 0.12s, transform 0.2s, opacity 0.35s;
}

.quiz-option:hover span {
  border-color: #ffd24d;
  color: #fff8e8;
}

.quiz-option input:checked + span {
  border-color: var(--pac-yellow);
  background: rgba(255, 176, 0, 0.18);
  color: var(--pac-yellow);
  box-shadow: 0 0 12px rgba(255, 176, 0, 0.3);
}

.quiz-option small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.42rem;
  color: #c4b48a;
  text-transform: uppercase;
}

.quiz-option.being-eaten span {
  animation: answerEaten 0.55s forwards;
}

.quiz-option.dimmed span {
  opacity: 0.25;
}

@keyframes answerEaten {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.05); color: #ffb000; }
  100% { transform: scale(0.2) translateX(-40px); opacity: 0; }
}

.maze-panel .field-eaten {
  animation: answerEaten 0.55s forwards;
}

.eaten-log {
  min-height: 1.4em;
  margin: 0.35rem 0 0;
  color: var(--pac-yellow);
  font-size: 0.45rem;
  text-align: center;
}

.maze-hint {
  margin: 0.75rem 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.42rem;
  line-height: 1.8;
}

.maze-progress {
  margin: 0.75rem 0 0.5rem;
}

.quiz-progress-wrap {
  margin-bottom: 0.85rem;
}

.quiz-progress-bar,
.session-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(196, 165, 116, 0.25);
  overflow: hidden;
}

.maze-stage .quiz-progress-bar {
  background: rgba(61, 52, 36, 0.55);
  border: 1px solid var(--maze-wall);
}

.quiz-progress-fill,
.session-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd24d, #ffb000, #e69500);
  transition: width 0.35s ease;
}

.quiz-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
}

.arcade-btn {
  font-family: "Arcade Classic", monospace !important;
  font-size: 0.5rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.95rem 1.1rem !important;
}

.btn.primary.arcade-btn {
  background: var(--pac-yellow);
  color: #3d3424;
  box-shadow: 0 0 16px rgba(255, 176, 0, 0.45);
}

.btn.primary.arcade-btn:hover:not(:disabled) {
  background: #ffd24d;
}

.btn.ghost.arcade-btn {
  border-color: var(--maze-wall);
  color: #8a6a20;
}

/* Form bits */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.field-row {
  display: grid;
  gap: 0.85rem;
}

input[type="text"],
input[type="number"],
input[type="date"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-soft);
  color: var(--text);
  font: inherit;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #3d3424;
}

/* Buttons */
.btn {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s, background 0.15s, box-shadow 0.15s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(180deg, #ffd24d, var(--accent-strong));
  color: #3d3424;
  box-shadow: 0 8px 18px var(--accent-glow);
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffb000, #cc8400);
}

.btn.secondary {
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn.danger {
  background: rgba(226, 91, 91, 0.1);
  color: var(--danger);
  border: 1.5px solid rgba(226, 91, 91, 0.3);
}

.btn.block {
  width: 100%;
}

/* Today */
.day-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.badge-stack {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-end;
}

.badge {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.muted {
  background: rgba(90, 122, 144, 0.1);
  color: var(--text-muted);
}

.badge.run { background: var(--accent-soft); color: var(--run); }
.badge.rest { background: rgba(107, 159, 212, 0.15); color: var(--rest); }
.badge.strength { background: rgba(139, 124, 240, 0.12); color: var(--strength); }
.badge.hiit { background: rgba(232, 168, 56, 0.15); color: #c48412; }
.badge.quality { background: rgba(226, 91, 91, 0.12); color: var(--quality); }

.targets-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding: 0.8rem;
}

.targets-card[hidden] {
  display: none !important;
}

.target-item {
  padding: 0.6rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  border: 1px solid var(--border);
}

.target-item.wide {
  grid-column: 1 / -1;
}

.target-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.target-item strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.surface-card {
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
}

.surface-card .label {
  margin: 0 0 0.5rem;
  display: block;
}

.live-run-card {
  padding: 1rem;
  margin-bottom: 0.9rem;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.live-stat {
  text-align: center;
  padding: 0.65rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  border: 1px solid var(--border);
}

.live-stat strong {
  display: block;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  margin-top: 0.15rem;
}

.session-progress-wrap {
  margin-bottom: 0.85rem;
}

.timer-phase {
  margin: 0.4rem 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.3em;
}

.map-shell {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 0.85rem;
  background: #e6d7b8;
}

.run-map {
  height: 240px;
  width: 100%;
  z-index: 1;
}

.map-hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.map-hud p {
  margin: 0;
}

.map-hud .muted {
  font-weight: 500;
  font-size: 0.76rem;
  margin-top: 0.15rem;
}

.treadmill-panel {
  padding: 0.75rem 0 0.25rem;
  margin-bottom: 0.5rem;
}

.tm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.65rem 0;
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* Steps */
.session-steps {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.session-steps li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.session-steps li.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.session-steps li.done {
  opacity: 0.7;
}

.step-num {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 176, 0, 0.15);
  color: var(--text-muted);
}

.session-steps li.active .step-num {
  background: var(--accent);
  color: #3d3424;
}

.step-body strong {
  display: block;
  font-size: 0.95rem;
}

.step-body span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.12rem;
}

.step-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-strong);
  white-space: nowrap;
}

.step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.step-chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 176, 0, 0.12);
  color: var(--text-muted);
}

.step-chip.accent {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tips-card {
  padding: 1rem 1.05rem;
  margin-bottom: 0.9rem;
}

.tips-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.tips-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.tips-card li + li {
  margin-top: 0.28rem;
}

.rest-panel {
  padding: 1.4rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow);
}

.rest-panel .big {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0.35rem 0;
}

.section-head {
  margin-bottom: 0.9rem;
}

.week-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.day-card {
  padding: 0.95rem 1rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.day-card:hover {
  border-color: rgba(255, 176, 0, 0.45);
  box-shadow: var(--shadow-float);
}

.day-card.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.day-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.3rem;
}

.day-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.day-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.week-block {
  margin-bottom: 1.15rem;
}

.week-block h3 {
  margin: 0 0 0.2rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
}

.week-block .week-desc {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.stat-card {
  padding: 1rem;
}

.stat-card .stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #e69500;
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  font-weight: 600;
}

.history-card {
  padding: 1.05rem;
}

.history-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}

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

.history-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.history-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.form-card {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-summary {
  padding: 0.4rem 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.settings-summary strong {
  color: var(--text);
}

.athlete-banner {
  margin-bottom: 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 176, 0, 0.25);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
  box-shadow: var(--shadow);
  font-weight: 500;
}

.athlete-banner strong {
  color: var(--accent-strong);
  font-weight: 700;
}

.footer {
  margin-top: 2.2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.footer p {
  margin: 0;
}

/* Leaflet tweaks */
.leaflet-container {
  font: inherit;
  background: #e6d7b8;
}

.runner-marker {
  background: transparent !important;
  border: 0 !important;
}

.runner-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd24d, #e69500);
  border: 3px solid #faf6ec;
  box-shadow: 0 4px 12px rgba(230, 149, 0, 0.4);
  position: relative;
}

.runner-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #e69500;
}

/* Run chase game HUD */
.game-hud-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.game-hud-item {
  text-align: center;
  padding: 0.5rem 0.3rem;
  border-radius: var(--radius-sm);
  background: #3d3424;
  border: 2px solid var(--maze-wall);
  color: #faf6ec;
}

.game-hud-item .target-label {
  color: #e6d7b8;
  font-size: 0.58rem;
}

.game-hud-item strong {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--display);
  font-size: 0.55rem;
  color: var(--pac-yellow);
  line-height: 1.5;
}

.chase-meter-wrap {
  margin-bottom: 0.85rem;
}

.chase-meter-wrap .target-label {
  display: block;
  margin-bottom: 0.3rem;
}

.chase-meter {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: #3d3424;
  border: 2px solid var(--maze-wall);
  overflow: hidden;
}

.chase-meter-fill {
  height: 100%;
  width: 12%;
  background: linear-gradient(90deg, #c4b48a, #ffb000, #c45c3e);
  transition: width 0.35s linear;
}

.chase-pac {
  position: absolute;
  left: 4px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--pac-yellow);
  z-index: 2;
}

.chase-ghost {
  position: absolute;
  right: 4px;
  top: 50%;
  margin-top: -8px;
  font-size: 12px;
  z-index: 2;
  line-height: 1;
}

.chase-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.game-coin-marker,
.game-entity-marker {
  background: transparent !important;
  border: 0 !important;
}

.game-coin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff59a, #ffd700 45%, #e6a800);
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
  color: #5a3a00;
  font-size: 8px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  position: relative;
}

.game-coin span {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 800;
  color: #3d3424;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 0 3px;
  white-space: nowrap;
}

.map-pac {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pac-yellow);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
  clip-path: polygon(100% 50%, 70% 10%, 0 0, 0 100%, 70% 90%);
  animation: chomp 0.28s infinite;
  border: 2px solid #fff;
}

.map-ghost {
  width: 28px;
  height: 28px;
  border-radius: 12px 12px 4px 4px;
  background: #ff4d6d;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  box-shadow: 0 0 12px rgba(255, 77, 109, 0.6);
  border: 2px solid #fff;
  animation: ghostBob 0.5s ease-in-out infinite;
}

@keyframes ghostBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(61, 52, 36, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.game-overlay[hidden] {
  display: none !important;
}

.game-result-card {
  width: min(420px, 100%);
  background: #3d3424;
  border: 4px solid var(--maze-wall);
  border-radius: 14px;
  padding: 1.25rem 1.1rem;
  box-shadow: 0 0 0 3px #e6d7b8, 0 20px 50px rgba(61, 52, 36, 0.4);
  text-align: center;
  color: #faf6ec;
}

.game-result-card .eyebrow {
  color: var(--pac-yellow);
}

.game-result-card h2 {
  color: #fff;
  font-size: 0.75rem;
}

.game-result-card .lead {
  color: #e6d7b8;
  margin-bottom: 0.85rem;
}

.game-result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.game-result-stats > div {
  background: rgba(250, 246, 236, 0.08);
  border: 1px solid rgba(255, 176, 0, 0.28);
  border-radius: 10px;
  padding: 0.65rem;
}

.game-result-stats strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: 0.55rem;
  color: var(--pac-yellow);
  line-height: 1.5;
}

.game-result-tagline {
  color: var(--pac-yellow);
  font-size: 0.5rem;
  margin: 0 0 1rem;
  line-height: 1.8;
}

.game-result-card.caught {
  border-color: #ff4d6d;
  box-shadow: 0 0 0 3px #ff8fa3, 0 20px 50px rgba(0, 0, 0, 0.35);
}

.game-result-card.victory {
  border-color: #ffd700;
}

@media (min-width: 640px) {
  .app {
    padding: 1.6rem 1.25rem 3.5rem;
  }

  .header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .coach-row {
    grid-template-columns: 120px 1fr;
  }

  .run-map {
    height: 300px;
  }
}

@media (max-width: 520px) {
  .targets-card {
    grid-template-columns: 1fr 1fr;
  }

  .tm-row {
    grid-template-columns: 1fr;
  }

  .coach-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .speech-bubble::before {
    left: 50%;
    bottom: auto;
    top: -7px;
    margin-left: -8px;
    border-left: 2px solid rgba(255, 176, 0, 0.25);
    border-bottom: 0;
    border-top: 2px solid rgba(255, 176, 0, 0.25);
  }
}
