/* ============================================================
   Archie City Academy — Man City themed learning app
   Sky blue (#6CABDD) · Navy (#1C2C5B) · Gold (#F0B310)
   ============================================================ */

:root {
  --city-sky: #6CABDD;
  --city-sky-light: #A8D0EC;
  --city-sky-dark: #4A8FC7;
  --city-navy: #1C2C5B;
  --city-navy-deep: #10193a;
  --city-gold: #F0B310;
  --city-white: #ffffff;
  --pitch: #2e9e4f;
  --pitch-dark: #268043;
  --ink: #14213a;
  --muted: #5b6b8c;
  --danger: #e8543f;
  --success: #2fb85a;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 25, 58, .08), 0 6px 16px rgba(16, 25, 58, .10);
  --shadow: 0 2px 6px rgba(16, 25, 58, .10), 0 18px 40px rgba(16, 25, 58, .18);
  --shadow-lg: 0 10px 24px rgba(16, 25, 58, .18), 0 34px 60px rgba(16, 25, 58, .26);
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Segoe UI Variable Display", "Segoe UI", "Trebuchet MS", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -200px, var(--city-sky-light), transparent 60%),
    linear-gradient(180deg, #eaf4fb 0%, #dcecf8 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(120deg, var(--city-navy) 0%, var(--city-sky-dark) 100%);
  color: var(--city-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 30;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--city-white);
}
.brand-crest { width: 44px; height: 44px; display: inline-block; }
.brand-crest svg { width: 100%; height: 100%; display: block; }
.brand-text strong { display: block; font-size: 1.15rem; letter-spacing: .3px; }
.brand-text small { display: block; font-size: .72rem; letter-spacing: 3px; text-transform: uppercase; opacity: .85; }

.mainnav {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}
.mainnav a {
  color: var(--city-white);
  text-decoration: none;
  padding: 9px 15px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.mainnav a:hover { background: rgba(255,255,255,.15); }
.mainnav a.active { background: var(--city-gold); color: var(--city-navy); }
.mainnav a.nav-parent { background: rgba(255,255,255,.12); }
.mainnav a.nav-parent.active { background: var(--city-gold); color: var(--city-navy); }

.scoreboard {
  display: flex;
  gap: 10px;
  background: var(--city-navy-deep);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .95rem;
  border: 1px solid rgba(255,255,255,.15);
}
.scoreboard { perspective: 300px; }
.sb-item b { color: var(--city-gold); font-variant-numeric: tabular-nums; display: inline-block; transform-origin: center; transition: transform .14s ease; }
.sb-item b.sb-pop { animation: sbpop .32s var(--ease); }
@keyframes sbpop { 0% { transform: scale(1); } 45% { transform: scale(1.5); color: #fff; } 100% { transform: scale(1); } }

.sound-toggle {
  background: var(--city-navy-deep); border: 1px solid rgba(255,255,255,.15); color: #fff;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.15rem;
  transition: transform .1s, background .15s; line-height: 1;
}
.sound-toggle:hover { transform: scale(1.08); background: var(--city-sky-dark); }
.sound-toggle.muted { opacity: .6; }

/* goal shockwave ring */
.goal-ring {
  position: fixed; left: 50%; top: 42%; width: 44px; height: 44px; border-radius: 50%;
  border: 7px solid var(--city-gold); transform: translate(-50%, -50%) scale(.2);
  opacity: .9; pointer-events: none; z-index: 54; animation: goalring .72s var(--ease) forwards;
}
@keyframes goalring { to { transform: translate(-50%, -50%) scale(10); opacity: 0; border-width: 1px; } }

/* ---------- Layout ---------- */
.view {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: var(--city-navy);
  color: rgba(255,255,255,.8);
  font-size: .82rem;
}
.footer-domain { color: var(--city-gold); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 34px;
  color: #fff;
  background: linear-gradient(120deg, var(--city-navy) 0%, var(--city-sky-dark) 60%, var(--city-sky) 100%);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}
.hero h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2.6rem); }
.hero p { margin: 0; max-width: 640px; opacity: .95; font-size: 1.05rem; }
.hero .hero-mascot {
  position: absolute; right: 18px; bottom: -8px; width: 150px; height: 150px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.3));
}
.hero .hero-mascot svg { width: 100%; height: 100%; }
.hero-cta { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 22px;
  border-radius: 999px;
  transition: transform .08s, box-shadow .15s, background .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--city-gold); color: var(--city-navy); box-shadow: 0 6px 0 #c8930b; }
