/* Santa's Midnight Run — canvas arcade. The game draws itself; this styles the
   shell and the menu/overlay chrome, reusing the SantaVerse festive palette. */
:root {
  --pine: #2f9e5f; --pine-deep: #17663d; --gold: #f5c451; --crit: #e5604d;
  --card: #fffdf7; --ink: #26382f; --ink-soft: #6c8377;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #0a1130; color: #fff; font-family: 'Nunito', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
  -webkit-touch-callout: none; touch-action: none;
  -webkit-user-select: none; user-select: none; /* iOS keys the "Copy" callout off the -webkit- prefix */
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* The play surface: hold-to-fly / hold-to-fire must never trigger iOS text
   selection or the long-press callout, so opt the canvas out explicitly too. */
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; z-index: 1;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* Landscape game — nudge phones held in portrait to rotate. Only fires on small
   portrait viewports, so desktop/landscape play is never interrupted. */
#rotate { display: none; }
@media (orientation: portrait) and (max-width: 900px) {
  #rotate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 24px; color: #fff;
    background: radial-gradient(circle at 50% 38%, #23245c, #0a1130); }
}
.rot-box { max-width: 300px; }
.rot-phone { font-size: 76px; display: inline-block; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5));
  animation: rotateHint 2s ease-in-out infinite; }
@keyframes rotateHint { 0%, 40% { transform: rotate(0); } 60%, 100% { transform: rotate(90deg); } }
.rot-box p { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; margin: 18px 0 6px; }
.rot-box span { color: #cfe6ff; font-weight: 700; font-size: 14px; }

/* Landscape has a SHORT viewport — compact the panels so they never scroll. */
@media (orientation: landscape) and (max-height: 620px) {
  .panel { padding: 12px 16px; max-width: 500px; max-height: 96vh; }
  .panel h1 { font-size: 23px; margin: 2px 0 3px; }
  .tagline { font-size: 12.5px; margin: 0 0 5px; }
  .phero { margin: -2px -2px 6px; }
  .phero img { height: 80px; }
  .score-big { font-size: 32px; margin: 2px 0; }
  .howto { padding: 8px 11px; margin: 8px 0; }
  .howto p { font-size: 12px; line-height: 1.28; margin: 3px 0; }
  .stats-grid { gap: 7px; margin: 8px 0; }
  .stats-grid b { font-size: 18px; }
  .big-btn { padding: 11px; font-size: 17px; margin-top: 2px; }
  .tiny { font-size: 11px; }

  /* Start card → 2 columns (how-to beside title/button) so it's short & wide. */
  .panel.start-panel { max-width: 660px; display: grid; align-items: center; text-align: left;
    grid-template-columns: 1.05fr 1fr; column-gap: 16px; row-gap: 4px;
    grid-template-areas: "head howto" "btn howto" "lb howto" "inst howto" "tip howto"; }
  .start-panel .sp-head { grid-area: head; }
  .start-panel .sp-head h1 { margin-top: 0; }
  .start-panel .howto { grid-area: howto; margin: 0; align-self: stretch;
    display: flex; flex-direction: column; justify-content: center; }
  .start-panel .big-btn { grid-area: btn; }
  .start-panel #lb-menu-btn { grid-area: lb; margin: 0; }
  .start-panel #install-btn { grid-area: inst; margin: 0; }
  .start-panel .tiny { grid-area: tip; margin: 4px 0 0; }
}

/* ---------- menu / overlay ---------- */
#overlay { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center;
  padding: 18px; background: rgba(6,12,30,.72); }
