/* LABORATOŘ ORBITA — kid-friendly rounded UI. System fonts only. Readable at 1280×720. */
:root {
  --bg: #0e1a2b; --panel: rgba(16, 26, 40, .82); --panel-solid: #142033;
  --orange: #ff7a1a; --orange-dark: #c85a0c; --teal: #19b5a3; --yellow: #ffd23f; --blue: #59c8ff; --red: #e53935; --green: #37c46a;
  --text: #ffffff; --muted: rgba(255, 255, 255, .72); --radius: 18px;
  --font: "Nunito", "Arial Rounded MT Bold", ui-rounded, "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pop: cubic-bezier(.2, .9, .3, 1.4);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); font-family: var(--font); color: var(--text); -webkit-font-smoothing: antialiased; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
button { font-family: inherit; }

/* ===== HUD (piece 'interact') ===== */
#hud { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
#hud.on { opacity: 1; }
#hud.dim { opacity: .3; }
/* coherence: in the assembly / test sub-modes the objective card would sit under the mode strip — fade it out, the strip says what to do */
#hud.dim #objective { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .28); backdrop-filter: blur(6px); }

/* ---- objective card (top-left). data-state: find | sample | assemble | test | done | free ---- */
#objective { position: absolute; left: 20px; top: 20px; padding: 12px 18px 14px 16px; min-width: 300px; max-width: 460px; border-left: 6px solid var(--accent, var(--orange)); --accent: var(--orange); transition: border-color .4s, opacity .25s ease, transform .25s ease; }
#objective[data-state="sample"] { --accent: var(--blue); }
#objective[data-state="assemble"] { --accent: var(--teal); }
#objective[data-state="test"] { --accent: var(--blue); }
#objective[data-state="done"] { --accent: var(--green); }
#objective[data-state="free"] { --accent: var(--yellow); }
.obj-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 800; display: flex; align-items: center; gap: 6px; }
.obj-kicker::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 1.6s ease-in-out infinite; }
#objective[data-state="done"] .obj-kicker::before, #objective[data-state="free"] .obj-kicker::before { animation: none; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.obj-title { font-size: 22px; font-weight: 900; margin-top: 2px; line-height: 1.15; display: flex; align-items: center; gap: 8px; }
#objective[data-state="done"] .obj-title::after { content: '✓'; color: var(--green); font-size: 20px; }
.obj-progress { font-size: 15px; font-weight: 800; color: var(--teal); margin-top: 5px; }
#objective[data-state="done"] .obj-progress { color: var(--green); }
#objective[data-state="free"] .obj-progress { color: var(--yellow); }
.obj-bar { display: flex; gap: 4px; margin-top: 7px; align-items: center; height: 8px; }
.obj-bar i { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .14); transition: background .3s, box-shadow .3s; }
.obj-bar i.on { background: var(--teal); box-shadow: 0 0 6px rgba(25, 181, 163, .6); }
.obj-bar i.sample { flex: 0 0 8px; border-radius: 50%; margin-left: 6px; }
.obj-bar i.sample.on { background: var(--blue); box-shadow: 0 0 6px rgba(89, 200, 255, .7); }
.obj-bar i.fill { animation: barfill .45s var(--pop); }
@keyframes barfill { 0% { transform: scaleY(.3); } 60% { transform: scaleY(1.6); } 100% { transform: scaleY(1); } }
.obj-hint { font-size: 14px; color: var(--muted); margin-top: 7px; line-height: 1.35; }
.obj-hint.tip { color: var(--yellow); }
.obj-hint.tip::before { content: '💡 '; }
/* rubber-stamp on the card once all 7 parts + the sample are in */
.obj-stamp { position: absolute; right: -6px; top: -12px; padding: 4px 10px; border-radius: 8px; border: 2.5px solid var(--teal); color: var(--teal); font-size: 12px; font-weight: 900; letter-spacing: .06em; transform: rotate(-7deg); background: rgba(9, 24, 30, .72); box-shadow: 0 3px 10px rgba(0, 0, 0, .35); text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.obj-stamp.in { animation: stamp .5s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes stamp { 0% { transform: rotate(-24deg) scale(2.4); opacity: 0; } 55% { transform: rotate(-4deg) scale(.94); opacity: 1; } 100% { transform: rotate(-7deg) scale(1); } }
#objective.bump { animation: bump .45s var(--pop); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }

#stickers { position: absolute; right: 20px; top: 20px; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--panel); border-radius: 999px; font-weight: 900; font-size: 16px; }
#stickers .star { width: 20px; height: 20px; background: var(--yellow); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); filter: drop-shadow(0 0 4px rgba(255, 210, 63, .8)); }
#stickers.pop { animation: pop .5s var(--pop); }

/* discovery badge ("Odznak: Zvědavý stážista") — its own lane on the right, never collides with a toast */
#badge { position: absolute; right: 20px; top: 74px; display: flex; align-items: center; gap: 11px; padding: 10px 18px 10px 13px; border-radius: 16px; background: linear-gradient(135deg, #ffd23f, #ff9a1a); color: #33210a; box-shadow: 0 8px 24px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .5); transform: translateX(130%); opacity: 0; transition: transform .5s var(--pop), opacity .3s ease; max-width: 330px; }
#badge.on { transform: none; opacity: 1; }
#badge .b-star { width: 26px; height: 26px; flex: 0 0 auto; background: #33210a; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
#badge b { display: block; font-size: 15px; font-weight: 900; letter-spacing: .005em; }
#badge i { display: block; font-style: normal; font-size: 11.5px; font-weight: 800; opacity: .72; margin-top: 1px; }
#badge::before { content: 'ODZNAK'; position: absolute; left: 13px; top: -9px; font-size: 9px; font-weight: 900; letter-spacing: .14em; background: #33210a; color: var(--yellow); padding: 2px 7px; border-radius: 999px; }

/* ---- reticle: 4 px dot → 18 px ring (eased), dashed grey when disabled, yellow fill while holding ---- */
#reticle { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#reticle .dot { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 0 6px rgba(255, 255, 255, .5); transition: transform .2s var(--pop), opacity .2s; }
#reticle .ring { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; opacity: 0; transform: scale(.3); transition: transform .24s var(--pop), opacity .16s ease; }
#reticle .ring::before { content: ''; position: absolute; inset: 9px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .45), 0 0 8px rgba(255, 255, 255, .35); transition: border-color .2s; }
#reticle .ring::after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; transform: scale(.7); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
#reticle.active .ring { opacity: 1; transform: scale(1); }
#reticle.active .ring::after { transform: scale(1); opacity: 1; }
#reticle.active .dot { transform: scale(.55); }
#reticle.disabled .ring::before { border-color: rgba(255, 255, 255, .62); border-style: dashed; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(0, 0, 0, .4); }
#reticle.disabled .dot { opacity: .6; }
#reticle .ring svg { position: absolute; inset: 0; width: 36px; height: 36px; transform: rotate(-90deg); overflow: visible; }
/* the hold arc sits exactly on the visible ring (r = 9 in a 36px box) and has an unfilled track behind it */
#reticle .ring .holdtrack { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 3; opacity: 0; transition: opacity .15s; }
#reticle .ring .hold { fill: none; stroke: var(--yellow); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 56.55; stroke-dashoffset: 56.55; opacity: 0; transition: opacity .15s; filter: drop-shadow(0 0 4px rgba(255, 210, 63, .95)); }
#reticle.holding .ring .hold, #reticle.holding .ring .holdtrack { opacity: 1; }
#reticle.holding .ring { transform: scale(1.35); }
#reticle.holding .ring::before { border-color: rgba(255, 255, 255, .55); }
#reticle.pulse .ring { animation: pulse .42s ease; }
#reticle.pulse .ring::before { animation: pulseColor .42s ease; }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes pulseColor { 0% { border-color: #fff; } 40% { border-color: var(--yellow); box-shadow: 0 0 14px rgba(255, 210, 63, .9); } 100% { border-color: #fff; } }

/* ---- prompt chip under the reticle: [E] · Sebrat pipetu P20 ---- */
#prompt { position: absolute; left: 50%; top: calc(50% + 34px); transform: translate(-50%, 8px) scale(.96); opacity: 0; transition: opacity .16s ease, transform .2s var(--pop); display: flex; align-items: center; gap: 9px; padding: 5px 16px 5px 5px; background: rgba(16, 26, 40, .84); border-radius: 999px; font-size: 18px; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 16px rgba(0, 0, 0, .3), inset 0 0 0 1.5px rgba(255, 255, 255, .1); letter-spacing: .005em; }
#prompt.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
#prompt .holdtag { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--yellow); margin-left: 6px; margin-right: -4px; }
#prompt .chip { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 10px; background: linear-gradient(#fff, #e9ecf1); color: #1a1d22; font-weight: 900; font-size: 17px; box-shadow: 0 3px 0 #9aa1ad, 0 4px 6px rgba(0, 0, 0, .35); transition: transform .1s, box-shadow .1s; }
#prompt.pressed .chip { transform: translateY(2px); box-shadow: 0 1px 0 #9aa1ad, 0 2px 3px rgba(0, 0, 0, .35); }
#prompt.hold .chip { box-shadow: 0 3px 0 #b08a12, 0 4px 6px rgba(0, 0, 0, .35); background: linear-gradient(#ffe27a, var(--yellow)); }
#prompt .sep { color: rgba(255, 255, 255, .38); font-weight: 900; margin: 0 -3px 0 -2px; }
#prompt .altkey { font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .09); border-radius: 999px; padding: 3px 9px; margin-left: 2px; }
#prompt.disabled .altkey { display: none; }
#prompt.disabled { color: rgba(255, 255, 255, .55); background: rgba(40, 44, 52, .84); }
#prompt.disabled .chip { background: #7d838f; color: #2a2e34; box-shadow: 0 3px 0 #4a4f59; }
#prompt .reason { font-size: 13px; font-weight: 800; color: var(--yellow); }
#prompt .reason::before { content: '· '; color: rgba(255, 255, 255, .4); }
#prompt.disabled .reason::before { content: '🔒 '; }

/* ---- part tray (bottom-left): 7 parts + sample ---- */
#tray { position: absolute; left: 20px; bottom: 18px; display: flex; gap: 8px; align-items: flex-end; }
.slot { width: 64px; border-radius: 15px; background: rgba(16, 26, 40, .74); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; position: relative; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .28); transition: background .3s, color .3s, box-shadow .3s, transform .3s; padding: 6px 3px 5px; --c: #fff; }
.slot svg { width: 36px; height: 36px; fill: currentColor; display: block; transition: transform .3s var(--pop); }
.slot .cut { fill: rgba(10, 16, 26, .6); }
.slot .slot-name { display: block; width: 100%; text-align: center; font-size: 9.5px; font-weight: 800; letter-spacing: -.012em; margin-top: 3px; color: rgba(255, 255, 255, .48); white-space: nowrap; overflow: hidden; text-overflow: clip; transition: color .3s; }
.slot::after { content: '✓'; position: absolute; right: -5px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transform: scale(0); transition: transform .3s var(--pop); }
.slot.have { color: var(--c); background: rgba(255, 255, 255, .97); box-shadow: inset 0 0 0 3px var(--c), 0 4px 14px rgba(0, 0, 0, .3); }
.slot.have .cut { fill: rgba(255, 255, 255, .92); }
.slot.have .slot-name { color: #1a1d22; }
.slot.have::after { transform: scale(1); }
.slot.sample { margin-left: 12px; }
.slot.sample::before { content: ''; position: absolute; left: -11px; top: 12px; height: 40px; width: 2px; background: rgba(255, 255, 255, .22); border-radius: 2px; }
.slot.pop { animation: pop .6s var(--pop); z-index: 2; }
.slot.pop svg { animation: wiggle .6s ease; }
@keyframes pop { 0% { transform: scale(.6); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes wiggle { 0% { transform: rotate(0); } 30% { transform: rotate(-12deg); } 60% { transform: rotate(9deg); } 100% { transform: rotate(0); } }
.slot.hint { animation: hintGlow 1.4s ease-in-out infinite; }
/* after the mission the tray becomes a small trophy shelf so the free-exploration HUD stays light */
#tray { transition: transform .4s var(--pop); }
#tray.trophy .slot { width: 42px; border-radius: 12px; padding: 5px 2px 4px; }
#tray.trophy .slot svg { width: 26px; height: 26px; }
#tray.trophy .slot .slot-name { display: none; }
#tray.trophy .slot::after { width: 15px; height: 15px; font-size: 10px; right: -3px; top: -4px; }
#tray.trophy .slot.sample::before { top: 8px; height: 26px; }
@keyframes hintGlow { 0%, 100% { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12); } 50% { box-shadow: inset 0 0 0 2px var(--yellow), 0 0 12px rgba(255, 210, 63, .5); } }

/* flying ghost icon: screen centre → tray slot (animated from JS with the Web Animations API) */
.fly { position: fixed; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 12px; background: rgba(255, 255, 255, .97); box-shadow: 0 0 0 3px var(--c), 0 6px 18px rgba(0, 0, 0, .35), 0 0 24px var(--c); color: var(--c); display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 6; will-change: transform; }
.fly svg { width: 30px; height: 30px; fill: currentColor; }
.fly .cut { fill: rgba(255, 255, 255, .92); }
/* DOM sparkle burst around a slot */
.burst { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 7; }
.burst i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--yellow)); box-shadow: 0 0 6px var(--c, var(--yellow)); animation: burst .7s ease-out forwards; transform: rotate(var(--a)) translateX(0); }
.burst i:nth-child(odd) { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); border-radius: 0; width: 11px; height: 11px; left: -5.5px; top: -5.5px; }
@keyframes burst { 0% { transform: rotate(var(--a)) translateX(4px) scale(1); opacity: 1; } 100% { transform: rotate(var(--a)) translateX(46px) scale(.2); opacity: 0; } }

