/* Shape Town – the shell, the task frame (DESIGN §9), Tika's bubble, Šestarko, the ceremony, title, profile,
   prologue, parents, sandbox, finale. On top of the kit's ui.css + tika.css. Family look: flat warm colours,
   3–4 px ink outlines, solid offset shadows, Nunito, rounded everything; no filters or blend modes in our art.
   Engine styles live in css/eng/<id>.css (prefixed); the hub and the street in css/town.css. */
:root {
  --sky-bg: #BDEBFA; --grass: #A5D86E; --grass-2: #8DCB5E; --river: #5EC3E8;
  --bp-paper: #E6F0FF; --bp-line: #2F6FD6; --bp-grid: #BCD3F5;
  --board-paper: #FFFBF1;
  --dc: #2A6EE5; --dd: #1D52B3; --ds: #DCE8FF;     /* the current district's colours (set per screen / frame) */
  --top-h: 60px; --tap: 56px;
  --dock-w: clamp(240px, 28vw, 340px);
  --ease-pop: cubic-bezier(.3, 1.5, .5, 1);
}
html[data-layout="short"] { --top-h: 48px; --tap: 48px; }
html.st-narrow { --tap: 48px; }
/* §9 „Text ≥ 16 px everywhere“: the kit's root size goes down to 15 px on phones (1rem = 15–15.7 px), so every text
   of ours that is sized in rem gets a 16-px floor (max(16px, …)); so do the kit's own small texts (kit workaround,
   reported). tests/layout.mjs asserts it on every screen. */
.tk-script-switch, .tk-settings .tk-btn .tk-state { font-size: max(16px, 1em); }
.st-par { font-size: max(16px, 1rem); }

