/* Hints, taking turns, number pad, and the 2nd grade games (math, money, story, museum, science, cursive) */
.prompt .hint-btn { margin-top: 0; font-size: 20px; flex: none; }
.turn-tag { font-size: 22px; font-weight: bold; padding: 4px 16px; border-radius: 16px; background: #e5e7eb; }
.turn-tag.mine { background: var(--yellow); }
.pad-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.pad-shown { min-width: 180px; padding: 8px 18px; background: #fff; border: 4px solid var(--blue); border-radius: 18px; font-size: 54px; font-weight: bold; text-align: center; }
.pad-shown.right { border-color: var(--green); background: #d8f8df; }
.pad-shown.reveal { border-color: var(--yellow); }
.pad-shown.shake { animation: shake .4s; }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 8px; }
.pad-key { height: 64px; font-size: 32px; font-weight: bold; border: none; border-radius: 14px; background: #fff; box-shadow: 0 5px 0 #c9c9c9; }
.pad-key.go { background: var(--green); color: #fff; box-shadow: 0 5px 0 #1e8f3c; }
.pad-key.stop { background: #ffd9dc; }
.pad-key:active { transform: translateY(3px); }
.number-line { display: flex; gap: 6px; margin-top: 12px; }
.nl-num { min-width: 52px; padding: 6px; text-align: center; font-size: 26px; font-weight: bold; border-bottom: 5px solid #333; }
.nl-num.ask { color: var(--orange); }
.choice.wide { min-width: 240px; max-width: 440px; min-height: 80px; background: #fff; color: var(--ink); border-color: var(--blue); }
.choice.wide.right { background: #d8f8df; }
.answer-text { font-size: 24px; font-weight: bold; }
.shape-card.big .shape-svg { width: 160px; height: 160px; }

/* place value / base-ten blocks */
.base-ten { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.bt-group { display: flex; gap: 4px; align-items: flex-end; flex-wrap: wrap; max-width: 300px; }
.bt-flat { width: 60px; height: 60px; background: repeating-linear-gradient(90deg, #3a86ff 0 5px, #2563c9 5px 6px); border: 2px solid #1d4f9e; }
.bt-rod { width: 8px; height: 60px; background: #2dc653; border: 2px solid #1e8f3c; }
.bt-cube { width: 8px; height: 8px; background: var(--orange); border: 2px solid var(--orange-d); }
.pv-number { display: flex; gap: 8px; }
.pv-digit { display: flex; flex-direction: column; align-items: center; background: #fff; border-radius: 14px; padding: 6px 16px; }
.pv-digit b { font-size: 64px; }
.pv-digit small { font-size: 18px; color: #555; }

/* math */
.math-problem { display: flex; gap: 16px; font-size: 64px; font-weight: bold; align-items: center; }
.math-problem .op { color: var(--orange); }
.math-problem .q { color: var(--blue); }
.math-hint { display: flex; gap: 16px; align-items: center; margin-top: 10px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.math-hint > .op { font-size: 40px; font-weight: bold; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; max-width: 420px; }
.dot { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); display: inline-block; }
.dot.more { background: var(--orange); }
.dot.gone { background: #ddd; outline: 2px dashed #999; }
.array { display: flex; flex-direction: column; gap: 6px; }
.array-row { display: flex; gap: 6px; }
.array .dot { width: 18px; height: 18px; }
.groups { display: flex; gap: 12px; flex-wrap: wrap; }
.group { display: flex; flex-wrap: wrap; gap: 4px; width: 80px; padding: 8px; border: 3px dashed #999; border-radius: 50%; justify-content: center; }
.group .dot { width: 14px; height: 14px; }

/* money */
.bank-art { font-size: 90px; }
.coin-card { display: flex; }
.coin-svg { width: 96px; height: 96px; }
.bill-svg { width: 150px; height: 66px; }
.coin-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.word-problem { display: flex; gap: 14px; align-items: center; font-size: 34px; font-weight: bold; }
.wp-item { display: flex; flex-direction: column; align-items: center; font-size: 56px; }
.wp-item small { font-size: 24px; }
.wp-icon { font-size: 56px; }
.counter { min-height: 90px; width: min(640px, 100%); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; background: #f1e4cf; border-radius: 16px; padding: 6px; margin-top: 8px; }
.counter-empty { color: #8a6d45; font-size: 20px; }
.counter-sum { font-size: 22px; font-weight: bold; color: #1e8f3c; min-height: 1.3em; }
.paid-coin { background: none; border: none; padding: 0; }
.paid-coin .coin-svg { width: 64px; height: 64px; }
.paid-coin .bill-svg { width: 100px; height: 44px; }
.wallet { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.wallet-coin { background: #fff; border: none; border-radius: 16px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 5px 0 #ccc; }
.wallet-coin small { font-size: 16px; font-weight: bold; }
.wallet-coin .coin-svg { width: 80px; height: 80px; }

/* story */
.story-book { background: #fffdf3; border: 3px solid #e9d8a6; border-radius: 16px; padding: 12px 18px; max-width: 760px; width: 100%; max-height: 46vh; overflow-y: auto; touch-action: pan-y; }
.story-book h3 { margin: 0 0 6px; text-align: center; font-size: 26px; }
.story-line { display: block; width: 100%; text-align: left; border: none; background: none; font-size: 24px; line-height: 1.45; padding: 3px 6px; border-radius: 8px; font-family: inherit; color: var(--ink); }
.story-line.reading { background: #fff3b0; }
.story-line.glow { background: #ffe066; outline: 3px solid var(--orange); }
.story-book.small .story-line { font-size: 19px; }

/* museum and science */
.quiz-icon { font-size: 100px; }
.map-wrap { display: flex; gap: 16px; align-items: center; }
.mini-map { display: grid; grid-template-columns: repeat(3, 100px); gap: 6px; background: #b7e4c7; padding: 8px; border-radius: 12px; }
.map-cell { background: #fff; border-radius: 10px; display: flex; flex-direction: column; align-items: center; padding: 4px; }
.map-cell span { font-size: 36px; }
.map-cell small { font-size: 14px; font-weight: bold; text-align: center; }
.compass { position: relative; width: 110px; height: 110px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 40px; border: 3px solid #333; }
.compass b { position: absolute; font-size: 22px; }
.compass .n { top: 2px; }
.compass .s { bottom: 2px; }
.compass .e { right: 8px; }
.compass .w { left: 8px; }

/* cursive */
.paper { width: min(900px, 100%); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.cursive-canvas { width: 100%; display: block; touch-action: none; background: #fffdf7; }
.cursive .panel-body > .row { min-height: 72px; } /* the buttons come and go; the paper must not move under the finger */

/* playing together */
.friends .panel-card { width: min(720px, 100%); }
.emote-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.emote-row .big-btn { font-size: 40px; padding: 10px 18px; }
.friend-row { display: flex; gap: 12px; align-items: center; width: 100%; background: #fff; border-radius: 16px; padding: 10px 14px; flex-wrap: wrap; }
.friend-name { flex: 1; font-size: 24px; font-weight: bold; }
.banner-help { border: none; background: var(--blue); color: #fff; font-weight: bold; font-size: 20px; border-radius: 16px; padding: 6px 12px; }
.banner-team { background: rgba(255, 255, 255, .6); border-radius: 12px; padding: 2px 10px; font-size: 18px; }
.trail-btn { position: absolute; left: max(12px, env(safe-area-inset-left)); top: max(130px, calc(env(safe-area-inset-top) + 120px)); width: 84px; height: 84px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, .85); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.trail-btn span { font-size: 34px; line-height: 1; }
.trail-btn small { font-size: 13px; font-weight: bold; }
.trail-btn.on { background: #fff3b0; }
.player-grade { font-size: 16px; background: rgba(255, 255, 255, .3); border-radius: 10px; padding: 1px 8px; }

@media (max-height: 560px) {
  .math-problem { font-size: 46px; }
  .pad-key { height: 50px; font-size: 26px; }
  .pad { grid-template-columns: repeat(3, 64px); }
  .story-book { max-height: 38vh; }
  .coin-svg { width: 72px; height: 72px; }
}

/* job info card (near a job giver) and the job offer details */
.job-tip { position: absolute; right: max(190px, calc(env(safe-area-inset-right) + 180px)); bottom: max(140px, calc(env(safe-area-inset-bottom) + 130px)); width: min(340px, 60vw); text-align: left; border: 4px solid #fff; border-radius: 20px; background: rgba(255, 255, 255, .95); padding: 10px 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); display: flex; flex-direction: column; gap: 4px; font-family: inherit; color: var(--ink); }
.tip-head { display: flex; align-items: center; gap: 8px; font-size: 20px; }
.tip-icon { font-size: 28px; }
.tip-about { font-size: 16px; line-height: 1.3; }
.tip-foot { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: bold; color: #1e8f3c; }
.tip-hear { font-size: 22px; }
.job-about { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff7d6; border-radius: 14px; padding: 10px 16px; font-size: 20px; text-align: center; }
.job-about b { color: #1e8f3c; font-size: 22px; }
body.panel-open .job-tip { display: none; }

/* construction site: the builder's list, and the demolition countdown (the house stays in view above it) */
.build-list { display: flex; flex-direction: column; align-items: center; gap: 10px; background: #fff7d6; border: 4px dashed #e9a23b; border-radius: 18px; padding: 12px 18px; width: min(760px, 100%); }
.build-list-head { font-size: 24px; font-weight: bold; }
.build-math { font-size: 40px; font-weight: bold; }
.build-math.small { font-size: 26px; font-weight: normal; }
.build-need { display: flex; align-items: center; gap: 12px; font-size: 26px; }
.build-need-icon { font-size: 34px; letter-spacing: 2px; }
.build-wins { display: flex; gap: 8px; font-size: 44px; }
.panel.wreck { align-items: flex-end; background: transparent; pointer-events: none; }
.panel.wreck .panel-card { pointer-events: auto; max-height: 52vh; width: min(900px, 100%); }
.panel.wreck .panel-head { background: #e9a23b; padding: 6px 14px; }
.panel.wreck .panel-body { gap: 8px; padding: 10px; }
.countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cd-num { min-width: 64px; padding: 6px 10px; border-radius: 14px; background: #ffd60a; font-size: 34px; font-weight: bold; text-align: center; }
.cd-num.ask { background: #fff; border: 3px dashed #e9a23b; }
.countdown.boom { font-size: 48px; font-weight: bold; color: #e63946; }
@media (max-height: 560px) {
  .panel.wreck .panel-card { max-height: 60vh; }
  .cd-num { font-size: 26px; min-width: 48px; }
  .build-math { font-size: 30px; }
}
