/* Take five · prototype 1
   House: white page, iridescent film, Instrument Serif for the house voice, Geist for the work.
   Worlds bring their own colour and lettering once you're inside them. */

:root {
  --paper: #fcfcfd;
  --ink: #141418;
  --ink-2: #55555f;
  --ink-3: #8b8b96;
  --desk: #e9e9ee;
  --hair: rgba(20, 20, 24, .08);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Helvetica Neue", system-ui, sans-serif;
  --film: conic-gradient(from 210deg, #ff5fa8, #9d7bff, #47c6ff, #7af0b4, #ffb15e, #ff5fa8);
  --spring: cubic-bezier(.34, 1.42, .5, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  --in: cubic-bezier(.5, 0, .75, 0);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--desk); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--sans); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

#app {
  position: relative; margin: 0 auto; width: min(100vw, 440px); height: 100dvh; max-height: 956px;
  background: var(--paper); overflow: hidden; isolation: isolate;
}
@media (min-width: 520px) and (min-height: 760px) {
  body { display: grid; place-items: center; }
  #app { height: min(100dvh - 48px, 900px); border-radius: 44px; box-shadow: 0 0 0 1px rgba(20, 20, 24, .06), 0 40px 90px -30px rgba(30, 30, 60, .28); }
}
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer > * { pointer-events: auto; }

/* ---------- house parts ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--ink); background: #fff;
  box-shadow: 0 1px 2px rgba(20, 20, 24, .06), 0 10px 28px -8px rgba(20, 20, 24, .18);
  transition: transform .35s var(--out), box-shadow .35s var(--out);
}
.pill:active { transform: scale(.96); }
.spark, .mini-film { display: inline-block; border-radius: 50%; background: var(--film); }
.spark { width: 9px; height: 9px; animation: spin 3s linear infinite; }
.mini-film { width: 20px; height: 20px; -webkit-mask: radial-gradient(circle, transparent 54%, #000 60%); mask: radial-gradient(circle, transparent 54%, #000 60%); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 24px;
  border-radius: 999px; font-size: 15px; font-weight: 500; background: var(--ink); color: #fff;
  box-shadow: 0 8px 20px -10px rgba(20, 20, 24, .5); transition: transform .35s var(--out), opacity .3s;
}
.btn::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; background: var(--film); opacity: 0; transition: opacity .35s var(--out);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.btn:active { transform: scale(.97); }
.btn:active::before, .btn.lit::before { opacity: 1; }
.btn.quiet { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(20, 20, 24, .1); }
.btn[disabled] { opacity: .55; }

.ring { display: inline-block; flex: none; border-radius: 50%; padding: 2.5px; background: var(--film); -webkit-mask: radial-gradient(circle, transparent 56%, #000 60%); mask: radial-gradient(circle, transparent 56%, #000 60%); animation: spin 2.4s linear infinite; }

/* ---------- opening ---------- */
#opening .mark { position: absolute; left: 0; right: 0; top: 63%; text-align: center; opacity: 0; transform: translateY(10px); }
#opening .word { font-family: var(--serif); font-weight: 400; font-size: 40px; letter-spacing: -.015em; line-height: 1; }
#opening .line { margin-top: 12px; font-size: 15px; color: var(--ink-2); letter-spacing: -.005em; }
#look { position: absolute; left: 50%; bottom: calc(var(--sb) + 52px); transform: translateX(-50%) translateY(10px); opacity: 0; }
#look:active { transform: translateX(-50%) scale(.96); }
#app[data-mode="opening"] #opening .mark { animation: rise .9s var(--out) 1.7s forwards; }
#app[data-mode="opening"] #look { animation: riseX .8s var(--out) 2.4s forwards; }
#app:not([data-mode="opening"]) #opening { opacity: 0; transition: opacity .4s var(--out); }
#app:not([data-mode="opening"]) #opening * { pointer-events: none; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes riseX { to { opacity: 1; transform: translateX(-50%); } }