/* ---- toasts (bottom-centre, never stacked) ---- */
#toast { position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 16px) scale(.94); opacity: 0; transition: opacity .22s ease, transform .3s var(--pop); background: rgba(16, 26, 40, .92); color: #fff; padding: 11px 24px; border-radius: 999px; font-size: 19px; font-weight: 800; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); border: 2px solid rgba(255, 255, 255, .14); max-width: 72vw; text-align: center; z-index: 5; display: flex; align-items: center; gap: 12px; }
#toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
#toast .t-icon { width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--c, var(--teal)); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2.5px var(--c, var(--teal)); flex: 0 0 auto; }
#toast .t-icon svg { width: 24px; height: 24px; fill: currentColor; }
#toast .t-icon .cut { fill: rgba(255, 255, 255, .92); }
#toast .t-text { white-space: normal; line-height: 1.25; text-wrap: balance; }
#toast.long { font-size: 16px; padding: 10px 22px; border-radius: 22px; max-width: min(680px, 66vw); }
#toast.pickup { border-color: var(--c, var(--green)); box-shadow: 0 8px 24px rgba(0, 0, 0, .35), 0 0 18px var(--c, var(--green)); }
#toast.warn { border-color: var(--yellow); }
#toast.warn .t-text::before { content: '⚠ '; color: var(--yellow); }
#toast.good { border-color: var(--green); }
#toast.good .t-text::before { content: '✓ '; color: var(--green); }
#toast.shake { animation: shake .4s ease; }
@keyframes shake { 0%, 100% { transform: translate(-50%, 0); } 25% { transform: translate(calc(-50% - 6px), 0); } 50% { transform: translate(calc(-50% + 6px), 0); } 75% { transform: translate(calc(-50% - 3px), 0); } }

