/* grannyrally.com - Granny Rally. Seaside, candy-striped, phone first */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: #1d2340;
  background:
    radial-gradient(120% 45% at 50% 0%, #ffffff 0%, transparent 70%),
    linear-gradient(180deg, #e8f7ff 0%, #c9ecff 45%, #ffe6bd 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
.app[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app {
  position: relative; display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh; max-width: 640px; margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.top { text-align: center; padding: 0 40px; }
.logo-h { margin: 0; line-height: 0; }
.logo { width: min(100%, 360px); height: auto; overflow: visible; }
.lg-word { font-family: Impact, "Haettenschweiler", "Anton", "Arial Narrow Bold", "Roboto Condensed", "Arial Black", "Helvetica Neue", Arial, sans-serif; font-weight: 900; font-size: 138px; letter-spacing: 0; }
.logo { animation: logoIn .7s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes logoIn { from { transform: scale(.6) rotate(-4deg); opacity: 0; } }
.logo { pointer-events: none; }
.tagline { margin: 2px 0 0; font-size: clamp(.84rem, 3.6vw, 1.12rem); white-space: nowrap; font-weight: 900; color: #b0185a; letter-spacing: .01em; }

/* ---------- the Wise Old Granny's stage ---------- */
.stage {
  position: relative; margin: 8px auto 0; width: min(100%, 560px);
  height: clamp(250px, 53svh, 460px);
  border-radius: 26px; overflow: hidden;
  border: 3px solid #1d2340;
  background: #8fd3ff;
  box-shadow: 0 7px 0 rgba(29,35,64,.25);
}
#heroCv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.bubble {
  position: absolute; z-index: 5; left: 10px; top: 10px; width: calc(57% - 14px);
  overflow: visible;
  margin: 0; padding: 8px 11px;
  background: #fffdf7; color: #1d2340; border: 3px solid #1d2340; border-radius: 16px;
  font-weight: 800; font-size: clamp(.78rem, 3.3vw, .98rem); line-height: 1.26;
  box-shadow: 0 4px 0 rgba(43, 38, 20, .2);
  opacity: 0; transform: scale(.9); transform-origin: 70% 100%; transition: opacity .2s, transform .25s cubic-bezier(.2,1.5,.4,1);
}
.bubble.show { opacity: 1; transform: scale(1); }
.bubble::after { content: ""; position: absolute; right: 18%; bottom: -15px; border: 9px solid transparent; border-top: 14px solid #1d2340; border-bottom: 0; }
.bubble::before { content: ""; position: absolute; right: calc(18% + 3px); bottom: -9px; z-index: 1; border: 6px solid transparent; border-top: 10px solid #fffdf7; border-bottom: 0; }
.wisdom-row { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.more-wisdom { min-height: 40px; padding: .2em 1.1em; font-size: .9rem; background: #fffdf7; color: #1d2340; border-color: #1d2340; box-shadow: 0 4px 0 #1d2340; }
.more-wisdom:hover { background: #fff; }
.more-wisdom:active { box-shadow: 0 1px 0 #1d2340; }
.personal { margin: 8px 0 0; text-align: center; font-size: .82rem; font-weight: 800; color: #7a0f3a; }
.personal[hidden] { display: none; }

.play-row { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.btn {
  font-weight: 900; font-size: .95rem; color: #fff; background: #2b6cb0;
  border: 3px solid #1d2340; border-radius: 999px; min-height: 48px; padding: .5em .8em;
  box-shadow: 0 5px 0 #1d2340; cursor: pointer; touch-action: manipulation;
  transition: transform .06s, box-shadow .06s, background .15s;
}
.btn:hover { background: #3a7fc6; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #1d2340; }
.btn:focus-visible { outline: 3px dashed #1d2340; outline-offset: 3px; }
.play-btn { background: #e6337a; border-color: #7a0f3a; box-shadow: 0 5px 0 #7a0f3a; }
.play-btn:hover { background: #f04d8f; }
.play-btn:active { box-shadow: 0 1px 0 #7a0f3a; }
.board-btn { background: #fffdf7; color: #1d2340; }
.board-btn:hover { background: #fff; }
.play-row .btn { flex: 1 1 0; white-space: nowrap; }
.main-row { width: min(100%, 520px); margin-left: auto; margin-right: auto; }
.main-row .btn { min-height: 54px; font-size: clamp(.86rem, 3.9vw, 1.08rem); }
.main-row .play-btn { flex: 1.25 1 0; }

.world { margin: 12px 0 0; text-align: center; font-size: .8rem; font-weight: 750; line-height: 1.45; color: #2f3a5c; }
.world[hidden] { display: none; }
.world b { font-weight: 900; color: #7a0f3a; }
.foot { text-align: center; color: #2f3a5c; padding: 10px 2px 0; margin-top: auto; }
.foot p { margin: 0 auto; max-width: 64ch; }
.legal { font-size: .74rem; font-weight: 650; line-height: 1.5; }
.legal-1, .legal-2 { display: block; }
.legal .links { white-space: nowrap; }
.legal-sep { display: none; }
.legal a { color: #7a0f3a; font-weight: 800; }
.legal-1 a { display: inline-block; padding: 10px 2px; margin: -8px 0; text-decoration: underline dotted rgba(122,15,58,.5); text-underline-offset: 3px; }
.company { position: relative; display: inline-block; text-decoration: underline dotted rgba(122,15,58,.5); text-underline-offset: 3px; }
.company:focus-visible { outline: 2px dashed #7a0f3a; outline-offset: 2px; border-radius: 4px; }

.sound-btn {
  position: absolute; z-index: 7; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right));
  width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center;
}
.sound-btn svg { width: 24px; height: 24px; }
.sound-btn .snd-off { display: none; }
.sound-btn[aria-pressed="false"] { background: #e3eefb; color: #1d2340; }
.sound-btn[aria-pressed="false"] .snd-on { display: none; }
.sound-btn[aria-pressed="false"] .snd-off { display: inline; }
.sound-btn[data-level="low"] .snd-hi { display: none; }
@media (min-width: 800px) { .sound-btn { right: max(8px, calc((100% - 760px) / 2 + 8px)); } }
body:has(#home[hidden]):has(#game[hidden]) .sound-btn { display: none; }
.sound-btn { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sound-btn.holding { box-shadow: 0 0 0 3px #ffb703, 0 3px 0 #1d2340; }
.vol-pop { position: fixed; z-index: 40; width: 46px; padding: 6px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(255,254,248,.97); border: 2px solid #1d2340; border-radius: 14px; box-shadow: 0 4px 0 #1d2340; touch-action: none; -webkit-user-select: none; user-select: none; }
.vol-pop[hidden] { display: none; }
.vol-pct { font-size: .72rem; font-weight: 900; color: #1d2340; line-height: 1; }
.vol-track { position: relative; width: 12px; height: 128px; border-radius: 999px; background: #d9d6c3; border: 2px solid #1d2340; cursor: ns-resize; }
.vol-track i { position: absolute; left: 0; right: 0; bottom: 0; height: 80%; border-radius: 999px; background: linear-gradient(0deg, #2b6cb0, #e6337a); }
.vol-track span { position: absolute; left: 50%; bottom: 80%; width: 24px; height: 24px; margin: 0 0 -12px -12px; border-radius: 50%; background: #fffdf7; border: 3px solid #1d2340; box-shadow: 0 2px 0 #1d2340; }

/* ---------- game ---------- */
html.playing, html.playing body { overflow: hidden; overscroll-behavior: none; }
html.playing .sound-btn { position: fixed; z-index: 30; width: 38px; height: 38px; min-height: 38px; top: max(6px, env(safe-area-inset-top)); right: calc(max(6px, env(safe-area-inset-right)) + 88px); background: rgba(255,253,243,.92); color: #1d2340; border: 2px solid #1d2340; box-shadow: 0 3px 0 #1d2340; }
html.playing .sound-btn svg { width: 20px; height: 20px; }
.game[hidden], .sheet[hidden] { display: none !important; }
.game { position: fixed; inset: 0; z-index: 10; background: #8fd3ff; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
#cv { position: absolute; inset: 0; display: block; touch-action: none; }
.hud {
  position: absolute; z-index: 4; left: max(6px, env(safe-area-inset-left)); right: calc(max(6px, env(safe-area-inset-right)) + 132px); top: max(6px, env(safe-area-inset-top));
  display: flex; align-items: center; gap: 6px; pointer-events: none;
}
.lives { display: flex; gap: 2px; padding: 5px 8px; background: rgba(255,255,255,.82); border: 2px solid rgba(29,35,64,.3); border-radius: 999px; }
.lives svg { width: 20px; height: 18px; display: block; }
.lives .off { opacity: .28; filter: grayscale(1); }
.lives .new { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.hud-mid { flex: 1; text-align: center; line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(30,20,5,.7), 0 0 8px rgba(0,0,0,.35); }
.hud-mid b { display: block; font-size: 1.7rem; font-weight: 900; }
.hud-mid span { font-size: .78rem; font-weight: 800; }
.hud-left { position: relative; }
.hud-tags { position: absolute; left: 0; top: calc(100% + 4px); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
@keyframes frpulse { 50% { box-shadow: 0 0 0 3px rgba(255,210,63,.8); } }
.game-ctrls { position: absolute; z-index: 6; top: max(6px, env(safe-area-inset-top)); right: max(6px, env(safe-area-inset-right)); display: flex; gap: 6px; }
.ctrl-btn { width: 38px; height: 38px; min-height: 38px; padding: 0; display: grid; place-items: center; color: #1d2340; background: rgba(255,254,248,.92); border: 2px solid #1d2340; box-shadow: 0 3px 0 #1d2340; }
.ctrl-btn:hover { background: #fff; }
.ctrl-btn:active { transform: translateY(3px); box-shadow: 0 0 0 #1d2340; }
.ctrl-btn svg { width: 20px; height: 20px; }
.game.paused .combo.on { animation-play-state: paused; }
.sheet-small { z-index: 22; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.mini-card { width: min(320px, 100%); padding: 14px 14px 16px; }
.mini-card h2 { font-size: 1.5rem; color: #1d2340; }
.mini-text { margin: 4px 0 12px; font-weight: 800; color: #2f3a5c; }
.btn.wide { width: 100%; min-height: 52px; font-size: 1.1rem; }
.leave-btn { background: #fffdf7; color: #1d2340; border-color: #1d2340; box-shadow: 0 5px 0 #1d2340; }
.leave-btn:hover { background: #fff; }
.leave-btn:active { box-shadow: 0 1px 0 #1d2340; }
.combo { font-weight: 900; color: #fff; background: #ff7a1a; border: 2px solid #8a3000; border-radius: 999px; padding: 1px 8px; font-size: .9rem; visibility: hidden; }
.combo.on { visibility: visible; animation: wobble .4s ease-in-out infinite; }
@keyframes wobble { 25% { transform: rotate(-5deg) scale(1.06); } 75% { transform: rotate(5deg) scale(1.1); } }
.power { font-weight: 900; font-size: .74rem; color: #1d2340; background: #ffe066; border: 2px solid #8a6400; border-radius: 999px; padding: 1px 7px; visibility: hidden; white-space: nowrap; }
.power.on { visibility: visible; }
.banner {
  position: absolute; z-index: 4; left: 50%; top: calc(max(6px, env(safe-area-inset-top)) + 84px);
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none; text-align: center;
  background: rgba(255,254,248,.92); border: 3px solid #1d2340; border-radius: 16px; padding: 4px 14px 6px; white-space: nowrap;
  transition: opacity .25s, transform .35s cubic-bezier(.2,1.5,.4,1);
}
.banner.show { opacity: 1; transform: translate(-50%, 0); }
.banner strong { display: block; font-size: 1.1rem; color: #d62828; letter-spacing: .02em; }
.banner span { display: block; font-weight: 800; font-size: .8rem; }
.hint {
  position: absolute; z-index: 4; left: 50%; top: calc(max(6px, env(safe-area-inset-top)) + 214px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 24px); text-align: center; line-height: 1.2;
  background: rgba(255,254,248,.94); border: 2.5px solid #1d2340; border-radius: 18px; padding: 5px 12px;
  font-weight: 900; font-size: .82rem; color: #1d2340; transition: opacity .4s;
}
.hint.gone { opacity: 0; }
.toast {
  position: absolute; z-index: 4; left: 12px; top: calc(max(6px, env(safe-area-inset-top)) + 150px); pointer-events: none;
  background: rgba(255,254,248,.92); border: 2.5px solid #1d2340; border-radius: 14px; padding: 3px 10px;
  font-weight: 900; font-size: .78rem; color: #1d2340; white-space: nowrap;
  opacity: 0; transform: translateX(-8px); transition: opacity .25s, transform .3s cubic-bezier(.2,1.5,.4,1);
}
.toast.show { opacity: 1; transform: translateX(0); }
.hint .finger { font-size: 1.05rem; animation: fing 1.1s ease-in-out infinite; }
@keyframes fing { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }
.flash { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(255,40,60,.55)); transition: opacity .35s; }
.flash.on { opacity: 1; transition: none; }
.flash.dust { background: radial-gradient(ellipse at center, rgba(240,200,140,.3) 30%, rgba(200,120,60,.6)); }
.flash.gold { background: radial-gradient(ellipse at center, transparent 40%, rgba(255,210,60,.5)); }

/* ---------- sheets ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px 12px; background: rgba(20,24,48,.55); backdrop-filter: blur(3px); }
.card {
  width: min(440px, 100%); max-height: min(94svh, 760px); overflow: auto;
  background: linear-gradient(180deg, #fffdf7, #ffe9f2); border: 3px solid #1d2340; border-radius: 24px;
  padding: 16px 14px 12px; text-align: center; box-shadow: 0 10px 0 rgba(20,24,48,.3);
  animation: cardIn .35s cubic-bezier(.2,1.4,.4,1);
}
@keyframes cardIn { from { transform: translateY(20px) scale(.95); opacity: 0; } }
.card h2 { margin: 0; }
.over-kicker { margin: 0; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: .74rem; color: #e6337a; }
.rank { margin: 2px 0; font-size: 1.6rem; color: #7a0f3a; text-shadow: 0 3px 0 #ffc2dc; }
.bigscore { margin: 0; font-size: 2.6rem; font-weight: 900; line-height: 1; color: #1d2340; }
.metres { margin: 2px 0 0; font-weight: 850; color: #2f3a5c; }
.funny { margin: 6px 0 0; font-weight: 850; font-style: italic; color: #7a0f3a; }
.newbest { display: inline-block; margin: 6px 0 0; background: #ffe066; color: #6a4a00; font-weight: 900; border-radius: 999px; padding: 2px 12px; border: 2px solid #8a6400; animation: pop .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.4); } }
.newbest[hidden], .nudge[hidden], .name-form[hidden], .board-empty[hidden] { display: none !important; }
.extra, .nudge { margin: 6px 0 0; font-weight: 750; }
.nudge { color: #c2185b; font-weight: 850; }
.name-form { margin-top: 10px; }
.name-form label { display: block; font-weight: 900; margin-bottom: 6px; }
.name-row { display: flex; gap: 8px; }
.name-row input { flex: 1; min-width: 0; min-height: 48px; border: 3px solid #1d2340; border-radius: 999px; padding: 0 14px; background: #fff; color: #1d2340; font-weight: 750; }
.name-row input:focus-visible { outline: 3px dashed #1d2340; outline-offset: 2px; }
.text-back { margin-top: 6px; background: none; border: 0; color: #7a0f3a; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; cursor: pointer; }
.tabs { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }
.tab { min-height: 42px; padding: .3em 1em; border-radius: 999px; border: 3px solid #1d2340; background: #fff; color: #1d2340; font-weight: 900; box-shadow: 0 4px 0 #1d2340; cursor: pointer; }
.tab:active { transform: translateY(3px); box-shadow: 0 1px 0 #1d2340; }
.tab[aria-selected="true"] { background: #2b6cb0; color: #fff; }
.board-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.board-list li { display: grid; grid-template-columns: 2rem 1fr auto auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px dashed rgba(29,35,64,.2); font-weight: 750; }
.board-list li:nth-child(1) span:first-child { color: #c98a00; }
.board-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .mt { font-size: .78rem; color: #2f3a5c; white-space: nowrap; }
.board-list .sc { font-weight: 900; color: #1d2340; }
.board-list .you { background: #ffe9f2; border-radius: 10px; }
.board-empty { font-weight: 750; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 25; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(260deg); } }

@media (min-width: 800px) {
  .app { max-width: 760px; padding-top: 16px; }
  .stage { width: min(100%, 620px); height: clamp(300px, 48vh, 400px); }
  .bubble { font-size: 1.04rem; padding: 10px 14px; }
  .logo { width: 430px; }
  .legal-1, .legal-2, .legal-sep { display: inline; }
  .hud-mid b { font-size: 2rem; }
}
@media (max-height: 760px) and (max-width: 500px) { .stage { height: 250px; } .logo { width: min(100%, 300px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* ---------- legal pages ---------- */
html.doc-html, .doc-html body { height: auto; }
.doc { max-width: 760px; margin: 0 auto; padding: 16px 14px 28px; }
.doc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.doc-brand { margin: 0; font-size: 1.8rem; font-weight: 900; color: #e6337a; }
.doc-brand a { color: inherit; text-decoration: none; }
.doc-brand span { color: #1d2340; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.doc-back { font-size: .95rem; }
.doc-card {
  margin-top: 14px; background: rgba(255,254,248,.92);
  border: 3px solid #1d2340; border-radius: 22px; padding: 16px 16px 8px;
}
.doc h1 { margin: 0 0 4px; font-size: 1.8rem; }
.doc h2 { margin: 1.2em 0 .3em; font-size: 1.2rem; }
.doc h3 { margin: .8em 0 .2em; font-size: 1.02rem; }
.doc p, .doc li { line-height: 1.45; }
.doc .updated, .doc .lead { color: #1d2340; }
.doc .quip { font-weight: 800; color: #c2185b; margin-bottom: 0; }
.doc a:not(.btn) { color: #1d2340; font-weight: 750; }
.doc .summary, .doc .company-box { background: #ffeef6; border-radius: 14px; padding: 8px 12px; }
.doc .toc ol { margin: 6px 0 0; padding-left: 1.2em; }
.doc table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid rgba(20,92,50,.2); }
.doc-end { text-align: center; margin: 16px 0; }
.doc-foot { text-align: center; font-size: .82rem; font-weight: 700; color: #2f3a5c; }
.doc-foot a { color: #1d2340; font-weight: 800; }
.sheet > .card { position: relative; z-index: 1; }
.confetti.behind { position: absolute; z-index: 0; }

/* ---------- sharing (same as Pie Da Monkey) ---------- */
.share-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #ffd23f; color: #1d2340; border-color: #1d2340; box-shadow: 0 5px 0 #1d2340; }
.share-btn:hover { background: #ffdc5e; }
.share-btn:active { box-shadow: 0 1px 0 #1d2340; }
.share-btn svg, .share-icon svg { width: 22px; height: 22px; flex: none; }
.share-icon {
  position: absolute; z-index: 7; top: max(8px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left));
  width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; background: #ffd23f; color: #1d2340; border-color: #1d2340; box-shadow: 0 4px 0 #1d2340;
}
.share-icon:hover { background: #ffdc5e; }
@media (min-width: 800px) { .share-icon { left: max(8px, calc((100% - 760px) / 2 + 8px)); } }
body:has(#home[hidden]) .share-icon, html.playing .share-icon { display: none; }
.share-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; }
.share-links[hidden] { display: none; }
.share-or { font-size: .85rem; font-weight: 700; color: #7a0f3a; }
.sl { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 2px solid #1d2340; color: #fff; font-weight: 800; font-size: .88rem; text-decoration: none; box-shadow: 0 2px 0 #1d2340; }
.sl:active { transform: translateY(2px); box-shadow: none; }
.sl-wa { background: #1f9e55; } .sl-fb { background: #2d5fc4; } .sl-x { background: #14171a; }
.share-pop { position: fixed; z-index: 35; padding: 10px; border-radius: 16px; background: #fffdf3; border: 2px solid #1d2340; box-shadow: 0 4px 0 #1d2340; }
.share-pop[hidden] { display: none; }
.share-pop .share-links { margin-top: 0; }
.share-toast { position: fixed; z-index: 45; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: #1d2340; color: #fffdf3; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.25); pointer-events: none; animation: shareToastIn .25s ease-out; }
.share-toast[hidden] { display: none; }
@keyframes shareToastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { .share-toast { animation: none; } }

/* ---------- Granny Rally extras ---------- */
.place { font-weight: 900; font-size: .8rem; color: #fff; background: #1d2340; border: 2px solid #fff; border-radius: 999px; padding: 1px 8px; }
.place.p1 { background: #ffc531; color: #1d2340; }
.power.rocket { background: linear-gradient(90deg, #ffef9a, #ff9a3c, #ff4d6d); color: #fff; text-shadow: 0 1px 0 #7a0f3a; animation: wobble .5s ease-in-out infinite; }
.power.what { background: #b48cff; color: #fff; }
.hud-mid b { font-size: 1.8rem; }
.toffee { position: absolute; left: 0; top: calc(100% + 32px); display: block; width: 118px; height: 16px; border-radius: 999px; background: rgba(29,35,64,.45); border: 2px solid rgba(255,255,255,.9); overflow: hidden; }
.toffee i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ffe3a0, #f2a20c, #c46a00); border-radius: 999px; transition: width .2s; }
.toffee em { position: absolute; inset: 0; font-style: normal; font-size: 9.5px; line-height: 11px; font-weight: 900; letter-spacing: .04em; color: #fff; text-shadow: 0 1px 0 #1d2340, 0 0 3px #1d2340; }
.toffee.full { animation: frpulse .35s ease-in-out infinite; }
.warn { position: absolute; z-index: 5; right: max(8px, env(safe-area-inset-right)); top: calc(max(6px, env(safe-area-inset-top)) + 150px); pointer-events: none;
  background: #ffd23f; color: #1d2340; border: 3px solid #1d2340; border-radius: 12px; padding: 4px 10px; text-align: center; opacity: 0; transform: translateX(20px); transition: opacity .2s, transform .25s; }
.warn.show { opacity: 1; transform: none; animation: warnBlink .45s steps(2) infinite; }
.warn b { display: block; font-size: 1rem; letter-spacing: .03em; }
.warn span { display: block; font-size: .72rem; font-weight: 850; }
@keyframes warnBlink { 50% { background: #ff8ab8; } }
.game { cursor: pointer; background: #8fd3ff; }
.play-row.minor .btn { min-height: 44px; font-size: .86rem; padding: .4em .5em; }
.board-sub { margin: 4px 0 0; font-size: .8rem; font-weight: 750; color: #2f3a5c; }
.lg-horn { transform-box: fill-box; transform-origin: 30% 50%; animation: hornHonk 2.4s ease-in-out infinite; }
@keyframes hornHonk { 0%, 70%, 100% { transform: scale(1); } 76% { transform: scale(.86, 1.08); } 82% { transform: scale(1.08, .95); } 88% { transform: scale(.9, 1.05); } }
.lg-parp { animation: parp 2.4s ease-out infinite; }
@keyframes parp { 0%, 70% { opacity: 0; } 78%, 92% { opacity: 1; } 100% { opacity: 0; } }
html.mirror #cv { transform: scaleX(-1); }
