:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}
/* Layout: the existing Mr Wagemans bands (yellow → charcoal → sky blue → white → yellow), tidied with wave edges, one content width and the dancing stick men as the only decoration. Deliberately single-theme: brand colours. */
:root {
  --yellow: #f7c849;
  --yellow-deep: #eab52a;
  --sky: #80c0f3;
  --sky-soft: #d6ebfc;
  --charcoal: #404040;
  --ink: #262626;
  --ink-soft: #555b61;
  --white: #ffffff;
  --blue: #0057e1;
  --blue-dark: #0046b5;
  --line: #e4e6e8;
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fig: url("/assets/img-8607156902.webp");
  --radius: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before { animation: none !important; transition: none !important; } }
body { background: var(--white); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.eyebrow { font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1rem; padding: 13px 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; font-family: var(--body); transition: transform .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-dark { background: var(--charcoal); color: var(--white); }
.btn-dark:hover { background: var(--ink); }
.btn-line { border-color: var(--charcoal); color: var(--charcoal); background: transparent; }
.btn-line:hover { background: rgba(255,255,255,.4); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--yellow); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--yellow); border-bottom: 1px solid rgba(64,64,64,.12); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 48px; height: 48px; border-radius: 50%; background: var(--white); object-fit: cover; object-position: center 30%; border: 2px solid var(--charcoal); }
.brand span { font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--charcoal); letter-spacing: -.02em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a.link { text-decoration: none; font-weight: 700; color: var(--charcoal); padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.nav a.link:hover { background: rgba(255,255,255,.5); }
.nav .btn { padding: 9px 16px; font-size: .92rem; margin-left: 6px; }
.menu-btn { display: none; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: .95rem; color: var(--charcoal); background: rgba(255,255,255,.55); border: 0; border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }
.mobile-menu { background: var(--yellow); border-top: 1px solid rgba(64,64,64,.12); }
.top .mobile-menu .wrap { display: grid; justify-content: stretch; gap: 0; padding-block: 8px 14px; }
.brand span { white-space: nowrap; }
@media (max-width: 480px) { .menu-btn .lbl { display: none; } .menu-btn { padding: 9px 11px; } .brand span { font-size: 1.15rem; } .brand img { width: 42px; height: 42px; } .nav .btn { padding: 9px 13px; margin-left: 2px; } }
.mobile-menu a { text-decoration: none; font-weight: 700; color: var(--charcoal); padding: 12px 4px; border-bottom: 1px solid rgba(64,64,64,.12); }
.mobile-menu a:last-child { border-bottom: 0; }
@media (max-width: 1040px) { .nav a.link { display: none; } .menu-btn { display: inline-flex; } }
@media (min-width: 1041px) { .mobile-menu { display: none !important; } }

/* Hero */
.hero { background: var(--yellow); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding-block: 56px 24px; }
.hero .eyebrow { color: var(--charcoal); opacity: .8; }
.hero h1 { font-size: clamp(2.5rem, 6.5vw, 4.4rem); color: var(--charcoal); margin-top: 12px; }
.hero h1 em { font-style: normal; color: var(--white); -webkit-text-stroke: 2px var(--charcoal); paint-order: stroke fill; }
.hero .lede { margin-top: 18px; font-size: 1.2rem; color: var(--ink); max-width: 36ch; }
.hero .ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.ticks { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 700; color: var(--charcoal); font-size: .95rem; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--charcoal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23f7c849' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.stage { position: relative; aspect-ratio: 1; max-width: 360px; width: 100%; justify-self: center; }
.stage .face { position: absolute; inset: 12%; border-radius: 50%; background: var(--sky); border: 4px solid var(--charcoal); overflow: hidden; }
.stage .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fig { display: block; background: var(--fig) center/contain no-repeat; aspect-ratio: 142/170; }
.stage .fig { position: absolute; width: 22%; }
.stage .f1 { left: -2%; top: 4%; transform: rotate(-8deg); }
.stage .f2 { right: -4%; top: 30%; transform: scaleX(-1) rotate(-6deg); width: 18%; }
.stage .f3 { left: 6%; bottom: -2%; width: 17%; transform: scaleX(-1); }
@keyframes bop { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.stage .fig { animation: bop 1.6s ease-in-out infinite; }
.stage .f2 { animation-delay: .4s; } .stage .f3 { animation-delay: .8s; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 36px 16px; }
  .stage { max-width: 260px; }
}

/* Wave edges between bands */
.wave { display: block; width: 100%; height: 48px; }
.wave path { fill: currentColor; }
.to-charcoal { color: var(--charcoal); background: var(--yellow); }
.to-sky { color: var(--sky); background: var(--charcoal); }
.to-white { color: var(--white); background: var(--sky); }
.to-soft { color: var(--sky-soft); background: var(--white); }
.to-yellow { color: var(--yellow); background: var(--sky-soft); }

/* About */
.about { background: var(--charcoal); color: var(--white); }
.about .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-block: 40px 56px; }
.about .eyebrow { color: var(--yellow); }
.about h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin-top: 10px; }
.about p { margin-top: 16px; color: #e6e6e6; max-width: 52ch; font-size: 1.1rem; }
.promises { display: grid; gap: 14px; align-content: center; }
.promise { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 18px; }
.promise .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--yellow); display: grid; place-items: center; color: var(--charcoal); }
.promise .ic svg { width: 24px; height: 24px; }
.promise h3 { font-size: 1.15rem; letter-spacing: -.01em; }
.promise p { margin-top: 4px; font-size: .98rem; color: #d3d3d3; }
@media (max-width: 820px) { .about .wrap { grid-template-columns: 1fr; gap: 28px; } }

/* Section heads */
.head { display: grid; gap: 10px; max-width: 62ch; margin-bottom: 32px; }
.head h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); color: var(--charcoal); }
.head p { color: var(--ink); font-size: 1.1rem; }

