/* Cali Builds Areas. Colours are the site's own (styles.css --m10-* tokens), as in the other Cali games. */
:root {
	--ar-ink: #1a1a1a;
	--ar-muted: #444746;
	--ar-line: #e6e6e6;
	--ar-edge: #b9c0c7;
	--ar-band: #d8e6fc;
	--ar-band-soft: #eef4fc;
	--ar-panel: #caddf6;
	--ar-orange: #ee6600;
	--ar-orange-hover: #ff7a1a;
	--ar-orange-text: #9a4200;
	--ar-orange-soft: #fff1e6;
	--ar-blue: #006699;
	--ar-blue-strong: #004d73;
	--ar-blue-soft: #e6f0f8;
	--ar-lime: #b2df5d;
	--ar-lime-soft: #edf8da;
	--ar-good: #3f7d16;
	--ar-good-text: #2e5e12;
	--ar-bad: #b3261e;
	--ar-board: #f3f6fa;
	--ar-grid: #d3d9e0;
	--ar-font: Onest, Verdana, system-ui, -apple-system, "Segoe UI", sans-serif;
	--ar-digits: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", Roboto, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ar-ink); font: 16px/1.4 var(--ar-font); }
*, *::before, *::after { box-sizing: border-box; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.ar-app { position: relative; max-width: 1040px; margin: 0 auto; padding: 0 0 8px; }
.ar-app :focus-visible { outline: 3px solid var(--ar-orange); outline-offset: 2px; }
.ar-main { outline: none; }
.ar-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ar-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- header band ---------- */
.ar-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 52px; padding: 4px 6px; border-radius: 12px; background: var(--ar-band); }
.ar-title { flex: 1 1 0; min-width: 0; padding-left: 6px; font-weight: 700; font-size: 18px; line-height: 1.2; }
.ar-stats { order: 3; flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 0 6px 4px; font-size: 16px; }
.ar-stats:empty { display: none; }
.ar-sound { order: 2; }
.ar-iconbtn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ar-blue); }
.ar-iconbtn:hover { background: var(--ar-panel); }
.ar-iconbtn svg { width: 26px; height: 26px; }
.ar-where { font-weight: 600; }
.ar-score { position: relative; }
.ar-score b { font-family: var(--ar-digits); font-size: 18px; }
.ar-float { position: absolute; left: 100%; top: -6px; margin-left: 6px; color: var(--ar-good-text); font-weight: 700; font-size: 18px; animation: ar-float 1s ease-out forwards; }
@keyframes ar-float { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-22px); } }
.ar-dots { display: inline-flex; gap: 5px; }
.ar-dot { width: 13px; height: 13px; border: 2px solid var(--ar-edge); border-radius: 50%; background: #fff; }
.ar-dot.is-now { border-color: var(--ar-orange); background: var(--ar-orange); }
.ar-dot.is-p2 { border-color: var(--ar-good); background: var(--ar-good); }
.ar-dot.is-p1 { border-color: var(--ar-good); background: var(--ar-lime); }
.ar-dot.is-p0 { border-color: #7d838a; background: #c9ced4; }
/* on a phone a challenge's header is one band: back, "Level 2 · Challenge 3 / 6", score, sound */
@media (max-width: 699px) {
	.ar-app[data-screen="play"] .ar-title, .ar-app[data-screen="done"] .ar-title { display: none; }
	.ar-app[data-screen="play"] .ar-stats, .ar-app[data-screen="done"] .ar-stats { order: 1; flex: 1 1 0; min-width: 0; padding: 2px 4px; gap: 0 12px; line-height: 1.3; }
}
@media (min-width: 700px) {
	/* one line: a long title (the Bulgarian one) is cut with an ellipsis before the sound button would wrap */
	.ar-top { flex-wrap: nowrap; }
	.ar-title { flex: 1 1 auto; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.ar-stats { order: 1; flex: 0 0 auto; flex-wrap: nowrap; padding: 0 4px; white-space: nowrap; }
}

/* ---------- buttons, switches ---------- */
.ar-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px 22px; border: 2px solid transparent; border-radius: 10px; font-weight: 600; font-size: 17px; line-height: 1.2; }
.ar-primary { background: var(--ar-orange); color: var(--ar-ink); }
.ar-primary:hover { background: var(--ar-orange-hover); }
.ar-btn-quiet { background: #fff; border-color: var(--ar-blue); color: var(--ar-blue); }
.ar-btn-quiet:hover { background: var(--ar-blue-soft); }
.ar-btn.is-off { border-color: var(--ar-edge); background: #f1f3f5; color: #5a6067; cursor: default; }
.ar-btn.ar-small { min-height: 44px; padding: 6px 12px; font-size: 16px; }
.ar-btn.ar-big { min-width: 150px; min-height: 56px; font-size: 20px; }
.ar-btn.is-calling { animation: ar-call 1.3s ease-in-out infinite; }
@keyframes ar-call { 0%, 100% { box-shadow: 0 0 0 0 rgba(238, 102, 0, .55); } 50% { box-shadow: 0 0 0 9px rgba(238, 102, 0, 0); } }
.ar-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.ar-switches { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.ar-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 16px; line-height: 1.2; cursor: pointer; }
.ar-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ar-switch-ui { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: #7d838a; transition: background-color .15s; }
.ar-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.ar-switch input:checked + .ar-switch-ui { background: var(--ar-blue); }
.ar-switch input:checked + .ar-switch-ui::after { transform: translateX(20px); }
.ar-switch input:focus-visible + .ar-switch-ui { outline: 3px solid var(--ar-orange); outline-offset: 2px; }

.ar-legend { margin: 0; color: var(--ar-muted); font-size: 16px; line-height: 1.35; }

/* ---------- words with numbers: swatches, stacked fractions ---------- */
.ar-num { font-family: var(--ar-digits); font-size: 1.08em; }
.ar-sw { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; }
.ar-sw svg { display: block; width: 100%; height: 100%; }
.ar-fr { display: inline-flex; flex-direction: column; margin: 0 2px; vertical-align: middle; text-align: center; font: 700 16px/1 var(--ar-digits); }
.ar-fr > span:first-child { padding: 0 3px 2px; border-bottom: 2px solid currentColor; }
.ar-fr > span:last-child { padding: 2px 3px 0; }

/* ---------- home ---------- */
.ar-home, .ar-done { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; padding: 18px 8px 8px; }
.ar-cali-big { width: 140px; }
.ar-cali-big svg { display: block; width: 100%; height: auto; }
.ar-home-body, .ar-done-body { display: grid; justify-items: start; gap: 10px; max-width: 480px; }
.ar-home-body .ar-actions, .ar-done-body .ar-actions { justify-content: flex-start; margin-top: 4px; }
.ar-screen-t { font-weight: 700; font-size: 24px; line-height: 1.2; }
.ar-home-text { margin: 0; font-size: 18px; }

/* ---------- level select ---------- */
.ar-total { margin: 12px 4px 4px; font-weight: 700; font-size: 19px; }
.ar-total-star { margin-right: 6px; color: #e8a200; font-size: 22px; }
.ar-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 8px 0 4px; }
@media (min-width: 560px) { .ar-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ar-tile { display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 124px; padding: 12px 8px 10px; border: 2px solid var(--ar-band); border-radius: 14px; background: #fff; text-align: center; }
.ar-tile:hover { border-color: var(--ar-blue); background: var(--ar-blue-soft); }
.ar-tile-n { color: var(--ar-blue-strong); font-weight: 700; font-size: 20px; }
.ar-tile-d { min-height: 2.6em; font-size: 16px; line-height: 1.3; }
.ar-stars { display: inline-flex; gap: 2px; font-size: 24px; line-height: 1; }
.ar-stars .on { color: #e8a200; }
.ar-stars .off { color: #d5dbe2; }
.ar-stars.is-big { font-size: 46px; }

/* ---------- the board ---------- */
.ar-board { width: 100%; min-width: 0; }
.ar-board-svg, .ar-shape-svg { display: block; margin: 0 auto; overflow: visible; -webkit-user-select: none; user-select: none; }
.ar-board-svg { cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; outline: none; }
.ar-board-svg.is-frozen { cursor: default; }
.ar-board-svg:focus-visible { outline: 3px solid var(--ar-orange); outline-offset: 0; border-radius: 6px; }
.ar-bg { fill: var(--ar-board); stroke: var(--ar-edge); }
.ar-gridlines { fill: none; stroke: var(--ar-grid); stroke-width: 1; }
.is-nogrid .ar-gridlines { display: none; }
.ar-outline { fill: none; stroke: var(--ar-ink); stroke-width: 3; stroke-linecap: square; }
.ar-outline.is-good { stroke: var(--ar-good); stroke-width: 5; animation: ar-good .9s ease-out 1; }
@keyframes ar-good { 0% { stroke-width: 11; stroke-opacity: .35; } 100% { stroke-width: 5; stroke-opacity: 1; } }
.ar-chip rect { fill: #fff; stroke: #8b9096; }
.ar-chip text { fill: var(--ar-ink); font: 700 14px var(--ar-digits); }
.ar-scale { fill: none; stroke: var(--ar-muted); stroke-width: 1; }
.ar-scale-t { fill: var(--ar-ink); font: 600 14px var(--ar-font); }
.ar-hover { fill: none; stroke: var(--ar-orange); stroke-width: 3; }
.ar-prev { fill: rgba(238, 102, 0, .2); stroke: var(--ar-orange); stroke-width: 3; }
.ar-prev.is-bad { fill: rgba(125, 131, 138, .22); stroke: #5a6067; stroke-dasharray: 5 4; }
.ar-cursor { fill: none; stroke: var(--ar-blue-strong); stroke-width: 3; stroke-dasharray: 7 4; }
.ar-cursor.is-carry { stroke: var(--ar-orange); stroke-dasharray: none; }
.ar-lifted { filter: drop-shadow(0 4px 5px rgba(26, 31, 39, .35)); }
.ar-ghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; opacity: .88; filter: drop-shadow(0 6px 8px rgba(26, 31, 39, .3)); }
.ar-ghost svg { display: block; }
.ar-ghost.is-back { opacity: .2; transition: transform .2s ease-in, opacity .2s ease-in; }

/* the drawn shapes of the find-the-area challenges */
.ar-shape-fill { fill: #fff; }
.ar-shape-fill.is-clear { fill: none; }
.ar-shape-line { fill: none; stroke: var(--ar-ink); stroke-width: 2; stroke-linejoin: round; }
.ar-shape-line.is-good { stroke: var(--ar-good); stroke-width: 5; animation: ar-good .9s ease-out 1; }
.ar-unit { fill: #ffd9bf; stroke: #b85a12; }
.ar-unit.is-faint { fill: none; stroke: #aab1b9; }
.ar-part { stroke: var(--ar-blue); stroke-width: 2; stroke-dasharray: 7 5; }
.ar-part.is-minus { stroke: #5a6067; }
.ar-halfbox { fill: none; stroke: #5a6067; stroke-width: 1.5; stroke-dasharray: 3 4; }
.ar-height { fill: none; stroke: #5a6067; stroke-width: 2; stroke-dasharray: 6 5; }
.ar-mark { fill: none; stroke: #5a6067; stroke-width: 1.5; }
.ar-calc { width: -moz-fit-content; width: fit-content; max-width: 100%; margin: 4px auto 0; padding: 6px 16px; border: 2px solid var(--ar-blue); border-radius: 10px; background: #fff; font: 700 20px/1.3 var(--ar-digits); text-align: center; }

/* ---------- the tray ---------- */
.ar-tray { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; padding: 8px; border-radius: 14px; background: var(--ar-band-soft); }
.ar-tray-colours, .ar-tray-tools, .ar-tray-edit { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ar-tool { flex: none; width: 48px; height: 46px; padding: 3px 0; border: 2px solid var(--ar-edge); border-radius: 10px; background: #fff; color: var(--ar-blue-strong); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ar-tool.is-piece { touch-action: none; cursor: grab; }
.ar-tool svg { display: block; width: 44px; height: 36px; margin: 0 auto; pointer-events: none; }
.ar-tool:hover { border-color: var(--ar-blue); }
.ar-tool[aria-pressed="true"] { border-color: var(--ar-blue-strong); background: var(--ar-band); box-shadow: 0 0 0 2px var(--ar-blue-strong); }
.ar-colour { flex: none; width: 46px; height: 46px; padding: 7px; border: 2px solid var(--ar-edge); border-radius: 10px; background: #fff; }
.ar-colour svg { display: block; width: 28px; height: 28px; pointer-events: none; }
.ar-colour:hover { border-color: var(--ar-blue); }
.ar-colour[aria-pressed="true"] { border-color: var(--ar-ink); box-shadow: 0 0 0 2px var(--ar-ink); }
.ar-tray.is-frozen { opacity: .55; }
.ar-tray.is-frozen button { cursor: default; }
@media (min-width: 700px) {
	.ar-tray { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; align-self: start; gap: 12px; padding: 10px; }
	.ar-tray-colours, .ar-tray-tools { display: grid; grid-template-columns: 1fr 1fr; justify-items: center; gap: 8px; }
	.ar-tool { width: 52px; height: 48px; }
	.ar-tray-edit { flex-direction: column; align-items: stretch; gap: 8px; }
}

/* ---------- readouts: the words Area and Perimeter in light-blue bands, the numbers large ---------- */
.ar-readout { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-ro { flex: 1 1 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 4px 12px; border-radius: 10px; background: var(--ar-band); }
.ar-ro-k { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.ar-ro-n { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.ar-ro-v { display: inline-block; font: 700 24px/1.25 var(--ar-digits); }
.ar-ro-u { font-weight: 600; font-size: 16px; }
.ar-ro-u:empty { display: none; }
/* on a phone the word sits above its number, so "12 cm cuadrados" has the whole band */
@media (max-width: 699px) {
	.ar-ro { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; padding: 3px 12px 2px; }
	.ar-ro-v { font-size: 22px; }
}
/* two boards side by side are as narrow as a phone's */
.ar-explore.is-two .ar-ro { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; padding: 3px 12px 2px; }
.ar-ro-note { min-height: 2.6em; color: var(--ar-muted); font-size: 16px; line-height: 1.3; text-align: center; }
.ar-readout.is-flash .ar-ro-v { animation: ar-flash .7s ease-out 1; }
@keyframes ar-flash { 0% { color: var(--ar-good); transform: scale(1.5); } 100% { color: inherit; transform: scale(1); } }
@media (min-width: 700px) {
	.ar-play > .ar-readout { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
	.ar-play > .ar-readout .ar-ro { display: block; flex: none; padding: 0; border: 2px solid var(--ar-band); background: #fff; overflow: hidden; }
	.ar-play > .ar-readout .ar-ro-k { display: block; padding: 4px 12px; background: var(--ar-band); font-weight: 700; }
	.ar-play > .ar-readout .ar-ro-n { display: flex; padding: 4px 12px; }
	.ar-play > .ar-readout .ar-ro-v { font-size: 28px; transform-origin: 0 50%; }
}

/* ---------- a challenge ---------- */
.ar-play { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; -webkit-user-select: none; user-select: none; }
.ar-play.is-build { grid-template-areas: "cali" "readout" "board" "fb" "tray" "actions" "help" "switches" "legend"; }
.ar-play.is-find { grid-template-areas: "cali" "board" "fb" "pad" "legend"; }
.ar-cali { grid-area: cali; }
.ar-boardbox { grid-area: board; min-width: 0; }
.ar-fb { grid-area: fb; }
.ar-help { grid-area: help; }
.ar-padbox { grid-area: pad; }
.ar-play > .ar-tray { grid-area: tray; }
.ar-play > .ar-readout { grid-area: readout; }
.ar-play > .ar-switches { grid-area: switches; justify-content: center; }
.ar-play > .ar-play-actions { grid-area: actions; }
.ar-play > .ar-legend { grid-area: legend; text-align: center; }
@media (min-width: 700px) {
	.ar-play { gap: 10px 12px; margin-top: 10px; }
	.ar-play.is-build { grid-template-columns: 136px minmax(0, 1fr) 196px; grid-template-rows: auto auto auto auto 1fr auto auto; grid-template-areas: "cali cali cali" "tray board readout" "tray board switches" "tray board actions" "tray board ." "fb fb fb" "legend legend legend"; }
	.ar-fbbox { grid-area: fb; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 10px 20px; }
	.ar-play.is-find { grid-template-columns: minmax(0, 1fr) 236px; grid-template-areas: "cali cali" "board pad" "fb fb" "legend legend"; }
	.ar-play > .ar-switches { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; }
	.ar-play > .ar-play-actions { justify-content: flex-start; align-self: start; }
	.ar-play > .ar-play-actions .ar-btn { flex: 1 1 auto; }
}

/* Cali and her bubble */
.ar-cali { display: flex; align-items: center; gap: 12px; }
.ar-cali-pic { flex: none; width: 48px; }
.ar-cali-pic svg { display: block; width: 100%; height: auto; }
.ar-bubble { position: relative; flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 8px 12px; border: 2px solid var(--ar-panel); border-radius: 14px; background: var(--ar-band-soft); font-weight: 600; font-size: 17px; line-height: 1.5; }
.ar-bubble::before { content: ""; position: absolute; left: -8px; top: 50%; width: 13px; height: 13px; margin-top: -7px; border: solid var(--ar-panel); border-width: 0 0 2px 2px; background: inherit; transform: rotate(45deg); }
.ar-bubble.is-good { border-color: var(--ar-good); background: var(--ar-lime-soft); color: var(--ar-good-text); }
.ar-bubble.is-good::before { border-color: var(--ar-good); }
@media (min-width: 700px) {
	.ar-cali-pic { width: 64px; }
	.ar-bubble { display: flex; align-items: center; min-height: 58px; padding: 8px 16px; font-size: 19px; }
	.ar-bubble-text { min-width: 0; }
}

/* feedback after a Check; after the 2nd wrong one, goal and shape side by side and a solution */
@media (max-width: 699px) {
	/* on a phone the message stays under the board; the comparison and the solution go below the tools */
	.ar-fbbox { display: contents; }
}
.ar-fb { flex: 1 1 280px; max-width: 640px; padding: 8px 14px; border: 2px solid transparent; border-radius: 12px; font-size: 17px; line-height: 1.4; }
.ar-fb:empty { display: none; }
.ar-fb p { margin: 0; }
.ar-fb-msg { font-weight: 600; }
.ar-fb-tip { margin-top: 2px !important; }
.ar-fb.is-bad { border-color: var(--ar-blue); background: var(--ar-blue-soft); color: var(--ar-blue-strong); }
.ar-fb.is-note { border-color: var(--ar-orange); background: var(--ar-orange-soft); color: var(--ar-orange-text); }
.ar-help { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 10px 20px; }
.ar-cmp { border-collapse: collapse; font-size: 16px; }
.ar-cmp th, .ar-cmp td { padding: 5px 10px; border-bottom: 1px solid var(--ar-line); text-align: center; }
.ar-cmp thead th { background: var(--ar-band); font-weight: 700; }
.ar-cmp tbody th { font-weight: 600; text-align: left; }
.ar-cmp tbody td { font: 700 18px var(--ar-digits); }
.ar-cmp .ar-mark-cell { font-size: 20px; }
.ar-cmp .is-ok .ar-mark-cell { color: var(--ar-good); }
.ar-cmp .is-no .ar-mark-cell { color: var(--ar-bad); }
.ar-sol { display: grid; justify-items: center; margin: 0; }
.ar-sol svg { display: block; }
.ar-sol figcaption { margin-top: 2px; color: var(--ar-muted); font-size: 16px; white-space: nowrap; }
.ar-ref-line { fill: none; stroke: var(--ar-ink); stroke-width: 2; stroke-dasharray: 5 3; stroke-linecap: square; }

/* the number pad of the find-the-area challenges */
.ar-padbox { display: grid; align-content: start; gap: 8px; width: 100%; max-width: 420px; margin: 0 auto; }
.ar-answer { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 2px solid var(--ar-band); border-radius: 12px; background: var(--ar-band-soft); font-weight: 700; font-size: 19px; }
.ar-answer-v { flex: 1 1 auto; min-width: 64px; min-height: 44px; padding: 2px 10px; border: 2px solid var(--ar-blue); border-radius: 8px; background: #fff; font: 700 28px/36px var(--ar-digits); text-align: center; }
.ar-answer-u { flex: none; font-weight: 600; font-size: 17px; }
.ar-answer.is-bad .ar-answer-v { border-color: var(--ar-blue-strong); background: var(--ar-blue-soft); color: #5a6067; text-decoration: line-through; }
.ar-answer.is-shown .ar-answer-v { border-color: var(--ar-blue-strong); background: var(--ar-blue-soft); color: var(--ar-blue-strong); }
.ar-answer.is-good .ar-answer-v { border-color: var(--ar-good); background: var(--ar-lime-soft); color: var(--ar-good-text); }
.ar-pad { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ar-key { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0; border: 2px solid var(--ar-edge); border-radius: 10px; background: #fff; font: 700 22px var(--ar-digits); touch-action: manipulation; }
.ar-key:hover { border-color: var(--ar-blue); background: var(--ar-blue-soft); }
.ar-key svg { width: 26px; height: 26px; }
.ar-key-del { grid-column: 6; grid-row: 1 / span 2; color: var(--ar-blue-strong); }
@media (min-width: 700px) {
	.ar-padbox { gap: 10px; margin: 0; }
	/* the narrow pad column: "Area =" on its own line, the box and the unit under it */
	.ar-answer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; }
	.ar-answer-k { grid-column: 1 / -1; }
	.ar-pad { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ar-key { min-height: 50px; }
	.ar-key-0 { grid-column: span 2; }
	.ar-key-del { grid-column: auto; grid-row: auto; }
	.ar-padbox .ar-play-actions .ar-btn { flex: 1 1 auto; }
}

/* ---------- Explore ---------- */
.ar-explore { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "cards" "tray" "side"; gap: 8px; margin-top: 8px; -webkit-user-select: none; user-select: none; }
.ar-explore > .ar-tray { grid-area: tray; }
.ar-cards { grid-area: cards; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.ar-card { display: grid; gap: 6px; min-width: 0; align-content: start; }
.ar-card-t { font-weight: 700; font-size: 17px; text-align: center; }
.ar-side { grid-area: side; display: grid; gap: 8px; align-content: start; }
@media (min-width: 700px) {
	.ar-explore { grid-template-columns: 136px minmax(0, 1fr) 200px; grid-template-areas: "tray cards side"; gap: 10px 12px; margin-top: 10px; align-items: start; }
	.ar-explore .ar-switches { flex-direction: column; flex-wrap: nowrap; }
	.ar-explore.is-two { grid-template-columns: 136px minmax(0, 1fr); grid-template-areas: "tray cards" "side side"; }
	.ar-explore.is-two .ar-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ar-explore.is-two .ar-switches { flex-direction: row; flex-wrap: wrap; justify-content: center; }
	.ar-explore.is-two .ar-legend { text-align: center; }
}
@media (min-width: 980px) {
	.ar-explore.is-two { grid-template-columns: 136px minmax(0, 1fr) 200px; grid-template-areas: "tray cards side"; }
	.ar-explore.is-two .ar-switches { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; }
	.ar-explore.is-two .ar-legend { text-align: left; }
}

/* ---------- the "leave this level?" question ---------- */
.ar-overlay { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 64px 12px 12px; background: rgba(255, 255, 255, .8); }
.ar-dialog { max-width: 460px; padding: 16px 20px; border: 2px solid var(--ar-blue); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(26, 31, 39, .18); }
.ar-dialog p { margin: 0 0 10px; font-weight: 600; font-size: 18px; }

/* ---------- level complete ---------- */
.ar-done-score { font-size: 22px; }
.ar-done-score b { font-family: var(--ar-digits); }
.ar-newrec { padding: 6px 14px; border-radius: 999px; background: var(--ar-lime); font-weight: 700; font-size: 18px; }

@media (prefers-reduced-motion: reduce) {
	.ar-switch-ui, .ar-switch-ui::after, .ar-ghost.is-back { transition: none; }
	.ar-btn.is-calling, .ar-float, .ar-outline.is-good, .ar-shape-line.is-good, .ar-readout.is-flash .ar-ro-v { animation: none; }
	.ar-btn.is-calling { box-shadow: 0 0 0 4px rgba(238, 102, 0, .45); }
	.ar-float { opacity: 0; }
}
