/* Spin n’ Speak, on top of kit/kit.css.
   Layout: a game-show stage (the wheel) beside the teacher's control rail; the library is a shelf of wheels in their own designs.
   Every wheel brings its own colours, font and pattern. */
/* ---------- start page ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: clamp(20px, 4vw, 60px); padding-block: 10px 6px; min-height: calc(100vh - 110px); }
.home-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-title { font-size: clamp(48px, 7.4vw, 104px); line-height: .96; }
.home-lead { margin: 0; font-size: clamp(18px, 1.7vw, 22px); font-weight: 700; line-height: 1.45; max-width: 34ch; }
.home-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.home-hint { margin: 0; color: var(--muted); font-weight: 700; }
.home-copy > * { animation: rise .6s cubic-bezier(.2,.9,.3,1) both; }
.home-copy > :nth-child(2) { animation-delay: .06s; } .home-copy > :nth-child(3) { animation-delay: .12s; } .home-copy > :nth-child(4) { animation-delay: .18s; } .home-copy > :nth-child(5) { animation-delay: .24s; }
.home-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.nav-caption { margin: 0; min-height: 1.5em; text-align: center; font-weight: 700; color: var(--muted); }
.nav-caption b { color: var(--fg); font-weight: 900; }
.nav-caption span { color: var(--link); }
.home-subjects { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-block: 18px 8px; }
.subj { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; font-weight: 800; font-size: 15px; transition: transform .2s cubic-bezier(.2,.9,.3,1.3); }
.subj:hover { transform: translateY(-3px); }
.subj i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }
.subj span { color: var(--muted); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.subj-lgr i { background: #0F5FA8; }
.home-row { padding-block: 30px 10px; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.row-title { margin: 0; font-size: 28px; font-weight: 900; }
.home-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-block: 30px 10px; }
.home-facts div { padding: 20px 22px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.home-facts b { font-size: 20px; font-weight: 900; }
.home-facts p { margin: 6px 0 0; font-weight: 600; line-height: 1.5; color: var(--muted); }

/* ---------- play ---------- */
.view-wheel { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 410px); grid-template-areas: "stage head" "stage ctrl"; column-gap: clamp(20px, 3vw, 48px); row-gap: 18px; align-content: center; min-height: calc(100vh - 110px); }
.stage { grid-area: stage; position: sticky; top: 10px; align-self: start; display: flex; justify-content: center; align-items: center; min-width: 0; }
.stage-done { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.done-card { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: min(340px, 86%); padding: 26px 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); text-align: center; animation: pop .6s cubic-bezier(.2,1.4,.4,1) both; }
.done-card .sticker { font-size: 30px; }
.done-card p { margin: 0; color: var(--muted); }
.rail-head { grid-area: head; align-self: end; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rail-head h1 { font-size: clamp(34px, 3.7vw, 54px); }
.w-how { margin: 4px 0 0; font-weight: 600; font-size: 16px; line-height: 1.5; max-width: 44ch; }
.w-note { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.45; max-width: 52ch; }
.shared-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); font-weight: 800; }
.rail-ctrl { grid-area: ctrl; align-self: start; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rail-head > *, .rail-ctrl > * { animation: rise .6s cubic-bezier(.2,.9,.3,1) both; }
.rail-ctrl > :nth-child(2) { animation-delay: .1s; } .rail-ctrl > :nth-child(3) { animation-delay: .2s; }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; font-variant-numeric: tabular-nums; }
.prog-top b { font-size: 22px; font-weight: 900; }
.prog-bar { height: 12px; margin-top: 8px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6)); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.lang-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.lang-box { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lang-box .dd, .lang-box .dd-btn { width: 100%; }
.lang-box .dd-btn { justify-content: space-between; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.seg { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border: 0; margin: 0; padding: 0; }
.seg legend { float: left; margin-right: 6px; padding: 0; font-weight: 800; font-size: 15px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-block; padding: 5px 12px; border-radius: var(--r-pill); border: 2px solid var(--border-strong); font-weight: 800; font-size: 14px; cursor: pointer; font-variant-numeric: tabular-nums; }
.seg input:checked + span { background: var(--fg); border-color: var(--fg); color: var(--bg-2); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.hist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 168px; overflow-y: auto; }
.hist button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 12px; background: none; text-align: left; font-weight: 600; font-size: 14px; cursor: pointer; }
.hist button:hover { background: var(--hover); }
.hist .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(20,41,38,.25); }
.hist .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist b { font-weight: 900; }
.hist .empty { padding: 6px 2px; color: var(--muted); font-weight: 700; font-size: 14px; }
.hist li:first-child button { animation: rise .45s cubic-bezier(.2,.9,.3,1); }
.rail-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- library ---------- */
.lib-head { display: flex; flex-direction: column; gap: 12px; padding-block: 18px 10px; }
.lib-head h1 { font-size: clamp(40px, 5vw, 64px); }
.lib-search { position: relative; max-width: 640px; margin-top: 6px; }
.lib-search svg { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--muted); pointer-events: none; }
.lib-search input { width: 100%; padding: 15px 20px 15px 52px; border-radius: var(--r-pill); border: 2px solid var(--border-strong); background: var(--surface-3); font-weight: 800; font-size: 17px; box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-pill); border: 2px solid var(--border-strong); color: var(--fg); text-decoration: none; font-weight: 800; font-size: 14px; }
.chip span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip:hover { background: var(--hover); }
.chip[aria-current="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg-2); }
.chip[aria-current="true"] span { color: inherit; opacity: .7; }
.chip-lgr22 { border-color: #0F5FA8; }
.lib-result { margin: 4px 0 0; color: var(--muted); font-weight: 800; min-height: 1.5em; }
.lib-sec { padding-block: 14px 10px; scroll-margin-top: 20px; }
.sec-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; font-size: 26px; font-weight: 900; }
.sec-title span { color: var(--muted); font-size: 16px; font-weight: 800; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.wcard { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; color: var(--fg); transition: transform .3s cubic-bezier(.2,.9,.3,1.3); animation: rise .5s cubic-bezier(.2,.9,.3,1) both; content-visibility: auto; contain-intrinsic-size: 360px; }
.wcard:hover { transform: translateY(-5px); }
.wcard-band { position: relative; height: 140px; overflow: hidden; background: radial-gradient(circle at 50% 118%, var(--tint) 0%, transparent 64%), radial-gradient(circle at 10% 0%, var(--tint2) 0%, transparent 48%), var(--surface-2); }
.wcard-band canvas[data-thumb] { position: absolute; left: 50%; top: 28px; width: 250px; height: 250px; margin-left: -125px; transition: transform 1.8s cubic-bezier(.12,.85,.2,1); }
.wcard:hover .wcard-band canvas[data-thumb], .wcard:focus-within .wcard-band canvas[data-thumb] { transform: rotate(250deg); }
.wcard-pin { position: absolute; left: 50%; top: 4px; width: 26px; height: 36px; margin-left: -13px; z-index: 1; }
.wcard-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 14px 18px 18px; }
.wcard h3 { margin: 2px 0 0; font-size: 23px; line-height: 1.12; text-wrap: balance; }
.wcard-blurb { margin: 4px 0 0; font-weight: 600; font-size: 15px; line-height: 1.45; color: var(--muted); }
.wcard-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding-top: 12px; }
.wcard-meta span { padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 12px; font-weight: 800; }
.wcard-meta .chip-lgr { background: #0F5FA8; color: #FFFFFF; }
.wcard-hit { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.wcard-hit:focus-visible { outline: 4px solid var(--focus); outline-offset: -4px; }
.wcard-actions { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 16px; }
.lib-empty { margin: 0; padding: 30px 0; color: var(--muted); font-size: 17px; }

/* ---------- my wheels ---------- */
.mine-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; padding-block: 18px 22px; }
.mine-head h1 { font-size: clamp(40px, 5vw, 64px); }
.mine-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mine-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; margin: 10px auto 30px; padding: 34px 26px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.mine-empty h2 { margin: 6px 0 0; font-size: 26px; font-weight: 900; }
.mine-empty p { margin: 0; color: var(--muted); font-weight: 600; }
.mine-empty .home-cta { justify-content: center; }
.new-ring { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--c1) 0 60deg, var(--c2) 0 120deg, var(--c3) 0 180deg, var(--c4) 0 240deg, var(--c5) 0 300deg, var(--c6) 0); animation: spin 14s linear infinite; }
.new-ring span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--fox); color: var(--on-fox); font-size: 32px; font-weight: 900; line-height: 1; box-shadow: 0 0 0 5px var(--forest); animation: spin 14s linear infinite reverse; }
.mine-fine { margin-top: 22px; }

