/* Little Learners. Mobile first: the base rules are for a 360px phone; wider screens are added at the end. */
:root {
  --red: #ef6b63;
  --blue: #4b9bdd;
  --yellow: #ffd45e;
  --green: #55b98c;
  --orange: #ff9b54;
  --purple: #8d79d6;
  --pink: #f28bb0;
  /* Darker partners for text and buttons, so white text passes contrast. */
  --green-deep: #2f7d59;
  --blue-deep: #23619a;
  --red-deep: #a8362f;
  --brown: #a9714b;
  --ink: #27394d;
  --muted: #5a6b7e;
  --paper: #fffdf8;
  --cream: #fff8e8;
  --line: #e6e4d8;
  --shadow: 0 8px 22px rgba(39, 57, 77, .09);
  --tap-child: 64px;
  --tap-adult: 48px;
  --radius: 22px;
  font-family: "Trebuchet MS", "Segoe UI", "Noto Sans", "Noto Sans Devanagari", "Noto Sans Bengali", sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; line-height: 1.5; background: var(--cream); overflow-x: hidden; }
body.role-student, body.is-child, body.is-game { background: var(--cream) url("../images/bg-hills.svg") bottom center / max(100%, 900px) auto no-repeat fixed; }
img, svg { max-width: 100%; }
/* A bundled emoji picture sits in the text exactly where the emoji was. */
img.emoji { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; }
a { color: var(--blue-deep); }
button, input, select, textarea { font: inherit; color: inherit; touch-action: manipulation; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.15; margin-bottom: 8px; }
h2 { font-size: clamp(1.2rem, 4.4vw, 1.5rem); line-height: 1.2; margin-bottom: 12px; }
h3 { font-size: 1.05rem; margin-bottom: 8px; }
p { color: var(--muted); }
code { background: #f1efe4; padding: 1px 5px; border-radius: 6px; font-size: .9em; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.only-print { display: none; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 6px 12px; background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 900; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.brand-name { display: none; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav form { display: inline-flex; margin: 0; }
.nav-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 150px); }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link { display: inline-flex; align-items: center; min-height: var(--tap-adult); padding: 0 10px; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.nav-link.is-active { background: #e6f4ec; color: var(--green-deep); }
.nav-link:hover { background: #f2efe2; }
.icon-btn { display: inline-grid; place-items: center; min-width: var(--tap-child); height: var(--tap-child); padding: 0 6px; border: 2px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); text-decoration: none; font-size: 1.7rem; line-height: 1; }
.icon-btn.is-active { border-color: var(--green); background: #e6f4ec; }
.icon-btn.small { min-width: var(--tap-adult); height: var(--tap-adult); font-size: 1.2rem; border-radius: 16px; }
.icon-btn .glyph { font-size: .95rem; font-weight: 900; }
.nav select { min-height: var(--tap-adult); border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 0 8px; width: auto; max-width: 140px; }
.link-button { min-height: var(--tap-adult); border: 0; background: transparent; color: var(--blue-deep); font-weight: 700; padding: 0 8px; }

.page { width: min(1140px, 100% - 24px); margin: 16px auto 40px; }
.site-footer { padding: 14px; text-align: center; color: var(--muted); font-size: .85rem; }
body.role-student .site-footer, body.is-game .site-footer, body.is-child .site-footer { display: none; }

/* Building blocks */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap-adult); padding: 10px 16px; border: 0; border-radius: 16px; background: #eaf2f8; color: var(--blue-deep); text-decoration: none; font-weight: 800; text-align: center; }
.button.primary { background: var(--green-deep); color: #fff; }
.button.danger { background: #fdeceb; color: var(--red-deep); }
.button.wide { width: 100%; }
.button.xl { min-height: 72px; padding: 12px 26px; border-radius: 26px; font-size: 1.3rem; }
.button:hover { filter: brightness(.97); }
.notice, .error { padding: 12px 14px; border-radius: 14px; margin: 0 0 14px; background: #fff1d0; color: #6a4410; border: 1px solid #f1d591; }
.error { background: #fdeceb; color: var(--red-deep); border-color: #f3c1bd; }
.notice::before { content: "✔ "; }
.error::before { content: "⚠ "; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: #f1efe4; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.pill.good { background: #e3f4e8; color: #22633f; }
.pill.warn { background: #fff1d0; color: #6a4410; }
.pill.bad { background: #fdeceb; color: var(--red-deep); }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #fff1be; font-size: 1.4rem; vertical-align: middle; margin-right: 6px; }
.empty { text-align: center; padding: 28px 12px; }
.empty .big { font-size: 3rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.page-head p { margin: 0; }
.page-head .mark { font-size: 2.6rem; }

/* Forms */
label { display: grid; gap: 5px; font-weight: 700; font-size: .93rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], input[type=file], input:not([type]), select, textarea {
  width: 100%; min-height: var(--tap-adult); padding: 9px 12px; border: 1px solid #cfd6d6; border-radius: 12px; background: #fff; font-weight: 400;
}
textarea { min-height: 84px; resize: vertical; }
textarea.code { font-family: Consolas, monospace; font-size: .82rem; min-height: 160px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.form-grid .span-all { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0; min-width: 0; }
legend { padding: 0 6px; font-weight: 800; }
.chip-check { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap-adult); padding: 6px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-weight: 700; }
.chip-check input { width: 20px; height: 20px; accent-color: var(--green-deep); }
.chip-check small { display: block; color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
details > summary { cursor: pointer; font-weight: 800; min-height: var(--tap-adult); display: flex; align-items: center; color: var(--blue-deep); }
details[open] > summary { margin-bottom: 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tab { display: inline-flex; align-items: center; min-height: var(--tap-adult); padding: 0 14px; border-radius: 999px; background: #efede1; color: var(--ink); text-decoration: none; font-weight: 800; }
.tab.is-active { background: var(--blue-deep); color: #fff; }

/* Tables scroll inside their own box, so the page itself never scrolls sideways. */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eceadf; vertical-align: middle; }
th { color: var(--muted); font-size: .8rem; white-space: nowrap; }
td.num, th.num { text-align: right; }
.level-cell { text-align: center; white-space: nowrap; min-width: 86px; }
.level-cell small { display: block; font-size: .7rem; font-weight: 700; }
.level-beginner { background: #fff0e2; }
.level-progressing { background: #fff8d2; }
.level-proficient { background: #e3f4e8; }
.level-none { color: #7a8794; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 12px; }
.stat b { display: block; font-size: 1.5rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .85rem; }
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 340px; }
.bar-pair { display: grid; gap: 4px; min-width: 150px; }
.bar { height: 14px; border-radius: 4px; background: #e07b1a; min-width: 2px; }
.bar.after { background: #23619a; background-image: repeating-linear-gradient(45deg, transparent 0 5px, rgba(255, 255, 255, .35) 5px 8px); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 22px; height: 12px; border-radius: 6px; vertical-align: -1px; margin-right: 5px; }

/* Staff sign in and device set-up */
.auth { display: grid; gap: 12px; max-width: 460px; margin: 4vh auto; }
.auth .hero { text-align: center; }
.auth .hero img { width: 120px; }

/* Child screens: pictures and sound instead of words */
.child-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.child-hero img { width: 84px; flex: none; animation: bob 3s ease-in-out infinite; }
.child-hero h1 { margin: 0; }
.speech { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 10px 14px; box-shadow: var(--shadow); }
.area-jump { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 22px 0 4px; }
.area-jump .icon-btn { min-width: 0; }
.section-icon[id] { scroll-margin-top: 76px; }
.section-icon { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 1.1rem; font-weight: 900; }
.section-icon .emoji { font-size: 1.6rem; }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 148px; padding: 12px 8px; border: 3px solid #fff; border-radius: 26px; background: #fff5e2; color: var(--ink); text-align: center; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s ease; }
.tile:nth-child(6n+2) { background: #e6f6ec; }
.tile:nth-child(6n+3) { background: #e8f2fc; }
.tile:nth-child(6n+4) { background: #fde9f0; }
.tile:nth-child(6n+5) { background: #eeeafb; }
.tile:nth-child(6n) { background: #fff3c9; }
.tile:active { transform: scale(.96); }
.tile-icon { font-size: 3.4rem; line-height: 1; }
.tile-name { font-weight: 900; font-size: .98rem; line-height: 1.2; }
.tile-badge { position: absolute; top: -8px; right: -6px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); border: 3px solid #fff; font-size: 1.2rem; }
.tile.is-today { border-color: var(--yellow); }
.tile.is-done { opacity: .75; }
.tile small { color: var(--muted); font-size: .8rem; }

.garden { text-align: center; }
.garden-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0; }
.pot { display: grid; place-items: center; aspect-ratio: 1; border-radius: 16px; background: #f1ead9; font-size: clamp(1.4rem, 7vw, 2.4rem); }
.pot.is-watered { background: #dff3e4; animation: pop .4s ease; }
.garden-flowers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 2.4rem; min-height: 60px; }
.garden-count { display: inline-flex; align-items: center; gap: 8px; margin: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-weight: 900; font-size: 1.2rem; }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sticker { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: #fff; border: 3px solid var(--yellow); font-size: clamp(1.8rem, 9vw, 2.8rem); box-shadow: var(--shadow); }
.sticker.is-empty { background: transparent; border: 3px dashed #cfc9b4; box-shadow: none; color: transparent; text-shadow: 0 0 0 #d8d3c2; opacity: .7; }
/* An empty outline: the picture's shape without its colours. */
.sticker.is-empty img.emoji { filter: grayscale(1) brightness(1.7) contrast(.5); opacity: .45; }
.outside { text-align: center; padding: 24px 12px; }
.outside .big { font-size: 5rem; animation: bob 3s ease-in-out infinite; }

/* Picture login */
.login-steps { max-width: 560px; margin: 0 auto; }
.login-step { text-align: center; }
.login-step h1 { font-size: 1.3rem; }
.step-icon { font-size: 2.6rem; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.pick-grid.avatars { grid-template-columns: repeat(4, 1fr); }
.pick { display: grid; place-items: center; min-height: 76px; aspect-ratio: 1; border: 3px solid var(--line); border-radius: 22px; background: #fff; font-size: clamp(2rem, 10vw, 3rem); line-height: 1; }
.pick small { display: block; font-size: .8rem; font-weight: 900; }
.pick.is-picked { border-color: var(--green-deep); background: #e3f4e8; }
.pick.is-picked::after { content: "✔"; position: absolute; font-size: 1rem; transform: translate(26px, -26px); color: var(--green-deep); }
.pick { position: relative; }
.secret-dots { display: flex; justify-content: center; gap: 10px; margin: 8px 0; }
.secret-dots i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; border: 3px dashed #cfc9b4; font-style: normal; font-size: 1.6rem; }
.secret-dots i.is-filled { border-style: solid; border-color: var(--green-deep); background: #e3f4e8; }
.login-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.welcome { text-align: center; }
.welcome .button { margin-bottom: 10px; }
.welcome-note { font-weight: 800; color: var(--ink); }
.welcome-points { margin: 22px auto 0; padding: 0; max-width: 420px; list-style: none; text-align: left; color: var(--muted); display: grid; gap: 8px; }
.adult-corner { margin-top: 26px; text-align: center; font-size: .85rem; }

/* The game */
.game { max-width: 900px; margin: 0 auto; }
.game-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.game-bar .tools { display: flex; gap: 6px; }
.star-row { display: flex; gap: 4px; font-size: 1.7rem; line-height: 1; }
.star { color: #d9d4c3; transition: transform .3s ease; }
.star.is-won { color: #f0a80f; transform: scale(1.15); }
.star.is-tried { color: #b9c7d4; }
.stage { position: relative; min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 14px 10px; overflow: hidden; }
.stage h1 { font-size: 1.5rem; }
.prompt-row { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.prompt { margin: 0; font-size: clamp(1.25rem, 5.4vw, 2rem); font-weight: 900; line-height: 1.25; }
.round-area { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; min-height: 180px; }
.round-area .line { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.choice { display: grid; place-items: center; min-width: 84px; min-height: 84px; padding: 8px; border: 3px solid #e2e4dc; border-radius: 24px; background: #fff; font-size: clamp(2.2rem, 10vw, 3.4rem); font-weight: 900; line-height: 1; box-shadow: 0 4px 0 #dcdccf; }
.choice:active { transform: translateY(3px); box-shadow: 0 1px 0 #dcdccf; }
.choice svg { width: 64px; height: 64px; display: block; }
.choice:disabled { opacity: .55; }
/* A choice that goes back to plain after a right tap must not play its entrance again. */
.settled { animation: none; }
.is-wrong { animation: wobble .4s ease; }
.is-right { border-color: var(--green-deep) !important; background: #e3f4e8 !important; }
.glow { box-shadow: 0 0 0 5px var(--yellow), 0 0 26px 6px #ffd45e !important; animation: pulse .8s ease-in-out infinite alternate; }
.feedback { min-height: 30px; margin: 0; font-weight: 900; font-size: 1.1rem; color: var(--green-deep); }
.feedback.is-soft { color: #7a5a4c; }
.finish .big { font-size: 4.6rem; animation: bob 1.4s ease-in-out infinite; }
.finish .star-row { justify-content: center; font-size: 2.6rem; margin: 6px 0 12px; }
.badge-pop { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 8px 0 14px; }
.badge-pop .sticker { width: 86px; animation: pop .6s ease both; }
.badge-pop figure { margin: 0; text-align: center; font-weight: 800; font-size: .85rem; max-width: 110px; }
.check-who { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; font-weight: 800; }
.offline-note { font-size: .85rem; }
.confetti { position: fixed; z-index: 99; top: -24px; width: 10px; height: 16px; border-radius: 3px; pointer-events: none; animation: fall 1.9s ease-in forwards; }

/* Game pieces */
.apple { min-width: 68px; min-height: 68px; border: 3px solid #eee7d6; border-radius: 22px; background: #fff; font-size: 2.3rem; position: relative; }
.apple.is-counted { border-color: var(--green-deep); background: #e3f4e8; }
.apple b { position: absolute; top: -10px; right: -8px; min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green-deep); color: #fff; font-size: 1rem; }
.balloon { position: relative; width: 74px; height: 92px; border: 0; border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%; background: var(--c, var(--red)); box-shadow: inset -8px -10px 0 rgba(0, 0, 0, .1), inset 8px 8px 0 rgba(255, 255, 255, .28); margin-bottom: 26px; animation: float 3s ease-in-out infinite; }
.balloon:nth-child(2n) { animation-delay: -.8s; }
.balloon:nth-child(3n) { animation-delay: -1.6s; }
.balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 26px; background: #9aa5ad; }
.balloon.is-popped { animation: popped .3s ease forwards; pointer-events: none; }
.basket { display: grid; gap: 6px; place-items: center; min-width: 136px; min-height: 150px; padding: 10px; border: 3px solid #e2e4dc; border-radius: 26px; background: #fff; box-shadow: 0 4px 0 #dcdccf; }
.basket .fruit { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 132px; font-size: 1.7rem; line-height: 1.1; min-height: 62px; align-content: center; }
.basket .weave { font-size: 2.2rem; line-height: 1; }
.bead-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; border-radius: 999px; background: #fff; border: 2px dashed #d5d0bd; }
.bead-line svg { width: 46px; height: 46px; }
.bead-line .gap { width: 50px; height: 50px; display: grid; place-items: center; border: 3px dashed var(--blue); border-radius: 50%; font-weight: 900; font-size: 1.4rem; color: var(--blue-deep); }
.shadow-box { flex-basis: 100%; display: grid; place-items: center; }
.shadow-box svg { width: 128px; height: 128px; }
.scene { flex-basis: 100%; }
.scene .picture { font-size: clamp(2.2rem, 11vw, 4rem); line-height: 1.2; font-weight: 900; overflow-wrap: anywhere; }
.traffic { display: grid; gap: 6px; padding: 10px; border-radius: 22px; background: #3b4a59; width: 78px; }
.traffic i { width: 56px; height: 56px; border-radius: 50%; background: #5d6b78; display: grid; place-items: center; font-style: normal; font-size: 1.5rem; color: transparent; }
.traffic i img { visibility: hidden; }
.traffic i.is-on img { visibility: visible; }
.traffic i.is-on.red { background: var(--red); color: #fff; }
.traffic i.is-on.green { background: var(--green); color: #fff; }
.rule-card { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 16px; background: #fff; border: 2px solid var(--line); font-size: 1.5rem; line-height: 1.2; }
.go-pad { min-width: 150px; min-height: 150px; border-radius: 50%; border: 4px solid #e2e4dc; background: #fff; font-size: 4rem; box-shadow: 0 6px 0 #dcdccf; }
.go-pad.is-running { animation: run .5s ease; }

/* Pieces shared by the newer games. A "part" is one block of a round (the picture, the choices); on a
   phone held sideways two parts sit next to each other. Children's tap targets stay 64px or more. */
.round-area .part { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
:where(.round-area > .choice, .tray > .choice, .tray > .apple, .spot-big > .choice) { animation: pop-in .35s ease backwards; }
:where(.round-area, .tray, .spot-big) > :nth-child(2) { animation-delay: .06s; }
:where(.round-area, .tray, .spot-big) > :nth-child(3) { animation-delay: .12s; }
:where(.round-area, .tray, .spot-big) > :nth-child(4) { animation-delay: .18s; }
:where(.round-area, .tray, .spot-big) > :nth-child(n+5) { animation-delay: .24s; }
.choice.is-right { animation: cheer .5s ease; }
.sparkle { position: fixed; z-index: 98; margin: -12px 0 0 -9px; color: #f0a80f; font-style: normal; font-size: 1.3rem; line-height: 1; pointer-events: none; animation: sparkle .65s ease-out forwards; }
.is-speaking { box-shadow: 0 0 0 5px var(--blue) !important; animation: bob .5s ease-in-out infinite; }
.choice.is-used, .apple.is-used { visibility: hidden; }
.choice.is-group { width: 150px; padding: 8px 10px; font-size: 1.5rem; line-height: 1.25; overflow-wrap: anywhere; }
.sized { display: inline-block; line-height: 1; }
.size-s { font-size: .45em; }
.size-m { font-size: .75em; }
.size-l { font-size: 1.1em; }
.size-xl { font-size: 1.5em; }
/* A thing in, on, under or beside a box or a table. */
.spot { position: relative; display: block; width: 84px; height: 74px; font-size: 1.6rem; line-height: 1; }
.spot i { position: absolute; font-style: normal; }
.spot-prop { left: 36px; bottom: 4px; width: 44px; height: 34px; z-index: 1; }
.on-box .spot-prop { background: #e9c99a; border: 4px solid var(--brown); border-top: 0; border-radius: 0 0 8px 8px; }
.on-table .spot-prop { height: 38px; border: solid var(--brown); border-width: 7px 5px 0; border-radius: 4px 4px 0 0; }
.spot-thing { left: 45px; bottom: 40px; }
.on-table .spot-thing { bottom: 44px; }
.is-in .spot-thing { bottom: 19px; }
.is-under .spot-thing { left: 47px; bottom: 5px; z-index: 2; font-size: 1.35rem; }
.is-beside .spot-thing { left: 4px; bottom: 4px; }

.bead-line .bead { display: inline-grid; place-items: center; font-size: 1.9rem; line-height: 1; }
.bead-line .bead.is-new { animation: pop .35s ease; }
.bead-line .engine { font-size: 2rem; line-height: 1; }
.bead-line.is-train { border-radius: 16px; }
.bead-line.is-train .bead { padding: 2px; border: 2px solid #cdd5dc; border-radius: 8px; background: #f7fafc; }
.bead-line.is-weave { border: 0; border-radius: 6px; border-top: 6px double var(--red-deep); border-bottom: 6px double var(--red-deep); background: repeating-linear-gradient(90deg, #fff 0 6px, #fdf1ee 6px 12px); }
.bead-line.is-path { border-style: solid; border-color: #cfeacb; background: #f3faf1; }

.round-area .track { gap: 5px; padding: 26px 8px 12px; border-radius: 20px; background: #fff; border: 2px dashed #d5d0bd; }
.track .runner { font-size: 1.5rem; line-height: 1; }
.track .place { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border: 3px dashed var(--blue); border-radius: 14px; font-size: 1.5rem; font-weight: 900; line-height: 1; }
.track .place svg { width: 32px; height: 32px; }
.track .place.is-filled { border-style: solid; border-color: var(--green-deep); background: #e3f4e8; animation: pop .35s ease; }
.track .place .runner { position: absolute; top: -24px; left: 50%; margin-left: -12px; }
.track .runner.is-hopping { animation: run .5s ease; }
.track.is-stones .place { border-radius: 50%; background: #eef3f6; }
.track.is-train .place { border-radius: 8px; margin-bottom: 8px; }
.track.is-train .place::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: -11px; height: 9px; background: radial-gradient(circle at 6px 4px, #3b4a59 4px, transparent 5px), radial-gradient(circle at calc(100% - 6px) 4px, #3b4a59 4px, transparent 5px); }

.round-area .card-grid { display: grid; gap: 8px; justify-content: center; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 86px); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 86px); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 70px); }
.flip-card { height: 86px; padding: 0; display: grid; place-items: center; border: 3px solid var(--blue-deep); border-radius: 18px; background: var(--blue) repeating-linear-gradient(45deg, transparent 0 8px, rgba(255, 255, 255, .22) 8px 16px); color: #fff; font-size: 2.4rem; font-weight: 900; line-height: 1; box-shadow: 0 4px 0 #dcdccf; }
.flip-card .face { display: none; }
.flip-card.is-open { background: #fff; border-color: #e2e4dc; animation: flip-in .25s ease; }
.flip-card.is-open .face { display: block; }
.flip-card.is-open .back { display: none; }
.flip-card:disabled { opacity: 1; }

.sound-pad { min-width: 112px; min-height: 112px; font-size: 3.2rem; }
.drum-pad { min-width: 100px; min-height: 100px; border-radius: 50%; }
.garden-row { font-size: 1.5rem; line-height: 1; letter-spacing: 6px; }

.round-area .fork { flex-wrap: nowrap; gap: 4px; }
.fork-side { flex: 1 1 0; max-width: 150px; min-height: 124px; gap: 4px; }
.fork-thing { font-size: 2.8rem; line-height: 1; }
.fork-arrow { font-size: 1.3rem; line-height: 1; }
.walker { position: relative; z-index: 2; font-size: 2.8rem; line-height: 1; pointer-events: none; transition: transform .6s ease; }
.walker.goes-left { transform: translateX(-74px) rotate(-8deg); }
.walker.goes-right { transform: translateX(74px) rotate(8deg); }

.round-area .sort-top { flex-direction: column; gap: 2px; }
.sort-item { min-height: 78px; font-size: 4rem; line-height: 1.1; }
.sort-item svg { width: 76px; height: 76px; display: block; }
.sort-item.is-new { animation: pop .35s ease; }
.sort-dots { color: var(--muted); font-size: .8rem; letter-spacing: 5px; }
.choice.bin { flex: 1 1 0; max-width: 150px; min-height: 116px; align-content: start; gap: 4px; border-radius: 14px 14px 30px 30px; border-color: #c9d3da; }
.bin-label { font-size: 2.3rem; line-height: 1; }
.bin .bin-label svg { width: 50px; height: 50px; }
.bin-inside { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 26px; font-size: 1.15rem; line-height: 1; }
.bin .bin-inside svg { width: 22px; height: 22px; }

.build-board svg { width: min(210px, 58vw); aspect-ratio: 1; border: 2px dashed #d5d0bd; border-radius: 20px; background: #fff; }
.piece { fill: #efede3; stroke: #a9a594; stroke-width: 2; stroke-dasharray: 5 4; }
.piece > * { vector-effect: non-scaling-stroke; }
.piece.is-placed { fill: var(--c); stroke: rgba(39, 57, 77, .25); stroke-dasharray: none; animation: fade-in .35s ease; }
.paint-scene svg { width: min(310px, 88vw); display: block; border: 4px solid #fff; border-radius: 16px; box-shadow: var(--shadow); }
.paint-scene .is-ghost * { fill: #fff; fill-opacity: .75; stroke: #8f8b7a; stroke-width: 4; stroke-dasharray: 9 7; }

.mix-row { font-size: 1.8rem; font-weight: 900; }
.blob { display: inline-block; width: 60px; height: 60px; border: 3px solid rgba(39, 57, 77, .25); border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; background: var(--c); }
.blob.is-pot { width: 74px; height: 74px; border-radius: 12px 12px 36px 36px; }
.blob.is-unknown { display: inline-grid; place-items: center; background: #fff; border-style: dashed; color: var(--blue-deep); font-size: 1.6rem; line-height: 1; }
.blob.is-poured { animation: pop .4s ease; }

.fill-basket { min-width: 170px; max-width: 230px; min-height: 100px; display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: 2px; padding: 8px; border: 4px solid #c58b4e; border-top-width: 9px; border-radius: 10px 10px 42px 42px; background: repeating-linear-gradient(45deg, #f6e2c3 0 8px, #efd3a8 8px 16px); font-size: 1.7rem; line-height: 1; }
.toy-row { max-width: 330px; margin: 0 auto; gap: 6px !important; }
.toy { width: 48px; height: 48px; display: grid; place-items: center; border: 2px dashed transparent; border-radius: 50%; font-size: 2rem; line-height: 1; }
.toy.is-away { border-color: #b9b5a4; }
.toy.is-away > span { animation: fly-away .6s ease-in forwards; }

.round-area .spot-small { flex: 0 0 auto; display: grid; gap: 4px; padding: 8px; border: 2px solid var(--line); border-radius: 16px; background: #fff; font-size: 1.5rem; line-height: 1; }
.round-area .spot-big { display: grid; gap: 8px; justify-content: center; }
.spot-small.cols-2 { grid-template-columns: repeat(2, 34px); }
.spot-small.cols-3 { grid-template-columns: repeat(3, 34px); }
.spot-big.cols-2 { grid-template-columns: repeat(2, 86px); }
.spot-big.cols-3 { grid-template-columns: repeat(3, 86px); }
.spot-small span { display: grid; place-items: center; height: 34px; }

.round-area .breath { flex-direction: column; gap: 2px; }
.breath-ring { width: 150px; height: 150px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fde3ee 0 55%, #f9c9dc 56% 100%); transform: scale(.55); transition: transform 2.6s ease-in-out; }
.breath-ring.is-in { transform: scale(1); }
.breath-ring.is-out { transition-duration: 3s; }
/* The breaths are over: the flower makes room for the faces. */
.breath-ring.is-done { width: 84px; height: 84px; transform: none; transition: none; }
.breath-ring.is-done .breath-flower { font-size: 2.4rem; }
.breath-flower { font-size: 3.4rem; line-height: 1; }
.breath-cue { min-height: 40px; font-size: 1.9rem; line-height: 1.2; }

.round-area .turn-board { flex-wrap: nowrap; gap: 6px; }
.turn-player { padding: 4px; border-radius: 50%; font-size: 3rem; line-height: 1; }
.turn-lane { position: relative; flex: 1 1 auto; max-width: 250px; height: 98px; border-bottom: 6px solid #cfeacb; }
.turn-ball { position: absolute; left: 0; bottom: 6px; width: 78px; height: 78px; padding: 0; border: 3px solid #e2e4dc; border-radius: 50%; background: #fff; font-size: 2.5rem; line-height: 1; box-shadow: 0 4px 0 #dcdccf; transition: left .7s ease; }
.turn-ball.is-mine { left: calc(100% - 78px); }
.turn-ball.is-friends:not(.is-right) { animation: bob 1s ease-in-out infinite; }

/* Classroom mode: large enough to read from the back of a room. */
.is-classroom .page { width: min(1500px, 100% - 24px); }
.is-classroom .game { max-width: none; }

/* Printable sheets */
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 0 auto 18px; max-width: 800px; box-shadow: var(--shadow); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 3px solid #dff0e3; margin-bottom: 12px; }
.sheet-head img { width: 64px; flex: none; }
.sheet-head h1 { font-size: 1.5rem; margin: 0; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.sheet h2 { font-size: 1.05rem; margin: 14px 0 6px; }
.sheet table { font-size: .9rem; }
.sheet th, .sheet td { padding: 6px 6px; }
.sheet .area-row td { background: #f4f8f1; font-weight: 800; }
.smiley-row { display: flex; flex-wrap: wrap; gap: 8px; }
.smiley { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.smiley.is-picked { border-color: var(--green-deep); background: #e3f4e8; }
.smiley input { width: 18px; height: 18px; accent-color: var(--green-deep); }
.note-box { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-height: 58px; }
.note-box p { margin: 0; color: var(--ink); }
.key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.certificate { text-align: center; border: 8px double var(--yellow); padding: 34px 18px; }
.certificate .big { font-size: 4.4rem; }

@keyframes wobble { 20% { transform: translateX(-8px) rotate(-4deg); } 45% { transform: translateX(7px) rotate(3deg); } 70% { transform: translateX(-4px); } }
@keyframes pulse { to { transform: scale(1.07); } }
@keyframes bob { 50% { transform: translateY(-7px) rotate(2deg); } }
@keyframes float { 50% { transform: translateY(-7px); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes popped { to { transform: scale(1.5); opacity: 0; } }
@keyframes run { 50% { transform: translateY(-14px) scale(1.06); } }
@keyframes fall { to { transform: translateY(112vh) rotate(620deg); opacity: .15; } }
@keyframes pop-in { from { transform: scale(.5); opacity: 0; } }
@keyframes cheer { 40% { transform: translateY(-10px) scale(1.08); } }
@keyframes sparkle { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }
@keyframes flip-in { from { transform: scaleX(.1); } }
@keyframes fly-away { to { transform: translateY(-70px) rotate(25deg) scale(.6); opacity: 0; } }
@keyframes fade-in { from { opacity: .2; } }

@media (min-width: 420px) {
  .pick-grid.avatars { grid-template-columns: repeat(5, 1fr); }
  .sticker-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 700px) {
  .brand-name { display: inline; }
  .topbar { padding: 8px max(18px, calc((100vw - 1140px) / 2)); }
  .page { width: min(1140px, 100% - 40px); margin-top: 24px; }
  .card { padding: 22px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .tile { min-height: 180px; }
  .tile-icon { font-size: 4.2rem; }
  .sticker-grid { grid-template-columns: repeat(8, 1fr); }
  .choice { min-width: 110px; min-height: 110px; }
  .choice svg { width: 84px; height: 84px; }
  .balloon { width: 92px; height: 114px; }
  .chart-box { height: 340px; }
  .nav-links { max-width: none; }
}
@media (min-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* A projector or smart TV: everything grows. */
@media (min-width: 1000px) {
  .is-classroom .prompt { font-size: 3.4rem; }
  .is-classroom .choice { min-width: 170px; min-height: 170px; font-size: 6rem; }
  .is-classroom .choice svg { width: 130px; height: 130px; }
  .is-classroom .star-row { font-size: 3rem; }
  .is-classroom .balloon { width: 130px; height: 160px; }
  .is-classroom .apple { min-width: 110px; min-height: 110px; font-size: 4rem; }
  .is-classroom .basket { min-width: 240px; min-height: 250px; }
  .is-classroom .basket .fruit { font-size: 3rem; max-width: 240px; }
  .is-classroom .bead-line svg { width: 84px; height: 84px; }
  .is-classroom .shadow-box svg { width: 220px; height: 220px; }
  .is-classroom .feedback { font-size: 2rem; }
  .is-classroom .go-pad { min-width: 240px; min-height: 240px; font-size: 7rem; }
  .is-classroom .traffic { width: 120px; }
  .is-classroom .traffic i { width: 96px; height: 96px; }
  .is-classroom .choice.is-group { width: 320px; font-size: 3rem; }
  .is-classroom .scene .picture { font-size: 6rem; }
  .is-classroom .track .place { width: 96px; height: 96px; font-size: 3.2rem; }
  .is-classroom .track .place svg { width: 70px; height: 70px; }
  .is-classroom .card-grid { grid-template-columns: repeat(4, 150px); }
  .is-classroom .flip-card { height: 150px; font-size: 5rem; }
  .is-classroom .sound-pad { min-width: 200px; min-height: 200px; font-size: 6rem; }
  .is-classroom .sort-item { font-size: 7rem; }
  .is-classroom .sort-item svg { width: 140px; height: 140px; }
  .is-classroom .choice.bin { max-width: 300px; min-height: 220px; }
  .is-classroom .build-board svg { width: 360px; }
  .is-classroom .paint-scene svg { width: 620px; }
  .is-classroom .blob { width: 120px; height: 120px; }
  .is-classroom .toy { width: 90px; height: 90px; font-size: 4rem; }
  .is-classroom .toy-row { max-width: 700px; }
  .is-classroom .spot-small { font-size: 2.6rem; grid-template-columns: repeat(3, 60px); }
  .is-classroom .spot-small span { height: 60px; }
  .is-classroom .spot-big { grid-template-columns: repeat(3, 170px); }
  .is-classroom .breath-ring { width: 260px; height: 260px; }
  .is-classroom .fork-thing, .is-classroom .walker { font-size: 6rem; }
  .is-classroom .fork-side { max-width: 320px; min-height: 240px; }
  .is-classroom .walker.goes-left { transform: translateX(-160px); }
  .is-classroom .walker.goes-right { transform: translateX(160px); }
  .is-classroom .spot { transform: scale(1.8); }
}
.game:fullscreen { background: var(--cream); padding: 16px; overflow-y: auto; }
body.role-student.is-game .topbar { display: none; }
@media (max-width: 699px) {
  body.role-teacher .topbar, body.role-admin .topbar { flex-wrap: wrap; }
  /* Brand, language and sign-out share the first row; the page links get a second row that scrolls sideways inside itself. */
  body.role-teacher .nav, body.role-admin .nav { display: contents; }
  body.role-teacher .brand, body.role-admin .brand { margin-right: auto; }
  body.role-teacher .nav-links, body.role-admin .nav-links { order: 3; flex: 0 0 100%; min-width: 0; max-width: 100%; padding-bottom: 2px; }
}
/* A phone on its side: keep the whole round on one screen. */
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { position: static; min-height: 48px; }
  .icon-btn { height: 48px; min-width: 48px; font-size: 1.3rem; }
  .page { margin-top: 8px; }
  .stage { min-height: 0; padding: 8px; gap: 6px; }
  .round-area { min-height: 110px; }
  .choice { min-width: 70px; min-height: 70px; font-size: 2.2rem; }
  .choice svg { width: 50px; height: 50px; }
  .choice.is-group { width: 132px; }
  .balloon { width: 60px; height: 74px; margin-bottom: 18px; }
  .game-bar { margin-bottom: 4px; }
  .prompt { font-size: 1.15rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .feedback { min-height: 22px; font-size: 1rem; }
  .scene .picture { font-size: 2.1rem; }
  .shadow-box svg { width: 84px; height: 84px; }
  .bead-line { padding: 4px 10px; }
  .bead-line svg { width: 34px; height: 34px; }
  .bead-line .gap { width: 36px; height: 36px; }
  .basket { min-height: 104px; }
  .go-pad { min-width: 96px; min-height: 96px; font-size: 2.6rem; }
  .traffic i { width: 40px; height: 40px; }
  .traffic { width: 60px; }
  /* The picture and the choices of a round sit side by side. */
  .round-area .part { flex: 1 1 40%; gap: 6px; }
  .round-area .spot-small, .round-area .garden-row { flex: 0 0 auto; }
  .track { padding: 22px 6px 10px; }
  .track .place { width: 40px; height: 40px; font-size: 1.3rem; }
  .card-grid.cols-2, .card-grid.cols-3 { grid-template-columns: repeat(3, 66px); }
  .card-grid.cols-4 { grid-template-columns: repeat(4, 66px); }
  .flip-card { height: 66px; font-size: 2rem; }
  .sound-pad { min-width: 84px; min-height: 84px; font-size: 2.4rem; }
  .drum-pad { min-width: 78px; min-height: 78px; }
  .fork-side { min-height: 92px; }
  .fork-thing, .walker { font-size: 2.2rem; }
  .sort-item { min-height: 54px; font-size: 2.8rem; }
  .sort-item svg { width: 54px; height: 54px; }
  .choice.bin { min-height: 88px; }
  .bin-label { font-size: 1.8rem; }
  .build-board svg { width: 140px; }
  .paint-scene svg { width: 230px; }
  .blob { width: 46px; height: 46px; }
  .blob.is-pot { width: 56px; height: 56px; }
  .fill-basket { min-width: 130px; min-height: 72px; font-size: 1.3rem; }
  .apple { min-width: 64px; min-height: 64px; font-size: 2rem; }
  .toy { width: 40px; height: 40px; font-size: 1.6rem; }
  .spot-big.cols-2 { grid-template-columns: repeat(2, 70px); }
  .spot-big.cols-3 { grid-template-columns: repeat(3, 70px); }
  .breath-ring { width: 104px; height: 104px; }
  .breath-flower { font-size: 2.4rem; }
  .breath-cue { min-height: 30px; font-size: 1.4rem; }
  .turn-lane { height: 84px; }
  .turn-ball { width: 68px; height: 68px; font-size: 2.1rem; }
  .turn-ball.is-mine { left: calc(100% - 68px); }
  .turn-player { font-size: 2.3rem; }
  .choice.is-group { font-size: 1.2rem; }
  /* The help button moves to the corner so it does not push the choices down. */
  #hint-button { position: absolute; right: 8px; bottom: 8px; }
  .child-hero img { width: 56px; }
  .tile { min-height: 120px; }
  .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body, body.role-student { background: #fff !important; }
  .topbar, .site-footer, .no-print, .notice { display: none !important; }
  .only-print { display: block; }
  .page { width: 100%; margin: 0; }
  .sheet { border: 0; box-shadow: none; padding: 0; max-width: none; margin: 0; break-after: page; }
  .sheet:last-child { break-after: auto; }
  .sheet table { font-size: 9.5pt; }
  .level-beginner, .level-progressing, .level-proficient, .bar, .sheet .area-row td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
