/* Square Up prototype: season page and battle board (Chalkboard colours). */
.su-page { padding-block: 32px 88px; --slate: #2d424d; --gold: #f6e09f; --gold-deep: #d9b95a; --cream: #f6f2ea; --rule: #e5e2da; --spring: cubic-bezier(.34, 1.56, .64, 1); --smooth: cubic-bezier(.65, 0, .35, 1); }
.su-page .container { max-width: 1120px; }
.su-page [hidden] { display: none !important; }
.su-round-notice { padding: .75rem 1rem; border-inline-start: 4px solid #b08d37; background: #fff4cc; }
.su-round-notice:empty { margin: 0; padding: 0; border: 0; }
[data-official-done] h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }

/* Season */
.su-hero { margin: 8px 0 26px; }
.su-hero .tile-kicker { margin-bottom: 2px; }
.su-title { font-size: clamp(2.6rem, 6vw, 4.4rem); color: var(--slate); margin: 0; line-height: 1; }
.su-intro { max-width: 46em; margin: 14px 0 0; font-size: 1.05rem; line-height: 1.65; color: #3f4f57 !important; }
.su-intro-cta { margin-top: 8px; font-weight: 600; color: var(--slate) !important; }
.su-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 980px; }
.su-card { animation: card-in .5s var(--spring) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.su-card-link { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 14px; align-items: center; height: 100%; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--rule); background: #fff; color: var(--slate); text-decoration: none; transition: border-color .25s, transform .35s var(--spring), box-shadow .3s; }
a.su-card-link:hover { border-color: var(--slate); transform: translateY(-3px); box-shadow: 0 8px 20px #2638411a; }
a.su-card-link:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.su-card.is-locked .su-card-link { background: #f1ede4; border-style: dashed; color: #4b5b63; }
.su-mini-grid { grid-row: 1 / 3; display: grid; grid-template-columns: repeat(3, 11px); gap: 2px; }
.su-mini-grid i { width: 11px; height: 11px; border-radius: 2px; background: #e3ddd0; transition: background .3s; }
.su-card.is-open .su-mini-grid i { background: #d8d1c2; }
.su-mini-grid i.on, .su-card.is-open .su-mini-grid i.on { background: var(--slate); }
.su-card-name { font-family: var(--serif); font-size: 1.2rem; line-height: 1.2; }
.su-card-status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: #4b5b63; }
.su-card.is-open .su-card-status { color: #7d5a10; }
.su-lock { width: 9px; height: 8px; border: 1.6px solid currentColor; border-radius: 2px; position: relative; margin-top: 3px; }
.su-lock::before { content: ""; position: absolute; left: 0; top: -6px; width: 5px; height: 5px; border: 1.6px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; }

/* Battle */
.su-back.button { background: #fff; color: var(--slate); border: 1.5px solid #c9c1b0; }
.su-back.button:hover { background: var(--cream); border-color: var(--slate); }
.su-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; min-height: 42px; padding: 8px 16px; font-size: .9rem; }
.su-battle-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; margin-bottom: 14px; }
.su-battle-head > div:first-child { max-width: 640px; }
.su-battle-title { font-size: clamp(2.2rem, 4.5vw, 3.2rem); color: var(--slate); margin: 2px 0 6px; }
.su-battle-intro { margin: 0; color: #4a5a62; }
.su-battle-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.su-progress { margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--slate); color: var(--gold); font-weight: 700; font-size: .85rem; }

.su-stage { position: relative; }
.su-stage-top { position: relative; display: flex; justify-content: center; min-height: 0; margin-bottom: 14px; }
.su-stage-top:has(> .su-new[hidden]) { margin-bottom: 0; }
.su-new { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; font-size: 1rem; }
.su-new svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--smooth); }
.su-new:hover svg { transform: rotate(-200deg); }
.su-arena { position: relative; width: min(100%, 520px, calc(100dvh - 430px)); min-width: min(100%, 300px); aspect-ratio: 1; margin: 6px auto 0; }
.su-board { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 12px; perspective: 900px; transition: gap .65s var(--smooth), opacity .45s ease; }

/* Sticker beside the New questions button, pointing down to the board */
.su-sticker { position: absolute; z-index: 2; top: 30%; left: calc(50% + 122px); margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; background: var(--gold); color: var(--slate); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 4px 10px rgba(45, 66, 77, .16); transform: rotate(5deg); white-space: nowrap; animation: sticker-in .6s var(--spring) .5s both; }
.su-sticker svg { fill: none; stroke: var(--slate); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; animation: nudge 1.375s ease-in-out 1.1s 8; }
@keyframes sticker-in { from { opacity: 0; transform: rotate(5deg) scale(.6); } to { opacity: 1; transform: rotate(5deg); } }
.su-sticker svg { order: -1; transform: scaleX(-1); }
@keyframes nudge { 0%, 100% { transform: scaleX(-1) translate(0, 0); } 50% { transform: scaleX(-1) translate(3px, 2px); } }

.su-intro-final { margin-top: 10px; }
.su-final-line { display: inline; font-weight: 700; color: var(--slate); background: var(--gold); padding: 3px 9px; border-radius: 6px; box-shadow: 0 1px 0 var(--gold-deep); -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.9; }
.su-final-word { font-weight: 700; color: var(--slate); background: var(--gold); padding: 1px 7px; border-radius: 5px; box-shadow: 0 1px 0 var(--gold-deep); white-space: nowrap; }

/* Squares */
.su-sq { position: relative; display: flex; align-items: center; justify-content: center; border: 2px solid #c9c1b0; border-radius: 16px; background: #fff; color: var(--slate); cursor: pointer; font: inherit; transform-style: preserve-3d; transition: background .3s, border-color .3s, color .3s, transform .4s var(--spring), box-shadow .35s, border-radius .65s var(--smooth); }
.su-board.is-entering .su-sq { animation: sq-in .6s var(--spring) both; animation-delay: calc(var(--ring) * 70ms + var(--i) * 18ms); }
@keyframes sq-in { from { opacity: 0; transform: scale(.6) rotate(-4deg); } to { opacity: 1; transform: none; } }
.su-sq:not(.is-answered):hover { border-color: var(--slate); transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 24px #2638411f; }
.su-sq:not(.is-answered):active { transform: scale(.97); transition-duration: .1s; }
.su-sq:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.su-sq-label { font-family: var(--serif); font-size: clamp(1.05rem, 3.2vw, 1.5rem); letter-spacing: -.01em; transition: opacity .25s; }
.su-saved { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; font-weight: 700; letter-spacing: .02em; color: var(--gold); opacity: 0; }
.su-tick { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.su-sq.is-answered .su-saved { opacity: 1; }
.su-sq.is-answered { background: var(--slate); border-color: var(--slate); color: #fff; cursor: default; }
.su-sq.is-answered .su-tick { opacity: 1; }
.su-sq.just-answered { animation: sq-flip .7s var(--smooth); }
.su-sq.just-answered .su-saved { animation: saved-in .4s ease-out .35s both; }
@keyframes saved-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@keyframes sq-flip { 0% { transform: rotateY(0); background: #fff; color: var(--slate); } 45% { transform: rotateY(90deg); background: #fff; color: var(--slate); } 55% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
@keyframes tick-draw { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }

/* Practice and weekly battles: blank tiles that flip from slate to gold, like Light Chase */
.su-board.is-blank .su-sq { border: 0; background: none; padding: 0; perspective: 700px; border-radius: 16px; }
.su-board.is-blank .su-sq.is-answered { background: none; }
.su-flip { position: absolute; inset: 0; border-radius: inherit; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.25, .8, .25, 1); }
.su-sq.is-answered .su-flip { transform: rotateY(180deg); }
.su-face { position: absolute; inset: 0; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: border-color .25s, box-shadow .3s, border-radius .65s var(--smooth); }
.su-face.off { background: radial-gradient(circle at 50% 38%, #3a5361, #283a43 72%); border: 1px solid #597583; box-shadow: inset 0 1px 1px #ffffff10, 0 6px 14px #26384122; }
.su-face.off::after { content: ""; position: absolute; inset: 27%; border: 1.5px solid rgba(246, 224, 159, .28); border-radius: 6px; transition: inset .4s var(--spring), border-color .3s; }
.su-face.on { transform: rotateY(180deg); background: radial-gradient(circle at 50% 38%, #fff6c9, #e8d7a3 55%, #d6c07c); border: 1px solid #ffefbe; box-shadow: 0 0 22px #ecd28240, inset 0 -3px 6px #b8a05a40; }
.su-face.on::after { content: ""; position: absolute; inset: 34%; border-radius: 4px; background: rgba(45, 66, 77, .82); }
.su-board.is-blank .su-sq:not(.is-answered):hover { transform: none; box-shadow: none; }
.su-board.is-blank .su-sq:not(.is-answered):hover .su-flip { transform: translateY(-5px) scale(1.03); transition-duration: .4s; }
.su-board.is-blank .su-sq:not(.is-answered):hover .su-face.off { border-color: #9fb4bf; box-shadow: inset 0 1px 1px #ffffff14, 0 14px 26px #26384133; }
.su-board.is-blank .su-sq:not(.is-answered):hover .su-face.off::after { inset: 22%; border-color: rgba(246, 224, 159, .6); }
.su-board.is-blank.is-merging .su-face { border-radius: 0; }

/* The merge: squares close up from the outside in, then the final question rises */
.su-board.is-merging { gap: 0; }
.su-board.is-merging .su-sq { border-radius: 0; transition-delay: calc((2 - var(--ring)) * 60ms); box-shadow: none; transform: none; }
.su-board.is-merging .su-sq > * { opacity: 0; transition: opacity .2s; }
.su-board.is-merged { gap: 0; opacity: 0; pointer-events: none; }
.su-boss { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 20px; background: var(--slate); color: #fff; cursor: pointer; font: inherit; box-shadow: 0 18px 40px #2638412e; transition: transform .45s var(--spring), box-shadow .35s; }
.su-boss::before { content: ""; position: absolute; inset: 14px; border: 2px solid rgba(246, 224, 159, .45); border-radius: 12px; pointer-events: none; }
.su-boss:not(:disabled):hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 26px 50px #26384138; }
.su-boss:disabled { cursor: default; }
.su-boss:focus-visible { outline: 4px solid var(--gold-deep); outline-offset: 4px; }
.su-boss.is-arriving { animation: boss-in .8s var(--spring); }
.su-boss.is-arriving::before { animation: glow 1.4s ease-out .2s; }
@keyframes boss-in { from { border-radius: 0; transform: scale(.985); } 60% { transform: scale(1.025); } to { border-radius: 20px; transform: none; } }
@keyframes glow { 0% { border-color: rgba(246, 224, 159, .45); box-shadow: 0 0 0 0 rgba(246, 224, 159, .5); } 40% { border-color: var(--gold); box-shadow: 0 0 0 10px rgba(246, 224, 159, 0); } 100% { border-color: rgba(246, 224, 159, .45); } }
.su-boss.is-arriving > span { animation: rise .5s ease-out both; }
.su-boss.is-arriving > span:nth-of-type(1) { animation-delay: .15s; }
.su-boss.is-arriving > span:nth-of-type(2) { animation-delay: .25s; }
.su-boss.is-arriving > span:nth-of-type(3) { animation-delay: .35s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.su-boss-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.su-boss-title { font-family: var(--serif); font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1; }
.su-boss-cta { margin-top: 6px; padding: 8px 18px; border-radius: 999px; background: var(--gold); color: var(--slate); font-weight: 700; font-size: .9rem; }
.su-boss:disabled .su-boss-cta { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }

/* Result */
.su-done { margin: 10px auto 0; max-width: 520px; text-align: center; background: #fff; border: 1px solid var(--rule); border-radius: 18px; padding: 26px 24px; animation: rise .5s ease-out; }
.su-done-kicker { margin: 0; font-size: .75rem !important; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #4b5b63 !important; }
.su-score { margin: 4px 0 12px; font-family: var(--serif); font-size: 4rem; line-height: 1; color: var(--slate) !important; }
.su-score small { display: block; font-family: var(--sans); font-size: .9rem; color: #55626a; margin-top: 4px; }
.su-done-grid { display: flex; justify-content: center; align-items: stretch; gap: 12px; margin-bottom: 14px; }
.su-done-squares { display: grid; grid-template-columns: repeat(3, 36px); grid-auto-rows: 36px; gap: 5px; }
.su-done-final { display: flex; }
.su-done-final > span { width: 52px; }
.su-done-grid span[title] { display: grid; place-items: center; border-radius: 7px; font-weight: 700; font-size: 1rem; }
.su-done-grid .is-right { background: var(--slate); color: var(--gold); }
.su-done-grid .is-wrong { background: #efeae0; color: #8a4a12; }
.su-done-final .is-right, .su-done-final .is-wrong { border: 2px solid var(--gold-deep); }
.su-done-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; margin-top: 14px; }

/* Question dialog */
.su-dialog { width: min(660px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; background: #fff; color: var(--slate); box-shadow: 0 30px 80px #1a262d55; }
.su-dialog::backdrop { background: rgba(31, 45, 53, .55); backdrop-filter: blur(3px); }
.su-dialog[open] { animation: q-in .35s var(--spring); }
@keyframes q-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.su-q { display: flex; flex-direction: column; max-height: inherit; }
.su-q-head { position: relative; padding: 22px 64px 14px 26px; border-bottom: 1px solid var(--rule); }
.su-dialog.is-boss .su-q-head { background: var(--slate); color: #fff; border-radius: 20px 20px 0 0; }
.su-q-tag { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #4b5b63; }
.su-dialog.is-boss .su-q-tag { color: var(--gold); }
.su-q-title { margin: 2px 0 0; font-size: 1.7rem; color: inherit; }
.su-q-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eef1f2; color: var(--slate); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.su-q-close:hover { background: #dfe5e8; }
.su-q-body { padding: 20px 26px; overflow-y: auto; }
.su-q-prompt { font-size: 1.08rem; line-height: 1.6; color: #22313a; margin: 0 0 14px; }
.su-fig { display: block; width: 160px; margin: 0 auto 16px; }
.su-fig rect, .su-fig polygon { fill: #fff; stroke: var(--slate); stroke-width: 2; }
.su-fig polygon.is-target { fill: var(--gold); }
.su-answer label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4b5b63; margin-bottom: 6px; }
.su-number { display: inline-flex; align-items: center; gap: 8px; }
.su-number span { font-weight: 700; font-size: 1.1rem; }
.su-q input[type="text"] { height: 48px; border: 1.5px solid #c7cfd3; border-radius: 10px; padding: 0 14px; font: inherit; font-size: 1.1rem; color: var(--slate); background: var(--cream); }
.su-q input[type="text"]:focus { outline: none; border-color: var(--slate); background: #fff; }
.su-q input[type="text"]:disabled { opacity: 1; color: var(--slate); }
.su-number input { width: 180px; }
.su-choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.su-choices label { position: relative; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 1rem; color: #22313a; cursor: pointer; }
.su-choices input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.su-choices span { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid #c7cfd3; border-radius: 12px; transition: background .2s, border-color .2s, transform .3s var(--spring); }
.su-choices b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e5ecef; font-size: .8rem; transition: background .2s, color .2s; }
.su-choices label:hover span { border-color: var(--slate); transform: translateX(3px); }
.su-choices input:checked + span { background: #fbf4d8; border-color: var(--gold-deep); }
.su-choices input:checked + span b { background: var(--slate); color: var(--gold); }
.su-choices input:focus-visible + span { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.su-shade { --cell: min(56px, calc((100vw - 110px) / var(--n))); display: grid; grid-template-columns: repeat(var(--n), var(--cell)); gap: 6px; justify-content: center; }
.su-shade button { width: var(--cell); height: var(--cell); border: 2px solid #c9c1b0; border-radius: 8px; background: #fff; cursor: pointer; transition: background .2s, border-color .2s, transform .3s var(--spring); }
.su-shade button:hover:not(:disabled) { border-color: var(--slate); }
.su-shade button[aria-pressed="true"] { background: var(--slate); border-color: var(--slate); transform: scale(.94); }
.su-shade button:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.su-magic { display: grid; grid-template-columns: repeat(3, 64px); gap: 6px; justify-content: center; }
.su-magic input[type="text"] { width: 64px; height: 64px; padding: 0; text-align: center; font-family: var(--serif); font-size: 1.7rem; }
.su-magic input.is-given { background: var(--slate); color: var(--gold); border-color: var(--slate); }
.su-expr { width: 100%; font-family: var(--serif) !important; letter-spacing: .02em; }
.su-expr-value { min-height: 1.5em; margin: 6px 0 10px; font-weight: 700; color: #4b5b63; }
.su-keypad { display: grid; gap: 6px; }
.su-keys-nums { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.su-keys-ops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.su-keypad button { height: 46px; border: 1.5px solid #c7cfd3; border-radius: 10px; background: #fff; color: var(--slate); font: 700 1.1rem var(--sans); cursor: pointer; transition: transform .25s var(--spring), opacity .2s, border-color .2s; }
.su-keypad button.is-num { background: var(--slate); border-color: var(--slate); color: var(--gold); }
.su-keypad button:hover:not(:disabled) { border-color: var(--slate); transform: translateY(-2px); }
.su-keypad button:disabled { opacity: .3; cursor: default; }
.su-keypad [data-key="clear"] { font-size: .9rem; }

/* Animated puzzle: pouring jugs */
.su-jug-row { display: flex; justify-content: center; align-items: flex-end; gap: clamp(18px, 6vw, 48px); }
.su-jug-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.su-jug-frame { height: 190px; display: flex; align-items: flex-end; }
.su-jug { position: relative; width: 86px; height: calc(var(--fill) * 180px); border: 3px solid var(--slate); border-top-width: 0; border-radius: 0 0 14px 14px; background: linear-gradient(90deg, #f8f6f1, #fff); overflow: hidden; }
.su-water { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(180deg, #7fb2c8, #4f8aa6); transition: height .6s var(--smooth); }
.su-water::before { content: ""; position: absolute; left: -10%; right: -10%; top: -4px; height: 8px; border-radius: 50%; background: #9cc6d8; opacity: .8; }
.su-jug-amount { position: absolute; left: 0; right: 0; top: 8px; text-align: center; font-weight: 700; color: var(--slate); font-size: .95rem; }
.su-jug-col[data-jug="a"].is-pouring .su-jug { animation: tilt-right .7s var(--smooth); transform-origin: 100% 100%; }
.su-jug-col[data-jug="b"].is-pouring .su-jug { animation: tilt-left .7s var(--smooth); transform-origin: 0 100%; }
@keyframes tilt-right { 0%, 100% { transform: none; } 40%, 60% { transform: rotate(14deg); } }
@keyframes tilt-left { 0%, 100% { transform: none; } 40%, 60% { transform: rotate(-14deg); } }
.su-jug-name { margin: 0; font-weight: 700; font-size: .9rem; color: var(--slate) !important; }
.su-jug-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 220px; }
.su-jug-actions button { padding: 6px 12px; border: 1.5px solid #c7cfd3; border-radius: 999px; background: #fff; color: var(--slate); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; transition: border-color .2s, transform .25s var(--spring), background .2s; }
.su-jug-actions button:hover:not(:disabled) { border-color: var(--slate); transform: translateY(-2px); }
.su-jug-actions button:active:not(:disabled) { transform: scale(.95); }
.su-jug-actions [data-act^="pour"] { background: #fbf4d8; border-color: var(--gold-deep); }
.su-puzzle-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.su-puzzle-status { margin: 0; font-size: .9rem; color: #4b5b63 !important; }

/* Animated puzzle: swap the counters */
.su-swap-track { --slot: min(62px, calc((100vw - 110px) / var(--slots))); position: relative; display: grid; grid-template-columns: repeat(var(--slots), var(--slot)); justify-content: center; margin: 26px auto 0; height: var(--slot); width: max-content; }
.su-swap-slot { border-bottom: 4px solid #c9c1b0; margin: 0 4px; }
.su-counter { position: absolute; top: 6%; left: calc(var(--pos) * var(--slot) + var(--slot) * .1); width: calc(var(--slot) * .8); height: calc(var(--slot) * .8); border-radius: 50%; border: 0; font: inherit; cursor: pointer; transition: left .45s var(--smooth); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); }
.su-counter.is-g { background: var(--gold-deep); }
.su-counter.is-s { background: var(--slate); }
.su-counter:hover:not(:disabled) { filter: brightness(1.08); }
.su-counter:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.su-counter.is-hopping { animation: hop .45s var(--smooth); }
.su-counter.is-sliding { animation: squash .45s ease-out; }
.su-counter.is-stuck { animation: shake .35s ease-in-out; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-120%) scale(1.05); } }
@keyframes squash { 0% { transform: none; } 30% { transform: scale(1.08, .92); } 100% { transform: none; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.su-q-foot { padding: 14px 26px 22px; border-top: 1px solid var(--rule); }
.su-q-feedback { min-height: 1.4em; margin: 0 0 10px; font-weight: 700; }
.su-q-feedback:empty { margin: 0; min-height: 0; }
.su-q-feedback.is-locked { color: var(--slate); animation: rise .35s ease-out; }
.su-q-feedback.is-error { color: #a43a26; }
.su-q-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; }

/* Figures */
.su-fig-wide { width: min(100%, 340px); }
.su-fig-mid { width: min(100%, 240px); }
.su-fig .f-die, .su-fig .f-die-top, .su-fig .f-die-side { stroke: var(--slate); stroke-width: 2; stroke-linejoin: round; }
.su-fig .f-die polygon { fill: #fff; } .su-fig .f-die-top polygon { fill: #fbf4d8; } .su-fig .f-die-side polygon { fill: #e9e4d8; }
.su-fig .f-die circle, .su-fig .f-die-top circle, .su-fig .f-die-side circle { fill: var(--slate); stroke: none; }
.su-fig rect.f-cell { fill: #fff; stroke: #c9c1b0; stroke-width: 1.5; }
.su-fig .f-arrow { stroke: var(--slate); stroke-width: 3; stroke-linecap: round; }
.su-fig .f-arrowhead { fill: var(--slate); }
.su-fig .f-start { fill: var(--gold-deep); }
.su-fig .f-compass line { stroke: var(--slate); stroke-width: 2; }
.su-fig text { font-size: 12px; font-weight: 700; fill: var(--slate); }
.su-fig rect.f-tray { fill: #f8f6f1; stroke: var(--slate); stroke-width: 2; }
.su-fig .f-red { fill: #c0503f; } .su-fig .f-blue { fill: #3f6fa8; }
.su-fig .f-face { fill: #fff; stroke: var(--slate); stroke-width: 3; }
.su-fig .f-tick { stroke: var(--slate); stroke-width: 2; }
.su-fig .f-hour, .su-fig .f-minute { stroke: var(--slate); stroke-linecap: round; } .su-fig .f-hour { stroke-width: 6; } .su-fig .f-minute { stroke-width: 3.5; stroke: var(--gold-deep); }
.su-fig .f-pin { fill: var(--slate); }
.su-fig .f-stand, .su-fig .f-beam, .su-fig .f-pan { stroke: var(--slate); stroke-width: 3; stroke-linecap: round; fill: none; }
.su-fig .f-circle { fill: var(--gold); stroke: var(--slate); stroke-width: 1.5; }
.su-fig rect.f-square, .su-fig rect.f-weight { fill: var(--slate); stroke: none; }
.su-fig .f-weight-text { fill: #fff; }
.su-fig polygon.f-shape { fill: #fff; stroke: var(--slate); stroke-width: 2.5; }
.su-fig .f-diag { stroke: var(--gold-deep); stroke-width: 2.5; stroke-dasharray: 5 4; }
.su-fig .f-person { fill: var(--slate); }
.su-fig rect.f-brick { fill: #fff; stroke: var(--slate); stroke-width: 2; } .su-fig rect.f-brick.is-missing { fill: #fbf4d8; }
.su-fig .f-brick-text { font-size: 15px; }
.su-fig .f-line { stroke: var(--slate); stroke-width: 2.2; stroke-linecap: round; }
.su-fig rect.f-red-die { fill: #c0503f; stroke: none; } .su-fig rect.f-blue-die { fill: #3f6fa8; stroke: none; }
.su-fig .f-dice-q { fill: #fff; font-size: 34px; }
.su-fig .f-edge { stroke: var(--slate); stroke-width: 2.4; stroke-linecap: round; }
.su-fig .f-hidden { stroke: #9aa7ad; stroke-width: 1.6; stroke-dasharray: 4 4; }
.su-fig .f-gold { stroke: var(--gold-deep); stroke-width: 4; stroke-linecap: round; }
.su-fig .f-corner { fill: var(--slate); }
.su-seq { display: block; margin-top: 10px; font-size: 1.35rem; font-weight: 700; letter-spacing: .04em; color: var(--slate); }
.su-cube .su-fig { width: 200px; }
.su-cube-turn { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -6px 0 16px; font-size: .85rem; font-weight: 700; color: var(--slate); }
.su-cube-turn input { width: 170px; accent-color: var(--slate); }

/* Two trays you can split */
.su-trays { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 18px; }
.su-tray { border: 2px solid var(--slate); border-radius: 16px; background: #f8f6f1; padding: 10px 10px 12px; min-height: 150px; transition: background .2s, box-shadow .2s; }
.su-tray.is-over { background: #fbf4d8; box-shadow: 0 0 0 4px var(--gold); }
.su-tray-name { margin: 0 0 8px; font-weight: 700; font-size: .9rem; color: var(--slate) !important; }
.su-tray-name span { font-weight: 400; color: #4a5a62; }
.su-tray-group { display: grid; grid-template-columns: repeat(10, 18px); gap: 5px; justify-content: start; }
.su-tray-group + .su-tray-group { margin-top: 9px; }
.su-tray-group:empty { display: none; }
.su-counter-dot { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 0; cursor: grab; transition: transform .2s var(--spring); }
.su-counter-dot.is-red { background: #c0503f; } .su-counter-dot.is-blue { background: #3f6fa8; }
.su-counter-dot:hover { transform: scale(1.25); }
.su-counter-dot:focus-visible { outline: 2px solid var(--slate); outline-offset: 2px; }
.su-trays-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.su-tray-note { margin: 0; font-size: .88rem; color: #4a5a62; }
.su-tray-note.is-off { color: #8a4a1a; font-weight: 700; }
.is-dragging { opacity: .3; }
.su-ghost { opacity: .95 !important; transform: scale(1.15); box-shadow: 0 8px 18px rgba(45, 66, 77, .3); cursor: grabbing; transition: none !important; animation: none !important; }
.su-hang.is-over .su-pan-dish, .su-coin-row.is-over { background: rgba(246, 224, 159, .45); border-radius: 12px; }
.su-coin, .su-chip, .su-counter-dot { touch-action: none; user-select: none; -webkit-user-select: none; }
.su-chip { cursor: grab; }

/* New pure maths figures */
.su-fig rect.f-cell-on { fill: var(--gold); stroke: var(--slate); stroke-width: 1.5; }
.su-fig .f-dot { fill: var(--slate); }
.su-fig polygon.f-tri { fill: rgba(246, 224, 159, .7); stroke: var(--slate); stroke-width: 2.5; stroke-linejoin: round; }
.su-fig .f-hidden-q { fill: #9aa7ad; font-size: 16px; }
.su-fig .f-total { font-size: 15px; } .su-fig .f-total.is-missing { fill: var(--gold-deep); font-size: 18px; }
.su-bar { display: inline-flex; gap: 2px; vertical-align: middle; }
.su-bar i { width: 16px; height: 22px; border: 1.5px solid var(--slate); background: #fff; border-radius: 2px; }
.su-bar i.on { background: var(--slate); }
.su-tool-hint { margin: 0 0 8px; text-align: center; font-size: .85rem; color: #4a5a62 !important; }
.su-tool-count { margin: 6px 0 14px; text-align: center; font-size: .9rem; font-weight: 700; color: var(--slate) !important; }

/* Two-dice working grid */
.su-dicegrid table { margin: 0 auto; border-collapse: separate; border-spacing: 4px; }
.su-dicegrid th { font-size: .8rem; color: var(--slate); padding: 0 4px; }
.su-dicegrid .is-red { color: #a8432f; } .su-dicegrid .is-blue { color: #335f96; }
.su-dicegrid td button { width: clamp(30px, 8vw, 40px); height: clamp(30px, 8vw, 40px); border: 1.5px solid #c7cfd3; border-radius: 8px; background: #fff; font: inherit; font-weight: 700; color: var(--slate); cursor: pointer; transition: background .15s, transform .2s var(--spring); }
.su-dicegrid td button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold-deep); transform: scale(1.06); }
/* Dice: grid and answer side by side, so the question, grid and answer fit without scrolling (Max, 30 Nov). */
@media (min-width: 640px) {
  .su-q-body:has(> .su-dicegrid) { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 40px; }
  .su-q-body:has(> .su-dicegrid) > .su-q-prompt { grid-column: 1 / -1; }
  .su-q-body:has(> .su-dicegrid) > .su-answer { margin: 0; }
  .su-dicegrid td button { width: 36px; height: 36px; }
  .su-dicegrid table { border-spacing: 3px; }
}

/* Drawing handshakes or diagonals */
.su-connect .su-fig { width: 200px; }
.su-fig .f-person, .su-fig .f-corner-dot { cursor: pointer; transition: fill .15s; }
.su-fig .f-corner-dot { fill: var(--slate); }
.su-fig .f-person.is-chosen, .su-fig .f-corner-dot.is-chosen { fill: var(--gold-deep); }
.su-fig .f-drawn { stroke: var(--gold-deep); stroke-width: 2.5; stroke-linecap: round; }
.su-fig [data-point]:focus { outline: none; }
.su-fig [data-point]:focus-visible { stroke: var(--gold-deep); stroke-width: 3; }

/* Routes on a grid */
.su-fig .f-gridline { stroke: #b9c3c8; stroke-width: 2; }
.su-fig .f-finish { fill: var(--slate); }
.su-fig .f-block line { stroke: #b2402e; stroke-width: 3.5; stroke-linecap: round; }

/* Number pyramid with working space */
.su-pyramid { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 14px; }
.su-brick-row { display: flex; gap: 4px; }
.su-pyramid.is-wide .su-brick { width: clamp(44px, 12vw, 58px); }
.su-brick { display: grid; place-items: center; width: 58px; height: 40px; border: 2px solid var(--slate); background: #fff; font-weight: 700; font-size: 1.05rem; color: var(--slate); }
.su-brick.is-missing { background: #fbf4d8; color: var(--gold-deep); font-size: 1.2rem; }
input.su-brick.is-work { padding: 0; text-align: center; font: inherit; font-weight: 700; color: #4a5a62; background: #f8f6f1; border-style: dashed; }
input.su-brick.is-work:focus { outline: none; background: #fff; border-style: solid; }

/* Number tiles: magic square and prime ring */
.su-place { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.su-place.is-grid .su-slots { display: grid; grid-template-columns: repeat(3, 66px); gap: 8px; }
.su-place.is-ring .su-slots { position: relative; width: min(100%, 280px); aspect-ratio: 1; }
.su-ring-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.su-ring-lines line { stroke: #c7cfd3; stroke-width: .8; }
.su-ring-lines text { font-size: 5px; font-weight: 700; fill: var(--gold-deep); text-anchor: middle; }
.su-slot { width: 66px; height: 66px; border: 2px dashed #b9c3c8; border-radius: 12px; background: #fff; font-family: var(--serif); font-size: 1.7rem; color: var(--slate); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--spring); }
.su-place.is-ring .su-slot { position: absolute; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; }
.su-slot.is-filled { border-style: solid; border-color: var(--slate); }
.su-slot.is-given { background: var(--slate); border: 2px solid var(--slate); color: var(--gold); cursor: default; }
.su-slot.is-over { background: #fbf4d8; border-color: var(--gold-deep); transform: scale(1.06); }
.su-tile-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 52px; padding: 6px 10px; border-radius: 14px; background: #f8f6f1; transition: background .2s; }
.su-tile-tray.is-over { background: #fbf4d8; }
.su-tile-tray:empty { display: none; }
.su-tile { width: 46px; height: 46px; border: 2px solid var(--gold-deep); border-radius: 10px; background: var(--gold); font-family: var(--serif); font-size: 1.4rem; color: var(--slate); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .2s var(--spring), box-shadow .2s; }
.su-tile:hover { transform: translateY(-2px); }
.su-tile.is-selected { box-shadow: 0 0 0 3px var(--slate); transform: translateY(-3px); }
.su-slot { touch-action: none; user-select: none; -webkit-user-select: none; }

/* Tile layouts: products grid, difference triangle, equation strip */
.su-place.is-grid .su-slots.has-labels { grid-template-columns: repeat(3, 62px) auto; align-items: center; }
.su-place.is-grid .su-slots.has-labels .su-slot { width: 62px; height: 62px; }
.su-slot-label { font-weight: 700; color: var(--slate); font-size: .95rem; }
.su-slot-label.is-row { padding-left: 8px; white-space: nowrap; }
.su-slot-label.is-col { text-align: center; padding-top: 2px; }
.su-slot-label.is-col::before { content: "× "; color: #6b7a81; font-weight: 400; }
.su-place.is-pyramid .su-slots { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.su-slot-row { display: flex; gap: 8px; }
.su-place.is-pyramid .su-slot { width: 58px; height: 58px; }
.su-place.is-equation .su-slots { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.su-place.is-equation .su-slot { width: 52px; height: 58px; }
.su-eq-op { font-family: var(--serif); font-size: 1.6rem; color: var(--slate); padding: 0 2px; }

/* Crossnumber */
.su-cross { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: center; }
.su-cross-grid { display: grid; grid-template-columns: repeat(2, 64px); gap: 0; border: 3px solid var(--slate); }
.su-cross-cell { position: relative; display: block; width: 64px; height: 64px; border: 1.5px solid var(--slate); }
.su-cross-cell b { position: absolute; top: 3px; left: 5px; font-size: .72rem; color: var(--slate); }
.su-q .su-cross-cell input[type="text"] { width: 100%; height: 100%; border: 0; border-radius: 0; padding: 0; text-align: center; font-family: var(--serif); font-size: 1.8rem; background: #fff; }
.su-cross-clues p { margin: 0 0 4px; font-size: .95rem; color: var(--slate) !important; }

/* Bigger targets on touch screens (iPad, phones) */
@media (pointer: coarse) {
  .su-counter-dot { width: 24px; height: 24px; }
  .su-tray-group { grid-template-columns: repeat(10, 24px); gap: 4px; }
  .su-coin { width: 48px; height: 48px; }
  .su-pick span { width: 42px; height: 42px; }
  .su-jug-actions button { padding: 10px 14px; }
}
@media (max-width: 420px) {
  .su-tray-group { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .su-counter-dot { width: 100%; height: auto; aspect-ratio: 1; }
}

/* Pancakes */
.su-pancakes { display: flex; flex-direction: column; align-items: center; }
.su-pan-stack { display: flex; flex-direction: column; align-items: center; gap: 5px; width: min(100%, 300px); perspective: 600px; }
.su-pancake { width: var(--w); height: 26px; border: 2px solid #8a5a2b; border-radius: 999px; background: linear-gradient(#e8b26a, #c98a42); cursor: pointer; transition: box-shadow .2s, filter .2s; }
.su-pancake.will-flip { filter: brightness(1.08); box-shadow: 0 0 0 3px var(--gold), 0 4px 10px rgba(45, 66, 77, .2); }
.su-pancake:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }
.su-pan-plate { width: min(100%, 330px); height: 10px; margin-top: 6px; border-radius: 0 0 999px 999px; background: var(--slate); }

/* Coins and the balance scale */
.su-scale { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.su-balance { position: relative; width: min(100%, 320px); height: 150px; --tilt: 0deg; }
.su-balance[data-tilt="left"] { --tilt: -9deg; } .su-balance[data-tilt="right"] { --tilt: 9deg; }
.su-beam { position: absolute; left: 8%; right: 8%; top: 28px; height: 6px; border-radius: 3px; background: var(--slate); transform: rotate(var(--tilt)); transition: transform .7s var(--spring); }
.su-balance.is-wobble .su-beam { animation: wobble .7s ease-in-out; }
@keyframes wobble { 30% { transform: rotate(4deg); } 65% { transform: rotate(-2.5deg); } }
.su-hang { position: absolute; top: 3px; width: 96px; height: 62px; border-left: 2px solid #8b989e; border-right: 2px solid #8b989e; transform: rotate(calc(-1 * var(--tilt))); transform-origin: 50% 0; transition: transform .7s var(--spring); }
.su-hang.is-left { left: -48px; } .su-hang.is-right { right: -48px; }
.su-balance.is-wobble .su-hang { animation: unwobble .7s ease-in-out; }
@keyframes unwobble { 30% { transform: rotate(-4deg); } 65% { transform: rotate(2.5deg); } }
.su-pan-dish { position: absolute; left: -10px; right: -10px; bottom: -6px; min-height: 18px; display: flex; flex-wrap: wrap-reverse; justify-content: center; align-items: flex-end; gap: 2px; padding: 0 6px 4px; border-bottom: 5px solid var(--slate); border-radius: 0 0 40px 40px; }
.su-post { position: absolute; left: 50%; top: 22px; bottom: 0; width: 6px; margin-left: -3px; background: var(--slate); border-radius: 3px; }
.su-post::after { content: ""; position: absolute; left: -34px; right: -34px; bottom: 0; height: 6px; border-radius: 3px; background: var(--slate); }
.su-chip { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 1.5px solid var(--gold-deep); font-size: .72rem; font-weight: 700; color: var(--slate); animation: chip-in .35s var(--spring); }
@keyframes chip-in { from { transform: translateY(-14px) scale(.6); opacity: 0; } }
.su-coin-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.su-coin { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--gold-deep); background: radial-gradient(circle at 40% 35%, #fff2c4, var(--gold)); color: var(--slate); font: inherit; font-weight: 700; cursor: pointer; transition: transform .25s var(--spring), opacity .2s; }
.su-coin:hover { transform: translateY(-3px); }
.su-coin[data-place="left"], .su-coin[data-place="right"] { opacity: .45; }
.su-coin[data-place="left"]::after, .su-coin[data-place="right"]::after { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--slate); color: #fff; font-size: .7rem; }
.su-coin[data-place="left"]::after { content: "L"; } .su-coin[data-place="right"]::after { content: "R"; }
.su-scale-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.su-weigh-log { margin: 0; padding-left: 1.2em; font-size: .88rem; color: var(--slate); }
.su-weigh-log:empty { display: none; }
.su-weigh-log span { color: #6b7a81; }
.su-pick { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.su-pick legend { width: 100%; margin-bottom: 6px; text-align: center; font-weight: 700; color: var(--slate); }
.su-pick label { cursor: pointer; }
.su-pick input { position: absolute; opacity: 0; }
.su-pick span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid #c7cfd3; background: #fff; font-weight: 700; color: var(--slate); transition: background .2s, border-color .2s; }
.su-pick input:checked + span { background: var(--slate); border-color: var(--slate); color: var(--gold); }
.su-pick input:focus-visible + span { outline: 2px solid var(--slate); outline-offset: 2px; }

@media (max-width: 620px) {
  .su-trays { grid-template-columns: 1fr; }
  .su-stage-top { flex-wrap: wrap; gap: 12px; }
  .su-sticker { position: static; display: flex; width: max-content; margin: 0 auto; }
}
@media (max-width: 900px) {
}
@media (max-width: 520px) {
  .su-page { padding-block: 22px 64px; }
  .su-cards { grid-template-columns: 1fr; }
  .su-board { gap: 8px; }
  .su-sq { border-radius: 12px; }
  .su-battle-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .su-q-head { padding: 18px 56px 12px 18px; }
  .su-q-body { padding: 16px 18px; }
  .su-q-foot { padding: 12px 18px 18px; }
  .su-jug-frame { height: 150px; }
  .su-jug { width: 70px; height: calc(var(--fill) * 140px); }
}
@media (prefers-reduced-motion: reduce) {
  .su-beam, .su-hang, .su-chip { transition: none; animation: none !important; }
  .su-page *, .su-dialog, .su-dialog * { animation: none !important; transition: none !important; }
}

/* Bags of counters (probability) */
.su-bags { margin-top: 14px; }
.su-bag-row { display: grid; gap: 14px; }
.su-bags.is-two .su-bag-row { grid-template-columns: 1fr 1fr; }
.su-bag { background: #f7f5ef; border: 2px solid var(--slate); border-radius: 18px 18px 26px 26px; padding: 12px 14px 14px; }
.su-bag-name { margin: 0 0 8px; font-weight: 700; color: var(--slate); }
.su-bag-name span { font-weight: 400; font-size: 0.85rem; color: #56656c; }
.su-bag-body { display: flex; flex-wrap: wrap; gap: 5px; min-height: 52px; align-content: flex-start; padding: 8px; border-radius: 12px; background: #fff; border: 1px dashed #b9c4c8; margin-bottom: 10px; }
.su-bag-dot { width: 18px; height: 18px; border-radius: 50%; }
.su-bag-dot.is-red, .su-bag-key.is-red { background: #c0503f; }
.su-bag-dot.is-blue, .su-bag-key.is-blue { background: #3f6fa8; }
.su-bag-empty { color: #8a979c; font-size: 0.9rem; align-self: center; }
.su-bag-key { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; }
.su-stepper { display: grid; grid-template-columns: auto 1fr 44px 2.2em 44px; align-items: center; gap: 6px; margin-top: 6px; }
.su-stepper b { text-align: center; font-size: 1.15rem; color: var(--slate); }
.su-stepper button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--slate); background: #fff; color: var(--slate); font-size: 1.4rem; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.su-stepper button:hover:not(:disabled) { background: var(--gold); }
.su-stepper button:disabled { opacity: 0.35; cursor: default; }
.su-stepper button:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.su-bag-count { margin: 6px 0 0; color: var(--slate); }
@media (max-width: 560px) { .su-bags.is-two .su-bag-row { grid-template-columns: 1fr; } }

/* Board frame (26 Nov): the grid sits in the same framed board as the
   Explore puzzles and the home-page puzzle: a beige rim around a dark slate
   panel, with tiles inside. */
.su-arena {
  --rim: clamp(12px, 2.6vw, 22px);
  --pad: clamp(10px, 2.2vw, 16px);
  width: min(100% - 2 * var(--rim), 480px, calc(100dvh - 450px));
  min-width: min(100% - 2 * var(--rim), 280px);
  margin: calc(var(--rim) + 8px) auto calc(var(--rim) + 6px);
  border-radius: 22px;
  background: radial-gradient(circle at 50% 35%, #2f4450, #23333b 75%);
  box-shadow: 0 0 0 var(--rim) #ddd6c7, 0 0 0 calc(var(--rim) + 1px) #cfc7b6, 0 16px 32px rgba(45, 66, 77, .18);
}
.su-board { inset: var(--pad); grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: clamp(7px, 1.6vw, 11px); }
.su-boss { inset: var(--pad); }
/* Labelled tiles (warm-up): cream tiles on the dark panel. The label never
   resizes the tile: it wraps inside a fixed square, and long words shrink. */
.su-sq { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #e9dfc6; border-radius: 12px; background: radial-gradient(circle at 50% 38%, #fffdf8, #f3ecdc); box-shadow: inset 0 -3px 6px #d9cba640; }
.su-sq:not(.is-answered):hover { border-color: #fff; box-shadow: 0 10px 22px #0000004d, inset 0 -3px 6px #d9cba640; transform: translateY(-3px) scale(1.04); }
.su-sq-label { display: block; max-width: 100%; padding: 0 8%; text-align: center; line-height: 1.15; font-size: clamp(.82rem, 2.6vw, 1.3rem); overflow-wrap: normal; word-break: keep-all; hyphens: none; }
.su-sq.is-answered { background: radial-gradient(circle at 50% 38%, #fff6c9, #e8d7a3 55%, #d6c07c); border-color: #ffefbe; color: var(--slate); box-shadow: 0 0 18px #ecd28233, inset 0 -3px 6px #b8a05a40; }
.su-sq.is-answered .su-sq-label { opacity: .25; }
.su-sq .su-saved { color: var(--slate); }
.su-board.is-blank .su-sq { border: 0; background: none; box-shadow: none; overflow: visible; }
.su-board.is-blank .su-face { border-radius: 12px; }
.su-board.is-merging .su-sq, .su-board.is-blank.is-merging .su-face { border-radius: 0; }
@media (max-width: 560px) { .su-arena { --rim: 10px; border-radius: 16px; } .su-sq, .su-board.is-blank .su-face { border-radius: 9px; } }

/* Founders' page note */
.su-founders-note { max-width: 1200px; margin: 0 auto 18px; padding: 12px 16px; border-left: 4px solid var(--gold-deep); border-radius: 8px; background: #fff8e1; color: var(--slate); font-size: .9rem; line-height: 1.5; }

/* Points on the result grid: full marks, part marks, none, not answered */
.su-done-grid .is-part { background: var(--gold); color: var(--slate); }
.su-done-grid .is-missed { background: transparent; color: #8a979c; border: 1px dashed #b9c4c8; }
.su-done-final .is-part, .su-done-final .is-missed { border: 2px solid var(--gold-deep); }
.su-done-grid > div > span { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Round timer and start screen */
.su-timer { margin: 0 0 8px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--slate); color: var(--slate); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.su-timer.is-low { background: #fff1ec; border-color: #c0503f; color: #9a3a2c; }
.su-start { max-width: 560px; margin: 18px auto 10px; padding: 26px 28px; text-align: center; background: #fff; border: 1px solid var(--line, #e5e2da); border-radius: 18px; box-shadow: 0 14px 30px rgba(45, 66, 77, .08); }
.su-start-kicker { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #56656c; }
.su-start-text { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.6; color: var(--slate); }
.su-start-note { margin: 0 0 18px; font-size: .9rem; color: #56656c; }

/* Brackets: a calculation with a gap before and after each number */
.su-brackets { margin-top: 14px; }
.su-br-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px; padding: 18px 12px; border-radius: 16px; background: radial-gradient(circle at 50% 35%, #2f4450, #23333b 75%); box-shadow: 0 0 0 8px #ddd6c7, 0 0 0 9px #cfc7b6; margin: 10px 9px 16px; font-family: var(--serif); color: #fffdf8; }
.su-br-num { font-size: clamp(1.5rem, 4.6vw, 2.1rem); min-width: .7em; text-align: center; }
.su-br-op { font-size: clamp(1.3rem, 3.8vw, 1.8rem); color: #f3dfa0; padding: 0 2px; }
.su-br-eq { font-size: clamp(1.3rem, 3.8vw, 1.8rem); margin-left: 8px; color: #fffdf8; }
.su-br-eq b { color: #f3dfa0; font-weight: 400; }
.su-br-slot { min-width: 26px; height: 52px; padding: 0 2px; border: 1.5px dashed rgba(246, 224, 159, .35); border-radius: 8px; background: transparent; color: #f6e09f; font: inherit; font-size: clamp(1.5rem, 4.6vw, 2.1rem); line-height: 1; cursor: pointer; touch-action: manipulation; transition: border-color .15s, background .15s; }
.su-br-slot:hover, .su-br-slot.is-over { border-color: #f6e09f; background: rgba(246, 224, 159, .12); }
.su-br-slot.is-filled { border-style: solid; border-color: transparent; }
.su-br-slot:focus-visible { outline: 2px solid #f6e09f; outline-offset: 2px; }
.su-br-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 56px; margin-bottom: 6px; }
.su-br-piece { width: 48px; height: 56px; border: 1px solid #e9dfc6; border-radius: 12px; background: radial-gradient(circle at 50% 38%, #fff6c9, #e8d7a3 60%, #d6c07c); color: var(--slate); font-family: var(--serif); font-size: 2rem; line-height: 1; cursor: grab; box-shadow: 0 4px 10px rgba(45, 66, 77, .15); }
.su-br-piece:active { cursor: grabbing; }
.su-br-empty { align-self: center; color: #56656c; font-size: .9rem; }
@media (max-width: 480px) { .su-br-slot { min-width: 20px; height: 44px; } .su-br-row { padding: 14px 6px; } }
/* Quieter gaps: thin until hovered, dragged over or filled */
.su-br-row { gap: 4px 6px; }
.su-br-term { display: inline-flex; align-items: center; white-space: nowrap; }
.su-br-slot { min-width: 16px; height: 48px; border: 0; border-radius: 6px; background: rgba(246, 224, 159, .08); }
.su-br-slot:not(.is-filled)::after { content: ''; display: block; width: 2px; height: 26px; margin: auto; border-radius: 2px; background: rgba(246, 224, 159, .35); }
.su-br-slot:hover, .su-br-slot.is-over { background: rgba(246, 224, 159, .22); }
.su-br-slot.is-filled { background: transparent; }
.su-br-row:has(.su-br-piece.is-dragging) .su-br-slot { background: rgba(246, 224, 159, .16); }
@media (max-width: 480px) { .su-br-slot { min-width: 14px; height: 42px; } }

/* Live checks (26 Nov): gold when a line is right, red when full but wrong */
.su-slot-label.is-ok { background: #f3dfa0; color: var(--slate); border-radius: 8px; }
.su-slot-label.is-bad { background: #fbe4df; color: #9a3a2c; border-radius: 8px; }
.su-slot.is-ok { box-shadow: inset 0 0 0 3px #e0c46d; }
.su-slot.is-bad { box-shadow: inset 0 0 0 3px #d9786a; }
.su-ring-lines line.is-ok { stroke: #e0c46d; stroke-width: 1.6; }
.su-ring-lines line.is-bad { stroke: #d9786a; stroke-width: 1.6; stroke-dasharray: 2 1.5; }
.su-ring-lines text.is-ok { fill: #8a6a12; font-weight: 700; }
.su-ring-lines text.is-bad { fill: #9a3a2c; font-weight: 700; }
.su-shade button.is-clash { outline: 3px solid #d9786a; outline-offset: -3px; }
.su-shade-note { margin-top: 8px; text-align: center; }

/* Weighing: coins ruled out grey out */

/* Jugs: number line of amounts measured so far */
.su-reached { margin: 14px 0 4px; }
.su-reached p { margin: 0 0 6px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #56656c; text-align: center; }
.su-reached ol { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.su-reached li { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid #d7dfe2; color: #8a979c; font-variant-numeric: tabular-nums; font-size: .9rem; }
.su-reached li.is-target { border: 2px dashed var(--gold-deep); color: var(--slate); }
.su-reached li.is-reached { background: #3f6fa8; border-color: #3f6fa8; color: #fff; font-weight: 700; }
.su-reached li.is-reached.is-target { background: var(--gold); border-color: var(--gold-deep); color: var(--slate); }

/* Plan-ahead sticker on puzzles scored by moves */
.su-plan-sticker { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 12px; padding: 7px 14px; border-radius: 999px; background: var(--gold); color: var(--slate); font-size: .86rem; font-weight: 700; line-height: 1.35; box-shadow: 0 3px 8px rgba(45, 66, 77, .14); transform: rotate(-1.2deg); }
.su-plan-sticker svg { flex: none; fill: none; stroke: var(--slate); stroke-width: 1.8; stroke-linecap: round; }
@media (max-width: 480px) { .su-plan-sticker { border-radius: 14px; font-size: .82rem; } }

/* Magic square: live totals at the edges, no × sign */
.su-slots.is-sums .su-slot-label.is-col::before { content: none; }
.su-slots.is-sums .su-slot-label { color: #56656c; font-weight: 600; text-align: center; }
.su-slots.is-sums .su-slot-label.is-ok { color: var(--slate); }

/* Fraction entry: numerator over denominator */
.su-frac-label { display: block; margin-bottom: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #56656c; }
.su-frac { display: inline-grid; justify-items: center; gap: 6px; }
.su-frac input { width: 5.5rem; height: 48px; text-align: center; font-size: 1.3rem; border: 2px solid var(--slate); border-radius: 10px; }
.su-frac-line { width: 6.2rem; height: 3px; border-radius: 2px; background: var(--slate); }

/* Put in order */
.su-order { margin-top: 12px; }
.su-order-end { margin: 4px 0; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #56656c; text-align: center; }
.su-order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.su-order-item { display: grid; grid-template-columns: 34px 1fr 44px 44px; align-items: center; gap: 6px; padding: 6px 8px; border: 2px solid var(--slate); border-radius: 12px; background: #fff; }
.su-order-grip { display: grid; place-items: center; height: 40px; color: #8a979c; font-size: 1.3rem; cursor: grab; touch-action: none; }
.su-order-text { font-family: var(--serif); font-size: 1.2rem; color: var(--slate); }
.su-order-item button { height: 40px; border: 1px solid #c9d3d7; border-radius: 10px; background: #f6f3ec; font-size: 1.1rem; cursor: pointer; }
.su-order-item button:disabled { opacity: .3; cursor: default; }
.su-order-item.is-over { border-color: var(--gold-deep); background: #fff8e1; }

/* Working tools and new pictures */
.su-fig .f-label { font-size: 11px; fill: #56656c; }
.su-fig .f-label.is-strong { font-size: 15px; fill: var(--slate); font-weight: 700; }
.su-fig .f-shape.is-after { fill: #f3dfa060; }
.su-fig .f-ghost { fill: none; stroke: #8a979c; stroke-dasharray: 4 3; }
.su-fig .f-bar { fill: #f1ede4; stroke: var(--slate); stroke-width: 1.5; }
.su-fig .f-part-a { fill: #f3dfa0; } .su-fig .f-part-b { fill: #b9d0e6; } .su-fig .f-part-c { fill: #f2c4b8; }
.su-fig .f-tick-bar { stroke: #8a979c; stroke-width: .8; }
.su-fig .f-bar-a { fill: #b9d0e6; stroke: #3f6fa8; } .su-fig .f-bar-b { fill: #f3dfa0; stroke: #c9a53a; }
.su-clock { display: grid; justify-items: center; gap: 4px; }
.su-cycle-wheel { position: relative; width: 210px; height: 210px; margin: 6px auto; border-radius: 50%; border: 2px dashed #c9d3d7; }
.su-cycle-slot { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; font-family: var(--serif); color: var(--slate); }
.su-cycle-slot input { width: 42px; height: 40px; text-align: center; font-size: 1.1rem; border: 2px solid var(--slate); border-radius: 10px; background: #fff; }
.su-cycle-arrow { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; color: #c9a53a; }
.su-venn-box { position: relative; width: min(100%, 340px); height: 170px; margin: 6px auto; }
.su-venn-c { position: absolute; top: 10px; width: 58%; height: 150px; border-radius: 50%; border: 2px solid var(--slate); display: flex; justify-content: center; padding-top: 8px; font-size: .8rem; color: var(--slate); }
.su-venn-c.is-a { left: 0; background: #b9d0e630; } .su-venn-c.is-b { right: 0; background: #f3dfa040; }
.su-venn-in { position: absolute; top: 72px; width: 46px; height: 38px; text-align: center; border: 2px solid var(--slate); border-radius: 10px; font-size: 1rem; }
.su-venn-in.is-a { left: 13%; } .su-venn-in.is-both { left: calc(50% - 23px); } .su-venn-in.is-b { right: 13%; }
.su-tally { max-width: 340px; margin: 10px auto 0; }
.su-tally-row { display: grid; grid-template-columns: 1fr 40px 2.4em 40px; align-items: center; gap: 6px; padding: 4px 0; border-top: 1px solid #e5e2da; }
.su-tally-row button { height: 38px; border: 2px solid var(--slate); border-radius: 10px; background: #fff; font-size: 1.2rem; cursor: pointer; }
.su-tally-row b { text-align: center; color: var(--slate); }
.su-pans-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 10px; }
.su-pans-actions button:disabled { opacity: .35; text-decoration: none; cursor: default; }
.su-die3d-stage { width: 140px; height: 140px; margin: 8px auto; perspective: 520px; cursor: grab; }
.su-die3d-cube { position: relative; width: 90px; height: 90px; margin: 25px auto; transform-style: preserve-3d; }
.su-die3d-face { position: absolute; inset: 0; border-radius: 12px; background: #fffdf8; border: 2px solid var(--slate); }
.su-die3d-face i { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--slate); }
.su-die3d-face.is-front { transform: translateZ(45px); } .su-die3d-face.is-back { transform: rotateY(180deg) translateZ(45px); }
.su-die3d-face.is-right { transform: rotateY(90deg) translateZ(45px); } .su-die3d-face.is-left { transform: rotateY(-90deg) translateZ(45px); }
.su-die3d-face.is-top { transform: rotateX(90deg) translateZ(45px); } .su-die3d-face.is-bottom { transform: rotateX(-90deg) translateZ(45px); }
.su-build-grid { display: grid; grid-template-columns: repeat(10, 26px); gap: 2px; justify-content: center; margin-top: 6px; }
.su-build-grid button { width: 26px; height: 26px; border: 1px solid #c9d3d7; border-radius: 4px; background: #fff; padding: 0; }
.su-build-grid button[aria-pressed="true"] { background: #3f6fa8; border-color: #3f6fa8; }

/* Pancake preview: a faint copy of the stack after the flip being pointed at */

/* Bags shaped like bags, and the warm-up chance bar */
.su-bag { position: relative; border-radius: 26px 26px 46px 46px; }
.su-bag::before { content: ''; position: absolute; top: -9px; left: 50%; width: 46px; height: 14px; transform: translateX(-50%); border: 2px solid var(--slate); border-bottom: 0; border-radius: 14px 14px 0 0; background: #f7f5ef; }
.su-bag-body { border-radius: 14px 14px 30px 30px; }
.su-bag-prob { margin: 12px auto 0; max-width: 420px; text-align: center; }
.su-bag-prob p { margin: 0 0 6px; font-weight: 700; color: var(--slate); }
.su-bag-prob span { display: block; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #c0503f calc(var(--p) * 100%), #3f6fa8 0); }
.su-puzzle-status.is-warning { color: #9a3a2c; font-weight: 700; }
.su-jug-tip { text-align: center; margin: 4px 0 0; }
.su-jug-frame { cursor: grab; touch-action: none; }
.su-jug-frame.is-over { outline: 3px dashed var(--gold-deep); outline-offset: 4px; border-radius: 10px; }

/* Model answers after practice and warm-up */
.su-answers { margin-top: 18px; text-align: left; }
.su-answers summary { cursor: pointer; font-weight: 700; color: var(--slate); text-align: center; }
.su-answers > div { display: grid; gap: 10px; margin-top: 12px; }
.su-answer-card { padding: 12px 14px; border: 1px solid #e5e2da; border-radius: 12px; background: #fffdf8; }
.su-answer-head { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 4px; font-size: .85rem; color: #56656c; }
.su-answer-q { margin: 0 0 6px; font-size: .92rem; color: #33434b; }
.su-answer-a, .su-answer-s { margin: 0; font-size: .92rem; }
.su-answer-s { margin-top: 4px; color: #56656c; }

/* 3 × 3 crossnumber */
.su-cross.is-3 .su-cross-grid { grid-template-columns: repeat(3, 52px); }
.su-cross-cell.is-black { background: var(--slate); border-radius: 6px; }
.su-cross-clues p.is-on { background: #fff1c4; border-radius: 6px; }
.su-cross.is-3 .su-cross-grid { width: max-content; }
.su-cross.is-3 .su-cross-cell { width: 52px; height: 52px; }
.su-answers summary { display: block; text-align: center; padding: 8px; border-radius: 10px; background: #f6f3ec; }

/* Balance scale (algebra) */
@keyframes su-wobble { 0% { transform: rotate(calc(var(--tilt) * -0.6)); } 35% { transform: rotate(calc(var(--tilt) * 1.4)); } 65% { transform: rotate(calc(var(--tilt) * 0.8)); } 100% { transform: rotate(var(--tilt)); } }
@keyframes su-counter { 0% { transform: rotate(calc(var(--tilt) * 0.6)); } 35% { transform: rotate(calc(var(--tilt) * -1.4)); } 65% { transform: rotate(calc(var(--tilt) * -0.8)); } 100% { transform: rotate(calc(var(--tilt) * -1)); } }
.su-clear:disabled { opacity: .35; text-decoration: none; cursor: default; }

/* Scenes for the weekly rounds (scenes.mjs) */
.su-scene .s-tank, .su-scene .s-jug { fill: rgba(255,255,255,.6); stroke: var(--slate); stroke-width: 3; stroke-linejoin: round; }
.su-scene .s-water { fill: #b9d0e6; stroke: none; } .su-scene .s-juice { fill: #f3c36a; }
.su-scene .s-pipe { fill: none; stroke: #8a979c; stroke-width: 9; stroke-linejoin: round; }
.su-scene .s-valve { fill: var(--slate); stroke: none; }
.su-scene .s-drop { fill: #3f6fa8; }
.su-scene .s-circle { fill: #fbf4d8; stroke: var(--slate); stroke-width: 2.5; }
.su-scene rect.s-square { fill: #fff; stroke: var(--slate); stroke-width: 2.5; }
.su-scene .s-radius { stroke: var(--gold-deep); stroke-width: 2.5; stroke-dasharray: 5 4; }
.su-scene polygon.s-hex { fill: #fff; stroke: var(--slate); stroke-width: 2.5; stroke-linejoin: round; }
.su-scene polygon.s-tri { fill: rgba(246, 224, 159, .75); stroke: var(--gold-deep); stroke-width: 2.5; stroke-linejoin: round; }
.su-scene .s-bag { fill: #efe6d2; stroke: var(--slate); stroke-width: 2.5; stroke-linejoin: round; }
.su-scene .s-bag-tie { fill: none; stroke: var(--slate); stroke-width: 2.5; }
.su-scene .s-unknown { fill: #fff; stroke: #c0503f; stroke-width: 2; stroke-dasharray: 3 3; }
.su-scene .s-track { stroke: var(--slate); stroke-width: 3; }
.su-scene .s-hill { fill: #dfe6d4; stroke: #8a979c; stroke-width: 2; }
.su-scene rect.s-tunnel { fill: #56656c; stroke: none; }
.su-scene .s-train rect { fill: #3f6fa8; stroke: var(--slate); stroke-width: 1.5; } .su-scene .s-train circle { fill: var(--slate); }
.su-scene rect.s-candle { fill: #f7efe0; stroke: var(--slate); stroke-width: 2; }
.su-scene .s-wick { stroke: var(--slate); stroke-width: 2; } .su-scene .s-flame { fill: #f0a73a; stroke: #c0503f; stroke-width: 1; }
.su-scene rect.s-platform { fill: var(--slate); stroke: none; }
.su-scene .s-steps { fill: none; stroke: var(--slate); stroke-width: 3; stroke-linejoin: round; }
.su-scene polygon.s-face-front { fill: #fff; } .su-scene polygon.s-face-top { fill: #fbf4d8; } .su-scene polygon.s-face-side { fill: #e9e4d8; }
.su-scene .s-flight { fill: none; stroke: #8a979c; stroke-width: 1.8; stroke-dasharray: 5 4; }
.su-scene .s-bird { fill: var(--slate); }
.su-scene .s-river { fill: #b9d0e6; } .su-scene .s-bridge { fill: none; stroke: #8a6a12; stroke-width: 5; stroke-linecap: round; }
.su-scene .s-body { stroke: var(--slate); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.su-colour2, .su-arrange, .su-spin, .su-table { display: grid; justify-items: center; gap: 8px; margin: 4px 0 14px; }
.su-colour2-grid { display: grid; grid-template-columns: repeat(2, 64px); gap: 4px; padding: 6px; border-radius: 10px; background: var(--slate); transition: transform .38s cubic-bezier(.3,.7,.3,1); }
.su-colour2-grid.is-turning { transform: rotate(90deg); }
.su-colour2-grid button { width: 64px; height: 64px; border: 0; border-radius: 6px; background: #f6f3ec; cursor: pointer; }
.su-colour2-grid button[data-colour="red"] { background: #c0503f; } .su-colour2-grid button[data-colour="blue"] { background: #3f6fa8; }
.su-arrange-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.su-arrange-row li { display: grid; justify-items: center; gap: 3px; }
.su-arrange-slot { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #56656c; }
.su-arrange-row button { min-width: 64px; padding: 10px 8px; border: 2px solid var(--slate); border-radius: 10px; background: #fff; font-weight: 700; color: var(--slate); cursor: pointer; }
.su-arrange-row button.is-picked { background: var(--gold); }
.su-spin .su-die3d-stage { width: 170px; height: 170px; }
.su-spin .su-die3d-cube { width: 110px; height: 110px; margin: 30px auto; }
.su-spin .su-spin-face { border-radius: 2px; background: #fffdf8; }
.su-spin .su-spin-face.is-front { transform: translateZ(55px); } .su-spin .su-spin-face.is-back { transform: rotateY(180deg) translateZ(55px); }
.su-spin .su-spin-face.is-right { transform: rotateY(90deg) translateZ(55px); } .su-spin .su-spin-face.is-left { transform: rotateY(-90deg) translateZ(55px); }
.su-spin .su-spin-face.is-top { transform: rotateX(90deg) translateZ(55px); } .su-spin .su-spin-face.is-bottom { transform: rotateX(-90deg) translateZ(55px); }
.su-spin.has-grid .su-spin-face { background-color: #fbf4d8; background-image: linear-gradient(var(--slate) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--slate) 1.5px, transparent 1.5px); background-size: calc(100% / var(--n)) calc(100% / var(--n)); }
.su-spin-dot { position: absolute; width: 16px; height: 16px; margin: -8px; border-radius: 50%; border: 2px solid var(--slate); }
.su-spin-dot.is-start { background: var(--gold); } .su-spin-dot.is-end { background: #c0503f; }
.su-spin-dot.at-tl { left: 0; top: 0; } .su-spin-dot.at-tr { left: 100%; top: 0; } .su-spin-dot.at-bl { left: 0; top: 100%; } .su-spin-dot.at-br { left: 100%; top: 100%; }
.su-table-ring { position: relative; width: 220px; height: 220px; }
.su-table-top { position: absolute; inset: 24%; border-radius: 50%; background: #e9dcc0; border: 3px solid #8a6a12; }
.su-table-ring button { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 2.5px solid var(--slate); background: #fff; font-weight: 700; font-size: 1.1rem; color: var(--slate); cursor: pointer; }
.su-table-ring button[data-mark="T"] { background: var(--gold); } .su-table-ring button[data-mark="L"] { background: var(--slate); color: #fff; }
@media (max-width: 480px) { .su-arrange-row { flex-wrap: nowrap; gap: 4px; } .su-arrange-row button { min-width: 0; width: 56px; padding: 9px 2px; font-size: .9rem; } }
.su-br-row { flex-wrap: nowrap; overflow: hidden; }
.su-br-line { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 4px 6px; white-space: nowrap; transform-origin: center; }
@media (max-width: 480px) { .su-br-row { padding: 14px 4px; } .su-br-line { gap: 0 2px; } .su-br-num { font-size: 1.3rem; min-width: .6em; } .su-br-op, .su-br-eq { font-size: 1.1rem; padding: 0 1px; } .su-br-eq { margin-left: 4px; } .su-br-slot { min-width: 13px; height: 44px; padding: 0; font-size: 1.3rem; } }
.su-frac-show { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .12em; font-size: .9em; line-height: 1.15; }
.su-frac-show > span { padding: 0 .2em; }
.su-frac-show > span:first-child { border-bottom: 1.5px solid currentColor; }
.su-choices .su-frac-show { font-size: .95em; }
.su-note-sticker { display: inline-flex; align-items: center; gap: 8px; margin: 4px 8px 12px 0; padding: 7px 14px 7px 8px; border-radius: 999px; background: #dce8f3; color: var(--slate); font-size: .9rem; font-weight: 600; transform: rotate(-1deg); box-shadow: 0 2px 0 rgba(45, 66, 77, .15); }
.su-note-sticker b { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--slate); color: #fff; font-family: var(--serif); font-style: italic; font-size: .85rem; }
@media (max-width: 480px) { .su-note-sticker { border-radius: 14px; font-size: .82rem; } }
/* Fractions inside answer options: the option's own pill styling must not reach their parts. */
.su-choices label .su-frac-show { display: inline-flex; flex-direction: column; gap: 0; padding: 0; border: 0; border-radius: 0; transform: none; background: none; }
.su-choices label .su-frac-show > span { display: block; padding: 0 .2em; border: 0; border-radius: 0; transform: none; background: none; text-align: center; }
.su-choices label .su-frac-show > span:first-child { border-bottom: 1.5px solid currentColor; }
.su-choices label span.sr-only { padding: 0; border: 0; }
/* Roll: the draggable die beside the path */
.su-roll { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; flex-wrap: nowrap; }
.su-roll .su-die3d { margin: 0; }
.su-roll .su-die3d-stage { margin: 0 auto; }
.su-roll .su-roll-path { width: min(48%, 190px); height: auto; }
@media (max-width: 420px) { .su-roll .su-die3d-stage { width: 120px; height: 120px; } .su-roll .su-die3d-cube { width: 76px; height: 76px; margin: 22px auto; } .su-roll .su-die3d-face.is-front { transform: translateZ(38px); } .su-roll .su-die3d-face.is-back { transform: rotateY(180deg) translateZ(38px); } .su-roll .su-die3d-face.is-right { transform: rotateY(90deg) translateZ(38px); } .su-roll .su-die3d-face.is-left { transform: rotateY(-90deg) translateZ(38px); } .su-roll .su-die3d-face.is-top { transform: rotateX(90deg) translateZ(38px); } .su-roll .su-die3d-face.is-bottom { transform: rotateX(-90deg) translateZ(38px); } .su-roll .su-die3d-face i { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; } }
.su-scene .s-unknown-q { fill: #c0503f; font-weight: 700; font-size: 14px; }
/* Algebra tiles: a plain workspace. Pick a tile from the tray, tap a side to put it there; tap a tile on a side to take it away. */
.su-tiles { display: grid; justify-items: center; gap: 10px; margin-top: 8px; }
.su-tiles-mats { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 10px; width: min(100%, 560px); }
.su-tiles-mat { display: grid; align-content: start; gap: 8px; min-height: 116px; padding: 10px; border-radius: 12px; border: 2px solid var(--slate); background: #f6f3ec; cursor: default; }
.su-tiles-mat.is-target { cursor: copy; border-style: dashed; background: #fbf6e6; }
.su-tiles-mat:focus-visible { outline: 3px solid #d9a44a; outline-offset: 2px; }
.su-tiles-mat.is-over { background: #fbf4d8; }
.su-tiles-row { display: flex; flex-wrap: wrap; gap: 5px; }
.su-tiles-row:empty { display: none; }
.su-tiles-equals { align-self: center; font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--slate); }
.su-atile { display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; background: #3f6fa8; color: #fff; font-family: var(--serif); font-size: .95rem; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); cursor: pointer; }
.su-atile.is-x { width: 22px; height: 52px; }
.su-atile.is-u { width: 20px; height: 20px; background: #d9a44a; }
.su-atile.is-neg { background: #b3412e; }
.su-atile i { font-style: italic; }
/* −x on one line: the minus and the x sit side by side, slightly smaller to fit the tile. */
.su-atile.is-x { white-space: nowrap; }
.su-atile.is-x.is-neg { font-size: .78rem; letter-spacing: -.02em; }
.su-atile:focus-visible { outline: 3px solid #d9a44a; outline-offset: 2px; }
.su-tiles-mat .su-atile:hover { filter: brightness(1.12); }
.su-tiles-mat .su-atile { touch-action: none; }
.su-tiles-mat .su-atile.is-over { outline: 3px dashed var(--slate); outline-offset: 2px; }
.su-tiles-tray { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px; border-radius: 14px; background: #f8f6f1; }
.su-tiles-tray .su-atile.is-x { width: 26px; height: 60px; }
.su-tiles-tray .su-atile.is-u { width: 26px; height: 26px; }
.su-tiles-tray .su-atile[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--slate); transform: translateY(-3px); }
@media (max-width: 480px) {
  .su-tiles-mats { grid-template-columns: 1fr; gap: 4px; }
  .su-tiles-equals { justify-self: center; font-size: 2rem; }
  .su-tiles-mat .su-atile.is-x { width: 18px; height: 44px; } .su-tiles-mat .su-atile.is-u { width: 16px; height: 16px; }
}
/* Shapes grid (simultaneous equations): tap a total to highlight its line; the key is working space. */
.su-sym { display: grid; justify-items: center; gap: 12px; margin-top: 8px; }
.su-sym-grid { display: grid; grid-template-columns: repeat(3, 54px) 58px; grid-auto-rows: 54px; gap: 6px; align-items: center; justify-items: center; }
.su-sym-cell { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 10px; background: #f6f3ec; border: 2px solid #e5e2da; transition: background .2s, border-color .2s; }
.su-sym-cell.is-lit { background: #fbefc8; border-color: #d9a44a; }
.su-sym-shape.is-circle { fill: #3f6fa8; } .su-sym-shape.is-triangle { fill: #d9a44a; } .su-sym-shape.is-square { fill: #4f8a6b; }
.su-sym-total { min-width: 48px; height: 44px; padding: 0 6px; border: 2px solid var(--slate); border-radius: 10px; background: #fff; color: var(--slate); font-family: var(--serif); font-size: 1.25rem; cursor: pointer; }
.su-sym-total[aria-pressed="true"] { background: #fbefc8; border-color: #c9a53a; }
.su-sym-total:focus-visible { outline: 3px solid #d9a44a; outline-offset: 2px; }
.su-sym-total.is-ask { display: grid; place-items: center; border-style: dashed; cursor: default; font-weight: 700; }
.su-sym-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.su-sym-key-item { display: inline-flex; align-items: center; gap: 6px; font-family: var(--serif); font-size: 1.2rem; color: var(--slate); }
.su-sym-key-item svg { width: 26px; height: 26px; }
.su-sym-cell .su-sym-shape { width: 42px; height: 42px; }
.su-sym-shape text { text-anchor: middle; dominant-baseline: middle; font-family: var(--serif); font-size: 15px; font-weight: 700; fill: #fff; }
.su-sym-shape text.is-long { font-size: 11px; }
.su-sym-shape.is-triangle text { fill: var(--slate); font-size: 13px; }
.su-sym-shape.is-triangle text.is-long { font-size: 9.5px; }
.su-sym-key-item input { width: 56px; height: 38px; text-align: center; font-size: 1.05rem; border: 2px solid #c9d3d7; border-radius: 8px; }

/* A solved puzzle locks itself in: no more moves while it does. */
.is-finishing { pointer-events: none; }

/* "About Square Up" (Option 1 preview, 28 Nov): closed by default so students reach the warm-up first. */
.su-about { max-width: 980px; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.su-about summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.su-about summary::-webkit-details-marker { display: none; }
.su-about summary::after { content: '+'; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--green); }
.su-about[open] summary::after { content: '−'; }
.su-about summary:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 14px; }
.su-about-title { font-weight: 700; color: var(--green); }
.su-about-hint { font-size: .88rem; color: var(--muted); }
.su-about-body { padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.su-about-body > p:first-child { margin: 14px 0 18px; line-height: 1.6; color: var(--ink); max-width: 46em; }
.su-about-sub { margin: 0 0 12px; font-family: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.su-about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0; }

/* ---------- Number maze, Share the cake, Spin (28 Nov) ---------- */
.su-maze-svg { display: block; width: min(100%, 420px); margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.su-maze-road { stroke: #d5dadd; stroke-width: 5; stroke-linecap: round; transition: stroke .25s, stroke-width .25s; }
.su-maze-road.is-used { stroke: var(--gold-deep); stroke-width: 9; }
.su-maze-op { fill: #fff; stroke: var(--slate); stroke-width: 1.5; }
.su-maze-op-text { font: 700 17px var(--sans, 'Open Sans', Arial, sans-serif); fill: var(--slate); text-anchor: middle; pointer-events: none; }
.su-maze-node { fill: #eef1f2; stroke: #9aa7ad; stroke-width: 2; transition: fill .2s, stroke .2s; }
.su-maze-node.is-visited { fill: var(--gold); stroke: var(--gold-deep); }
.su-maze-node.is-next { fill: #fff; stroke: var(--slate); stroke-width: 3.5; cursor: pointer; animation: su-maze-pulse 1.6s ease-in-out infinite; }
@keyframes su-maze-pulse { 50% { stroke-width: 6; } }
.su-maze-label { font: 700 13px var(--sans, 'Open Sans', Arial, sans-serif); letter-spacing: .08em; fill: #55626a; text-anchor: middle; }
.su-maze-counter { cursor: grab; transition: transform .22s var(--smooth); }
.su-maze-counter.is-dragging { cursor: grabbing; transition: none; }
.su-maze-counter circle { fill: #e9c25a; stroke: var(--slate); stroke-width: 3; filter: drop-shadow(0 3px 4px #26384144); }
.su-maze-counter text { font: 700 16px var(--sans, 'Open Sans', Arial, sans-serif); fill: var(--slate); text-anchor: middle; pointer-events: none; }
.su-maze-keys { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; margin: 10px 0 0; }
.su-maze-keys [data-go] { font: inherit; font-weight: 700; padding: 7px 14px; border-radius: 10px; border: 1.5px solid var(--slate); background: var(--cream); color: var(--slate); cursor: pointer; }
.su-maze-keys [data-go]:disabled { opacity: .35; cursor: default; }
@media (prefers-reduced-motion: reduce) { .su-maze-node.is-next { animation: none; } .su-maze-counter { transition: none; } }

.su-cake-svg { display: block; width: min(100%, 420px); margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; border-radius: 12px; }
.su-cake-svg:focus { outline: none; }
.su-cake-svg:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 4px; }
.su-cake-shape { fill: var(--gold); stroke: var(--slate); stroke-width: 3; stroke-linejoin: round; }
.su-cake-grid line { stroke: var(--slate); stroke-opacity: .16; }
.su-cake-piece { fill: var(--slate); fill-opacity: .18; }
.su-cake-cut { stroke: #b4442f; stroke-width: 3.5; stroke-dasharray: 10 6; stroke-linecap: round; }
.su-cake-start { fill: #b4442f; }
.su-cake-ticks text { font: 14px var(--sans, 'Open Sans', Arial, sans-serif); fill: #55626a; text-anchor: middle; }
.su-cake-knife { fill: #e9c25a; stroke: var(--slate); stroke-width: 3; cursor: grab; filter: drop-shadow(0 3px 4px #26384144); }
.su-cake-svg.is-dragging .su-cake-knife { cursor: grabbing; }

.su-spin-stage { display: grid; place-items: center; padding: 8px 0; }
.su-spin-grid { --cell: min(46px, calc((100vw - 120px) / var(--n))); display: grid; grid-template-columns: repeat(var(--n), var(--cell)); gap: 3px; padding: 6px; background: var(--slate); border-radius: 12px; }
/* The grid shrinks a little mid-turn so its corners stay clear of the text around it. */
.su-spin.is-spinning .su-spin-grid { animation: su-spin-turn .85s var(--smooth) forwards; pointer-events: none; }
.su-spin.is-unspinning .su-spin-grid { animation: su-spin-back .85s var(--smooth) forwards; pointer-events: none; }
@keyframes su-spin-turn { 0% { transform: rotate(0); } 50% { transform: rotate(45deg) scale(.7); } 100% { transform: rotate(90deg); } }
@keyframes su-spin-back { 0% { transform: rotate(90deg); } 50% { transform: rotate(45deg) scale(.7); } 100% { transform: rotate(0); } }
.su-spin-grid button { width: var(--cell); height: var(--cell); border: 0; border-radius: 6px; background: #fff; cursor: pointer; transition: background .15s; }
.su-spin-grid button[aria-pressed="true"] { background: #e9c25a; }
.su-spin-grid button.is-given { background: var(--slate); box-shadow: inset 0 0 0 2px #fff; background-image: repeating-linear-gradient(45deg, #ffffff33 0 4px, transparent 4px 9px); cursor: default; }
.su-spin-grid button:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 1px; }
.su-spin-legend { display: flex; gap: 16px; justify-content: center; font-size: .86rem; color: #55626a; margin-top: 6px; }
.su-spin-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.su-spin-legend i.is-given { background: var(--slate); } .su-spin-legend i.is-mine { background: #e9c25a; }
.su-spin-go { min-width: 120px; }
@media (prefers-reduced-motion: reduce) { .su-spin.is-spinning .su-spin-grid { animation: none; transform: rotate(90deg); } .su-spin.is-unspinning .su-spin-grid { animation: none; } }
.su-spin-go span { margin-right: 6px; }

/* 28 Nov follow-ups: exit number, maze hint, spin message, cake side numbers, small spin grids. */
.su-maze-target { font: 800 30px var(--sans, 'Open Sans', Arial, sans-serif); fill: #b4442f; text-anchor: middle; }
.su-maze-hint { text-align: center; margin: 0 0 6px; }
.su-maze-svg.is-big { width: min(100%, 470px); }
.su-cake-ticks text.is-side { text-anchor: end; }
.su-spin-msg { min-height: 1.6em; margin: 0 0 4px; text-align: center; font-weight: 700; font-size: 1.1rem; color: #b4442f; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.su-spin-msg.is-shown { opacity: 1; transform: none; }
.su-spin-grid.is-n3 { --cell: min(72px, calc((100vw - 120px) / 3)); }
.su-spin-grid.is-n4 { --cell: min(62px, calc((100vw - 120px) / 4)); }

/* Number answers: units are typed, not printed (founders, 1 Dec). */
.su-unit-note { display: block; margin-top: 2px; text-transform: none; letter-spacing: normal; font-weight: 400; font-size: .8125rem; color: var(--slate, #4b5b63); opacity: .85; }