/* ---------- field ---------- */
#field { opacity: 0; transition: opacity .6s var(--out); }
#app:not([data-mode="opening"]) #field { opacity: 1; }
#app[data-mode="opening"] #field * { pointer-events: none; }
#field .top { position: absolute; top: calc(var(--st) + 22px); left: 22px; right: 22px; height: 34px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.lockup { display: inline-flex; align-items: center; gap: 9px; }
.lockup .icon-slot { width: 32px; height: 32px; display: inline-block; }
.lockup .word { font-family: var(--serif); font-size: 24px; letter-spacing: -.015em; line-height: 1; }
.tally { display: inline-flex; gap: 6px; padding: 8px 10px; border-radius: 999px; }
.tally i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(20, 20, 24, .16); transition: transform .5s var(--spring); }
.tally i.on { background: var(--film); box-shadow: none; animation: spin 5s linear infinite; }
.tally i.pop { transform: scale(1.6); }
#field .ask {
  position: absolute; top: calc(var(--st) + 76px); left: 22px; right: 22px; max-width: 320px;
  font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: .98; letter-spacing: -.022em; text-wrap: balance;
  transition: opacity .5s var(--out), transform .6s var(--out); pointer-events: none;
}
#app[data-focus] #field .ask { opacity: 0; transform: translateY(-8px); }
#labels { position: absolute; left: 0; top: 0; pointer-events: none; }
.wlabel { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform, opacity; opacity: 0; display: flex; align-items: center; gap: 6px; }
.wlabel.clues { font-family: "Newsreader", serif; font-style: italic; font-size: 18px; color: #1f2a5a; }
.wlabel.needle { font-family: "Anton", sans-serif; font-size: 14px; letter-spacing: .09em; text-transform: uppercase; color: #111; }
.wlabel.fit { font-family: "Fredoka", sans-serif; font-weight: 650; font-size: 19px; color: #3046d6; letter-spacing: .01em; }
.wlabel.train { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #1d2547; }
.wlabel .soon { font-size: 10px; font-weight: 600; letter-spacing: .06em; padding: 3px 6px 2px; border-radius: 999px; background: #1d2547; color: #ffd27a; }
#app[data-focus] .wlabel { font-size: 1.25em; }
.field-resume { position: absolute; left: 0; right: 0; bottom: calc(var(--sb) + 20px); display: flex; justify-content: center; pointer-events: none; transition: opacity .4s var(--out); }
.field-resume > * { pointer-events: auto; }
#app[data-focus] .field-resume { opacity: 0; pointer-events: none; }
#app[data-focus] .field-resume > * { pointer-events: none; }

/* a world pulled close: one control, no words around it */
.focus { position: absolute; left: 0; right: 0; bottom: calc(var(--sb) + 34px); display: flex; justify-content: center; pointer-events: none; }
.focus > * { opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .4s var(--out), transform .6s var(--spring); }
.focus.on > * { opacity: 1; transform: none; pointer-events: auto; }
.openbtn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 28px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 16px; font-weight: 500; box-shadow: 0 12px 28px -12px rgba(20, 20, 24, .55);
}
.openbtn::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; background: var(--film); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.openbtn:active { transform: scale(.96); }
.soonpill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px; border-radius: 999px; background: #1d2547; color: #ffd27a; font-size: 14px; font-weight: 600; letter-spacing: .04em; }

/* the named way back */
.resume {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 8px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; position: relative;
  box-shadow: 0 1px 2px rgba(20, 20, 24, .06), 0 10px 26px -10px rgba(20, 20, 24, .28);
  animation: rise .6s var(--out) both; transform: translateY(8px); opacity: 0; max-width: calc(100% - 32px);
}
.resume::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; background: var(--film); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.resume .back { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; flex: none; }
.resume b { font-weight: 600; }
.resume b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume .pring { color: var(--ink); flex: none; }

/* ---------- inside a world ---------- */
[data-world="clues"] { --w-bg: #f3ede1; --w-ink: #1f2a5a; --w-mute: #6b6f8f; --w-accent: #c2412d; --w-soft: #e7dfcf; --w-card: #faf6ee; --w-line: #d9d2c2; --w-key: #fffdf8; --w-radius: 8px; --w-shadow: 0 1px 1px rgba(60, 40, 10, .06), 0 12px 26px -14px rgba(60, 40, 10, .35); }
[data-world="needle"] { --w-bg: #111113; --w-ink: #f4efe6; --w-mute: #a39e95; --w-accent: #ff3d7f; --w-soft: #222226; --w-card: #1b1b1e; --w-line: #36363c; --w-key: #26262b; --w-radius: 4px; --w-shadow: 0 16px 30px -18px rgba(0, 0, 0, .8); }
[data-world="fit"] { --w-bg: #edf0fb; --w-ink: #1b2785; --w-mute: #66709f; --w-accent: #f08a4b; --w-soft: #dde2f6; --w-card: #fff; --w-line: #cfd5f0; --w-key: #fff; --w-radius: 22px; --w-shadow: 0 1px 2px rgba(27, 39, 133, .06), 0 14px 30px -16px rgba(27, 39, 133, .35); }

.sheet, .play { position: absolute; inset: 0; color: var(--w-ink); z-index: 5; }
.sheet {
  --cx: 50%; --cy: 50%; --r: 0px; --drag: 0px; --pull: 0;
  background: var(--w-bg); clip-path: circle(var(--r) at var(--cx) var(--cy)); overflow: hidden; touch-action: pan-y;
  transform: translateY(var(--drag)); border-radius: calc(var(--pull) * 34px) calc(var(--pull) * 34px) 0 0;
  box-shadow: 0 -20px 50px -30px rgba(20, 20, 24, calc(var(--pull) * .5));
  transition: clip-path .62s cubic-bezier(.65, 0, .25, 1), transform .55s var(--spring), border-radius .4s var(--out);
}
.sheet.dragging { transition: clip-path .62s cubic-bezier(.65, 0, .25, 1); }
.sheet.leaving { transition: transform .42s var(--in), border-radius .2s; }
/* first visit to a world: a small dip, like something on a string */
.sheet.peek { animation: peek 1.1s var(--out); }
@keyframes peek { 0% { transform: none; } 30% { transform: translateY(26px); border-radius: 26px 26px 0 0; } 58% { transform: translateY(-3px); border-radius: 8px 8px 0 0; } 100% { transform: none; border-radius: 0; } }
.sheet.peek .grabber { animation: grab 1.1s var(--out); }
@keyframes grab { 30% { width: 58px; background: color-mix(in srgb, var(--w-ink) 45%, transparent); } }
.sheet.full { clip-path: circle(150% at var(--cx) var(--cy)); }
.sheet-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--st) + 18px) 20px calc(var(--sb) + 40px); }
.bar { display: flex; align-items: center; gap: 8px; height: 44px; }
.bar .spacer { flex: 1; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; margin-left: -10px; color: var(--w-ink); }
.iconbtn svg { width: 24px; height: 24px; }
.barbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--w-ink); background: color-mix(in srgb, var(--w-ink) 7%, transparent); }
.barbtn.back { padding: 0 14px 0 6px; margin-left: -6px; background: none; }
.barbtn.back svg { width: 22px; height: 22px; }
.house-mark { display: inline-flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 18px; opacity: .75; }

.grabber { width: calc(38px + 22px * var(--pull)); height: 5px; border-radius: 3px; margin: -8px auto 6px; background: color-mix(in srgb, var(--w-ink) calc(22% + 25% * var(--pull)), transparent); }
.whead { margin-top: 22px; }
.wmeta { display: flex; gap: 16px; margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--w-mute); }
.wmeta span { display: inline-flex; align-items: center; gap: 6px; }
.wpromise { font-family: var(--serif); font-size: 19px; color: var(--w-mute); letter-spacing: -.005em; }
.wname { margin-top: 2px; font-weight: 400; line-height: .95; }
[data-world="clues"] .wname { font-family: "Newsreader", serif; font-style: italic; font-size: 56px; letter-spacing: -.02em; }
[data-world="needle"] .wname { font-family: "Anton", sans-serif; font-size: 70px; text-transform: uppercase; letter-spacing: .01em; }
[data-world="needle"] .wname em { font-style: normal; color: var(--w-accent); }
[data-world="fit"] .wname { font-family: "Fredoka", sans-serif; font-weight: 650; font-size: 72px; letter-spacing: -.01em; }
.wblurb { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--w-mute); max-width: 330px; text-wrap: pretty; }