body.st-body {
  background-color: var(--sky-bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px),
    linear-gradient(#CDEFFB, #BDEBFA 55%, #CFE9B4 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
}

/* ---------------------------------------------------------------- top bar (§9: 60 px, 48 in short) */
.st-top { min-height: var(--top-h); height: var(--top-h); padding: 0 clamp(.45rem, 1.4vw, .9rem); gap: .5rem; background: linear-gradient(#FFFDF6, #F3EEDF); border-bottom: 3px solid var(--ink); box-shadow: 0 3px 0 rgba(36, 38, 59, .16); }
.st-top-left, .st-top-right { display: flex; align-items: center; gap: .45rem; flex: 0 0 auto; }
.st-top-right { min-width: 0; }
.st-top-mid { display: flex; align-items: center; gap: .7rem; min-width: 0; flex: 0 1 auto; }
.st-title { font-size: clamp(1.02rem, 2.1vw, 1.32rem); }
.st-brand { font-weight: 1000; letter-spacing: .01em; }
.st-top-btn, .st-top .tk-icon-btn { width: var(--tap); height: var(--tap); }
.st-top .tk-script-switch { min-height: var(--tap); }
.st-top-extra { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }
.st-allgames { display: inline-flex; align-items: center; gap: .35rem; min-height: var(--tap); padding: 0 .9rem 0 .7rem; font-weight: 900; font-size: max(16px, 1rem); color: var(--ink); text-decoration: none; background: #fff; border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.st-allgames:active { transform: translateY(3px); box-shadow: none; }
.st-ag-arrow { font-size: 1.2em; line-height: 1; }
@media (max-width: 520px) { .st-ag-txt { display: none; } .st-allgames { width: var(--tap); justify-content: center; padding: 0; } }
.st-dots { display: inline-flex; gap: .35rem; align-items: center; }
.st-dots > i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; transition: background-color .25s, transform .25s var(--ease-pop); }
.st-dots > i.done { background: var(--sun); }
.st-dots > i.now { transform: scale(1.25); box-shadow: 0 0 0 3px rgba(255, 197, 61, .6); }
.st-count { display: inline-flex; align-items: center; gap: .3rem; height: 40px; padding: 0 .7rem 0 .35rem; background: #fff; border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow-sm); font-weight: 1000; font-size: max(16px, 1.05rem); }
.st-count .st-house-ico { width: 30px; height: 30px; }
.st-house-ico { display: block; overflow: visible; }
.st-who { padding: 2px; background: #fff; }
.st-who svg { width: 100%; height: 100%; }
@media (max-width: 440px) { .st-title { font-size: 1rem; } .st-count { padding: 0 .5rem 0 .25rem; } }
html[data-layout="tall"] .st-top-hub .st-title { display: none; }

/* ---------------------------------------------------------------- main + boot + park */
.st-main { position: relative; overflow: hidden; }
.st-boot { margin: auto; text-align: center; font-weight: 900; }
.st-tika-park { position: fixed; left: -9999px; top: 0; width: 120px; visibility: hidden; }
.st-sr { position: fixed; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; white-space: nowrap; overflow: hidden; overflow: clip; clip-path: inset(50%); }
.st-screen { position: absolute; inset: 0; display: flex; }
.st-backdrop { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.st-backdrop svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------------- Tika's bubble (pages long lines by sentence) */
.st-bubble { font-size: max(16px, clamp(1rem, 1.5vw, 1.1rem)); line-height: 1.3; padding: .5rem .9rem; max-width: 100%; border-radius: 20px; box-shadow: 0 4px 0 var(--ink); background: #FFFDF6; }
.st-btext { max-height: calc(var(--bl, 4) * 1.3em); overflow: hidden; }
.st-bubble.is-faded { opacity: .12; transition: opacity .2s; }
.st-bubble.st-float-b.is-dim:not(.is-faded) { opacity: .45; }
.st-floatslot.is-bottom { top: auto; bottom: 8px; align-items: flex-end; }
.st-bubble.st-caption-b { border-radius: 14px; box-shadow: 0 3px 0 var(--ink); font-size: 16px; line-height: 1.25; padding: .25rem .7rem; background: rgba(255, 253, 246, .97); width: 100%; }
.st-caption-b .st-btext { max-height: calc(2 * 1.25em); }
.st-bubble.st-float-b { font-size: 16px; line-height: 1.28; padding: .35rem .75rem; border-radius: 16px; box-shadow: 0 3px 0 var(--ink); background: rgba(255, 253, 246, .96); pointer-events: none; }
.st-float-b .st-btext { max-height: calc(var(--bl, 3) * 1.28em); }
.st-lbl { font-weight: 1000; color: var(--sky); letter-spacing: .02em; }
.tika.st-loop > .tk-owl { animation: st-loop .9s cubic-bezier(.4, 0, .3, 1); transform-origin: 50% 60%; }
@keyframes st-loop { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- task frame (§9) */
.st-frame { position: absolute; inset: 0; display: grid; gap: 8px; padding: 8px; }
.st-boardwrap { grid-area: board; position: relative; min-width: 0; min-height: 0; border-radius: 22px; background: var(--board-paper); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); overflow: hidden; }
.st-boardwrap > .st-board, .st-board { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; }
.st-board:focus-visible { box-shadow: inset 0 0 0 3px var(--sun); }
.st-floatslot { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; justify-content: center; pointer-events: none; z-index: 6; }
.st-floatslot:empty { display: none; }
.st-caption { grid-area: caption; display: none; min-width: 0; }
.st-dock { grid-area: dock; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 8px; }
.st-docktop { flex: 0 0 auto; min-width: 0; }
.st-docktop:empty { display: none; }
.st-dockhead { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 0; }
.st-hslot { display: flex; align-items: center; min-width: 0; }
.st-hslot-mid { flex: 1 1 auto; }
.st-hslot-t, .st-hslot-b { flex: 0 0 auto; }
.st-hslot:empty { display: none; }
.st-dockbody { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; background: var(--ds); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); padding: 10px; }
.st-bodytop:empty, .st-dockmain:empty { display: none; }
.st-dockmain { position: relative; min-width: 0; min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.st-sayrow { grid-area: say; display: none; align-items: flex-end; gap: 12px; min-width: 0; }
.st-sayrow .st-hslot-mid { padding-bottom: 10px; }
.st-tslot { flex: 0 0 auto; }
.st-tslot .tika { width: 100%; }
.st-buddy { flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: center; }
.st-buddy .st-sest { width: 100%; height: auto; overflow: visible; display: block; }
.st-frame.st-dock-none .st-dockbody { display: none; }

/* wide / square: board | dock, the say row under the board */
html:is([data-layout="wide"], [data-layout="square"]) .st-frame { grid-template-columns: minmax(0, 1fr) var(--dock-w); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "board dock" "say dock"; }
html:is([data-layout="wide"], [data-layout="square"]) .st-frame.st-dock-none { grid-template-columns: minmax(0, 1fr); grid-template-areas: "board" "say"; }
html:is([data-layout="wide"], [data-layout="square"]) .st-frame.st-dock-none .st-dock { display: none; }
html:is([data-layout="wide"], [data-layout="square"]) .st-sayrow { display: flex; min-height: 96px; }
html:is([data-layout="wide"], [data-layout="square"]) .st-sayrow .st-tslot { width: clamp(84px, 9vw, 104px); margin-top: -24px; }
html:is([data-layout="wide"], [data-layout="square"]) .st-sayrow .st-buddy { width: clamp(64px, 6.5vw, 78px); }
html:is([data-layout="wide"], [data-layout="square"]) .st-sayrow .st-hslot-mid { max-width: min(46rem, 100%); }
html:is([data-layout="wide"], [data-layout="square"]) .st-dockhead { display: none; }

/* short: dock column 230 px */
html[data-layout="short"] .st-frame { grid-template-columns: minmax(0, 1fr) 230px; gap: 8px; padding: 8px; }
html[data-layout="short"] .st-frame.st-f-normal { grid-template-rows: 54px minmax(0, 1fr); grid-template-areas: "caption dock" "board dock"; }
/* a fixed strip (the height of a 2-line caption): the board never resizes when Tika starts or stops talking */
html[data-layout="short"] .st-frame.st-f-normal .st-caption { display: flex; align-items: center; height: 54px; }
html[data-layout="short"] .st-frame.st-f-precise { grid-template-rows: minmax(0, 1fr); grid-template-areas: "board dock"; }
html[data-layout="short"] .st-dock { gap: 6px; }
html[data-layout="short"] .st-dockhead { height: 64px; justify-content: space-between; }
html[data-layout="short"] .st-f-normal .st-dockhead { height: 66px; }
html[data-layout="short"] .st-f-precise .st-dockhead .st-tslot { width: 46px; }
html[data-layout="short"] .st-f-normal .st-dockhead .st-tslot { width: 60px; }
html[data-layout="short"] .st-dockhead .st-buddy { width: 44px; }
html[data-layout="short"] .st-dockbody { padding: 8px; border-radius: 18px; gap: 8px; }
html[data-layout="short"] .st-boardwrap { border-radius: 18px; }
html[data-layout="short"] .st-frame.st-dock-none { grid-template-columns: minmax(0, 1fr) 120px; }

/* tall: board over the dock */
html[data-layout="tall"] .st-frame { grid-template-columns: minmax(0, 1fr); grid-template-areas: "board" "dock"; }
html[data-layout="tall"] .st-frame.st-f-normal { grid-template-rows: minmax(0, 1fr) auto; }
html[data-layout="tall"] .st-frame.st-f-normal .st-dock { max-height: 40vh; }
html[data-layout="tall"] .st-f-normal .st-dockhead { min-height: 72px; }
html[data-layout="tall"] .st-f-normal .st-dockhead .st-tslot { width: clamp(64px, 11vw, 92px); margin-top: -8px; align-self: flex-start; }
html[data-layout="tall"] .st-f-normal .st-dockhead .st-buddy { width: clamp(52px, 8vw, 70px); }
html[data-layout="tall"] .st-frame.st-f-precise { grid-template-rows: minmax(0, 1fr) 176px; gap: 0; }
html[data-layout="tall"] .st-f-precise .st-dock { gap: 0; padding-top: 8px; height: 176px; }
html[data-layout="tall"] .st-f-precise .st-dockhead { height: 56px; gap: 6px; }
html[data-layout="tall"] .st-f-precise .st-dockhead .st-tslot { width: 48px; }
html[data-layout="tall"] .st-f-precise .st-dockhead .st-buddy { width: 48px; }
html[data-layout="tall"] .st-f-precise .st-dockbody { height: 112px; flex: 0 0 112px; padding: 6px 8px; border-radius: 18px; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: center; gap: 6px; }
html[data-layout="tall"] .st-f-precise .st-dockmain { flex: 1 1 100%; }
html[data-layout="tall"] .st-f-precise .st-floatslot { max-height: 25%; }
html:is([data-layout="wide"], [data-layout="square"]) .st-frame.has-kp .st-tools { flex-direction: row; flex-wrap: wrap; }
html:is([data-layout="wide"], [data-layout="square"]) .st-frame.has-kp .st-tool { width: 56px; padding: 0; justify-content: center; }
html:is([data-layout="wide"], [data-layout="square"]) .st-frame.has-kp .st-tool-lbl { display: none; }
html:is([data-layout="short"], [data-layout="tall"]) .st-frame.has-kp .st-tools,
html:is([data-layout="short"], [data-layout="tall"]) .st-frame.has-kp .st-ctrls,
html:is([data-layout="short"], [data-layout="tall"]) .st-frame.has-kp .st-tray,
html:is([data-layout="short"], [data-layout="tall"]) .st-frame.has-kp .st-gotovo-host { display: none; }

/* host-owned control slot (frame.ctrlHost): factory buttons such as the ruler's ↻, next to the tool row */
.st-ctrls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.st-ctrls:empty { display: none; }
html[data-layout="tall"] .st-f-precise .st-ctrls { flex: 0 0 auto; }

/* shared tray (§9): engines that offer pieces in the dock use .st-tray > .st-tray-cell (2 rows × 4 cells: 48 px in
   short, 52 px in tall, 56 px in wide); it steps aside while the keypad is up in short / tall */
.st-tray { display: grid; grid-template-columns: repeat(4, 56px); grid-auto-rows: 56px; gap: 6px; justify-content: center; align-content: center; }
.st-tray-cell { position: relative; display: grid; place-items: center; width: 100%; height: 100%; min-width: 0; min-height: 0; background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow-sm); touch-action: none; }
.st-tray-cell.is-empty { background: transparent; border-style: dashed; box-shadow: none; }
.st-tray-cell > svg { width: 82%; height: 82%; display: block; }
html[data-layout="short"] .st-tray { grid-template-columns: repeat(4, 48px); grid-auto-rows: 48px; }
html[data-layout="tall"] .st-tray { grid-template-columns: repeat(4, 52px); grid-auto-rows: 52px; }

/* Nalog card */
.st-order { display: flex; align-items: flex-start; gap: 8px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 6px 10px 6px 6px; min-width: 0; position: relative; }
.st-order[hidden] { display: none; }
.st-order-n { flex: 0 0 auto; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 18px; background: var(--dc); color: #fff; border: 3px solid var(--ink); font-weight: 1000; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.st-order.no-num .st-order-n { display: none; }
.st-order-txt { min-width: 0; font-size: 16px; line-height: 1.28; font-weight: 800; }
.st-order-txt p { margin: 0; }
.st-order-txt p + p { margin-top: 2px; }
.st-order-stamp { color: var(--dd); font-weight: 1000; border-top: 2px dashed var(--bp-grid); padding-top: 3px; }
.st-order-stamp.is-in { animation: st-stamp .45s var(--ease-pop); }
@keyframes st-stamp { from { transform: scale(1.6) rotate(-6deg); opacity: 0; } }
html[data-layout="wide"] .st-order-txt, html[data-layout="square"] .st-order-txt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
html[data-layout="tall"] .st-f-precise .st-order { padding: 3px 8px 3px 4px; border-radius: 12px; align-items: center; max-height: 54px; overflow: hidden; }
html[data-layout="tall"] .st-f-precise .st-order-n { min-width: 30px; height: 30px; font-size: 16px; border-width: 2.5px; }
html[data-layout="tall"] .st-f-precise .st-order-txt { line-height: 1.2; }
html[data-layout="short"] .st-f-precise .st-order { max-height: 64px; overflow: hidden; padding: 4px 8px 4px 4px; }
html[data-layout="short"] .st-order-n { min-width: 30px; height: 30px; font-size: 16px; }

/* tool row (frame.tools) */
.st-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-tool { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 56px; height: 56px; padding: 0; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-sm); color: var(--ink); font-weight: 900; font-size: 16px; touch-action: manipulation; }
.st-tool:active { transform: translateY(3px); box-shadow: none; }
.st-tool.is-on { background: var(--sun); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--sun); }
.st-tool.is-off { opacity: .4; }
.st-tool-ico { width: 40px; height: 40px; display: block; flex: 0 0 auto; }
.st-tool-ico svg { width: 100%; height: 100%; display: block; }
.st-tool-lbl { display: none; }
html:is([data-layout="wide"], [data-layout="square"]) .st-tools { flex-direction: column; align-items: stretch; }
html:is([data-layout="wide"], [data-layout="square"]) .st-tool { width: auto; justify-content: flex-start; padding: 0 12px 0 6px; }
html:is([data-layout="wide"], [data-layout="square"]) .st-tool-lbl { display: inline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-layout="short"] .st-tools { gap: 6px; }
html[data-layout="short"] .st-tool { width: 48px; height: 48px; border-radius: 14px; }
html[data-layout="short"] .st-tool-ico { width: 34px; height: 34px; }
html[data-layout="tall"] .st-f-precise .st-tools { gap: 6px; flex: 1 1 auto; }

/* the Gotovo lamp (ctx.parts.gotovo draws into gotovoHost) */
.st-gotovo-host { display: flex; justify-content: center; }
.st-gotovo-host:empty { display: none; }
.st-lamp { display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 4px 18px 4px 5px; border: 3px solid var(--ink); border-radius: 999px; background: #EEF0F6; box-shadow: var(--shadow-sm); font-weight: 1000; font-size: 18px; color: var(--ink-2); touch-action: manipulation; max-width: 100%; }
.st-lamp-bulb { width: 48px; height: 48px; flex: 0 0 auto; display: block; }
.st-lamp-bulb svg { width: 100%; height: 100%; display: block; }
.st-lamp-glass { fill: #DDE1EA; stroke: #24263B; stroke-width: 3; }
.st-lamp-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-lamp.is-lit { background: var(--sun); color: var(--ink); animation: st-lamp 1.4s ease-in-out infinite; }
.st-lamp.is-lit .st-lamp-glass { fill: #FFF6B0; }
.st-lamp:active { transform: translateY(3px); box-shadow: none; }
@keyframes st-lamp { 50% { box-shadow: 0 3px 0 var(--ink), 0 0 0 6px rgba(255, 197, 61, .45); } }
html[data-layout="short"] .st-lamp { min-height: 48px; font-size: 16px; padding: 2px 14px 2px 3px; }
html[data-layout="short"] .st-lamp-bulb { width: 40px; height: 40px; }
html[data-layout="tall"] .st-f-precise .st-lamp { min-height: 56px; font-size: 16px; padding: 2px 14px 2px 3px; }
html[data-layout="tall"] .st-f-precise .st-gotovo-host { flex: 0 0 auto; }

/* the keypad host (numTag mounts here) */
.st-kp { display: flex; justify-content: center; min-width: 0; }
.st-kp:empty { display: none; }

/* full-frame overlay: Šestarko on the board, drags from the dock */
.st-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; overflow: visible; }
.st-sest-layer { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 8400; overflow: visible; }
.st-sest-arc { fill: none; stroke: #575B7C; stroke-width: 2.4; stroke-dasharray: 4 4; stroke-linecap: round; }

/* ghost layer host (js/geo/ghost.js draws Tika's wing here) */
.st-ghost-layer { position: fixed; inset: 0; pointer-events: none; z-index: 8500; }

/* no engine yet */
.st-noengine { position: absolute; inset: 0; margin: auto; width: min(440px, 92%); height: max-content; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; background: #fff; border: 3px solid var(--ink); border-radius: 26px; box-shadow: var(--shadow-lg); text-align: center; z-index: 30; }
.st-noengine-art { width: 160px; }
.st-noengine-art svg { width: 100%; display: block; }
.st-noengine-t { margin: 0; font-size: 1.2rem; font-weight: 1000; }

/* ---------------------------------------------------------------- Šestarko */
.st-sest { overflow: visible; }
.st-buddy-sest { cursor: pointer; touch-action: manipulation; outline: none; }
.st-buddy-sest:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 12px; }
.st-buddy-sest.is-away { visibility: hidden; }
.sst-lids { opacity: 0; }
.is-blink .sst-lids { opacity: 1; }
.sst-trace { opacity: .8; }
.st-sest-board { pointer-events: none; }

/* ---------------------------------------------------------------- buttons & bits */
.tk-btn { min-height: var(--tap); }
.st-hold { position: relative; overflow: hidden; }
.st-hold .st-hold-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 197, 61, .6); pointer-events: none; }
.st-hold > span, .st-hold > svg { position: relative; z-index: 1; }
.st-glow { animation: st-glowk 1.1s ease-in-out infinite; }
@keyframes st-glowk { 50% { box-shadow: 0 0 0 5px rgba(255, 197, 61, .95), 0 0 0 10px rgba(255, 197, 61, .35); } }
.st-parents-btn { font-size: max(16px, 1rem); min-height: 48px; padding: .3em .9em; }
.st-ico { display: block; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- reduced motion */
html[data-motion="reduce"] :is(.st-glow, .st-lamp.is-lit, .st-anim, .st-drift) { animation: none !important; }
html[data-motion="reduce"] .st-glow { box-shadow: 0 0 0 5px rgba(255, 197, 61, .95); }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) :is(.st-glow, .st-lamp.is-lit, .st-anim, .st-drift) { animation: none !important; }
  html:not([data-motion="full"]) .st-glow { box-shadow: 0 0 0 5px rgba(255, 197, 61, .95); }
}

/* ================================================================ title */
.st-title-scr { display: block; }
.st-drift { animation: st-drift 10s ease-in-out infinite alternate; }
.st-drift-2 { animation-duration: 13s; }
@keyframes st-drift { to { transform: translateX(30px); } }
.st-title-hill { position: absolute; left: -6%; bottom: -14%; width: 44%; height: 44%; border-radius: 50% 50% 0 0; background: var(--bp-paper); border: 3px solid var(--ink);
  background-image: linear-gradient(var(--bp-grid) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--bp-grid) 1.5px, transparent 1.5px); background-size: 22px 22px; }
.st-title-center { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: clamp(.5rem, 1.8vh, 1.1rem); width: min(640px, 92%); z-index: 2; }
.st-logo { display: flex; align-items: baseline; justify-content: center; font-weight: 1000; font-size: clamp(3rem, 8vw, 5.6rem); line-height: 1; letter-spacing: .01em; user-select: none; white-space: nowrap; }
.st-logo-l { display: inline-block; color: var(--c); transform: rotate(var(--r)); text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 8px 0 var(--ink); animation: st-logo-in .6s var(--ease-pop) both; animation-delay: var(--d); }
.st-logo-sp { display: inline-block; width: .32em; }
@keyframes st-logo-in { from { opacity: 0; transform: translateY(-30px) rotate(var(--r)) scale(.6); } }
.st-tagline { font-weight: 1000; font-size: clamp(1.1rem, 2.4vw, 1.5rem); background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: .3em 1.1em; box-shadow: var(--shadow); transform: rotate(-1.5deg); }
.st-pcards { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.st-pcard { position: relative; width: 92px; height: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #fff; border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--shadow); cursor: pointer; padding: 6px 4px; }
.st-pcard:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.st-pcard.is-cur { background: var(--sun-soft); }
.st-pc-av { width: 62px; height: 62px; display: block; }
.st-pc-av svg { width: 100%; height: 100%; }
.st-pc-n { display: flex; align-items: center; gap: 3px; font-weight: 1000; font-size: max(16px, 1rem); }
.st-pc-n .st-house-ico { width: 22px; height: 22px; }
.st-pcard-new { border-style: dashed; background: rgba(255, 255, 255, .75); box-shadow: none; }
.st-pc-plus { font-size: 2.2rem; font-weight: 1000; line-height: 1; }
.st-pc-lbl { font-size: 16px; font-weight: 900; text-align: center; line-height: 1.1; }
.st-play { font-size: 1.6rem; min-height: 68px; padding: .4em 1.6em; }
.st-title-tika { position: absolute; left: clamp(8px, 3vw, 50px); bottom: 4%; width: clamp(120px, 16vw, 200px); z-index: 3; }
.st-title-sest { position: absolute; left: calc(clamp(8px, 3vw, 50px) + clamp(120px, 16vw, 200px) - 16px); bottom: 4%; width: clamp(84px, 12vw, 150px); z-index: 3; }
.st-title-sest .st-sest { width: 100%; height: auto; }
.st-title-tika .st-bubble { position: absolute; left: 70%; bottom: 102%; width: max-content; max-width: min(300px, 70vw); }
.st-title-foot { position: absolute; right: 16px; bottom: 10px; display: flex; align-items: center; gap: .8rem; z-index: 4; white-space: nowrap; }
.st-free { font-weight: 900; font-size: max(16px, 1rem); color: var(--ink); background: rgba(255, 251, 241, .9); padding: .2em .7em; border-radius: 999px; border: 2px solid var(--ink); }
html[data-layout="tall"] .st-title-center { top: 38%; }
html[data-layout="tall"] .st-title-hill { width: 80%; height: 26%; left: -14%; }
html[data-layout="tall"] .st-title-tika { bottom: 112px; width: clamp(110px, 26vw, 190px); }
html[data-layout="tall"] .st-title-sest { left: calc(clamp(8px, 3vw, 50px) + clamp(110px, 26vw, 190px) - 6px); bottom: 118px; width: clamp(60px, 13vw, 96px); }
html[data-layout="tall"] .st-title-foot { left: 50%; right: auto; transform: translateX(-50%); bottom: 8px; flex-direction: column-reverse; gap: 6px; }
html[data-layout="tall"] .st-free { padding: .1em .6em; }
html[data-layout="short"] .st-title-center { left: 60%; top: 50%; width: 62%; gap: .45rem; }
html[data-layout="short"] .st-logo { font-size: 2.9rem; }
html[data-layout="short"] .st-tagline { font-size: max(16px, 1.05rem); }
html[data-layout="short"] .st-title-tika { width: 104px; bottom: 4%; left: 10px; }
html[data-layout="short"] .st-title-sest { left: 108px; width: 58px; bottom: 6%; }
html[data-layout="short"] .st-title-hill { width: 34%; height: 46%; }
html[data-layout="short"] .st-pcard { width: 76px; height: 86px; }
html[data-layout="short"] .st-pc-av { width: 46px; height: 46px; }
html[data-layout="short"] .st-play { min-height: 56px; font-size: 1.35rem; }
html[data-layout="short"] .st-free { display: none; }
html[data-layout="short"] .st-title-foot { bottom: 6px; right: 10px; }
html[data-layout="short"] .st-title-tika .st-bubble { max-width: 230px; }

/* ================================================================ new player */
.st-new-scr { flex-direction: column; align-items: center; gap: 1rem; padding: 1rem; }
.st-new-head { display: flex; align-items: center; gap: .8rem; width: min(760px, 100%); }
.st-new-tika { width: clamp(80px, 12vw, 120px); flex: 0 0 auto; }
.st-new-bubble { flex: 1 1 auto; min-width: 0; }
.st-new-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; width: 100%; }
.st-av-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.6rem, 2vw, 1.2rem); width: min(560px, 100%); }
.st-av { aspect-ratio: 1; background: none; border: 0; padding: 0; border-radius: 50%; cursor: pointer; transition: transform .15s var(--ease-pop); }
.st-av svg { width: 100%; height: 100%; display: block; }
.st-av:active { transform: scale(.94); }
.st-av.is-on { transform: scale(1.1); }
html[data-layout="short"] .st-new-scr { padding: .5rem; gap: .4rem; }
html[data-layout="short"] .st-new-tika { width: 64px; }
html[data-layout="short"] .st-av-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); width: min(780px, 100%); }

/* ================================================================ prologue (§1.4) */
.st-pro-scr { display: block; }
.st-pro-valley .st-bp { clip-path: inset(0 0 0 0); }
.st-pro-valley.is-plain .st-bp { clip-path: inset(0 100% 0 0); }
.st-pro-valley.is-unroll .st-bp { transition: clip-path 1.5s cubic-bezier(.3, .1, .3, 1); }
.st-pro-valley .st-bp-houses > g { transform-box: fill-box; transform-origin: 50% 100%; }
.st-pro-valley.is-plain .st-bp-houses > g { clip-path: inset(100% 0 0 0); }
.st-pro-valley.is-unroll .st-bp-houses > g { clip-path: inset(0 0 0 0); transition: clip-path .9s ease-out; }
.st-pro-valley.is-unroll .st-bp-houses > g:nth-child(1) { transition-delay: .5s; } .st-pro-valley.is-unroll .st-bp-houses > g:nth-child(2) { transition-delay: .75s; }
.st-pro-valley.is-unroll .st-bp-houses > g:nth-child(3) { transition-delay: 1s; } .st-pro-valley.is-unroll .st-bp-houses > g:nth-child(4) { transition-delay: 1.25s; } .st-pro-valley.is-unroll .st-bp-houses > g:nth-child(5) { transition-delay: 1.5s; }
.st-pro-valley.is-wobble .st-bp-crooked { animation: st-crook .3s ease-in-out 3; transform-origin: 50% 100%; }
@keyframes st-crook { 50% { transform: skewX(-9deg) rotate(-3deg); } }
.st-pro-valley.is-puf .st-bp-crooked { transform: skewX(24deg) scaleY(.15) translateY(40px); opacity: 0; transition: transform .45s ease-in, opacity .5s ease-in .2s; animation: none; }
.st-pro-birds { position: absolute; left: 0; top: 10%; width: clamp(80px, 12vw, 140px); animation: st-birds 16s linear infinite; pointer-events: none; }
.st-pro-birds svg { width: 100%; display: block; }
@keyframes st-birds { from { transform: translateX(-20vw); } to { transform: translateX(110vw); } }
.st-pro-stage { position: absolute; inset: 0; }
.st-pro-tika { position: absolute; left: 3%; bottom: 3%; width: clamp(110px, 17vw, 210px); z-index: 4; }
.st-pro-tika.is-glide { animation: st-glide 1.4s cubic-bezier(.2, .8, .3, 1); }
@keyframes st-glide { from { transform: translate(-130%, -60%) rotate(-14deg); } 70% { transform: translate(6%, -6%) rotate(3deg); } }
.st-pro-bubble { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); width: min(640px, 92%); display: flex; justify-content: center; z-index: 6; }
.st-pro-roll { position: absolute; left: 30%; bottom: 15%; width: clamp(150px, 22vw, 260px); padding: 0; border: 0; background: none; border-radius: 30px; touch-action: none; cursor: grab; z-index: 3; transform: translateX(var(--pull, 0px)); }
.st-pro-roll.is-in { animation: st-rollin .7s var(--ease-pop); }
@keyframes st-rollin { from { transform: translateY(-60px) rotate(-8deg); opacity: 0; } }
.st-pro-rollart, .st-pro-rollart svg { display: block; width: 100%; }
.st-pro-roll.is-open { animation: st-unroll 1.5s cubic-bezier(.3, .1, .3, 1) forwards; pointer-events: none; }
@keyframes st-unroll { to { transform: translateX(44vw) scale(.55); } }
.st-pro-arrow { position: absolute; right: -44px; top: 50%; transform: translateY(-50%); font-size: 2.6rem; font-weight: 1000; color: var(--ink); animation: st-nudge 1s ease-in-out infinite; }
@keyframes st-nudge { 50% { transform: translate(12px, -50%); } }
.st-pro-bump { position: absolute; right: 3%; bottom: 15%; width: clamp(96px, 13vw, 150px); padding: 0; border: 0; background: none; border-radius: 24px; cursor: pointer; z-index: 3; touch-action: manipulation; }
.st-pro-bump-in { position: absolute; left: 40%; top: -26%; width: 34%; aspect-ratio: 1; border-radius: 50% 50% 40% 40%; background: #C9D2DE; border: 3px solid var(--ink); opacity: 0; }
.st-pro-bump.is-wiggle .st-pro-rollart { animation: st-wiggle .45s ease-in-out infinite; }
.st-pro-bump.is-wiggle .st-pro-bump-in { opacity: 1; animation: st-peekup .9s ease-in-out infinite; }
@keyframes st-wiggle { 25% { transform: rotate(-6deg) translateY(-3px); } 75% { transform: rotate(6deg); } }
@keyframes st-peekup { 50% { transform: translateY(-6px) rotate(8deg); } }
.st-pro-sest { position: absolute; width: clamp(70px, 10vw, 124px); transform: translate(-50%, -100%); z-index: 5; transition: left .55s cubic-bezier(.3, 1.3, .5, 1), top .55s cubic-bezier(.3, 1.3, .5, 1), width .4s ease; }
.st-pro-sest .st-sest { width: 100%; height: auto; display: block; }
.st-pro-sest.is-pop { animation: st-pop .6s var(--ease-pop); }
.st-pro-sest.is-hide { z-index: 3; width: clamp(56px, 8vw, 96px); }
@keyframes st-pop { from { transform: translate(-50%, -40%) scale(.2); opacity: 0; } }
.st-pro-circle { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: min(46vh, 320px); height: min(46vh, 320px); border-radius: 50%; touch-action: none; cursor: grab; z-index: 3; }
.st-pro-circle.is-in { animation: st-circin .5s var(--ease-pop); }
@keyframes st-circin { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } }
.st-pro-circle svg { width: 100%; height: 100%; display: block; overflow: visible; }
.st-pro-water { transform-box: fill-box; transform-origin: 50% 50%; transform: scale(0); }
.st-pro-circle.is-full .st-pro-water { transform: scale(1); transition: transform .6s ease-out; }
.st-pro-hint { position: absolute; inset: -6%; border-radius: 50%; border: 3px dashed rgba(255, 197, 61, .9); animation: st-spin360 6s linear infinite; pointer-events: none; }
.st-pro-circle.is-drag .st-pro-hint, .st-pro-circle.is-full .st-pro-hint { display: none; }
.st-pro-fountain { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: min(44vh, 290px); z-index: 3; }
.st-pro-fountain svg { width: 100%; display: block; }
.st-pro-fountain.is-on { animation: st-founton .7s var(--ease-pop); }
@keyframes st-founton { from { transform: translate(-50%, -50%) scale(.4); } }
.st-pro-fountain .st-jets { transform-box: fill-box; transform-origin: 50% 100%; animation: st-jets 1.6s ease-in-out infinite; }
.st-pro-plane { position: absolute; left: 22%; top: 46%; width: 76px; z-index: 6; }
.st-pro-plane svg { width: 100%; display: block; }
.st-pro-plane.is-fly { animation: st-fly 2.8s cubic-bezier(.4, 0, .6, 1) forwards; }
@keyframes st-fly { 0% { transform: scale(.2) rotate(40deg); opacity: 0; } 15% { transform: scale(1) rotate(-10deg); opacity: 1; } 60% { transform: translate(-10vw, -18vh) rotate(-20deg); } 100% { transform: translate(-40vw, -6vh) rotate(-8deg) scale(.6); opacity: 0; } }
.st-pro-next { position: absolute; right: 4%; bottom: 5%; z-index: 7; }
.st-skip { min-height: 48px; font-size: max(16px, 1rem); }
html[data-layout="tall"] .st-pro-tika { left: 3%; bottom: 2%; width: 30%; }
html[data-layout="tall"] .st-pro-bubble { top: 3%; }
html[data-layout="tall"] .st-pro-roll { left: 16%; bottom: 30%; width: 52%; }
html[data-layout="tall"] .st-pro-bump { right: 4%; bottom: 30%; width: 34%; }
html[data-layout="tall"] .st-pro-circle { width: min(74vw, 320px); height: min(74vw, 320px); top: 50%; }
html[data-layout="tall"] .st-pro-fountain { width: min(70vw, 300px); top: 50%; }
html[data-layout="tall"] .st-pro-next { right: 4%; bottom: 4%; }
html[data-layout="tall"] .st-pro-arrow { right: -36px; }
html[data-layout="short"] .st-pro-tika { width: 100px; left: 2%; bottom: 3%; }
html[data-layout="short"] .st-pro-bubble { top: 3%; width: 72%; }
html[data-layout="short"] .st-pro-circle { width: 210px; height: 210px; top: 58%; }
html[data-layout="short"] .st-pro-fountain { width: 200px; top: 58%; }
html[data-layout="short"] .st-pro-roll { bottom: 10%; width: 180px; }
html[data-layout="short"] .st-pro-bump { bottom: 10%; width: 110px; }
html[data-motion="reduce"] :is(.st-pro-birds, .st-pro-tika.is-glide, .st-pro-arrow, .st-pro-bump.is-wiggle *, .st-pro-hint, .st-pro-fountain .st-jets) { animation: none !important; }
@media (prefers-reduced-motion: reduce) { html:not([data-motion="full"]) :is(.st-pro-birds, .st-pro-tika.is-glide, .st-pro-arrow, .st-pro-bump.is-wiggle *, .st-pro-hint, .st-pro-fountain .st-jets) { animation: none !important; } }