/* ---- tray thumbnails: studio renders of the real parts (white silhouette while missing, colour once collected) ---- */
.slot .ico { display: flex; align-items: center; justify-content: center; width: 44px; height: 40px; position: relative; }
.slot .ico svg { width: 36px; height: 36px; }
.slot img.thumb { width: 46px; height: 46px; margin: -3px 0 -3px; display: block; object-fit: contain; filter: grayscale(.9) brightness(1.4) contrast(.95) drop-shadow(0 1px 1px rgba(0, 0, 0, .8)); opacity: .8; transition: filter .35s, opacity .35s, transform .3s var(--pop); }
.slot:not(.have) { outline: 1.5px dashed rgba(255, 255, 255, .26); outline-offset: -5px; }
.slot:not(.have) .slot-name { color: rgba(255, 255, 255, .62); }
.slot.have img.thumb { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .28)); opacity: 1; }
.slot.pop img.thumb { animation: wiggle .6s ease; }
.slot.have.has-thumb { background: radial-gradient(circle at 50% 38%, #ffffff 0%, #eef3f8 70%); }
#tray.trophy .slot img.thumb { width: 30px; height: 30px; margin: -2px 0; }
#tray.trophy .slot .ico { width: 30px; height: 28px; }
#toast .t-icon img { width: 30px; height: 30px; object-fit: contain; }

/* ---- 3D showcase: "Nový díl!" — the part you just picked up, big, lit and spinning, then it docks into the tray ---- */
#showcase { position: fixed; left: 50%; bottom: 70px; width: 600px; margin-left: -300px; display: flex; flex-direction: column; align-items: center; pointer-events: none; z-index: 6; --c: var(--yellow); }
#showcase .sc-stage { position: relative; width: 300px; height: 236px; will-change: transform; }
#showcase .sc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; }
#showcase .sc-rays { position: absolute; left: 50%; top: 50%; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; z-index: 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 42%, transparent) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 12%, rgba(0, 0, 0, .55) 38%, transparent 66%); mask-image: radial-gradient(circle, #000 12%, rgba(0, 0, 0, .55) 38%, transparent 66%);
  opacity: 0; transform: scale(.4) rotate(0deg); transition: opacity .3s ease, transform .5s var(--pop); }
#showcase .sc-halo { position: absolute; left: 50%; top: 50%; width: 250px; height: 250px; margin: -125px 0 0 -125px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, color-mix(in srgb, var(--c) 50%, transparent) 30%, transparent 68%); opacity: 0; transition: opacity .3s ease; }
#showcase .sc-shadow { position: absolute; left: 50%; bottom: 14px; width: 150px; height: 18px; margin-left: -75px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .38), transparent); z-index: 1; opacity: 0; transition: opacity .3s; }
#showcase.on .sc-rays { opacity: 1; transform: scale(1); animation: scSpin 7s linear infinite; }
#showcase.on .sc-halo, #showcase.on .sc-shadow { opacity: 1; }
#showcase.on .sc-stage { animation: scIn .5s var(--pop); }
@keyframes scIn { 0% { transform: translateY(40px) scale(.5); } 100% { transform: none; } }
@keyframes scSpin { from { rotate: 0deg; } to { rotate: 360deg; } }
#showcase .sc-card { position: relative; z-index: 3; margin-top: -14px; max-width: 560px; padding: 9px 24px 12px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, rgba(22, 34, 52, .95), rgba(13, 21, 34, .95)); border: 2.5px solid var(--c);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45), 0 0 26px color-mix(in srgb, var(--c) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .1);
  opacity: 0; transform: translateY(12px) scale(.9); transition: opacity .25s ease, transform .35s var(--pop); }
