:root {
  --ink: #173447;
  --ink-2: #315365;
  --cream: #f8f3e7;
  --paper: #fffdf7;
  --coral: #ef7359;
  --yellow: #f4c757;
  --mint: #91c9a8;
  --sky: #86c9dc;
  --lavender: #b8add5;
  --line: rgba(23, 52, 71, .17);
  --shadow: 0 22px 60px rgba(23, 52, 71, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Aptos", "Segoe UI", system-ui, sans-serif; line-height: 1.45; }
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: white; padding: 9px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.topbar { height: 76px; padding: 0 clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; background: rgba(248,243,231,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; line-height: 1; }
.brand-star { width: 38px; height: 38px; display: grid; place-items: center; background: var(--yellow); border-radius: 50%; font-size: 19px; }
.brand strong { display: block; }
.brand small { display: block; margin-top: 5px; color: var(--ink-2); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.top-actions { display: flex; gap: 9px; }
.top-actions button { border: 1px solid var(--line); background: var(--paper); height: 40px; border-radius: 999px; font-weight: 800; }
.teacher-button { padding: 0 15px; color: var(--ink); }
.teacher-button span { margin-right: 5px; }
.how-button { padding: 0 17px; }
.how-button span { display: inline-grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: var(--ink); color: white; margin-right: 6px; font-size: 12px; }
.sound-button { width: 40px; padding: 0; }
.sound-button[aria-pressed="false"] { opacity: .55; }

main { padding: 50px clamp(18px, 5vw, 76px) 70px; }
.game-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; max-width: 1350px; margin: 0 auto 28px; }
.eyebrow { color: var(--coral); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
h1 { font: 500 clamp(44px, 5vw, 72px)/.95 Georgia, serif; letter-spacing: -.045em; margin: 10px 0 0; }
.game-heading > p { width: min(470px, 42vw); color: var(--ink-2); margin: 0; }

.dashboard { max-width: 1350px; margin: 0 auto 16px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.25fr; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,247,.75); box-shadow: 0 8px 25px rgba(23,52,71,.06); overflow: hidden; }
.player-card, .stat { min-height: 67px; padding: 11px 20px; display: flex; align-items: center; gap: 12px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.avatar { width: 39px; height: 39px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: white; box-shadow: inset 0 -4px 0 rgba(0,0,0,.08); }
.avatar::after { content: ""; width: 17px; height: 10px; border-radius: 12px 12px 4px 4px; background: white; transform: translateY(8px); }
.player-card small, .stat small { display: block; color: var(--ink-2); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.player-card strong, .stat strong { display: block; margin-top: 3px; font-size: 16px; }
.stat-icon { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; }
.stat-icon.yellow { background: #fae6a4; }
.stat-icon.mint { background: #c9e6d5; }
.progress-stat { display: grid; grid-template-columns: auto 1fr; gap: 15px; }
.mini-track { height: 7px; border-radius: 9px; background: #e5ded0; overflow: hidden; }
.mini-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--coral); transition: width .35s; }
.team-scoreboard { max-width: 1350px; margin: -5px auto 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.team-chip { min-width: 150px; display: grid; grid-template-columns: 13px 1fr auto; gap: 8px; align-items: center; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,247,.72); font-size: 11px; }
.team-chip.active { background: var(--paper); border-color: var(--team-color); box-shadow: inset 0 0 0 1px var(--team-color); }
.team-chip i { width: 11px; height: 11px; border-radius: 50%; background: var(--team-color); }
.team-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-chip span { font-weight: 900; }
.team-chip em { grid-column: 2 / 4; color: var(--coral); font-size: 9px; font-style: normal; font-weight: 900; text-transform: uppercase; }

.board-wrap { max-width: 1350px; margin: 0 auto; position: relative; }
.legend { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 5; display: flex; gap: 15px; background: rgba(255,253,247,.88); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; display: block; }
.legend-dot.question { background: var(--sky); }.legend-dot.bonus { background: var(--yellow); }.legend-dot.event { background: var(--coral); }.legend-dot.rest { background: var(--mint); }

.board { width: 100%; aspect-ratio: 1.72; min-height: 680px; padding: 12px; border-radius: 36px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.tiles { height: 100%; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(7, 1fr); gap: 7px; }
.tile { min-width: 0; min-height: 0; padding: 10px; border: 1px solid rgba(23,52,71,.13); border-radius: 14px; position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: visible; transition: transform .2s, box-shadow .2s; }
.tile.question { background: #c9e8ef; }.tile.bonus { background: #fae3a0; }.tile.event { background: #f3b0a1; }.tile.rest { background: #cbe5d5; }.tile.start { background: var(--ink); color: white; }.tile.finish { background: var(--yellow); }
.tile.active { z-index: 3; transform: translateY(-4px); box-shadow: 0 9px 0 rgba(23,52,71,.15), 0 14px 25px rgba(23,52,71,.15); outline: 3px solid white; }
.tile-number { font-size: 9px; font-weight: 900; opacity: .55; }
.tile-icon { font: 500 clamp(19px, 2vw, 31px)/1 Georgia, serif; align-self: center; }
.tile-name { font-size: clamp(8px, .75vw, 11px); line-height: 1.1; font-weight: 900; text-transform: uppercase; letter-spacing: .045em; text-align: center; }
.pawn { width: 30px; height: 30px; border-radius: 50% 50% 45% 45%; background: var(--team-color, var(--coral)); position: absolute; left: 50%; top: 50%; z-index: 8; transform: translate(-50%,-50%); box-shadow: inset 0 -5px 0 rgba(0,0,0,.1), 0 5px 12px rgba(23,52,71,.25); border: 3px solid white; transition: transform .25s; }
.pawn::before { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 9px; font-weight: 950; }
.pawn::after { content: ""; width: 13px; height: 10px; position: absolute; left: 6px; bottom: -7px; border-radius: 3px 3px 8px 8px; background: var(--team-color, var(--coral)); border: 3px solid white; border-top: 0; }
.pawn[data-stack="0"] { left: 36%; top: 38%; }.pawn[data-stack="1"] { left: 64%; top: 38%; }.pawn[data-stack="2"] { left: 36%; top: 68%; }.pawn[data-stack="3"] { left: 64%; top: 68%; }
.pawn.hop { animation: pawn-hop .5s ease both; z-index: 12; }
@keyframes pawn-hop { 0% { transform: translate(-50%,-50%) scale(1); } 45% { transform: translate(-50%,-105%) scale(1.22); } 100% { transform: translate(-50%,-50%) scale(1); } }
.tile.step-flash { animation: step-flash .7s ease; z-index: 6; }
@keyframes step-flash { 0%,100% { box-shadow: none; } 45% { box-shadow: 0 0 0 5px white, 0 0 0 9px var(--team-color); transform: translateY(-5px) scale(1.04); } }

.board-center { grid-column: 2 / 7; grid-row: 2 / 7; position: absolute; left: calc(14.28% + 15px); right: calc(14.28% + 15px); top: calc(14.28% + 15px); bottom: calc(14.28% + 15px); border-radius: 26px; background: var(--cream); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 35px; }
.board-center::before, .board-center::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(23,52,71,.08); }
.board-center::before { left: -150px; bottom: -120px; box-shadow: 0 0 0 40px rgba(23,52,71,.025), 0 0 0 80px rgba(23,52,71,.018); }
.board-center::after { right: -170px; top: -130px; box-shadow: 0 0 0 45px rgba(239,115,89,.04); }
.center-kicker { color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.compass { width: 64px; height: 64px; margin: 8px auto 4px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; position: relative; }
.compass i { position: absolute; top: -16px; font-size: 8px; font-style: normal; font-weight: 900; }
.compass span { color: var(--coral); font-size: 31px; }
.board-center h2 { margin: 7px 0; font: 500 clamp(27px, 3vw, 47px)/.98 Georgia, serif; letter-spacing: -.035em; }
.board-center h2 em { color: var(--coral); font-weight: 500; }
.board-center > p { margin: 5px 0 16px; color: var(--ink-2); font-size: 13px; min-height: 20px; }
.move-counter { min-height: 19px; margin: -8px 0 9px; color: var(--coral); font-size: 11px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.roll-zone { display: flex; align-items: center; gap: 13px; }
.dice { width: 67px; height: 67px; flex: 0 0 auto; padding: 12px; border-radius: 16px; background: var(--paper); box-shadow: 0 8px 20px rgba(23,52,71,.16); display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); gap: 6px; transform: rotate(-5deg); }
.dice.rolling { animation: shake .14s linear infinite; }
@keyframes shake { 50% { transform: rotate(8deg) scale(1.05); } }
.dice i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: 0; place-self: center; }
.dice[data-face="1"] i:nth-child(5), .dice[data-face="2"] i:nth-child(1), .dice[data-face="2"] i:nth-child(9), .dice[data-face="3"] i:nth-child(1), .dice[data-face="3"] i:nth-child(5), .dice[data-face="3"] i:nth-child(9), .dice[data-face="4"] i:nth-child(1), .dice[data-face="4"] i:nth-child(3), .dice[data-face="4"] i:nth-child(7), .dice[data-face="4"] i:nth-child(9), .dice[data-face="5"] i:nth-child(1), .dice[data-face="5"] i:nth-child(3), .dice[data-face="5"] i:nth-child(5), .dice[data-face="5"] i:nth-child(7), .dice[data-face="5"] i:nth-child(9), .dice[data-face="6"] i:nth-child(1), .dice[data-face="6"] i:nth-child(3), .dice[data-face="6"] i:nth-child(4), .dice[data-face="6"] i:nth-child(6), .dice[data-face="6"] i:nth-child(7), .dice[data-face="6"] i:nth-child(9) { opacity: 1; }
.roll-button { width: 145px; height: 61px; border: 0; border-radius: 17px; background: var(--coral); color: white; box-shadow: 0 7px 0 #c9523b, 0 12px 20px rgba(239,115,89,.25); transition: transform .15s, box-shadow .15s; }
.roll-button:hover { transform: translateY(-2px); }
.roll-button:active { transform: translateY(5px); box-shadow: 0 2px 0 #c9523b; }
.roll-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.roll-button span { display: block; font-weight: 950; letter-spacing: .06em; }
.roll-button small { display: block; font-size: 10px; opacity: .78; }
.tip { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 10px; color: var(--ink-2); }
.tip span { color: var(--coral); font-size: 15px; }

.rule-strip { max-width: 1000px; margin: 50px auto 0; display: flex; gap: 20px; align-items: start; text-align: center; justify-content: center; }
.rule-strip > span { font: 70px/.7 Georgia, serif; color: var(--yellow); }
.rule-strip p { margin: 0; font: 500 25px/1.35 Georgia, serif; }
footer { min-height: 80px; padding: 23px clamp(20px, 5vw, 76px); background: var(--ink); color: white; display: flex; justify-content: space-between; align-items: center; gap: 30px; font-size: 12px; }
footer p { margin: 0; color: rgba(255,255,255,.67); }
footer a { color: var(--yellow); font-weight: 800; }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; padding: 20px; display: grid; place-items: center; background: rgba(10,31,44,.72); backdrop-filter: blur(7px); }
.modal-backdrop[hidden] { display: none; }
.game-card { width: min(620px, 100%); max-height: calc(100svh - 40px); overflow-y: auto; background: var(--paper); border-radius: 29px; padding: clamp(28px, 4vw, 43px); box-shadow: 0 30px 90px rgba(0,0,0,.28); position: relative; animation: card-in .28s ease; }
.learning-card { width: min(940px, 100%); display: grid; grid-template-columns: 270px 1fr; gap: 26px; padding: 0; overflow: hidden; }
.learning-card .close-card { display: none; }
.guide-character { min-height: 570px; margin: 0; padding: 28px 12px 20px; background: linear-gradient(160deg, #cce9ef, #f8e6b3); position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.guide-character img { position: absolute; left: -80px; top: 18px; width: 420px; max-width: none; height: 420px; object-fit: contain; }
.guide-character p { position: relative; z-index: 2; margin: 0 8px; padding: 13px 14px; border-radius: 15px 15px 15px 4px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 800; box-shadow: 0 8px 25px rgba(23,52,71,.12); }
.learning-content { padding: 34px 40px 34px 0; overflow-y: auto; position: relative; }
.learning-content::after { content: "✦"; position: absolute; right: 24px; top: 25px; color: rgba(239,115,89,.18); font-size: 27px; pointer-events: none; animation: sparkle 2.8s ease-in-out infinite; }
.card-title-row { display: flex; align-items: center; gap: 14px; margin: 12px 0 8px; }
.card-title-row .card-symbol { flex: 0 0 auto; margin: 0; }
.card-title-row h2 { margin: 0; }
@keyframes card-in { from { opacity: 0; transform: translateY(15px) scale(.97); } }
@keyframes chip-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes sparkle { 0%, 100% { transform: scale(.8) rotate(-8deg); opacity: .45; } 50% { transform: scale(1.15) rotate(8deg); opacity: 1; } }
.close-card { position: absolute; right: 18px; top: 18px; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 22px; }
.card-tag { color: var(--coral); font-size: 10px; font-weight: 950; letter-spacing: .15em; }
.card-progress-line { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #e8ece9; }
.card-progress-line span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--yellow)); transition: width .45s ease; }
.card-symbol { width: 57px; height: 57px; display: grid; place-items: center; margin: 16px 0 12px; border-radius: 18px; background: linear-gradient(145deg, #d7f0f4, #b9dfe9); box-shadow: 0 8px 20px rgba(49,135,178,.16); font: 700 28px Georgia, serif; transform: rotate(-2deg); }
.learning-card[data-tone="reward"] .card-symbol { background: linear-gradient(145deg, #fff1ae, #f3ce5b); }
.learning-card[data-tone="warning"] .card-symbol { background: linear-gradient(145deg, #fff2bd, #f1ce66); }
.learning-card[data-tone="reprimand"] .card-symbol { background: linear-gradient(145deg, #ffd8cf, #f29b88); }
.learning-card[data-tone="transfer"] .card-symbol { background: linear-gradient(145deg, #e9ddf5, #c8afe3); }
.learning-card[data-tone="rights"] .card-symbol { background: linear-gradient(145deg, #d8eee7, #aad7c8); }
.game-card h2 { margin: 0; font: 500 clamp(29px, 5vw, 42px)/1.05 Georgia, serif; letter-spacing: -.03em; }
.game-card > p { color: var(--ink-2); }
.learning-content > #card-text { margin: 10px 0 15px; padding: 11px 14px; border-left: 4px solid var(--sky); border-radius: 4px 13px 13px 4px; background: #f4f8f7; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.rule-section-title { margin: 0 0 8px; color: var(--ink); font-size: 10px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.rule-section-title[hidden] { display: none; }
.rule-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0 0 19px; padding: 0; list-style: none; }
.rule-chips[hidden] { display: none; }
.rule-chip { min-height: 54px; padding: 9px 12px 9px 9px; gap: 10px; border-radius: 14px; background: linear-gradient(145deg, #f5fafa, #eaf4f5); color: var(--ink-2); font-size: 11.5px; font-weight: 680; line-height: 1.35; border: 1px solid rgba(49,135,178,.16); position: relative; display: flex; align-items: center; box-shadow: 0 3px 0 rgba(49,135,178,.06); animation: chip-rise .3s both; animation-delay: var(--chip-delay, 0ms); transition: transform .18s ease, box-shadow .18s ease; }
.rule-chip:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(23,52,71,.09); }
.rule-chip-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.82); box-shadow: inset 0 0 0 1px rgba(49,135,178,.09); font-size: 17px; }
.rule-chip-copy { flex: 1; }
.rule-chip.wide { grid-column: 1 / -1; }
.rule-chip.reward { background: linear-gradient(145deg, #fff9e9, #f8edc8); border-color: rgba(214,169,52,.28); }
.rule-chip.warning { background: linear-gradient(145deg, #fff9e8, #f8edce); border-color: rgba(225,171,33,.26); }
.rule-chip.reprimand { background: linear-gradient(145deg, #fff6f3, #fae7e2); border-color: rgba(239,115,89,.24); }
.rule-chip.transfer { background: linear-gradient(145deg, #f8f5fb, #eee7f5); border-color: rgba(139,104,181,.24); }
.rule-chip.rights { background: linear-gradient(145deg, #f1faf7, #e2f1ec); border-color: rgba(56,139,117,.25); }
.quiz-prompt { margin: 0 0 9px; color: var(--ink); font-size: 13px; }
.reveal-question { width: 100%; border: 0; border-radius: 999px; padding: 14px 18px; background: var(--ink); color: white; font-weight: 900; }
.review-card { border: 0; padding: 6px 0; margin-bottom: 10px; background: transparent; color: var(--coral); font-size: 12px; font-weight: 850; }
.question-mode .learning-content { align-self: center; }
.answer-list { display: grid; gap: 9px; margin-top: 20px; }
.answer { border: 1px solid var(--line); border-radius: 14px; background: var(--cream); padding: 14px 16px; display: flex; align-items: center; gap: 11px; text-align: left; }
.answer:hover { border-color: var(--coral); transform: translateX(3px); }
.answer span { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: white; font-size: 11px; font-weight: 900; }
.answer.correct { background: #d8eddf; border-color: var(--mint); }.answer.wrong { background: #f8d5cc; border-color: var(--coral); }
.answer:disabled { cursor: default; transform: none; color: inherit; }
.card-feedback { margin-top: 15px; }
.feedback-box { padding: 14px; border-left: 4px solid var(--yellow); background: #fbf1cd; border-radius: 4px 13px 13px 4px; font-size: 13px; }
.feedback-box strong { display: block; margin-bottom: 4px; }
.feedback-box p { margin: 0; color: var(--ink-2); }
.coverage-complete { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 13px; border: 1px solid rgba(56,139,117,.22); border-radius: 14px; background: #eef7f3; }
.coverage-complete > strong { grid-column: 1 / -1; margin-bottom: 3px; }
.coverage-complete span { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 11px; font-weight: 750; }
.coverage-complete i { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #bfe3d3; color: #185c48; font-style: normal; }
.continue-button { width: 100%; border: 0; border-radius: 999px; padding: 14px; margin-top: 17px; background: var(--ink); color: white; font-weight: 900; }
.help-card ol { list-style: none; padding: 0; margin: 25px 0; display: grid; gap: 15px; }
.help-card li { display: flex; gap: 14px; align-items: center; }
.help-card li > span { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); font: 700 18px Georgia, serif; }
.help-card p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.team-count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0; }
.team-count button { height: 48px; border: 1px solid var(--line); border-radius: 13px; background: var(--cream); font-weight: 950; }
.team-count button.selected { background: var(--ink); color: white; border-color: var(--ink); }
.team-name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-field { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 13px; }
.team-field i { width: 13px; height: 13px; flex: 0 0 auto; border-radius: 50%; background: var(--team-color); }
.team-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-weight: 800; }
.setup-note { padding: 11px 13px; border-left: 4px solid var(--yellow); background: #fbf1cd; border-radius: 4px 12px 12px 4px; font-size: 12px; }
.resume-area { margin: 14px 0; padding: 13px; border: 1px solid rgba(49,135,178,.24); border-radius: 14px; background: #edf7fa; }
.resume-area p { margin: 0 0 10px; font-size: 13px; }
.secondary-button, .danger-button { min-height: 43px; padding: 9px 14px; border-radius: 12px; font-weight: 850; cursor: pointer; }
.secondary-button { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.danger-button { border: 1px solid rgba(188,72,55,.35); background: #fff0ec; color: #9d3f30; }
.secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.teacher-card { width: min(620px, 100%); padding: 32px; position: relative; }
.teacher-card h2 { margin: 8px 0; font: 700 clamp(34px, 5vw, 52px)/1 Georgia, serif; }
.teacher-intro { color: var(--ink-2); line-height: 1.5; }
.teacher-settings { display: grid; gap: 14px; margin: 22px 0; }
.teacher-settings label { display: grid; gap: 7px; font-weight: 850; }
.teacher-settings select { min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; }
.teacher-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.large-text .tile-name { font-size: clamp(10px, .9vw, 13px); }
.large-text .rule-chip { font-size: 14px; }
.large-text .learning-content > p, .large-text .answer { font-size: 17px; }
.confetti { position: fixed; z-index: 90; width: 10px; height: 16px; top: -20px; animation: fall 2.2s linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(720deg); } }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
@media (max-width: 950px) {
  .game-heading { display: block; }
  .game-heading > p { width: auto; margin-top: 18px; }
  .dashboard { grid-template-columns: 1fr 1fr; }
  .dashboard > *:nth-child(2) { border-right: 0; }
  .dashboard > *:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .board { min-height: 620px; aspect-ratio: 1.2; }
  .legend { top: 16px; }
  .tile { padding: 7px; }
  .tile-name { font-size: 8px; }
  .board-center { padding: 24px; }
}
@media (max-width: 650px) {
  .topbar { height: 66px; padding: 0 14px; }
  .brand strong { font-size: 13px; }.brand small { display: none; }
  .how-button { width: 40px; padding: 0; font-size: 0; }.how-button span { margin: 0; font-size: 12px; }
  .teacher-button { width: 40px; padding: 0; font-size: 0; }.teacher-button span { margin: 0; font-size: 15px; }
  main { padding: 35px 10px 55px; }
  .game-heading { padding: 0 10px; }
  .game-heading h1 { font-size: 48px; }
  .dashboard { margin: 0 5px 14px; }
  .player-card, .stat { min-height: 60px; padding: 8px 10px; }
  .stat-icon, .avatar { width: 30px; height: 30px; }
  .player-card strong, .stat strong { font-size: 13px; }
  .board { width: 100%; min-height: 570px; height: 76svh; max-height: 650px; aspect-ratio: auto; padding: 5px; border-radius: 24px; }
  .tiles { gap: 3px; }
  .tile { padding: 4px 2px; border-radius: 8px; }
  .tile-icon { font-size: 17px; }.tile-name { font-size: 8px; letter-spacing: 0; line-height: 1.05; }.tile-number { font-size: 8px; }
  .pawn { width: 21px; height: 21px; border-width: 2px; }.pawn::before { font-size: 7px; }.pawn::after { width: 9px; height: 7px; left: 4px; bottom: -5px; border-width: 2px; }
  .board-center { left: calc(14.28% + 7px); right: calc(14.28% + 7px); top: calc(14.28% + 7px); bottom: calc(14.28% + 7px); padding: 13px 8px; border-radius: 18px; }
  .legend { display: none; }
  .compass { width: 45px; height: 45px; }.compass span { font-size: 22px; }
  .board-center h2 { font-size: clamp(24px, 7vw, 34px); }
  .board-center > p { font-size: 11px; margin-bottom: 8px; }
  .dice { width: 53px; height: 53px; padding: 9px; }.dice i { width: 6px; height: 6px; }
  .roll-button { width: 115px; height: 51px; }.tip { margin-top: 13px; padding-top: 8px; }
  .rule-strip { margin-top: 35px; padding: 0 15px; }.rule-strip p { font-size: 20px; }
  footer { flex-direction: column; align-items: start; }
  .team-scoreboard { padding: 0 5px; flex-wrap: nowrap; overflow-x: auto; }
  .team-chip { min-width: 135px; }
  .team-name-fields { grid-template-columns: 1fr; }
  .learning-card { display: block; overflow-y: auto; }
  .guide-character { min-height: 190px; padding: 18px 15px 18px 145px; justify-content: center; }
  .guide-character img { width: 190px; height: 175px; left: -23px; top: 8px; }
  .guide-character p { margin: 0; font-size: 12px; }
  .learning-content { padding: 24px 18px 25px; overflow: visible; }
  .card-title-row { align-items: start; }
  .card-title-row .card-symbol { width: 43px; height: 43px; font-size: 22px; }
  .rule-chips { grid-template-columns: 1fr; }
  .rule-chip, .rule-chip.wide { grid-column: 1; padding: 9px; min-height: 49px; font-size: 12px; }
  .rule-chip-icon { width: 32px; height: 32px; font-size: 16px; }
  .teacher-card { padding: 25px 18px; }
  .teacher-action-row { grid-template-columns: 1fr; }
  .large-text .tile-name { font-size: 9px; }
  .coverage-complete { grid-template-columns: 1fr; }
  .coverage-complete > strong { grid-column: 1; }
}
/* ── Intro / karşılama modali ── */
.intro-card { text-align: center; }
.intro-hero { font-size: 64px; margin: 8px 0 4px; line-height: 1; }
.intro-card h2 { font: 500 clamp(28px, 4vw, 40px)/1.1 Georgia, serif; margin: 8px 0 22px; letter-spacing: -.03em; }
.intro-steps { display: grid; gap: 16px; text-align: left; margin-bottom: 20px; }
.intro-step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--cream); border: 1px solid var(--line); }
.intro-step-icon { font-size: 30px; flex: 0 0 auto; line-height: 1; margin-top: 2px; }
.intro-step strong { display: block; font-size: 15px; margin-bottom: 4px; }
.intro-step p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.intro-tip { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: linear-gradient(135deg,#fef9e7,#fff3cd); border: 1px solid rgba(244,199,87,.45); margin-bottom: 4px; text-align: left; }
.intro-tip span { font-size: 22px; flex: 0 0 auto; }
.intro-tip p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.5; }
@media (max-width: 650px) {
  .intro-hero { font-size: 48px; }
  .intro-step { padding: 11px 12px; }
  .intro-step-icon { font-size: 24px; }
}

/* ── Per-answer feedback kutular (#1) ── */
.feedback-box { margin-top: 15px; padding: 14px 16px; border-radius: 4px 13px 13px 4px; font-size: 13px; }
.feedback-box.correct-fb { border-left: 4px solid var(--mint); background: #d8eddf; }
.feedback-box.wrong-fb   { border-left: 4px solid var(--coral); background: #fdecea; }
.feedback-box strong { display: block; margin-bottom: 6px; }
.feedback-box p { margin: 0 0 5px; color: var(--ink-2); line-height: 1.5; }
.feedback-box p:last-child { margin-bottom: 0; }
.fb-wrong-exp  { color: #8b3020 !important; }
.fb-correct-exp { color: #1a5c38 !important; font-weight: 750; }
.fb-source { font-size: 11px; opacity: .7; margin-top: 8px !important; }

/* ── Karakter mood animasyonları (#6) ── */
.learning-card[data-character-mood="correct"] .guide-character img {
  animation: char-correct .55s cubic-bezier(.36,.07,.19,.97) both;
}
.learning-card[data-character-mood="wrong"] .guide-character img {
  animation: char-wrong .5s ease both;
}
.learning-card[data-character-mood="correct"] .guide-character {
  background: linear-gradient(160deg, #b8e8cc, #d4f0dd);
}
.learning-card[data-character-mood="wrong"] .guide-character {
  background: linear-gradient(160deg, #f5d0c8, #fce8e4);
}
@keyframes char-correct {
  0%   { transform: translateY(0) scale(1) rotate(0deg); }
  30%  { transform: translateY(-18px) scale(1.08) rotate(-4deg); }
  55%  { transform: translateY(-22px) scale(1.1) rotate(3deg); }
  80%  { transform: translateY(-10px) scale(1.05) rotate(-1deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes char-wrong {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px) rotate(-3deg); }
  40%     { transform: translateX(8px)  rotate(3deg); }
  60%     { transform: translateX(-5px) rotate(-2deg); }
  80%     { transform: translateX(5px)  rotate(2deg); }
}

/* ── Joker stat ── */
.joker-stat { gap: 10px; }
.joker-btn { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--yellow); font-weight: 900; font-size: 12px; color: var(--ink); }
.joker-btn:hover { background: #e8b93a; }
.chip-joker, .chip-expert { font-size: 11px; }

/* ── Countdown bar ── */
.countdown-bar { max-width: 1350px; margin: -10px auto 10px; height: 10px; border-radius: 999px; background: #e5ded0; overflow: hidden; position: relative; }
.countdown-fill { height: 100%; width: 0; border-radius: inherit; background: var(--mint); transition: width 1s linear, background 0.5s; }
.countdown-text { position: absolute; right: 8px; top: -16px; font-size: 10px; font-weight: 900; color: var(--ink-2); }

/* ── Jingle modali ── */
.jingle-card { text-align: center; }
.jingle-subtitle { color: var(--ink-2); margin: 0 0 20px; }
.jingle-lyrics { background: linear-gradient(135deg,#fef9e7,#fff3cd); border: 2px solid rgba(244,199,87,.5); border-radius: 18px; padding: 22px 28px; margin-bottom: 16px; }
.jingle-title-text { font-weight: 900; font-size: 16px; margin-bottom: 12px; color: var(--ink); }
.jingle-text { font: 500 18px/1.8 Georgia, serif; color: var(--ink); white-space: pre-line; }
.jingle-bonus { padding: 10px 16px; border-radius: 12px; background: #d8eddf; color: #1a5c38; font-weight: 900; font-size: 14px; margin-bottom: 6px; }

/* ── Hareket etkinliği modali ── */
.activity-card { text-align: center; }
.activity-desc { color: var(--ink); font-size: 18px; margin: 0 0 8px; line-height: 2; white-space: pre-line; text-align: center; font-weight: 700; }
.activity-steps { display: grid; gap: 10px; text-align: left; margin-bottom: 8px; }
.activity-step { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--cream); border-radius: 12px; border: 1px solid var(--line); }
.activity-step span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: white; font-weight: 900; font-size: 13px; }
.activity-step p { margin: 0; font-size: 13px; color: var(--ink); }

/* ── Rol yapma modali ── */
.roleplay-card { text-align: center; }
.roleplay-desc { color: var(--ink-2); font-size: 14px; margin: 0 0 16px; line-height: 1.6; }
.roleplay-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.roleplay-role { padding: 12px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.roleplay-role span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--sky); font-weight: 900; }
.roleplay-role strong { font-size: 13px; }
.roleplay-timer-wrap { margin: 12px 0; }
.roleplay-timer { font: 700 52px/1 Georgia, serif; color: var(--ink); margin-bottom: 4px; }
.roleplay-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 500px) { .roleplay-roles, .roleplay-actions { grid-template-columns: 1fr; } }

/* ── Slogan modali ── */
.slogan-card { text-align: center; }
.slogan-topic { font-size: 16px; color: var(--ink); background: var(--cream); padding: 10px 16px; border-radius: 12px; margin: 0 0 12px; border: 1px solid var(--line); }
.slogan-hint { color: var(--ink-2); font-size: 13px; margin: 0 0 12px; }
.slogan-examples { padding: 10px 14px; border-radius: 12px; background: #edf7fa; border: 1px solid rgba(49,135,178,.2); font-size: 13px; color: var(--ink-2); margin-bottom: 14px; text-align: left; }
.slogan-timer-bar { height: 12px; border-radius: 999px; background: #e5ded0; overflow: hidden; margin-bottom: 6px; }
.slogan-timer-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--coral)); border-radius: inherit; transition: width 1s linear; }
.slogan-timer-text { font: 700 28px/1 Georgia, serif; color: var(--ink); margin: 4px 0 12px; }
.slogan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 500px) { .slogan-actions { grid-template-columns: 1fr; } }

/* ── Anlaşmazlık modali ── */
.debate-card { text-align: center; }
.debate-desc { color: var(--ink-2); font-size: 13px; font-style: italic; margin: 0 0 14px; }
.debate-teams { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.debate-team { flex: 1; padding: 12px; border-radius: 14px; background: var(--cream); border: 2px solid var(--team-color, var(--line)); }
.debate-team strong { display: block; font-size: 13px; color: var(--team-color, var(--ink)); margin-bottom: 4px; }
.debate-team span { font-size: 12px; color: var(--ink-2); }
.debate-vs { font: 700 22px Georgia, serif; color: var(--coral); flex: 0 0 auto; }
.debate-rule { padding: 11px 14px; border-radius: 12px; background: #fef9e7; border: 1px solid rgba(244,199,87,.4); font-size: 13px; color: var(--ink); margin-bottom: 14px; text-align: left; }
.debate-timer-wrap { margin: 10px 0; }
.debate-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 500px) { .debate-actions { grid-template-columns: 1fr; } }

/* ── "Neden?" modali ── */
.why-card { text-align: center; }
.why-student { font-size: 16px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.why-question { font: 500 18px/1.45 Georgia, serif; color: var(--ink); background: var(--cream); padding: 16px; border-radius: 14px; border-left: 4px solid var(--coral); margin: 0 0 14px; text-align: left; }
.why-tip { padding: 10px 14px; border-radius: 12px; background: #edf7fa; border: 1px solid rgba(49,135,178,.2); font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }

/* ── Uzman rozeti modali ── */
.expert-card { text-align: center; }
.expert-desc { font-size: 14px; color: var(--ink); margin: 0 0 14px; line-height: 1.6; }
.expert-perk { padding: 12px 16px; border-radius: 14px; background: linear-gradient(135deg,#fff9e9,#f8edc8); border: 1px solid rgba(214,169,52,.3); font-size: 13px; text-align: left; margin-bottom: 6px; }

/* ── Jingle: aktif satır vurgusu ── */
.jingle-lyric-line { padding: 6px 10px; border-radius: 8px; font-size: 17px; line-height: 1.6; transition: background .3s, transform .25s; }
.jingle-lyric-line.active-line { background: var(--yellow); transform: scale(1.04); font-weight: 900; }
.jingle-melody-status { min-height: 22px; font-size: 13px; font-weight: 800; color: var(--coral); margin: 8px 0 4px; text-align: center; }
.jingle-line-display { font: 500 26px/1.4 Georgia, serif; text-align: center; padding: 22px 16px; background: linear-gradient(135deg,#fef9e7,#fff3cd); border-radius: 16px; border: 2px solid rgba(244,199,87,.5); margin-bottom: 10px; min-height: 80px; display: flex; align-items: center; justify-content: center; }
.jingle-line-counter { text-align: center; font-size: 13px; color: var(--ink-2); font-weight: 800; margin-bottom: 14px; }

/* ── Hareket etkinliği: öğretmen cümleleri ── */
.activity-teacher-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.activity-teacher-label { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); margin-bottom: 10px; }
.activity-teacher-sentences { display: grid; gap: 10px; }
.teacher-sentence { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 13px; background: var(--cream); border: 1px solid var(--line); }
.ts-num { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 11px; font-weight: 900; margin-top: 1px; }
.ts-body { flex: 1; }
.ts-text { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.ts-why { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.ts-correct { color: #1a5c38 !important; }
.ts-wrong { color: #8b3020 !important; }

/* ── Kart modal taşma düzeltmesi ── */
.learning-card { max-height: calc(100svh - 40px); }
.learning-content { max-height: calc(100svh - 80px); overflow-y: auto; }
.rule-chips { max-height: 320px; overflow-y: auto; }

/* ── Soru metni punto büyütme ── */
.quiz-prompt { font-size: 16px !important; line-height: 1.55; color: var(--ink); margin: 0 0 14px; }
.answer { font-size: 15px; min-height: 58px; }
.answer span { font-size: 13px; }
.large-text .quiz-prompt { font-size: 19px !important; }
.large-text .answer { font-size: 17px; min-height: 64px; }

/* ── Tile renkleri: jingle ve activity ── */

/* ── Bekleme modali (#5) ── */
.wait-card { text-align: center; }
.wait-card h2 { font-size: clamp(26px, 4vw, 38px); margin: 10px 0 8px; }
.wait-hint { color: var(--ink-2); margin: 0 0 18px; font-size: 14px; }
.wait-task {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, #fef9e7, #fff3cd);
  border: 1px solid rgba(244,199,87,.45);
  margin-bottom: 6px;
}
.wait-task span { font-size: 28px; flex: 0 0 auto; line-height: 1; }
.wait-task p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
