@font-face { font-family: Fredoka; src: url(assets/fonts/Fredoka-Variable.ttf); font-weight: 300 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(assets/fonts/Nunito-Variable.ttf); font-weight: 200 1000; font-display: swap; }

:root {
  --cream: #F4EBD0; --ink: #1A1A1A; --navy: #0B1F3A; --gold: #F2C14E; --blue: #2F6FED; --teal: #2AA9A1;
  --white: #F7F4EE; --amber: #E0851D; --red: #E0402A; --green: #3FA34D; --regolith: #C9C2B8;
  --ls: #4DB8E8; --shield: #2F6FED; --power: #F2C14E; --food: #3FA34D;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: clamp(11.5px, 3.45vh, 21px); }
html, body { margin: 0; height: 100%; background: #05070F; overflow: hidden; overscroll-behavior: none; }
body { font-family: Nunito, ui-rounded, system-ui, sans-serif; font-weight: 800; color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: none; }
#app { position: fixed; inset: 0; overflow: hidden; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; padding: 0; background: none; cursor: pointer; touch-action: manipulation; }
.ic { width: 1.6rem; height: 1.6rem; display: block; flex: none; pointer-events: none; object-fit: contain; }

#si { position: absolute; left: calc(.45rem + env(safe-area-inset-left)); bottom: .4rem; font: 800 .62rem Nunito, sans-serif; color: var(--ink); background: var(--white); border: 1.5px solid var(--ink); border-radius: 50%; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; opacity: .85; pointer-events: none; z-index: 60; }
#vignette { position: absolute; inset: 0; pointer-events: none; transition: box-shadow .6s; }
#vignette.cold { box-shadow: inset 0 0 6rem 1.5rem rgba(120, 200, 255, .55); }
#vignette.alarm { animation: alarm 1s infinite; }
@keyframes alarm { 50% { box-shadow: inset 0 0 5rem .8rem rgba(224, 64, 42, .5); } }
#vignette.stormy { box-shadow: inset 0 0 6rem 1rem rgba(255, 130, 40, .5); }
#fade { position: absolute; inset: 0; background: #05070F; opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 55; }
#fade.on { opacity: 1; }
#loading { position: absolute; inset: 0; display: grid; place-items: center; background: #05070F; z-index: 100; }
.spin { width: 3rem; height: 3rem; border-radius: 50%; border: .4rem solid #24304d; border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; padding: .5rem calc(.6rem + env(safe-area-inset-right)) .5rem calc(.6rem + env(safe-area-inset-left)); }
#hud > * { pointer-events: auto; position: absolute; }
.pill { background: var(--cream); border: 2px solid var(--ink); border-radius: 1rem; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); }
#meters { top: .5rem; left: calc(.6rem + env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(4, auto); gap: .35rem; }
.meter { display: flex; align-items: center; gap: .3rem; padding: .22rem .5rem .22rem .3rem; min-width: 7.6rem; }
.meter .ic { width: 1.5rem; height: 1.5rem; }
.bar { position: relative; flex: 1; height: .8rem; min-width: 3.2rem; background: #d9ceb0; border: 2px solid var(--ink); border-radius: .5rem; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 0 .3rem .3rem 0; background: var(--c, var(--teal)); }
.bar > i.ghost { opacity: .4; background-image: repeating-linear-gradient(-45deg, transparent 0 .22rem, rgba(255, 255, 255, .7) .22rem .44rem); }
.bar > b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.meter .num { font-size: .95rem; min-width: 1.5rem; text-align: right; font-variant-numeric: tabular-nums; line-height: 1; }
.meter .num small { font-size: .7rem; opacity: .7; }
.meter.warning { background: #ffe1a8; }
.meter.critical { background: #ffc2b8; animation: throb .7s infinite; }
.meter.pulse { animation: throb .7s infinite; }
@keyframes throb { 50% { transform: scale(1.06); } }
.meter .spare { display: flex; align-items: center; font-size: .78rem; gap: .05rem; margin-left: .1rem; color: #7a5a00; }
.meter .spare .ic { width: .9rem; height: .9rem; }
.meter .lockic .ic { width: .9rem; height: .9rem; }

#topright { top: .5rem; right: calc(.6rem + env(safe-area-inset-right)); display: flex; align-items: center; gap: .35rem; }
#days { display: flex; align-items: center; gap: .16rem; padding: .2rem .45rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 1rem; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); }
#days .d { position: relative; width: 1.35rem; height: 1.35rem; display: grid; place-items: center; opacity: .38; }
#days .d .ic { width: 1.15rem; height: 1.15rem; }
#days .d.done { opacity: .7; filter: grayscale(1); }
#days .d.now { opacity: 1; }
#days .d.now::before { content: ''; position: absolute; inset: -.18rem; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--p, 0) * 1turn), #d9ceb0 0); border: 1.5px solid var(--ink); z-index: -1; }
#days .d.now::after { content: ''; position: absolute; inset: .02rem; border-radius: 50%; background: var(--cream); z-index: -1; }
#days .d .mark { position: absolute; right: -.3rem; top: -.4rem; width: .85rem; height: .85rem; }
#days .d .mark .ic { width: .85rem; height: .85rem; }
#days .goal .ic { width: 1.15rem; height: 1.15rem; }
.rb { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); display: grid; place-items: center; font: 800 1.15rem Fredoka, sans-serif; }
.rb .ic { width: 1.15rem; height: 1.15rem; }
.rb:active, .ab:active, .chip:active { transform: translateY(.12rem); box-shadow: none; }
.rb.on { background: var(--gold); }
#btn-ff .ic path, #btn-menu .ic rect { fill: var(--blue); }
.q { background: var(--blue); color: #fff; }
.q.mini { width: 1.35rem; height: 1.35rem; font-size: .82rem; border-radius: 50%; border: 2px solid var(--ink); display: inline-grid; place-items: center; flex: none; box-shadow: none; font-family: Fredoka, sans-serif; font-weight: 700; }

#suit { left: calc(.6rem + env(safe-area-inset-left)); top: 3rem; display: flex; gap: .3rem; }
.gauge { display: flex; align-items: center; gap: .25rem; padding: .16rem .45rem .16rem .25rem; background: rgba(244, 235, 208, .94); border: 2px solid var(--ink); border-radius: .9rem; font-size: .85rem; font-variant-numeric: tabular-nums; }
.gauge .ic { width: 1.2rem; height: 1.2rem; }
.gauge .bar { min-width: 2.6rem; height: .62rem; flex: none; width: 2.6rem; }
.gauge.low { background: #ffc2b8; animation: throb .7s infinite; }
.pips { display: grid; grid-template-columns: repeat(var(--n, 6), .42rem); gap: .1rem; }
.pips i { width: .42rem; height: .42rem; border-radius: .12rem; border: 1.5px solid var(--ink); background: #d9ceb0; }
.pips i.on { background: var(--amber); }
.gauge.full { background: var(--gold); }

#storm { top: 3rem; right: calc(.6rem + env(safe-area-inset-right)); display: flex; flex-direction: column; gap: .2rem; align-items: flex-end; }
#storm .card { display: flex; align-items: center; gap: .4rem; padding: .25rem .5rem .25rem .35rem; background: #ffe1a8; border: 2px solid var(--ink); border-radius: 1rem; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); }
#storm .card.active { background: #ffb39a; animation: throb .6s infinite; }
#storm .count { font: 700 1.25rem Fredoka, sans-serif; min-width: 1.6rem; text-align: center; }
#storm .dose { width: 7rem; }
#storm .dose .bar { height: .9rem; }
#storm .dose .bar > i { background: linear-gradient(90deg, #f2c14e, #e0402a); }
#storm .src { font: 700 .56rem Nunito, sans-serif; color: var(--white); background: rgba(11, 31, 58, .82); border-radius: .5rem; padding: .08rem .4rem; letter-spacing: .01em; }

#basebar { left: 50%; bottom: .55rem; transform: translateX(-50%); display: flex; gap: .4rem; align-items: flex-end; }
.chip { position: relative; display: flex; align-items: center; gap: .2rem; height: 2.9rem; min-width: 2.9rem; padding: 0 .55rem; justify-content: center; background: var(--cream); border: 2px solid var(--ink); border-radius: .9rem; box-shadow: 0 .2rem 0 rgba(0, 0, 0, .45); font-size: .95rem; }
.chip .ic { width: 1.9rem; height: 1.9rem; }
.chip .cost { display: flex; align-items: center; font-size: .8rem; }
.chip .cost .ic { width: .95rem; height: .95rem; }
.chip .n { position: absolute; right: -.35rem; top: -.45rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .2rem; border-radius: .7rem; background: var(--blue); color: #fff; border: 2px solid var(--ink); font-size: .75rem; display: grid; place-items: center; }
.chip.on { background: var(--gold); }
.chip.hint { animation: hint 1s infinite; }
.chip.big { height: 3.4rem; min-width: 3.4rem; background: var(--gold); }
.chip.big .ic { width: 2.3rem; height: 2.3rem; }
.chip.danger { background: #ffb39a; }
.chip:disabled { opacity: .45; filter: grayscale(.6); }
@keyframes hint { 50% { box-shadow: 0 0 0 .35rem rgba(242, 193, 78, .7), 0 .2rem 0 rgba(0, 0, 0, .45); transform: scale(1.06); } }

#actions { right: calc(.7rem + env(safe-area-inset-right)); bottom: .6rem; display: flex; align-items: flex-end; gap: .45rem; }
.ab { border-radius: 50%; border: 2.5px solid var(--ink); background: var(--cream); display: grid; place-items: center; box-shadow: 0 .22rem 0 rgba(0, 0, 0, .45); opacity: .96; }
.ab.small { width: 2.9rem; height: 2.9rem; }
.ab.small .ic { width: 1.6rem; height: 1.6rem; }
.ab.big { width: 4.5rem; height: 4.5rem; background: var(--gold); }
.ab.big .ic { width: 2.7rem; height: 2.7rem; }
.ab.dim { opacity: .45; }
.ab.hint { animation: hint 1s infinite; }
#stick { width: 0; height: 0; pointer-events: none !important; }
#stick::before { content: ''; position: absolute; left: -3rem; top: -3rem; width: 6rem; height: 6rem; border-radius: 50%; background: rgba(244, 235, 208, .25); border: 2px solid rgba(244, 235, 208, .7); }
#stick i { position: absolute; left: -1.4rem; top: -1.4rem; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: rgba(244, 235, 208, .85); border: 2px solid var(--ink); }
#toast { position: absolute; left: 50%; top: 5.2rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .25rem; pointer-events: none !important; z-index: 48; } /* in front of the Fabricator and the other panels; outside #hud, so rooms show toasts too */
.toast { display: flex; align-items: center; gap: .25rem; padding: .25rem .6rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 1rem; font-size: 1rem; animation: toast 2.2s forwards; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); }
.toast .ic { width: 1.4rem; height: 1.4rem; }
.toast.bad { background: #ffc2b8; }
@keyframes toast { 0% { transform: translateY(.6rem) scale(.8); opacity: 0; } 10% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-.5rem); } }

/* Help mode: every explained thing grows a "?" badge. */
#app.help [data-tip] { outline: 2px dashed var(--blue); outline-offset: 2px; cursor: help; }
#app.help [data-tip]::after { content: '?'; position: absolute; right: -.45rem; bottom: -.5rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--blue); color: #fff; border: 2px solid var(--ink); font: 700 .78rem Fredoka, sans-serif; display: grid; place-items: center; z-index: 5; }
#app.help [data-tip] { position: relative; }
#app.help #hud > [data-tip], #app.help #actions > [data-tip] { position: relative; }
#app.help #btn-help { background: var(--gold); color: var(--ink); }
#tip { position: absolute; z-index: 90; max-width: min(24rem, 86vw); padding: .6rem .8rem .65rem; background: var(--white); border: 2.5px solid var(--ink); border-radius: 1rem; box-shadow: 0 .3rem 0 rgba(0, 0, 0, .5); font: 700 .92rem/1.35 Nunito, sans-serif; white-space: pre-line; user-select: text; max-height: 82vh; overflow: auto; }
#tip .src { display: block; margin-top: .4rem; font-weight: 700; font-size: .72rem; line-height: 1.3; color: #4a4a4a; overflow-wrap: anywhere; }
#tip h4 { margin: .5rem 0 .1rem; font: 700 .8rem Fredoka, sans-serif; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; }
#tip h4:first-child { margin-top: 0; }

/* ---------- screens and modals ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem; background: radial-gradient(120% 90% at 50% 110%, #7b7568 0 24%, #2a3350 25%, #0B1F3A 55%, #05070F 100%); z-index: 40; }
.logo { font: 700 3.4rem/1 Fredoka, sans-serif; color: var(--white); letter-spacing: .02em; text-shadow: 0 .25rem 0 var(--blue), 0 .5rem 0 rgba(0, 0, 0, .4); display: flex; align-items: center; gap: .7rem; }
.logo .ic { width: 4rem; height: 4rem; }
.logo img.mark { height: 6.2rem; width: auto; }
.missions { display: flex; gap: 1rem; }
.mcard { cursor: pointer; position: relative; width: 8.2rem; height: 8.6rem; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.4rem; box-shadow: 0 .4rem 0 rgba(0, 0, 0, .5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; }
.mcard:active { transform: translateY(.25rem); box-shadow: 0 .1rem 0 rgba(0, 0, 0, .5); }
.mcard .ic { width: 3.6rem; height: 3.6rem; }
.mcard .no { position: absolute; left: -.6rem; top: -.6rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue); color: #fff; border: 2.5px solid var(--ink); font: 700 1.15rem Fredoka, sans-serif; display: grid; place-items: center; }
.mcard .won { position: absolute; right: -.5rem; top: -.8rem; display: flex; padding: .1rem .3rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 1rem; }
.mcard .won .ic { width: 1.35rem; height: 1.35rem; }
/* A grade's stars: the earned ones as they are, the missed ones as pale outlines. */
.gs { display: inline-flex; font-style: normal; }
.gs:not(.on) .ic { filter: grayscale(1) brightness(1.5); opacity: .32; }
.grade { display: flex; align-items: center; gap: .1rem; margin-left: auto; flex: none; }
.grade .ic { width: 2.6rem; height: 2.6rem; }
.grade .q.mini { margin-left: .25rem; align-self: flex-start; }
.mcard .won { cursor: pointer; }
.mcard .won .ic { pointer-events: none; }
.grade .gs.on { animation: gstar .45s cubic-bezier(.3, 1.8, .6, 1) calc(.25s + var(--i) * .22s) backwards; }
@keyframes gstar { from { transform: scale(0) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.mcard .q.mini { position: absolute; right: .35rem; bottom: .35rem; }
.mcard .go { display: flex; }
.mcard .go .ic { width: 1.3rem; height: 1.3rem; }
.mcard .go .ic path { fill: var(--green); }
.mcard .seq { display: flex; gap: .1rem; }
.mcard .seq .ic { width: 1rem; height: 1rem; }
.screen .corner { position: absolute; right: 1rem; top: 1rem; display: flex; gap: .4rem; }
.screen .keys { position: absolute; bottom: .9rem; display: flex; gap: .9rem; align-items: center; color: var(--white); opacity: .8; font-size: .8rem; }
.kbd { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .3rem; border: 2px solid var(--white); border-radius: .35rem; font: 700 .72rem Nunito, sans-serif; }
.keys span { display: flex; align-items: center; gap: .2rem; }
.keys .ic { width: 1.2rem; height: 1.2rem; }

.modal { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 7, 15, .5); z-index: 45; padding: .5rem; }
.panel { position: relative; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.4rem; box-shadow: 0 .45rem 0 rgba(0, 0, 0, .5); padding: .7rem .9rem .8rem; max-width: 96vw; max-height: 96vh; }
.panel .head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .45rem; }
.panel .head .left, .panel .head .right { display: flex; align-items: center; gap: .4rem; }
.go-btn { height: 3rem; min-width: 5.5rem; padding: 0 1.2rem; border-radius: 1.5rem; background: var(--green); border: 2.5px solid var(--ink); box-shadow: 0 .25rem 0 rgba(0, 0, 0, .5); display: grid; place-items: center; }
.go-btn .ic { width: 1.8rem; height: 1.8rem; }
.go-btn:active { transform: translateY(.15rem); box-shadow: 0 .08rem 0 rgba(0, 0, 0, .5); }
.go-btn.alt { background: var(--cream); min-width: 3rem; padding: 0 .8rem; }
.go-btn.alt .ic path { stroke: var(--ink); }
.go-btn.hint, .rb.hint { animation: hint 1s infinite; }

/* briefing */
#brief .rows { display: grid; gap: .32rem; }
.row { display: grid; grid-template-columns: 2rem auto 1.6rem 8.4rem 1.4rem; align-items: center; gap: .5rem; padding: .18rem .45rem .18rem .3rem; border-radius: .9rem; border: 2px solid transparent; }
.row.sel { border-color: var(--blue); background: rgba(47, 111, 237, .09); }
.row.locked { opacity: .45; }
.row > .ic { width: 1.9rem; height: 1.9rem; }
.segs { display: flex; gap: .16rem; touch-action: none; }
.segs i { width: 1.22rem; height: 1.75rem; border-radius: .38rem; border: 2px solid var(--ink); background: #e3d8ba; }
.segs i.on { background: var(--c); }
.segs i.off { opacity: .28; }
.segs.fixed i.on { background: var(--red); }
.row .val { font: 700 1.25rem Fredoka, sans-serif; text-align: center; }
.row .fc { display: flex; align-items: center; gap: .3rem; }
.row .fc .bar { height: .95rem; }
.row .fc .num { font-size: .92rem; min-width: 1.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.row .fc .num.down { color: var(--red); }
.row .fc .num.up { color: #1f7a2e; }
.row .fc .bar b.need { background: var(--navy); width: 3px; }
#brief .foot { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; gap: .8rem; }
.sparebox { display: flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border: 2px dashed var(--ink); border-radius: 1rem; font: 700 1.15rem Fredoka, sans-serif; position: relative; }
.sparebox .ic { width: 1.3rem; height: 1.3rem; }
.sparebox .uses { display: flex; gap: .1rem; opacity: .7; }
.sparebox .uses .ic { width: 1.1rem; height: 1.1rem; }
.sparebox.over { background: #ffc2b8; }
.tl { display: flex; align-items: center; gap: .2rem; }
.tl .d { position: relative; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; opacity: .4; }
.tl .d .ic { width: 1.4rem; height: 1.4rem; }
.tl .d.now { opacity: 1; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.tl .d.done { filter: grayscale(1); opacity: .6; }
.tl .d .mark { position: absolute; right: -.35rem; top: -.5rem; }
.tl .d .mark .ic { width: 1rem; height: 1rem; }
.tl .arrow .ic { width: 1rem; height: 1rem; opacity: .6; }
.tl .goal .ic { width: 1.6rem; height: 1.6rem; }
.autob { display: flex; align-items: center; gap: .2rem; height: 2.4rem; padding: 0 .7rem; border-radius: 1.2rem; border: 2px solid var(--ink); background: var(--cream); }
.autob.on { background: var(--gold); }
.autob .ic { width: 1.4rem; height: 1.4rem; }

/* fabricator */
#fab .panel { width: min(46rem, 96vw); }
#fab .body { display: grid; grid-template-columns: 10.2rem 1fr; gap: .7rem; }
.inv { display: grid; grid-template-columns: repeat(3, 1fr); gap: .28rem; align-content: start; }
.cell { position: relative; height: 3rem; background: #fff8e4; border: 2px solid var(--ink); border-radius: .7rem; display: grid; place-items: center; }
.cell .ic { width: 1.7rem; height: 1.7rem; }
.cell .n { position: absolute; right: .12rem; bottom: 0; font-size: .82rem; font-variant-numeric: tabular-nums; }
.cell.zero { opacity: .32; }
.cell.pour { background: #c8ecff; }
.cell.pour::after { content: ''; position: absolute; inset: -4px; border-radius: .8rem; border: 2px dashed var(--blue); animation: spin 6s linear infinite; }
.cell .pourb { position: absolute; left: -.3rem; top: -.4rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--ls); border: 2px solid var(--ink); display: grid; place-items: center; }
.cell .pourb .ic { width: .8rem; height: .8rem; }
.cell.pop { animation: pop .45s; }
@keyframes pop { 40% { transform: scale(1.3); background: var(--gold); } }
.recipes { display: grid; grid-template-columns: 1fr 1fr; gap: .32rem; }
.fabnote { display: flex; align-items: center; justify-content: center; gap: .3rem; margin-top: .4rem; padding: .3rem .6rem; background: #ffc2b8; border: 2px solid var(--ink); border-radius: .8rem; font-size: .95rem; }
.fabnote .ic { width: 1.3rem; height: 1.3rem; flex: none; }
.rcard { cursor: pointer; position: relative; display: flex; align-items: center; gap: .22rem; min-height: 2.75rem; padding: .2rem 1.5rem .2rem .4rem; background: #fff8e4; border: 2px solid var(--ink); border-radius: .8rem; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .4); font-size: .85rem; text-align: left; }
.rcard .ic { width: 1.45rem; height: 1.45rem; }
.rcard .in { display: flex; align-items: center; }
.rcard .in.miss { color: var(--red); }
.rcard .in.miss .ic { opacity: .45; }
.rcard .arrow .ic { width: 1rem; height: 1rem; }
.rcard .out .ic { width: 1.9rem; height: 1.9rem; }
.rcard .sep { flex: 1; }
.rcard.no { opacity: .62; box-shadow: none; }
.rcard.busy { background: #ffd9a0; animation: glow .5s infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 1rem .2rem rgba(242, 139, 48, .9); background: #ffbf6b; } }
.rcard .q.mini { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); }
.rcard:active:not(.no) { transform: translateY(.1rem); box-shadow: none; }
.pw { display: flex; align-items: center; gap: .2rem; font: 700 1.1rem Fredoka, sans-serif; padding: .1rem .6rem .1rem .3rem; border: 2px solid var(--ink); border-radius: 1rem; background: #fff8e4; }
.pw .ic { width: 1.3rem; height: 1.3rem; }
.pw small { font-size: .8rem; opacity: .7; }
.fabprog { height: .7rem; margin-top: .45rem; }
.fabprog.bar > i { background: var(--amber); transition: width .2s linear; }

/* debrief */
#debrief .panel { width: min(40rem, 96vw); }
#debrief .top { display: flex; align-items: center; gap: .7rem; }
.verdict { width: 4.2rem; height: 4.2rem; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; flex: none; background: var(--gold); }
.verdict.fail { background: #ffb39a; }
.verdict .ic { width: 2.8rem; height: 2.8rem; }
.keyd { display: flex; align-items: center; gap: .3rem; padding: .25rem .7rem; border: 2px solid var(--ink); border-radius: 1.2rem; background: #fff8e4; }
.keyd .ic { width: 2rem; height: 2rem; }
.keyd .kmark { width: .8rem; height: .8rem; margin: 0 .25rem 0 .1rem; background: var(--gold); border: 2px solid var(--ink); transform: rotate(45deg); flex: none; } /* the key choice's mark, as on the graph */
.badge { position: relative; width: 4.2rem; height: 4.2rem; margin-left: auto; transform: rotate(8deg); animation: badge .6s .4s backwards; }
.badge > .ic { width: 4.2rem; height: 4.2rem; }
.badge .in { position: absolute; inset: 1.2rem; }
.badge .in .ic { width: 1.8rem; height: 1.8rem; }
@keyframes badge { 0% { transform: scale(3) rotate(-30deg); opacity: 0; } }
#debrief canvas { width: 100%; height: 9.2rem; display: block; margin: .4rem 0 .3rem; background: #fff8e4; border: 2px solid var(--ink); border-radius: .8rem; }
#debrief .legend { display: flex; gap: .7rem; align-items: center; justify-content: center; font-size: .8rem; }
#debrief .legend span { display: flex; align-items: center; gap: .15rem; }
#debrief .legend .ic { width: 1.05rem; height: 1.05rem; }
#debrief .legend i { width: 1.1rem; height: .28rem; border-radius: .2rem; display: inline-block; }
#debrief .foot { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: .5rem; }
.datasrc { font: 700 .6rem Nunito, sans-serif; color: #4a4a4a; text-align: center; margin-top: .25rem; }
#pause .panel { display: flex; gap: .8rem; padding: 1rem 1.2rem; }

@media (max-height: 420px) { .panel { padding: .5rem .7rem .55rem; } }
@media (pointer: fine) { #actions .ab.small, #actions .ab.big { transform: scale(.82); transform-origin: bottom right; } }

/* how to play */
#tutorial { z-index: 50; background: rgba(5, 7, 15, .72); }
.tut { width: min(31rem, 94vw); }
.tut .dots { display: flex; gap: .35rem; }
.tut .dots i { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font: 700 .95rem Fredoka, sans-serif; background: #e3d8ba; color: #6b6452; }
.tut .dots i.on { background: var(--blue); color: #fff; }
.tut .pics { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .3rem; padding: .7rem .4rem; background: #fff8e4; border: 2px solid var(--ink); border-radius: 1rem; }
.tut .pics .ic { width: 2.7rem; height: 2.7rem; }
.tut .pics .ic.sm { width: 1.2rem; height: 1.2rem; opacity: .6; }
.tut p { margin: .6rem .2rem .2rem; font: 700 1rem/1.4 Nunito, sans-serif; min-height: 5.6rem; }
.tut .foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .4rem; }
.tut .foot .back .ic { transform: scaleX(-1); }
.tut .foot .mid { display: flex; align-items: center; gap: .4rem; }

/* tall screens (a phone held upright, a narrow pane) */
@media (orientation: portrait) {
  html { font-size: clamp(11px, 3.1vw, 20px); }
  #meters { grid-template-columns: repeat(2, 1fr); right: calc(.6rem + env(safe-area-inset-right)); }
  #topright { top: 5.1rem; }
  #suit { top: 7.9rem; }
  #storm { top: 10.3rem; }
  #toast { top: 13rem; }
  .logo { font-size: 2.6rem; }
  .logo img.mark { height: 4.6rem; }
  .missions { gap: .7rem; }
  .row { grid-template-columns: 1.8rem auto 1.3rem 5.2rem 1.4rem; gap: .3rem; padding-left: .15rem; padding-right: .2rem; }
  .segs i { width: 1.05rem; }
  #fab .body { grid-template-columns: 1fr; }
  .inv { grid-template-columns: repeat(6, 1fr); }
  .recipes { grid-template-columns: 1fr; }
  .screen .keys { display: none; }
}
@media (pointer: coarse) { .screen .keys { display: none; } }

/* basic text labels */
.meter { align-items: center; padding: .14rem .5rem .18rem .3rem; min-width: 8.2rem; }
.mcol { display: flex; flex-direction: column; flex: 1; gap: .04rem; }
.mcol .lab, .gauge .lab, .dose .lab { font: 800 .6rem/1 Nunito, sans-serif; letter-spacing: .02em; color: #4a4536; display: flex; align-items: center; gap: .15rem; text-transform: uppercase; }
.mrow { display: flex; align-items: center; gap: .3rem; }
.meter .lockic .ic { width: .7rem; height: .7rem; }
#suit { top: 3.35rem; }
#storm { top: 3.35rem; }
.dlab { font: 700 .82rem Fredoka, sans-serif; margin-right: .25rem; white-space: nowrap; }
#storm .scol { display: flex; flex-direction: column; gap: .12rem; }
#storm .stxt { font: 700 .86rem Fredoka, sans-serif; white-space: nowrap; }
#storm .dose { display: flex; align-items: center; gap: .3rem; width: auto; }
#storm .dose .bar { width: 6rem; flex: none; }
#storm .card .ic { width: 2rem; height: 2rem; }
.chip { flex-direction: column; gap: 0; height: 3.3rem; padding: .1rem .6rem; }
.chip .ic { width: 1.7rem; height: 1.7rem; }
.chip .cl { font: 800 .62rem/1.1 Nunito, sans-serif; white-space: nowrap; }
.chip.big { height: 3.7rem; min-width: 4.2rem; }
.chip.big .ic { width: 2.1rem; height: 2.1rem; }
.chip.wide { flex-direction: row; gap: .35rem; }
.chip.wide .cl { font-size: .78rem; }
.chip .cost { font-size: .68rem; }
.mcard { height: 9.6rem; width: 8.8rem; }
.mname { font: 700 .88rem/1.1 Fredoka, sans-serif; text-align: center; }
.howto { display: flex; align-items: center; gap: .45rem; padding: .25rem .9rem .25rem .3rem; border-radius: 1.5rem; background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); font: 700 .95rem Fredoka, sans-serif; }
.howto .rb { width: 1.8rem; height: 1.8rem; box-shadow: none; font-size: 1rem; }
.btitle { font: 700 1.12rem/1.15 Fredoka, sans-serif; margin-bottom: .3rem; display: flex; flex-direction: column; }
.btitle small { font: 700 .74rem/1.2 Nunito, sans-serif; color: #4a4536; }
.rcol { display: flex; flex-direction: column; gap: .1rem; }
.rlab { font: 800 .66rem/1 Nunito, sans-serif; color: #4a4536; }
.row { padding-top: .12rem; padding-bottom: .12rem; }
.segs i { height: 1.4rem; }
.fch { font: 800 .62rem Nunito, sans-serif; color: #4a4536; text-transform: uppercase; }
.slab { font: 700 .72rem Nunito, sans-serif; }
.autob { font: 700 .8rem Fredoka, sans-serif; gap: .35rem; }
.go-btn.txt { display: flex; align-items: center; gap: .4rem; font: 700 1rem Fredoka, sans-serif; color: #fff; padding: 0 1rem; min-width: 0; height: 2.8rem; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.go-btn.alt.txt { color: var(--ink); text-shadow: none; }
.go-btn.txt .ic { width: 1.35rem; height: 1.35rem; }
.ptitle { font: 700 1.15rem Fredoka, sans-serif; }
.pw { font-size: .82rem; }
.rcard { flex-wrap: wrap; padding-top: .9rem; min-height: 3.1rem; }
.rname { position: absolute; left: .45rem; top: .12rem; font: 800 .66rem/1 Nunito, sans-serif; color: #4a4536; }
.dtxt { display: flex; flex-direction: column; gap: .15rem; flex: 1; font: 700 .76rem/1.25 Nunito, sans-serif; }
.dtxt b { font: 700 1.08rem/1.1 Fredoka, sans-serif; }
.dtxt .tip { color: #1f4fa8; }
.dtxt .tip i { font-style: normal; font-weight: 900; }
#debrief .panel { width: min(44rem, 96vw); }
#debrief canvas { height: 7.4rem; }
#debrief .legend { font: 700 .68rem Nunito, sans-serif; gap: .6rem; }
.verdict { width: 3.4rem; height: 3.4rem; }
.verdict .ic { width: 2.2rem; height: 2.2rem; }
.badge { width: 3.4rem; height: 3.4rem; }
.badge > .ic { width: 3.4rem; height: 3.4rem; }
.badge .in { inset: .95rem; }
.badge .in .ic { width: 1.5rem; height: 1.5rem; }
#pause .panel { flex-wrap: wrap; justify-content: center; max-width: 30rem; }
.toast { font: 700 .86rem Nunito, sans-serif; max-width: 88vw; }

/* tall screens again, after the label rules above */
@media (orientation: portrait) {
  #topright { top: 5.6rem; }
  #suit { top: 8.5rem; flex-wrap: wrap; right: .6rem; }
  #storm { top: 11rem; }
  #toast { top: 14.5rem; }
  .mcard { width: 7.6rem; }
  #debrief .top { flex-wrap: wrap; }
}

/* flow: title, character select, missions, lobby */
.screen { gap: .7rem; padding: .6rem 1rem; }
.lineup { height: 8.6rem; width: auto; margin-top: -.6rem; filter: drop-shadow(0 .3rem 0 rgba(0, 0, 0, .35)); pointer-events: none; }
.logo img.mark { height: 5.2rem; }
.modes { display: flex; gap: .9rem; }
.modeb { display: flex; align-items: center; gap: .4rem; height: 3.4rem; padding: 0 1.3rem; border-radius: 1.7rem; background: var(--cream); border: 3px solid var(--ink); box-shadow: 0 .3rem 0 rgba(0, 0, 0, .5); font: 700 1.2rem Fredoka, sans-serif; }
.modeb.primary { background: var(--green); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); height: 3.8rem; font-size: 1.4rem; }
.modeb .ic { width: 1.8rem; height: 1.8rem; }
.modeb .ic + .ic { margin-left: -1rem; }
.modeb.primary .ic:last-child { margin-left: .2rem; width: 1.4rem; height: 1.4rem; }
.modeb:active { transform: translateY(.2rem); box-shadow: 0 .08rem 0 rgba(0, 0, 0, .5); }
.modeb.closed { opacity: .5; filter: grayscale(.7); cursor: default; }
.modeb.closed:active { transform: none; box-shadow: 0 .3rem 0 rgba(0, 0, 0, .5); }
.roomsclosed { margin: 0; padding: .25rem .8rem; border-radius: 1rem; background: rgba(5, 7, 15, .55); color: var(--cream); font: 700 .85rem Nunito, sans-serif; text-align: center; }
/* title: the comic cover behind the logo and the buttons (Igor, 15 Nov: logo top-centre, bigger; the crew is in the art,
   so the line-up is hidden). The buttons hang at the bottom (margin-top: auto), also when the rooms-closed line shows.
   The art sits at 25% across, so a 4:3 tablet keeps all four kids and the robot; upright it centres on the boy with the laser. */
#title { background: radial-gradient(46% 34% at 50% 16%, rgba(5,7,15,.45), rgba(5,7,15,0) 100%), linear-gradient(180deg, rgba(5,7,15,0) 58%, rgba(5,7,15,.62) 100%), url('assets/art/cover.webp') 25% 42% / cover no-repeat, #0B1F3A; justify-content: flex-start; padding: .5rem 1rem 1.2rem; }
#title .lineup { display: none; }
#title .logo img.mark { height: 7.4rem; filter: drop-shadow(0 .3rem 0 rgba(0,0,0,.35)); }
#title .modes { margin-top: auto; }
@media (orientation: portrait) {
  #title { background-position: center, center, 30% 42%, center; padding-top: 4rem; }
  #title .logo img.mark { height: 5.6rem; }
}
.shead { display: flex; align-items: center; gap: .6rem; width: min(52rem, 100%); color: var(--white); font: 700 1.25rem Fredoka, sans-serif; }
.shead .back .ic { transform: scaleX(-1); }
.shead .go-btn { height: 2.4rem; }
.modechip { margin-left: auto; display: flex; align-items: center; gap: .25rem; padding: .15rem .7rem; border-radius: 1rem; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); font-size: .9rem; }
.modechip .ic { width: 1.2rem; height: 1.2rem; }
.modechip .ic + .ic { margin-left: -.7rem; }
.cbody { display: grid; grid-template-columns: auto 1fr; gap: .8rem; width: min(52rem, 100%); flex: 1; min-height: 0; }
.kcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; align-content: center; }
.kcard { position: relative; width: 6.6rem; height: 6.6rem; border-radius: 1.3rem; background: var(--cream); border: 3px solid var(--ink); box-shadow: 0 .25rem 0 rgba(0, 0, 0, .5); display: grid; place-items: center; }
.kcard img { width: 5.6rem; height: 5.6rem; object-fit: contain; pointer-events: none; }
.kcard.on { background: var(--gold); transform: translateY(-.15rem); box-shadow: 0 .4rem 0 rgba(0, 0, 0, .5), 0 0 0 .25rem rgba(242, 193, 78, .5); }
.kcard .pick { position: absolute; right: -.5rem; top: -.5rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); display: grid; place-items: center; }
.kcard .pick .ic { width: 1.1rem; height: 1.1rem; }
.stage { display: flex; flex-direction: column; gap: .4rem; min-width: 0; min-height: 0; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.3rem; padding: .5rem; box-shadow: 0 .3rem 0 rgba(0, 0, 0, .5); }
#crewcv { flex: 1; width: 100%; min-height: 6rem; border-radius: .9rem; border: 2px solid var(--ink); background: #05070F; display: block; }
.mvrow { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.mvlab { font: 800 .66rem Nunito, sans-serif; text-transform: uppercase; color: #4a4536; margin-right: .2rem; }
.mvb { padding: .22rem .6rem; border-radius: .8rem; background: #fff8e4; border: 2px solid var(--ink); font: 700 .8rem Fredoka, sans-serif; }
.mvb.on { background: var(--blue); color: #fff; }
.sfoot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: min(52rem, 100%); }
.callsign { display: flex; align-items: center; gap: .4rem; padding: .2rem .5rem .2rem .4rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 1.4rem; font: 700 1.05rem Fredoka, sans-serif; }
.callsign .ic { width: 1.5rem; height: 1.5rem; }
.callsign .cslab { font: 800 .62rem Nunito, sans-serif; text-transform: uppercase; color: #4a4536; }
.callsign .rb { width: 1.8rem; height: 1.8rem; box-shadow: none; }
.callsign .rb .ic { width: 1rem; height: 1rem; }
.lbody { position: relative; width: min(52rem, 100%); flex: 1; min-height: 0; display: grid; }
#lobbyframe { width: 100%; height: 100%; border: 3px solid var(--ink); border-radius: 1.3rem; background: var(--navy); }
.offline { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.3rem; padding: .8rem; box-shadow: 0 .3rem 0 rgba(0, 0, 0, .5); }
.offline p { margin: 0; max-width: 34rem; text-align: center; font: 700 .86rem/1.35 Nunito, sans-serif; }
.seats { display: flex; gap: .6rem; }
.seat { position: relative; width: 6.4rem; height: 7.4rem; border-radius: 1.1rem; border: 2.5px solid var(--ink); background: #fff8e4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; font: 700 .8rem Fredoka, sans-serif; }
.seat img, .seat > .ic { width: 4.4rem; height: 4.4rem; object-fit: contain; }
.seat.empty { border-style: dashed; opacity: .55; }
.seat.empty > .ic { filter: grayscale(1); }
.seat .tag { position: absolute; top: -.5rem; left: -.5rem; padding: 0 .45rem; border-radius: .7rem; background: var(--blue); color: #fff; border: 2px solid var(--ink); font-size: .7rem; }
.go-btn:disabled { background: #b9b2a7; opacity: .7; cursor: not-allowed; }
#missions .keys { position: static; }
@media (orientation: portrait) {
  .cbody { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .kcards { grid-template-columns: repeat(4, 1fr); justify-items: center; }
  .kcard { width: 5.4rem; height: 5.4rem; }
  .kcard img { width: 4.6rem; height: 4.6rem; }
  .modes { flex-direction: column; align-items: center; }
  .seats { flex-wrap: wrap; justify-content: center; }
  .sfoot { flex-wrap: wrap; justify-content: center; }
}
.howto { color: var(--ink); }

/* town: crew level and door prompts */
#lvl { display: flex; align-items: center; gap: .25rem; padding: .2rem .5rem .2rem .3rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 1rem; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); font: 700 .85rem Fredoka, sans-serif; white-space: nowrap; }
#lvl .ic { width: 1.15rem; height: 1.15rem; }
#lvl i { width: 2.2rem; height: .5rem; border: 1.5px solid var(--ink); border-radius: .3rem; background: #d9ceb0; overflow: hidden; display: block; }
#lvl i b { display: block; height: 100%; background: var(--gold); }
.doorchip { height: 2.9rem; gap: .4rem; }
.doorchip .ic { width: 1.6rem; height: 1.6rem; }
.doorchip .cl { font-size: .82rem; }
.doorchip .need { display: flex; align-items: center; gap: .1rem; padding: .05rem .4rem .05rem .2rem; border-radius: .7rem; border: 2px solid var(--ink); background: #ffc2b8; font: 700 .78rem Fredoka, sans-serif; }
.doorchip .need.ok { background: #bfe8c4; }
.doorchip .need .ic { width: 1.1rem; height: 1.1rem; }
.doorchip .q.mini { pointer-events: none; }
.lvchip { margin-left: 0; }
.dtxt .tip .ic { display: inline-block; width: .9rem; height: .9rem; vertical-align: -.1rem; }
#lvl { box-shadow: none; padding: .16rem .45rem .16rem .25rem; border-radius: .9rem; background: rgba(244, 235, 208, .94); }

/* Moonwalk / Mission */
.modecards { display: flex; gap: 1.2rem; align-items: stretch; }
.modecard { position: relative; width: 17rem; padding: .9rem 1rem 1rem; background: var(--cream); border: 3px solid var(--ink); border-radius: 1.5rem; box-shadow: 0 .4rem 0 rgba(0, 0, 0, .5); display: flex; flex-direction: column; align-items: center; gap: .25rem; cursor: pointer; text-align: center; }
.modecard.main { background: #fff3c9; border-color: var(--ink); box-shadow: 0 .4rem 0 rgba(0, 0, 0, .5), 0 0 0 .3rem var(--gold); }
.modecard:active { transform: translateY(.25rem); }
.modecard b { font: 700 1.6rem Fredoka, sans-serif; }
.modecard .msub { font: 800 .7rem Nunito, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: #4a4536; }
.modecard .mtip { font: 700 .8rem/1.3 Nunito, sans-serif; margin-top: .2rem; }
.mpics { display: flex; align-items: flex-end; justify-content: center; gap: .25rem; height: 5.2rem; }
.mpics > .ic { width: 1.9rem; height: 1.9rem; }
.bigpic { position: relative; margin-right: .5rem; }
.bigpic > .ic { width: 4.8rem; height: 4.8rem; }
.bigpic .over { position: absolute; right: -1.1rem; top: -.7rem; }
.bigpic .over .ic { width: 2.6rem; height: 2.6rem; }
.modecard .q.mini { position: absolute; right: .5rem; top: .5rem; }
/* Moonwalk hides everything that belongs to the survival game */
#app.free #meters, #app.free #days, #app.free #btn-ff, #app.free #g-air, #app.free #storm { display: none !important; }
#app.free #suit { top: .5rem; }
#app.free #fab .pwr, #app.free #fab .pw { display: none; }
@media (orientation: portrait) { .modecards { flex-direction: column; align-items: center; } .modecard { width: min(20rem, 90vw); } .mpics { height: 4rem; } .bigpic > .ic { width: 3.6rem; height: 3.6rem; } }
@media (max-height: 420px) { .modecard { padding: .5rem .9rem .6rem; } .mpics { height: 4.2rem; } .bigpic > .ic { width: 3.8rem; height: 3.8rem; } }
/* The painted mode pictures (art 9bf3b55) carry more detail than the line icons: they get a taller row, at every size. */
.mpics:has(.bigpic > img) { height: 6rem; }
.bigpic > img.ic { width: 6rem; height: 6rem; display: block; }

/* ---- building slots in the top bar (mockups 11-13) ---- */
#slots { top: .45rem; left: calc(.6rem + env(safe-area-inset-left)); display: flex; gap: .4rem; align-items: center; }
.slot { position: relative; display: flex; align-items: center; gap: .25rem; height: 2.5rem; padding: 0 .65rem 0 0; background: var(--cream); border: 2px solid var(--ink); border-radius: 1.3rem; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); font: 700 .92rem Fredoka, sans-serif; font-variant-numeric: tabular-nums; }
.slot b.ok, .slot .lvneed.ok { color: #1f7a2e; }
.sbadge { width: 2.5rem; height: 2.5rem; margin: -2px .1rem -2px -2px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--f, 0) * 1turn), #cfc6ad 0); border: 2px solid var(--ink); overflow: hidden; position: relative; }
.sbadge img { width: 2.6rem; height: 2.6rem; object-fit: contain; border-radius: 50%; background: #F4EBD0; box-shadow: 0 0 0 2px var(--ink); transform: scale(.82); }
.slot.target { background: #fff3c9; }
.slot.target .sbadge { box-shadow: 0 0 0 .18rem var(--gold), 0 0 0 .3rem var(--ink); }
.slot.pop .sbadge { animation: pop .4s; }
.slot.done { padding: 0 .8rem 0 .5rem; gap: .35rem; }
.slot.done .ic { width: 1.4rem; height: 1.4rem; }
.lvneed { display: flex; align-items: center; gap: .05rem; margin-left: .25rem; }
.lvneed .ic { width: 1rem; height: 1rem; }
.res { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; background: #EADFC8; }
.res .ic { width: 1.05rem; height: 1.05rem; }
.res.r-regolith { background: #EADFC8; } .res.r-ore { background: #C9D0DC; } .res.r-ice { background: #BDEBFF; }
.flyer { position: fixed; left: 0; top: 0; width: 1.9rem; height: 1.9rem; z-index: 70; pointer-events: none; box-shadow: 0 .15rem 0 rgba(0, 0, 0, .35); }
.flyer .ic { width: 1.4rem; height: 1.4rem; }
.plus1 { position: fixed; z-index: 70; pointer-events: none; padding: 0 .4rem; border-radius: .7rem; background: #fff; border: 2px solid var(--blue); color: var(--blue); font: 700 .8rem Fredoka, sans-serif; animation: plus1 .8s forwards; }
@keyframes plus1 { 0% { transform: translateY(-.3rem) scale(.6); opacity: 0; } 20% { transform: none; opacity: 1; } 100% { transform: translateY(.5rem); opacity: 0; } }
#btn-map.pop { animation: pop .4s; }
/* second row: the mission's four meters, small, then the suit */
#row2 { top: 3.25rem; left: calc(.6rem + env(safe-area-inset-left)); display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; max-width: calc(100vw - 15rem); }
#row2 > * { position: static !important; }
#meters { display: flex; gap: .25rem; }
.meter { min-width: 0; padding: .1rem .4rem .1rem .2rem; box-shadow: none; border-radius: .9rem; }
.meter .ic { width: 1.2rem; height: 1.2rem; }
.meter .mcol .lab { display: none; }
.meter .bar { min-width: 0; width: 2rem; height: .6rem; }
.meter .num { font-size: .82rem; min-width: 1.2rem; }
.meter .spare { font-size: .68rem; }
#suit { display: flex; gap: .3rem; }
#app.free #row2 #meters { display: none !important; }
/* base map: the whole base at a glance (mockup 19) */
#townmap { padding: .4rem; background: rgba(5, 7, 15, .72); }
.mapp { width: min(100%, 64rem); height: min(100%, 30rem); max-width: none; max-height: none; display: flex; flex-direction: column; gap: .45rem; background: var(--navy); border-radius: 1.7rem; padding: .7rem .9rem .5rem; }
.mtop { position: absolute; right: .5rem; top: .45rem; display: flex; gap: .4rem; z-index: 4; }
.mtop .rb { width: 2.4rem; height: 2.4rem; font-size: 1.45rem; border-width: 2.5px; }
.mtop .rb .ic { width: 1.3rem; height: 1.3rem; }
.mground { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 1.1rem; padding: .2rem .5rem .45rem; overflow: hidden; background-color: #D8D0C2;
  background-image: radial-gradient(ellipse .9rem .5rem at 3% 8%, #C8BFB0 97%, transparent), radial-gradient(ellipse 1.1rem .6rem at 20.5% 30%, #C8BFB0 97%, transparent), radial-gradient(ellipse .7rem .4rem at 36% 52%, #C8BFB0 97%, transparent), radial-gradient(ellipse 1.2rem .7rem at 60.5% 72%, #C8BFB0 97%, transparent), radial-gradient(ellipse .8rem .45rem at 79% 93%, #C8BFB0 97%, transparent), radial-gradient(ellipse 1.2rem .7rem at 96% 14%, #C8BFB0 97%, transparent), radial-gradient(ellipse .7rem .4rem at 44% 60%, #C8BFB0 97%, transparent), radial-gradient(ellipse .8rem .45rem at 21% 96%, #C8BFB0 97%, transparent); }
.mground::before { content: ''; position: absolute; left: 50%; top: 16%; bottom: 13%; width: 1.1rem; transform: translateX(-50%); border-radius: .55rem; background: #ECE5D8; }
.mrow { position: relative; flex: 1; min-height: 0; display: flex; align-items: flex-end; }
.mrow.top::before { content: ''; position: absolute; left: 4.5%; right: 4.5%; bottom: .5rem; height: 1.1rem; border-radius: .55rem; background: #ECE5D8; }
.mb { position: relative; z-index: 1; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0; cursor: default; }
.mb.need { cursor: pointer; }
.mspr { position: relative; display: block; height: 5.6rem; }
.mspr-habitat { height: 6.6rem; } .mspr-recycler, .mspr-landing_pad { height: 5.9rem; } .mspr-storm_shelter { height: 5.2rem; }
.mspr img { position: relative; height: 100%; width: auto; display: block; pointer-events: none; filter: drop-shadow(0 .28rem .22rem rgba(110, 96, 78, .5)); }
.mring { position: absolute; left: 50%; top: 53%; height: 124%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: .2rem solid var(--gold); box-shadow: 0 0 0 1.5px var(--ink), inset 0 0 0 1.5px var(--ink); }
.mb.target .mring { border-width: .32rem; background: rgba(242, 193, 78, .3); }
.mlock { position: absolute; right: 0; bottom: 0; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.mlock .ic { width: .95rem; height: .95rem; }
.mund { position: relative; z-index: 2; height: 2.1rem; display: flex; align-items: center; justify-content: center; gap: .3rem; }
.mg { position: relative; display: flex; align-items: center; gap: .3rem; width: 8.4rem; height: 1.75rem; padding: 0 .45rem 0 2.2rem; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 1rem; cursor: pointer; --c: #4CBA5C; }
.mg.warning { --c: #F5AA1E; } .mg.critical { --c: #E6483C; }
.mgd { position: absolute; left: -.4rem; top: 50%; margin-top: -1.125rem; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--c); border: 2.5px solid var(--ink); display: grid; place-items: center; }
.mgd .ic { width: 1.35rem; height: 1.35rem; }
.mg.critical .mgd { animation: throb .7s infinite; }
.mg i { flex: 1; height: .65rem; border-radius: .35rem; background: #D6CEC0; overflow: hidden; display: block; }
.mg u { display: block; height: 100%; min-width: .65rem; border-radius: .35rem; background: var(--c); }
.mtr { flex: none; width: 0; height: 0; border-left: .42rem solid transparent; border-right: .42rem solid transparent; border-top: .64rem solid #E6483C; visibility: hidden; }
.mtr.down { visibility: visible; }
.mtr.up { visibility: visible; border-top: 0; border-bottom: .64rem solid #4CBA5C; }
.mok { position: relative; width: 2rem; height: 2rem; border-radius: 50%; background: var(--cream); border: 2.5px solid var(--ink); display: grid; place-items: center; }
.mok > .ic { width: 1.3rem; height: 1.3rem; }
.mok b { position: absolute; right: -.45rem; bottom: -.3rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #4CBA5C; border: 2px solid var(--ink); display: grid; place-items: center; }
.mok b svg { width: .75rem; height: .75rem; display: block; }
.mchip { display: flex; align-items: center; gap: .2rem; padding: 0 .5rem 0 .15rem; height: 1.55rem; border-radius: .8rem; background: var(--cream); border: 2.5px solid var(--ink); font: 700 .92rem Fredoka, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mchip .res { width: 1.15rem; height: 1.15rem; border-width: 1px; } .mchip .res .ic { width: .9rem; height: .9rem; }
.mchip > .ic { width: 1rem; height: 1rem; margin-left: .15rem; }
.mchip.ok { background: #bfe8c4; }
.mapfoot { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; padding-left: 1.1rem; }
.mlvl, .mstock { display: flex; align-items: center; gap: .45rem; height: 3rem; padding: 0 1rem 0 .6rem; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 1.5rem; font: 700 1.5rem Fredoka, sans-serif; cursor: pointer; }
.mlvl { justify-self: start; }
.mlvl i { width: 3.2rem; height: .6rem; border-radius: .3rem; background: #D6CEC0; overflow: hidden; display: block; }
.mlvl u { display: block; height: 100%; border-radius: .3rem; background: var(--gold); }
.mface { width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 2px solid var(--ink); background: #fff; overflow: hidden; display: grid; place-items: center; margin-right: .5rem; }
.mface img, .mface .ic { width: 100%; height: 100%; object-fit: cover; }
.mstock .res { width: 2.3rem; height: 2.3rem; border-width: 2px; } .mstock .res .ic { width: 1.6rem; height: 1.6rem; }
.mstock b { min-width: 1.6rem; margin-right: .5rem; }
.mstock b:last-child { margin-right: 0; }
.mtitle { justify-self: end; display: flex; align-items: center; gap: .35rem; padding-right: .5rem; color: var(--cream); font: 700 1.05rem Fredoka, sans-serif; }
.mtitle .ic { width: 1.3rem; height: 1.3rem; }
@media (orientation: portrait) {
  .mapp { height: auto; max-height: 100%; }
  .mground { overflow-y: auto; } .mground::before, .mrow.top::before { display: none; }
  .mrow { flex: none; flex-wrap: wrap; justify-content: center; } .mb { flex: 0 0 33%; padding-top: 1rem; }
  .mapfoot { display: flex; flex-wrap: wrap; justify-content: center; }
}
@media (orientation: portrait) { #slots { flex-wrap: wrap; max-width: 62vw; } #row2 { top: 6.4rem; max-width: 96vw; } #topright { top: .45rem; } }

/* The four meters live on their buildings now (and on the maps), not in the HUD. */
#meters { display: none !important; }

/* slot badges: a square crop of the building's key feature, clipped to a circle, with our own padlock */
.sbadge.crop img { width: 100%; height: 100%; object-fit: cover; transform: scale(.84); }
.slock { position: absolute; left: 1.55rem; bottom: -.25rem; width: 1.05rem; height: 1.05rem; z-index: 2; }
.slock .ic { width: 1.05rem; height: 1.05rem; }

/* auto actions: the button that the game is pressing for the kid, and the switch in the pause menu */
.ab.pressed { transform: translateY(.16rem) scale(.93); box-shadow: 0 0 0 .28rem rgba(255, 255, 255, .75); filter: brightness(1.12); }
@media (pointer: fine) { #actions .ab.pressed { transform: translateY(.16rem) scale(.76); } }
#btn-laser { position: relative; }
#btn-laser.autoon::after { content: 'A'; position: absolute; right: -.15rem; top: -.15rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--green); color: #fff; border: 2px solid var(--ink); font: 700 .8rem/1.05rem Fredoka, sans-serif; text-align: center; }
.setrow { flex-basis: 100%; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.go-btn.tog .sw { width: 2.5rem; height: 1.4rem; border-radius: .7rem; border: 2px solid var(--ink); background: #b9b2a7; margin-left: .3rem; position: relative; flex: none; }
.go-btn.tog .sw i { position: absolute; left: .08rem; top: .08rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: left .12s; }
.go-btn.tog.on .sw { background: var(--green); }
.go-btn.tog.on .sw i { left: 1.18rem; }

/* cute toys: the sticker book, the flying sticker and the "?" bubbles over the toys */
#btn-book.wig { animation: bookwig .7s; }
@keyframes bookwig { 20% { transform: rotate(-14deg) scale(1.2); } 45% { transform: rotate(12deg) scale(1.2); } 70% { transform: rotate(-7deg) scale(1.08); } }
.stk { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.stkfly { position: absolute; left: 0; top: 0; width: 3rem; height: 3rem; z-index: 60; pointer-events: none; filter: drop-shadow(0 .15rem 0 rgba(0, 0, 0, .4)); }
#toyhelp { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#toyhelp .q { position: absolute; left: 0; top: 0; pointer-events: auto; box-shadow: 0 .12rem 0 rgba(0, 0, 0, .45); animation: hint 1.4s infinite; }
.bookp { width: min(46rem, 96vw); background: #fff8e4; }
.bcount { font: 700 .95rem Fredoka, sans-serif; padding: .05rem .55rem; border: 2px solid var(--ink); border-radius: .8rem; background: var(--gold); }
.bgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; }
.bslot { aspect-ratio: 1; max-height: 5.4rem; justify-self: center; width: 100%; max-width: 5.4rem; padding: .5rem; border-radius: 1rem; border: 2.5px dashed #b9ad8c; background: #f1e6c6; display: grid; place-items: center; }
.bslot .stk { filter: brightness(0) opacity(.2); }
.bslot.got { border: 2.5px solid var(--ink); background: #fff; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .35); cursor: pointer; }
.bslot.got .stk { filter: none; }
.bphotos { display: flex; align-items: center; gap: .4rem; margin-top: .55rem; min-height: 3.6rem; font: 700 .9rem Fredoka, sans-serif; }
.bphotos > b { margin-right: .2rem; }
.bphoto { height: 3.6rem; border: 2px solid var(--ink); border-radius: .3rem; overflow: hidden; box-shadow: 0 .12rem 0 rgba(0, 0, 0, .35); transform: rotate(-2deg); background: var(--cream); }
.bphoto:nth-child(odd) { transform: rotate(2deg); }
.bphoto img { height: 100%; display: block; }
.bempty { display: flex; align-items: center; gap: .3rem; font: 700 .8rem Nunito, sans-serif; opacity: .7; }
.bempty .ic { width: 1.1rem; height: 1.1rem; }
.bbig { position: absolute; inset: 0; border-radius: 1.3rem; background: rgba(11, 31, 58, .88); display: flex; align-items: center; justify-content: center; gap: .8rem; z-index: 3; }
.bbig img { max-height: 86%; max-width: 62%; border: 2.5px solid var(--ink); border-radius: .3rem; transform: rotate(-2deg); box-shadow: 0 .3rem 0 rgba(0, 0, 0, .5); }
.bbtns { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.bbtns a { text-decoration: none; }
@media (max-height: 420px) { .bslot { max-height: 4.3rem; max-width: 4.3rem; padding: .35rem; } .bphoto, .bphotos { height: 3rem; min-height: 3rem; } }

/* corner minimap: the whole ridge and town, view only, with a Main / All toggle for the toys */
#mini { top: 3.35rem; right: calc(.6rem + env(safe-area-inset-right)); width: 11rem; padding: .2rem; background: var(--navy); border: 2px solid var(--ink); border-radius: .7rem; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); }
#mini.low { top: 8rem; }
#minic { display: block; width: 100%; height: 6.3rem; border-radius: .45rem; cursor: pointer; }
.minit { display: flex; gap: .2rem; margin-top: .2rem; }
.minit button { flex: 1; height: 1.15rem; border-radius: .6rem; background: #2c3a63; color: #e8e2d6; font: 700 .68rem/1 Fredoka, sans-serif; }
.minit button.on { background: var(--gold); color: var(--ink); }
#app.help #mini { outline: 2px dashed var(--gold); }
@media (orientation: portrait) { #mini { width: 8.5rem; top: 6.4rem; } #minic { height: 5rem; } }

/* Music and sound sliders in the pause menu (audio.js). Big thumbs for small fingers. */
.vol { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .5rem; border: 2px solid var(--ink); border-radius: 1rem; background: #fff; }
.vol .ic { width: 1.6rem; height: 1.6rem; }
.vol input[type=range] { width: 5.2rem; height: 1.8rem; accent-color: #F2C14E; cursor: pointer; }
#pause .setrow { flex-wrap: wrap; row-gap: .4rem; } /* the volume row fits inside the pause panel */

/* the day loop's screens (mockups 31-33): the day big, "Day N complete!", the day's stats */
#day { padding: 0; z-index: 46; }
#day.ds-dark { background: radial-gradient(ellipse at 50% 30%, rgba(30, 62, 112, .95), rgba(5, 7, 15, .97) 78%); }
#day.ds-win { background: repeating-conic-gradient(from 0deg at 50% 36%, rgba(242, 193, 78, .14) 0deg 9deg, rgba(0, 0, 0, 0) 9deg 18deg), radial-gradient(circle at 50% 36%, #3A68A8, #0B1F3A 72%); }
.ds { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: .6rem 1.2rem; }
.ds > .q.mini, .sp > .q.mini { position: absolute; right: 1rem; top: .8rem; width: 1.75rem; height: 1.75rem; font-size: 1rem; }
.sp > .q.mini { right: .6rem; top: .6rem; }
.dayno, .wintitle { display: flex; align-items: baseline; gap: .5rem; font-family: Fredoka, sans-serif; font-weight: 700; line-height: .85; position: relative; }
.dayno span, .wintitle span { -webkit-text-stroke: .22rem var(--ink); paint-order: stroke fill; text-shadow: 0 .3rem 0 rgba(0, 0, 0, .45); }
.dayno .w { font-size: 2.7rem; color: var(--white); }
.dayno .n { font-size: 5.6rem; color: var(--gold); }
.track { display: flex; align-items: flex-start; position: relative; }
.track .seg { width: 3.2rem; height: .4rem; background: rgba(247, 244, 238, .3); border-radius: .2rem; margin-top: 1.15rem; flex: none; }
.track .seg.done { background: var(--gold); }
.node { display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 2.9rem; }
.node .dot { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--cream); border: 2.5px solid var(--ink); display: grid; place-items: center; box-shadow: 0 .16rem 0 rgba(0, 0, 0, .45); }
.node .dot .ic { width: 1.65rem; height: 1.65rem; }
.node .lab { font: 800 .82rem/1 Nunito, sans-serif; color: rgba(247, 244, 238, .85); white-space: nowrap; }
.node.done .dot { background: #DFF3D9; }
.node.now .dot { transform: scale(1.18); background: #FFE9A6; box-shadow: 0 0 0 .2rem var(--gold), 0 .25rem 0 .2rem rgba(0, 0, 0, .35); }
.node.now .lab { color: var(--gold); margin-top: .25rem; }
.node.end .dot { background: var(--gold); }
.fcast { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .75rem .15rem .3rem; border: 2px solid var(--ink); border-radius: 1rem; background: #FFF4C2; color: var(--ink); font: 800 .95rem Nunito, sans-serif; }
.fcast .ic { width: 1.5rem; height: 1.5rem; }
.fcast.busy { background: #FFDDAA; } .fcast.stormy { background: #FFB39A; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 11.6rem)); gap: .6rem; max-width: 100%; }
.tile { display: flex; align-items: center; gap: .45rem; padding: .4rem .65rem .45rem .45rem; background: var(--cream); border: 2.5px solid var(--ink); border-radius: 1rem; box-shadow: 0 .2rem 0 rgba(0, 0, 0, .45); }
.tile > .ic { width: 2.5rem; height: 2.5rem; }
.tile .tcol { flex: 1; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.tile .tname { font: 700 1rem/1 Fredoka, sans-serif; }
.dbar { position: relative; height: .95rem; border: 2.5px solid var(--ink); border-radius: .5rem; background: #d9ceb0; overflow: hidden; }
.dbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c, var(--blue)); }
.dbar i.ghost { opacity: .45; background: repeating-linear-gradient(-45deg, var(--c, var(--blue)) 0 .25rem, transparent .25rem .5rem); }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; width: .55rem; height: .95rem; border: 1.5px solid var(--ink); border-radius: .15rem; transform: rotate(var(--r, 0deg)); animation: confetti 2.1s ease-in-out infinite alternate; }
@keyframes confetti { to { transform: translateY(.9rem) rotate(calc(var(--r, 0deg) + 50deg)); } }
.wintitle { transform: rotate(-2deg); }
.wintitle .d { font-size: 3.7rem; color: var(--gold); }
.wintitle .c { font-size: 3.1rem; color: var(--white); }
.crewpic { height: 8.2rem; width: auto; display: block; position: relative; filter: drop-shadow(0 .25rem 0 rgba(0, 0, 0, .35)); animation: crewin .45s ease-out; }
@keyframes crewin { from { transform: scale(.75) translateY(.8rem); opacity: 0; } }
.reward { display: flex; align-items: center; gap: 1.2rem; position: relative; }
.reward .xp { display: flex; align-items: center; gap: .25rem; height: 2.6rem; padding: 0 .9rem 0 .4rem; border: 2.5px solid var(--ink); border-radius: 1.3rem; background: var(--gold); font: 700 1.35rem/1 Fredoka, sans-serif; color: var(--ink); box-shadow: 0 .2rem 0 rgba(0, 0, 0, .45); }
.reward .xp .ic { width: 1.6rem; height: 1.6rem; }
.sp { position: relative; width: min(37rem, 94vw); background: var(--cream); border: 3px solid var(--ink); border-radius: 1.4rem; box-shadow: 0 .45rem 0 rgba(0, 0, 0, .5); padding: .75rem 1rem .85rem; }
.sp h2 { margin: 0 0 .55rem; font: 700 1.45rem/1.1 Fredoka, sans-serif; }
.srows { display: grid; gap: .4rem; }
.srow { display: grid; grid-template-columns: 2.1rem 6.4rem 1fr 2.4rem; align-items: center; gap: .55rem; }
.srow > .ic { width: 2.1rem; height: 2.1rem; }
.srow .sname { font: 700 1.05rem Fredoka, sans-serif; }
.srow .delta { font: 700 1.2rem Fredoka, sans-serif; text-align: right; color: #6b6253; }
.srow .delta.up { color: #1f7a2e; } .srow .delta.down { color: var(--red); }
.got { display: flex; align-items: center; gap: .45rem; margin-top: .65rem; padding-top: .6rem; border-top: 2px dashed rgba(26, 26, 26, .25); flex-wrap: wrap; }
.got .glab { font: 800 .95rem Nunito, sans-serif; margin-right: .15rem; }
.haul { display: flex; align-items: center; gap: .15rem; padding: .1rem .6rem .1rem .2rem; border: 2px solid var(--ink); border-radius: .9rem; background: var(--white); font: 700 1.1rem/1 Fredoka, sans-serif; }
.haul .ic { width: 1.6rem; height: 1.6rem; }
.got .glab.spent { margin-left: .7rem; }
.haul.spent { background: #ffe1a8; }
.haul.harvest { background: #d6f1d0; }
@media (max-height: 420px) { .dayno .n { font-size: 4.6rem; } .dayno .w { font-size: 2.3rem; } .crewpic { height: 6.6rem; } .wintitle .d { font-size: 3.1rem; } .wintitle .c { font-size: 2.6rem; } .ds { gap: .45rem; } }
@media (orientation: portrait) { .tiles { grid-template-columns: repeat(2, minmax(0, 11.6rem)); } .track .seg { width: 1.2rem; } }
/* the Sun's flare: a short warning with a countdown ring */
#flare { left: 50%; top: 5.4rem; transform: translateX(-50%); z-index: 3; }
#app:has(#flare:not([hidden])) #toast { top: 9rem; } /* toasts make room for the warning */
/* the flare's choice: Ask Earth (2.6 s there and back) or Act now, the call on its way, and Earth's answer */
#hud > #flare { display: flex; flex-direction: column; align-items: center; gap: .35rem; pointer-events: none; }
#hud > #flare[hidden] { display: none; }
#flare > * { pointer-events: auto; }
#app:has(#flare .fcomm) #toast { top: 12.4rem; }
.fcomm { display: flex; align-items: center; gap: .45rem; }
.fbtn { display: flex; align-items: center; gap: .35rem; min-height: 2.8rem; padding: .3rem .85rem .3rem .45rem; background: var(--cream); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 1.5rem; box-shadow: 0 .2rem 0 rgba(0, 0, 0, .45); font: 700 1.08rem Fredoka, sans-serif; cursor: pointer; white-space: nowrap; }
.fbtn .ic { width: 1.8rem; height: 1.8rem; }
.fbtn.ask { background: #8FE3D6; }
.fbtn small { font: 800 .8rem Nunito, sans-serif; background: var(--white); border: 2px solid var(--ink); border-radius: .8rem; padding: 0 .35rem; }
.fbtn:active:not(:disabled) { transform: translateY(.12rem); box-shadow: 0 .08rem 0 rgba(0, 0, 0, .45); }
.fbtn:disabled { background: #d9d4c7; color: #5d5d5d; box-shadow: none; cursor: default; }
.fbtn:disabled .ic { opacity: .5; }
.fcomm.call, .fcomm.ans, .fcomm.alone { padding: .3rem .6rem .35rem .45rem; background: var(--white); border: 2.5px solid var(--ink); border-radius: 1.2rem; box-shadow: 0 .2rem 0 rgba(0, 0, 0, .45); max-width: min(31rem, 92vw); }
.fcomm > .ic { width: 2rem; height: 2rem; }
.ccol { display: flex; flex-direction: column; gap: .1rem; line-height: 1.15; }
.ccol b { font: 700 .98rem Fredoka, sans-serif; }
.ccol span { font: 800 .86rem Nunito, sans-serif; }
.cbar { display: block; width: 11rem; height: .6rem; margin: .1rem 0; border: 2px solid var(--ink); border-radius: .4rem; background: #e9e2cf; overflow: hidden; }
.cbar i { display: block; width: 0; height: 100%; background: var(--teal); }
.cbar.back i { background: var(--gold); }
.fcomm.ans.thin .cberm { color: var(--red); }
.fcomm.ans.close .cberm { color: #a86200; }
.fcomm.ans.holds .cberm { color: #1f7a3a; }
.crow { display: flex; align-items: center; flex-wrap: wrap; column-gap: .7rem; }
.cnear { display: flex; align-items: center; gap: .25rem; }
.cnear .ic { width: 1.15rem; height: 1.15rem; }
.fcomm.alone { padding: .12rem .45rem .12rem .7rem; font: 800 .86rem Nunito, sans-serif; }
.fcard { display: flex; align-items: center; gap: .55rem; padding: .3rem .9rem .3rem .35rem; background: #FFB39A; border: 2.5px solid var(--ink); border-radius: 1.6rem; box-shadow: 0 .2rem 0 rgba(0, 0, 0, .45); animation: throb .6s infinite; }
.fring { width: 2.7rem; height: 2.7rem; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--red) calc(var(--f, 1) * 1turn), #f4e3c8 0); border: 2.5px solid var(--ink); }
.fring .ic { width: 1.7rem; height: 1.7rem; background: var(--cream); border-radius: 50%; padding: .15rem; }
.fcol { display: flex; flex-direction: column; line-height: 1.1; }
.fcol b { font: 700 1.05rem Fredoka, sans-serif; }
.fcol span { font: 800 .92rem Nunito, sans-serif; }