/* ================================================================ Gradilište ceremony */
.st-cer { position: absolute; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px 10px; animation: st-fade .25s;
  background-color: var(--ds); background-image: linear-gradient(rgba(47, 111, 214, .12) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(47, 111, 214, .12) 1.5px, transparent 1.5px); background-size: 24px 24px; }
.st-cer.out { opacity: 0; transition: opacity .2s; }
@keyframes st-fade { from { opacity: 0; } }
.st-cer-stage { position: relative; min-width: 0; min-height: 0; border-radius: 24px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); overflow: hidden; background: #CDEFFB; }
.st-cer-stage.is-zoom > :is(.st-cer-back, .st-cer-lotwrap) { animation: st-camin .8s cubic-bezier(.2, .8, .3, 1); }
@keyframes st-camin { from { transform: scale(1.3) translateY(4%); } }
.st-cer-stage.is-zoom > .st-cer-lotwrap { animation-name: st-camin2; }
@keyframes st-camin2 { from { transform: translateX(-50%) scale(1.3) translateY(4%); } }
.st-cer-stage.is-shake { animation: st-shake .28s linear; }
@keyframes st-shake { 25% { transform: translate(2px, 2px); } 50% { transform: translate(-2px, 1px); } 75% { transform: translate(1px, -1px); } }
.st-cer-back, .st-cer-back svg, .st-cer-crane, .st-cer-crane svg, .st-cer-fx { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.st-cer-fx { pointer-events: none; z-index: 8; }
.st-cer-lotwrap { position: absolute; left: 56%; bottom: 6%; height: 82%; transform: translateX(-50%); display: flex; align-items: flex-end; justify-content: center; transition: left .9s ease, height .9s ease; z-index: 2; }
.st-cer-lot { position: relative; height: 100%; }
.st-cer-lot svg { height: 100%; width: auto; display: block; overflow: visible; }
.st-cer-patch { position: absolute; left: -10%; right: -10%; bottom: -3%; height: 30%; border-radius: 16px; border: 2px dashed var(--bp-line); background: rgba(230, 240, 255, .9);
  background-image: linear-gradient(rgba(47, 111, 214, .18) 1.4px, transparent 1.4px), linear-gradient(90deg, rgba(47, 111, 214, .18) 1.4px, transparent 1.4px); background-size: 14px 14px; transition: opacity 1.1s ease, transform 1.1s ease; }
.st-cer-patch.is-gone { opacity: 0; transform: scale(1.25); }
.st-bld.is-building .b-round { stroke-dasharray: 100; stroke-dashoffset: 100; fill-opacity: 0; }
.st-bld.is-building .b-round-x { opacity: 0; }
.st-bld.is-building .b-round.is-drawn { stroke-dashoffset: 0; fill-opacity: 1; transition: stroke-dashoffset .55s ease, fill-opacity .3s ease .4s; }
.st-bld.is-building .b-round.is-drawn + .b-round-x { opacity: 1; transition: opacity .3s ease .5s; }
.st-bld.is-painted .b-wall { animation: st-paint .85s ease-out both; }
@keyframes st-paint { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.st-bld.is-deco-drop .b-deco { animation: st-drop .5s var(--ease-pop); }
@keyframes st-drop { from { transform: translateY(-60px); opacity: 0; } }
.st-roller { position: absolute; width: 34px; margin-left: -10px; z-index: 7; animation: st-roll .85s ease-in-out forwards; }
.st-roller svg { width: 100%; display: block; }
@keyframes st-roll { from { transform: translate(0, 0) rotate(-6deg); } 50% { transform: translate(calc(var(--dx) * .5), -14px) rotate(6deg); } to { transform: translate(var(--dx), 0) rotate(-4deg); opacity: .2; } }
.st-cer-crane { pointer-events: none; z-index: 3; transform: translateX(-105%); visibility: hidden; }
.st-cer-crane.is-in { transform: none; visibility: visible; transition: transform .5s cubic-bezier(.3, 1.2, .5, 1); }
.st-cer-crane.is-out { transform: translateX(-105%); visibility: hidden; transition: transform .35s ease-in, visibility 0s linear .35s; }
.st-cer-puff { position: absolute; width: 0; height: 0; z-index: 7; }
.st-cer-puff i { position: absolute; left: -11px; top: -14px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); animation: st-puff2 .7s ease-out forwards; }
.st-cer-puff i:nth-child(1) { --dx: -30px; } .st-cer-puff i:nth-child(2) { --dx: 0px; animation-delay: .04s; } .st-cer-puff i:nth-child(3) { --dx: 30px; animation-delay: .08s; }
.st-cer-puff.is-big i { width: 30px; height: 30px; left: -15px; top: -18px; }
@keyframes st-puff2 { from { transform: translate(0, 0) scale(.3); opacity: 1; } to { transform: translate(var(--dx), -16px) scale(1.5); opacity: 0; } }
.st-cer-sest { position: absolute; left: 88%; top: 88%; width: clamp(56px, 13%, 100px); transform: translate(-30%, -86%); z-index: 6; transition: left .32s cubic-bezier(.3, 1.4, .5, 1), top .32s cubic-bezier(.3, 1.4, .5, 1); }
.st-cer-sest .st-sest { width: 100%; height: auto; display: block; }
.st-cer-sest.is-on { width: clamp(46px, 10%, 80px); }
.st-cer-seal { position: absolute; right: 5%; top: 7%; width: clamp(80px, 22%, 130px); z-index: 6; animation: st-slam .45s var(--ease-pop); transition: width .6s ease; }
.st-cer-seal svg { width: 100%; display: block; }
.st-cer-seal.is-small { width: clamp(60px, 12%, 86px); }
@keyframes st-slam { from { transform: scale(2.4) rotate(-24deg); opacity: 0; } }
.st-cer-lm { position: absolute; right: 3%; bottom: 7%; height: 80%; z-index: 2; animation: st-rise 1.1s cubic-bezier(.2, .9, .3, 1); }
.st-cer-lm svg { height: 100%; width: auto; display: block; overflow: visible; }
@keyframes st-rise { from { transform: translateY(110%); } }
.st-cer-stage.is-two .st-cer-lotwrap { left: 34%; height: 58%; }
.st-cer-bunting { position: absolute; left: 0; right: 0; top: 0; z-index: 5; animation: st-bunt .7s var(--ease-pop); }
.st-cer-bunting svg { display: block; }
@keyframes st-bunt { from { transform: translateY(-70px); } }
.st-cer-cart { position: absolute; left: 10%; bottom: 3%; width: clamp(90px, 22%, 170px); z-index: 4; animation: st-cartin 1.3s cubic-bezier(.2, .8, .3, 1); }
.st-cer-cart svg { width: 100%; display: block; }
.st-cart-wheel { transform-box: fill-box; transform-origin: 50% 50%; animation: st-spin360 .45s linear 3; }
.st-cart-rider { position: absolute; left: 22%; bottom: 46%; width: 48%; }
.st-cart-rider svg { width: 100%; display: block; }
@keyframes st-cartin { from { transform: translateX(-140%); } }
.st-cer-res { position: absolute; left: calc(10% + clamp(90px, 22%, 170px) * .55); bottom: 6%; width: clamp(70px, 16%, 124px); z-index: 5; }
.st-cer-res svg { width: 100%; display: block; overflow: visible; }
.st-cer-res.is-in { animation: st-hopout .8s var(--ease-pop); }
@keyframes st-hopout { 0% { transform: translate(-40%, -40%) scale(.6); } 50% { transform: translate(-10%, -60%); } }
.st-cer-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "say pots" "say extra" "say actions"; align-items: center; gap: 6px 14px; min-height: 92px; }
.st-cer-say { grid-area: say; display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.st-cer-tika { width: 92px; flex: 0 0 auto; }
.st-cer-bubble { flex: 1 1 auto; min-width: 0; padding-bottom: 8px; }
.st-cer-pots { grid-area: pots; display: flex; justify-content: center; gap: 12px; }
.st-pot-btn { width: 76px; height: 76px; padding: 6px; border-radius: 22px; border: 3px solid var(--ink); background: #fff; box-shadow: 0 5px 0 var(--ink); cursor: pointer; touch-action: manipulation; animation: st-potin .4s var(--ease-pop) both; }
.st-pot-btn:nth-child(2) { animation-delay: .06s; } .st-pot-btn:nth-child(3) { animation-delay: .12s; } .st-pot-btn:nth-child(4) { animation-delay: .18s; }
@keyframes st-potin { from { transform: translateY(30px) scale(.6); opacity: 0; } }
.st-pot-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.st-pot-btn svg { width: 100%; height: 100%; display: block; }
.st-pot-btn.is-tip svg { animation: st-tip .45s ease forwards; transform-origin: 50% 80%; }
@keyframes st-tip { to { transform: rotate(-60deg) translate(-6px, -4px); } }
.st-cer-extra { grid-area: extra; display: flex; justify-content: center; }
.st-cer-hat { display: inline-flex; align-items: center; gap: 8px; padding: 4px 16px 4px 6px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink); font-weight: 1000; font-size: max(16px, 1rem); animation: st-stamp .5s var(--ease-pop); }
.st-hat-av { width: 52px; height: 52px; display: block; }
.st-hat-av svg { width: 100%; height: 100%; display: block; }
.st-hat-av.is-new { animation: st-hatnew .7s var(--ease-pop) .3s both; }
@keyframes st-hatnew { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.st-hat-arrow { font-weight: 1000; font-size: 1.3rem; }
.st-cer-actions { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.st-cer-actions:empty { display: none; }
.st-cer.has-actions .st-cer-pots { display: none; }
html[data-layout="tall"] .st-cer-panel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "say" "pots" "extra" "actions"; gap: 8px; min-height: 0; }
html[data-layout="tall"] .st-cer-tika { width: 80px; }
html[data-layout="tall"] .st-cer-lotwrap { height: 70%; left: 58%; }
html[data-layout="tall"] .st-cer-stage.is-two .st-cer-lotwrap { left: 32%; height: 52%; }
html[data-layout="tall"] .st-cer-lm { height: 66%; }
html[data-layout="short"] .st-cer { grid-template-columns: minmax(0, 1fr) 260px; grid-template-rows: minmax(0, 1fr); padding: 6px 8px; gap: 8px; }
html[data-layout="short"] .st-cer-panel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "say" "pots" "extra" "actions"; align-content: end; gap: 6px; min-height: 0; }
html[data-layout="short"] .st-cer-say { flex-direction: column-reverse; align-items: stretch; }
html[data-layout="short"] .st-cer-tika { width: 64px; align-self: flex-start; }
html[data-layout="short"] .st-cer-bubble { padding: 0; }
html[data-layout="short"] .st-cer-pots { gap: 8px; }
html[data-layout="short"] .st-pot-btn { width: 56px; height: 56px; border-radius: 16px; padding: 4px; }
html[data-layout="short"] .st-cer-hat { font-size: 16px; padding: 2px 10px 2px 4px; }
html[data-layout="short"] .st-hat-av { width: 40px; height: 40px; }
html[data-layout="short"] .st-cer-actions .tk-btn { min-height: 48px; }
html[data-motion="reduce"] :is(.st-cer-stage.is-zoom > *, .st-cer-lm, .st-cer-cart, .st-cer-res.is-in, .st-cer-bunting, .st-pot-btn, .st-cart-wheel) { animation: none !important; }
@media (prefers-reduced-motion: reduce) { html:not([data-motion="full"]) :is(.st-cer-stage.is-zoom > *, .st-cer-lm, .st-cer-cart, .st-cer-res.is-in, .st-cer-bunting, .st-pot-btn, .st-cart-wheel) { animation: none !important; } }

/* ================================================================ parents */
.st-par { display: flex; flex-direction: column; gap: 14px; max-width: 640px; text-align: left; }
.st-par-sec h3 { margin: 0 0 6px; font-size: 1.15rem; }
.st-par-sec p { margin: 0; font-weight: 700; }
.st-par-sec ul { margin: 0; padding-left: 1.2em; font-weight: 700; }
.st-par-map { display: flex; flex-direction: column; gap: 10px; }
.st-par-who { display: flex; align-items: center; gap: 12px; }
.st-par-av { width: 64px; flex: 0 0 auto; }
.st-par-av svg { width: 100%; display: block; }
.st-par-whotxt { display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.st-par-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 8px; background: #fff; border: 2px solid var(--ink-3); border-radius: 14px; }
.st-par-bar { display: grid; grid-template-columns: 28px minmax(0, auto) minmax(22px, 1fr) auto; align-items: center; gap: 5px; font-weight: 800; font-size: 16px; }
.st-par-ico { width: 28px; height: 28px; display: block; flex: 0 0 auto; }
.st-par-ico svg { width: 100%; height: 100%; display: block; }
.st-par-dn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-par-track { height: 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ds); overflow: hidden; }
.st-par-track i { display: block; height: 100%; width: calc(var(--f) * 100%); background: var(--dc); }
.st-par-num { font-variant-numeric: tabular-nums; }
.st-par-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.st-par-outcomes { display: flex; flex-direction: column; gap: 8px; }
.st-par-grp { border: 2px solid var(--ink); border-left: 8px solid var(--dc); border-radius: 14px; background: #fff; overflow: hidden; }
.st-par-gh { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: var(--ds); font-weight: 900; }
.st-par-grp ul { list-style: none; padding: 0 !important; margin: 0; }
.st-par-grp li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-top: 2px solid var(--ink-3, #E4E6EF); }
.st-par-o { min-width: 0; }
.st-chip-st { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px; border-radius: 999px; border: 2px solid var(--ink); font-size: 16px; font-weight: 900; background: #EEF0F6; white-space: nowrap; }
.st-chip-st i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; flex: 0 0 auto; }
.st-chip-st.is-practice { background: var(--sun-soft, #FFF1C2); }
.st-chip-st.is-practice i { background: linear-gradient(90deg, var(--ink) 50%, #fff 50%); }
.st-chip-st.is-mastered { background: var(--go); color: #fff; }
.st-chip-st.is-mastered i { background: #fff; box-shadow: inset 0 0 0 3px var(--go); }
.st-par-note { font-weight: 700; color: #575B7C; }
.st-par-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.st-par-lbl { font-weight: 900; margin-top: 4px; }
html[data-layout="tall"] .st-par-bars { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 520px) { .st-par-grp li { flex-wrap: wrap; gap: 4px; } .st-par-bars { grid-template-columns: minmax(0, 1fr); } }

/* ================================================================ sandbox */
.st-sand-host { position: absolute; inset: 0; }
.st-sand-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.st-sandbox .st-tools { order: -1; }
.st-sand-actions .tk-btn { flex: 1 1 auto; }
html:is([data-layout="short"], [data-layout="tall"]) .st-sand-actions .tk-btn { padding: 0 .6em; font-size: 16px; min-width: 48px; }
html[data-layout="tall"] .st-sandbox .st-sand-actions .tk-btn span { display: none; }
html[data-layout="tall"] .st-sandbox .st-sand-actions .tk-btn { flex: 0 0 auto; width: 52px; min-height: 48px; justify-content: center; }
html[data-layout="short"] .st-sandbox .st-sand-actions .tk-btn span { display: none; }
html[data-layout="short"] .st-sandbox .st-sand-actions .tk-btn { flex: 0 0 auto; width: 48px; min-height: 48px; justify-content: center; padding: 0; }
.st-gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-gal-slot { aspect-ratio: 1; min-width: 72px; padding: 6px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-sm); font-size: 2rem; font-weight: 1000; color: var(--ink-3); }
.st-gal-slot svg { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.st-gal-slot.is-empty { border-style: dashed; box-shadow: none; }

/* ================================================================ finale: stage path, opening (§7.1), diploma */
.st-fin-prog { display: inline-flex; gap: 4px; align-items: center; }
.st-fin-step { width: 32px; height: 32px; padding: 2px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; opacity: .5; }
.st-fin-step.is-now { opacity: 1; box-shadow: 0 0 0 3px var(--sun); }
.st-fin-step.is-done { opacity: 1; background: var(--dc); }
.st-fin-ico svg { width: 100%; height: 100%; display: block; }
html[data-layout="tall"] .st-fin-step, html[data-layout="short"] .st-fin-step { width: 24px; height: 24px; border-width: 2px; }
/* the opening: one scene over the whole main area; --rw = the ribbon's width, everything on the trg hangs off it */
.st-open { position: absolute; inset: 0; z-index: 40; overflow: hidden; background: #2E3350; --rw: min(540px, 70vw); --gy: 26%; }
.st-open-sky { position: absolute; inset: 0; }
.st-open-sky svg { width: 100%; height: 100%; display: block; }
.st-open-lamp .st-open-glow { opacity: 0; }
.st-open.is-dusk .st-open-bulb { animation: st-bulb .35s ease-out forwards; animation-delay: calc(.3s + var(--i) * .22s); }
.st-open.is-dusk .st-open-glow { animation: st-glowon .5s ease-out forwards; animation-delay: calc(.3s + var(--i) * .22s); }
@keyframes st-bulb { to { fill: #FFE45C; } }
@keyframes st-glowon { to { opacity: .35; } }
.st-open-say { position: absolute; left: 10px; top: 8px; right: 10px; display: flex; align-items: flex-start; gap: 10px; z-index: 6; pointer-events: none; }
.st-open-say > * { pointer-events: auto; }
.st-open-tika { width: 92px; flex: 0 0 auto; }
.st-open-bubble { flex: 0 1 auto; min-width: 0; max-width: 560px; margin-top: 18px; }
.st-open-skip { position: absolute; right: 12px; bottom: 12px; z-index: 7; }
/* the ribbon between its two posts, across the trg in front of the fountain; the halves part when it is cut */
.st-open-ribbon { position: absolute; left: 50%; bottom: var(--gy); width: var(--rw); transform: translateX(-50%); display: flex; padding: 0; border: 0; background: none; border-radius: 18px; touch-action: none; cursor: crosshair; z-index: 3; -webkit-tap-highlight-color: transparent; }
.st-open-rib-l, .st-open-rib-r { flex: 1 1 50%; min-width: 0; display: block; transition: transform .7s cubic-bezier(.4, 0, .6, 1), opacity .5s ease-in .4s; }
.st-open-rib-l svg, .st-open-rib-r svg { width: 100%; display: block; }
.st-open-rib-l { transform-origin: 3% 96%; }
.st-open-rib-r { transform-origin: 97% 96%; }
.st-open-ribbon.is-cut { pointer-events: none; }
.st-open-ribbon.is-cut .st-open-rib-l { transform: rotate(-58deg) translateX(-6%); opacity: 0; }
.st-open-ribbon.is-cut .st-open-rib-r { transform: rotate(58deg) translateX(6%); opacity: 0; }
.st-open-cut { position: absolute; left: 22%; right: 22%; top: 45%; height: 0; border-top: 4px dashed #FFF4B8; pointer-events: none; animation: st-cuthint 1.6s ease-in-out infinite; }
.st-open-cut::after { content: ''; position: absolute; right: -14px; top: -12px; border: 10px solid transparent; border-left: 14px solid #FFF4B8; }
.st-open-ribbon.is-cut .st-open-cut { display: none; }
@keyframes st-cuthint { 0% { clip-path: inset(-20px 100% -20px 0); } 60%, 100% { clip-path: inset(-20px -20px -20px 0); } }
.st-open-balloon { position: absolute; right: -2%; bottom: 84%; width: clamp(30px, 8%, 46px); pointer-events: none; transform-origin: 50% 100%; animation: st-sway 2.4s ease-in-out infinite; }
.st-open-balloon svg { width: 100%; display: block; }
.st-open-balloon.is-pop { animation: st-popped .35s ease-out forwards; }
@keyframes st-sway { 50% { transform: rotate(6deg); } }
@keyframes st-popped { 30% { transform: scale(1.35); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
/* Šestarko on the trg: left of the ribbon; the balloon gag takes him to the right post; dizzy, he lies on his back */
.st-open-sest { position: absolute; left: max(6px, calc(50% - var(--rw) / 2 - clamp(56px, 9vw, 96px) - 4px)); bottom: calc(var(--gy) - 8px); width: clamp(56px, 9vw, 96px); z-index: 4; transition: left .6s cubic-bezier(.3, 1.3, .5, 1), bottom .6s cubic-bezier(.3, 1.3, .5, 1), transform .5s ease-in-out; }
.st-open-sest svg.st-sest { width: 100%; height: auto; display: block; }
.st-open-sest.is-at-balloon { left: calc(50% + var(--rw) / 2 - clamp(56px, 9vw, 96px) * .9); bottom: calc(var(--gy) + var(--rw) * .2); }
.st-open-sest.is-down { transform: translateX(18%) rotate(-90deg); transform-origin: 50% 90%; }
.st-open-scissors { position: absolute; left: 62%; top: 38%; width: 88%; opacity: 0; transform: rotate(-20deg) scale(.4); transition: opacity .3s, transform .4s var(--ease-pop); pointer-events: none; }
.st-open-scissors svg { width: 100%; display: block; }
.st-open-scissors.is-in { opacity: 1; transform: rotate(-20deg); }
.st-open-scissors.is-snip { animation: st-snip .5s ease-in-out 2; }
.st-open-sest.is-down .st-open-scissors { opacity: 0; }
@keyframes st-snip { 50% { transform: rotate(-4deg) scale(1.15); } }
/* six launch pads on the trg */
.st-open-pads { position: absolute; left: 50%; bottom: calc(var(--gy) + 4px); transform: translateX(-50%); display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; width: min(560px, 92%); z-index: 3; }
.st-open-pad { position: relative; width: 64px; height: 76px; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.st-open-pad::before { content: ''; position: absolute; left: 2px; right: 2px; bottom: 0; height: 22px; border-radius: 12px; background: var(--dc); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.st-open-rocket { position: absolute; left: 50%; bottom: 14px; width: 30px; transform: translateX(-50%); animation: st-rockidle 1.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .2s); }
.st-open-rocket svg, .st-open-flyer svg { width: 100%; display: block; }
.st-open-pad:focus-visible { outline: 4px solid var(--sun); outline-offset: 2px; border-radius: 14px; }
.st-open-pad.is-gone { cursor: default; }
.st-open-pad.is-gone .st-open-rocket { visibility: hidden; animation: none; }
.st-open-pad.is-gone::after { content: ''; position: absolute; left: 50%; bottom: 18px; width: 30px; height: 12px; margin-left: -15px; border-radius: 50%; background: #D8D2C4; border: 2px solid var(--ink); opacity: .8; }
.st-open-pads.is-done { opacity: .55; transition: opacity .6s; }
@keyframes st-rockidle { 50% { transform: translateX(-50%) translateY(-3px); } }
.st-open-flyer { position: absolute; width: 26px; margin-left: -13px; z-index: 5; pointer-events: none; animation: st-flyup .7s cubic-bezier(.3, .1, .6, 1) forwards; }
@keyframes st-flyup { to { transform: translate(var(--fx), var(--fy)) scale(.7); opacity: .6; } }
.st-open-bursts { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.st-open-burst { position: absolute; overflow: visible; transform-origin: 50% 50%; animation: st-burstin .55s cubic-bezier(.2, 1.4, .5, 1) both, st-burstfade 1.2s ease-in 4.5s forwards; }
@keyframes st-burstin { from { transform: scale(.15) rotate(-30deg); opacity: 0; } }
@keyframes st-burstfade { to { opacity: .25; } }
/* the residents gather in front; at the end they parade round the fountain */
.st-open-crowd { position: absolute; left: 0; right: 0; bottom: 2%; display: flex; justify-content: center; gap: clamp(2px, 1.4vw, 14px); z-index: 2; }
.st-open-res { width: clamp(46px, 8.5vw, 84px); }
.st-open-res:nth-child(3) { margin-right: clamp(150px, 26vw, 270px); }   /* the fountain stands in the gap */
.st-open-res svg { width: 100%; height: auto; display: block; }
.st-open-crowd.is-parade .st-open-res { animation: st-parade 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.43s); }
@keyframes st-parade { 0%, 100% { transform: translateX(-18px); } 25% { transform: translate(0, -12px); } 50% { transform: translateX(18px) scaleX(-1); } 75% { transform: translate(0, -12px) scaleX(-1); } }
html[data-layout="tall"] .st-open { --rw: min(340px, 84vw); --gy: 22%; }
html[data-layout="tall"] .st-open-pads { width: 230px; gap: 8px 14px; }
html[data-layout="tall"] .st-open-tika { width: 72px; }
html[data-layout="tall"] .st-open-sest { left: 4px; bottom: calc(var(--gy) + var(--rw) * .32); }
html[data-layout="short"] .st-open { --rw: min(400px, 48vw); --gy: 24%; }
html[data-layout="short"] .st-open-tika { width: 60px; }
html[data-layout="short"] .st-open-bubble { margin-top: 6px; }
html[data-layout="short"] .st-open-pad { width: 56px; height: 66px; }
html[data-layout="short"] .st-open-res { width: 46px; }
html[data-layout="short"] .st-open-crowd { bottom: 1%; }
html[data-layout="short"] .st-open-pads { gap: 8px; width: 420px; }
html[data-motion="reduce"] :is(.st-open-cut, .st-open-balloon, .st-open-rocket, .st-open-crowd.is-parade .st-open-res, .st-open-scissors.is-snip) { animation: none !important; }
html[data-motion="reduce"] .st-open-burst { animation: none !important; }
html[data-motion="reduce"] .st-open.is-dusk .st-open-bulb { animation: none; fill: #FFE45C; }
html[data-motion="reduce"] .st-open.is-dusk .st-open-glow { animation: none; opacity: .35; }
html[data-motion="reduce"] .st-open-balloon.is-pop { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) :is(.st-open-cut, .st-open-balloon, .st-open-rocket, .st-open-crowd.is-parade .st-open-res, .st-open-scissors.is-snip, .st-open-burst) { animation: none !important; }
  html:not([data-motion="full"]) .st-open.is-dusk .st-open-bulb { animation: none; fill: #FFE45C; }
  html:not([data-motion="full"]) .st-open.is-dusk .st-open-glow { animation: none; opacity: .35; }
  html:not([data-motion="full"]) .st-open-balloon.is-pop { opacity: 0; }
}
/* the diploma: a cream certificate with a double gold frame */
.st-dip-modal .tk-modal-title { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; overflow: clip; clip-path: inset(50%); white-space: nowrap; }
.st-dip-modal { width: min(36rem, 100%); }
.st-dip-paper { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 12px; text-align: center; background: #FFF8E6; border: 4px solid #E0A82E; border-radius: 18px; box-shadow: inset 0 0 0 4px #FFF8E6, inset 0 0 0 7px #F2C46B; }
.st-dip-paper .st-dip-t { margin: 0; font-size: clamp(1.35rem, 3.4vw, 1.8rem); font-weight: 1000; line-height: 1.1; color: var(--ink); }
.st-dip-row { display: flex; align-items: center; justify-content: center; gap: 18px; }
.st-dip-av { width: 104px; flex: 0 0 auto; }
.st-dip-key { width: 128px; flex: 0 0 auto; transform: rotate(-12deg); }
.st-dip-av svg, .st-dip-key svg { width: 100%; display: block; }
.st-dip-sky { display: flex; align-items: flex-end; justify-content: center; gap: 1px; width: 100%; max-width: 520px; height: 88px; padding: 0 6px; border-bottom: 4px solid var(--ink); background: linear-gradient(transparent 60%, #DDF1C9 60%); border-radius: 10px 10px 0 0; }
.st-dip-b { flex: 1 1 0; min-width: 0; max-width: 56px; height: 100%; display: flex; align-items: flex-end; animation: st-ttin .5s var(--ease-pop) both; animation-delay: calc(var(--i) * .05s + .2s); }
.st-dip-b.is-lm { flex-grow: 1.6; max-width: 80px; }
.st-dip-b svg { width: 100%; height: auto; max-height: 100%; display: block; }
.st-dip-sign { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 440px; }
.st-dip-seal { width: 76px; flex: 0 0 auto; transform: rotate(-8deg); }
.st-dip-feather { width: 150px; flex: 0 0 auto; }
.st-dip-seal svg, .st-dip-feather svg { width: 100%; display: block; }
.st-dip-s { margin: 0; font-weight: 900; font-size: max(16px, .95rem); color: var(--ink-2, #575B7C); }
html[data-motion="reduce"] .st-dip-b { animation: none; }
/* short (844×390): the diploma is a two-column card that fits the height, so „Hvala!“ is always on screen */
html[data-layout="short"] .st-dip-modal { width: min(46rem, 100%); padding: .5rem .8rem .6rem; }
html[data-layout="short"] .st-dip-paper { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "t t" "row sky" "sign s"; gap: 4px 14px; align-items: center; padding: 8px 12px; }
html[data-layout="short"] .st-dip-paper .st-dip-t { grid-area: t; font-size: 1.25rem; }
html[data-layout="short"] .st-dip-row { grid-area: row; gap: 8px; }
html[data-layout="short"] .st-dip-av { width: 72px; }
html[data-layout="short"] .st-dip-key { width: 84px; }
html[data-layout="short"] .st-dip-sky { grid-area: sky; height: 64px; }
html[data-layout="short"] .st-dip-sign { grid-area: sign; gap: 8px; justify-content: flex-start; }
html[data-layout="short"] .st-dip-seal { width: 48px; }
html[data-layout="short"] .st-dip-feather { width: 100px; }
html[data-layout="short"] .st-dip-s { grid-area: s; text-align: right; }
html[data-layout="short"] .st-dip-modal .tk-modal-actions { margin-top: .4rem; }
html[data-layout="tall"] .st-dip-av { width: 86px; }
html[data-layout="tall"] .st-dip-key { width: 100px; }
html[data-layout="tall"] .st-dip-sky { height: 64px; }
html[data-layout="tall"] .st-dip-seal { width: 64px; }
html[data-layout="tall"] .st-dip-feather { width: 124px; }
/* tall precise: tools and the lamp share the one 56-px row; with both present the lamp shows its bulb only (label = aria-label) */
html[data-layout="tall"] .st-f-precise.has-tools.has-lamp .st-tools { gap: 5px; }
html[data-layout="tall"] .st-f-precise.has-tools.has-lamp .st-tool { width: 52px; height: 52px; }
html[data-layout="tall"] .st-f-precise.has-tools.has-lamp .st-lamp { padding: 2px; min-height: 56px; }
html[data-layout="tall"] .st-f-precise.has-tools.has-lamp .st-lamp-lbl { display: none; }
.st-bld .b-part.is-pop { transform-box: fill-box; transform-origin: 50% 100%; animation: st-partpop .3s var(--ease-pop); }
@keyframes st-partpop { from { transform: scale(.4); } }
html[data-layout="tall"] .st-cer-stage.is-two .st-cer-lm { right: 50%; transform: translateX(50%); bottom: 30%; height: 48%; }
html[data-layout="tall"] .st-cer-stage.is-two .st-cer-lotwrap { left: 58%; height: 46%; bottom: 4%; }
html[data-layout="tall"] .st-cer-stage.is-two .st-cer-lm { animation-name: st-rise-c; }
@keyframes st-rise-c { from { transform: translateX(50%) translateY(150%); } }
.st-pro-bump.is-gone { opacity: 0; transform: translateX(40px); transition: opacity .4s, transform .4s; pointer-events: none; }
/* the child's own Oblikovo along the title valley */
.st-title-town { position: absolute; left: 31%; right: 3%; bottom: 20%; height: 17%; display: flex; align-items: flex-end; justify-content: center; gap: 1%; pointer-events: none; z-index: 1; }
.st-tt-b { flex: 0 1 auto; height: 100%; min-width: 0; display: block; animation: st-ttin .6s var(--ease-pop) both; animation-delay: calc(var(--i) * .07s + .3s); }
.st-tt-b svg { height: 100%; width: auto; max-width: 100%; display: block; overflow: visible; }
.st-tt-b:not(.is-real) { opacity: .75; }
@keyframes st-ttin { from { transform: translateY(30px) scale(.6); opacity: 0; } }
html[data-layout="tall"] .st-title-town { left: 36%; right: 2%; bottom: 20.5%; height: 9%; }
html[data-layout="tall"] .st-tt-b:nth-child(n+5) { display: none; }
html[data-layout="short"] .st-title-town { display: none; }
html[data-motion="reduce"] .st-tt-b { animation: none; }
html[data-layout="tall"] .st-open-res { width: min(54px, 13vw); }
html[data-layout="tall"] .st-open-res:nth-child(3) { margin-right: min(120px, 28vw); }
html[data-layout="short"] .st-open-res:nth-child(3) { margin-right: 190px; }
html[data-layout="tall"] .st-top-fin .st-title { display: none; }
/* a phone in portrait: the skyline is two balanced rows (--cols = half the buildings, set by finale.js) */
@media (max-width: 560px) {
  html[data-layout="tall"] .st-dip-sky { flex-wrap: wrap; height: auto; min-height: 64px; row-gap: 2px; align-content: flex-end; background: none; }
  html[data-layout="tall"] .st-dip-b, html[data-layout="tall"] .st-dip-b.is-lm { flex: 0 0 calc((100% - (var(--cols) - 1) * 1px) / var(--cols)); height: 44px; max-width: none; }
}
/* Čarobno ogledalo: the board is the silver mirror (a silver ring with a light glass tint, §7.2) */
.st-sandbox .st-boardwrap { background: #F3FAFF; box-shadow: inset 0 0 0 7px #C9D2DE, inset 0 0 0 9px #8D97A8, 0 5px 0 var(--ink); }
html[data-layout="tall"] .st-open-crowd { padding: 0 24px; }
html[data-layout="tall"] .st-open-res:nth-child(3) { margin-right: min(96px, 24vw); }
html[data-layout="tall"] .st-open-sest.is-down { left: 30px; }
/* Šestarko is afraid of the eraser: while the gumica is the brush he shrinks back into his corner */
.st-sandbox .st-buddy { transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), opacity .35s; transform-origin: 50% 100%; }
.st-sandbox .st-buddy.st-sest-shy { transform: translateX(12px) scale(.78); opacity: .75; }
html[data-motion="reduce"] .st-sandbox .st-buddy { transition: none; }
