/* Pennystep games. Tap targets are at least 44px, colors meet contrast on white and cream, and motion calms down on request. */
.game{--g-ink:#202339;--g-teal:#007f82;--g-gold:#ffd46a;--g-gold-edge:#a56b13;--g-cream:#fff7d9;--g-line:#d9d8d5;margin:18px 0 6px;padding:18px;background:#fff;border:2px solid var(--g-ink);border-radius:16px;box-shadow:5px 5px 0 #ffd34e;font:16px/1.5 Rubik,system-ui,sans-serif;color:var(--g-ink)}
.game button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
.game button:focus-visible{outline:3px solid var(--g-teal);outline-offset:3px}
.game button:disabled{cursor:not-allowed;opacity:.45}
.game-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}
.game-goal{font-size:19px;font-weight:700;line-height:1.35;margin:0}
.game-sound{flex:none;min-height:36px;padding:4px 10px;border:1px solid var(--g-line);border-radius:20px;background:#fff;font-size:12px!important;color:#55596a!important}
.game-sound[aria-pressed=true]{background:#e8f5f0;border-color:var(--g-teal);color:#00585a!important}
.game-part{margin:0 0 8px;font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:#6a5100}
.game-live{min-height:1.5em;margin:12px 0 0;padding:10px 12px;border-radius:10px;background:var(--g-cream);font-size:15px}
.game-live:empty{background:transparent;padding:0}
.game-note{display:block;font-size:14px;color:#4a4e5c;margin:8px 0}
.twist-note{background:#f0ecfc;border-left:4px solid #6655cc;padding:8px 12px;border-radius:6px}
.game-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.game-live.quiet{position:absolute;width:1px;height:1px;min-height:0;margin:0;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;box-shadow:none;border:0;background:none}
.game-todo{margin:8px 0 0;text-align:right;font-size:15px;font-weight:600;color:#5a3f00}
@media (max-width:560px){.game-todo{text-align:left}}
@media print{.game-todo{display:none}}
.game-twist{display:inline-flex;align-items:center;min-height:46px;margin-top:12px;padding:8px 16px;border:2px dashed #6655cc;border-radius:10px;background:#f6f3ff;font-weight:700;color:#3f3396!important}
.shop-label{display:block;font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:#55596a}

/* Coins: the same gold coin as the lesson coin tray, small enough to show a wallet at a glance. */
.coin-dots{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 2px}
.game-coin,.game-flyer{display:inline-block;width:22px;height:22px;border-radius:50%;background:var(--g-gold);border:2px solid var(--g-gold-edge);box-shadow:inset 0 -2px 0 rgba(165,107,19,.35)}
.game-flyer{position:fixed;z-index:9999;width:32px;height:32px;pointer-events:none}
.coin-dots.stack{flex-direction:column-reverse;align-items:center;gap:0}
.coin-dots.stack .game-coin{width:30px;height:10px;border-radius:50%;margin-top:-2px}
.game-bar{position:relative;display:block;height:14px;margin:8px 0;border-radius:10px;background:#ece9e2;overflow:hidden}
.game-bar-fill{display:block;height:100%;background:var(--g-teal);border-radius:10px;transition:width .35s ease}

/* Shop and wallet, also used for the time fitter. */
.shop-wallet,.jar-pool,.time-bars,.pay-hours{padding:12px 14px;border-radius:12px;background:var(--g-cream);margin-bottom:12px}
.shop-left{font-size:24px}
.shop-keep,.shop-fixed{display:block;font-size:14px;margin-top:4px;color:#55596a}
.shop-keep.met{color:#00585a;font-weight:700}
.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.shop-item{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-height:112px;padding:12px;border:2px solid var(--g-ink);border-radius:12px;background:#fff;text-align:left;box-shadow:3px 3px 0 var(--g-ink);transition:transform .12s,box-shadow .12s,background .12s}
.shop-item.picked{background:#e8f5f0;border-color:var(--g-teal);box-shadow:0 0 0 var(--g-ink);transform:translate(2px,2px)}
.shop-art:empty{display:none}
.shop-art svg{width:56px;height:56px;display:block}
.shop-name{font-weight:700;font-size:17px;line-height:1.25}
.shop-price{display:inline-block;padding:2px 9px;border-radius:12px;background:#fff0bf;color:#5c4700;font-weight:700;font-size:14px}
.shop-state{font-size:13px;color:#55596a;margin-top:auto}
.picked .shop-state{color:#00585a;font-weight:700}

/* Jars. */
.jar-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.jar{display:flex;flex-direction:column;align-items:center;text-align:center;padding:12px;border:2px solid var(--g-line);border-radius:14px}
.jar.full{border-color:var(--g-teal);background:#f2faf7}
.jar-name{font-weight:700;font-size:18px}
.jar-glass{display:flex;align-items:flex-end;justify-content:center;width:78px;height:96px;margin:8px 0;border:3px solid #7fb9bb;border-top-width:8px;border-radius:10px 10px 18px 18px;background:#f4fbfb;overflow:hidden;position:relative}
.jar-level{display:block;width:100%;background:var(--g-gold);transition:height .35s}
.jar-count{font-size:15px}
.jar-buttons{display:flex;gap:10px;margin-top:8px}
.jar-buttons button,.biz-stepper button{width:48px;height:48px;border:2px solid var(--g-ink);border-radius:50%;background:#fff;font-size:24px;font-weight:700;line-height:1}
.jar-buttons button[data-in]{background:#ffcf4d}
.jar-moves{display:flex;flex-wrap:wrap;gap:8px}

/* Goal tracker. */
.goal-head strong{font-size:19px}
.goal-slots{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.goal-slots .slot{width:30px;height:30px;border-radius:50%;border:2px dashed #b9b6b0}
.goal-slots .slot.filled{border:2px solid var(--g-gold-edge);background:var(--g-gold)}
.goal-slots .slot.extra{border-style:solid;border-color:var(--g-teal)}
.goal-status{margin:8px 0;font-size:17px}
.goal-possible{display:flex;gap:8px;align-items:center;font-size:14px;color:#4a4e5c}
.goal-possible .dash{flex:none;width:30px;height:12px;border:2px dashed var(--g-teal);border-radius:8px}
.goal-log{padding-left:22px;margin:10px 0}
.goal-log li{margin:5px 0}
.goal-after{color:#00585a;font-weight:700}
.game-step{margin-top:10px}

/* Compare offers. */
.compare-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.compare-tabs button{min-height:44px;padding:6px 14px;border:2px solid var(--g-ink);border-radius:22px;background:#fff;font-weight:700}
.compare-tabs button[aria-pressed=true]{background:var(--g-ink);color:#fff!important}
.compare-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px}
.offer{padding:14px;border:2px solid var(--g-line);border-radius:14px}
.offer.chosen{border-color:var(--g-teal);background:#f2faf7}
.offer h4{margin:0 0 8px;font-size:18px}
.offer ul{list-style:none;padding:0;margin:0}
.offer li{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid #eee}
.reveal{width:100%;min-height:44px;padding:6px 10px;border:2px dashed var(--g-teal);border-radius:8px;background:#f4fbfb;text-align:left;font-weight:600;color:#00585a!important}
.offer-total{margin:10px 0;font-size:17px}
.pick{width:100%;min-height:46px;border:2px solid var(--g-ink);border-radius:10px;background:#ffcf4d;font-weight:700}
.pick[aria-pressed=true]{background:var(--g-teal);border-color:var(--g-teal);color:#fff!important}

/* Paycheck and business rows. */
.pay-slip,.biz-rows{margin-top:12px;padding:12px 14px;border:2px solid var(--g-line);border-radius:12px;background:#fff}
.pay-row{display:flex;justify-content:space-between;gap:12px;margin:0;padding:8px 0;border-bottom:1px solid #eee}
.pay-row:last-child{border-bottom:0}
.pay-row.out strong{color:#8a3040}
.pay-row.net{font-size:18px}
.pay-row.net strong{color:#00585a}
.biz-stepper{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.biz-stepper strong{font-size:24px;min-width:70px;text-align:center}

/* Price basket and packs. */
.basket{width:100%;border-collapse:collapse;font-size:16px}
.basket th,.basket td{padding:9px 8px;border-bottom:1px solid #eee;text-align:left}
.basket thead th{font-size:12px;letter-spacing:1px;text-transform:uppercase;color:#55596a}
.basket tfoot th,.basket tfoot td{font-weight:700;border-bottom:0}
.basket .up{color:#8a3040}.basket .down{color:#00585a}
.packs{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0}
.pack{padding:6px 8px;border:2px solid var(--g-teal);border-radius:10px;background:#f4fbfb}
.pack.spare{border-style:dashed;border-color:#b9b6b0;background:#fff}
.pack .coin-dots{margin:0}

/* Red flags. */
.flag-card{padding:14px 16px;border-radius:14px;background:#f3f4f8;border:1px solid #d6d8e2}
.flag-from{margin:0 0 6px;font-size:13px;font-weight:700;color:#55596a}
.flag-text{margin:0;font-size:18px;line-height:2}
.flag-part{display:inline;padding:3px 6px;border:2px dashed #8f93a6;border-radius:6px;background:#fff;font-size:inherit!important;line-height:1.6}
.flag-part.found{border-style:solid;border-color:#c1442e;background:#ffe9e3}
.flag-part.fine{border-color:var(--g-teal);background:#e8f5f0}
.flag-why{list-style:none;padding:0;margin:12px 0 0}
.flag-why li{padding:8px 10px;margin:6px 0;border-left:4px solid #c1442e;background:#fff6f3;border-radius:4px}
.flag-why li.fine{border-left-color:var(--g-teal);background:#f2faf7}

/* Sort it. */
.sort-card{padding:16px;border:2px solid var(--g-ink);border-radius:14px;background:var(--g-cream);text-align:center}
.sort-text{font-size:20px;font-weight:700;margin:6px 0 12px}
.sort-bins{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.sort-bins button{min-height:48px;min-width:120px;padding:8px 16px;border:2px solid var(--g-ink);border-radius:10px;background:#fff;font-weight:700;box-shadow:3px 3px 0 var(--g-ink)}
.sort-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px;margin-top:14px}
.sort-col{padding:10px 12px;border:2px dashed #b9b6b0;border-radius:12px;min-height:70px}
.sort-col h4{margin:0 0 6px}
.sort-col ul{list-style:none;padding:0;margin:0}
.sort-col li{padding:6px 0;border-bottom:1px solid #eee}
.sort-col li span{display:block}

/* Choose a path. */
.path-trail{padding-left:20px;margin:0 0 10px;color:#55596a;font-size:14px}
.path-card{padding:16px;border-radius:14px;background:var(--g-cream);font-size:18px}
.path-card.end{background:#e8f5f0;border:2px solid var(--g-teal)}
.path-card p{margin:0 0 12px}
.path-choices{display:grid;gap:10px}
.path-choices button{min-height:52px;padding:10px 14px;border:2px solid var(--g-ink);border-radius:12px;background:#fff;text-align:left;font-weight:600;box-shadow:3px 3px 0 var(--g-ink)}

/* The finish card. */
.game-result{margin-top:16px;padding:18px;border-radius:14px;background:#e8f5f0;border:2px solid var(--g-teal);text-align:center}
.game-result h3{margin:4px 0 8px;font-size:24px}
.game-result p{margin:6px auto 10px;max-width:640px}
.game-burst{display:block;font-size:26px;letter-spacing:10px;color:#e0a100;animation:game-pop .6s ease-out}
.game-ask{background:#fff;border-radius:10px;padding:10px 12px;text-align:left}
@keyframes game-pop{0%{transform:scale(.4);opacity:0}70%{transform:scale(1.15);opacity:1}100%{transform:scale(1)}}
@media(max-width:560px){.game{padding:14px;box-shadow:3px 3px 0 #ffd34e}.game-goal{font-size:17px}.shop-grid{grid-template-columns:1fr 1fr}.flag-text{font-size:16px}}
@media(prefers-reduced-motion:reduce){.game *,.game-burst{animation:none!important;transition:none!important}}
@media print{.game{box-shadow:none}.game-sound,.game-actions{display:none}}
.shop-name::first-letter{text-transform:uppercase}

/* Real US coins, sized to scale with each other. */
.coin-tray-real{display:flex;flex-wrap:wrap;align-items:flex-end;gap:14px;margin:6px 0 12px}
.real-coin-btn{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px;border:0;background:none;min-width:56px;min-height:56px}
.real-coin{display:inline-flex;align-items:center;justify-content:center;width:var(--d);height:var(--d);border-radius:50%;background:#e9ebee;border:3px solid #8f949c;color:#202339;font-size:14px;flex:none}
.real-coin.penny{background:#e7b48f;border-color:#9c5528}
.real-coin.drawn{background:none;border:0}.real-coin.drawn svg{width:calc(var(--d) * 1.25);height:calc(var(--d) * 1.25)}
.real-coin-gap{display:inline-block;width:var(--d);height:var(--d);margin:6px 6px 22px;border-radius:50%;border:2px dashed #c9c5bb}
.coin-name{font-size:12px;color:#55596a;text-transform:capitalize}
.count-mat,.price-tag{display:flex;flex-direction:column;gap:4px;padding:12px 14px;margin:6px 0 12px;border-radius:12px;background:#fff7d9}
.count-mat strong,.price-tag strong{font-size:24px}
.count-trail{font-weight:700;color:#00585a}
.coin-row-real{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:20px}
.coin-row-real .real-coin{transform:scale(.8)}
.shop-art img.art-reuse{width:56px;height:56px;border-radius:50%;display:block}

/* Review fixes: feedback stays on screen, tap targets are at least 44px, a finished game rests under its finish card. */
.game-live:not(:empty):not(.quiet){position:sticky;bottom:10px;z-index:3;box-shadow:0 4px 14px rgba(32,35,57,.18)}
.game-sound{min-height:44px}
.flag-part{min-height:44px}
.shop-grid.no-art .shop-art{display:none}
.game.finished .game-body{opacity:.75}
.game.finished [data-restart],.game.finished .game-twist{display:none}
.real-coin-btn.back{padding:2px;min-width:44px;min-height:44px}
.game-goal:focus{outline:none}
.game-result p+p{margin-top:4px}

/* Right and wrong, readable at a glance: green with a check for right, red with a cross for wrong, on the answer itself and in a box under it. */
:root{--g-right:#1b7a3d;--g-right-bg:#e6f5ea;--g-wrong:#b42318;--g-wrong-bg:#fdecea}
.game-feedback{margin:12px 0 0;padding:10px 14px;border-radius:10px;border-left:6px solid;font-weight:600;font-size:16px;line-height:1.45}
.game-feedback.right{border-color:var(--g-right);background:var(--g-right-bg);color:#0f4d26}
.game-feedback.wrong{border-color:var(--g-wrong);background:var(--g-wrong-bg);color:#7a1a12}
.game .is-right{border-color:var(--g-right)!important;background:var(--g-right-bg)!important;color:#0f4d26}
.game .is-wrong{border-color:var(--g-wrong)!important;background:var(--g-wrong-bg)!important;color:#7a1a12}
.game button.is-wrong:disabled,.game button.is-right:disabled{opacity:1;cursor:default;box-shadow:none}
.game button.is-wrong:disabled{text-decoration:line-through;text-decoration-thickness:2px}
.quiz-q{font-size:20px;font-weight:700;margin:6px 0 12px}
.quiz-options{display:grid;gap:10px}
.quiz-option{min-height:52px;padding:10px 14px;border:2px solid var(--g-ink);border-radius:12px;background:#fff;text-align:left;font-weight:600;font-size:17px;box-shadow:3px 3px 0 var(--g-ink)}
.path-card.is-wrong,.path-card.is-right{border-width:2px;border-style:solid}
.path-card .game-feedback{margin:0 0 8px;padding:0;border:0;background:none;font-size:18px}
.sort-col li.is-right{border-left:5px solid var(--g-right);padding-left:8px}
.sort-col li.second-try{border-left:5px solid #c9a227;padding-left:8px}
.flag-why li.is-right{border-left:5px solid var(--g-right);padding-left:8px}
.flag-why li.is-wrong{border-left:5px solid var(--g-wrong);padding-left:8px}
@media print{.game-feedback{display:none}}
/* The game's own buttons, so they look the same on the public free lesson, where the app's stylesheet isn't loaded. */
.game .button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 20px;border:2px solid var(--g-ink);border-radius:7px;background:var(--g-ink);color:#fff;font:inherit;font-weight:700;font-size:14px;text-decoration:none;line-height:1.3;text-align:center;gap:8px;cursor:pointer}
.game .button.primary{background:#ffcf4d;color:var(--g-ink);box-shadow:3px 3px 0 var(--g-ink)}
.game .button.secondary{background:#fff;color:var(--g-ink)}
.game .button:disabled{cursor:default;opacity:.6}
.game .text-button{border:0;background:transparent;color:var(--g-teal);font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:4px;min-height:44px;padding:8px 3px;cursor:pointer}