#showcase.on .sc-card { opacity: 1; transform: none; transition-delay: .1s; }
#showcase .sc-kicker { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: #1a1d22; background: var(--yellow); border-radius: 999px; padding: 2px 10px; margin-bottom: 3px; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
#showcase .sc-name { font-size: 27px; font-weight: 900; line-height: 1.1; letter-spacing: .005em; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
#showcase .sc-fact { font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, .8); line-height: 1.3; margin-top: 3px; text-wrap: balance; }
#showcase.out .sc-card { opacity: 0; transform: translateY(14px) scale(.92); transition-delay: 0s; }
#showcase.out .sc-rays, #showcase.out .sc-halo, #showcase.out .sc-shadow { opacity: 0; transition-duration: .18s; }
#hud:has(#showcase.on) ~ #toast, body:has(#showcase.on) #toast { opacity: 0 !important; }
.burst i { animation-name: burst; }
@keyframes burst { 0% { transform: rotate(var(--a)) translateX(4px) scale(1); opacity: 1; } 100% { transform: rotate(var(--a)) translateX(var(--d, 46px)) scale(.2); opacity: 0; } }

/* aiming at a kit part: thumbnail in the prompt + its tray slot glows */
#prompt .pthumb { width: 34px; height: 34px; object-fit: contain; margin: -4px -2px -4px 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.slot.aim { box-shadow: inset 0 0 0 2.5px var(--yellow), 0 0 16px rgba(255, 210, 63, .55); transform: translateY(-4px); outline-color: transparent; }
.slot.aim img.thumb { filter: none; opacity: 1; }
.slot.aim .slot-name { color: var(--yellow); }

