:root{color-scheme:dark;--ink:#ecf3f2;--muted:#a0abae;--accent:#a7e8d6;--line:#344147;--bg:#080c10;font:16px system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;background:#080c10;color:var(--ink)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;background:#10181b;border:1px solid var(--line);padding:.65rem .85rem}button:hover,button:focus-visible{border-color:var(--accent)}button:disabled{opacity:.55;cursor:wait}a{color:inherit}.shell{max-width:1460px;margin:auto;padding:0 4vw}.top,.controls,.inventory-head,footer,.map-tools,.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:14px}.top{height:74px;border-bottom:1px solid var(--line)}.brand{text-decoration:none;font:700 16px ui-monospace,monospace;letter-spacing:.14em;display:flex;align-items:center;gap:5px}.brand span{color:var(--accent)}.brand i{width:14px;height:14px;border:1px solid var(--accent);transform:rotate(45deg);margin-right:10px;box-shadow:0 0 11px #a7e8d635}.credits,.transmit,.inventory-head,.map-tools,.sos{font-family:ui-monospace,monospace;font-size:.88rem;letter-spacing:.06em}.credits{white-space:nowrap}.credits output{color:#ffabb3;margin-left:.3em}.transmit{text-transform:uppercase;background:#b2e9d9;color:#0a1916;font-weight:800;border-color:#b2e9d9}.transmit:hover{background:#d1ffef}.field{height:clamp(460px,65vw,650px);position:relative;isolation:isolate;overflow:hidden;border-bottom:1px solid var(--line);background:radial-gradient(ellipse at 55% 53%,#111925 0%,#090d14 55%,#080c10 85%)}#stars,#entities{position:absolute;inset:0;pointer-events:none}.star{position:absolute;width:2px;height:2px;background:#bed9e1;border-radius:50%}.guide{position:absolute;top:28px;left:18px;pointer-events:none;z-index:1}.guide h1{font-weight:530;font-size:clamp(1.75rem,4.7vw,4rem);line-height:1.03;letter-spacing:-.055em;margin:0}.guide p{font-size:.95rem;color:var(--muted);margin:.8rem 0}.map-frame{position:absolute;inset:110px 5% 55px 13%;display:grid;place-items:center;opacity:0;animation:appear .65s 1s forwards}.map-frame svg{width:100%;height:100%;overflow:visible}.state{fill:transparent;stroke:#7c8a95;stroke-width:1.1;vector-effect:non-scaling-stroke;cursor:pointer;outline:none;transition:stroke .14s,fill .14s,filter .14s}.state:hover,.state:focus-visible,.state.selected{stroke:#e4fcf6;fill:#d7f9fc0f;filter:drop-shadow(0 0 4px #d7f9fcb0)}.state.selected{stroke-width:1.65}.map-tools{position:absolute;bottom:14px;left:14px;justify-content:start}.map-tools output{color:var(--muted)}.map-tools button{text-align:left}.sos{position:absolute;bottom:15px;right:12px;color:#ffd6ab;display:flex;align-items:center;gap:10px;pointer-events:none}.symbol{display:inline-block;width:23px;height:23px;background:currentColor;clip-path:var(--polygon)}.inventory{margin-top:18px;border:1px solid #35474c;background:#0d141a;position:relative;padding:13px 16px 16px;clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,14px 100%,0 calc(100% - 14px))}.inventory.active{border-color:#607e7b}.inventory-head{color:var(--accent);margin-bottom:12px}.inventory-head small{color:var(--muted);font-size:.75rem;text-align:right}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.card,.empty{margin:0}.card{border:1px solid #37474c;display:grid;gap:8px;padding:14px;background:#101a20;min-height:100px;animation:slide .28s both;animation-delay:var(--delay)}.card strong{font:600 1.5rem ui-monospace,monospace;color:#e6fff8}.card span{font-size:.91rem;color:#b8c3c8;line-height:1.25}.empty{color:var(--muted);grid-column:1/-1}footer{min-height:54px;color:var(--muted);font-size:.86rem}#feedback{color:var(--accent)}#ship{position:absolute;width:150px;top:25%;left:0;animation:fly 1s linear both;pointer-events:none;z-index:3}#ship svg{width:100%;filter:drop-shadow(0 0 8px #96ffe8)}.orb,.matcher,.burst,.intro-orb{position:absolute;left:0;top:0}.orb,.matcher{pointer-events:auto;position:absolute;width:40px;height:40px;border:0;background:none;padding:7px;z-index:2}.orb::after,.intro-orb,.burst{content:"";display:block;width:100%;height:100%;border-radius:50%;background:radial-gradient(circle at 42% 35%,#ecffff,#74d7c4 38%,#285950 65%,transparent 73%);box-shadow:0 0 14px #63efd67a}.orb.fast::after{background:radial-gradient(circle,#fff7e1,#ffbc6b 37%,#9e481b 60%,transparent 73%);box-shadow:0 0 15px #ffac687a}.intro-orb{width:12px;height:12px;scale:1.8;top:25%;left:var(--x);animation:fall 1.6s var(--delay) both}.burst{width:20px;height:20px;animation:burst .37s both}.matcher{color:#ffd6ab;display:grid;place-items:center}.matcher .symbol{width:24px;height:24px}.matcher:hover .symbol{background:white}dialog{width:min(94vw,510px);background:#101920;color:var(--ink);border:1px solid #64988d;padding:22px;box-shadow:0 0 35px #82e8cd22}dialog::backdrop{background:#05080cbb}dialog h2{margin:0;color:var(--accent);font:700 1.35rem ui-monospace,monospace;text-transform:uppercase}dialog form{display:grid;gap:12px}dialog p{margin:0;color:var(--muted)}label{display:grid;gap:5px;font-size:.92rem}input{padding:9px;width:100%;background:#080f14;border:1px solid #4b626a;color:inherit;font:inherit}input:focus{outline:1px solid var(--accent)}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@keyframes appear{to{opacity:1}}@keyframes slide{from{opacity:0;translate:-44px 0}to{opacity:1;translate:0 0}}@keyframes fly{from{translate:-160px 35px}to{translate:calc(100vw + 150px) -48px;visibility:hidden}}@keyframes fall{0%{opacity:0;translate:0 -10px}30%{opacity:1}100%{opacity:0;translate:15px 150px}}@keyframes burst{to{scale:4;opacity:0}}
@media(max-width:700px){.shell{padding:0 12px}.top{height:62px}.brand{font-size:.78rem}.brand i{margin-right:2px}.field{height:440px}.guide{top:20px;left:5px}.map-frame{inset:112px 1% 68px}.map-tools{left:2px;bottom:9px}.map-tools output{display:none}.sos{right:1px;bottom:18px;font-size:.75rem}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.card{padding:10px}.inventory{padding:10px}.controls{gap:8px}}
@media(prefers-reduced-motion:reduce){.map-frame{opacity:1;animation:none}.card{animation:none}#ship,.intro-orb{display:none}.state{transition:none}}

/* Region outlines and matching hover light. */
.state{--region:#7c8a95;--hover:#e4fcf6;stroke:var(--region)}
.state.midwest{--region:#608dd0;--hover:#a9caff}
.state.south{--region:#c36771;--hover:#ffabb3}
.state.northeast{--region:#569f79;--hover:#a0ffc5}
.state:hover,.state:focus-visible,.state.selected{stroke:var(--hover);filter:drop-shadow(0 0 4px var(--hover))}
.guide p{font-weight:750;color:var(--ink)}
.controls .credits{white-space:normal;text-align:right}
.controls .transmit{line-height:1.1}
.map-tools{left:auto;right:14px;flex-direction:row-reverse}
.sos{left:16px;right:auto;gap:10px;text-align:left}
.sos>div{display:grid;gap:3px;letter-spacing:0}
.sos-person{width:32px;height:32px;stroke:currentColor;fill:none;stroke-width:1.5}
.sos #sosText:empty{display:none}
.sos #capsule:not(.symbol){display:none}
.orb::after,.intro-orb{background:radial-gradient(circle,#fff 0 46%,#fffef5 53%,#f8f1c0b0 59%,#fff6d341 71%,transparent 77%);box-shadow:0 0 9px 2px #fff7d67a,0 0 18px 3px #fbf3cd55}
.orb.fast{width:66px;height:66px}
.orb.fast::after{background:radial-gradient(circle,#fff8f6 0 31%,#ff9e9c 47%,#ff423f 57%,#ff312969 68%,transparent 77%);box-shadow:0 0 15px 3px #ff4e4d96,0 0 23px 5px #f72c3a55}
.matcher{width:60px;height:60px;z-index:3}
.matcher .symbol{width:36px;height:36px}
.shatter{position:absolute;z-index:4;pointer-events:none;color:#fff7df}
.shatter.red{color:#ff9189}
.shatter i{position:absolute;width:var(--size);height:var(--size);background:currentColor;box-shadow:0 0 5px currentColor;animation:glitter var(--time) ease-out both}
.shatter span{position:absolute;white-space:nowrap;translate:-50% -150%;color:#fff5e5;font:700 14px ui-monospace,monospace;text-shadow:0 0 6px #121217,0 0 12px currentColor;animation:float-credit .85s ease-out both}
@keyframes glitter{0%{opacity:1;transform:scale(1.6)}45%{opacity:1}100%{transform:translate(var(--x),var(--y)) rotate(135deg) scale(.35);opacity:0}}
@keyframes float-credit{to{translate:-50% -260%;opacity:0}}
@media(max-width:700px){.map-tools{left:auto;right:2px}.sos{left:3px;right:auto;bottom:12px;max-width:53%;gap:5px}.sos-person{width:24px;min-width:24px}.map-tools button{max-width:142px;font-size:.75rem}.controls .credits{font-size:.72rem}.controls .transmit{padding:.5rem}}

.state.pacific{--region:#70ae87;--hover:#b4ffc7}
#ship.replaying{animation:none}
.inventory.active{clip-path:none;z-index:4}
.card{animation:none}
.sos .merchant-found{color:#b4ffc7;font-weight:800;text-shadow:0 0 9px #70e5a59c}

#redeem{width:100.8px;height:100.8px;border-radius:50%;padding:8px;text-align:center;font-size:.864rem;line-height:1.16;background:radial-gradient(circle at 50% 30%,#1a3032,#0b151c 75%);border-color:#679c91;box-shadow:inset 0 0 0 4px #0d191f,0 0 13px #78d8c22c}
#redeem:hover,#redeem:focus-visible{border-color:var(--accent);box-shadow:inset 0 0 12px #8bffdd45,0 0 15px #78d8c259}
.excellent{position:absolute;left:50%;top:42%;z-index:5;translate:-50% 0;color:#abff83;font-size:clamp(2rem,6vw,4.8rem);font-weight:900;text-shadow:0 0 12px #55ff77,0 0 29px #45ff69;animation:rise-excellent 1.4s ease-out both}
@keyframes rise-excellent{from{opacity:.2;translate:-50% 20px}20%,65%{opacity:1}to{opacity:0;translate:-50% -88px}}
@media(prefers-reduced-motion:reduce){.excellent{animation:none}}

#ship[hidden]{display:none}

#transmit{display:inline-flex;align-items:center;gap:.45em}
.transmit-arrow{font-size:1.25em;line-height:1}

.orb,.intro-orb{
  --orb-art:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23242b35' d='M3 2h2v2h6V2h2v2h-2v2h2v2h2v5h-2v-2h-2v2H5v-2H3v2H1V8h2V6h2V4H3z'/%3E%3Cpath fill='%23caffab' d='M4 7h2v2H4zm6 0h2v2h-2z'/%3E%3C/svg%3E");
}
.orb.fast{
  --orb-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2016%22%20shape-rendering%3D%22crispEdges%22%3E%3Cpath%20fill%3D%22%23211321%22%20d%3D%22M9%202h6v1h2v2h2v1h3v1h2v3h-2v1h-3v1h-2v1h-2v2h-2v-1h-2v1H9v-2H7v-1H5v-1H2v-1H0V7h2V6h3V5h2V3h2z%22%2F%3E%3Cpath%20fill%3D%22%23754152%22%20d%3D%22M9%203h6v1h2v2h2v1h3v1H2V7h3V6h2V4h2z%22%2F%3E%3Cpath%20fill%3D%22%23cf6662%22%20d%3D%22M10%204h4v1h2v1H8V5h2zM4%209h4v1H4zm12%200h4v1h-4z%22%2F%3E%3Cpath%20fill%3D%22%23ffe2aa%22%20d%3D%22M8%209h2v1H8zm6%200h2v1h-2zm-3%202h2v1h-2z%22%2F%3E%3C%2Fsvg%3E");
}
.orb::before,.intro-orb::before{content:"";position:absolute;inset:22%;background:var(--orb-art) center/contain no-repeat;pointer-events:none}
.intro-orb::before{inset:14%}
.sos-person{flex-shrink:0}
.sos-person .face-calm,.sos-person .face-worried,.sos-person .face-alarmed{display:none}
.sos-person[data-fear="0"] .face-calm,.sos-person[data-fear="1"] .face-worried,.sos-person[data-fear="2"] .face-alarmed{display:inline}
.sos-person[data-fear="2"]{color:#ff9c88}
.sos .merchant-found{position:absolute;bottom:100%;left:0;white-space:nowrap;animation:merchant-float 1s ease-out both}
@keyframes merchant-float{from{opacity:1;transform:translateY(0)}60%{opacity:1}to{opacity:0;transform:translateY(-32px)}}

.alien-alternate{--orb-art:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20shape-rendering%3D%22crispEdges%22%3E%3Cpath%20fill%3D%22%232c2036%22%20d%3D%22M5%201h6v2h2v2h2v6h-2v2h-2v2H5v-2H3v-2H1V5h2V3h2z%22%2F%3E%3Cpath%20fill%3D%22%23ffa9ed%22%20d%3D%22M4%206h3v2H5v1H4zm5%200h3v3h-1V8H9zM7%2011h2v1H7z%22%2F%3E%3C%2Fsvg%3E")}

.orb.fast::before{inset:16%}
.sos-person{width:43px;height:34px}
.sos .merchant-overlay{padding:6px 9px;background:#10151a;border:1px solid #72594a;border-radius:6px}
@media(max-width:700px){
  .sos-person{width:33px;height:26px;min-width:33px}
  .sos .merchant-overlay{min-width:0;padding:5px 6px}
}

.alien-alternate::before{transform:scale(.9)}
.sos.merchant-departing{z-index:3}
.sos.merchant-departing .merchant-overlay{visibility:hidden}

.sos:not(.merchant-active) .merchant-overlay,
.sos:not(.merchant-active) .sos-person{visibility:hidden}
.sos .merchant-found{visibility:visible}
#transmit .transmit-arrow{width:1.7rem;height:1.35rem;flex:none}
