/* Times Lab — Real World (orange), Why it Works (violet), Make your own (pink), Speed Round (cyan). 390px-first, iPad-friendly. */
.fd-app { max-width: 640px; }
:root { --world: #fb923c; --world2: #facc15; --why: #a78bfa; --why2: #f0abfc; --make: #f472b6; --make2: #fb7185; --speed: #22d3ee; }

/* ---------- shared bits ---------- */
.lab-pill { margin-left: auto; padding: 6px 12px; border-radius: 999px; font-weight: 900; font-size: 15px; color: #0b1638; background: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); white-space: nowrap; }
.fd-top .lab-pill + .fd-streak { margin-left: 8px; }
.lab-enter { animation: lab-in .45s cubic-bezier(.3, 1.35, .5, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes lab-in { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.lab-tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; font-weight: 900; font-size: 14px; color: #1a0d00; background: linear-gradient(135deg, var(--c, var(--world)), color-mix(in srgb, var(--c, var(--world)) 60%, #fde047)); margin: 0; }
.lab-tag.soft { background: rgba(255, 255, 255, .1); color: var(--ink-soft); }
.lab-tag.hot { background: linear-gradient(135deg, #f472b6, #a78bfa); color: #fff; animation: pulse-go 1.8s ease-in-out infinite; }
.lab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 56px; padding: 12px 22px; border-radius: 20px;
  font-weight: 900; font-size: 18px; color: #1a0d00; text-align: center; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .3), 0 10px 26px rgba(0, 0, 0, .25); transition: transform .12s;
}
.lab-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.lab-btn:disabled { opacity: .45; cursor: default; }
.lab-btn.world { background: linear-gradient(135deg, var(--world), var(--world2)); }
.lab-btn.why { background: linear-gradient(135deg, var(--why), var(--why2)); color: #1e0b3a; }
.lab-btn.make { background: linear-gradient(135deg, var(--make), var(--make2)); color: #fff; }
.lab-btn.explain { background: linear-gradient(135deg, #4ade80, #22d3ee); color: #052e16; }
.lab-btn.ghost { background: rgba(20, 31, 69, .9); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.lab-btn.big { min-height: 64px; font-size: 22px; padding: 12px 30px; }
.lab-btn.sm { min-height: 44px; font-size: 15px; padding: 8px 14px; }
.lab-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 4px; }
.lab-big-icon { font-size: 64px; animation: orb-float 2s ease-in-out infinite; }

/* ---------- home ---------- */
.lab-hero { text-align: center; margin: 2px 0 16px; }
.lab-kicker { margin: 0; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; color: var(--teddy-ink); }
.lab-hero h1 {
  margin: 2px 0 4px; font-size: clamp(42px, 12vw, 64px); line-height: 1.02; letter-spacing: -.01em;
  background: linear-gradient(90deg, var(--world2), var(--world) 35%, var(--make) 65%, var(--why)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(244, 114, 182, .35));
}
.lab-tagline { margin: 0; font-size: 17px; color: var(--ink-soft); }
.lab-tagline b { color: var(--ink); }

.lab-modes { display: grid; gap: 14px; margin-bottom: 18px; }
.lab-mode {
  position: relative; display: grid; gap: 4px; padding: 18px 18px 16px; border-radius: 28px; overflow: hidden; color: #fff;
  border: 2px solid rgba(255, 255, 255, .25); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); transition: transform .15s;
  animation: lab-in .5s cubic-bezier(.3, 1.35, .5, 1) both;
}
.lab-mode:active { transform: scale(.98); }
.lab-mode b { font-size: 30px; line-height: 1.1; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.lab-mode small { font-size: 16px; font-weight: 700; line-height: 1.35; max-width: 30em; opacity: .95; }
.lab-mode.world { background: radial-gradient(260px 160px at 100% 0%, rgba(253, 224, 71, .55), transparent 70%), linear-gradient(140deg, #f97316, #ea580c 45%, #db2777); min-height: 210px; }
.lab-mode.why { background: radial-gradient(260px 160px at 100% 0%, rgba(240, 171, 252, .5), transparent 70%), linear-gradient(140deg, #7c3aed, #6d28d9 45%, #2563eb); min-height: 190px; animation-delay: .08s; }
.lab-mode.make { background: linear-gradient(140deg, #db2777, #e11d48); padding: 14px 18px; animation-delay: .16s; }
.lab-mode.make b { font-size: 24px; }
.lab-mode-tag { justify-self: start; padding: 4px 12px; border-radius: 999px; font-weight: 900; font-size: 13px; background: rgba(255, 255, 255, .95); color: #9a3412; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.lab-mode.why .lab-mode-tag { color: #5b21b6; }
.lab-mode.make .lab-mode-tag { color: #9d174d; }
.lab-mode-go { justify-self: start; margin-top: 6px; padding: 8px 16px; border-radius: 16px; font-weight: 900; font-size: 17px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .35); }
.lab-mode-art { position: absolute; right: 10px; top: 10px; display: grid; grid-template-columns: repeat(3, 34px); gap: 2px; font-style: normal; pointer-events: none; }
.lab-mode-art i { font-style: normal; font-size: 28px; animation: bob 2.4s ease-in-out infinite; animation-delay: calc(var(--n, 0) * 1s); }
.lab-mode-art i:nth-child(2) { animation-delay: .3s; } .lab-mode-art i:nth-child(3) { animation-delay: .6s; }
.lab-mode-art i:nth-child(4) { animation-delay: .9s; } .lab-mode-art i:nth-child(5) { animation-delay: 1.2s; } .lab-mode-art i:nth-child(6) { animation-delay: 1.5s; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
.lab-mode-art.arr { grid-template-columns: repeat(4, 16px); gap: 6px; top: 18px; right: 18px; animation: arr-turn 5s ease-in-out infinite; }
.lab-mode-art.arr i { width: 16px; height: 16px; border-radius: 50%; background: #fde047; box-shadow: 0 0 10px #fde047; animation: none; }
@keyframes arr-turn { 0%, 35% { transform: rotate(0); } 50%, 85% { transform: rotate(90deg); } 100% { transform: rotate(0); } }
.lab-mode.world small, .lab-mode.why small { padding-right: 96px; }
.lab-mode.world > b { padding-right: 108px; }
.lab-mode.why > b { padding-right: 84px; }
.fd-top > .back-link + .mute-btn { margin-left: auto; }

.lab-badges-wrap h2, .lab-side h2 { font-size: 18px; margin: 0 0 8px; }
.lab-badges-wrap h2 small, .lab-side h2 small { color: var(--ink-soft); font-size: 13px; font-weight: 600; margin-left: 6px; }
.lab-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.lab-badge { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px; background: rgba(20, 31, 69, .7); border: 1px dashed var(--line); text-align: center; }
.lab-badge i { font-style: normal; font-size: 26px; filter: grayscale(1) opacity(.35); }
.lab-badge small { font-size: 11px; font-weight: 800; color: var(--ink-soft); line-height: 1.15; }
.lab-badge.on { background: linear-gradient(160deg, rgba(253, 224, 71, .25), rgba(244, 114, 182, .2)); border: 1px solid rgba(253, 224, 71, .7); box-shadow: 0 0 16px rgba(253, 224, 71, .25); }
.lab-badge.on i { filter: none; animation: twinkle 2.6s ease-in-out infinite; }
.lab-badge.on small { color: #fef9c3; }

.lab-side { padding: 14px; border-radius: 22px; background: rgba(20, 31, 69, .55); border: 1px solid var(--line); }
.lab-side-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lab-side-btn { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; min-height: 64px; padding: 10px 12px; border-radius: 18px; background: rgba(20, 31, 69, .9); border: 1px solid var(--line); }
.lab-side-btn span { grid-row: span 2; font-size: 26px; }
.lab-side-btn b { font-size: 17px; }
.lab-side-btn small { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.lab-side-btn.speed { border-color: rgba(34, 211, 238, .6); background: linear-gradient(135deg, rgba(34, 211, 238, .22), rgba(52, 211, 153, .12)), rgba(20, 31, 69, .9); }
.lab-side-btn.fix { border-color: rgba(251, 146, 60, .55); }
.lab-side-btn.empty { opacity: .5; }
.lab-side-btn .fd-badge { position: absolute; top: -8px; right: -6px; min-width: 28px; height: 28px; font-size: 14px; font-style: normal; }
.lab-side .fd-map-wrap { margin-top: 12px; }
.lab-side .fd-map-wrap summary { cursor: pointer; font-weight: 800; padding: 6px 0; }
.lab-side .fd-map-wrap summary small { color: var(--ink-soft); font-weight: 600; margin-left: 6px; }

.lab-toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 90; display: flex; gap: 12px; align-items: center;
  padding: 12px 20px; border-radius: 22px; background: linear-gradient(135deg, #fde047, #fb923c); color: #1a0d00; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  animation: toast-in .4s cubic-bezier(.3, 1.5, .5, 1);
}
.lab-toast span { font-size: 40px; }
.lab-toast small { display: block; font-weight: 800; font-size: 13px; }
.lab-toast b { font-size: 20px; white-space: nowrap; }

/* ---------- Real World ---------- */
.rw-progress { display: flex; gap: 6px; justify-content: center; margin: 0 0 10px; }
.rw-progress span { width: 28px; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.rw-progress .done { background: var(--world); }
.rw-progress .now { background: var(--world2); box-shadow: 0 0 12px var(--world2); }
.rw-card, .why-card, .mk-card {
  position: relative; border-radius: 28px; padding: 16px 14px 18px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, #0f183a), rgba(15, 24, 58, .95) 220px); border: 2px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 0 30px color-mix(in srgb, var(--c) 18%, transparent), var(--shadow);
}
.rw-tagrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.rw-say { margin-left: auto; width: 48px; height: 48px; border-radius: 50%; font-size: 22px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); }
.rw-story { font-size: 21px; line-height: 1.4; margin: 12px 4px 10px; font-weight: 600; }
.rw-story b { color: var(--world2); }
.rw-ask { font-size: 19px; font-weight: 900; margin: 10px 0 6px; color: #fff; }
.rw-scene { border-radius: 22px; padding: 14px 10px; margin: 0 auto; font-size: var(--fs); line-height: 1.05; position: relative; overflow: hidden; }
.rw-scene i { font-style: normal; display: inline-block; animation: item-pop .38s cubic-bezier(.3, 1.7, .5, 1) both; animation-delay: calc(min(var(--k, 0), 60) * 22ms); }
@keyframes item-pop { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
.bg-stage { background: linear-gradient(180deg, #7f1d1d 0 16px, #b91c1c 16px 22px, transparent 22px), linear-gradient(180deg, #3b1d4a, #1e1b4b); padding-top: 30px; }
.bg-tray { background: repeating-linear-gradient(45deg, #64748b 0 2px, #94a3b8 2px 14px); border: 4px solid #475569; }
.bg-carton, .bg-pack, .bg-plain, .bg-money { background: linear-gradient(180deg, rgba(56, 189, 248, .18), rgba(52, 211, 153, .14)); }
.bg-car { background: linear-gradient(180deg, #334155 0 75%, #475569 75%); }
.bg-bug { background: linear-gradient(180deg, #14532d, #166534); }
.bg-tent { background: radial-gradient(circle at 85% 15%, #fde68a 0 14px, transparent 15px), linear-gradient(180deg, #0c1445, #1e3a8a 70%, #166534 70%); }
.bg-team { background: linear-gradient(180deg, #15803d, #16a34a); }
.bg-brick { background: linear-gradient(180deg, rgba(250, 204, 21, .14), rgba(248, 113, 113, .12)); }
.rw-array { display: inline-grid; gap: 4px; }
.rw-arow { display: flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 12px; transition: background .25s, box-shadow .25s; }
.rw-items { display: grid; grid-template-columns: repeat(var(--cols), auto); gap: 2px; }
.rw-run { min-width: 1.6em; font-size: 16px; font-weight: 900; color: #fde047; text-shadow: 0 1px 0 #000; }
.rw-unit.lit { background: rgba(253, 224, 71, .28); box-shadow: 0 0 0 2px #fde047, 0 0 18px rgba(253, 224, 71, .5); }
.rw-groups { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.rw-group { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 8px 18px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .28); animation: lab-in .4s both; animation-delay: calc(var(--d) * 70ms); transition: background .25s, box-shadow .25s; }
.rw-group .rw-run { position: absolute; bottom: 1px; left: 0; right: 0; text-align: center; }
.rw-gicon { font-size: calc(var(--fs) * 1.25); }
.rw-gitems { display: grid; grid-template-columns: repeat(var(--cols), auto); gap: 1px; font-size: calc(var(--fs) * .8); }
.skin-carton { background: linear-gradient(180deg, #d6b48a, #b08655); border-color: #8b6435; padding-top: 8px; }
.skin-carton .rw-gitems { gap: 3px; }
.skin-pack { background: linear-gradient(160deg, #7c3aed, #db2777); border-color: #fbcfe8; }
.skin-team { background: rgba(255, 255, 255, .16); }
.skin-tent { background: rgba(0, 0, 0, .25); }
.skin-money { background: linear-gradient(160deg, rgba(74, 222, 128, .3), rgba(22, 101, 52, .4)); border-color: #86efac; }
.skin-brick { background: linear-gradient(180deg, #ef4444, #b91c1c); border: 0; border-radius: 6px; padding: 8px 8px 20px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25); }
.skin-brick:nth-child(3n+2) { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.skin-brick:nth-child(3n) { background: linear-gradient(180deg, #facc15, #ca8a04); }
.stud { width: calc(var(--fs) * .8); height: calc(var(--fs) * .8); border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .15) 45%, rgba(0, 0, 0, .15)); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); margin: 2px; }
.rw-join { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.rw-pile { display: grid; justify-items: center; gap: 4px; padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, .1); max-width: 45%; }
.rw-pile span { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.rw-pile b { font-size: 20px; color: #fde047; }
.rw-pile.more { border: 2px dashed #4ade80; }
.rw-sign { font-size: 40px; font-weight: 900; color: #4ade80; }
.rw-compare { display: grid; gap: 8px; justify-content: center; }
.rw-crow { display: flex; align-items: center; gap: 8px; }
.rw-crow small { width: 70px; text-align: right; font-weight: 900; font-size: 14px; color: var(--ink-soft); }
.rw-crow span { display: grid; grid-template-columns: repeat(var(--cols), auto); gap: 2px; }
.rw-take { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 360px; margin: 0 auto; }
.rw-scene.reveal .gone { opacity: .25; filter: grayscale(1); transform: scale(.8); transition: all .5s; }
.rw-scene.reveal .extra, .rw-scene .extra.on { filter: drop-shadow(0 0 6px #fde047); }

.rw-steps { display: flex; justify-content: center; gap: 6px; margin: 12px 0 6px; }
.rw-steps span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; font-weight: 800; font-size: 13px; background: rgba(255, 255, 255, .08); color: var(--ink-soft); }
.rw-steps span b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); font-size: 13px; }
.rw-steps .now { background: rgba(251, 146, 60, .25); color: #fff; box-shadow: 0 0 0 2px var(--world); }
.rw-steps .now b { background: var(--world); color: #1a0d00; }
.rw-steps .done b { background: #4ade80; color: #052e16; }
.rw-q { font-size: 19px; margin: 8px 0 10px; }
.rw-tools { display: grid; gap: 10px; }
.rw-tool { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; min-height: 70px; padding: 10px 14px; border-radius: 20px; background: rgba(20, 31, 69, .95); border: 2px solid rgba(255, 255, 255, .18); box-shadow: 0 4px 0 rgba(0, 0, 0, .3); transition: transform .12s; }
.rw-tool:active { transform: translateY(3px); }
.rw-tool span { grid-row: span 2; font-size: 36px; text-align: center; }
.rw-tool b { font-size: 20px; }
.rw-tool small { color: var(--ink-soft); font-weight: 700; font-size: 14px; }
.rw-tool.right { background: linear-gradient(135deg, rgba(74, 222, 128, .35), rgba(34, 211, 238, .25)); border-color: #4ade80; animation: eq-pop .4s ease; }
.rw-tool.wrong { border-color: #fb7185; opacity: .55; animation: shake .4s ease; }
.rw-tool:disabled:not(.right):not(.wrong) { opacity: .5; }
.rw-fb { min-height: 1.4em; font-size: 17px; margin: 10px 4px 4px; line-height: 1.4; }
.rw-fb.good { color: #bbf7d0; }
.rw-fb.bad { color: #fecdd3; }
.rw-fb.big { font-size: 22px; font-weight: 900; color: #fde047; animation: eq-pop .4s ease; }
.rw-fb b { color: #fff; }
.rw-sentence { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 20px; font-weight: 800; margin: 6px 0 12px; }
.slot { min-width: 64px; height: 64px; padding: 0 10px; border-radius: 18px; display: inline-grid; place-items: center; font-size: 32px; font-weight: 900; border: 3px dashed var(--world); color: rgba(255, 255, 255, .4); background: rgba(251, 146, 60, .1); cursor: pointer; }
.slot.full { border-style: solid; color: #1a0d00; background: linear-gradient(135deg, var(--world2), var(--world)); animation: eq-pop .3s ease; }
.rw-word { color: #fff; }
.rw-word.soft { color: var(--ink-soft); }
.rw-op { font-size: 36px; color: var(--world2); }
.rw-chips { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rw-chip { width: 72px; height: 72px; border-radius: 22px; font-size: 32px; font-weight: 900; background: linear-gradient(180deg, #22305f, #141f45); border: 2px solid rgba(253, 224, 71, .5); box-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.rw-chip:active { transform: translateY(3px); }
.rw-eq { display: inline-block; padding: 2px 12px; border-radius: 12px; background: #fde047; color: #1a0d00; font-weight: 900; font-size: 22px; }
.rw-big-eq { font-size: clamp(36px, 10vw, 52px); font-weight: 900; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.rw-big-eq span { color: var(--world2); }
.rw-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.rw-ans { min-height: 72px; border-radius: 22px; font-size: 34px; font-weight: 900; background: linear-gradient(180deg, #22305f, #141f45); border: 2px solid rgba(165, 243, 252, .28); box-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.rw-ans:active { transform: translateY(3px); }
.rw-ans.right { background: linear-gradient(135deg, #4ade80, #22d3ee); color: #052e16; border-color: transparent; animation: eq-pop .4s ease; }
.rw-ans.wrong { opacity: .4; border-color: #fb7185; animation: shake .4s ease; }
.rw-whatif { margin-top: 6px; padding: 14px 10px; border-radius: 22px; border: 2px dashed #f0abfc; background: rgba(167, 139, 250, .12); }
.rw-whatif .rw-story b { color: #f0abfc; }
.rw-step > .lab-btn { margin-top: 8px; }
.rw-card.done h2 { margin: 4px 0; font-size: 28px; color: var(--world2); }
.rw-mission, .lab-explain { margin: 14px 0 6px; padding: 14px; border-radius: 20px; text-align: left; background: rgba(74, 222, 128, .12); border: 2px solid rgba(74, 222, 128, .5); font-size: 17px; }
.lab-explain-h { margin: 0 0 4px !important; font-weight: 900; font-size: 18px; color: #86efac; }
.lab-explain p { margin: 0 0 10px; }
.lab-explain .lab-btn { width: 100%; }

/* ---------- Why it Works ---------- */
.lab-sub-hero { text-align: center; margin: 0 0 14px; }
.lab-sub-hero h1 { margin: 0; font-size: clamp(38px, 11vw, 54px); background: linear-gradient(90deg, var(--why2), var(--why), #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lab-sub-hero p { margin: 2px 0 0; color: var(--ink-soft); font-size: 17px; }
.why-menu { display: grid; gap: 12px; }
.why-tile { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 12px; min-height: 92px; padding: 14px 16px; border-radius: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent), rgba(20, 31, 69, .9) 70%); border: 2px solid color-mix(in srgb, var(--c) 70%, transparent); box-shadow: var(--shadow); }
.why-tile:active { transform: scale(.98); }
.why-icon { font-size: 44px; text-align: center; }
.why-tile b { display: block; font-size: 22px; }
.why-tile small { display: block; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.why-tile em { font-style: normal; font-size: 26px; }
.why-tables { display: flex; gap: 8px; align-items: center; justify-content: center; font-weight: 800; color: var(--ink-soft); margin-bottom: 8px; flex-wrap: wrap; }
.why-t { min-width: 56px; min-height: 44px; border-radius: 14px; font-weight: 900; font-size: 18px; border: 2px solid var(--c); color: var(--c); background: rgba(20, 31, 69, .9); }
.why-t.on { background: var(--c); color: #0b1638; }
.why-step { font-size: 19px; line-height: 1.4; margin: 10px 0; }
.why-step b { color: #fde047; }
.why-hint { font-size: 15px; color: var(--ink-soft); margin: -4px 0 10px; }
.ab-wrap { display: grid; justify-items: center; }
.ab-grid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 5px; padding: 10px; border-radius: 20px; background: rgba(0, 0, 0, .25); touch-action: none; user-select: none; -webkit-user-select: none; width: min(100%, calc(var(--cols) * 44px)); }
.ab-cell { aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .12); transition: background .12s, transform .15s; cursor: pointer; min-width: 22px; }
.ab-cell.on { background: var(--c); border-color: transparent; box-shadow: 0 0 10px var(--c); transform: scale(1.05); }
.ab-read { font-size: 22px; font-weight: 800; margin: 8px 0 0; min-height: 1.4em; }
.ab-read b { color: #fde047; }
.ab-read .tot { color: #4ade80; }
.dot-array { display: inline-grid; gap: 6px; padding: 12px; border-radius: 18px; background: rgba(0, 0, 0, .25); transition: transform .7s cubic-bezier(.5, -.3, .4, 1.3); }
.dot-row { display: grid; grid-template-columns: repeat(var(--cols), 22px) auto; gap: 6px; align-items: center; }
.dot-row i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); animation: item-pop .35s both; animation-delay: calc(min(var(--k, 0), 60) * 12ms); }
.dot-row i.b { background: #22d3ee; box-shadow: 0 0 8px #22d3ee; }
.dot-run { font-weight: 900; color: #fde047; font-size: 15px; min-width: 2em; text-align: left; }
.dot-array.spin { transform: rotate(90deg) scale(.9); }
.dot-array.landed { animation: eq-pop .45s ease; }
.turn-stage, .double-stage, .split-stage { display: grid; justify-items: center; gap: 6px; margin: 8px 0; }
.dbl.b { animation: drop-in .7s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes drop-in { from { transform: translateY(-60px); opacity: 0; } }
.dot-array.split i { cursor: pointer; }
.dot-array.cut .dot-row i.b { transform: translateX(16px); }
.dot-array.cut { padding-right: 28px; }
.why-eqs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.why-eqs span { padding: 6px 12px; border-radius: 14px; font-weight: 900; font-size: 19px; background: color-mix(in srgb, var(--c) 22%, transparent); border: 2px solid var(--c); animation: eq-pop .4s ease; }
.lab-why { margin: 14px 0 6px; padding: 14px; border-radius: 20px; text-align: left; background: rgba(167, 139, 250, .14); border: 2px solid rgba(167, 139, 250, .6); }
.lab-why-q { margin: 0 0 4px; font-size: 19px; }
.lab-why-think { margin: 0 0 10px; color: var(--ink-soft); font-size: 15px; }
.lab-why .lab-btn { width: 100%; }
.lab-why-a { font-size: 17px; line-height: 1.5; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .25); }
.hc { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 6px 0; }
.hc-cell { aspect-ratio: 1; min-height: 30px; border-radius: 10px; font-weight: 800; font-size: clamp(12px, 3.6vw, 17px); background: rgba(20, 31, 69, .9); border: 1px solid var(--line); color: var(--ink-soft); }
.hc-cell.hit { background: var(--c); color: #052e16; border-color: transparent; box-shadow: 0 0 10px var(--c); animation: eq-pop .3s ease; }
.hc-cell.half { box-shadow: inset 0 0 0 3px #f0abfc; color: #fff; }
.hc-cell.hit.half { box-shadow: inset 0 0 0 3px #f0abfc, 0 0 12px var(--c); color: #052e16; }
.hc-cell.nope { background: #fb7185; color: #fff; animation: shake .4s ease; }
.hc-cell.glow { animation: pulse-go 1s ease-in-out infinite; border: 2px solid #fde047; }
.od { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 2px; border-radius: 10px; background: #fde047; color: #1a0d00; font-weight: 900; animation: eq-pop .35s both; animation-delay: calc(var(--i) * 80ms); }

/* ---------- Make your own ---------- */
.mk-fact { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 6px 0 4px; }
.mk-fact b { font-size: 48px; font-weight: 900; color: #fff; text-shadow: 0 0 20px var(--make); }
.mk-things { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.mk-thing { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; min-height: 76px; border-radius: 18px; background: rgba(20, 31, 69, .9); border: 2px solid var(--line); }
.mk-thing span { font-size: 32px; }
.mk-thing small { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.mk-thing.on { border-color: var(--make); background: rgba(244, 114, 182, .25); box-shadow: 0 0 14px rgba(244, 114, 182, .5); }
.mk-text { width: 100%; font: inherit; font-size: 19px; padding: 12px 14px; border-radius: 18px; border: 2px solid rgba(244, 114, 182, .6); background: rgba(0, 0, 0, .3); color: var(--ink); resize: vertical; margin-bottom: 8px; }
.mk-card > .lab-btn.big { width: 100%; margin-top: 8px; }
.mk-book { margin-top: 18px; }
.mk-book h2 { font-size: 20px; margin: 0 0 8px; }
.mk-empty { color: var(--ink-soft); }
.mk-story { padding: 12px 14px; border-radius: 20px; margin-bottom: 10px; background: rgba(244, 114, 182, .12); border: 1px solid rgba(244, 114, 182, .5); animation: lab-in .4s both; animation-delay: calc(min(var(--i), 6) * 60ms); }
.mk-story p { margin: 8px 0; font-size: 18px; }
.mk-story-top { display: flex; justify-content: space-between; align-items: center; }
.mk-story .lab-tag { --c: #f472b6; }
.mk-del { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--ink-soft); }
.mk-mini { display: inline-grid; grid-template-columns: repeat(var(--cols), auto); gap: 1px; font-size: 18px; }
.mk-mini i { font-style: normal; }

@media (min-width: 700px) {
  .lab-mode { padding: 22px 26px 20px; }
  .lab-mode b { font-size: 36px; }
  .lab-mode-art { grid-template-columns: repeat(3, 46px); right: 22px; top: 18px; }
  .lab-mode-art i { font-size: 38px; }
  .lab-mode-art.arr { grid-template-columns: repeat(4, 22px); gap: 8px; }
  .lab-mode-art.arr i { width: 22px; height: 22px; }
  .lab-mode.world small, .lab-mode.why small { padding-right: 170px; }
  .lab-badges { grid-template-columns: repeat(8, 1fr); }
  .rw-tools { grid-template-columns: repeat(3, 1fr); }
  .rw-tool { grid-template-columns: 1fr; text-align: center; justify-items: center; min-height: 130px; }
  .rw-tool span { grid-row: auto; }
  .rw-answers { grid-template-columns: repeat(4, 1fr); }
  .dot-row { grid-template-columns: repeat(var(--cols), 30px) auto; }
  .dot-row i { width: 30px; height: 30px; }
}
@media (max-width: 380px) {
  .lab-mode.world > b, .lab-mode.why > b { padding-right: 80px; font-size: 26px; }
  .lab-mode.world small, .lab-mode.why small { padding-right: 70px; }
  .lab-mode-art { grid-template-columns: repeat(3, 26px); }
  .lab-mode-art i { font-size: 22px; }
  .dot-row { grid-template-columns: repeat(var(--cols), 18px) auto; gap: 5px; }
  .dot-row i { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-enter, .lab-mode, .rw-scene i, .lab-mode-art, .lab-mode-art i, .lab-badge.on i, .lab-tag.hot, .dot-row i, .lab-big-icon { animation: none !important; }
}
.rw-known { margin: 10px 0 0; font-size: 16px; color: var(--ink-soft); }
.rw-known b { color: #bbf7d0; }
.fd-top .back-link, .fd-streak, .fd-best { white-space: nowrap; }
.fd-top .lab-pill { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .fd-top .lab-pill { font-size: 13px; padding: 5px 10px; } .fd-streak { font-size: 17px; padding: 5px 10px; } }