/* Brain breaks */
.breaks { background: var(--sky); }
.breaks .wrap { padding-block: 40px 56px; }
.breaks .eyebrow { color: var(--blue-dark); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { min-width: 0; background: var(--white); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 2px 0 rgba(0,0,0,.06); }
.pill { align-self: flex-start; font-weight: 700; font-size: .82rem; padding: 4px 12px; border-radius: 999px; background: var(--sky-soft); color: var(--blue-dark); }
.card h3 { font-size: 1.55rem; color: var(--charcoal); }
.card p { color: var(--ink-soft); flex: 1; }
.card .btn { align-self: flex-start; padding: 10px 18px; font-size: .95rem; }

/* PE + resources */
.more .wrap { padding-block: 40px 56px; display: grid; gap: 56px; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.split .eyebrow { color: var(--blue); }
.split .head { margin: 0; }
.feature { background: var(--charcoal); color: var(--white); border-radius: var(--radius); padding: 30px; display: grid; gap: 14px; position: relative; overflow: hidden; }
.feature h3 { font-size: 1.8rem; color: var(--yellow); }
.feature p { color: #e0e0e0; max-width: 46ch; }
.feature .btn { justify-self: start; }
.feature .fig { position: absolute; width: 74px; right: 22px; bottom: 18px; filter: invert(1); opacity: .9; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.res { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .res { grid-template-columns: 1fr; } }
.resources { background: var(--sky-soft); }
.resources .wrap { padding-block: 40px 56px; }
.res .card { box-shadow: 0 2px 0 rgba(0,0,0,.06); }
.res .pill { background: var(--yellow); color: var(--charcoal); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: .85rem; padding: 3px 10px; border-radius: 999px; background: #f3f4f5; color: var(--ink); }
.soon { align-self: flex-start; font-weight: 700; font-size: .92rem; padding: 9px 16px; border-radius: 999px; border: 2px dashed #c9cdd1; color: var(--ink-soft); }

/* Share band */
.share { background: var(--yellow); }
.share .wrap { padding-block: 40px 0; text-align: center; display: grid; justify-items: center; gap: 14px; }
.share h2 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--charcoal); }
.share p { max-width: 54ch; font-size: 1.1rem; }
.share .ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.linkbox { display: flex; align-items: center; gap: 8px; background: var(--white); border: 2px solid var(--charcoal); border-radius: 999px; padding: 6px 6px 6px 18px; max-width: 100%; margin-top: 6px; }
.linkbox code { font-family: var(--body); font-weight: 700; font-size: .95rem; color: var(--charcoal); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; user-select: all; }
.linkbox .btn { padding: 8px 16px; font-size: .9rem; flex: none; }
.dancefloor { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; width: 100%; margin-top: 28px; padding-inline: 4%; }
.dancefloor .fig { width: clamp(28px, 5vw, 52px); }
.dancefloor .fig:nth-child(2n) { transform: scaleX(-1); }
.dancefloor .fig:nth-child(3n) { width: clamp(24px, 4vw, 42px); }
.dancefloor .fig:nth-child(n+6) { display: none; }
@media (min-width: 640px) { .dancefloor .fig:nth-child(n+6) { display: block; } }


/* Home teaser for printables */
.teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.teaser .head { margin: 0; }
.peek { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.peek li { background: var(--white); border-radius: var(--radius); padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: 0 2px 0 rgba(0,0,0,.06); }
.peek-t { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--charcoal); letter-spacing: -.01em; }
.tag { font-weight: 700; font-size: .82rem; padding: 4px 12px; border-radius: 999px; background: #eef0f2; color: var(--ink-soft); }
.tag.ok { background: var(--yellow); color: var(--charcoal); }
.tag-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 7px 14px; font-size: .88rem; border: 2px solid var(--charcoal); transition: transform .15s ease, background-color .15s ease; }
.tag-btn:hover { transform: translateY(-2px); background: var(--charcoal); color: var(--yellow); }
.tag-btn svg { width: 16px; height: 16px; }
@media (max-width: 820px) { .teaser { grid-template-columns: 1fr; gap: 24px; } }

/* Printables page */
.p-hero { background: var(--sky-soft); }
.p-hero .wrap { padding-block: 32px 40px; display: grid; gap: 10px; }
.p-hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); color: var(--charcoal); }
.p-hero .lede { font-size: 1.15rem; max-width: 52ch; }
.back { justify-self: start; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; color: var(--charcoal); padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--white); margin-bottom: 14px; }
.back:hover { background: var(--yellow); }
.back svg { width: 18px; height: 18px; }
.p-list .wrap { padding-block: 40px 64px; display: grid; gap: 40px; }
.p-list .res .card { border: 1px solid var(--line); box-shadow: none; }
.p-list .res .pill { background: var(--yellow); color: var(--charcoal); }
.p-cta { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; background: var(--yellow); border-radius: var(--radius); padding: 24px 28px; }
.p-cta .fig { width: 52px; }
.p-cta h2 { font-size: 1.5rem; color: var(--charcoal); }
.p-cta p { margin-top: 4px; }
@media (max-width: 700px) { .p-cta { grid-template-columns: 1fr; justify-items: start; } }


/* Printables: filters */
.p-tools { display: grid; gap: 16px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 4px 18px; max-width: 460px; }
.search:focus-within { border-color: var(--blue); }
.search svg { width: 20px; height: 20px; color: var(--ink-soft); flex: none; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 9px 0; width: 100%; min-width: 0; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cat { font: inherit; font-weight: 700; font-size: .95rem; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--charcoal); background: var(--white); color: var(--charcoal); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.cat:hover { background: var(--sky-soft); }
.cat[aria-pressed="true"] { background: var(--charcoal); color: var(--white); }
.cat .n { font-size: .8rem; font-variant-numeric: tabular-nums; opacity: .7; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card-type { font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.empty { text-align: center; color: var(--ink-soft); padding: 24px; border: 2px dashed var(--line); border-radius: var(--radius); }


/* Work with me */
.standards { display: grid; gap: 14px; }
.standards h2 { font-size: 1.6rem; color: var(--charcoal); }
.standards .ticks { margin: 0; }
.contact { background: var(--charcoal); color: var(--white); border-radius: var(--radius); padding: 30px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.contact h2 { font-size: 1.8rem; color: var(--yellow); }
.contact p { margin-top: 6px; color: #e0e0e0; max-width: 46ch; }
.contact-actions { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.contact .linkbox { border-color: var(--yellow); margin: 0; }
.contact .linkbox { min-width: 0; }
@media (max-width: 480px) { .contact .linkbox { flex-wrap: wrap; border-radius: 18px; padding: 10px 12px 10px 16px; } .contact .linkbox code { flex: 1 1 100%; white-space: normal; overflow: visible; } }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.foot-link { color: #cfcfcf; font-weight: 700; font-size: .92rem; }


/* Classroom tools list */
.tool-card { text-decoration: none; color: inherit; border: 1px solid var(--line); box-shadow: none; transition: transform .15s ease, box-shadow .15s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(0,0,0,.06); }
.tool-card .btn { align-self: flex-start; }
.mini-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-bottom: 4px; }
.mini-grid span { aspect-ratio: 1; display: grid; place-items: center; font-size: .62rem; font-weight: 700; background: #f3f4f5; border-radius: 4px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.mini-grid .y { background: var(--yellow); color: var(--charcoal); }
.mini-grid .b { background: var(--blue); color: var(--white); }
.soon-card { background: var(--sky-soft); border: 0; box-shadow: none; position: relative; }
.soon-card .fig { width: 46px; }

/* Paint the Squares */
.tool-head { background: var(--sky-soft); }
.tool-head .wrap { padding-block: 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tool-head .back { margin: 0; }
.tool-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--charcoal); }
.tool-body .wrap { padding-block: 24px 56px; }
.pts { display: grid; gap: 14px; background: var(--white); }
.pts-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.seg { display: inline-flex; flex-wrap: wrap; background: #f0f2f4; border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 700; font-size: .95rem; border: 0; border-radius: 999px; padding: 9px 16px; background: transparent; color: var(--charcoal); cursor: pointer; }
.seg button svg { width: 18px; height: 18px; }
.seg button[aria-pressed="true"] { background: var(--charcoal); color: var(--white); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--white); box-shadow: 0 0 0 2px #d5d9dd; cursor: pointer; padding: 0; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--charcoal); transform: scale(1.08); }
.field { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; color: var(--ink-soft); }
.field select, .field input { font: inherit; font-weight: 700; color: var(--charcoal); border: 2px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--white); }
.field input { width: 6.5em; }
.field select:focus, .field input:focus { border-color: var(--blue); outline: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.act { font: inherit; font-weight: 700; font-size: .92rem; border: 2px solid var(--charcoal); background: var(--white); color: var(--charcoal); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.act:hover { background: var(--yellow); }
.count { margin-left: auto; font-weight: 700; color: var(--ink-soft); background: var(--yellow); color: var(--charcoal); border-radius: 999px; padding: 8px 16px; font-variant-numeric: tabular-nums; }
.count b { font-size: 1.15rem; }
.pts-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; touch-action: none; user-select: none; -webkit-user-select: none; font-size: clamp(.85rem, 2.6vw, 1.7rem); }
.sq { aspect-ratio: 1; min-width: 0; border: 2px solid #dde1e5; border-radius: 10px; background: var(--white); color: var(--charcoal); font: inherit; font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; display: grid; place-items: center; transition: background-color .12s ease, transform .12s ease; line-height: 1; overflow: hidden; }
.sq:hover { border-color: var(--charcoal); }
.sq.painted { border-color: transparent; }
.sq.hid span { visibility: hidden; }
.sq.hid { background-image: repeating-linear-gradient(45deg, rgba(64,64,64,.06) 0 6px, transparent 6px 12px); }
.sq.pop { transform: scale(.92); }
.pts-tip { color: var(--ink-soft); font-size: .95rem; }
.full-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 1rem; border: 0; border-radius: 999px; padding: 11px 20px; background: var(--blue); color: var(--white); cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.full-btn:hover { background: var(--blue-dark); transform: translateY(-2px); }
.full-btn svg { width: 20px; height: 20px; }
.sound-btn { display: inline-flex; align-items: center; gap: 6px; }
.sound-btn svg { width: 18px; height: 18px; }
.sound-btn .wave-off { display: none; }
.sound-btn[aria-pressed="false"] .wave-on { display: none; }
.sound-btn[aria-pressed="false"] .wave-off { display: inline; }
.pts.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; align-content: start; }
.pts.is-full .pts-grid { width: min(100%, calc((100vh - 230px) * var(--ratio, 1))); margin: 0 auto; font-size: min(3.2vh, 2.4vw); }
.pts.is-full .pts-tip { display: none; }
@media (max-width: 600px) { .full-btn { margin-left: 0; } .pts.is-full .pts-grid, .pts:fullscreen .pts-grid { width: 100%; font-size: clamp(.85rem, 3.4vw, 1.4rem); } }
.pts:fullscreen { padding: 20px 28px; overflow: auto; align-content: start; }
.pts:fullscreen .pts-grid { width: min(100%, calc((100vh - 230px) * var(--ratio, 1))); margin: 0 auto; font-size: min(3.2vh, 2.4vw); }
.pts:fullscreen .pts-tip { display: none; }
@media (max-width: 600px) { .pts-grid { gap: 3px; } .sq { border-radius: 6px; border-width: 1px; } .count { margin-left: 0; } }


/* Rekenrek */
.tools-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
#classroom-tools .p-list .wrap { gap: 28px; }
.tool-card .mini-grid, .tool-card .mini-rek { height: 110px; align-content: center; }
.tool-card .mini-timer { height: 110px; width: 110px; }
.tools-grid .empty { grid-column: 1 / -1; margin: 0; }
.mini-rek { display: grid; gap: 8px; background: var(--charcoal); border-radius: 12px; padding: 12px 10px; margin-bottom: 4px; }
.mini-rek div { display: flex; align-items: center; gap: 2px; position: relative; }
.mini-rek div::before { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 2px; background: #c9ced3; }
.mini-rek i { position: relative; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.mini-rek .r { background: radial-gradient(circle at 38% 32%, #ff7b7b, #c4161c); }
.mini-rek .w { background: radial-gradient(circle at 38% 32%, #ffffff, #cfd4d9); }
.mini-rek b { flex: 1; }
.rk { display: grid; gap: 14px; background: var(--white); --u: 48px; }
.rk-stage { position: relative; justify-self: center; max-width: 100%; }
.rk-frame { background: var(--charcoal); border-radius: calc(var(--u) * .45); padding: calc(var(--u) * .5) calc(var(--u) * .55); display: grid; gap: calc(var(--u) * .24); box-shadow: 0 8px 0 rgba(0,0,0,.08); }
.rk-row { display: flex; align-items: center; gap: calc(var(--u) * .35); }
.rk-row.split { margin-top: calc(var(--u) * .3); }
.rk-track { position: relative; width: calc(var(--u) * 20); height: var(--u); flex: none; }
.rk-track::before { content: ""; position: absolute; left: calc(var(--u) * -.25); right: calc(var(--u) * -.25); top: 50%; height: max(3px, calc(var(--u) * .09)); transform: translateY(-50%); background: linear-gradient(#e3e6e9, #a9b0b6); border-radius: 3px; }
.rk-bead { position: absolute; left: 0; top: 0; width: var(--u); height: var(--u); border-radius: 50%; padding: 0; border: 0; cursor: grab; touch-action: none; --c1: #ff6b6b; --c2: #c4161c;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.75) 0 14%, rgba(255,255,255,0) 15%), radial-gradient(circle at 45% 40%, var(--c1), var(--c2) 75%);
  box-shadow: inset 0 calc(var(--u) * -.08) calc(var(--u) * .14) rgba(0,0,0,.25), 0 2px 3px rgba(0,0,0,.3); will-change: transform; }
.rk-bead.w { --c1: #ffffff; --c2: #c3c9cf; }
.rk-bead.b { --c1: #4d8fff; --c2: #0046b5; }
.rk-bead:active { cursor: grabbing; }
.rk-row.anim .rk-bead { transition: transform .28s cubic-bezier(.3, .8, .3, 1); }
.rk-n { min-width: calc(var(--u) * 1.1); text-align: center; font-family: var(--display); font-weight: 800; font-size: calc(var(--u) * .62); color: var(--yellow); font-variant-numeric: tabular-nums; }
.rk.no-nums .rk-n { visibility: hidden; }
.rk.no-nums .rk-total b { visibility: hidden; }
.rk-cover { position: absolute; inset: 0; border-radius: calc(var(--u) * .45); background: repeating-linear-gradient(45deg, var(--sky) 0 18px, #9ccef6 18px 36px); display: grid; place-items: center; }
.rk-cover span { font-family: var(--display); font-weight: 800; font-size: calc(var(--u) * 2.2); color: var(--white); -webkit-text-stroke: 3px var(--charcoal); paint-order: stroke fill; }
.rk.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; align-content: start; }
.rk:fullscreen { padding: 20px 28px; overflow: auto; align-content: start; }
.rk.is-full .pts-tip, .rk:fullscreen .pts-tip { display: none; }
.rk.is-full, .rk:fullscreen { grid-template-rows: auto auto 1fr; align-content: stretch; }
.rk.is-full .rk-stage, .rk:fullscreen .rk-stage { align-self: start; justify-self: center; }

/* Ten frame */
.mini-tf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; width: 190px; height: auto !important; background: var(--charcoal); border-radius: 12px; padding: 8px; margin-bottom: 4px; align-self: flex-start; }
.mini-tf i { aspect-ratio: 1; background: #fff; border-radius: 5px; display: grid; place-items: center; }
.mini-tf i::after { content: ""; width: 72%; height: 72%; border-radius: 50%; }
.mini-tf i.r::after { background: radial-gradient(circle at 38% 32%, #ff7b7b, #c4161c); }
.mini-tf i.y::after { background: radial-gradient(circle at 38% 32%, #ffe28a, #e0a800); }
.tf { display: grid; gap: 14px; background: var(--white); --cell: 110px; }
.tf-stage { position: relative; justify-self: center; max-width: 100%; }
.tf-frame { display: grid; grid-template-columns: repeat(5, var(--cell)); grid-template-rows: repeat(2, var(--cell)); gap: calc(var(--cell) * .07); padding: calc(var(--cell) * .09); background: var(--charcoal); border-radius: calc(var(--cell) * .16); box-shadow: 0 8px 0 rgba(0,0,0,.08); }
.tf-cell { position: relative; padding: 0; border: 0; background: var(--white); border-radius: calc(var(--cell) * .1); cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.tf-cell:hover { background: #fff8e1; }
.tf-cell:focus-visible { outline: 4px solid var(--sky); outline-offset: 2px; }
.tf-cell::after { content: ""; width: 74%; height: 74%; border-radius: 50%; transform: scale(0); transition: transform .22s cubic-bezier(.3, 1.5, .5, 1); --c1: #ff6b6b; --c2: #c4161c;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.7) 0 13%, rgba(255,255,255,0) 14%), radial-gradient(circle at 45% 40%, var(--c1), var(--c2) 75%);
  box-shadow: inset 0 calc(var(--cell) * -.05) calc(var(--cell) * .09) rgba(0,0,0,.22), 0 2px 4px rgba(0,0,0,.25); }
.tf-cell.y::after { --c1: #ffe28a; --c2: #e0a800; }
.tf-cell.on::after { transform: scale(1); }
.tf-sum { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-left: auto; }
.tf-sum .count { margin-left: 0; }
.tf-sum .count.red { background: #fde0e1; }
.tf-sum .count.ten { background: #e3f1fd; }
.tf.no-nums .tf-sum b { visibility: hidden; }
.tf-cover { position: absolute; inset: 0; border-radius: calc(var(--cell) * .16); background: repeating-linear-gradient(45deg, var(--sky) 0 18px, #9ccef6 18px 36px); display: grid; place-items: center; }
.tf-cover span { font-family: var(--display); font-weight: 800; font-size: calc(var(--cell) * 1.1); color: var(--white); -webkit-text-stroke: 3px var(--charcoal); paint-order: stroke fill; }
.tf.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; }
.tf:fullscreen { padding: 20px 28px; overflow: auto; }
.tf.is-full, .tf:fullscreen { grid-template-rows: auto auto 1fr; align-content: stretch; }
.tf.is-full .pts-tip, .tf:fullscreen .pts-tip { display: none; }
.tf.is-full .tf-stage, .tf:fullscreen .tf-stage { align-self: center; }
@media (max-width: 600px) { .tf-sum { margin-left: 0; } }

/* Dice frame */
.mini-hd { display: flex; gap: 6px; background: var(--charcoal); border-radius: 12px; padding: 7px; margin-bottom: 4px; align-self: flex-start; height: auto !important; }
.mini-hd i { width: 84px; height: 84px; background: #fff; border-radius: 9px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 8px; }
.mini-hd b { border-radius: 50%; margin: 3px; }
.mini-hd b.r { background: radial-gradient(circle at 38% 32%, #ff7b7b, #c4161c); }
.mini-hd b.y { background: radial-gradient(circle at 38% 32%, #ffe28a, #e0a800); }
.hd { display: grid; gap: 14px; background: var(--white); --die: 200px; }
.hd-stage { position: relative; justify-self: center; max-width: 100%; display: grid; gap: calc(var(--die) * .1); }
.hd-frame { display: grid; grid-template-columns: repeat(2, var(--die)); gap: calc(var(--die) * .05); padding: calc(var(--die) * .05); background: var(--charcoal); border-radius: calc(var(--die) * .1); box-shadow: 0 8px 0 rgba(0,0,0,.08); }
.hd-die { position: relative; width: var(--die); height: var(--die); padding: calc(var(--die) * .07); border: 0; background: var(--white); border-radius: calc(var(--die) * .08); cursor: pointer; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); touch-action: manipulation; font: inherit; }
.hd-die:hover { background: #fff8e1; }
.hd-die:focus-visible { outline: 4px solid var(--sky); outline-offset: 2px; }
.hd-dot { display: grid; place-items: center; }
.hd-dot::after { content: ""; width: 82%; height: 82%; border-radius: 50%; transform: scale(0); transition: transform .22s cubic-bezier(.3, 1.5, .5, 1); --c1: #ff6b6b; --c2: #c4161c;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.7) 0 13%, rgba(255,255,255,0) 14%), radial-gradient(circle at 45% 40%, var(--c1), var(--c2) 75%);
  box-shadow: inset 0 calc(var(--die) * -.018) calc(var(--die) * .03) rgba(0,0,0,.22), 0 2px 4px rgba(0,0,0,.25); }
.hd-die.y .hd-dot::after { --c1: #ffe28a; --c2: #e0a800; }
.hd-dot.on::after { transform: scale(1); }
.hd-sum { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-left: auto; }
.hd-sum .count { margin-left: 0; }
.hd-sum .count.red { background: #fde0e1; }
.hd-sum .count.ten { background: #e3f1fd; }
.hd.no-nums .hd-sum b { visibility: hidden; }
.hd-cover { position: absolute; inset: 0; border-radius: calc(var(--die) * .1); background: repeating-linear-gradient(45deg, var(--sky) 0 18px, #9ccef6 18px 36px); display: grid; place-items: center; }
.hd-cover span { font-family: var(--display); font-weight: 800; font-size: calc(var(--die) * .8); color: var(--white); -webkit-text-stroke: 3px var(--charcoal); paint-order: stroke fill; }
.hd.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; }
.hd:fullscreen { padding: 20px 28px; overflow: auto; }
.hd.is-full, .hd:fullscreen { grid-template-rows: auto auto 1fr; align-content: stretch; }
.hd.is-full .pts-tip, .hd:fullscreen .pts-tip { display: none; }
.hd.is-full .hd-stage, .hd:fullscreen .hd-stage { align-self: center; }
@media (max-width: 600px) { .hd-sum { margin-left: 0; } }
.hd-mode-btn[aria-pressed="true"] { background: var(--yellow); }
.hd.match .hd-norm, .hd.match .hd-sumbar { display: none; }
.hd-match { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }
.hd-target { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--charcoal); }
.hd-target b { display: grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .2em; font-size: 2.4em; line-height: 1; background: var(--yellow); border: 3px solid var(--charcoal); border-radius: 18px; transition: background-color .2s ease; }
.hd.done .hd-target b { background: #7cc36b; }
.hd-status { min-height: 1.5em; font-weight: 700; font-size: 1.1rem; color: var(--charcoal); }
.hd-next { font-size: 1.05rem; padding: 11px 22px; background: var(--blue); color: var(--white); border-color: var(--blue); }
.hd-next:hover { background: var(--blue-dark, #0046b5); }
.hd.done .hd-next { animation: hd-nudge 1s ease-in-out infinite; }
@keyframes hd-nudge { 50% { transform: scale(1.08); } }
.hd-tray { justify-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--die) * .05); max-width: calc(var(--die) * 2.3); min-height: calc(var(--die) * .3); padding: calc(var(--die) * .05) calc(var(--die) * .07); background: #f2ece0; border: 3px dashed #c9b994; border-radius: 999px; }
.hd-chip, .hd-drag { width: calc(var(--die) * .18); height: calc(var(--die) * .18); border-radius: 50%; border: 0; padding: 0; cursor: grab; touch-action: none;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.7) 0 13%, rgba(255,255,255,0) 14%), radial-gradient(circle at 45% 40%, #ff6b6b, #c4161c 75%); box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.hd-chip:focus-visible { outline: 4px solid var(--sky); outline-offset: 2px; }
.hd-drag { position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, -50%) scale(1.15); cursor: grabbing; box-shadow: 0 8px 14px rgba(0,0,0,.3); }
.hd-tray-empty { align-self: center; font-weight: 700; color: #8a7a55; padding: 0 10px; }
.hd-tick { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; }
.hd-tick svg { width: calc(var(--die) * .9); height: calc(var(--die) * .9); filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); animation: hd-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hd-pop { from { transform: scale(0); } }
.hd-die.over { background: #e6f4e0; }
.hd.is-full .hd-target, .hd:fullscreen .hd-target { font-size: 2.2rem; }

/* Multilink cubes */
.mlc { display: grid; gap: 14px; background: var(--white); --u: 40px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mlc-tray { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #f0f2f4; border-radius: 18px; padding: 10px 12px; }
.mlc-pal { --u: 40px; position: relative; width: 48px; height: 50px; padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; display: grid; place-items: end center; }
.mlc-pal .mlc-cube { position: relative; }
.mlc-pal:hover .mlc-cube, .mlc-pal:focus-visible .mlc-cube { transform: translateY(-3px); }
.mlc-pal:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.mlc-bin { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: .95rem; color: var(--charcoal); background: var(--white); border: 2px dashed #9aa3ab; border-radius: 14px; padding: 8px 14px; min-height: 50px; }
.mlc-bin svg { width: 24px; height: 24px; }
.mlc-bin.hot { background: #fde0e1; border-color: #e5484d; color: #b4232a; }
.mlc-stage { position: relative; height: clamp(360px, 62vh, 560px); background: #f7f9fb; background-image: radial-gradient(#dfe5ea 1.2px, transparent 1.3px); background-size: 22px 22px; border: 2px solid #e3e6e9; border-radius: 18px; overflow: hidden; touch-action: none; }
.mlc-floor { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--u) * .35); background: #e3e6e9; border-top: 2px solid #c9ced3; }
.mlc-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--ink-soft); font-weight: 700; font-size: 1.05rem; pointer-events: none; }
.mlc-cube { position: absolute; width: var(--u); height: var(--u); box-sizing: border-box; background: var(--c); border-radius: calc(var(--u) * .1); cursor: grab; touch-action: none; transition: transform .12s ease;
  box-shadow: inset 0 0 0 max(1px, calc(var(--u) * .05)) rgba(0,0,0,.24), inset calc(var(--u) * .1) calc(var(--u) * .1) 0 rgba(255,255,255,.24), inset calc(var(--u) * -.08) calc(var(--u) * -.08) 0 rgba(0,0,0,.12); }
.mlc-cube::before { content: ""; position: absolute; left: 31%; width: 38%; top: calc(var(--u) * -.15); height: calc(var(--u) * .2); background: var(--c); border-radius: calc(var(--u) * .06) calc(var(--u) * .06) 0 0; box-shadow: inset 0 0 0 max(1px, calc(var(--u) * .045)) rgba(0,0,0,.24); }
.mlc-cube::after { content: ""; position: absolute; left: 33%; top: 33%; width: 34%; height: 34%; border-radius: 50%; background: rgba(0,0,0,.14); box-shadow: inset 0 calc(var(--u) * .04) calc(var(--u) * .05) rgba(0,0,0,.25); }
.mlc-label { position: absolute; width: var(--u); text-align: center; font-family: var(--display); font-weight: 800; font-size: max(13px, calc(var(--u) * .55)); line-height: 1; color: var(--charcoal); pointer-events: none; font-variant-numeric: tabular-nums; }
.mlc-label.on { color: var(--blue); }
.mlc-label.side { text-align: left; width: auto; }
.mlc-cube.h::before { left: auto; right: calc(var(--u) * -.15); top: 31%; width: calc(var(--u) * .2); height: 38%; border-radius: 0 calc(var(--u) * .06) calc(var(--u) * .06) 0; }
.rot-btn { display: inline-flex; align-items: center; gap: 6px; }
.rot-btn svg { width: 18px; height: 18px; }
.act:disabled { opacity: .45; cursor: default; background: var(--white); }
.mlc.no-nums .mlc-label, .mlc.no-nums .mlc-sum b { visibility: hidden; }
.mlc-ghost { position: absolute; width: var(--u); box-sizing: border-box; border: 3px dashed var(--blue); border-radius: calc(var(--u) * .12); background: rgba(0,87,225,.06); pointer-events: none; }
.mlc-ghost.bad { border-color: #e5484d; background: rgba(229,72,77,.08); }
.mlc-drag { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; filter: drop-shadow(0 10px 10px rgba(0,0,0,.25)); }
.mlc-sum { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.mlc-sum .count { margin-left: 0; }
.mlc.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: hidden; }
.mlc:fullscreen { padding: 20px 28px; overflow: hidden; }
.mlc.is-full, .mlc:fullscreen { grid-template-rows: auto auto auto 1fr; }
.mlc.is-full .mlc-stage, .mlc:fullscreen .mlc-stage { height: auto; min-height: 0; }
.mlc.is-full .pts-tip, .mlc:fullscreen .pts-tip { display: none; }

/* Part-part-whole */
.pw { display: grid; gap: 14px; background: var(--white); }
.pw-wrap { display: grid; justify-items: center; gap: 10px; padding: 10px 0 4px; }
.pw-stage { position: relative; container-type: inline-size; --fa: 50%; --fb: 50%; }
.pw-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5cqw; background: var(--bg); border: max(3px, .8cqw) solid var(--charcoal); --bg: #e3f1fd; }
.pw-box[data-k="a"] { --bg: #fde0e1; }
.pw-box[data-k="b"] { --bg: #fdf0c8; }
.pw-box input { width: 100%; min-width: 0; border: 0; background: transparent; text-align: center; font-family: var(--display); font-weight: 800; color: var(--charcoal); padding: 0; font-variant-numeric: tabular-nums; outline: none; caret-color: var(--blue); }
.pw-box input[readonly] { cursor: default; }
.pw-box input::placeholder { color: var(--charcoal); opacity: 1; }
.pw-box:focus-within { box-shadow: 0 0 0 5px rgba(0,87,225,.25); }
.pw-box.hid { --bg: #fff; border-style: dashed; border-color: var(--blue); }
.pw-box.hid input::placeholder { color: var(--blue); }
.pw-box.right { --bg: #dcf5e3; border-style: solid; border-color: #2e9e5b; }
.pw-box.right input { color: #1e7a43; }
.pw-box.wrong { animation: pw-shake .4s; border-color: #e5484d; }
@keyframes pw-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pw-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .8cqw; max-width: 74%; }
.pw-dots i { width: 4.2cqw; height: 4.2cqw; border-radius: 50%; box-shadow: inset 0 -.5cqw .8cqw rgba(0,0,0,.2); }
.pw-dots.many i { width: 3cqw; height: 3cqw; }
.pw-dots i.gap { margin-right: 1.2cqw; }
.pw-dots i.r { background: radial-gradient(circle at 38% 32%, #ff7b7b, #c4161c); }
.pw-dots i.y { background: radial-gradient(circle at 38% 32%, #ffe28a, #e0a800); }
.pw-dots i.w { background: radial-gradient(circle at 38% 32%, #7fb0ff, #0057e1); }
/* Cherry (circles) */
.pw-stage.cherry { width: min(100%, 640px); aspect-ratio: 1.25; }
.pw-stage.cherry .pw-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pw-lines line { stroke: var(--charcoal); stroke-width: 6; vector-effect: non-scaling-stroke; }
.pw-stage.cherry .pw-box { position: absolute; width: 38%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.pw-stage.cherry [data-k="whole"] { left: 50%; top: 23.75%; }
.pw-stage.cherry [data-k="a"] { left: 22%; top: 76.25%; }
.pw-stage.cherry [data-k="b"] { left: 78%; top: 76.25%; }
.pw-stage.cherry .pw-box input { font-size: 13cqw; line-height: 1; }
.pw-stage.cherry .pw-box.has-dots input { font-size: 8cqw; }
.pw-stage.cherry .pw-dots { width: calc(5 * 4.2cqw + 4 * .8cqw); max-width: none; }
.pw-stage.cherry .pw-dots.many { width: calc(5 * 3cqw + 4 * .8cqw); }
.pw-stage.cherry .pw-dots i.gap { margin-right: 0; }
.pw-stage.cherry .pw-box.wrong { animation-name: pw-shake-c; }
@keyframes pw-shake-c { 20%, 60% { transform: translate(-50%, -50%) translateX(-6px); } 40%, 80% { transform: translate(-50%, -50%) translateX(6px); } }
/* Bar */
.pw-stage.bar { width: min(100%, 900px); display: grid; grid-template-columns: var(--fa) var(--fb); }
.pw-stage.bar .pw-lines { display: none; }
.pw-stage.bar [data-k="whole"] { grid-column: 1 / -1; }
.pw-stage.bar .pw-box { min-height: 15cqw; padding: 1.5cqw; border-radius: 1.4cqw; }
.pw-stage.bar [data-k="a"] { margin-top: 1.4cqw; margin-right: .7cqw; }
.pw-stage.bar [data-k="b"] { margin-top: 1.4cqw; margin-left: .7cqw; }
.pw-stage.bar .pw-box input { font-size: 8cqw; line-height: 1.05; }
.pw-stage.bar .pw-dots { max-width: 96%; }
.pw-stage.bar .pw-dots i { width: 2.6cqw; height: 2.6cqw; }
.pw-warn { margin: 0; font-weight: 700; color: #b4232a; background: #fde0e1; border-radius: 999px; padding: 6px 14px; }
.act:disabled { opacity: .45; cursor: default; background: var(--white); }
.pw.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; }
.pw:fullscreen { padding: 20px 28px; overflow: auto; }
.pw.is-full, .pw:fullscreen { grid-template-rows: auto auto 1fr; }
.pw.is-full .pts-tip, .pw:fullscreen .pts-tip { display: none; }
.pw.is-full .pw-wrap, .pw:fullscreen .pw-wrap { align-content: center; }
.pw.is-full .pw-stage.cherry, .pw:fullscreen .pw-stage.cherry { width: min(100%, calc((100vh - 230px) * 1.25)); }
.pw.is-full .pw-stage.bar, .pw:fullscreen .pw-stage.bar { width: min(100%, 1300px); }
@media (max-width: 600px) { .mc-sum { margin-left: 0; } .mc-tray { gap: 4px; padding: 8px; } .mc-pal { width: 42px; --u: 34px; } .mc-bin { margin-left: 0; } }


/* Classroom timer */
.mini-timer { position: relative; width: 110px; aspect-ratio: 1; margin-bottom: 4px; }
.mini-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mini-timer circle { fill: none; stroke-width: 9; }
.mini-timer .t { stroke: var(--sky-soft); }
.mini-timer .p { stroke: var(--blue); stroke-dasharray: 264; stroke-dashoffset: 70; stroke-linecap: round; }
.mini-timer span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--charcoal); font-variant-numeric: tabular-nums; }
.tm { position: relative; display: grid; gap: 22px; background: var(--white); }
.tm-stage { display: grid; justify-items: center; gap: 20px; }
.tm-ring { position: relative; width: min(420px, 82vw); aspect-ratio: 1; }
.tm-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.tm-track, .tm-prog { fill: none; stroke-width: 14; }
.tm-track { stroke: var(--sky-soft); }
.tm-prog { stroke: var(--blue); stroke-linecap: round; stroke-dasharray: 565.49; stroke-dashoffset: 0; transition: stroke .3s ease; }
.tm.ending .tm-prog { stroke: #e5484d; }
.tm.paused .tm-prog { stroke: #9aa3ab; }
.tm-read { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; }
.tm-digits { font-family: var(--display); font-weight: 800; font-size: min(96px, 19vw); line-height: 1; color: var(--charcoal); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.tm-digits small { font-size: .45em; letter-spacing: 0; }
.tm.ending .tm-digits { color: #d1343a; }
.tm-label { font-weight: 700; font-size: 1rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .12em; }
.tm-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
.tm-go { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 800; font-family: var(--display); font-size: 1.35rem; border: 0; border-radius: 999px; padding: 14px 34px; background: var(--blue); color: var(--white); cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.tm-go:hover { transform: translateY(-2px); background: var(--blue-dark); }
.tm-go svg { width: 24px; height: 24px; }
.tm-go .i-pause { display: none; }
.tm.running .tm-go .i-pause { display: inline; }
.tm.running .tm-go .i-play { display: none; }
.tm.running #tm-go { background: var(--charcoal); }
.tm-reset { display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; font-size: 1rem; }
.tm-reset svg { width: 18px; height: 18px; }
.tm-set { display: grid; gap: 16px; justify-items: center; border-top: 1px solid var(--line); padding-top: 20px; }
.tm.running .tm-set { opacity: .45; pointer-events: none; }
.tm.watch .tm-set { display: none; }
.tm-steppers { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.stepper { display: grid; gap: 6px; justify-items: center; }
.stepper label { font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.stepper-row { display: flex; align-items: center; gap: 8px; }
.step { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--charcoal); background: var(--white); font: inherit; font-size: 1.6rem; font-weight: 800; color: var(--charcoal); cursor: pointer; line-height: 1; }
.step:hover { background: var(--yellow); }
.stepper input { width: 3.2em; text-align: center; font-family: var(--display); font-weight: 800; font-size: 1.8rem; color: var(--charcoal); border: 2px solid var(--line); border-radius: 12px; padding: 4px 2px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; border-color: var(--blue); }
.tm-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tm-presets button { font: inherit; font-weight: 700; font-size: .95rem; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--sky-soft); color: var(--blue-dark); cursor: pointer; }
.tm-presets button:hover { background: var(--yellow); color: var(--charcoal); }
.tm-opts { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; }
.tm-done { position: absolute; inset: 0; z-index: 3; background: var(--yellow); border-radius: var(--radius); display: grid; place-items: center; animation: tmflash 1s steps(1) infinite; }
@keyframes tmflash { 50% { background: #ffd96b; } }
.tm-done-in { display: grid; justify-items: center; gap: 18px; padding: 20px; text-align: center; }
.tm-done-text { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 12vw, 8rem); color: var(--charcoal); line-height: 1; }
.tm-figs { display: flex; gap: 20px; }
.tm-figs .fig { width: clamp(40px, 7vw, 80px); animation: bop 0.8s ease-in-out infinite; }
.tm-figs .fig:nth-child(2) { animation-delay: .2s; transform: scaleX(-1); }
.tm-figs .fig:nth-child(3) { animation-delay: .4s; }
.tm.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; }
.tm:fullscreen { padding: 20px 28px; overflow: auto; }
.tm.is-full, .tm:fullscreen { display: flex; flex-direction: column; justify-content: center; }
.tm.is-full .tm-top, .tm:fullscreen .tm-top { position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.tm.is-full .tm-set, .tm:fullscreen .tm-set { display: none; }
.tm.is-full .tm-ring, .tm:fullscreen .tm-ring { width: min(72vmin, 92vw); }
.tm.is-full .tm-digits, .tm:fullscreen .tm-digits { font-size: min(17vmin, 20vw); }
.tm.is-full .tm-done, .tm:fullscreen .tm-done { border-radius: 0; }
@media (prefers-reduced-motion: reduce) { .tm-done { animation: none; } }


/* Tug of war */
.mini-tug { height: 110px; display: grid; align-items: center; margin-bottom: 4px; }
.mini-tug svg { width: 100%; max-width: 220px; height: 110px; border-radius: 10px; }
.tug { --t1: #0057e1; --t1-soft: #d6ebfc; --t2: #e5484d; --t2-soft: #fde0e1; position: relative; background: var(--white); }
.tug-setup { display: grid; gap: 18px; max-width: 860px; margin: 0 auto; }
.tug-setup h2 { font-size: 1.8rem; color: var(--charcoal); }
.tug-setup-head p { margin-top: 6px; color: var(--ink-soft); max-width: 62ch; }
.tug-teams { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.tug-team { display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 8px 6px 16px; font-weight: 700; font-size: .9rem; color: var(--white); }
.tug-team.t1 { background: var(--t1); } .tug-team.t2 { background: var(--t2); }
.tug-team input { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 7px 12px; width: 10em; color: var(--charcoal); }
.tug-qhead { display: grid; grid-template-columns: 2rem 1.6fr 1fr; gap: 10px; font-weight: 700; font-size: .85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.tug-qhead span:first-child { grid-column: 2; }
.tug-qs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: q; }
.tug-qs li { display: grid; grid-template-columns: 2rem 1.6fr 1fr; gap: 10px; align-items: center; counter-increment: q; }
.tug-qs li::before { content: counter(q); font-family: var(--display); font-weight: 800; color: var(--ink-soft); text-align: right; }
.tug-qs input { font: inherit; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; color: var(--ink); }
.tug-qs input:focus { outline: none; border-color: var(--blue); }
.tug-qs li.example input { color: var(--ink-soft); font-style: italic; }
.tug-setup-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; }
.tug-start-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tug-ready { font-weight: 700; color: var(--ink-soft); }
.tug-ready.ok { color: #1f7a43; }
.tm-go:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.tug-game { display: grid; gap: 16px; }
.tug-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.tug-side { display: flex; align-items: center; gap: 12px; }
.tug-side.t2 { justify-content: flex-end; }
.tug-side .nm { font-family: var(--display); font-weight: 800; font-size: clamp(1.1rem, 2.6vw, 1.7rem); padding: 6px 16px; border-radius: 999px; color: var(--white); }
.tug-side.t1 .nm { background: var(--t1); } .tug-side.t2 .nm { background: var(--t2); }
.tug-side .pl { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--charcoal); font-variant-numeric: tabular-nums; }
.tug-qcount { font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; text-align: center; }
.tug-scene { border-radius: var(--radius); overflow: hidden; border: 2px solid var(--line); }
.tug-scene svg { display: block; width: 100%; height: auto; }
.tug-scene .z1 { fill: var(--t1-soft); } .tug-scene .z2 { fill: var(--t2-soft); }
.tug-scene .ground { stroke: #9aa3ab; stroke-width: 3; }
.tug-scene .winline { stroke-width: 4; stroke-dasharray: 10 8; }
.tug-scene .winline.t1 { stroke: var(--t1); } .tug-scene .winline.t2 { stroke: var(--t2); }
.tug-scene .winlabel { font: 800 18px var(--display); letter-spacing: .06em; }
.tug-scene .winlabel.t1 { fill: var(--t1); } .tug-scene .winlabel.t2 { fill: var(--t2); }
.tug-scene .flag line { stroke: var(--charcoal); stroke-width: 4; }
.tug-scene .flag path { fill: var(--yellow); stroke: var(--charcoal); stroke-width: 2; stroke-linejoin: round; }
.tug-scene .rope { stroke: #b5803e; stroke-width: 14; stroke-linecap: round; }
.tug-scene .rope-twist { stroke: #8a5d27; stroke-width: 14; stroke-dasharray: 3 9; stroke-linecap: butt; opacity: .55; }
.tug-scene .ribbon { fill: #e5484d; }
.tug-scene .knot { fill: var(--yellow); stroke: var(--charcoal); stroke-width: 4; }
.tug-scene .puller path { fill: none; stroke: var(--charcoal); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.tug-scene .puller .head { stroke: var(--charcoal); stroke-width: 4; }
.tug-scene .t1 .head { fill: var(--t1); } .tug-scene .t2 .head { fill: var(--t2); }
#tug-rope { transition: transform .7s cubic-bezier(.25, 1.4, .45, 1); }
.tug-scene .team { transition: transform .25s ease; }
.tug.heave-t1 .team.t1 { transform: translateX(-10px); }
.tug.heave-t2 .team.t2 { transform: translateX(10px); }
.tug-card { display: grid; gap: 14px; justify-items: center; text-align: center; background: #f6f7f8; border-radius: var(--radius); padding: 22px 18px; }
.tug-q { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 7vw, 4.6rem); line-height: 1.05; color: var(--charcoal); max-width: 22ch; overflow-wrap: anywhere; }
.tug-a { font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 1.6rem); color: #1f7a43; background: #e2f6ea; border-radius: 999px; padding: 6px 18px; }
.tug-buttons { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; width: 100%; }
.tug-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-family: var(--display); font-weight: 800; font-size: clamp(1rem, 2.4vw, 1.35rem); border: 0; border-radius: 999px; padding: 16px 22px; color: var(--white); cursor: pointer; transition: transform .15s ease, filter .15s ease; min-width: 0; }
.tug-btn svg { width: 24px; height: 24px; flex: none; }
.tug-btn.t1 { background: var(--t1); } .tug-btn.t2 { background: var(--t2); }
.tug-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.tug-btn:disabled { opacity: .5; cursor: default; transform: none; }
.tug-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tug-mid { display: grid; gap: 8px; }
.act:disabled { opacity: .45; cursor: default; }
.tug-win-text { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 9vw, 6.5rem); line-height: 1; color: var(--charcoal); }
.tug-win-text b { color: var(--win, var(--charcoal)); }
@media (max-width: 700px) {
  .tug-qs li, .tug-qhead { grid-template-columns: 1.4rem 1fr; }
  .tug-qs li input:last-child { grid-column: 2; }
  .tug-qhead span:last-child { display: none; }
  .tug-buttons { grid-template-columns: 1fr 1fr; }
  .tug-mid { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; }
  .tug-score { grid-template-columns: 1fr 1fr; }
  .tug-qcount { grid-column: 1 / -1; grid-row: 1; }
}
.tug.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; }
.tug:fullscreen { padding: 20px 28px; overflow: auto; }
.tug.is-full .pts-tip, .tug:fullscreen .pts-tip { display: none; }
.tug.is-full .tug-scene, .tug:fullscreen .tug-scene { width: min(100%, calc(40vh * 4.8)); margin: 0 auto; }
.tug.is-full .tug-done, .tug:fullscreen .tug-done { border-radius: 0; }


/* Mountain climb */
.mc-scene .sun { fill: var(--yellow); }
.mc-scene .cloud ellipse { fill: #ffffff; }
.mc-scene .cloud.c1 { transform: translate(300px, 90px); animation: mcdrift 38s linear infinite alternate; }
.mc-scene .cloud.c2 { transform: translate(780px, 60px); animation: mcdrift2 46s linear infinite alternate; }
@keyframes mcdrift { from { transform: translate(260px, 90px); } to { transform: translate(380px, 90px); } }
@keyframes mcdrift2 { from { transform: translate(820px, 60px); } to { transform: translate(700px, 60px); } }
.mc-scene .hill-back { fill: #b9cad8; }
.mc-scene .mt-lit { fill: #8797a8; }
.mc-scene .mt-shade { fill: #6f8194; }
.mc-scene .snow { fill: #ffffff; }
.mc-scene .grass { fill: #7cc36b; }
.mc-scene .ledge { fill: #4f5f70; }
.mc-scene .ledge-top { stroke-width: 4; stroke-linecap: round; }
.mc-scene .t1 .ledge-top, .mc-scene .trail.t1 { stroke: var(--t1); }
.mc-scene .t2 .ledge-top, .mc-scene .trail.t2 { stroke: var(--t2); }
.mc-scene .trail { fill: none; stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; opacity: .75; }
.mc-scene .step-n { font: 800 15px var(--display); fill: #ffffff; }
.mc-scene .summit line { stroke: var(--charcoal); stroke-width: 4; }
.mc-scene .summit path { fill: var(--yellow); stroke: var(--charcoal); stroke-width: 2; stroke-linejoin: round; transition: fill .3s ease; }
.mc-scene .summit.won-t1 path { fill: var(--t1); }
.mc-scene .summit.won-t2 path { fill: var(--t2); }
.mc-climber { transition: transform .8s cubic-bezier(.3, 1.25, .5, 1); }
.mc-climber .mc-body path { fill: none; stroke: var(--charcoal); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.mc-climber .head { stroke: var(--charcoal); stroke-width: 4; }
.mc-climber.t1 .head, .mc-climber.t1 .pack { fill: var(--t1); }
.mc-climber.t2 .head, .mc-climber.t2 .pack { fill: var(--t2); }
.mc-climber .pack { stroke: var(--charcoal); stroke-width: 2.5; }
.mc-climber.hop .mc-body { animation: mchop .55s ease; }
@keyframes mchop { 40% { transform: translateY(-22px); } }
.mc-climber.cheer .mc-body { animation: mccheer .6s ease-in-out infinite; }
@keyframes mccheer { 50% { transform: translateY(-14px); } }
.tug-side .pl small { font-size: .55em; color: var(--ink-soft); }
.mc.tug.is-full .tug-scene, .mc.tug:fullscreen .tug-scene { width: min(100%, calc(46vh * 2.19)); margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { .mc-scene .cloud { animation: none; } }


/* Home: classroom tools promo */
.tools-promo { margin-top: 22px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--charcoal); background: var(--white); border: 2px solid var(--charcoal); border-radius: var(--radius); padding: 12px 14px; max-width: 520px; box-shadow: 0 4px 0 var(--charcoal); transition: transform .15s ease, box-shadow .15s ease; }
.tools-promo:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--charcoal); }
.tp-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--sky); display: grid; place-items: center; }
.tp-ic svg { width: 26px; height: 26px; }
.tp-text { display: grid; gap: 1px; min-width: 0; font-size: .95rem; line-height: 1.35; }
.tp-text b { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.tp-new { justify-self: start; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--blue); color: var(--white); border-radius: 999px; padding: 2px 8px; }
.tp-go { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; background: var(--yellow); border-radius: 999px; padding: 8px 12px; }
.tp-go svg { width: 18px; height: 18px; }
@media (max-width: 480px) { .tp-go { padding: 8px; } .tp-go { font-size: 0; gap: 0; } }


/* Timer looks */
.tm-looks button { padding: 9px 14px; }
.tm-view { display: none; }
.tm.look-ring #tm-ring { display: block; }
.tm.look-sand #tm-sand { display: grid; }
.tm.look-bar #tm-barv { display: grid; }
.tm.look-game #tm-game { display: block; }
.tm-big { font-family: var(--display); font-weight: 800; font-size: min(110px, 20vw); line-height: 1; color: var(--charcoal); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.tm-big small { font-size: .45em; letter-spacing: 0; }
.tm.ending .tm-big { color: #d1343a; }
/* Sand timer */
.tm-sand { justify-items: center; gap: 10px; }
.tm-sand svg { width: min(220px, 52vw); height: auto; display: block; }
.tm-sand .glass { fill: rgba(214, 235, 252, .6); }
.tm-sand .glass-edge { fill: none; stroke: var(--charcoal); stroke-width: 4; }
.tm-sand .sand { fill: var(--yellow); }
.tm.ending .tm-sand .sand { fill: #ff8a3d; }
.tm-sand .stream { stroke: #e3a821; stroke-width: 4; stroke-dasharray: 4 6; opacity: 0; transition: opacity .2s; }
.tm.running .tm-sand .stream { opacity: 1; animation: sandfall .35s linear infinite; }
@keyframes sandfall { to { stroke-dashoffset: -10; } }
.tm-sand .wood { fill: #c48a45; stroke: var(--charcoal); stroke-width: 3; }
.tm-sand .shine { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 5; stroke-linecap: round; }
/* Bar */
.tm-barv { width: min(900px, 100%); gap: 16px; justify-items: center; }
.tm-bar { position: relative; width: 100%; height: clamp(46px, 9vw, 86px); background: var(--sky-soft); border-radius: 999px; overflow: hidden; border: 4px solid var(--charcoal); }
.tm-bar-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; border-radius: 999px; background-color: #2fa55c; background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .2) 0 14px, transparent 14px 28px); background-size: 40px 40px; transition: width .2s linear, background-color .4s ease; }
.tm.running .tm-bar-fill { animation: barslide 1s linear infinite; }
@keyframes barslide { to { background-position: 40px 0; } }
.tm[data-lvl="mid"] .tm-bar-fill { background-color: var(--yellow); }
.tm[data-lvl="low"] .tm-bar-fill { background-color: #e5484d; }
.tm-bar-foot { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tm-bar-pct { font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
/* Game */
.tm-game { --px: "Press Start 2P", ui-monospace, monospace; position: relative; overflow: hidden; width: min(720px, calc(100% - 24px)); margin: 14px auto; background: #1b1d3a; color: #ffffff; border-radius: 6px; padding: clamp(16px, 3vw, 28px); font-family: var(--px); box-shadow: 0 0 0 4px #0d0e21, 0 0 0 8px var(--yellow), 0 0 0 12px #0d0e21; }
.tm-game::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(rgba(0, 0, 0, .18) 0 2px, transparent 2px 4px); }
.g-head { display: flex; justify-content: space-between; gap: 10px; font-size: clamp(9px, 1.6vw, 15px); color: #8fd3ff; }
.g-pct { text-align: center; font-size: clamp(30px, 9vw, 84px); line-height: 1.1; color: var(--yellow); text-shadow: .06em .06em 0 #e5484d; margin: clamp(14px, 3vw, 26px) 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-track { position: relative; padding-top: clamp(30px, 5vw, 44px); }
.g-blocks { display: grid; grid-template-columns: repeat(20, 1fr); gap: clamp(2px, .5vw, 4px); padding: clamp(4px, .8vw, 6px); background: #0d0e21; border: 4px solid #ffffff; }
.g-blocks span { height: clamp(16px, 3.6vw, 34px); background: #2a2d55; }
.g-blocks span.on { background: #3ddc84; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), inset 0 4px 0 rgba(255, 255, 255, .3); }
.tm[data-lvl="mid"] .g-blocks span.on { background: var(--yellow); }
.tm[data-lvl="low"] .g-blocks span.on { background: #ff4d5a; }
.g-runner { position: absolute; top: 0; left: 100%; transform: translateX(-50%); width: clamp(22px, 3.4vw, 32px); transition: left .3s steps(3); }
.g-runner svg { width: 100%; height: auto; display: block; }
.g-runner .g-body, .g-runner .fa, .g-runner .fb { fill: #ffffff; }
.g-runner .g-body rect:nth-child(-n+6) { fill: var(--yellow); }
.g-runner .fb { opacity: 0; }
.tm.running .g-runner .fa { animation: gfa .3s steps(1) infinite; }
.tm.running .g-runner .fb { animation: gfb .3s steps(1) infinite; }
@keyframes gfa { 50% { opacity: 0; } }
@keyframes gfb { 0% { opacity: 0; } 50% { opacity: 1; } }
.g-status { text-align: center; margin-top: clamp(14px, 3vw, 24px); font-size: clamp(11px, 2.2vw, 20px); }
.g-status.blink { animation: gblink 1s steps(1) infinite; }
@keyframes gblink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .g-status.blink, .tm.running .tm-bar-fill, .tm.running .tm-sand .stream { animation: none; } }
/* Looks in full screen */
.tm.is-full .tm-sand svg, .tm:fullscreen .tm-sand svg { width: auto; height: 50vh; }
.tm.is-full .tm-big, .tm:fullscreen .tm-big { font-size: min(14vmin, 18vw); }
.tm.is-full .tm-barv, .tm:fullscreen .tm-barv { width: 92vw; max-width: none; justify-self: center; }
.tm.is-full .tm-bar, .tm:fullscreen .tm-bar { height: 15vh; }
.tm.is-full .tm-game, .tm:fullscreen .tm-game { width: min(92vw, 125vh); }
.tm.is-full .g-pct, .tm:fullscreen .g-pct { font-size: min(13vmin, 11vw); }
.tm.is-full .g-blocks span, .tm:fullscreen .g-blocks span { height: 8vh; }
.tm.is-full .tm-stage, .tm:fullscreen .tm-stage { margin-top: 70px; }


/* Number line */
.nl { position: relative; display: grid; gap: 14px; background: var(--white); }
.nl-top .full-btn { margin-left: auto; }
.nl-eq { text-align: center; font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 5vw, 3.4rem); line-height: 1.15; color: var(--charcoal); min-height: 1.2em; font-variant-numeric: tabular-nums; }
.nl-eq .p { color: var(--blue); }
.nl-eq .n { color: #e5484d; }
.nl-eq .ans { background: var(--yellow); border-radius: 12px; padding: 0 .25em; }
.nl-hint { text-align: center; color: var(--ink-soft); font-weight: 700; min-height: 1.5em; }
.nl-scene { border: 2px solid var(--line); border-radius: var(--radius); background: #fbfcfd; overflow: hidden; transition: transform .1s; }
.nl-scene svg { display: block; width: 100%; height: auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.nl-axis { stroke: var(--charcoal); stroke-width: 5; stroke-linecap: round; }
.nl-end { fill: var(--charcoal); }
.nl-tick { stroke: var(--charcoal); stroke-width: 4; stroke-linecap: round; }
.nl-t.minor .nl-tick { stroke-width: 2.5; }
.nl-num { font-family: var(--display); font-weight: 800; fill: var(--charcoal); text-anchor: middle; }
.nl-hit { fill: transparent; cursor: pointer; }
.nl-t:hover .nl-tick { stroke: var(--blue); }
.nl-t:hover .nl-num { fill: var(--blue); }
.nl-qbox rect { fill: var(--sky-soft); stroke: var(--blue); stroke-width: 2.5; }
.nl-qbox .nl-num { fill: var(--blue); }
.nl-start-dot { fill: var(--yellow); stroke: var(--charcoal); stroke-width: 3; }
.nl-jump path { fill: none; stroke-width: 5; stroke-linecap: round; }
.nl-jump.p path { stroke: var(--blue); }
.nl-jump.n path { stroke: #e5484d; }
.nl-jump text { font: 800 28px var(--display); text-anchor: middle; paint-order: stroke; stroke: #fbfcfd; stroke-width: 7px; stroke-linejoin: round; }
.nl-jump.p text { fill: var(--blue); }
.nl-jump.n text { fill: #e5484d; }
.nl-jump.new text { animation: nlpop .35s .5s both; }
@keyframes nlpop { from { opacity: 0; } }
#nl-man { pointer-events: none; }
#nl-man .head { fill: var(--yellow); stroke: var(--charcoal); stroke-width: 3.5; }
#nl-man path { fill: none; stroke: var(--charcoal); stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
#nl-man.ghost { opacity: .3; }
#nl-jumps { pointer-events: none; }
.nl-msg { text-align: center; font-weight: 700; color: #d1343a; min-height: 1.4em; margin-top: -6px; }
.nl.shake .nl-scene { animation: nlshake .35s; }
@keyframes nlshake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.nl-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; justify-content: center; }
.nl-jbtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nl-jb { font: inherit; font-family: var(--display); font-weight: 800; font-size: 1.15rem; border: 0; border-radius: 999px; padding: 10px 16px; min-width: 66px; cursor: pointer; color: var(--white); transition: transform .15s ease, filter .15s ease; font-variant-numeric: tabular-nums; }
.nl-jb.p { background: var(--blue); }
.nl-jb.n { background: #e5484d; }
.nl-jb:hover { transform: translateY(-2px); filter: brightness(1.08); }
.nl-jb.gap { margin-left: 14px; }
.nl .field input { width: 5.5em; }
.nl-set { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
#nl-answer[aria-pressed="true"] { background: var(--charcoal); color: var(--white); }
.nl.is-full { position: fixed; inset: 0; z-index: 50; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; align-content: center; }
.nl:fullscreen { padding: 20px 28px; overflow: auto; align-content: center; }
.nl.is-full .nl-set, .nl:fullscreen .nl-set, .nl.is-full .pts-tip, .nl:fullscreen .pts-tip { display: none; }
.nl.is-full .nl-top, .nl:fullscreen .nl-top { position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.nl.is-full .nl-scene, .nl:fullscreen .nl-scene { width: min(100%, calc(52vh * 3.45)); margin: 0 auto; }
@media (max-width: 600px) { .nl-jb { min-width: 54px; padding: 9px 12px; font-size: 1rem; } .nl-jb.gap { margin-left: 0; } }


/* Seating plan */
#seating-plan .tool-body .wrap { max-width: 1520px; }
.sp { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; background: var(--white); }
.sp-main { display: grid; gap: 12px; min-width: 0; }
.sp-bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.sp-bar select { font: inherit; font-weight: 700; border: 2px solid var(--line); border-radius: 10px; padding: 7px 10px; max-width: 220px; color: var(--charcoal); background: var(--white); }
.sp-bar .full-btn { margin-left: auto; }
.sp-strip { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; background: var(--sky-soft); border-radius: 14px; padding: 10px 12px; }
.sp-strip input { font: inherit; border: 2px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.sp-small { font-size: .85rem; color: var(--ink-soft); }
.sp-viewport { overflow: auto; border: 2px solid var(--line); border-radius: var(--radius); background: #e6ecf1; }
.sp-sizer { position: relative; margin: 0 auto; }
.sp-room { position: absolute; left: 0; top: 0; width: 1200px; height: 800px; transform-origin: 0 0; overflow: hidden; background-color: #f4f7fa; background-image: radial-gradient(#cfd8e1 1.5px, transparent 1.7px); background-size: 20px 20px; user-select: none; -webkit-user-select: none; }
.sp-item { position: absolute; touch-action: none; cursor: grab; }
.sp-item.dragging { cursor: grabbing; z-index: 30; }
.sp-item.dragging .sp-shape { box-shadow: 0 14px 22px rgba(0, 0, 0, .18); }
.sp-shape { position: absolute; inset: 0; background: var(--c, #ffffff); border: 3px solid var(--charcoal); border-radius: 10px; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.sp-shape.round { border-radius: 50%; }
.sp-label { font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.05; color: var(--charcoal); white-space: nowrap; pointer-events: none; text-align: center; }
.k-area .sp-shape { background: color-mix(in srgb, var(--c, #80c0f3) 32%, #ffffff); border: 3px dashed rgba(64, 64, 64, .35); box-shadow: none; border-radius: 30px; place-items: start center; padding-top: 10px; }
.k-area .sp-label { font-size: 22px; opacity: .55; }
.k-spot .sp-shape { border-width: 3px; }
.t-board .sp-shape { background: #ffffff; border-width: 4px; border-radius: 4px; box-shadow: none; }
.t-board .sp-label { font-size: 13px; }
.t-door .sp-shape { background: #c48a45; border-width: 2px; border-radius: 3px; box-shadow: none; }
.t-door .sp-label { font-size: 11px; color: #ffffff; }
.t-teacher .sp-shape { background: #c48a45; }
.t-teacher .sp-label { color: #ffffff; font-size: 16px; }
.sp-seat { position: absolute; min-width: 52px; max-width: 82px; height: 36px; padding: 0 8px; border-radius: 999px; background: #ffffff; border: 2.5px solid var(--charcoal); font: 700 16px/31px var(--body); color: var(--charcoal); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); touch-action: none; }
.sp-seat:not(.named) { color: #8d969e; border-style: dashed; background: rgba(255, 255, 255, .9); font-size: 18px; }
.k-spot .sp-seat { max-width: 104px; }
.k-spot .sp-seat:not(.named) { background: rgba(255, 255, 255, .55); border-color: rgba(64, 64, 64, .6); }
.sp-seat:hover, .sp-seat:focus-visible { border-color: var(--blue); }
.sp-seat.drop { background: var(--yellow); border-color: var(--charcoal); border-style: solid; transform-origin: center; }
.sp.picking .sp-seat:not(.named) { background: #fff5d6; border-color: var(--yellow); }
.sp-item.sel .sp-shape { outline: 4px solid var(--blue); outline-offset: 5px; }
.sp-edit { position: absolute; z-index: 50; transform: translate(-50%, -50%); width: 140px; font: 700 16px var(--body); color: var(--charcoal); border: 3px solid var(--blue); border-radius: 10px; padding: 6px 8px; text-align: center; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.sp-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -60%) rotate(-4deg); background: var(--yellow); border: 2.5px solid var(--charcoal); border-radius: 999px; padding: 6px 14px; font-weight: 700; color: var(--charcoal); box-shadow: 0 10px 20px rgba(0, 0, 0, .2); white-space: nowrap; }
.sp-side { display: grid; gap: 14px; }
.sp-box { border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; background: var(--white); }
.sp-box h2 { font-size: 1.1rem; color: var(--charcoal); }
.sp-add { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sp-add button { display: flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: .86rem; text-align: left; border: 2px solid var(--line); background: var(--white); border-radius: 10px; padding: 6px 8px; cursor: pointer; color: var(--charcoal); min-width: 0; }
.sp-add button:hover { border-color: var(--charcoal); background: var(--sky-soft); }
.sp-add svg { width: 28px; height: 22px; flex: none; }
.sp-add button span { min-width: 0; overflow-wrap: anywhere; }
.sp-sel-empty { color: var(--ink-soft); font-size: .95rem; }
.sp-sel-type { font-weight: 700; color: var(--charcoal); }
.sp-field { display: grid; gap: 4px; font-weight: 700; font-size: .85rem; color: var(--ink-soft); }
.sp-side input[type="text"], .sp-side textarea { font: inherit; font-size: .95rem; border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 100%; color: var(--ink); min-width: 0; }
.sp-side input[type="text"]:focus, .sp-side textarea:focus, .sp-strip input:focus { outline: none; border-color: var(--blue); }
.sp-side textarea { min-height: 86px; resize: vertical; }
.sp-colors { display: flex; flex-wrap: wrap; gap: 7px; }
.sp-colors button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--charcoal); cursor: pointer; padding: 0; }
.sp-colors button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--blue); }
.sp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-actions .act { font-size: .85rem; padding: 7px 12px; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 46px; padding: 8px; border: 2px dashed var(--line); border-radius: 12px; align-content: flex-start; }
.sp-chips-empty { color: var(--ink-soft); font-size: .88rem; padding: 4px; }
.sp-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--yellow); color: var(--charcoal); border-radius: 999px; padding: 4px 5px 4px 12px; font-weight: 700; font-size: .9rem; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.sp-chip.picked { outline: 3px solid var(--blue); outline-offset: 1px; }
.sp-chip button { border: 0; background: rgba(0, 0, 0, .1); border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-weight: 800; line-height: 1; color: var(--charcoal); padding: 0; }
.sp-stats { font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.sp-msg { color: #b4232a; font-weight: 700; font-size: .9rem; min-height: 1.2em; }
.sp-msg.ok { color: #1f7a43; }
.sp-print-title { display: none; font-size: 1.6rem; color: var(--charcoal); }
@media (max-width: 980px) { .sp { grid-template-columns: 1fr; } .sp-add { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.sp.is-full { position: fixed; inset: 0; z-index: 50; display: block; padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: auto; }
.sp:fullscreen { display: block; padding: 12px 20px; overflow: auto; }
.sp.is-full .sp-side, .sp:fullscreen .sp-side, .sp.is-full .pts-tip, .sp:fullscreen .pts-tip { display: none; }
.sp.is-full .sp-viewport, .sp:fullscreen .sp-viewport { border: 0; background: transparent; }
@media print {
  @page { size: landscape; margin: 10mm; }
  body.sp-printing::before, body.sp-printing > header, body.sp-printing > footer, body.sp-printing > main:not(#seating-plan) { display: none !important; }
  body.sp-printing #seating-plan .tool-head, body.sp-printing .sp-side, body.sp-printing .sp-bar, body.sp-printing .sp-strip, body.sp-printing #seating-plan .pts-tip { display: none !important; }
  body.sp-printing #seating-plan .wrap { padding: 0; max-width: none; }
  body.sp-printing .sp { display: block; }
  body.sp-printing .sp-viewport { overflow: visible; border: 0; background: none; }
  body.sp-printing .sp-print-title { display: block; margin-bottom: 6px; }
  body.sp-printing .sp-item.sel .sp-shape { outline: none; }
  body.sp-printing * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Tool about text and footer tool links */
.tool-about { border-top: 1px solid var(--line); }
.tool-about .wrap { padding-block: 28px 44px; display: grid; gap: 8px; }
.tool-about h2 { font-size: 1.35rem; color: var(--charcoal); }
.tool-about p { max-width: 70ch; color: var(--ink-soft); }
footer nav.foot-tools { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 16px; align-items: center; padding-block: 22px 0; font-size: .92rem; color: #cfcfcf; }
.foot-tools b { color: var(--white); }
.foot-tools a { color: #e6e6e6; text-decoration: none; }
.foot-tools a:hover { color: var(--yellow); text-decoration: underline; }

/* Footer */
footer { background: var(--charcoal); color: var(--white); }
footer .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: .92rem; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.08); }
.social a:hover { background: var(--yellow); color: var(--charcoal); }
.social svg { width: 18px; height: 18px; }
footer small { color: #cfcfcf; font-size: .9rem; }