.tells { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tell { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 10px; border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--w-card); box-shadow: var(--w-shadow); }
.tell b { font-weight: 600; color: var(--w-accent); }
.tell .ring { width: 14px; height: 14px; padding: 2px; }
.tell.locked { width: 32px; padding: 0; justify-content: center; color: var(--w-mute); background: transparent; box-shadow: inset 0 0 0 1.5px var(--w-line); }
.tell .spotted { color: var(--w-mute); font-weight: 400; }

.cards { list-style: none; margin-top: 26px; display: grid; gap: 14px; }
.card {
  position: relative; width: 100%; display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: center; text-align: left;
  padding: 12px; border-radius: var(--w-radius); background: var(--w-card); color: var(--w-ink); box-shadow: var(--w-shadow);
  transition: transform .5s var(--spring), opacity .4s var(--out);
}
.card:active { transform: scale(.98); }
.card .pv { width: 116px; height: 116px; border-radius: calc(var(--w-radius) * .7); overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--w-bg) 70%, var(--w-card)); }
.card .pv canvas { width: 116px; height: 116px; display: block; }
.card .tx b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; padding-right: 26px; }
.cmeta { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--w-mute); }
.cmeta > span { display: inline-flex; align-items: center; gap: 5px; }
.level { display: inline-flex; gap: 3px; }
.level i { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--w-ink) 18%, transparent); }
.level i.on { background: var(--w-ink); }
.badge { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; }
.badge.new { width: 9px; height: 9px; border-radius: 50%; background: var(--w-accent); top: 18px; right: 18px; }
.badge.prog { color: var(--w-accent); }
.badge.done .ring { width: 22px; height: 22px; }
.ic { display: inline-grid; place-items: center; flex: none; }
.card .st { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--w-mute); }
.card .st.prog { color: var(--w-accent); }
.card .st.done { color: var(--w-ink); }
.card .st .ring { width: 14px; height: 14px; padding: 2px; }
[data-world="clues"] .card { grid-template-columns: 1fr; padding: 18px 40px 16px 26px; background-image: linear-gradient(90deg, transparent 13px, rgba(194, 65, 45, .2) 13px 14.5px, transparent 14.5px); }
[data-world="clues"] .card .pv { display: none; }
.minicue .no { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--w-mute); }
.minicue .q { margin-top: 6px; font-family: "Newsreader", serif; font-style: italic; font-size: 24px; line-height: 1.15; color: var(--w-ink); }
.minicue .q small { font-style: normal; font-size: 17px; color: var(--w-mute); white-space: nowrap; }
[data-world="needle"] .card .tx b { font-family: "Anton", sans-serif; font-weight: 400; font-size: 22px; text-transform: uppercase; letter-spacing: .03em; }
[data-world="fit"] .card .tx b { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 21px; }
.sheet .card.from { opacity: 0; }


/* ---------- playing ---------- */
.play { background: var(--w-bg); display: flex; flex-direction: column; transition: background-color .5s var(--out); }
.play.enter { animation: playIn .55s var(--out) both; }
.play.leave { animation: playOut .35s var(--in) both; }
@keyframes playIn { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes playOut { to { opacity: 0; transform: translateY(20px); } }
.play > .bar { padding: calc(var(--st) + 14px) 16px 0 16px; height: auto; min-height: 58px; flex: none; }
.play .resume-slot { flex: none; display: flex; justify-content: center; padding: 6px 16px 0; }
.play .resume-slot:empty { display: none; }
.play .resume { height: 40px; font-size: 13px; }
.play .resume .back { width: 26px; height: 26px; }
.mount { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.mount.swap { animation: playIn .5s var(--out) both; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--w-mute); }
.msg { min-height: 22px; margin-top: 14px; font-size: 14.5px; line-height: 1.45; color: var(--w-mute); text-align: center; }
.quietbtn { height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--w-ink); box-shadow: inset 0 0 0 1px var(--w-line); }
.quietbtn:active { transform: scale(.97); }
.linkish { margin-top: 14px; font-size: 14.5px; font-weight: 600; color: var(--w-ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--w-ink) 35%, transparent); }

/* answer slots */
.slots { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 26px; }
.slot { width: 44px; height: 52px; border-radius: 9px; background: var(--w-key); box-shadow: inset 0 0 0 1.5px var(--w-line); display: grid; place-items: center; font-size: 26px; font-weight: 600; color: var(--w-ink); transition: box-shadow .2s, transform .45s var(--spring), background .45s; }
.slots.long .slot { width: 38px; height: 48px; font-size: 23px; }
.slot.on { box-shadow: inset 0 0 0 2px var(--w-ink); }
.slot.full { animation: tick .22s var(--out); }
@keyframes tick { 50% { transform: scale(1.08); } }
.slots .dash { width: 12px; height: 2.5px; border-radius: 2px; background: var(--w-ink); opacity: .5; }
.slots.shake { animation: shake .42s var(--out); }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.slots.solved .slot { transform: translateY(-4px); box-shadow: inset 0 0 0 2px transparent; background: var(--w-card); position: relative; }
.slots.solved .slot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: var(--film); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* keyboard */
.kb { flex: none; padding: 8px 4px calc(var(--sb) + 8px); display: grid; gap: 8px; background: color-mix(in srgb, var(--w-bg) 86%, var(--w-ink)); transition: transform .45s var(--out), opacity .3s; }
.kb.away { transform: translateY(110%); opacity: 0; pointer-events: none; position: absolute; left: 0; right: 0; bottom: 0; }
.kb-row { display: flex; justify-content: center; gap: 5px; }
.kb-key { flex: 0 1 34px; height: 46px; border-radius: 7px; background: var(--w-key); color: var(--w-ink); font-size: 18px; font-weight: 500; box-shadow: 0 1px 0 color-mix(in srgb, var(--w-ink) 22%, transparent); display: grid; place-items: center; transition: transform .08s, background .12s; }
.kb-key.wide { flex: 0 1 54px; font-size: 13px; font-weight: 600; }
.kb-key:active, .kb-key.down { transform: translateY(1px) scale(.96); background: color-mix(in srgb, var(--w-key) 80%, var(--w-ink)); }

