/* Penny Lane Market — styles. A bright corner shop: a red-and-cream
   striped awning, a cream page, wooden shelves, a counter with coins on it
   and a cash drawer to pay from. */
:root {
  --bg: #fdf6e3;
  --panel: #ffffff;
  --text: #2a2420;
  --muted: #6b625a;
  --line: #e4dccb;
  --blue: #2f7fd8;
  --blue-dark: #1d4f86;
  --red: #d1495b;
  --red-dark: #a8313f;
  --wood: #c98b55;
  --wood-dark: #9a6236;
  --go: #2fa35a;
  --go-dark: #23824a;
  --sun: #ffd23f;
  --right: #2fa35a;
  --wrong: #d0402e;
  --tc: #2f6fe0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); display: flex; flex-direction: column; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button {
  font: inherit; font-weight: 700; border: 2px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 12px; padding: 8px 16px; cursor: pointer; touch-action: manipulation;
}
button:disabled { cursor: default; }
button.go { background: var(--go); border-color: var(--go-dark); color: #fff; font-size: 18px; padding: 10px 22px; }
button.go:not(:disabled):hover { background: var(--go-dark); }
button.go.big { font-size: 22px; padding: 12px 40px; border-radius: 999px; box-shadow: 0 4px 0 var(--go-dark); }
button.secondary { background: #fff; }
button.danger { color: var(--wrong); border-color: #f0c4be; }
button.icon { width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 20px; }
button.plain { border: none; background: none; }
.small { color: var(--muted); font-size: 13px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0;
  padding: 8px 14px; background: var(--red); color: #fff;
}
.brand { font-size: 22px; font-weight: 800; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mark { font-size: 20px; background: #fff; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; }
.top-right { display: flex; gap: 8px; align-items: center; }
.top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.apps-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 14px;
  border-radius: 999px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .6);
  color: #fff; text-decoration: none; font-weight: 700; font-size: 16px;
}
.apps-link:hover { background: rgba(255, 255, 255, .3); }
.apps-link svg { fill: currentColor; flex: none; }
.player-chip { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .6); padding: 6px 14px; }
.topbar button.icon { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .6); }
.update-note {
  display: flex; gap: 10px; align-items: center; justify-content: center; padding: 8px; background: #fff4d6;
  border-bottom: 1px solid #f0d58a; font-weight: 600; flex-shrink: 0;
}

/* ---------- home ---------- */
.home { max-width: 1180px; width: 100%; margin: 0 auto; padding: 12px 14px 0; display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.home h2 { margin: 0 0 10px; font-size: 18px; color: var(--blue-dark); }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 12px; }
.players { display: flex; flex-wrap: wrap; gap: 10px; }
.player { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 30px; border: 3px solid var(--line); }
.player-emoji { font-size: 28px; line-height: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #f6f1e4; }
.player.on { border-color: var(--pc, var(--blue)); background: color-mix(in srgb, var(--pc, var(--blue)) 10%, #fff); }
.player.add { color: var(--muted); border-style: dashed; }
.player-badges { font-size: 18px; letter-spacing: 1px; margin-left: 2px; }
.tracks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.track { border: 3px solid color-mix(in srgb, var(--tc) 35%, #fff); border-radius: 14px; padding: 8px; background: color-mix(in srgb, var(--tc) 6%, #fff); display: flex; flex-direction: column; gap: 6px; }
.track-head { display: flex; align-items: center; gap: 6px; font-weight: 900; color: var(--tc); font-size: 17px; }
.track-icon { font-size: 22px; }
.track-badge { font-size: 11.5px; font-weight: 800; color: #a59a88; border: 2px dashed #ddd3bf; border-radius: 999px; padding: 1px 8px; width: fit-content; white-space: nowrap; }
.track-badge.won { color: #7a5200; background: linear-gradient(#fff3c4, #f7d36a); border: 2px solid #d9a521; }
.track-levels { display: flex; flex-direction: column; gap: 6px; }
.lvl { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 10px; border-width: 3px; text-align: left; }
.lvl-name { font-size: 15px; min-width: 0; }
.lvl-stars { color: #f2b705; letter-spacing: 1px; font-size: 15px; white-space: nowrap; }
.lvl.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, #fff); }
.lvl.locked { background: #f4f1ea; color: var(--muted); border-style: dashed; }
.lvl.locked .lvl-stars { opacity: .4; }
.level-about { margin: 10px 2px 0; color: var(--muted); font-weight: 600; }
.home-go {
  display: flex; align-items: center; gap: 10px; position: sticky; bottom: 0; z-index: 2;
  padding: 10px 0 12px; background: linear-gradient(rgba(253, 246, 227, 0), var(--bg) 30%);
}
.spacer { flex: 1; }

/* ---------- a round ---------- */
.play { flex: 1; display: grid; grid-template-rows: auto 1fr; gap: 6px; padding: 6px 10px 10px; min-height: 0; }
.play-bar { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.bar-title { font-weight: 800; font-size: 18px; color: var(--tc); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 45%; }
.pip { width: 14px; height: 14px; border-radius: 50%; background: #e6dfcc; border: 2px solid #d8cfb8; }
.pip.done { background: var(--right); border-color: #23824a; }
.pip.now { background: #fff; border-color: var(--tc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 25%, #fff); }
.streak { font-weight: 900; font-size: 16px; color: #c2410c; background: #fff1e0; border: 2px solid #f6b98a; border-radius: 999px; padding: 2px 12px; white-space: nowrap; }
.streak.bump { animation: pop .35s ease-out; }
.board { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 10px; min-height: 0; }

/* the side: question, answers, help */
.side { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 2px; }
.race { height: 12px; border-radius: 999px; background: #efe6d2; overflow: hidden; flex: none; }
.race-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--sun), #ffb627); border-radius: 999px; }
.race.late .race-fill { background: #e6dfcc; }
.prompt { font-size: 22px; font-weight: 800; line-height: 1.3; color: var(--blue-dark); }
.prompt b { color: var(--tc); font-size: 1.1em; white-space: nowrap; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  position: relative; border-width: 3px; border-radius: 16px; padding: 12px 8px; min-height: 76px; display: grid; place-items: center;
  box-shadow: 0 3px 0 var(--line); transition: transform .1s;
}
.choice:not(:disabled):hover { border-color: var(--tc); }
.choice:not(:disabled):active { transform: translateY(2px); box-shadow: none; }
.choice .knum { position: absolute; left: 7px; top: 4px; font-size: 11px; color: #c5bba8; font-weight: 800; }
.txt { font-size: 22px; font-weight: 800; color: var(--blue-dark); line-height: 1.2; }
.choices.two .txt { font-size: 32px; }
.choice.yes { border-color: var(--right); background: #e3f7e9; box-shadow: 0 0 0 4px #bfe9cc; }
.choice.no { border-color: #e7b9ae; background: #f6e2de; opacity: .55; }
.choice.no::after { content: '✕'; position: absolute; right: 8px; top: 2px; color: var(--wrong); font-size: 22px; }
.check {
  margin-left: auto; width: 84px; height: 84px; border-radius: 50%; padding: 0; background: var(--go); border: 4px solid var(--go-dark);
  box-shadow: 0 4px 0 var(--go-dark); display: grid; place-items: center;
}
.check svg { width: 48px; height: 48px; }
.check:active { transform: translateY(3px); box-shadow: none; }
.say { font-size: 22px; font-weight: 900; min-height: 1.3em; }
.say.good { color: var(--right); animation: pop .35s ease-out; }
.say.bad { color: var(--wrong); }
.say.late { color: var(--muted); }
.say.shown { color: var(--blue-dark); font-size: 19px; }
.helpbox { background: #fff8dc; border: 2px solid #f2d27a; border-radius: 14px; padding: 8px 12px; font-size: 16px; line-height: 1.45; }
.helpbox .tip { margin: 0; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.help-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.htab { font-size: 15px; padding: 7px 12px; border-radius: 999px; }
.htab.on { background: #fff1c2; border-color: #e6b422; }
.help-tabs.nudge .htab { animation: nudge 1.4s ease-in-out 2; }
@keyframes nudge { 0%, 100% { scale: 1; } 50% { scale: 1.08; border-color: #e6b422; } }
#btn-next { font-size: 22px; padding: 12px; border-radius: 999px; }

.result {
  position: absolute; inset: 0; margin: auto; width: min(440px, 92%); height: fit-content; background: #fff; border-radius: 22px;
  border: 4px solid var(--sun); box-shadow: 0 10px 40px rgba(20, 50, 110, .25); padding: 18px 20px; text-align: center; z-index: 3;
}
.result-title { font-size: 28px; font-weight: 900; color: var(--blue-dark); }
.result-stars { font-size: 50px; color: #f2b705; letter-spacing: 4px; }
.result-detail { color: var(--muted); font-weight: 700; margin: 4px 0 12px; }
.result-rewards { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 4px; font-weight: 800; color: #7a4a00; }
.result-rewards li { background: #fff6dc; border-radius: 10px; padding: 4px 10px; }
.result-rewards:empty { display: none; }
.result-buttons { display: flex; gap: 10px; justify-content: center; }

/* ---------- dialogs ---------- */
.dialog { max-width: 460px; width: calc(100% - 28px); border: none; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.dialog.wide { max-width: 760px; }
.dialog::backdrop { background: rgba(20, 30, 50, .45); }
.dialog h2 { margin: 0 0 12px; color: var(--blue-dark); }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; margin-bottom: 12px; }
.field.check { flex-direction: row; align-items: center; gap: 10px; }
.field input[type=text], .field select { font: inherit; font-weight: 500; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; }
.field input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.field-label { font-weight: 700; margin-bottom: 6px; }
.emoji-pick { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin-bottom: 14px; }
.emoji-pick button { font-size: 26px; padding: 4px 0; border-radius: 10px; }
.emoji-pick button.on { border-color: var(--blue); background: #e6f2fc; }
.dialog-buttons { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.help li { margin-bottom: 8px; line-height: 1.45; }

/* ---------- rewards: celebrations ---------- */
.toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 20; pointer-events: none;
  background: #c2410c; color: #fff; font-weight: 900; font-size: 20px; padding: 8px 20px; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(194, 65, 12, .35);
}
.toast.show { animation: toastIn 2.2s ease-out forwards; }
@keyframes toastIn {
  0% { opacity: 0; translate: 0 -12px; scale: .8; } 12% { opacity: 1; translate: 0 0; scale: 1.08; } 20% { scale: 1; }
  80% { opacity: 1; } 100% { opacity: 0; translate: 0 -8px; }
}
.celebrate { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(20, 35, 70, .45); overflow: hidden; }
.cel-card {
  position: relative; z-index: 2; background: #fff; border-radius: 22px; border: 4px solid var(--sun); padding: 22px 28px 20px;
  width: min(420px, 90%); text-align: center; box-shadow: 0 16px 50px rgba(20, 35, 70, .4); animation: celIn .5s cubic-bezier(.2, 1.6, .4, 1);
}
.cel-icon { font-size: 72px; line-height: 1.1; animation: wiggle 1.2s ease-in-out .4s 2; }
.celebrate.badge .cel-icon {
  width: 120px; height: 120px; margin: 0 auto 6px; display: grid; place-items: center; font-size: 62px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8d6, #f7d36a 60%, #d9a521); border: 5px solid #c08f12;
  box-shadow: 0 0 0 6px #fff3c4, 0 0 30px 10px rgba(247, 211, 106, .7);
}
.cel-title { font-size: 30px; font-weight: 900; color: var(--blue-dark); margin-top: 4px; }
.cel-text { color: var(--muted); font-weight: 600; margin: 8px 0 16px; line-height: 1.4; }
@keyframes celIn { from { scale: .4; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -12deg; } 75% { rotate: 12deg; } }
@keyframes pop { 0% { scale: .9; } 70% { scale: 1.05; } 100% { scale: 1; } }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; opacity: 0;
  animation-name: fall; animation-timing-function: cubic-bezier(.3, .6, .6, 1); animation-fill-mode: forwards;
}
.confetti i.round { width: 12px; height: 12px; border-radius: 50%; }
@keyframes fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: .9; transform: translate(var(--drift), 105vh) rotate(var(--spin)); }
}

/* ---------- smaller and portrait screens ---------- */
@media (max-width: 1080px) {
  .tracks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .board { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(260px, 1fr) auto; }
  .side { overflow: visible; }
  }
@media (max-width: 700px) {
  .apps-link span { display: none; }
  .brand { font-size: 18px; }
  .home-top { grid-template-columns: 1fr; }
  .tracks { grid-template-columns: minmax(0, 1fr); }
    }
@media (max-width: 420px) {
  .brand { display: none; }
}
@media (max-height: 700px) and (min-aspect-ratio: 1/1) {
  .prompt { font-size: 19px; }
  .choice { min-height: 64px; padding: 8px; }
  }

/* ---------- the shop ---------- */
.awning {
  height: 22px; flex-shrink: 0;
  background: repeating-linear-gradient(90deg, var(--red) 0 34px, #fff6e6 34px 68px);
  -webkit-mask: radial-gradient(17px 12px at 17px 10px, #000 99%, transparent) 0 0 / 34px 22px repeat-x, linear-gradient(#000 0 10px, transparent 10px);
  mask: radial-gradient(17px 12px at 17px 10px, #000 99%, transparent) 0 0 / 34px 22px repeat-x, linear-gradient(#000 0 10px, transparent 10px);
}
.home-total { font-size: 15px; color: #c48a00; margin-left: 8px; }
.home h2 { display: flex; align-items: baseline; }
.piggy-panel { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; background: linear-gradient(#fff0f5, #fff); }
.piggy svg { width: 96px; height: auto; display: block; }
.piggy-amount { font-size: 30px; font-weight: 900; color: #a83a62; line-height: 1; }
.sticker-btn { margin-top: 6px; background: #ffe3ee; border-color: #f4a6c3; color: #a83a62; }
.sticker-strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px; font-size: 24px; min-height: 30px; }
.sticker-strip .none { font-size: 13px; color: var(--muted); font-weight: 600; }
.sticker-have { margin-left: 8px; color: #a83a62; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.sticker { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-width: 3px; }
.st-emoji { font-size: 38px; line-height: 1.1; }
.st-price { font-size: 14px; color: #1f6b3f; font-weight: 800; }
.sticker.own { border-color: #f4a6c3; background: #fff0f5; }
.sticker.own .st-price { color: #a83a62; }
.sticker.dear { opacity: .6; }
.sticker-buy { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: #fff8dc; border: 2px solid #f2d27a; font-size: 18px; line-height: 1.4; }
.sb-emoji { font-size: 48px; }
.sticker-buy .go { margin-left: auto; white-space: nowrap; }

.shop {
  position: relative; min-height: 0; border-radius: 18px; overflow: hidden; border: 3px solid #fff; display: flex; flex-direction: column;
  box-shadow: 0 3px 12px rgba(120, 70, 30, .18);
  background: linear-gradient(#fff3dc, #ffe9c4);
}
.shelf {
  flex: none; display: flex; justify-content: space-around; align-items: flex-end; padding: 6px 10px 0; font-size: 30px;
  border-bottom: 10px solid var(--wood); box-shadow: 0 4px 0 var(--wood-dark); opacity: .9;
}
.shelf span { filter: saturate(.85); }
.stage { flex: 1; min-height: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 12px; }
.big-money { display: grid; place-items: center; }
.big-money svg { filter: drop-shadow(0 6px 8px rgba(80, 50, 20, .3)); max-width: 100%; }
.item-card {
  position: relative; background: #fff; border-radius: 18px; padding: 10px 26px 8px; display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 4px 0 #e8d3b0, 0 6px 14px rgba(120, 70, 30, .15);
}
.item-emoji { font-size: 64px; line-height: 1.1; }
.item-name { font-weight: 800; color: var(--muted); font-size: 15px; }
.tag {
  position: absolute; right: -12px; top: 6px; background: #fff36b; color: #5a3b00; font-weight: 900; font-size: 22px;
  padding: 3px 12px 3px 18px; border-radius: 4px 10px 10px 4px; rotate: 8deg; box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.wallet { display: flex; flex-direction: column; align-items: center; background: #fff; border: 3px dashed #c9a26b; border-radius: 16px; padding: 6px 18px; font-weight: 700; color: var(--muted); }
.wallet-icon { font-size: 34px; }
.wallet b { font-size: 30px; color: #1f6b3f; }
.paid-with { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pw-label { font-weight: 800; color: var(--muted); }
.pw-money { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; max-width: 340px; }
.vs { display: flex; align-items: center; gap: 18px; }
.vs-arrow { font-size: 40px; color: var(--muted); font-weight: 900; }
.half { font-size: 40px; font-weight: 900; color: var(--blue-dark); background: #fff; border-radius: 50%; width: 110px; height: 110px; display: grid; place-items: center; border: 4px solid #c9ccd3; }
.basket-show { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; font-size: 54px; background: #fff; border-radius: 18px; padding: 6px 16px; min-width: 160px; min-height: 84px; border: 3px solid #e8d3b0; }
.bk-empty { opacity: .5; }
.counter-top { flex: none; height: 14px; background: linear-gradient(var(--wood), var(--wood-dark)); }
.shop:not(.paying) .counter, .shop:not(.paying) .counter-top { display: none; }
.big-pile { width: 100%; gap: 12px 16px; }
.counter { flex: none; min-height: 132px; max-height: 48%; overflow-y: auto; background: repeating-linear-gradient(90deg, #f1c99a 0 60px, #ebc08f 60px 120px); padding: 8px 10px 10px; }
.counter:empty, .counter:has(.pile:empty):not(:has(.counter-label)) { display: none; }
.counter-label { font-weight: 900; color: #7a4a1c; font-size: 15px; }
.counter-empty { color: #7a4a1c; font-weight: 700; opacity: .7; padding: 20px 0; text-align: center; }
.pile { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; justify-content: center; }
.piece { position: relative; border: none; background: none; padding: 0; border-radius: 50%; rotate: var(--tilt); display: grid; justify-items: center; }
.piece.is-bill { border-radius: 8px; }
.piece svg { display: block; filter: drop-shadow(0 3px 3px rgba(80, 50, 20, .35)); }
.piece .val, .grp .val {
  position: absolute; left: 50%; bottom: -6px; translate: -50% 0; rotate: calc(-1 * var(--tilt, 0deg)); background: #1d4f86; color: #fff;
  font-size: 13px; font-weight: 900; border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
.piece.counted { opacity: .4; }
.piece.counted::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #1f9a5c; font-size: 30px; font-weight: 900; }
.counter.many .piece svg.coin { width: 50px; height: 50px; }
.counter.many .piece svg.c10 { width: 39px; height: 39px; }
.counter.many .piece svg.c1 { width: 42px; height: 42px; }
.counter.many .piece svg.c5 { width: 46px; height: 46px; }
.counter.many .piece svg.bill { width: 110px; height: auto; }
.shop.cheer .stage > *, .shop.cheer .pile { animation: hop .5s ease-out; }
.shop.shake .stage > * { animation: shake .4s; }

/* answers */
.txt { font-size: 24px; font-weight: 800; color: var(--blue-dark); line-height: 1.2; }
.choices.two .txt { font-size: 34px; }
.grp { position: relative; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; justify-content: center; }
.grp > svg { flex: none; }
.grp .val { position: static; translate: none; rotate: none; margin: 0 4px 0 -4px; }
.choices.as-coins { grid-template-columns: 1fr; }
.choices.as-coins .choice { min-height: 96px; }
.choices.as-pair { grid-template-columns: 1fr; }
.pair { display: flex; align-items: center; gap: 8px; font-size: 26px; }
.pair b { font-size: 20px; color: #1f6b3f; }
.pair i { font-style: normal; color: var(--muted); font-weight: 900; }
.amount { display: flex; flex-direction: column; gap: 10px; }
.amount-box {
  font-size: 50px; font-weight: 900; text-align: center; color: #7dffb0; background: #23303b; border-radius: 16px; padding: 4px 12px;
  font-variant-numeric: tabular-nums; letter-spacing: 1px; border: 5px solid #556270; text-shadow: 0 0 10px rgba(125, 255, 176, .45);
}
.amount-box .ph { color: #4b6b5a; }
.pad { display: flex; gap: 14px; align-items: stretch; }
.numpad { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { font-size: 26px; font-weight: 900; padding: 10px 0; border-radius: 14px; border-width: 3px; box-shadow: 0 3px 0 var(--line); }
.key:active { transform: translateY(2px); box-shadow: none; }
.key.zero { grid-column: 2; }
.controls { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; width: 92px; }
.back-btn { background: #8b95a5; border-color: #6c7686; box-shadow: 0 3px 0 #5d6675; display: grid; place-items: center; flex: 1; }
.go-btn { background: #9bd3b0; border-color: #7cbf96; box-shadow: 0 3px 0 #6aa984; display: grid; place-items: center; flex: 2; }
.go-btn.ready { background: var(--go); border-color: var(--go-dark); box-shadow: 0 3px 0 var(--go-dark); }
.back-btn svg, .go-btn svg { width: 40px; height: 40px; }
.key:disabled { opacity: .5; }
.drawer-box { display: flex; flex-direction: column; gap: 8px; }
.drawer-label { font-weight: 800; color: var(--muted); font-size: 14px; }
.drawer { display: flex; flex-wrap: wrap; gap: 8px; background: #39424e; border-radius: 14px; padding: 8px; }
.slot { flex: 1 1 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #4a5462; border: 2px solid #5f6a79; border-radius: 10px; padding: 6px 4px; min-height: 86px; }
.slot:not(:disabled):hover { background: #566173; }
.slot:active { transform: translateY(2px); }
.slot-label { color: #fff; font-weight: 900; font-size: 15px; }
.bill-slot { flex-basis: 96px; }
.drawer-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.check {
  margin-left: auto; width: 84px; height: 84px; border-radius: 50%; padding: 0; background: var(--go); border: 4px solid var(--go-dark);
  box-shadow: 0 4px 0 var(--go-dark); display: grid; place-items: center;
}
.check svg { width: 48px; height: 48px; }
.check:active { transform: translateY(3px); box-shadow: none; }
.check:disabled, .drawer-box button:disabled { opacity: .5; }
.basket { display: flex; flex-direction: column; gap: 8px; }
.bk-row { display: flex; align-items: center; gap: 8px; }
.bk-name { width: 64px; font-weight: 900; color: var(--muted); }
.bk-btn { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-width: 3px; }
.bk-btn.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 12%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 30%, #fff); }
.bk-emoji { font-size: 34px; line-height: 1.1; }
.bk-price { font-weight: 900; color: #1f6b3f; }
.big-total { margin: 4px 0 0; font-size: 28px; font-weight: 900; color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.hops { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.hop-at { font-weight: 900; font-size: 18px; color: var(--blue-dark); background: #fff; border-radius: 999px; padding: 1px 9px; border: 2px solid #e6d29a; }
.hop-at.start { background: #fff36b; }
.hop { display: grid; place-items: center; }
.hop::before { content: '+'; font-weight: 900; color: var(--muted); margin-right: 2px; }
.hop { display: flex; align-items: center; }
@keyframes hop { 0% { translate: 0 0; } 40% { translate: 0 -12px; } 100% { translate: 0 0; } }
@keyframes shake { 0%, 100% { translate: 0; } 20% { translate: -10px; } 40% { translate: 9px; } 60% { translate: -6px; } 80% { translate: 4px; } }
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .board { grid-template-rows: auto auto; }
  .play { overflow-y: auto; }
  .shop { min-height: 380px; }
}
@media (max-width: 700px) {
  .home-top { grid-template-columns: 1fr; }
  .tracks { grid-template-columns: 1fr 1fr; }
}
.scale-icon { display: flex; flex-direction: column; align-items: center; font-size: 110px; line-height: 1.1; }
.scale-icon span { font-size: 22px; font-weight: 900; color: var(--blue-dark); }