/* ---------- studio ---------- */
.studio-top { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px 20px; padding-block: 14px 18px; }
.st-name { display: flex; flex-direction: column; gap: 4px; flex: 1 1 360px; min-width: 0; }
.st-title { width: 100%; padding: 4px 0; border: 0; border-bottom: 3px dashed var(--border-strong); background: transparent; font-weight: 900; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; color: var(--fg); }
.st-title:focus-visible { outline: none; border-bottom-color: var(--fox); }
.st-title::placeholder { color: var(--muted); opacity: .6; }
.st-status { margin: 0; min-height: 1.4em; font-size: 14px; font-weight: 800; color: var(--muted); }
.st-status[data-kind="saved"]::before { content: "✓ "; color: var(--teal); }
.studio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); align-items: start; }
.studio-panel { display: flex; flex-direction: column; gap: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-import { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 14px; border-top: 2px dashed var(--border); }
.st-import-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-import-row .dd { flex: 1 1 220px; min-width: 0; }
.st-import-row .dd-btn { width: 100%; justify-content: space-between; }
.color-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.col-chip { width: 40px; height: 40px; border-radius: 12px; border: 3px solid var(--surface-3); background: var(--c); box-shadow: 0 0 0 2px var(--border-strong); cursor: pointer; transition: transform .15s; }
.col-chip:hover { transform: scale(1.08); }
.col-tool { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 2px dashed var(--border-strong); background: transparent; font-size: 22px; font-weight: 900; cursor: pointer; }
.col-tool svg { width: 20px; height: 20px; }
.col-tool:hover:not(:disabled) { background: var(--hover); }
.col-tool:disabled { opacity: .35; cursor: default; }
.pop-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.pop-custom { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; cursor: pointer; }
.pop-custom input { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pat-tile, .ptr-tile { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border-radius: 14px; border: 2px solid var(--border); background: var(--surface-2); overflow: hidden; cursor: pointer; }
.pat-tile canvas { width: 36px; height: 36px; border-radius: 8px; }
.ptr-tile canvas { width: 44px; height: 44px; }
.pat-tile[aria-pressed="true"], .ptr-tile[aria-pressed="true"], .font-tile[aria-pressed="true"] { border-color: var(--fg); background: var(--surface-3); box-shadow: 0 0 0 1px var(--fg); }
.font-tile { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 76px; padding: 6px 10px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface-2); cursor: pointer; }
.font-tile b { font-size: 26px; line-height: 1.15; }
.font-tile span { font-size: 11px; font-weight: 800; color: var(--muted); }
.st-size { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.st-size label:first-child { font-weight: 800; font-size: 15px; }
.st-size input[type=range] { flex: 1 1 140px; accent-color: var(--fox); }
.st-bulbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.st-hub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.st-hub .field { width: 120px; text-align: center; font-weight: 900; letter-spacing: .04em; }
.studio-preview { position: sticky; top: 10px; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.st-stage { position: relative; display: grid; place-items: center; width: 100%; }
.st-empty { position: absolute; margin: 0; max-width: 16ch; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); text-align: center; font-weight: 900; color: var(--muted); }
.st-result { width: min(520px, 100%); padding: 14px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); border-top: 6px solid var(--seg); animation: pop .4s cubic-bezier(.2,1.4,.4,1) both; }
.st-result p { margin: 6px 0 0; font-weight: 900; font-size: 19px; line-height: 1.3; }
.st-result .st-res-frame { font-weight: 700; font-size: 15px; color: var(--muted); }
.st-res-chip { display: inline-block; padding: 3px 12px; border-radius: var(--r-pill); background: var(--seg); color: var(--seg-ink); font-weight: 900; font-size: 13px; }

/* ---------- the question card ---------- */
.card-layer { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; overflow-y: auto; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .3s; }
.card-layer.is-open .scrim { opacity: 1; }
.qcard { --wr: 150px; position: relative; width: min(900px, 100%); margin: auto; padding: clamp(22px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: 0 30px 80px -24px rgba(0,0,0,.55); overflow: hidden; outline: none; }
.qcard::before { content: ""; position: absolute; top: calc(var(--wr) * -1); right: calc(var(--wr) * -1); width: calc(var(--wr) * 2); height: calc(var(--wr) * 2); border-radius: 50%; background: conic-gradient(from 198deg, var(--seg) 0deg 54deg, transparent 54deg); pointer-events: none; }
.card-layer.is-open .qcard { animation: cardIn .62s cubic-bezier(.2,1.25,.35,1) both; }
.card-layer.is-closing .qcard { animation: cardOut .2s ease-in both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(70px) scale(.7) rotate(-4deg); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes cardOut { to { opacity: 0; transform: translateY(24px) scale(.94); } }
.qtop { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding-right: 56px; }
.qchip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: var(--r-pill); background: var(--seg); color: var(--seg-ink); font-weight: 900; font-size: 16px; }
.qchip i { width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 3px var(--seg-ink); }
.qnum { font-weight: 800; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qclose { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--close-bg); color: var(--close-fg); font-size: 28px; font-weight: 800; line-height: 1; cursor: pointer; transition: transform .2s; }
.qclose:hover { transform: rotate(90deg); }
.qkicker { margin: 22px 0 0; font-weight: 900; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--link); }
.qtext { margin: 20px 0 0; padding-right: 60px; font-weight: 900; font-size: clamp(28px, 4.5vw, 56px); line-height: 1.1; letter-spacing: -.012em; text-wrap: balance; }
.is-word .qtext { margin-top: 8px; font-size: clamp(52px, 10vw, 120px); line-height: 1; }
.qtext .w { display: inline-block; animation: wordIn .55s cubic-bezier(.2,1.5,.4,1) both; animation-delay: var(--d); }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em) scale(.7); } to { opacity: 1; transform: none; } }
.qsv { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 14px 0 0; font-size: clamp(17px, 1.8vw, 21px); font-weight: 700; color: var(--muted); animation: rise .5s .35s cubic-bezier(.2,.9,.3,1) both; }
.lbl { font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.qsv .lbl { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--fg); }
.qhelp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; margin-top: 24px; }
.qhelp > [hidden] + div, .qhelp > div:only-child { grid-column: 1 / -1; }
.qframe { padding: 14px 18px; border-radius: 20px; background: var(--gold); color: var(--forest); animation: rise .5s .45s cubic-bezier(.2,.9,.3,1) both; }
.qframe .fl { display: block; margin-top: 4px; font-weight: 900; font-size: clamp(18px, 1.9vw, 23px); line-height: 1.35; }
.blank { display: inline-block; width: 2.2em; height: .9em; margin: 0 .12em; border-bottom: 3px solid currentColor; vertical-align: baseline; }
.qfollow { padding: 14px 18px; border-radius: 20px; border: 2px dashed var(--border-strong); animation: rise .5s .55s cubic-bezier(.2,.9,.3,1) both; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fchip { padding: 5px 12px; border-radius: var(--r-pill); background: var(--surface-2); font-weight: 800; font-size: 16px; }
.qchallenge { position: relative; margin-top: 16px; padding: 14px 18px; border-radius: 20px; background: var(--c6); color: var(--night); transform: rotate(-1.2deg); animation: stamp .6s .7s cubic-bezier(.2,1.6,.4,1) both; }
.qchallenge p { margin: 4px 0 0; font-weight: 900; font-size: clamp(19px, 2vw, 24px); line-height: 1.3; }
.qchallenge .sv { margin-top: 2px; font-weight: 700; font-size: 16px; }
@keyframes stamp { from { opacity: 0; transform: scale(1.5) rotate(6deg); } to { opacity: 1; transform: rotate(-1.2deg); } }
.qactions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.timer { font-variant-numeric: tabular-nums; min-width: 112px; }
.timer circle { fill: none; stroke-width: 3.5; }
.timer .ring-bg { stroke: var(--track); }
.timer .ring { stroke: var(--teal); stroke-linecap: round; stroke-dasharray: 62.83; transform: rotate(-90deg); transform-origin: 12px 12px; transition: stroke-dashoffset .25s linear; }
.timer.is-up { background: var(--c6); color: var(--night); animation: shake .5s 2; }
@keyframes shake { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }

/* ---------- narrower screens ---------- */
@media (max-width: 1050px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-preview { position: relative; top: 0; order: -1; }
}
@media (max-width: 900px) {
  .view-wheel { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .opts, .lang-row { grid-template-columns: minmax(0, 1fr); }
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; text-align: center; }
  .home-copy { align-items: center; }
  .home-cta { justify-content: center; }
  .home-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px), (max-width: 900px) and (orientation: portrait) {
  .view-wheel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "ctrl"; min-height: 0; row-gap: 12px; }
  .stage { position: relative; top: 0; }
  .rail-head { align-items: center; text-align: center; }
  .spin-row { flex-direction: column; }
  .spin-btn { width: 100%; justify-content: center; }
  .hint { text-align: center; }
  .lang-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .opts { grid-template-columns: minmax(0, 1fr); }
  .lang-row { grid-template-columns: minmax(0, 1fr); }
  .qcard { --wr: 84px; }
  .qtext { padding-right: 0; }
  .qhelp { grid-template-columns: minmax(0, 1fr); }
  .qactions .btn { flex: 1 1 auto; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