/* results */
.result { display: none; margin-top: 22px; text-align: center; }
.result.in { display: block; animation: rise .6s var(--out) both; opacity: 0; transform: translateY(10px); }
.solved-head { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 32px; line-height: 1.05; text-align: left; letter-spacing: -.015em; color: var(--w-ink); }
.felt { position: relative; margin: 14px auto 0; max-width: 320px; padding: 12px 18px 12px 14px; border-radius: 16px; background: var(--w-card); font-family: var(--serif); font-size: 21px; line-height: 1.15; letter-spacing: -.01em; color: var(--w-ink); display: flex; align-items: center; gap: 12px; text-align: left; text-wrap: pretty; box-shadow: var(--w-shadow); animation: rise .7s var(--out) .25s both; opacity: 0; transform: translateY(8px); }
.felt::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; background: var(--film); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.felt.quiet { display: block; padding: 0; background: none; box-shadow: none; font-family: var(--sans); color: var(--w-mute); font-size: 15px; line-height: 1.45; letter-spacing: 0; text-align: center; animation: none; opacity: 1; transform: none; }
.felt.quiet::before { display: none; }
.felt b { color: var(--w-ink); font-weight: 600; }
.how { margin: 16px auto 0; max-width: 300px; text-align: left; }
.how dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 16px 18px; border-radius: var(--w-radius); background: var(--w-card); box-shadow: var(--w-shadow); }
.how dt { font-family: "Newsreader", serif; font-style: italic; font-size: 17px; }
.how dd { font-size: 14.5px; color: var(--w-mute); align-self: center; }

/* Lily's clue */
.clue-body { flex: 1; overflow-y: auto; padding: 18px 24px 24px; }
.clue-sheet { padding: 22px 20px 18px 34px; border-radius: 8px; background: var(--w-card); box-shadow: var(--w-shadow); background-image: linear-gradient(90deg, transparent 18px, rgba(194, 65, 45, .2) 18px 19.5px, transparent 19.5px); }
.clue-sheet .meta { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--w-mute); }
.clue-text { margin-top: 10px; font-family: "Newsreader", serif; font-style: italic; font-weight: 400; font-size: 34px; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
.clue-text .enum { font-style: normal; font-size: 24px; color: var(--w-mute); white-space: nowrap; }
.clue-sheet .slots { justify-content: flex-start; }
.clue-sheet .msg { text-align: left; }
.help { margin-top: 18px; }
.nudge { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px 0 13px; border-radius: 14px; background: var(--w-card); font-size: 14.5px; font-weight: 500; box-shadow: var(--w-shadow); }
.nudge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--film); }
.nudge:disabled { opacity: .5; }
.unfold { font-size: 14px; color: var(--w-mute); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--w-line); padding: 8px 0; }
.hints { list-style: none; margin-top: 14px; display: grid; gap: 10px; }
.hint { position: relative; padding: 12px 14px 12px 36px; border-radius: 12px; background: color-mix(in srgb, var(--w-card) 60%, transparent); font-size: 15px; line-height: 1.45; animation: rise .5s var(--out) both; opacity: 0; transform: translateY(6px); }
.hint::before { content: ""; position: absolute; left: 14px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--film); }

/* Name the act */
.act-body { flex: 1; overflow-y: auto; padding: 16px 24px 20px; }
.act-head { display: flex; align-items: center; justify-content: space-between; }
.notes { display: flex; gap: 8px; font-size: 14px; }
.note { min-width: 22px; text-align: center; color: var(--w-mute); }
.note.got { color: var(--w-accent); letter-spacing: -.1em; }
.note.now { color: var(--w-ink); }
.titles { list-style: none; margin-top: 22px; display: grid; gap: 10px; }
.titles li { display: grid; grid-template-columns: 30px 1fr; align-items: baseline; padding: 14px 16px; border-radius: 6px; background: var(--w-card); }
.titles li .n { font-family: "Anton", sans-serif; font-size: 20px; color: var(--w-accent); }
.titles li .t { font-size: 21px; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; }
.titles li.hidden { background: transparent; box-shadow: inset 0 0 0 1px var(--w-line); }
.titles li.hidden .n { color: var(--w-mute); }
.titles li.hidden .t { font-size: 14px; color: var(--w-mute); font-weight: 400; }
.titles li.arrive { animation: rise .5s var(--out) both; opacity: 0; transform: translateY(8px); }
.act-row { margin-top: 14px; display: flex; justify-content: center; }
.act-answer { margin-top: 26px; text-align: center; }

