.reward-banner{display:flex;gap:22px;align-items:center;border:1px solid #e1d9f5;background:linear-gradient(110deg,#fff5e8,#f2edff,#e9f9f4);border-radius:22px;padding:20px;margin:24px 0}.reward-banner>div{flex:1}.reward-banner h2{margin:4px 0}.reward-banner p{margin:5px 0}.companion-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.companion{background:white;border:1px solid #e2e5ef;border-radius:22px;padding:14px 8px;text-align:center}.companion h3{font-size:14px;margin:3px 0}.companion p{font-size:11px}.companion.locked{background:#f1f2f7}.companion.locked svg{filter:grayscale(.8);opacity:.5}.academy-mascot{flex-shrink:0;overflow:visible}.companion:not(.locked):hover svg{animation:companion-bob .8s ease-in-out infinite alternate}@keyframes companion-bob{to{transform:translateY(-5px) rotate(3deg)}}
body[data-academy-theme=peach] .academy-textarea,.theme-peach textarea{background:#fff3ec;border:2px solid #e8a991;border-radius:20px 20px 20px 5px;color:#543d36}body[data-academy-theme=mint] .academy-textarea,.theme-mint textarea{background:#eff9ed;border:2px solid #83b595;border-radius:20px;color:#284539}body[data-academy-theme=lavender] .academy-textarea,.theme-lavender textarea{background:#f4efff;border:2px solid #b39bd4;border-radius:25px 7px;color:#40305b}body[data-academy-theme=ocean] .academy-textarea,.theme-ocean textarea{background:#edf8ff;border:2px dashed #77aabd;border-radius:18px;color:#214454}body[data-academy-theme=royal] .academy-textarea,.theme-royal textarea{background:linear-gradient(120deg,#fff8e5,#f4eaff);border:2px solid #b29a50;border-radius:24px;color:#48385f;box-shadow:0 5px 0 #e9daf5}body[data-academy-theme=peach] .chat-bubble{background:#fff1e9}body[data-academy-theme=mint] .chat-bubble{background:#eaf8e8}body[data-academy-theme=lavender] .chat-bubble{background:#eee8fc}body[data-academy-theme=ocean] .chat-bubble{background:#e4f5ff}body[data-academy-theme=royal] .chat-bubble{background:#fff3cf}
.board-wrap{position:relative;max-width:670px;margin:auto}.snakes-board{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:3px;border:8px solid #d4e9db;border-radius:20px;background:#d4e9db}.board-cell{position:relative;aspect-ratio:1;background:#fffdf6;border-radius:5px;padding:3px;font-size:10px;color:#4e605c}.board-cell:nth-child(3n){background:#e7f5eb}.board-cell:nth-child(5n){background:#f5eafa}.board-cell small{display:block;font-size:9px}.board-cell.ladder{background:#fff0ae}.board-cell.snake{background:#ffdfdc}.board-cell.finish{background:#f5d78f}.board-pawn{position:absolute;width:31px;height:35px;left:2px;bottom:-1px;z-index:1;filter:drop-shadow(0 2px 2px #0003)}.board-pawn.bot{left:auto;right:1px;font-size:22px;line-height:31px;text-align:center}.game-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,1fr);grid-template-areas:"board top" "board side";gap:20px}
.game-layout>.board-wrap{grid-area:board}.game-top{grid-area:top}.game-controls{grid-area:side}.game-controls{align-self:start}.dice-face{display:inline-grid;place-items:center;background:#fff7d7;border:2px solid #e3c77e;border-radius:15px;width:66px;height:66px;font-size:40px;margin:12px 0}.game-log{max-height:220px;overflow:auto;font-size:13px}.game-log p{padding:6px 0;border-bottom:1px solid #eee}.board-links{pointer-events:none;position:absolute;inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);opacity:.5}.topic-practice{margin-top:18px}.theme-preview .btn{margin-top:12px}label:has(>textarea){display:block}audio{max-width:100%}
@media(max-width:820px){.companion-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.game-layout{grid-template-columns:1fr;grid-template-areas:"top" "board" "side"}.game-controls{order:0}.board-pawn{width:23px;height:28px}.board-cell small{font-size:7px}.reward-banner{gap:12px;padding:15px}}@media(max-width:450px){.companion-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.board-pawn{width:20px;height:23px}.board-pawn.bot{font-size:16px;line-height:22px}.snakes-board{gap:2px;border-width:5px}.board-cell{font-size:8px;padding:1px}.reward-banner h2{font-size:18px}}@media(prefers-reduced-motion:reduce){.companion:hover svg{animation:none!important}}

/* The score, the dice and the board are read every turn, so they come first; the
   level and companion pickers are set once and fold away below the board. */
.match-bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}
.match-bar .player{display:flex;align-items:center;gap:8px;padding:8px;border-radius:14px;background:#fff;border:2px solid transparent}
.match-bar .player.active{border-color:#b29a50;background:#fffaec}
.match-bar .player:last-child{flex-direction:row-reverse;text-align:right}
.match-bar .player b{display:block;font-size:14px}
.match-bar .player span{display:block;font-size:12px;color:#6b6478}
.match-bar .player em{display:block;font-size:13px;font-style:normal;font-weight:700;color:#3f3a52}
.match-bar .versus{font-weight:700;color:#8a829c}
.dice-row{display:flex;align-items:center;justify-content:center;gap:10px;margin:12px 0}
.dice-row .dice-face{margin:0;width:56px;height:56px;font-size:34px}
.dice-row .dice-total{min-width:34px;font-size:22px;text-align:center;color:#4a4360}
.game-settings{margin-bottom:10px}
.game-settings summary{cursor:pointer;font-weight:600}