.btn-primary:hover { background: #ffc02e; }
.btn-primary:active { box-shadow: 0 2px 0 #c8930b; }
.btn-sky { background: #fff; color: var(--city-navy); box-shadow: var(--shadow-sm); }
.btn-sky:hover { background: #f2f8fd; }
.btn-navy { background: var(--city-navy); color: #fff; }
.btn-navy:hover { background: #29407e; }
.btn-ghost { background: transparent; color: var(--city-navy); border: 2px solid var(--city-sky-dark); }
.btn-ghost:hover { background: rgba(108,171,221,.12); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---------- Section headings ---------- */
.section-head { display: flex; align-items: center; gap: 12px; margin: 30px 0 14px; }
.section-head h2 { margin: 0; font-size: 1.4rem; color: var(--city-navy); }
.section-head .pill { margin-left: auto; }
.pill {
  background: var(--city-sky-light); color: var(--city-navy);
  padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700;
}
.pill.pill-y2 { background: #d8ecf9; }
.pill.pill-y3 { background: #ffe7ad; }

/* ---------- Cards grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .12s, box-shadow .15s;
  border: 1px solid rgba(28,44,91,.06);
}
.card.clickable { cursor: pointer; }
.card.clickable:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-top {
  padding: 16px 16px 12px;
  color: #fff;
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 84px;
}
.card-icon {
  width: 46px; height: 46px; flex: none;
  background: rgba(255,255,255,.2);
  border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem;
}
.card-top h3 { margin: 0 0 2px; font-size: 1.08rem; }
.card-top p { margin: 0; font-size: .82rem; opacity: .92; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: #eef4fb; color: var(--muted); padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.card-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; }

/* skill colour themes for card tops */
.t-reading { background: linear-gradient(135deg, #5566d6, #7b8ff0); }
.t-writing { background: linear-gradient(135deg, #c9861f, #eab13f); }
.t-maths   { background: linear-gradient(135deg, #2b9e6b, #46c78c); }
.t-team    { background: linear-gradient(135deg, #b0466f, #dd6f97); }
.t-organise{ background: linear-gradient(135deg, #4a8fc7, #6cabdd); }
.t-mindset { background: linear-gradient(135deg, #7a54c0, #9c78e0); }
.t-heart   { background: linear-gradient(135deg, #d9930d, #f6c445); }
.t-custom  { background: linear-gradient(135deg, #1C2C5B, #4A8FC7); }

/* progress bar */
.progress { height: 9px; background: #e6eef7; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--city-gold), #ffd166); border-radius: 999px; transition: width .5s; }

/* completed ribbon */
.done-badge { color: var(--success); font-weight: 800; font-size: .82rem; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Activity player ---------- */
.player-wrap { max-width: 760px; margin: 0 auto; }
.player-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  background: #fff; padding: 16px 18px; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.player-head .p-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.7rem; color: #fff; }
.player-head h2 { margin: 0; font-size: 1.3rem; color: var(--city-navy); }
.player-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

.q-progress { display: flex; gap: 6px; margin-bottom: 16px; }
.q-progress span { flex: 1; height: 8px; background: #dfe8f3; border-radius: 999px; }
.q-progress span.active { background: var(--city-sky); }
.q-progress span.right { background: var(--success); }
.q-progress span.wrong { background: var(--city-gold); }

.q-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px;
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.q-passage {
  background: #f3f8fd; border-left: 4px solid var(--city-sky); padding: 14px 16px;
  border-radius: 10px; margin-bottom: 16px; font-size: 1.02rem; line-height: 1.5;
}
.q-text { font-size: 1.25rem; font-weight: 700; color: var(--city-navy); margin: 0 0 18px; line-height: 1.4; }

.choices { display: grid; gap: 12px; }
.choice {
  text-align: left; background: #f4f8fc; border: 2px solid transparent; border-radius: 14px;
  padding: 15px 18px; font-size: 1.08rem; cursor: pointer; font-family: inherit; font-weight: 600;
  color: var(--ink); transition: all .12s; display: flex; align-items: center; gap: 12px;
}
.choice:hover { border-color: var(--city-sky); background: #eaf3fb; }
.choice .kit { width: 26px; height: 26px; flex: none; }
.choice.correct { background: #e2f8ea; border-color: var(--success); }
.choice.wrong { background: #fde8e4; border-color: var(--danger); }
.choice:disabled { cursor: default; }

.feedback {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px; font-size: 1rem; font-weight: 600;
  display: none;
}
.feedback.show { display: block; animation: pop .2s ease; }
.feedback.ok { background: #e2f8ea; color: #17753a; }
.feedback.no { background: #fff3e0; color: #9a5a00; }
.feedback .explain { display: block; font-weight: 500; margin-top: 6px; color: var(--muted); }

.player-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; }

/* typed answer */
.type-answer {
  width: 100%; font-size: 1.4rem; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--city-sky-light);
  font-family: inherit; text-align: center; letter-spacing: 1px;
}
.type-answer:focus { outline: none; border-color: var(--city-sky); }

/* sort buckets */
.sort-items { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; min-height: 40px; }
.sort-chip {
  background: #fff; border: 2px solid var(--city-sky); color: var(--city-navy); border-radius: 999px;
  padding: 10px 16px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 1rem;
  box-shadow: var(--shadow-sm);
}
.sort-chip.selected { background: var(--city-gold); border-color: var(--city-gold); }
.sort-buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; }
.bucket {
  background: #eef5fc; border: 2px dashed var(--city-sky-dark); border-radius: 16px; padding: 12px; min-height: 120px;
}
.bucket h4 { margin: 0 0 8px; text-align: center; color: var(--city-navy); }
.bucket-slot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bucket .sort-chip { cursor: pointer; }
.bucket.correct-flash { border-color: var(--success); background: #e7f8ee; }

/* order/sequence */
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-item {
  background: #fff; border: 2px solid var(--city-sky-light); border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; font-weight: 600;
}
.order-item .num { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--city-navy); color: #fff; display: grid; place-items: center; font-weight: 800; }
.order-btns { display: flex; flex-direction: column; gap: 2px; margin-left: auto; }
.order-btns button { border: none; background: #e6eef7; border-radius: 6px; cursor: pointer; width: 30px; height: 22px; font-weight: 800; color: var(--city-navy); }
.order-btns button:hover { background: var(--city-sky-light); }
.order-item.ok { border-color: var(--success); background: #eefaf1; }
.order-item.no { border-color: var(--city-gold); }

/* results screen */
.results { text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px; }
.results .trophy-big { width: 120px; height: 120px; margin: 0 auto 10px; }
.results h2 { color: var(--city-navy); margin: 6px 0; font-size: 1.8rem; }
.results .score-line { font-size: 1.2rem; color: var(--muted); margin-bottom: 16px; }
.motm {
  background: linear-gradient(120deg, var(--city-navy), var(--city-sky-dark)); color: #fff;
  padding: 14px; border-radius: 14px; margin: 16px 0; font-weight: 700;
}
.results-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Trophy cabinet ---------- */
.cabinet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 16px; }
.trophy-card {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); padding: 18px 12px; text-align: center;
  border: 1px solid rgba(28,44,91,.06);
}
.trophy-card.locked { opacity: .45; filter: grayscale(.7); }
.trophy-card .t-emoji { font-size: 2.6rem; }
.trophy-card h4 { margin: 8px 0 3px; color: var(--city-navy); font-size: .98rem; }
.trophy-card p { margin: 0; font-size: .78rem; color: var(--muted); }

.leaguetable { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.leaguetable th, .leaguetable td { padding: 12px 14px; text-align: left; }
.leaguetable thead { background: var(--city-navy); color: #fff; }
.leaguetable tbody tr:nth-child(even) { background: #f3f8fd; }
.leaguetable td.right { text-align: right; font-variant-numeric: tabular-nums; }
.mini-bar { height: 8px; background: #e6eef7; border-radius: 999px; overflow: hidden; min-width: 90px; }
.mini-bar > span { display: block; height: 100%; background: var(--city-sky); }

/* ---------- Parent area ---------- */
.parent-lock { max-width: 420px; margin: 40px auto; text-align: center; background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.parent-lock h2 { color: var(--city-navy); }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 20px; }
.panel h3 { margin-top: 0; color: var(--city-navy); display: flex; align-items: center; gap: 8px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--city-navy); font-size: .92rem; }
.field input[type=text], .field input[type=password], .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 2px solid #d8e4f0; font-family: inherit; font-size: 1rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--city-sky); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.builder-q { background: #f4f8fc; border-radius: 12px; padding: 14px; margin-bottom: 12px; border: 1px solid #e0eaf4; }
.builder-q .qrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.builder-q .qrow input { flex: 1; }
.builder-q .del { background: var(--danger); color: #fff; border: none; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-weight: 800; }
.opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.opt-row input[type=radio] { width: 20px; height: 20px; }

.custom-list { display: flex; flex-direction: column; gap: 10px; }
.custom-row { display: flex; align-items: center; gap: 12px; background: #f4f8fc; border-radius: 12px; padding: 12px 14px; }
.custom-row .ci { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 1.3rem; }
.custom-row .meta { flex: 1; }
.custom-row .meta strong { color: var(--city-navy); }
.custom-row .meta small { color: var(--muted); display: block; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--city-navy); color: #fff; padding: 14px 22px; border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow); z-index: 60; transition: transform .3s; max-width: 90%;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 30px; }
.badge-new { background: var(--city-gold); color: var(--city-navy); border-radius: 999px; padding: 2px 8px; font-size: .7rem; font-weight: 800; }

/* status dot for AI */
.ai-status { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c7d3e2; }
.dot.on { background: var(--success); }

/* ---------- Celebration ---------- */
.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti { position: absolute; width: 12px; height: 12px; top: -20px; opacity: .95; will-change: transform; }
.goal-flash {
  position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 55;
}
.goal-flash span {
  font-size: clamp(3rem, 14vw, 9rem); font-weight: 900; color: var(--city-gold);
  text-shadow: 0 4px 0 var(--city-navy), 0 0 40px rgba(240,179,16,.6);
  animation: goalpop .9s ease forwards; transform-origin: center;
}
@keyframes goalpop {
  0% { transform: scale(.2) rotate(-8deg); opacity: 0; }
  30% { transform: scale(1.1) rotate(3deg); opacity: 1; }
  70% { transform: scale(1) rotate(0); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* ---------- Home extras ---------- */
.quick-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; margin-bottom: 8px; }
.stat-card { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 14px; }
.stat-card .big { font-size: 2rem; }
.stat-card .n { font-size: 1.6rem; font-weight: 900; color: var(--city-navy); line-height: 1; }
.stat-card .l { font-size: .8rem; color: var(--muted); }

.pitch-hint { background: var(--pitch); background-image: repeating-linear-gradient(90deg, var(--pitch) 0 40px, var(--pitch-dark) 40px 80px); border-radius: var(--radius); padding: 20px; color: #fff; margin: 20px 0; box-shadow: var(--shadow-sm); }
.pitch-hint h3 { margin: 0 0 8px; }
.pitch-hint p { margin: 0; opacity: .95; }

@media (max-width: 620px) {
  .scoreboard { order: 3; margin-left: auto; }
  .mainnav { order: 4; width: 100%; justify-content: center; margin-left: 0; }
  .hero .hero-mascot { width: 100px; opacity: .85; }
  .q-card { padding: 18px; }
}

/* ---------- Login portal (turnstile) ---------- */
body.logged-out .scoreboard { display: none; }
body.logged-out #mainnav a[data-route="home"],
body.logged-out #mainnav a[data-route="play"],
body.logged-out #mainnav a[data-route="cabinet"],
body.logged-out #mainnav a[data-route="news"],
body.logged-out #mainnav a[data-route="season"],
body.logged-out #mainnav a[data-route="learning"] { display: none; }

.player-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--city-navy-deep); border: 1px solid rgba(255,255,255,.15);
  padding: 5px 6px 5px 10px; border-radius: 999px; color: #fff;
}
.player-chip .pc-kit { width: 24px; height: 24px; }
.player-chip .pc-kit svg { width: 100%; height: 100%; }
.player-chip .pc-name { font-weight: 700; font-size: .92rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-chip .pc-switch { border: none; background: var(--city-gold); color: var(--city-navy); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-weight: 800; font-size: 1rem; }
.player-chip .pc-switch:hover { background: #ffc02e; }

.login-screen { max-width: 760px; margin: 10px auto; text-align: center; }
.login-mascot { width: 120px; height: 120px; margin: 0 auto; }
.login-mascot svg { width: 100%; height: 100%; }
.login-title { color: var(--city-navy); font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 4px 0; }
.login-sub { color: var(--muted); margin: 0 0 26px; font-size: 1.05rem; }
.login-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.login-card {
  background: #fff; border: 3px solid transparent; border-radius: 20px; padding: 20px 12px; cursor: pointer;
  box-shadow: var(--shadow-sm); font-family: inherit; transition: transform .12s, box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.login-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--city-sky); }
.login-card .login-kit { width: 74px; height: 74px; }
.login-card .login-kit svg { width: 100%; height: 100%; }
.login-card .login-name { font-weight: 800; font-size: 1.15rem; color: var(--city-navy); }
.login-card .login-role { font-size: .78rem; color: var(--muted); font-weight: 600; }
.login-card.manager { background: linear-gradient(135deg, #eaf4fb, #dcecf8); }
.login-card.manager .mgr-badge { width: 74px; height: 74px; display: grid; place-items: center; font-size: 3rem; }

/* keypad */
.keypad-overlay { position: fixed; inset: 0; background: rgba(16,25,58,.55); display: grid; place-items: center; z-index: 70; padding: 16px; }
.keypad { background: #fff; border-radius: 22px; padding: 22px; width: 300px; max-width: 92vw; box-shadow: var(--shadow); text-align: center; }
.keypad.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-8px)} 40%,80%{transform:translateX(8px)} }
.keypad-title { font-weight: 800; color: var(--city-navy); margin-bottom: 12px; }
.keypad-display { font-size: 1.8rem; letter-spacing: 8px; color: var(--city-navy); min-height: 40px; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.keypad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { font-size: 1.4rem; font-weight: 800; padding: 14px 0; border-radius: 14px; border: none; cursor: pointer; background: #eef4fb; color: var(--city-navy); font-family: inherit; transition: background .1s, transform .06s; }
.key:hover { background: var(--city-sky-light); }
.key:active { transform: scale(.95); }
.key-go { background: var(--success); color: #fff; }
.key-go:hover { background: #27a24f; }
.key-fn { background: #e6eef7; }

/* colour picker (parent player mgmt) */
.colour-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.colour-sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #cdd9e8; cursor: pointer; padding: 0; }
.colour-sw.on { box-shadow: 0 0 0 3px var(--city-navy); }

/* ---------- Stadium backdrops ---------- */
.hero.has-stadium { position: relative; }
.hero-stadium {
  position: absolute; inset: 0; overflow: hidden; z-index: 0; opacity: .5;
  background-size: cover; background-position: center;
}
.hero-stadium svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero.has-stadium > *:not(.hero-stadium) { position: relative; z-index: 1; }

.login-stadium {
  height: 120px; border-radius: 18px; overflow: hidden; margin-bottom: 6px;
  box-shadow: var(--shadow-sm); background-size: cover; background-position: center;
}
.login-stadium svg { width: 100%; height: 100%; display: block; object-fit: cover; }

/* custom crest / player photos (user-supplied images) */
.crest-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-crest .crest-img { border-radius: 6px; }
.login-kit .avatar-img { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; display: block; box-shadow: var(--shadow-sm); }
.pc-kit .avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.print-crest .crest-img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Matchday section banners ---------- */
.section-banner {
  position: relative; height: 110px; border-radius: var(--radius); overflow: hidden;
  margin-bottom: 18px; box-shadow: var(--shadow-sm); display: grid; place-items: center;
}
.section-banner .banner-art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.section-banner .banner-art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.section-banner .banner-label {
  position: relative; z-index: 1; color: #fff; font-weight: 900; font-size: 1.5rem; text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.5); line-height: 1.2;
}
.section-banner .banner-label small { display: block; font-size: .9rem; font-weight: 700; color: var(--city-gold); margin-top: 2px; }

/* activity screen: banner above the player head */
.activity-head { max-width: 760px; margin: 0 auto 18px; }
.activity-head .section-banner { height: 80px; margin-bottom: 14px; }
.activity-head .section-banner .banner-label { font-size: 1.15rem; }
.activity-head .player-head { margin-bottom: 0; }

/* ---------- Academy News (original football-news look) ---------- */
.news-bar {
  display: flex; align-items: center; gap: 14px; background: var(--city-navy-deep); color: #fff;
  padding: 10px 16px; border-radius: 12px 12px 0 0; box-shadow: var(--shadow-sm);
}
.news-logo { display: flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: 1px; }
.news-logo-mark { background: var(--city-gold); color: var(--city-navy); border-radius: 6px; padding: 2px 7px; font-weight: 900; }
.news-live { display: inline-flex; align-items: center; gap: 6px; background: #e8102f; color: #fff; font-weight: 800; font-size: .8rem; padding: 4px 10px; border-radius: 999px; letter-spacing: 1px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: livepulse 1.2s infinite; }
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.news-clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; opacity: .9; }

.news-hero { position: relative; overflow: hidden; color: #fff; min-height: 230px; box-shadow: var(--shadow); }
.news-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.news-hero-bg svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-hero-body { position: relative; z-index: 1; padding: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 640px; }
.news-kicker { background: var(--city-gold); color: var(--city-navy); font-weight: 900; font-size: .78rem; letter-spacing: 1.5px; padding: 4px 10px; border-radius: 4px; text-transform: uppercase; }
.news-kicker.breaking { background: #e8102f; color: #fff; }
.news-hl { margin: 4px 0 0; font-size: clamp(1.4rem, 3.5vw, 2.1rem); line-height: 1.15; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.news-sf { margin: 0; font-size: 1rem; opacity: .95; text-shadow: 0 1px 6px rgba(0,0,0,.5); }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.news-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow-sm); padding: 16px; border: 1px solid rgba(28,44,91,.06); border-top: 4px solid var(--city-sky); display: flex; flex-direction: column; gap: 8px; transition: transform .12s, box-shadow .15s; }
.news-card.clickable { cursor: pointer; }
.news-card.clickable:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-top-color: var(--city-gold); }
.news-card-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.news-card-top .news-kicker { background: var(--city-navy); color: #fff; font-size: .68rem; }
.news-skilltag { font-size: .72rem; font-weight: 800; color: var(--muted); }
.news-card-hl { margin: 2px 0; font-size: 1.05rem; color: var(--city-navy); line-height: 1.25; }
.news-card-sf { margin: 0; font-size: .86rem; color: var(--muted); flex: 1; }
.news-card-foot { margin-top: 4px; }
.news-watch { color: #e8102f; font-weight: 800; font-size: .85rem; }

/* breaking-news ticker */
.news-ticker { display: flex; align-items: center; background: var(--city-navy-deep); color: #fff; border-radius: 10px; overflow: hidden; margin-top: 22px; box-shadow: var(--shadow-sm); }
.news-ticker-label { background: #e8102f; color: #fff; font-weight: 900; letter-spacing: 1px; padding: 12px 14px; font-size: .82rem; flex: none; z-index: 1; }
.news-ticker-track { display: flex; overflow: hidden; white-space: nowrap; flex: 1; }
.news-ticker-run { display: inline-block; padding: 12px 0; white-space: nowrap; font-weight: 700; animation: ticker 32s linear infinite; }
.news-ticker-run::after { content: '   ★   '; }
.news-ticker:hover .news-ticker-run { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* home news teaser */
.news-teaser { display: flex; align-items: center; gap: 12px; background: var(--city-navy); color: #fff; border-radius: 12px; padding: 12px 16px; margin: 0 0 22px; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .1s; }
.news-teaser:hover { transform: translateY(-2px); }
.news-teaser-badge { display: inline-flex; align-items: center; gap: 6px; background: #e8102f; color: #fff; font-weight: 900; font-size: .72rem; letter-spacing: 1px; padding: 4px 10px; border-radius: 999px; flex: none; }
.news-teaser-hl { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-teaser-go { color: var(--city-gold); font-weight: 800; flex: none; }

@media (max-width: 620px) { .news-teaser-hl { white-space: normal; } }

/* star players showcase */
.stars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.star-card {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden;
  text-align: center; border: 1px solid rgba(28,44,91,.06); transition: transform .12s, box-shadow .15s;
}
.star-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.star-photo {
  height: 210px; background: linear-gradient(160deg, var(--city-sky-light), var(--city-sky));
  display: grid; place-items: center; overflow: hidden;
}
.star-photo svg { width: 92px; height: auto; }
.star-photo .star-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.star-name { font-weight: 800; color: var(--city-navy); margin: 8px 6px 2px; font-size: 1rem; }
.star-pos { font-size: .82rem; color: var(--muted); margin-bottom: 12px; }

/* learning goal chip on activities */
.learn-goal {
  margin-top: 8px; background: #eef6fd; border: 1px solid #d3e6f6; color: #1f4a72;
  border-radius: 10px; padding: 7px 11px; font-size: .86rem; font-weight: 700; display: inline-block;
}

/* ---------- Kid Learning Map ---------- */
.learn-subject h3 .p-icon { display: inline-grid; vertical-align: middle; margin-right: 6px; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.learn-card {
  background: #f4f9fd; border: 2px solid #e0ecf7; border-radius: 14px; padding: 14px;
}
.learn-card.gold { border-color: var(--city-gold); background: #fffaf0; }
.learn-year { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.learn-kid { font-weight: 700; color: var(--city-navy); margin: 4px 0; font-size: .98rem; }
.learn-medal { margin-top: 6px; font-weight: 800; font-size: .9rem; color: var(--city-navy); }

/* ---------- Curriculum coverage (parent) ---------- */
.cov-summary { display: flex; gap: 20px; flex-wrap: wrap; background: #f3f8fd; border-radius: 12px; padding: 12px 16px; margin: 10px 0 16px; }
.cov-summary b { color: var(--city-navy); font-size: 1.2rem; }
.cov-subject { color: var(--city-navy); margin: 18px 0 6px; border-bottom: 2px solid #e6eef7; padding-bottom: 4px; }
.cov-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cov-table th { text-align: left; padding: 6px 8px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid #e6eef7; }
.cov-table td { padding: 8px; border-bottom: 1px solid #eef3f9; vertical-align: top; }
.cov-obj { color: var(--muted); font-size: .84rem; margin-top: 2px; }
.cov-act { font-size: .82rem; color: #2c507e; }
.cov-medal { font-weight: 800; white-space: nowrap; color: var(--muted); }
.cov-medal.s { color: var(--city-sky-dark); }
.cov-medal.g { color: #c8930b; }
.cov-note { background: #fff8e8; border: 1px solid #f2e0b0; border-radius: 10px; padding: 12px 14px; font-size: .84rem; color: #7a5a10; margin-top: 16px; }

/* ---------- Print report ---------- */
#printArea { display: none; }
.print-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.print-crest { width: 60px; height: 66px; }
.print-crest svg { width: 100%; height: 100%; }
.print-head h1 { margin: 0; font-size: 1.4rem; color: var(--city-navy); }
.print-head p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }

@media print {
  body.print-mode > *:not(#printArea) { display: none !important; }
  body.print-mode #printArea { display: block !important; padding: 10px; color: #000; }
  #printArea .cov-table { page-break-inside: auto; }
  #printArea .cov-table tr { page-break-inside: avoid; }
  #printArea .cov-note { background: #fff; }
}

/* ---------- Season campaign: Road to the Cup Final ---------- */
.season-intro { color: var(--muted); margin: 0 0 18px; max-width: 620px; }
.season-champions { text-align: center; background: linear-gradient(135deg, #d9930d, #f6c445); color: #4a3208; border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.season-champions .champ-trophy { font-size: 3rem; }
.season-champions h2 { margin: 4px 0; letter-spacing: 1px; }

.season-road { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 8px; }
.season-road::before { content: ''; position: absolute; left: 30px; top: 20px; bottom: 20px; width: 4px; background: repeating-linear-gradient(#cfe0f0 0 8px, transparent 8px 16px); z-index: 0; }
.stage-node { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow-sm); border: 2px solid transparent; transition: transform .12s var(--ease), box-shadow .15s; }
.stage-node.clickable { cursor: pointer; }
.stage-node.clickable:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.stage-node.active { border-color: var(--city-gold); box-shadow: 0 0 0 3px rgba(240,179,16,.2), var(--shadow-sm); }
.stage-node.done { opacity: .92; }
.stage-node.locked { opacity: .6; }
.stage-badge { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: linear-gradient(135deg, var(--city-navy), var(--city-sky-dark)); color: #fff; }
.stage-node.done .stage-badge { background: linear-gradient(135deg, #2b9e6b, #46c78c); }
.stage-node.active .stage-badge { background: linear-gradient(135deg, #d9930d, #f6c445); }
.stage-info { flex: 1; min-width: 0; }
.stage-phase { font-size: .72rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--city-sky-dark); }
.stage-info h3 { margin: 1px 0; color: var(--city-navy); font-size: 1.05rem; }
.stage-mini { font-size: .84rem; color: var(--muted); }

/* stage detail */
.stage-head { display: flex; gap: 14px; align-items: flex-start; margin: 12px 0 16px; }
.stage-head-badge { width: 56px; height: 56px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; background: linear-gradient(135deg, #d9930d, #f6c445); }
.stage-head h2 { margin: 2px 0; color: var(--city-navy); }
.stage-brief { margin: 0; color: var(--muted); }

.obj-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); border-left: 5px solid var(--city-sky); }
.obj-card.done { background: #f3faf5; border-left-color: var(--success); }
.obj-card.cat-app { border-left-color: #5566d6; }
.obj-card.cat-learn { border-left-color: #c9861f; }
.obj-card.cat-physical { border-left-color: #e8543f; }
.obj-card.cat-home { border-left-color: #2b9e6b; }
.obj-card.cat-print { border-left-color: #7a54c0; }
.obj-emoji { font-size: 1.5rem; flex: none; }
.obj-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.obj-cat { font-size: .7rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.obj-body strong { color: var(--ink); font-weight: 600; }
.obj-progress { font-size: .8rem; color: var(--city-sky-dark); font-weight: 700; }
.obj-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.obj-tick { font-size: 1.4rem; }

.stage-reward { text-align: center; background: linear-gradient(135deg, var(--city-navy), var(--city-sky-dark)); color: #fff; border-radius: var(--radius); padding: 22px; margin-top: 18px; box-shadow: var(--shadow); }
.stage-reward .reward-emoji { font-size: 2.6rem; }
.stage-reward h3 { margin: 4px 0; }
.stage-reward .btn { margin-top: 12px; }

/* Parent Guide */
.guide-panel { border: 2px solid var(--city-sky); background: linear-gradient(180deg, #f4f9fe, #fff); }
.guide-summary { cursor: pointer; font-weight: 800; color: var(--city-navy); font-size: 1.05rem; list-style: none; padding: 4px 0; }
.guide-summary::-webkit-details-marker { display: none; }
.guide-summary::before { content: '▸ '; color: var(--city-sky-dark); }
details[open] .guide-summary::before { content: '▾ '; }
.guide-body { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.guide-quickstart { background: #fff6df; border: 1px solid #f6c445; border-radius: 12px; padding: 12px 16px; }
.guide-quickstart ol { margin: 8px 0 0; padding-left: 20px; }
.guide-quickstart li { margin: 4px 0; }
.guide-item { display: flex; gap: 12px; background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--city-sky); }
.guide-emoji { font-size: 1.6rem; flex: none; }
.guide-text strong { color: var(--city-navy); font-size: 1.02rem; }
.guide-text p { margin: 3px 0 0; color: var(--ink); font-size: .92rem; }
.guide-how { color: var(--muted) !important; font-size: .86rem !important; }

/* season mission sign-off */
.signoff-note { font-size: .74rem; font-weight: 800; color: var(--muted); }
.signoff-note.pending { color: #d9930d; }
.pin-input { width: 100%; font-size: 1.4rem; text-align: center; letter-spacing: 6px; padding: 10px; border: 2px solid var(--city-sky); border-radius: 10px; margin-bottom: 6px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--city-navy); cursor: pointer; }
.chk input { width: 20px; height: 20px; }

/* curveball twist banner */
.twist-banner {
  display: flex; align-items: center; gap: 14px; margin: 12px 0 16px;
  background: linear-gradient(120deg, #7a54c0, #a678e8); color: #fff;
  border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow-sm);
  animation: rise .4s var(--ease);
}
.twist-banner.hard { background: linear-gradient(120deg, #c0392b, #e8543f); }
.twist-emoji { font-size: 2rem; flex: none; animation: float 4s ease-in-out infinite; }
.twist-banner strong { display: block; letter-spacing: .5px; }
.twist-desc { font-size: .9rem; opacity: .95; }
.obj-card .obj-body strong { }

/* home season teaser */
.season-teaser { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg, #d9930d, #f6c445); color: #4a3208; border-radius: 12px; padding: 12px 16px; margin: 0 0 22px; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .1s; }
.season-teaser:hover { transform: translateY(-2px); }
.season-teaser-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.18); color: #fff; font-weight: 900; font-size: .72rem; letter-spacing: 1px; padding: 4px 10px; border-radius: 999px; flex: none; }
.season-teaser-hl { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-teaser-go { font-weight: 900; flex: none; }
@media (max-width: 620px) { .season-teaser-hl { white-space: normal; } .obj-card { flex-wrap: wrap; } }

/* printable sheets */
#printArea { display: none; }
.print-sheet { font-family: var(--font); color: #111; }
.sheet-head { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid #1C2C5B; padding-bottom: 10px; margin-bottom: 14px; }
.sheet-crest svg, .cert-crest svg { width: 60px; height: 60px; }
.sheet-head h1 { margin: 0; color: #1C2C5B; font-size: 1.5rem; }
.sheet-head p { margin: 2px 0 0; color: #555; }
.sheet-intro { font-style: italic; color: #333; }
.sheet-line { border-bottom: 1.5px solid #9aa7bd; height: 30px; margin: 6px 0; }
.sheet-goal { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; }
.sheet-num { width: 34px; height: 34px; flex: none; border-radius: 50%; background: #1C2C5B; color: #fff; display: grid; place-items: center; font-weight: 800; }
.sheet-goal > .sheet-line { flex: 1; }
.sheet-check { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.sheet-box { width: 24px; height: 24px; flex: none; border: 2px solid #1C2C5B; border-radius: 5px; }
.sheet-check .sheet-line { flex: 1; }
.sheet-q { margin: 14px 0 4px; }
.sheet-sign { margin-top: 20px; }
.sheet-tables { width: 100%; border-collapse: collapse; margin-top: 10px; }
.sheet-tables td { border: 1px solid #bcc7d8; padding: 10px 8px; font-size: 1.05rem; }
.sheet-blank { display: inline-block; min-width: 46px; border-bottom: 1.5px solid #333; }
.sheet-cert { text-align: center; border: 10px double #d9930d; border-radius: 12px; padding: 28px; }
.sheet-cert h1 { color: #1C2C5B; margin: 8px 0; }
.cert-sub { color: #555; margin: 4px 0; }
.cert-name { font-size: 2.2rem; font-weight: 900; color: #d9930d; border-bottom: 2px dashed #ccc; display: inline-block; padding: 4px 30px; margin: 8px 0 14px; }
.cert-body { max-width: 520px; margin: 0 auto 20px; color: #333; }
.cert-foot { display: flex; justify-content: space-between; margin-top: 24px; color: #333; }

@media print {
  .print-sheet .sheet-line { height: 34px; }
}

/* ---------- Install-as-app card + help overlay ---------- */
.install-card {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: linear-gradient(120deg, #fff, #eef5fc);
  border: 2px solid var(--city-sky); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 22px; box-shadow: var(--shadow-sm);
  transition: transform .12s var(--ease), box-shadow .15s;
}
.install-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.install-icon { width: 46px; height: 46px; flex: none; }
.install-icon svg { width: 100%; height: 100%; }
.install-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.install-body strong { color: var(--city-navy); font-size: 1.05rem; }
.install-body span { color: var(--muted); font-size: .88rem; }
.install-card .btn { flex: none; }

.overlay.install-help { position: fixed; inset: 0; z-index: 70; background: rgba(16,25,58,.55); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.install-help .overlay-box { background: #fff; border-radius: 20px; padding: 26px; max-width: 380px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); animation: rise .35s var(--ease); }
.install-help .install-hero { width: 74px; height: 74px; margin: 0 auto 6px; }
.install-help .install-hero svg { width: 100%; height: 100%; }
.install-help h2 { margin: 4px 0; color: var(--city-navy); }
.install-help .install-sub { color: var(--muted); margin: 0 0 16px; }
.install-step { display: flex; align-items: center; gap: 12px; text-align: left; margin: 10px 0; color: var(--ink); }
.install-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--city-sky); color: #fff; font-weight: 800; display: grid; place-items: center; }
.install-help .btn { margin-top: 16px; width: 100%; }

/* ---------- "It's coming home" login anthem banner ---------- */
.anthem-banner {
  position: fixed; top: 26%; left: 50%; transform: translateX(-50%) rotate(-2deg);
  z-index: 60; pointer-events: none; white-space: nowrap;
  background: linear-gradient(120deg, #fff 0 33%, #e8102f 33% 66%, #fff 66%);
  color: var(--city-navy); font-weight: 900; font-size: clamp(1.3rem, 4.5vw, 2.4rem);
  letter-spacing: 1px; padding: 16px 34px; border-radius: 14px;
  border: 4px solid var(--city-navy); box-shadow: var(--shadow-lg);
  text-shadow: 0 1px 0 #fff, 0 2px 6px rgba(255,255,255,.8);
  animation: anthemin 4.2s var(--ease) forwards;
}
.anthem-banner span { text-shadow: none; }
@keyframes anthemin {
  0%   { transform: translateX(-50%) scale(.3) rotate(-14deg); opacity: 0; }
  12%  { transform: translateX(-50%) scale(1.12) rotate(2deg); opacity: 1; }
  20%  { transform: translateX(-50%) scale(1) rotate(-2deg); }
  85%  { transform: translateX(-50%) scale(1) rotate(-2deg); opacity: 1; }
  100% { transform: translateX(-50%) scale(1.15) rotate(0deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .anthem-banner { animation: none; opacity: 1; } }

/* ---------- Captain's Heart (empathy games) ---------- */
.feel-top { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 14px; }
.feel-face {
  width: 110px; height: 110px; flex: none; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #eaf4fb, #cfe4f4); box-shadow: var(--shadow-sm);
  border: 3px solid var(--city-sky);
}
.feel-face svg { width: 100%; height: 100%; display: block; }
.feel-face.feel-swap { animation: faceswap .45s var(--ease); }
@keyframes faceswap { 0% { transform: scale(.7) rotate(-6deg); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.feel-scene { flex: 1; }
.feel-scene .q-text { margin: 8px 0 0; }
.feel-q { margin-top: 6px; }
.choice.half { border-color: var(--city-gold); background: #fdf6e3; }

/* team spirit meter */
.spirit-wrap { margin-bottom: 14px; }
.spirit-label { font-weight: 800; color: var(--city-navy); margin-bottom: 6px; }
.spirit-label b { color: #d9930d; }
.spirit-bar { height: 14px; background: #f4e9cf; border-radius: 999px; overflow: hidden; }
.spirit-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #f6c445, #d9930d); border-radius: 999px; transition: width .6s var(--ease); }

/* kindness missions */
.mission-head { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.mission-head h3 { margin: 0 0 4px; color: var(--city-navy); }
.mission-note { margin: 0; font-size: .88rem; color: var(--muted); max-width: 480px; }
.mission-hearts { text-align: center; background: #fdf6e3; border: 2px solid #f6c445; border-radius: 14px; padding: 8px 16px; flex: none; }
.mission-hearts b { display: block; font-size: 1.5rem; color: #d9930d; }
.mission-hearts small { color: var(--muted); }
.mission-bar { margin-bottom: 16px; }
.mission-list { display: flex; flex-direction: column; gap: 10px; }
.mission-card {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: #fff; border: 2px solid #e3ecf5; border-radius: 14px; padding: 12px 16px;
  cursor: pointer; font-family: inherit; font-size: 1rem; transition: transform .1s var(--ease), border-color .15s, background .15s;
}
.mission-card:hover { transform: translateX(4px); border-color: var(--city-sky); }
.mission-card.done { background: #fdf6e3; border-color: #f6c445; }
.mission-card.done .mission-body strong { text-decoration: line-through; opacity: .75; }
.mission-emoji { font-size: 1.7rem; flex: none; }
.mission-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mission-body strong { color: var(--city-navy); }
.mission-body small { color: var(--muted); }
.mission-tick { font-size: 1.5rem; flex: none; color: #c9d6e4; }
.mission-card.done .mission-tick { color: #d9930d; }

@media (max-width: 560px) {
  .feel-top { flex-direction: column; align-items: center; text-align: center; }
  .mission-head { flex-direction: column; }
}

/* ---------- New-season unlock banner ---------- */
.season-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--city-navy), var(--city-sky-dark));
  color: #fff; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.season-banner strong { font-size: 1.2rem; }
.season-banner > *:last-child { margin-left: auto; }

/* ---------- Penalty Shootout ---------- */
.pk-scoreline { display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: var(--city-navy); margin-bottom: 10px; }
.pk-scoreline b { color: var(--city-gold); font-size: 1.2rem; }
.pk-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.pk-dot { width: 30px; height: 30px; border-radius: 50%; background: #e6eef7; display: grid; place-items: center; font-weight: 800; font-size: .9rem; border: 2px solid #d3e0ee; }
.pk-dot.current { border-color: var(--city-sky); box-shadow: 0 0 0 3px rgba(108,171,221,.25); }
.pk-dot.scored { background: #e2f8ea; border-color: var(--success); }
.pk-dot.missed { background: #fde8e4; border-color: var(--danger); color: var(--danger); }

.pk-scene {
  position: relative; height: 190px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #6CABDD 0%, #8fc7e8 45%, #3fae5e 45%, #2b8f49 100%);
  box-shadow: inset 0 0 40px rgba(0,0,0,.12); margin-bottom: 8px;
}
.pk-goal { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 300px; max-width: 92%; height: 120px; }
.pk-goal svg { width: 100%; height: 100%; }
.pk-keeper { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); width: 52px; height: 84px; transition: transform .55s cubic-bezier(.3,.8,.4,1); z-index: 2; }
.pk-keeper svg { width: 100%; height: 100%; }
.pk-ball { position: absolute; bottom: 8px; left: 50%; margin-left: -18px; width: 36px; height: 36px; transition: transform .6s cubic-bezier(.25,.7,.35,1); z-index: 3; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.pk-ball svg { width: 100%; height: 100%; }
.pk-timer { height: 10px; background: #e6eef7; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.pk-timer > span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--success), var(--city-gold), var(--danger)); transition: width .1s linear; }
.pk-timer-label { text-align: center; font-weight: 800; color: var(--city-navy); margin-top: 4px; font-size: .9rem; }

/* ---------- Beat the Clock ---------- */
.clock-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.clock-face {
  font-size: 2.6rem; font-weight: 900; color: var(--city-navy); font-variant-numeric: tabular-nums;
  background: #eef5fc; border-radius: 12px; padding: 6px 18px; letter-spacing: 1px; box-shadow: inset 0 2px 6px rgba(16,25,58,.08);
}
.clock-face.urgent { color: #fff; background: var(--danger); animation: tickpulse .5s steps(2) infinite; }
@keyframes tickpulse { 50% { transform: scale(1.06); } }
.clock-score { font-size: 1.6rem; font-weight: 800; color: var(--city-navy); }
.clock-score b { color: var(--city-gold); font-size: 2rem; }
.clock-bar { height: 12px; background: #e6eef7; border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.clock-bar > span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--city-sky), var(--city-gold)); transition: width 1s linear; }
.clock-card.flash-ok { animation: flashok .35s var(--ease); }
.clock-card.flash-no { animation: flashno .35s var(--ease); }
@keyframes flashok { 0% { box-shadow: 0 0 0 0 rgba(47,184,90,.5); } 100% { box-shadow: var(--shadow); } }
@keyframes flashno { 0% { box-shadow: 0 0 0 0 rgba(232,84,63,.5); } 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } 100% { transform: none; box-shadow: var(--shadow); } }
.stoppage {
  position: fixed; top: 22%; left: 50%; transform: translateX(-50%); z-index: 56; pointer-events: none;
  background: var(--danger); color: #fff; font-weight: 900; font-size: 1.4rem; padding: 10px 22px; border-radius: 10px;
  box-shadow: var(--shadow); animation: stoppagepop 1.6s var(--ease) forwards;
}
@keyframes stoppagepop { 0% { transform: translateX(-50%) scale(.4); opacity: 0; } 20% { transform: translateX(-50%) scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ============================================================
   DYNAMIC & SHARP — motion, depth and crisp finish
   ============================================================ */

/* sharper type */
h1, h2, h3, .brand-text strong, .hero h1, .news-hl { letter-spacing: -0.02em; }
.brand-text small { letter-spacing: 3px; }

/* crisp focus */
:focus-visible { outline: 3px solid var(--city-gold); outline-offset: 2px; border-radius: 8px; }

/* deeper hover elevation across the app */
.card.clickable:hover, .news-card.clickable:hover, .star-card:hover,
.trophy-card:hover, .stat-card:hover { box-shadow: var(--shadow-lg); }
.stat-card { transition: transform .15s var(--ease), box-shadow .2s var(--ease); }
.stat-card:hover { transform: translateY(-3px); }

/* staggered entrance for grids & rows */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > * {
  animation: rise .5s var(--ease) backwards;
}
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > *:nth-child(1) { animation-delay: .02s; }
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > *:nth-child(2) { animation-delay: .07s; }
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > *:nth-child(3) { animation-delay: .12s; }
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > *:nth-child(4) { animation-delay: .17s; }
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > *:nth-child(5) { animation-delay: .22s; }
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > *:nth-child(6) { animation-delay: .27s; }
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > *:nth-child(7) { animation-delay: .32s; }
:where(.grid, .news-grid, .cabinet-grid, .stars-grid, .learn-grid, .quick-row) > *:nth-child(n+8) { animation-delay: .36s; }

/* hero + section reveal */
.hero, .news-hero, .section-banner, .panel, .q-card, .results, .player-head { animation: rise .5s var(--ease) backwards; }

/* floating mascot */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
.hero-mascot { animation: float 4.5s ease-in-out infinite; }

/* tactile button shine */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .55s var(--ease);
}
.btn:hover::after { left: 150%; }
.btn-primary { transition: transform .08s, box-shadow .15s, background .15s, filter .15s; }
.btn-primary:hover { filter: saturate(1.05) brightness(1.02); }

/* slow "Ken Burns" drift on stadium backdrops */
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12); } }
.hero-stadium, .news-hero-bg, .section-banner .banner-art {
  animation: kenburns 24s ease-in-out infinite alternate; transform-origin: 50% 40%;
}

/* shimmering progress fills */
.progress > span { position: relative; overflow: hidden; }
.progress > span::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent);
  animation: shimmer 2.6s var(--ease) infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* punchier choice buttons */
.choice { transition: transform .1s var(--ease), border-color .12s, background .12s, box-shadow .15s; }
.choice:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.choice.correct { animation: goalpulse .5s var(--ease); }
@keyframes goalpulse { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* live pulse on LIVE badges already defined; add glow */
.news-live { box-shadow: 0 0 0 0 rgba(232,16,47,.6); animation: liveglow 1.8s ease-out infinite; }
@keyframes liveglow { 0% { box-shadow: 0 0 0 0 rgba(232,16,47,.5); } 70%, 100% { box-shadow: 0 0 0 10px rgba(232,16,47,0); } }

/* crisp card edges */
.card, .news-card, .panel, .trophy-card, .star-card { backface-visibility: hidden; }

/* respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
