/* Components the game screens, Password Lab, Quiz Workshop and shared quizzes still use
   (the older class names), restyled with the new tokens so they match the site look. */

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.01em; font-weight: 600; }
.mono, code, kbd, samp { font-variant-ligatures: none; }
::selection { background: rgba(56, 198, 244, .35); }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
#app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; }
main { outline: none; }
#overlay { position: relative; z-index: 200; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 99; background: var(--panel); border: 1px solid var(--line2); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.noscript { padding: 40px 24px; text-align: center; }

/* boot splash */
.boot { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.boot-mark { width: 84px; height: 84px; fill: none; stroke: var(--acc); stroke-width: 1.2; animation: breathe 3.6s var(--ease) infinite; }
.boot-word { font: 600 13px/1 var(--f-sans); letter-spacing: .42em; padding-left: .42em; color: var(--acc); }
@keyframes breathe { 0%, 100% { transform: scale(.96); opacity: .7; } 50% { transform: scale(1.02); opacity: 1; } }

/* helpers */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--dim); }
.soft { color: var(--soft); }
.mono { font-family: var(--f-mono); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; letter-spacing: .02em; }
.eyebrow { font: 600 11px/1.3 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--lab); text-shadow: var(--lab-glow); }
.spacer { flex: 1 1 auto; }
.hidden { display: none !important; }
.note { font-size: 13px; color: var(--soft); line-height: 1.5; }
.callout { padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line2); color: var(--soft); font-size: 14px; }
.section-title { font: 600 11px/1.3 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--lab); text-shadow: var(--lab-glow); margin: 22px 2px 10px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ico.tiny-ico { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

/* screen container (Password Lab, Quiz Workshop, shared quizzes) */
.screen { position: relative; z-index: 2; padding: 16px 16px calc(var(--safe-b) + 28px); max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; }
.screen.wide { max-width: 980px; }
.screen-enter { animation: screenIn .45s var(--ease) backwards; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.topbar { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-bottom: 10px; }
.topbar h1 { font-size: 18px; font-weight: 600; }
.topbar .sub { font: 600 10.5px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lab); text-shadow: var(--lab-glow); }

/* buttons: older class pairs (.btn.primary, .btn.big ...) on top of the new .btn */
.btn.primary { background: var(--fill); border-color: var(--fill); color: var(--on-fill); box-shadow: 0 0 20px rgba(56, 198, 244, .32); }
.btn.primary:hover { box-shadow: 0 14px 40px rgba(147, 222, 255, .42); }
html[data-theme="light"] .btn.primary { box-shadow: 0 1px 0 rgba(10, 26, 51, .2); }
.btn.ghost:hover { background: rgba(147, 222, 255, .12); }
.btn.big { padding: 15px 26px; font-size: 15.5px; border-radius: 14px; min-height: 54px; }
.btn.sm { padding: 10px 14px; font-size: 13.5px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.danger { border-color: var(--red); color: var(--red-text); background: rgba(255, 77, 94, .1); }
.btn.ok { border-color: var(--acc); color: var(--acc); background: rgba(147, 222, 255, .08); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg:not(.i) { width: 18px; height: 18px; flex: none; }
/* answer buttons in the games look like the round mockup's Real / Scam buttons */
.btn.choice { min-height: 64px; border-radius: 16px; border: 1.5px solid var(--line2); background: var(--card-grad); color: var(--text); font-weight: 700; font-size: 17px; letter-spacing: -.01em; box-shadow: none; }
.btn.choice svg { width: 22px; height: 22px; }
.btn.choice.ok svg { color: var(--acc); }
.btn.choice.danger svg { color: var(--red); }
.btn.choice.ok:hover { border-color: var(--acc); }
.btn.choice.danger:hover { border-color: var(--red); }
.btn.choice:active { transform: scale(.98); }

/* round icon buttons inside games */
.icon-btn svg:not(.i) { width: 19px; height: 19px; }
.icon-btn[aria-pressed="true"] { color: var(--acc); border-color: var(--acc); }

/* chips */
.chip svg:not(.i) { width: 14px; height: 14px; }
.chip.red { color: var(--red-text); border-color: rgba(255, 77, 94, .6); background: rgba(255, 77, 94, .1); box-shadow: none; }
.chip.ok { color: var(--acc); border-color: rgba(147, 222, 255, .6); background: rgba(147, 222, 255, .08); box-shadow: none; }
.chip.amber { color: var(--amber); border-color: rgba(255, 160, 60, .6); background: rgba(255, 160, 60, .1); box-shadow: none; }

/* cards and bars */
.card { position: relative; background: var(--card-grad); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--card-shadow); padding: 18px; }
.bar { height: 8px; border-radius: 99px; background: var(--panel3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #38C6F4, #93DEFF); transition: width .9s var(--ease); }
html[data-theme="light"] .bar > i { background: #38C6F4; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-size: 13px; font-weight: 600; color: var(--soft); }
.input, textarea.input, select.input { min-height: 48px; width: 100%; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line2); background: var(--bg); color: var(--text); font-size: 16px; }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(147, 222, 255, .18); }
.switch { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.switch .txt { flex: 1; }
.switch .txt b { display: block; font-size: 15px; }
.switch .txt span { font-size: 13px; color: var(--soft); }

/* round frame helpers kept by the games */
.lives { display: flex; gap: 3px; color: var(--red); }
.lives svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.lives svg.lost { opacity: .2; }
.timer { position: relative; height: 4px; border-radius: 9px; background: var(--line); overflow: hidden; }
.timer > i { position: absolute; inset: 0; background: var(--amber); transform-origin: left; }
.rwrap .stage, .fam-stage { position: relative; display: flex; flex-direction: column; }

/* share preview (Quiz Workshop) */
.share-sheet { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.share-preview { width: min(300px, 74vw); height: auto; border-radius: 16px; border: 1px solid var(--line); }
.share-sheet .row { width: 100%; }

/* motion off: the in-game "Reduce motion" switch and the system setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}