#overlay.show { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.panel {
  background: linear-gradient(180deg, #fffdf7, #eef4f1); color: var(--ink); border-radius: 22px;
  padding: 22px 20px; max-width: 380px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 3px rgba(245,196,81,.5);
  animation: rise .25s ease; max-height: 92vh; overflow-y: auto;
}
@keyframes rise { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.panel h1 { font-family: 'Mountains of Christmas','Baloo 2',cursive; font-weight: 700; margin: 2px 0 6px;
  font-size: 34px; color: var(--pine-deep); line-height: 1.05; }
.phero { margin: -4px -4px 8px; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.4);
  background: linear-gradient(135deg, #7a1220, #3a0a10); display: flex; justify-content: center; }
.phero img { display: block; height: 158px; object-fit: contain; }
.tagline { color: var(--ink-soft); font-weight: 700; margin: 0 0 12px; }
.howto { text-align: left; background: var(--card); border-radius: 14px; padding: 12px 14px; margin: 12px 0;
  box-shadow: inset 0 0 0 1px #e2ece4; }
.howto p { margin: 7px 0; font-size: 13.5px; line-height: 1.4; }
.howto b { color: var(--pine-deep); }
.score-big { font-family: 'Baloo 2',sans-serif; font-size: 50px; font-weight: 800; color: var(--pine-deep); margin: 6px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 14px 0; }
.stats-grid > div { background: var(--card); border-radius: 12px; padding: 10px 4px; box-shadow: 0 2px 6px rgba(20,60,40,.18); }
.stats-grid b { display: block; font-size: 22px; font-family: 'Baloo 2',sans-serif; color: var(--ink); }
.stats-grid span { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.big-btn { width: 100%; font-family: 'Baloo 2',sans-serif; font-weight: 800; font-size: 19px; color: #fff;
  background: linear-gradient(180deg, var(--pine), var(--pine-deep)); padding: 15px; border-radius: 14px;
  box-shadow: 0 5px 0 #0f4a2c; transition: transform .08s; margin-top: 4px; }
.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #0f4a2c; }
.ghost-btn { width: 100%; margin-top: 8px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 15px;
  color: var(--pine-deep); padding: 10px; border-radius: 12px; background: transparent; box-shadow: inset 0 0 0 2px var(--pine); }
.ghost-btn:active { transform: translateY(2px); }
.tiny { font-size: 12px; } .muted { color: var(--ink-soft); }

/* ---------- Santa's story intro ---------- */
.story-panel { max-width: 620px; }
.story-panel .phero.villains { background: linear-gradient(135deg,#241a3a,#3a0a10); gap: 0; align-items: flex-end; }
.story-panel .phero.villains img { height: 128px; flex: 1; min-width: 0; }
.story-text { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 18px; line-height: 1.4;
  color: var(--ink); margin: 12px 6px 10px; }
.story-text b { color: var(--pine-deep); }
.dots { display: flex; justify-content: center; gap: 8px; margin: 4px 0 12px; }
.dots .dot { width: 9px; height: 9px; border-radius: 50%; background: #d6e2da; box-shadow: inset 0 0 0 1px #c2d2c8; }
.dots .dot.on { background: var(--gold); box-shadow: 0 0 0 3px rgba(245,196,81,.28); }
@media (orientation: landscape) and (max-height: 620px) {
  .story-panel .phero img, .story-panel .phero.villains img { height: 92px; }
  .story-text { font-size: 15px; margin: 8px 4px 6px; }
}

/* Storm King has no sprite — a stormy lightning hero for its game-over card */
.phero.storm-hero { background: radial-gradient(circle at 50% 35%, #3a2f6a, #16132e);
  min-height: 158px; align-items: center; font-size: 92px; line-height: 1;
  color: #ffe08a; text-shadow: 0 0 18px rgba(160,140,255,.9), 0 0 42px rgba(120,100,220,.6); }
@media (orientation: landscape) and (max-height: 620px) { .phero.storm-hero { min-height: 80px; font-size: 54px; } }

/* ---------- leaderboard ---------- */
.lb-panel { max-width: 460px; }
.lb-submit { display: flex; gap: 8px; margin: 6px 0 10px; }
.lb-submit #lb-name { flex: 1; min-width: 0; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 16px;
  padding: 12px 14px; border-radius: 12px; border: none; background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 2px #d8e4dc; text-align: center; }
.lb-submit .big-btn { flex: 1.3; margin: 0; padding: 12px; font-size: 15px; }
.lb-list { max-height: 46vh; overflow-y: auto; margin: 8px 0 12px; }
.lb-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; background: var(--card); margin: 5px 0; box-shadow: inset 0 0 0 1px #e2ece4; }
.lb-row .lb-rank { font-family: 'Baloo 2', sans-serif; font-weight: 800; color: var(--ink-soft); text-align: center; }
.lb-row .lb-nm { font-weight: 800; color: var(--ink); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .lb-sc { font-family: 'Baloo 2', sans-serif; font-weight: 800; color: var(--pine-deep); }
.lb-row:nth-child(1) .lb-rank { color: #e0a400; } .lb-row:nth-child(2) .lb-rank { color: #9a9a9a; } .lb-row:nth-child(3) .lb-rank { color: #b5722e; }
.lb-row.me { background: linear-gradient(180deg,#fff6df,#ffe9b8); box-shadow: 0 0 0 2px var(--gold); }
.lb-row.me.outside { margin-top: 10px; }
.lb-empty { color: var(--ink-soft); font-weight: 700; padding: 18px 0; }

/* App cross-promo call-to-action (Google Play) — an <a> that looks like a button */
a.big-btn { display: block; text-decoration: none; text-align: center; }
.app-cta { margin: 8px 0 2px; background: linear-gradient(180deg, #f5c451, #e0a400); color: #4a2e00;
  box-shadow: 0 5px 0 #a87b00; }
.app-cta:active { box-shadow: 0 2px 0 #a87b00; }

/* =================================================================================
   EPIC update — ranks, modes, letters, trophies, My List, settings, report, share
   ================================================================================= */
.panel.wide-panel { max-width: 560px; }
.panel.report-panel { max-width: 460px; }
.panel.letter-panel { max-width: 460px; }
.panel.list-panel, .panel.settings-panel { max-width: 440px; }
.panel h1 { font-size: 30px; }
.phero.compact img { height: 96px; }
.best { font-weight: 800; color: var(--pine-deep); margin: 8px 0 0; font-size: 13px; }
.subline { font-weight: 800; font-size: 13px; margin: 2px 0 6px; color: var(--ink-soft); }
.subline.good { color: var(--pine-deep); } .subline.gold { color: #a35d0a; }
.big-btn.gold { background: linear-gradient(180deg, #ffd23f, #e88b1a); color: #4a3410; box-shadow: 0 5px 0 #a35d0a; }
.big-btn.red { background: linear-gradient(180deg, #e5604d, #b8172c); box-shadow: 0 5px 0 #6e0a17; }
.ghost-btn.small { font-size: 13px; padding: 8px 12px; }
.ghost-btn.danger { color: var(--crit); box-shadow: inset 0 0 0 2px var(--crit); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.btn-row .big-btn, .btn-row .ghost-btn { margin-top: 0; }

/* start panel: two columns in landscape, stacked otherwise */
.panel.start-panel { max-width: 720px; text-align: left; }
.sp-cols { display: flex; flex-direction: column; gap: 10px; }
.sp-left, .sp-right { min-width: 0; }
.sp-head h1 { margin-top: 0; }
.start-panel .tagline { margin-bottom: 6px; }
.start-panel .big-btn { margin-top: 6px; }
.start-panel .howto { margin: 0 0 8px; }
@media (min-width: 640px) {
  .sp-cols { flex-direction: row; align-items: flex-start; }
  .sp-left { flex: 1.05; } .sp-right { flex: 1; }
}
@media (orientation: landscape) and (max-height: 620px) {
  .panel.start-panel { max-width: 760px; display: block; grid-template-areas: none; padding: 10px 14px; }
  .start-panel .sp-head h1 { font-size: 22px; }
  .start-panel .tagline { font-size: 12px; margin-bottom: 4px; }
  .start-panel .big-btn { padding: 9px; font-size: 16px; }
  .start-panel .howto { padding: 6px 10px; }
  .start-panel .howto p { font-size: 11.5px; margin: 3px 0; }
  .panel.report-panel .phero.compact img, .panel.letter-panel .phero img { height: 64px; }
  .panel h1 { font-size: 22px; }
  .rank-card { padding: 6px 10px; margin: 6px 0 2px; }
  .mode-btn { padding: 7px 9px; }
  .menu-btn { padding: 5px 2px 4px; }
  .letter .pc-text { font-size: 12.5px; line-height: 24px; }
  .letter { background-position: 0 36px; background-image: repeating-linear-gradient(180deg, transparent 0 23px, rgba(120,90,40,.12) 23px 24px); }
}

/* rank card + XP bar */
.rank-card { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--card); border-radius: 14px;
  padding: 8px 12px; margin: 8px 0 4px; box-shadow: inset 0 0 0 1px #e2ece4; }
.rank-card .rank-ic { font-size: 28px; flex: 0 0 auto; }
.rank-card .rank-body { flex: 1 1 auto; min-width: 0; }
.rank-card .rank-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 14px; color: var(--pine-deep); display: flex; justify-content: space-between; gap: 6px; }
.rank-card .rank-title small { font-size: 11px; color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
.xp-bar { height: 9px; background: #e2ece4; border-radius: 999px; overflow: hidden; margin-top: 4px; }
.xp-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--pine), #57e39b); border-radius: 999px; transition: width 1.1s cubic-bezier(.3,1,.4,1); }
.xp-fill.gold { background: linear-gradient(90deg, #e88b1a, #ffd23f); }
.xp-text { font-size: 11px; color: var(--ink-soft); font-weight: 700; margin-top: 3px; display: flex; justify-content: space-between; gap: 6px; }
.xp-gain { color: var(--pine-deep); font-weight: 800; }
.rankup { margin: 6px 0 0; font-family: 'Baloo 2', sans-serif; font-weight: 800; color: #4a3410; font-size: 14px; text-align: center;
  background: linear-gradient(90deg, #ffe6a8, #ffd23f, #ffe6a8); border-radius: 12px; padding: 7px 10px; animation: rankGlow 1.2s infinite; }
@keyframes rankGlow { 50% { box-shadow: 0 0 18px rgba(255,210,63,.9); } }
.challenge-card { background: linear-gradient(135deg, #fff3cf, #ffe6a8); border-radius: 12px; padding: 8px 12px; margin: 6px 0;
  font-weight: 800; color: #4a3410; font-size: 13px; box-shadow: inset 0 0 0 2px #f5c451; }
.challenge-card small { display: block; font-weight: 700; font-size: 11px; color: #7a5312; margin-top: 2px; }

/* mode buttons + menu tiles */
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.mode-btn { text-align: left; background: var(--card); border-radius: 12px; padding: 8px 10px; box-shadow: inset 0 0 0 2px #e2ece4;
  display: flex; flex-direction: column; gap: 1px; transition: transform .08s; }
.mode-btn:active { transform: translateY(2px); }
.mode-btn .mode-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 14px; color: var(--ink); }
.mode-btn .mode-sub { font-size: 10.5px; color: var(--ink-soft); font-weight: 700; line-height: 1.3; }
.mode-btn.daily { box-shadow: inset 0 0 0 2px #f5c451; background: linear-gradient(180deg, #fffdf7, #fff6da); }
.mode-btn .fire { color: #c0392b; }
.menu-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 6px; }
.menu-btn { background: var(--card); border-radius: 12px; padding: 6px 2px 5px; box-shadow: inset 0 0 0 1px #e2ece4; display: flex; flex-direction: column; align-items: center; gap: 1px; position: relative; }
.menu-btn:active { transform: translateY(2px); }
.menu-btn .menu-ic { font-size: 20px; }
.menu-btn .menu-lbl { font-size: 10.5px; font-weight: 800; color: var(--ink); }
.menu-btn .menu-cnt { font-size: 9.5px; font-weight: 700; color: var(--ink-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn .dot { position: absolute; top: 4px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 2px #fff; }

/* trophies / letters */
.ach-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 2px; }
.ach-chip { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(180deg, #fff6da, #ffe6a8); color: #4a3410;
  font-weight: 800; font-size: 12px; padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px #f5c451; }
.trophy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; text-align: left; }
@media (min-width: 640px) { .trophy-grid { grid-template-columns: repeat(3, 1fr); } }
.trophy { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 12px; padding: 6px 8px; box-shadow: inset 0 0 0 1px #e2ece4; }
.trophy .t-ic { font-size: 20px; flex: 0 0 auto; }
.trophy .t-name { font-weight: 800; font-size: 11.5px; color: var(--ink); line-height: 1.15; }
.trophy .t-desc { font-size: 10px; color: var(--ink-soft); font-weight: 700; line-height: 1.2; }
.trophy.locked { opacity: .5; filter: grayscale(1); }
.trophy.unlocked { box-shadow: inset 0 0 0 2px #f5c451; background: linear-gradient(180deg, #fffdf7, #fff6da); }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
@media (max-width: 480px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.pc-tile { background: var(--card); border-radius: 12px; padding: 7px 4px 6px; box-shadow: inset 0 0 0 1px #e2ece4; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); }
.pc-tile .pc-ic { font-size: 24px; }
.pc-tile .pc-name { font-weight: 800; font-size: 10.5px; line-height: 1.15; text-align: center; }
.pc-tile.locked { opacity: .55; } .pc-tile.locked .pc-ic { filter: grayscale(1); }
.pc-tile .pc-lock { font-size: 9.5px; color: var(--ink-soft); font-weight: 700; text-align: center; }
.pc-tile .pc-lock.new { color: var(--crit); }
.pc-tile.unlocked { box-shadow: inset 0 0 0 2px var(--pine); cursor: pointer; }
.letter { position: relative; text-align: left; background: #fffaf0; border-radius: 10px; padding: 14px 16px 12px; margin: 6px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.25), inset 0 0 0 1px #e8dcc0; transform: rotate(-1deg); color: #3a2d1a;
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(120,90,40,.12) 27px 28px); background-position: 0 42px; }
.letter .pc-stamp { position: absolute; top: 10px; right: 12px; width: 42px; height: 50px; border: 2px dashed #c9b48a; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; background: #fff; transform: rotate(4deg); }
.letter .pc-post { position: absolute; top: 16px; right: 60px; font-size: 8.5px; color: #9a7a4a; font-weight: 800; letter-spacing: 1px;
  border: 2px solid #c9b48a; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1; transform: rotate(-12deg); opacity: .8; }
.letter .pc-title { font-family: 'Mountains of Christmas', cursive; font-weight: 700; font-size: 24px; color: #8f0f22; margin: 0 92px 4px 0; line-height: 1.05; }
.letter .pc-text { font-family: 'Nunito', sans-serif; font-size: 13.5px; line-height: 28px; margin: 0; }
.letter .pc-sign { font-family: 'Mountains of Christmas', cursive; font-size: 21px; color: #17663d; margin: 4px 0 0; text-align: right; }

/* my list / settings */
.list-editor { text-align: left; margin: 6px 0; }
.list-row { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 12px; padding: 6px 10px; margin-bottom: 5px; box-shadow: inset 0 0 0 1px #e2ece4; }
.list-row .l-name { flex: 1 1 auto; font-weight: 800; font-size: 14px; color: var(--ink); }
.x-btn { font-weight: 800; color: var(--ink-soft); font-size: 16px; padding: 2px 6px; }
.list-add { display: flex; gap: 6px; margin-top: 6px; }
.list-add input { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700; padding: 9px 12px; border-radius: 12px; border: 2px solid #cfdcd3; background: #fff; color: var(--ink); }
.list-add input:focus { outline: none; border-color: var(--pine); }
.list-add button { font-family: 'Baloo 2', sans-serif; font-weight: 800; color: #fff; background: var(--pine-deep); padding: 0 16px; border-radius: 12px; font-size: 15px; }
.promo-line { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.4; }
.settings { text-align: left; margin: 6px 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--card); border-radius: 12px; padding: 8px 12px; margin-bottom: 5px; box-shadow: inset 0 0 0 1px #e2ece4; font-weight: 800; font-size: 13.5px; color: var(--ink); }
.set-row input[type=text] { font-size: 14px; font-weight: 700; padding: 6px 10px; border-radius: 10px; border: 2px solid #cfdcd3; width: 44%; background: #fff; color: var(--ink); }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #cfdcd3; transition: background .2s; flex: 0 0 auto; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on { background: var(--pine); } .switch.on::after { left: 23px; }
.quick-toggles { display: flex; gap: 6px; justify-content: center; margin: 8px 0 0; }
.quick-toggles button { font-weight: 800; font-size: 12px; padding: 7px 10px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px #e2ece4; color: var(--ink); }
.quick-toggles button.off { opacity: .5; text-decoration: line-through; }

/* daily box */
.daily-box { background: linear-gradient(180deg, #fffdf7, #fff6da); border-radius: 12px; padding: 8px 12px; margin: 8px 0; box-shadow: inset 0 0 0 2px #f5c451; text-align: center; }
.daily-box .d-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 13px; color: #4a3410; }
.daily-box .d-sub { font-size: 11.5px; font-weight: 700; color: #7a5312; margin-top: 2px; }
.daily-box pre.grid { font-family: inherit; font-size: 14px; line-height: 1.3; margin: 5px 0 0; letter-spacing: 1px; white-space: pre-wrap; }

/* the cross-promo card (red) */
.promo-card { display: flex; align-items: center; gap: 10px; text-align: left; text-decoration: none; margin-top: 8px; padding: 9px 12px; border-radius: 14px;
  background: linear-gradient(135deg, #b8172c 0%, #8f0f22 100%); color: #fff; box-shadow: 0 4px 14px rgba(143,15,34,.5); border: 2px solid rgba(255,255,255,.22); transition: transform .08s; }
.promo-card:active { transform: translateY(2px); }
.promo-card.night { background: linear-gradient(135deg, #1d2a6b 0%, #0b1130 100%); box-shadow: 0 4px 14px rgba(11,17,48,.6); }
.promo-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; background: #3a0a10; flex: 0 0 auto; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.promo-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.promo-text b { font-family: 'Baloo 2', sans-serif; font-size: 14px; }
.promo-text span { font-size: 11.5px; color: rgba(255,255,255,.92); font-weight: 700; }
.promo-text i { font-style: normal; font-weight: 800; color: #ffe6a8; }
.promo-note { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); margin: 4px 0 0; }

/* toasts (above the canvas + overlays) */
#toast-layer { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: 100%; max-width: 560px; }
.toast { background: rgba(11,17,48,.94); color: #fff; font-weight: 800; font-size: 13px; padding: 8px 16px; border-radius: 999px; box-shadow: 0 6px 16px rgba(0,0,0,.4); max-width: 92%; text-align: center;
  border: 1px solid rgba(255,255,255,.12); animation: toastIn .25s ease, toastOut .3s ease 2s forwards; }
.toast.good { background: linear-gradient(90deg,#2e8b57,#46a86e); }
.toast.gold { background: linear-gradient(90deg,#e88b1a,#ffd23f); color: #4a3410; }
.toast.trophy { background: linear-gradient(90deg,#4a3410,#8a6a2e); border-color: #f5c451; }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0; } }

/* The pre-EPIC start panel used named grid areas on its children; the new two-column
   layout must not inherit them (they were flinging the Install / Top Flyers tiles around). */
.start-panel .sp-head, .start-panel .howto, .start-panel .big-btn, .start-panel #lb-menu-btn, .start-panel #install-btn, .start-panel .tiny { grid-area: auto; }
@media (orientation: landscape) and (max-height: 620px) {
  .start-panel .sp-head, .start-panel .howto, .start-panel .big-btn, .start-panel #lb-menu-btn, .start-panel #install-btn, .start-panel .tiny { grid-area: auto; margin: 0; }
  .start-panel .big-btn { margin-top: 6px; }
  .start-panel .howto { margin-bottom: 8px; }
}

/* Character beside the title — a transparent cutout, never cropped (uses the
   landscape width instead of the scarce height). */
.hero-row { display: flex; align-items: center; gap: 12px; text-align: left; margin: 0 0 6px; }
.hero-fig { height: 118px; width: auto; flex: 0 0 auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.28)); animation: figBob 2.4s ease-in-out infinite; }
.hero-fig.sleigh { height: 96px; }
@keyframes figBob { 50% { transform: translateY(-3px); } }
.hero-txt { flex: 1 1 auto; min-width: 0; }
.hero-txt h1 { margin: 0 0 4px; }
.hero-txt .tagline { margin: 0; }
.hero-txt .score-big { text-align: left; margin: 2px 0; font-size: 40px; }
.start-panel .sp-head.hero-row { margin-bottom: 4px; }
.start-panel .sp-head .hero-fig.sleigh { height: 72px; }
@media (orientation: landscape) and (max-height: 620px) {
  .hero-fig { height: 92px; } .hero-fig.sleigh { height: 78px; }
  .start-panel .sp-head .hero-fig.sleigh { height: 58px; }
  .hero-txt .score-big { font-size: 32px; }
}