/* Music mini */
.xw-body { flex: 1; overflow-y: auto; padding: 14px 20px 16px; display: flex; flex-direction: column; align-items: center; }
.xw { display: grid; gap: 0; border: 2.5px solid var(--w-ink); border-radius: 4px; overflow: hidden; width: min(100%, 300px); aspect-ratio: 1; background: var(--w-ink); }
.xw-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.xw-cell { position: relative; aspect-ratio: 1; background: #fffdf8; color: #111113; box-shadow: inset 0 0 0 .5px rgba(17, 17, 19, .55); display: grid; place-items: center; transition: background .15s, transform .45s var(--spring); }
.xw-cell.block { background: #111113; }
.xw-cell small { position: absolute; left: 4px; top: 3px; font-size: 10.5px; font-weight: 600; opacity: .75; }
.xw-cell b { font-size: 27px; font-weight: 600; }
.xw-cell.in-word { background: #ffd1e0; }
.xw-cell.at { background: var(--w-accent); color: #fff; }
.xw-cell.wrong b { color: #d1182b; text-decoration: line-through; text-decoration-thickness: 2px; }
.xw-cell.revealed small::after { content: ""; position: absolute; right: -26px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--w-accent); }
.xw.solved .xw-cell:not(.block) { background: #fffdf8; color: #111113; animation: tick .5s var(--out) both; animation-delay: inherit; }
.xw-tools { margin-top: 14px; display: flex; gap: 8px; }
.xw-dock { flex: none; transition: transform .45s var(--out), opacity .3s; }
.xw-dock.away { transform: translateY(110%); opacity: 0; pointer-events: none; position: absolute; left: 0; right: 0; bottom: 0; }
.xw-dock .kb { padding-top: 6px; }
.xw-clue { display: flex; align-items: center; gap: 4px; margin: 0 10px 0; padding: 6px; border-radius: 12px; background: #ffd1e0; color: #111113; }
.xw-nav { width: 40px; height: 44px; display: grid; place-items: center; border-radius: 9px; flex: none; }
.xw-cluetext { flex: 1; min-height: 44px; display: flex; align-items: center; gap: 10px; text-align: left; font-size: 15.5px; line-height: 1.3; }
.xw-cluetext b { font-weight: 700; font-size: 14px; }

/* Fit */
.fit-body { flex: 1; overflow-y: auto; padding: 12px 20px 20px; display: flex; flex-direction: column; align-items: center; }
.fit-head { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.fit-head .count { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 15px; }
.fit-steps { display: flex; gap: 6px; }
.fit-steps i { width: 26px; height: 6px; border-radius: 3px; background: var(--w-line); }
.fit-steps i.got { background: var(--w-ink); }
.fit-steps i.now { background: var(--w-accent); }
.fit-svg, .frame-svg { width: min(100%, 360px); flex: none; touch-action: none; user-select: none; -webkit-user-select: none; overflow: visible; }
.fit-svg { aspect-ratio: 360 / 530; }
.frame-svg { aspect-ratio: 360 / 530; }
.frame-svg.folded { aspect-ratio: 360 / 300; }
.fit-svg.folded { aspect-ratio: 360 / 330; }
.folded .tray-line { display: none; }
.fit-ghost { fill: none; stroke: var(--w-line); stroke-width: 2; stroke-dasharray: 4 7; stroke-linecap: round; }
.piece { cursor: grab; transition: transform .55s var(--spring), filter .3s; filter: drop-shadow(0 8px 10px rgba(27, 39, 133, .22)); }
.piece.held { cursor: grabbing; filter: drop-shadow(0 18px 18px rgba(27, 39, 133, .28)); }
.piece.fixed, .piece.placed { cursor: default; filter: drop-shadow(0 3px 4px rgba(27, 39, 133, .18)); }
.piece .shine { fill: none; }
.piece .rings circle { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 2; }
.piece.wiggle { animation: wiggle .5s var(--out); }
@keyframes wiggle { 25% { translate: -6px 0; } 50% { translate: 5px 0; } 75% { translate: -3px 0; } }
.fit-svg.whole .piece, .frame-svg.whole .block { animation: whole .9s var(--out); }
@keyframes whole { 30% { filter: drop-shadow(0 0 0 rgba(0,0,0,0)) brightness(1.15) saturate(1.2); } }
.frame-bed { fill: #fff; filter: drop-shadow(0 10px 22px rgba(27, 39, 133, .14)); }
.frame-cell { fill: var(--w-bg); }
.tray-line { stroke: var(--w-line); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.block { cursor: grab; transition: transform .5s var(--spring); filter: drop-shadow(0 6px 8px rgba(27, 39, 133, .2)); }
.block.held { cursor: grabbing; transition: none; filter: drop-shadow(0 16px 16px rgba(27, 39, 133, .3)); }
.block.in { filter: drop-shadow(0 2px 3px rgba(27, 39, 133, .16)); }
.block-shine { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
.block.pop { animation: popin .35s var(--spring); }
@keyframes popin { 0% { scale: .92; } 100% { scale: 1; } }

/* what next */
.next {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 20px 18px calc(var(--sb) + 18px);
  background: var(--w-card); border-radius: 28px 28px 0 0; box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, .35);
  animation: sheetUp .6s var(--out) both;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

/* toast */
.toast { position: absolute; left: 50%; top: calc(var(--st) + 64px); z-index: 20; transform: translate(-50%, -12px); opacity: 0; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-family: var(--serif); font-size: 20px; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .5); transition: transform .6s var(--spring), opacity .35s var(--out); pointer-events: none; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

.nojs { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; }

/* ---------- show, don't tell ---------- */
/* house mark as the way home */
.homebtn { position: relative; width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.homebtn::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--film); -webkit-mask: radial-gradient(circle, transparent 60%, #000 66%); mask: radial-gradient(circle, transparent 60%, #000 66%); animation: spin 8s linear infinite; }
.homebtn .mark5 { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1; padding: 0 2px 3px 0; color: var(--w-ink); }
.play > .bar { gap: 8px; }
.play .resume { height: 38px; padding: 0 10px 0 5px; gap: 8px; font-size: 13px; }
.barbtn.back { white-space: nowrap; }
.titles li.hidden { display: block; }
.play .resume .back { width: 28px; height: 28px; }

/* hints: a bulb and how many are left */
.nudge { gap: 8px; }
.nudge .ic { color: var(--w-accent); }
.nudge .left { display: inline-flex; gap: 3px; margin-left: 2px; }
.nudge .left i { width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--w-ink) 18%, transparent); }
.nudge .left i.on { background: var(--w-accent); }
.nudge.folded { background: transparent; box-shadow: inset 0 0 0 1.5px var(--w-line); color: var(--w-mute); }
.nudge.folded .lab, .nudge.folded .left { display: none; }
.nudge.folded { width: 42px; padding: 0; justify-content: center; }
.nudge.folded .ic { color: var(--w-mute); }

/* answers: wrong is a shake and a blush, empty slots blink */
.slots.miss .slot { box-shadow: inset 0 0 0 2px #d1495b; background: color-mix(in srgb, #d1495b 9%, var(--w-key)); }
.slot.want { animation: want .7s var(--out); }
@keyframes want { 30% { box-shadow: inset 0 0 0 2px var(--w-accent); transform: translateY(-3px); } }

/* results */
.result-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.trick { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--w-card); box-shadow: var(--w-shadow); font-size: 15px; font-weight: 500; color: var(--w-ink); position: relative; animation: rise .6s var(--spring) .3s both; opacity: 0; transform: translateY(8px); }
.trick b { font-weight: 600; color: var(--w-accent); }
.trick .plus { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--w-accent); color: #fff; font-size: 14px; }
.trick.fresh::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; background: var(--film); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.iconbtn.small { width: 40px; height: 40px; margin: 0; color: var(--w-mute); box-shadow: inset 0 0 0 1.5px var(--w-line); }
.iconbtn.small.on { color: var(--w-ink); box-shadow: inset 0 0 0 1.5px var(--w-ink); }
.felt { justify-content: center; }

/* name the act */
.act-head { margin-top: 4px; }
.rounds { display: flex; gap: 8px; align-items: center; }
.rd { min-width: 10px; height: 10px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--w-line); display: inline-flex; align-items: center; }
.rd.now { background: var(--w-accent); box-shadow: none; }
.rd.got { box-shadow: none; height: auto; }
.notes-n { display: inline-flex; gap: 1px; font-size: 20px; line-height: 1; }
.notes-n i { font-style: normal; color: color-mix(in srgb, var(--w-ink) 20%, transparent); transition: color .3s, transform .4s var(--spring); }
.notes-n i.on { color: var(--w-accent); }
.notes-n.tiny { font-size: 13px; }
.notes-n.live { font-size: 24px; }
.notes-n.won i.on { animation: tick .5s var(--spring) both; }
.notes-n.won i.on:nth-child(2) { animation-delay: .08s; }
.notes-n.won i.on:nth-child(3) { animation-delay: .16s; }
.titles li.hidden { padding: 0; background: none; box-shadow: none; }
.veil { width: 100%; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 0; padding: 16px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--w-line); color: var(--w-ink); text-align: left; }
.veil:not(:disabled):active { transform: scale(.98); }
.veil .n { font-family: "Anton", sans-serif; font-size: 20px; color: var(--w-mute); }
.veil .bar { height: 14px; border-radius: 7px; background: linear-gradient(90deg, color-mix(in srgb, var(--w-ink) 16%, transparent), color-mix(in srgb, var(--w-ink) 6%, transparent)); filter: blur(1.5px); width: 78%; }
.veil:disabled .bar { opacity: .5; }
.veil .cost { font-size: 15px; font-weight: 600; color: var(--w-accent); padding-left: 10px; }
.titles .giveup { display: flex; justify-content: center; background: none; padding: 4px 0 0; }
.act-answer { margin-top: 18px; }
.act-recap { display: grid; gap: 8px; margin: 18px auto 0; max-width: 260px; }
.act-recap div { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 6px; background: var(--w-card); }
.act-recap b { font-family: "Anton", sans-serif; font-weight: 400; font-size: 18px; letter-spacing: .03em; }
.solved-head .ic { color: var(--w-accent); }

/* music mini */
.iconbtn.tool { width: 46px; height: 46px; margin: 0; color: var(--w-ink); box-shadow: inset 0 0 0 1.5px var(--w-line); }
.iconbtn.call { animation: call 1s var(--out) 2; }
@keyframes call { 40% { box-shadow: inset 0 0 0 2px var(--w-accent); color: var(--w-accent); transform: scale(1.08); } }
.xw.shake { animation: shake .42s var(--out); }
.xw-cell.want { animation: cellwant .6s var(--out); }
@keyframes cellwant { 40% { background: #ffd1e0; } }
.kb-key.enter { color: var(--w-ink); }

/* fit: pieces hop when nobody has touched them; a turn badge when one needs turning */
.piece.hop, .block.hop { animation: hop .7s var(--spring); }
@keyframes hop { 0% { translate: 0 0; } 30% { translate: 0 -14px; } 55% { translate: 0 0; } 70% { translate: 0 -4px; } 100% { translate: 0 0; } }
.block.nope { animation: shake .42s var(--out); }
.turnhint { color: #fff; pointer-events: none; animation: turnhint 1.6s var(--out) both; }
.turnhint circle { fill: var(--w-ink); }
@keyframes turnhint { 0% { opacity: 0; scale: .6; } 15% { opacity: 1; scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.fit-head .count { display: inline-flex; gap: 4px; }
.fit-head .count i { width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--w-line); }
.fit-head .count i.on { background: var(--w-ink); box-shadow: none; }

/* what next: what you did, then where you could go */
.next .stats { display: flex; gap: 14px; justify-content: center; margin-bottom: 14px; }
.stat { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--w-mute); font-variant-numeric: tabular-nums; }
.tiles { display: grid; gap: 10px; }
.tile { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; text-align: left; border-radius: 18px; }
.tile .go { grid-row: 1 / span 2; grid-column: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.tile.here { padding: 14px 14px 14px 18px; background: var(--w-ink); color: var(--w-bg); }
.tile.here .go { background: color-mix(in srgb, var(--w-bg) 16%, transparent); }
.tile.here .tq { font-family: "Newsreader", serif; font-style: italic; font-size: 19px; line-height: 1.2; }
.tile.here .tq small { font-style: normal; opacity: .65; font-size: 14px; white-space: nowrap; }
.tile.here .tt { font-size: 17px; font-weight: 600; }
.tile.here .cmeta { margin-top: 0; color: inherit; opacity: .7; }
.tile.here .level i { background: color-mix(in srgb, var(--w-bg) 30%, transparent); }
.tile.here .level i.on { background: var(--w-bg); }
.tile:active { transform: scale(.98); }
.tile.cross::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; background: var(--film); opacity: .9; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tile.cross { grid-template-columns: auto 1fr auto; padding: 8px 14px 8px 8px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px rgba(20, 20, 24, .06); position: relative; }
.tile.cross .go { grid-row: auto; grid-column: auto; background: var(--ink); color: #fff; }
.bthumb { position: relative; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.bthumb canvas { width: 100%; height: 100%; }
.bthumb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px; background: var(--film); -webkit-mask: radial-gradient(circle, transparent 60%, #000 69%); mask: radial-gradient(circle, transparent 60%, #000 69%); opacity: .85; }
.bthumb.w-needle { background: #111113; } .bthumb.w-fit { background: #edf0fb; } .bthumb.w-clues { background: #f3ede1; }
.bthumb .bq { font-family: "Newsreader", serif; font-size: 15px; color: #1f2a5a; }
.wl { font-size: 18px; line-height: 1; }
.wl.clues { font-family: "Newsreader", serif; font-style: italic; font-size: 22px; color: #1f2a5a; }
.wl.needle { font-family: "Anton", sans-serif; text-transform: uppercase; letter-spacing: .05em; color: #111; }
.wl.fit { font-family: "Fredoka", sans-serif; font-weight: 650; font-size: 21px; color: #3046d6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================= foam ================= */

/* the header mark takes you home from anywhere in the foam */
#field .top .lockup { pointer-events: auto; padding: 0; }

/* far away, only galaxies have names */
#galaxies { position: absolute; left: 0; top: 0; pointer-events: none; }
.glabel { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; will-change: transform, opacity; font-family: var(--serif); font-style: italic; font-size: 19px; letter-spacing: -.01em; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.glabel.home { font-style: normal; font-size: 20px; }
.glabel .mini-film { width: 14px; height: 14px; }
#app[data-mode="foam"] #field .ask, #app[data-mode="flying"] #field .ask { opacity: 0; transform: translateY(-10px); }
#app[data-mode="foam"] #labels, #app[data-mode="flying"] #labels,
#app[data-mode="foam"] .field-resume, #app[data-mode="flying"] .field-resume { opacity: 0; pointer-events: none; }
#app[data-mode="foam"] .field-resume > *, #app[data-mode="flying"] .field-resume > * { pointer-events: none; }

/* the way back chip sits above the bar */
.field-resume { bottom: calc(var(--sb) + 90px); }

/* ---------- the bar ---------- */
.bar-ask {
  position: absolute; left: 16px; right: 16px; bottom: calc(var(--sb) + 18px); height: 58px; z-index: 3;
  display: flex; align-items: center; gap: 4px; padding: 0 7px 0 22px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 1px 2px rgba(20, 20, 24, .06), 0 16px 36px -14px rgba(20, 20, 24, .3);
  transition: opacity .45s var(--out), transform .6s var(--out);
}
.bar-ask::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; background: var(--film); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; transition: opacity .4s; pointer-events: none; }
.bar-ask:focus-within::before, .bar-ask.listening::before, .bar-ask.hearing::before { opacity: 1; }
#bar-in { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font: 500 16px/1 var(--sans); color: var(--ink); letter-spacing: -.005em; }
#bar-in::placeholder { color: var(--ink-3); transition: color .3s; }
.bar-btn { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink); isolation: isolate; }
.bar-btn:active { transform: scale(.94); }
.bar-btn.go { display: none; background: var(--ink); color: #fff; }
.bar-ask.has .bar-btn.go { display: grid; animation: pop .35s var(--spring); }
.bar-ask.has .bar-btn.mic { display: none; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
/* listening: the mic sits on a film that breathes with your voice */
.bar-btn.mic::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--film); z-index: -1; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .12s linear; }
.bar-ask.listening .bar-btn.mic { color: #fff; }
.bar-ask.listening .bar-btn.mic::before { opacity: 1; transform: scale(calc(.92 + var(--lvl, 0) * .5)); animation: spin 2.6s linear infinite; }
.bar-ask.listening #bar-in::placeholder, .bar-ask.hearing #bar-in::placeholder { color: transparent; }
/* hearing: the film spins while the words come back */
.bar-ask.hearing .bar-btn.mic::before { opacity: 1; transform: scale(.5); -webkit-mask: radial-gradient(circle, transparent 52%, #000 58%); mask: radial-gradient(circle, transparent 52%, #000 58%); animation: spin .9s linear infinite; }
.bar-ask.hearing .bar-btn.mic .ic { opacity: .3; }
.bar-ask.shake { animation: shake .42s var(--out); }
#app[data-mode="opening"] .bar-ask { opacity: 0; transform: translateY(24px); pointer-events: none; }
#app[data-mode="opening"] .bar-ask * { pointer-events: none; }

/* labels for made worlds take their world's lettering */
.wlabel.made { font-size: 17px; font-weight: 600; letter-spacing: -.005em; }
.wlabel.made[data-type="serif"] { font-family: "Newsreader", serif; font-style: italic; font-weight: 500; font-size: 19px; }
.wlabel.made[data-type="grotesk"] { font-family: var(--sans); }
.wlabel.made[data-type="poster"] { font-family: "Anton", sans-serif; font-weight: 400; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.wlabel.made[data-type="round"] { font-family: "Fredoka", sans-serif; font-size: 19px; }

/* ---------- inside a made world: its own lettering ---------- */
.sheet[data-type] .wname { font-size: 60px; letter-spacing: -.02em; overflow-wrap: anywhere; }
[data-type="serif"] .wname { font-family: "Newsreader", serif; font-style: italic; }
[data-type="grotesk"] .wname { font-family: var(--sans); font-weight: 650; font-size: 54px; letter-spacing: -.035em; }
[data-type="poster"] .wname { font-family: "Anton", sans-serif; text-transform: uppercase; font-size: 68px; letter-spacing: .005em; }
[data-type="round"] .wname { font-family: "Fredoka", sans-serif; font-weight: 650; font-size: 62px; }
.sheet[data-type] .card .tx b { font-size: 19px; }
[data-type="serif"] .card .tx b { font-family: "Newsreader", serif; font-style: italic; font-weight: 500; font-size: 22px; }
[data-type="poster"] .card .tx b { font-family: "Anton", sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 22px; }
[data-type="round"] .card .tx b { font-family: "Fredoka", sans-serif; font-size: 21px; }
.play[data-type] .titles li .n, .play[data-type] .veil .n { font-family: var(--sans); font-weight: 700; }
.play[data-type] .act-recap b { font-family: var(--sans); font-weight: 650; }

/* ---------- quiz ---------- */
.q-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; display: flex; flex-direction: column; }
.q-dots { display: flex; gap: 7px; justify-content: center; }
.q-dots i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--w-line); transition: background .3s, transform .4s var(--spring); }
.q-dots i.now { background: var(--w-ink); box-shadow: none; transform: scale(1.15); }
.q-dots i.got { background: var(--w-accent); box-shadow: none; }
.q-dots i.miss { background: var(--w-line); box-shadow: none; }
.q-card { position: relative; margin-top: 26px; padding: 26px 22px 22px; border-radius: var(--w-radius); background: var(--w-card); box-shadow: var(--w-shadow); }
.q-card.turn { animation: rise .5s var(--out) both; opacity: 0; transform: translateY(10px); }
.q-text { font-size: 25px; line-height: 1.22; font-weight: 500; letter-spacing: -.012em; text-wrap: pretty; min-height: 2.4em; }
[data-type="serif"] .q-text { font-family: "Newsreader", serif; font-style: italic; font-size: 28px; }
[data-type="poster"] .q-text { font-family: "Anton", sans-serif; font-weight: 400; text-transform: uppercase; font-size: 28px; line-height: 1.12; letter-spacing: .01em; }
[data-type="round"] .q-text { font-family: "Fredoka", sans-serif; font-weight: 550; }
.q-form { display: flex; gap: 8px; margin-top: 22px; }
.q-form.shake { animation: shake .42s var(--out); }
.q-input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: calc(var(--w-radius) * .8 + 4px); border: 0; background: var(--w-bg); color: var(--w-ink); box-shadow: inset 0 0 0 1.5px var(--w-line); font: 500 18px var(--sans); outline: none; transition: box-shadow .2s, color .3s; }
.q-input:focus { box-shadow: inset 0 0 0 2px var(--w-ink); }
.q-input.right { box-shadow: inset 0 0 0 2px var(--w-accent); color: var(--w-accent); font-weight: 650; }
.q-go { width: 52px; height: 52px; flex: none; border-radius: calc(var(--w-radius) * .8 + 4px); display: grid; place-items: center; background: var(--w-ink); color: var(--w-bg); }
.q-go:active { transform: scale(.95); }
.q-said { min-height: 0; margin-top: 12px; font-size: 19px; font-weight: 650; color: var(--w-accent); }
.q-said:empty { display: none; }
.q-peek { position: absolute; right: 8px; top: 6px; margin: 0; color: var(--w-mute); }
.q-recap { list-style: none; display: grid; gap: 8px; margin: 18px 0 0; text-align: left; }
.q-recap li { display: grid; gap: 3px; padding: 12px 14px; border-radius: calc(var(--w-radius) * .7 + 2px); background: var(--w-card); font-size: 14px; color: var(--w-mute); }
.q-recap li b { font-size: 16px; color: var(--w-ink); }
.q-recap li.got b { color: var(--w-accent); }

/* ---------- order ---------- */
.o-body { flex: 1; overflow-y: auto; padding: 14px 22px 24px; }
.o-end { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--w-mute); text-align: center; margin: 6px 0; }
.o-list { list-style: none; display: grid; gap: 10px; margin: 10px 0; }
.o-list.shake { animation: shake .42s var(--out); }
.o-item { width: 100%; min-height: 64px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; text-align: left; border-radius: var(--w-radius); background: var(--w-card); box-shadow: var(--w-shadow); color: var(--w-ink); transition: transform .3s var(--spring), background .3s, box-shadow .3s; }
.o-item:active { transform: scale(.98); }
.o-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; box-shadow: inset 0 0 0 1.5px var(--w-line); color: var(--w-bg); transition: background .25s, box-shadow .25s, transform .4s var(--spring); }
.o-item.on .o-n { background: var(--w-accent); box-shadow: none; transform: scale(1.05); }
.o-item.locked .o-n { background: var(--w-ink); }
.o-item.wrong { box-shadow: inset 0 0 0 2px var(--w-accent), var(--w-shadow); }
.o-t { font-size: 18px; font-weight: 550; letter-spacing: -.01em; line-height: 1.2; }
[data-type="serif"] .o-t { font-family: "Newsreader", serif; font-style: italic; font-size: 21px; font-weight: 500; }
[data-type="poster"] .o-t { font-family: "Anton", sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: 20px; }
[data-type="round"] .o-t { font-family: "Fredoka", sans-serif; }
.o-d { font-size: 15px; font-weight: 650; color: var(--w-accent); animation: rise .5s var(--out) both; }
.o-list.solved .o-item { box-shadow: var(--w-shadow); }

/* reveal (made worlds) uses round dots instead of notes */
.notes-n.dots { gap: 4px; font-size: 13px; }
.notes-n.dots.live { font-size: 17px; }
.notes-n.dots.tiny { font-size: 9px; }