/* "Q · prohlédnout díly" — shown above the tray after the first pickup, until you have used it a few times */
#inspect-hint { position: absolute; left: 22px; bottom: 100px; display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(16, 26, 40, .78); font-size: 13px; font-weight: 800; color: rgba(255, 255, 255, .85); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); animation: rise .4s var(--pop); }
#inspect-hint b { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(#fff, #e9ecf1); color: #1a1d22; font-size: 13px; font-weight: 900; box-shadow: 0 2px 0 #9aa1ad; }
#tray.trophy ~ #inspect-hint { bottom: 76px; }

/* reticle "no" wobble when a locked thing is used */
#reticle.deny .ring { animation: deny .4s ease; }
@keyframes deny { 0%, 100% { transform: translateX(0) scale(1); } 20% { transform: translateX(-5px) scale(1.1); } 45% { transform: translateX(5px) scale(1.1); } 70% { transform: translateX(-3px); } }
#reticle.deny .ring::before { border-color: #ff8a7a; }

@media (max-width: 1100px) { .slot { width: 52px; } .slot svg { width: 30px; height: 30px; } .slot .slot-name { font-size: 9px; } #objective { max-width: 380px; } }

/* ===== overlays ===== */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10; transition: opacity .4s ease; }
.overlay.fade { opacity: 0; pointer-events: none; }
#start { background: radial-gradient(ellipse at 50% 20%, #23507c 0%, #122a47 40%, #0a1524 75%, #060c15 100%); }
.bg-stars { position: absolute; inset: 0; opacity: .7; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 12%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 22% 40%, #fff 60%, transparent 61%),
    radial-gradient(2px 2px at 35% 18%, #cfe8ff 60%, transparent 61%), radial-gradient(1px 1px at 48% 8%, #fff 60%, transparent 61%),
    radial-gradient(1.5px 1.5px at 62% 30%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 75% 14%, #ffe9a8 60%, transparent 61%),
    radial-gradient(2px 2px at 88% 36%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 12% 70%, #fff 60%, transparent 61%),
    radial-gradient(1.5px 1.5px at 30% 86%, #cfe8ff 60%, transparent 61%), radial-gradient(1px 1px at 55% 92%, #fff 60%, transparent 61%),
    radial-gradient(2px 2px at 70% 74%, #fff 60%, transparent 61%), radial-gradient(1px 1px at 92% 82%, #ffe9a8 60%, transparent 61%),
    radial-gradient(1px 1px at 40% 55%, #fff 60%, transparent 61%), radial-gradient(1.5px 1.5px at 84% 58%, #fff 60%, transparent 61%);
}
#pause, #end { background: rgba(6, 12, 22, .72); backdrop-filter: blur(8px); opacity: 0; transition: opacity .25s ease; }
#pause.on, #end.on { opacity: 1; }
.panel { position: relative; background: rgba(14, 24, 40, .92); border-radius: 30px; padding: 34px 44px 38px; width: min(760px, 92vw); box-shadow: 0 24px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .09); text-align: center; }
.panel.in { animation: rise .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

h1 { font-size: 60px; line-height: .95; margin: 10px 0 2px; letter-spacing: .01em; font-weight: 900; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
h1 span { display: block; color: var(--orange); font-size: 74px; letter-spacing: .06em; }
h2 { font-size: 42px; margin: 6px 0 18px; font-weight: 900; letter-spacing: .02em; }
.subtitle { font-size: 26px; font-weight: 900; color: var(--teal); margin-top: 6px; }
.agency { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 10px; font-weight: 800; }
.kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); font-weight: 800; }
.tagline { font-size: 17px; color: var(--muted); max-width: 540px; margin: 14px auto 18px; line-height: 1.45; }
.logo .orbit { width: 96px; height: 96px; margin: 0 auto; position: relative; }
.logo .orbit::before { content: ''; position: absolute; inset: 2px; border: 3px solid var(--orange); border-radius: 50%; opacity: .9; }
.logo .planet { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #8fdcff, #2b7fd0 55%, #163f7a 100%); box-shadow: 0 0 28px rgba(89, 200, 255, .55); }
.logo .planet::after { content: ''; position: absolute; left: 10px; top: 16px; width: 18px; height: 8px; border-radius: 50%; background: #37c46a; opacity: .8; transform: rotate(-20deg); }
.logo .sat { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 10px var(--yellow); animation: orbit 5s linear infinite; }
@keyframes orbit { from { transform: rotate(0deg) translateX(46px); } to { transform: rotate(360deg) translateX(46px); } }

.controls { list-style: none; padding: 0; margin: 0 auto 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.controls li { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 6px 12px 6px 6px; font-size: 14px; color: var(--muted); font-weight: 700; }
.controls li b { background: #fff; color: #1a1d22; border-radius: 8px; padding: 4px 9px; font-weight: 900; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); font-size: 14px; letter-spacing: .04em; }
.controls.compact { margin: 18px auto 6px; }

.btn { font-weight: 900; border: 0; border-radius: 999px; cursor: pointer; padding: 12px 26px; font-size: 18px; background: var(--orange); color: #fff; box-shadow: 0 5px 0 var(--orange-dark), 0 10px 26px rgba(255, 122, 26, .35); transition: transform .12s ease, box-shadow .12s ease; letter-spacing: .01em; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--orange-dark), 0 14px 30px rgba(255, 122, 26, .4); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--orange-dark); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn.big { font-size: 24px; padding: 16px 42px; }
.btn:disabled { background: #4a5262; box-shadow: none; cursor: default; color: rgba(255, 255, 255, .6); transform: none; }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); font-size: 15px; margin-top: 16px; padding: 10px 20px; }
.btn.ghost:hover { transform: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4); color: #fff; }

.intro-panel .line { font-size: 22px; line-height: 1.45; margin: 12px auto; max-width: 600px; font-weight: 700; }
.intro-panel .line:first-of-type { margin-top: 18px; }
.intro-panel .btn { margin-top: 18px; }

.sliders { margin: 22px auto 6px; max-width: 520px; }
.sliders label { display: grid; grid-template-columns: 140px 1fr 64px; align-items: center; gap: 12px; margin: 12px 0; font-weight: 800; text-align: left; font-size: 15px; }
.sliders output { text-align: right; color: var(--teal); font-weight: 900; }
input[type=range] { accent-color: var(--orange); width: 100%; height: 28px; cursor: pointer; }

.end-panel .stats { display: flex; justify-content: center; gap: 16px; margin: 6px 0 18px; }
.end-panel .stats div { background: rgba(255, 255, 255, .06); border-radius: 16px; padding: 12px 18px; min-width: 130px; }
.end-panel .stats b { display: block; font-size: 30px; color: var(--yellow); font-weight: 900; }
.end-panel .stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.end-panel .fact { font-size: 15px; color: var(--muted); font-style: italic; border-left: 4px solid var(--teal); padding-left: 14px; text-align: left; margin: 12px auto; max-width: 600px; line-height: 1.4; }
.end-panel .line { font-size: 18px; font-weight: 700; margin: 12px auto 18px; max-width: 560px; }

@media (max-height: 740px) {
  h1 { font-size: 46px; } h1 span { font-size: 56px; }
  .panel { padding: 22px 32px 26px; }
  .tagline { margin: 8px auto 12px; font-size: 15px; }
  .logo .orbit { width: 72px; height: 72px; }
}

/* Restrained laboratory presentation; classic comparison retains original UI. */
:root.clinical-look {
 --orange:#88a9c1; --orange-dark:#466881; --teal:#88adb8;
 --yellow:#c0ced8; --blue:#a2c0d5; --red:#c17a7b; --green:#83aa95;
 --font:Inter,"Helvetica Neue",system-ui,Arial,sans-serif; --radius:10px;
}
.clinical-look #objective {border-radius:10px}

#look-variants{position:fixed;right:16px;top:16px;z-index:25;background:#132638ee;color:#eaf3ff;border:1px solid #68849e;border-radius:9px;padding:12px;font:13px system-ui;max-width:390px}
#look-variants summary{cursor:pointer}#look-variants a{display:block;padding:12px 0;color:#a6d7ff;text-decoration:none}#look-variants a[aria-current]{color:white;font-weight:700}#look-variants small{color:#aabcca}

:root.warm-look {
 --orange:#e99842; --orange-dark:#b36727; --teal:#8baaba; --yellow:#e7bc61;
 --blue:#86b9df; --red:#e53935; --green:#37c46a;
 --panel:rgba(19,32,53,.9); --panel-solid:#17283f;
 --font:Inter,"Helvetica Neue",system-ui,Arial,sans-serif; --radius:10px;
}
.warm-look #objective{border-radius:10px}
.warm-look #look-variants{background:#17283fee;border-color:#947647}
.warm-look #look-variants a{color:#efc17b}
/* Appearance list sits above the live shader menu while expanded. */
#look-variants[open]{z-index:1001;max-height:calc(100vh - 48px);overflow-y:auto}
#look-variants a{border-bottom:1px solid #ffffff14;padding:10px 0}
.romulus-brand{display:block;width:min(100%,460px);height:auto;background:transparent;padding:0;border-radius:0;box-sizing:border-box}

#look-variants h3{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#aabcca;margin:18px 0 6px}#look-variants label{display:flex;align-items:center;gap:8px;padding:10px 0;cursor:pointer}#look-variants small{display:block;line-height:1.5;margin-top:8px}#look-variants input{accent-color:#ffd23f}
