@font-face { font-family: 'ShareTechMono'; src: url('assets/fonts/share-tech-mono.ttf') format('truetype'); font-weight: normal; font-style: normal; font-display: swap; }
/* Lantern Orbit - no flex-gap, no aspect-ratio, no inset, no min()/clamp(): old-Safari safe. */
:root { --fg: #d9ffe6; --dim: #7fb391; --bg: rgba(6,12,9,0.88); --line: #4a8a63; --acc: #fff; --hot: #ffffff; }
body.pal-white { --fg: #f0f0f0; --dim: #9a9a9a; --bg: rgba(10,10,10,0.9); --line: #707070; }
body.pal-black { --fg: #101010; --dim: #444; --bg: rgba(225,225,225,0.92); --line: #555; }
html, body { margin: 0; padding: 0; height: 100%; width: 100%; background: #000; overflow: hidden; position: fixed; top: 0; left: 0; }
body { font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; color: var(--fg); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body.pal-black { background: #d8d8d8; }
#app { position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; }
#cv { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; color: inherit; -webkit-appearance: none; appearance: none; touch-action: manipulation; cursor: pointer; }

/* overlays */
.overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.78); display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; z-index: 20; padding: 8px; box-sizing: border-box; }
body.pal-black .overlay { background: rgba(240,240,240,0.7); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; max-width: 520px; width: 100%; max-height: 100%; box-sizing: border-box; text-align: center; overflow: auto; -webkit-overflow-scrolling: touch; }
.card.wide { max-width: 640px; text-align: left; }
.card.col { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; overflow: hidden; padding-bottom: 8px; }
.cbody { -webkit-flex: 1; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; padding-right: 4px; touch-action: pan-y; }
.cfoot { padding-top: 8px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.card h1 { margin: 0 0 4px 0; font-size: 28px; letter-spacing: 4px; }
.card h2 { margin: 0 0 6px 0; font-size: 18px; letter-spacing: 2px; }
.tag { margin: 0 0 8px 0; color: var(--dim); font-size: 14px; }
.small { font-size: 12px; color: var(--dim); margin: 4px 0; }
.rem { font-size: 11px; color: var(--dim); margin: 8px 0 0 0; line-height: 15px; }
.goal { font-weight: bold; border-left: 3px solid var(--fg); padding-left: 8px; }
.cr { float: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
.prow { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-justify-content: center; justify-content: center; }
.btn { min-height: 48px; min-width: 48px; padding: 6px 14px; margin: 4px; border-radius: 8px; border: 1px solid var(--line); background: rgba(128,128,128,0.18); font-size: 14px; }
.btn.big { background: var(--fg); color: #000; font-weight: bold; font-size: 16px; padding: 6px 22px; }
body.pal-black .btn.big { color: #fff; }
.btn:disabled { opacity: 0.4; }
.mis { display: block; width: 100%; text-align: left; margin: 0 0 6px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(128,128,128,0.14); min-height: 56px; box-sizing: border-box; }
.mis b { font-size: 15px; } .mis span { float: right; font-size: 14px; letter-spacing: 2px; } .mis small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
.mis.lock { opacity: 0.45; }
.mis.next { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.up { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 0 0 6px 0; background: rgba(128,128,128,0.12); }
.up .t { -webkit-flex: 1; flex: 1; min-width: 0; } .up .t b { font-size: 14px; display: block; } .up .t small { display: block; font-size: 11px; color: var(--dim); line-height: 14px; }
.up .pips { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; margin: 0 8px; white-space: nowrap; }
.up .btn { margin: 0; min-width: 84px; font-size: 13px; padding: 4px 8px; }
.set { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; border-bottom: 1px solid rgba(128,128,128,0.3); padding: 4px 0; min-height: 52px; }
.set span { font-size: 14px; } .set small { display: block; font-size: 11px; color: var(--dim); } .set .btn { margin: 0; min-width: 110px; }
#howBody p, #credTxt p, #oRep p { font-size: 13px; line-height: 18px; margin: 0 0 8px 0; } #howBody h3 { font-size: 14px; margin: 10px 0 4px 0; letter-spacing: 1px; }
#oRep table { width: 100%; border-collapse: collapse; font-size: 13px; } #oRep td { padding: 2px 0; } #oRep td:last-child { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
.stars { font-size: 26px; letter-spacing: 6px; text-align: center; margin: 4px 0; }


/* ---- 3D build: layers ---- */
#cv { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; touch-action: none; background: #000; }
#hud2d { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
#grab { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; touch-action: none; }

/* right edge stack */
#rstack { position: absolute; top: 6px; top: calc(6px + env(safe-area-inset-top)); right: 8px; right: calc(8px + env(safe-area-inset-right)); z-index: 6; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: flex-end; align-items: flex-end; }
#rstack .row { display: -webkit-flex; display: flex; margin-bottom: 4px; }
.ib { width: 48px; height: 48px; border-radius: 24px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; font-weight: bold; padding: 0; margin: 0 0 0 4px; }
#stats { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; min-width: 112px; box-sizing: border-box; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 17px; text-align: right; pointer-events: auto; }
#stats b { font-size: 14px; } #stats i { font-style: normal; color: var(--dim); font-size: 10px; letter-spacing: 1px; margin-right: 6px; }
#bComp { height: 6px; background: rgba(128,128,128,0.35); border-radius: 3px; overflow: hidden; margin-top: 2px; } #bComp s { display: block; height: 100%; background: #ff3b30; -webkit-transform-origin: left center; transform-origin: left center; text-decoration: none; }
#palBtn { margin-top: 4px; min-width: 112px; min-height: 36px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); font-size: 12px; font-weight: bold; letter-spacing: 1px; padding: 0; }
/* left: minimap + FIRE */
#mini { position: absolute; top: 6px; top: calc(6px + env(safe-area-inset-top)); left: 8px; left: calc(8px + env(safe-area-inset-left)); width: 116px; height: 74px; background: rgba(0,0,0,0.55); border: 1px solid var(--line); border-radius: 6px; z-index: 6; touch-action: none; }
#fireBtn { position: absolute; left: 12px; left: calc(12px + env(safe-area-inset-left)); bottom: 26px; bottom: calc(26px + env(safe-area-inset-bottom)); width: 104px; height: 104px; border-radius: 52px; border: 3px solid #ff3b30; color: #fff; background: rgba(120,10,6,0.82); z-index: 6; font-weight: bold; font-size: 19px; letter-spacing: 2px; padding: 0; touch-action: none; -webkit-touch-callout: none; box-shadow: 0 0 16px rgba(255,59,48,0.35); }
#fireBtn small { display: block; font-size: 10px; font-weight: normal; color: #ffb0aa; letter-spacing: 1px; }
#fireBtn.down { background: #ff3b30; }
/* weapons: bottom-right column with cooldown bars */
#wpns { position: absolute; right: 8px; right: calc(8px + env(safe-area-inset-right)); bottom: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 118px; z-index: 6; }
.wb { position: relative; display: block; width: 100%; height: 56px; margin: 0 0 5px 0; padding: 3px 8px 9px 8px; text-align: right; background: var(--bg); border: 2px solid var(--line); border-radius: 8px; overflow: hidden; box-sizing: border-box; touch-action: none; }
.wb b { display: block; font-size: 15px; letter-spacing: 1px; line-height: 17px; }
.wb em { font-style: normal; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; line-height: 17px; }
.wb small { font-size: 11px; color: var(--dim); font-family: ui-monospace, Menlo, Consolas, monospace; margin-left: 8px; }
.wb u { position: absolute; left: 6px; right: 6px; bottom: 5px; height: 5px; background: rgba(128,128,128,0.35); border-radius: 3px; overflow: hidden; text-decoration: none; }
.wb u s { display: block; height: 100%; width: 100%; background: var(--fg); text-decoration: none; -webkit-transform-origin: left center; transform-origin: left center; }
.wb.rl u s { background: #ff3b30; }
.wb.sel { border-color: #ff3b30; box-shadow: 0 0 0 1px #ff3b30 inset; } .wb.sel b { color: #ff3b30; }
.wb.empty b { color: var(--dim); }
#hint { position: absolute; left: 140px; right: 140px; bottom: 4px; bottom: calc(4px + env(safe-area-inset-bottom)); text-align: center; font-size: 11px; line-height: 16px; pointer-events: none; z-index: 4; display: none; }
#banner { position: absolute; left: 0; right: 0; top: 24%; text-align: center; font-size: 24px; letter-spacing: 3px; font-weight: bold; pointer-events: none; opacity: 0; -webkit-transition: opacity 0.4s; transition: opacity 0.4s; z-index: 6; text-shadow: 0 0 8px rgba(0,0,0,0.9); }
#banner.on { opacity: 1; } #banner small { display: block; font-size: 13px; letter-spacing: 1px; font-weight: normal; margin-top: 4px; }
#toast { position: absolute; left: 50%; bottom: 14px; -webkit-transform: translateX(-50%); transform: translateX(-50%); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; font-size: 13px; opacity: 0; pointer-events: none; z-index: 27; -webkit-transition: opacity 0.25s; transition: opacity 0.25s; white-space: nowrap; max-width: 90%; }
#toast.on { opacity: 1; }
#sub { position: absolute; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); bottom: 34px; max-width: 50%; z-index: 6; background: rgba(0,0,0,0.7); color: #eaeaea; border: 1px solid #555; border-radius: 6px; padding: 3px 10px; font-size: 12px; opacity: 0; pointer-events: none; -webkit-transition: opacity 0.3s; transition: opacity 0.3s; }
#sub.on { opacity: 1; }
body.pal-black #sub { background: rgba(255,255,255,0.8); color: #111; border-color: #888; }
#app.lefty-off #fireBtn { left: auto; right: 140px; }
#perf { position: absolute; left: 130px; bottom: 4px; z-index: 9; font: 10px ui-monospace, monospace; color: #9f9; pointer-events: none; text-shadow: 0 0 2px #000; display: none; white-space: pre; }
@media (max-height: 340px) { #fireBtn { width: 84px; height: 84px; bottom: 8px; } .wb { height: 46px; } .wb b { font-size: 13px; } #mini { height: 54px; width: 90px; } }
@media (min-width: 900px) and (min-height: 600px) { #fireBtn { width: 124px; height: 124px; border-radius: 62px; bottom: 36px; } #wpns { width: 150px; bottom: 34px; } .wb { height: 66px; } .wb b { font-size: 17px; } #mini { width: 160px; height: 100px; } #stats { font-size: 14px; } }
#app.portrait #wpns { width: 100px; } #app.portrait #fireBtn { bottom: 20px; }
#noscript { z-index: 50; background: #000; }
@media (max-height: 420px) and (orientation: landscape) { .card h1 { font-size: 22px; } .tag { font-size: 12px; margin-bottom: 4px; } .btn { margin: 3px; } .card { padding: 8px 14px; } .rem { margin-top: 4px; } }
html, body { overscroll-behavior: none; touch-action: manipulation; } .cbody { overscroll-behavior: contain; }
#mVer { margin-top: 4px; font-size: 13px; opacity: 0.95; letter-spacing: 0.08em; }

#wpns, #fireBtn, #rstack, #mini, #hint { display: none; }
#app.inplay #wpns, #app.inplay #fireBtn, #app.inplay #mini { display: block; } #app.inplay #rstack { display: -webkit-flex; display: flex; }
#app:not(.inplay) #grab { pointer-events: none; }

#app.nohud #wpns, #app.nohud #fireBtn, #app.nohud #rstack, #app.nohud #mini, #app.nohud #banner, #app.nohud #sub, #app.nohud #hint { display: none !important; }
#kbHint { position: absolute; left: 14px; left: calc(14px + env(safe-area-inset-left)); bottom: 134px; font-size: 11px; letter-spacing: 1px; color: #cfd3d0; opacity: 0.75; pointer-events: none; z-index: 6; display: none; }
#app.inplay.kb #kbHint { display: block; }
@media (max-height: 340px) { #kbHint { bottom: 96px; } }
#app.nohud #kbHint { display: none !important; }

/* ================= v0.1.2 sensor theme: thin lines, bracket corners, bundled mono font, no app cards ================= */
:root { --fg: #d6e6dc; --dim: #86a092; --bg: rgba(5,9,7,0.82); --line: #5f7f6d; }
body.pal-white { --fg: #e6e6e6; --dim: #9aa39e; --bg: rgba(8,9,8,0.82); --line: #6c7a72; }
body.pal-black { --fg: #101010; --dim: #3a3a3a; --bg: rgba(225,228,226,0.88); --line: #444; }
body, button, input { font-family: 'ShareTechMono', ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.overlay { background: rgba(2,4,3,0.86); }
.overlay:before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 4px); }
.card { position: relative; border-radius: 0; border: 1px solid var(--line); background: var(--bg); box-shadow: none; }
.card:before, .card:after { content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none; border: 0 solid var(--fg); }
.card:before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.card:after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.card h1 { font-weight: normal; letter-spacing: 0.32em; font-size: 26px; }
.card h2 { font-weight: normal; letter-spacing: 0.24em; text-transform: uppercase; font-size: 16px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.tag { letter-spacing: 0.1em; }
.btn { border-radius: 0; background: transparent; text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; border: 1px solid var(--line); color: var(--fg); }
.btn.big { background: transparent; color: var(--fg); border: 1px solid var(--fg); font-weight: normal; font-size: 15px; box-shadow: 0 0 0 3px transparent; }
.btn.big:active, .btn:active { background: var(--fg); color: #000; }
body.pal-black .btn.big { color: var(--fg); } body.pal-black .btn.big:active, body.pal-black .btn:active { color: #fff; }
.mis, .up { border-radius: 0; background: transparent; }
.mis.next { box-shadow: none; border-color: var(--fg); border-left-width: 4px; }
.set { border-bottom-color: var(--line); }
.goal { border-left-color: var(--fg); }
#rstack .ib { border-radius: 24px; background: transparent; border: 1px solid var(--line); }
#stats { background: transparent; border: none; border-right: 2px solid var(--line); border-radius: 0; text-shadow: 0 0 3px #000, 0 0 3px #000; padding: 2px 8px; }
#bComp { border-radius: 0; height: 4px; }
#palBtn { background: transparent; border: 1px solid var(--line); border-radius: 0; min-height: 28px; text-shadow: 0 0 3px #000; }
#mini { background: rgba(0,0,0,0.35); border-radius: 0; border: 1px solid var(--line); }
#fireBtn { width: 66px; height: 66px; border-radius: 33px; border: 2px solid #ff3b30; background: rgba(255,59,48,0.07); box-shadow: none; font-weight: normal; font-size: 13px; letter-spacing: 0.16em; bottom: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); }
#fireBtn small { font-size: 9px; letter-spacing: 0.1em; color: #ff9d96; }
#fireBtn.down { background: rgba(255,59,48,0.75); }
@media (min-width: 900px) and (min-height: 600px) { #fireBtn { width: 88px; height: 88px; border-radius: 44px; bottom: 30px; font-size: 15px; } }
@media (max-height: 340px) { #fireBtn { width: 58px; height: 58px; border-radius: 29px; bottom: 10px; } #kbHint { bottom: 76px; } }
.wb { background: transparent; border: 1px solid transparent; border-radius: 0; height: 50px; margin-bottom: 4px; padding-top: 2px; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.wb.sel { border-color: #ff3b30; box-shadow: none; }
.wb u { border-radius: 0; height: 3px; bottom: 4px; }
.wb b { font-weight: normal; letter-spacing: 0.1em; }
@media (max-height: 340px) { .wb { height: 40px; } #wpns { width: 96px; bottom: 8px; } }
#banner { left: 120px; right: 150px; top: 17%; font-weight: normal; font-size: 20px; letter-spacing: 0.3em; text-shadow: 0 0 4px #000, 0 0 4px #000; }
#banner small { letter-spacing: 0.12em; font-size: 12px; }
@media (max-height: 340px) { #banner { font-size: 16px; top: 13%; left: 110px; right: 130px; } #banner small { font-size: 11px; } }
#sub { border-radius: 0; background: rgba(0,0,0,0.55); border: none; border-left: 2px solid var(--line); left: 150px; -webkit-transform: none; transform: none; max-width: 46%; bottom: 8px; }
#hint { font-size: 11px; }
#toast { border-radius: 0; }
