@font-face {
  font-family: "Pricedown";
  src: local("Pricedown Bl"), local("Pricedown Black"), local("Pricedown"), local("PricedownBl-Regular");
  font-display: swap;
}
:root {
  --ink: #14141c;
  --ink2: #20202b;
  --paper: #f4ead2;
  --dim: #b9b2a0;
  --sun: #ffd23c;
  --hot: #e2421c;
  --sea: #2e9fd0;
  --mint: #7be07b;
  --display: "Pricedown", "Passion One", Impact, "Arial Black", sans-serif;
  --text: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --step: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));
}
.outline { text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink), 2px -1px 0 var(--ink), -1px 2px 0 var(--ink); }

#phone { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 304px; height: min(588px, calc(100vh - 48px)); pointer-events: auto; animation: phoneIn .22s var(--ease); filter: drop-shadow(8px 8px 0 rgba(0, 0, 0, .4)); }
#phone.out { animation: phoneOut .16s ease-in forwards; }
@keyframes phoneIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes phoneOut { to { transform: translateY(40px); opacity: 0; } }
#phone .case { position: relative; height: 100%; padding: 26px 12px 14px; background: var(--sun); clip-path: var(--step); display: flex; flex-direction: column; }
#phone .case::before { content: ""; position: absolute; inset: 0; border: 3px solid var(--ink); clip-path: var(--step); pointer-events: none; }
#phone .speaker { position: absolute; top: 11px; left: 50%; width: 56px; height: 6px; margin-left: -28px; background: var(--ink); }
#phone .screen { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ink); border: 3px solid var(--ink); color: var(--paper); font: 400 14px/1.45 var(--text); }
#phone .sb { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #0c0c12; font: 400 15px/1 var(--display); letter-spacing: .04em; }
#phone .sb-net.on { color: var(--mint); }
#phone .sb-net.bad { color: var(--hot); }
#phone .sb-net.guest { color: var(--dim); }
#phone .view { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 16px; scrollbar-width: thin; scrollbar-color: #4a4a58 transparent; }
#phone .dock { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid #2c2c38; }
#phone button, #phone a.pbtn { font: 400 17px/1 var(--display); letter-spacing: .02em; color: var(--paper); background: none; border: 0; cursor: pointer; text-decoration: none; text-align: center; }
#phone .dk { padding: 12px 4px; min-height: 44px; }
#phone .dk:hover, #phone .dk:focus-visible { background: var(--sun); color: var(--ink); outline: none; }
#phone :focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

#phone .ptitle { margin: 0 0 12px; }
#phone .ptitle h2 { margin: 0; font: 400 30px/1 var(--display); color: var(--sun); letter-spacing: .02em; text-wrap: balance; }
#phone .ptitle p { margin: 6px 0 0; color: var(--dim); font-size: 13px; }
#phone h3 { margin: 18px 0 6px; font: 400 19px/1 var(--display); color: var(--sea); letter-spacing: .03em; }
#phone .dim { color: var(--dim); font-size: 13px; margin: 6px 0; }
#phone .plabel { display: block; margin: 8px 0 4px; color: var(--dim); font-size: 13px; }

#phone .home { display: grid; align-content: start; gap: 4px; }
#phone .h-clock { margin: 6px 0 0; font: 400 64px/1 var(--display); color: var(--paper); text-align: center; }
#phone .h-sub { margin: 0 0 6px; text-align: center; color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
#phone .motd { margin: 0 0 8px; padding: 8px 10px; background: var(--ink2); font-size: 13px; text-align: center; }
#phone .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
#phone .app { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; background: var(--ink2); min-height: 76px; }
#phone .app .ico { width: 30px; height: 30px; fill: var(--sun); shape-rendering: crispEdges; }
#phone .app span { font-size: 16px; }
#phone .app:hover, #phone .app:focus-visible { background: var(--sun); color: var(--ink); outline: none; }
#phone .app:hover .ico, #phone .app:focus-visible .ico { fill: var(--ink); }
#phone .bdg, #phoneBadge { position: absolute; top: 4px; right: 6px; min-width: 20px; padding: 3px 5px; background: var(--hot); color: #fff; font: 400 13px/1 var(--display); font-style: normal; text-align: center; text-shadow: none; }
#phone .rowbtn .bdg { position: static; margin-left: auto; }

#phone .tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 10px; border: 2px solid #2c2c38; }
#phone .tab { padding: 9px 4px; min-height: 40px; font-size: 16px; color: var(--dim); }
#phone .tab[aria-selected="true"] { background: var(--sun); color: var(--ink); }
#phone .tab:hover:not([aria-selected="true"]) { color: var(--paper); background: var(--ink2); }

#phone .plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
#phone .prow { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--ink2); min-height: 52px; }
#phone .prow.tap { padding: 0; }
#phone .rowbtn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; text-align: left; font: inherit; color: inherit; min-height: 52px; }
#phone .rowbtn:hover, #phone .rowbtn:focus-visible { background: #2a2a37; outline: none; }
#phone .rowbtn:focus-visible { box-shadow: inset 0 0 0 2px var(--sun); }
#phone .av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; color: var(--ink); font: 400 15px/1 var(--display); }
#phone .av.g { background: var(--sea); color: var(--ink); font-size: 13px; }
#phone .who { flex: 1; min-width: 0; display: grid; gap: 2px; }
#phone .who b { font: 400 17px/1.1 var(--display); letter-spacing: .02em; color: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#phone .who span { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#phone .acts { display: flex; gap: 6px; flex: none; }
#phone .acts.wide { flex-wrap: wrap; margin: 8px 0; }
#phone .pbtn { padding: 8px 10px; min-height: 36px; border: 2px solid var(--paper); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
#phone .pbtn.pri { background: var(--sun); border-color: var(--sun); color: var(--ink); }
#phone .pbtn.warn { background: var(--hot); border-color: var(--hot); color: #fff; }
#phone .pbtn:hover:not(:disabled) { background: var(--paper); border-color: var(--paper); color: var(--ink); }
#phone .pbtn:disabled { opacity: .45; cursor: default; }
#phone .tagp { font-size: 12px; color: var(--dim); padding: 0 4px; }

#phone .pmsg { margin: 8px 0; font-size: 13px; color: var(--dim); }
#phone .pmsg.err { color: #ff8a70; }
#phone .pmsg.ok { color: var(--mint); }
#phone .guest { display: grid; gap: 8px; }
#phone .guest p { margin: 0; }

#phone .log { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
#phone .log li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 8px; background: var(--ink2); overflow-wrap: anywhere; }
#phone .log li b { grid-column: 1; font: 400 15px/1.2 var(--display); color: var(--sea); letter-spacing: .02em; }
#phone .log li.me b { color: var(--sun); }
#phone .log li.sys b { color: var(--hot); }
#phone .log li span { grid-column: 1 / -1; }
#phone .log li time { grid-column: 2; grid-row: 1; font-size: 11px; color: var(--dim); }
#phone .log li.empty { display: block; color: var(--dim); background: none; padding: 4px 0; }
#phone .composer { display: flex; gap: 6px; position: sticky; bottom: -16px; padding: 8px 0 4px; background: var(--ink); }
#phone .stack { display: grid; gap: 6px; }
#phone input { flex: 1; min-width: 0; width: 100%; padding: 9px 10px; min-height: 40px; background: var(--ink2); border: 2px solid #3a3a48; color: var(--paper); font: 400 16px/1.2 var(--text); }
#phone input:focus { border-color: var(--sun); outline: none; }
#phone .addr { margin: 0 0 4px; padding: 8px; background: var(--ink2); font-size: 13px; overflow-wrap: anywhere; user-select: text; }
#phone .addr.secret { color: #ffb4a3; }
#phone .kv { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0; font-size: 13px; }
#phone .kv span { color: var(--dim); }
#phone .kv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
#phone .me { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
#phone .me .av { width: 44px; height: 44px; font-size: 19px; }

#peek { position: fixed; right: 24px; bottom: 24px; z-index: 39; width: 304px; display: grid; gap: 4px; padding: 14px 16px 16px; background: var(--sun); color: var(--ink); clip-path: var(--step); text-align: left; cursor: pointer; animation: peekIn .18s var(--ease); font: 400 14px/1.35 var(--text); pointer-events: auto; }
#peek b { font: 400 18px/1 var(--display); }
#peek span { overflow-wrap: anywhere; }
#peek:hover, #peek:focus-visible { background: #ffe07a; color: var(--ink); outline: none; }
#peek.out { animation: phoneOut .2s ease-in forwards; }
@keyframes peekIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

#chatfeed { position: fixed; left: 18px; bottom: 250px; z-index: 5; width: min(380px, 60vw); display: grid; gap: 4px; pointer-events: none; font: 600 14px/1.35 var(--text); color: var(--paper); text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
#chatfeed p { margin: 0; overflow-wrap: anywhere; transition: opacity .6s; }
#chatfeed p b { color: var(--sun); font-weight: 700; }
#chatfeed p.fade { opacity: 0; }

#tags { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
#tags .tag { position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 4px; will-change: transform; }
#tags .tag b { font: 400 17px/1 var(--display); letter-spacing: .03em; color: var(--paper); white-space: nowrap; text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink), 2px -1px 0 var(--ink), -1px 2px 0 var(--ink); }
#tags .tag.friend b { color: var(--mint); }
#tags .say { margin: 0; max-width: 220px; padding: 6px 9px; background: rgba(20, 20, 28, .9); border: 2px solid var(--paper); color: var(--paper); font: 400 13px/1.35 var(--text); text-align: center; overflow-wrap: anywhere; }

#acct { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(8, 8, 14, .72); pointer-events: auto; }
#acct .sheet { position: relative; width: min(470px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px 24px 22px; background: var(--ink); border: 3px solid var(--paper); box-shadow: 8px 8px 0 rgba(0, 0, 0, .45); color: var(--paper); font: 400 16px/1.5 var(--text); animation: peekIn .18s var(--ease); }
#acct h2 { margin: 0 64px 8px 0; font: 400 36px/1 var(--display); color: var(--sun); letter-spacing: .02em; text-shadow: 3px 3px 0 #000; text-wrap: balance; }
#acct .lead { margin: 0 0 16px; color: var(--dim); font-size: 15px; max-width: 52ch; }
#acct .ax { position: absolute; top: 14px; right: 14px; padding: 8px 10px; min-height: 40px; font: 400 17px/1 var(--display); color: var(--paper); background: none; border: 2px solid var(--paper); }
#acct .ax:hover, #acct .ax:focus-visible { background: var(--sun); border-color: var(--sun); color: var(--ink); outline: none; }
#acct .aform { display: grid; gap: 12px; }
#acct .af { display: grid; gap: 4px; }
#acct .af label { font: 400 18px/1.1 var(--display); letter-spacing: .02em; }
#acct .af input, #acct .af textarea { width: 100%; padding: 11px 12px; min-height: 46px; background: var(--ink2); border: 2px solid #3a3a48; color: var(--paper); font: 400 16px/1.35 var(--text); resize: vertical; }
#acct .af input:focus, #acct .af textarea:focus { border-color: var(--sun); outline: none; }
#acct .hint { margin: 0; font-size: 13px; color: var(--dim); }
#acct .avail { font: 400 13px/1 var(--text); color: var(--dim); }
#acct .avail.ok { color: var(--mint); }
#acct .avail.bad { color: #ff8a70; }
#acct .ack { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
#acct .ack input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--sun); flex: none; }
#acct .arow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
#acct .abtn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 16px; font: 400 21px/1 var(--display); letter-spacing: .02em; color: var(--paper); background: none; border: 2px solid var(--paper); text-decoration: none; cursor: pointer; text-align: center; }
#acct .abtn.pri { background: var(--sun); border-color: var(--sun); color: var(--ink); }
#acct .abtn.warn { background: var(--hot); border-color: var(--hot); color: #fff; }
#acct .abtn:hover:not(:disabled), #acct .abtn:focus-visible { background: var(--paper); border-color: var(--paper); color: var(--ink); outline: none; }
#acct .abtn:disabled { opacity: .45; cursor: default; }
#acct :focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
#acct .wlist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
#acct .wbtn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 12px; background: var(--ink2); border: 2px solid #3a3a48; color: var(--paper); font: 400 21px/1.1 var(--display); letter-spacing: .02em; text-align: left; cursor: pointer; }
#acct .wbtn small { display: block; font: 400 13px/1.3 var(--text); color: var(--dim); letter-spacing: 0; }
#acct .wbtn:hover:not(:disabled), #acct .wbtn:focus-visible { border-color: var(--sun); background: #2a2a37; color: var(--paper); outline: none; }
#acct .wbtn:disabled { opacity: .5; }
#acct .wi { flex: none; display: grid; place-items: center; width: 28px; height: 28px; background: var(--sea); color: var(--ink); font: 400 14px/1 var(--display); }
#acct .wi.local { background: var(--sun); }
#acct img.wi { background: none; }
#acct .empty { padding: 12px; background: var(--ink2); margin-bottom: 12px; }
#acct .empty p { margin: 0 0 6px; }
#acct .alinks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 16px; }
#acct .alink { padding: 6px 0; min-height: 32px; font: 400 14px/1.3 var(--text); color: var(--sea); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
#acct .alink:hover, #acct .alink:focus-visible { color: var(--sun); background: none; outline: none; }
#acct .astatus:empty { display: none; }
#acct .modes { display: grid; gap: 10px; margin: 0 0 14px; }
#acct .mode { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 14px; background: var(--ink2); border: 2px solid #3a3a48; color: var(--paper); text-align: left; cursor: pointer; }
#acct .mode .mi { flex: none; display: grid; place-items: center; width: 44px; height: 44px; background: #3a3a48; color: var(--paper); }
#acct .mode.pri .mi { background: var(--sun); color: var(--ink); }
#acct .mode .mt { display: grid; gap: 4px; min-width: 0; }
#acct .mode b { font: 400 24px/1 var(--display); letter-spacing: .02em; font-weight: 400; }
#acct .mode small { font: 400 14px/1.4 var(--text); color: var(--dim); }
#acct .mode:hover, #acct .mode:focus-visible { border-color: var(--sun); background: #2a2a37; outline: none; }
#acct .mode.pri { border-color: var(--sun); }
#acct .amsg { margin: 0 0 6px; font-size: 14px; color: var(--dim); }
#acct .amsg.err { color: #ff8a70; }
#acct .amsg.ok { color: var(--mint); }
#acct .secret { margin: 8px 0 10px; padding: 12px; background: #2a1712; border: 2px solid var(--hot); color: #ffd9cf; font: 400 15px/1.45 var(--text); overflow-wrap: anywhere; user-select: all; }
#acct .kvA { display: grid; gap: 2px; margin: 0; font-size: 13px; }
#acct .kvA span { color: var(--dim); }
#acct .kvA b { font-weight: 400; overflow-wrap: anywhere; }

#phoneBtn { position: relative; }

@media (max-width: 560px) {
  #phone { right: 12px; left: 12px; bottom: 12px; width: auto; height: min(588px, calc(100vh - 24px)); }
  #peek { right: 12px; left: 12px; bottom: 12px; width: auto; }
  #chatfeed { bottom: 190px; left: 12px; width: calc(100vw - 24px); font-size: 13px; }
  #acct .sheet { padding: 20px 16px 18px; }
  #acct h2 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  #phone, #phone.out, #peek, #peek.out, #acct .sheet { animation: none; }
  #chatfeed p { transition: none; }
}

#touch { display: none; }
body.touch { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
body.touch canvas { touch-action: none; }
body.touch button, body.touch a { touch-action: manipulation; }
body.touch #hud { z-index: 6; }
body.touch.tplay #touch { display: block; position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#touch .tzone { position: absolute; pointer-events: auto; touch-action: none; }
#touch .tzone.cam { inset: 0; }
#touch .tzone.left { left: 0; bottom: 0; width: min(44vw, 320px); height: min(64vh, 270px); }
#touch .stick { position: absolute; left: calc(34px + env(safe-area-inset-left)); bottom: calc(28px + env(safe-area-inset-bottom)); width: 116px; height: 116px; background: rgba(20, 20, 28, .34); border: 3px solid rgba(244, 234, 210, .55); clip-path: var(--step); pointer-events: none; }
#touch .stick.on { background: rgba(20, 20, 28, .5); border-color: var(--paper); }
#touch .stick i { position: absolute; left: 30px; top: 30px; width: 50px; height: 50px; background: var(--sun); border: 3px solid var(--ink); will-change: transform; }
#touch .tpad { position: absolute; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); width: 236px; height: 210px; pointer-events: none; }
#touch .tb { position: absolute; display: grid; place-items: center; padding: 0; pointer-events: auto; font: 400 18px/1 var(--display); letter-spacing: .03em; color: var(--paper); background: rgba(20, 20, 28, .62); border: 3px solid rgba(244, 234, 210, .8); clip-path: var(--step); text-align: center; text-shadow: 2px 2px 0 var(--ink); transition: transform .08s; }
#touch .tb.big { right: 0; bottom: 0; width: 98px; height: 98px; font-size: 22px; background: rgba(226, 66, 28, .78); border-color: var(--paper); }
#touch .tb.mid { width: 70px; height: 70px; }
#touch .tb.mid:nth-of-type(2) { right: 14px; bottom: 112px; }
#touch .tb.mid:nth-of-type(3) { right: 112px; bottom: 6px; }
#touch .tb.small { right: 112px; bottom: 100px; width: 62px; height: 62px; font-size: 15px; }
#touch .tb.on { background: var(--sun); color: var(--ink); text-shadow: none; transform: scale(.94); }
#touch .tb:hover:not(.on) { background: rgba(20, 20, 28, .62); color: var(--paper); }
#touch .tb.big:hover:not(.on) { background: rgba(226, 66, 28, .78); }
#touch .ttop { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; pointer-events: none; }
#touch .tb.tiny { position: static; min-width: 64px; height: 40px; padding: 0 10px; font-size: 16px; background: rgba(20, 20, 28, .75); border-width: 2px; }
body.phone-open #touch .tpad { display: none; }

body.touch #bottomleft { left: calc(8px + env(safe-area-inset-left)); top: calc(8px + env(safe-area-inset-top)); bottom: auto; transform: scale(.7); transform-origin: top left; }
body.touch #topright { right: calc(12px + env(safe-area-inset-right)); top: 8px; transform: scale(.78); transform-origin: top right; }
body.touch #weapon { pointer-events: auto; }
body.touch #dialog { pointer-events: auto; bottom: calc(10px + env(safe-area-inset-bottom)); width: min(46vw, 520px); padding: 10px 14px 18px; }
body.touch #dialog span { font-size: 14px; }
body.touch #dialog i::before { content: "Tap "; }
body.touch #help { left: 50%; top: 56px; transform: translateX(-50%); max-width: 46vw; font-size: 12px; padding: 8px 10px; }
body.touch #objective { bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 42vw; font-size: 13px; padding: 7px 12px 8px; }
body.touch #objective::before { font-size: 12px; padding: 2px 8px 1px; }
body.touch #controls dl.kctl, body:not(.touch) #controls dl.tctl { display: none; }
body.touch #zone { display: block; right: auto; left: 50%; bottom: auto; top: 54px; transform: translateX(-50%); font-size: 22px; white-space: nowrap; }
body.touch #vehname { right: auto; left: 50%; bottom: auto; top: 82px; transform: translateX(-50%); font-size: 18px; }
body.touch #timer { top: 52px; }
body.touch #radio { top: 104px; font-size: 18px; }
body.touch #big { top: 22%; }
body.touch #chatfeed { left: calc(10px + env(safe-area-inset-left)); top: 138px; bottom: auto; width: 34vw; font-size: 12px; }
body.touch #phone { right: calc(10px + env(safe-area-inset-right)); top: calc(var(--vvtop, 0px) + 8px); bottom: auto; height: calc(var(--vh, 100vh) - 16px); width: 300px; left: auto; }
body.touch #peek { top: 56px; bottom: auto; right: calc(12px + env(safe-area-inset-right)); left: auto; width: 300px; }
body.touch #inv, body.touch #shop, body.touch #pause { max-height: calc(var(--vh, 100vh) - 20px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.touch #acct { top: var(--vvtop, 0px); bottom: auto; height: var(--vh, 100%); }
body.touch #acct .sheet { max-height: calc(var(--vh, 100vh) - 16px); -webkit-overflow-scrolling: touch; }
body.touch #phone .view, body.touch #menu { -webkit-overflow-scrolling: touch; }
#installTip { position: fixed; z-index: 85; left: 50%; top: calc(56px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); display: grid; gap: 6px; padding: 14px 16px; background: var(--sun); color: var(--ink); clip-path: var(--step); font: 400 14px/1.4 var(--text); animation: peekIn .18s var(--ease); }
#installTip b { font: 400 22px/1 var(--display); }

#rotate { position: fixed; inset: 0; z-index: 90; place-items: center; align-content: center; gap: 10px; padding: 24px; background: var(--ink); text-align: center; }
#rotate b { font: 400 34px/1.05 var(--display); color: var(--sun); text-wrap: balance; }
#rotate span { font: 400 15px/1.5 var(--text); color: var(--paper); }

@media (max-height: 520px) {
  #menu { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title nav" "acct nav" "note nav" "foot nav"; align-content: start; column-gap: 20px; padding: 14px calc(18px + env(safe-area-inset-right)) 14px calc(18px + env(safe-area-inset-left)); }
  #menu .title { grid-area: title; margin: 0; }
  #menu .kicker { font-size: 15px; margin-bottom: 6px; }
  #menu h1 { font-size: 52px; }
  #menu .tag { margin-top: 8px; font-size: 12px; line-height: 1.4; max-width: 46ch; }
  #menu .comm { margin-top: 10px; gap: 6px; width: min(400px, 100%); }
  #menu .comm .ca-box { min-height: 40px; padding: 4px 4px 4px 10px; }
  #menu .comm .ca-copy { min-height: 32px; min-width: 72px; padding: 6px 10px; font-size: 17px; }
  #menu .comm .soc { min-height: 40px; padding: 6px 10px; font-size: 18px; }
  #menu .comm .comm-note { min-height: 0; }
  #menu .comm .comm-note:empty { display: none; }
  #pause { width: min(760px, calc(100vw - 24px)); max-height: calc(var(--vh, 100vh) - 16px); grid-template-columns: 1fr 1fr; grid-template-areas: "h h" "r c" "g c" "q c"; align-items: start; gap: 8px 14px; padding: 12px 16px 14px; }
  #pause h2 { grid-area: h; margin: 0; font-size: 28px; }
  #btnResume { grid-area: r; }
  #btnGfx { grid-area: g; }
  #btnQuit { grid-area: q; }
  #pause button { padding: 9px 10px; font-size: 20px; }
  #pauseComm { grid-area: c; grid-row: 2 / span 3; margin: 0; }
  #pause > p { display: none; }
  #pause .comm .comm-note:empty { display: none; }
  #acct .sheet.wide { width: min(680px, 100%); }
  #acct .modes { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
  #acct .mode { padding: 10px; gap: 10px; }
  #acct .mode .mi { width: 36px; height: 36px; }
  #acct .mode .mi svg { width: 22px; height: 22px; }
  #acct .mode b { font-size: 20px; }
  #acct .mode small { font-size: 12px; line-height: 1.35; }
  #acct .sheet.wide .lead { margin-bottom: 10px; }
  #menu nav { grid-area: nav; align-self: center; margin: 0; }
  #menu nav button { font-size: 24px; padding: 6px 12px; }
  #acctbar { grid-area: acct; margin-top: 8px; padding: 8px 10px; }
  #menuNote { grid-area: note; margin-top: 6px; font-size: 12px; }
  #menu .foot { grid-area: foot; margin-top: 6px; font-size: 11px; }
  #controls { inset: 10px; width: auto; max-height: none; }
  #acct .sheet { max-height: calc(100vh - 16px); padding: 16px 18px; }
  #acct h2 { font-size: 28px; }
}
@media (max-height: 520px) {
  #phone .case { padding: 16px 10px 10px; }
  #phone .speaker { top: 6px; height: 4px; }
  #phone .h-clock { font-size: 38px; margin-top: 0; }
  #phone .h-sub { font-size: 12px; margin-bottom: 2px; }
  #phone .grid { gap: 6px; margin-top: 6px; }
  #phone .app { min-height: 58px; padding: 7px 4px 6px; gap: 3px; }
  #phone .app .ico { width: 22px; height: 22px; }
  #phone .app span { font-size: 15px; }
  #phone .dk { min-height: 40px; padding: 8px 4px; }
  #phone .view { padding: 8px 10px 12px; }
  #phone .ptitle h2 { font-size: 24px; }
  #phone .motd { display: none; }
}

#touch .ttop .tmenu { display: flex; gap: 6px; }
#touch .ttop.gear .tmenu { display: none; position: absolute; top: 50px; left: 50%; transform: translateX(-50%); flex-direction: column; align-items: stretch; gap: 6px; }
#touch .ttop.gear.open .tmenu { display: flex; animation: peekIn .16s var(--ease); }
#touch .ttop.gear .tmenu .tb.tiny { min-width: 140px; height: 44px; font-size: 18px; }
#touch .tb.gearbtn { position: static; width: 46px; min-width: 46px; height: 46px; padding: 0; }
#touch .tb.gearbtn .gico { width: 26px; height: 26px; fill: var(--paper); shape-rendering: crispEdges; }
#touch .ttop.open .tb.gearbtn { background: var(--sun); }
#touch .ttop.open .tb.gearbtn .gico { fill: var(--ink); }

#rotateTip { position: fixed; z-index: 70; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(380px, calc(100vw - 24px)); display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; background: var(--sun); color: var(--ink); clip-path: var(--step); pointer-events: auto; animation: peekIn .18s var(--ease); }
#rotateTip .rico { flex: none; width: 34px; height: 34px; fill: var(--ink); shape-rendering: crispEdges; }
#rotateTip .tipt { flex: 1; display: grid; gap: 2px; }
#rotateTip b { font: 400 21px/1 var(--display); }
#rotateTip span { font: 400 13px/1.35 var(--text); }
#rotateTip .tipx { flex: none; min-width: 52px; min-height: 42px; padding: 0 10px; background: var(--ink); color: var(--paper); border: 0; font: 400 18px/1 var(--display); text-align: center; }

@media (orientation: portrait) {
  body.touch #bottomleft { transform: scale(.6); }
  body.touch #topright { transform: scale(.66); }
  body.touch #touch .ttop { top: calc(112px + env(safe-area-inset-top)); left: auto; right: calc(10px + env(safe-area-inset-right)); transform: none; }
  body.touch #touch .ttop .tmenu { flex-direction: column; align-items: flex-end; }
  body.touch #touch .ttop.gear .tmenu { left: auto; right: 0; transform: none; }
  body.touch #touch .tpad { transform: scale(.86); transform-origin: bottom right; }
  body.touch #touch .stick { left: calc(20px + env(safe-area-inset-left)); bottom: calc(26px + env(safe-area-inset-bottom)); }
  body.touch #touch .tzone.left { width: 60vw; height: 42%; }
  body.touch #objective { bottom: calc(224px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
  body.touch #dialog { bottom: calc(220px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  body.touch #help { left: 12px; top: calc(118px + env(safe-area-inset-top)); transform: none; max-width: calc(100vw - 96px); }
  body.touch #zone { top: auto; bottom: calc(300px + env(safe-area-inset-bottom)); font-size: 20px; }
  body.touch #vehname { top: auto; bottom: calc(326px + env(safe-area-inset-bottom)); }
  body.touch #chatfeed { top: calc(200px + env(safe-area-inset-top)); width: calc(100vw - 96px); }
  body.touch #timer { top: calc(112px + env(safe-area-inset-top)); }
  body.touch #radio { top: calc(160px + env(safe-area-inset-top)); }
  body.touch #big { top: 26%; }
  body.touch #big h1 { font-size: 11vw; }
  body.touch #phone { left: 10px; right: 10px; width: auto; }
  body.touch #peek { left: 12px; right: 12px; width: auto; top: calc(112px + env(safe-area-inset-top)); }
  #rotateTip { top: calc(40% - 40px); }
}

#ifade { position: fixed; inset: 0; z-index: 95; background: #000; opacity: 0; pointer-events: none; }
#store { position: fixed; z-index: 45; left: calc(24px + env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); width: min(400px, calc(100vw - 32px)); max-height: calc(var(--vh, 100vh) - 48px); display: flex; flex-direction: column; background: rgba(20, 20, 28, .94); border: 3px solid var(--paper); box-shadow: 8px 8px 0 rgba(0, 0, 0, .45); color: var(--paper); font: 400 15px/1.4 var(--text); pointer-events: auto; animation: peekIn .18s var(--ease); }
#store header { padding: 16px 18px 8px; }
#store h2 { margin: 0; font: 400 38px/1 var(--display); color: var(--sun); letter-spacing: .02em; text-shadow: 3px 3px 0 #000; }
#store .scash { margin: 6px 0 0; font: 400 20px/1 var(--display); color: var(--mint); }
#store header, #store .stabs, #store .slabel, #store .sswatch, #store footer { flex: none; }
#store .stabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 18px 8px; }
#store .stab { padding: 8px 12px; min-height: 38px; font: 400 18px/1 var(--display); color: var(--dim); background: var(--ink2); border: 2px solid transparent; }
#store .stab[aria-selected="true"] { background: var(--sun); color: var(--ink); }
#store .stab:hover:not([aria-selected="true"]) { color: var(--paper); border-color: #3a3a48; background: var(--ink2); }
#store .slist { list-style: none; margin: 0; padding: 0 18px; display: grid; align-content: start; gap: 4px; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: var(--sun) transparent; }
#store .slist::-webkit-scrollbar { width: 6px; }
#store .slist::-webkit-scrollbar-thumb { background: var(--sun); }
#store .stabs { touch-action: pan-x; }
#store .srow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 8px 10px; background: var(--ink2); border: 2px solid transparent; color: var(--paper); font: inherit; text-align: left; cursor: pointer; }
#store .srow:hover, #store .srow:focus-visible { border-color: var(--sun); background: #2a2a37; color: var(--paper); outline: none; }
#store .srow.on { border-color: var(--sun); background: #33301e; }
#store .sw { flex: none; width: 26px; height: 26px; border: 2px solid var(--ink); box-shadow: 0 0 0 2px #3a3a48; }
#store .sw.none { background: repeating-linear-gradient(45deg, #3a3a48 0 4px, transparent 4px 8px); }
#store .sname { flex: 1; min-width: 0; display: grid; gap: 2px; font: 400 19px/1.1 var(--display); letter-spacing: .02em; }
#store .sname small { font: 400 12px/1.3 var(--text); color: var(--dim); letter-spacing: 0; }
#store .srow b { flex: none; font: 400 18px/1 var(--display); color: var(--mint); }
#store .srow b.tag { padding: 4px 8px; font-size: 15px; color: var(--ink); background: var(--paper); }
#store .srow.dim .sname { color: var(--dim); }
#store .snote { margin: 8px 18px 0; font: 400 13px/1.4 var(--text); color: var(--dim); }
#mapbar { position: fixed; z-index: 50; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: calc(100vw - 24px); pointer-events: auto; }
#mapbar[hidden] { display: none; }
#pfHud.in-top { align-self: flex-start; }
#mapbar button { min-width: 44px; min-height: 44px; padding: 8px 12px; font: 400 21px/1 var(--display); letter-spacing: .02em; color: var(--paper); background: rgba(20, 20, 28, .92); border: 2px solid var(--paper); cursor: pointer; }
@media (max-height: 560px) { #mapbar { top: calc(6px + env(safe-area-inset-top)); gap: 4px; } #mapbar button { min-width: 38px; min-height: 36px; padding: 6px 10px; font-size: 17px; } }
#mapbar button.pri { background: var(--sun); border-color: var(--sun); color: var(--ink); }
#mapbar button:hover, #mapbar button:focus-visible { background: var(--paper); border-color: var(--paper); color: var(--ink); outline: none; }
#orbitTip { position: fixed; z-index: 44; margin: 0; padding: 6px 12px; font: 600 13px/1.3 var(--text); color: var(--paper); background: rgba(20, 20, 28, .72); border: 2px solid rgba(244, 234, 210, .7); pointer-events: none; white-space: nowrap; }
#store .slabel { margin: 10px 18px 4px; font: 400 18px/1 var(--display); color: var(--sea); }
#store .sswatch { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px; }
#store .swb { width: 34px; height: 34px; padding: 0; border: 2px solid var(--ink); box-shadow: 0 0 0 2px #3a3a48; }
#store .swb[aria-checked="true"] { box-shadow: 0 0 0 3px var(--sun); }
#store footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; border-top: 2px solid #2c2c38; margin-top: 10px; }
#store .sbtn { flex: 1 1 auto; min-height: 48px; padding: 10px 14px; font: 400 21px/1 var(--display); letter-spacing: .02em; color: var(--paper); background: none; border: 2px solid var(--paper); text-align: center; }
#store .sbtn.pri { background: var(--sun); border-color: var(--sun); color: var(--ink); flex-basis: 100%; }
#store .sbtn:disabled { opacity: .45; cursor: default; }
#store .sbtn:hover:not(:disabled) { background: var(--paper); border-color: var(--paper); color: var(--ink); }
#store :focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
body.touch #store { top: calc(var(--vvtop, 0px) + 8px); transform: none; max-height: calc(var(--vh, 100vh) - 16px); width: min(380px, 46vw); }
@media (orientation: portrait) {
  body.touch #store { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 56vh; }
}
@media (max-width: 560px) {
  #store { left: 8px; right: 8px; top: auto; bottom: 8px; transform: none; width: auto; max-height: 60vh; }
}
@media (max-height: 560px) {
  #store header { padding: 10px 14px 4px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  #store h2 { font-size: 26px; text-shadow: 2px 2px 0 #000; }
  #store .scash { margin: 0; font-size: 17px; }
  #store .stabs { flex-wrap: nowrap; overflow-x: auto; padding: 0 14px 6px; scrollbar-width: none; }
  #store .stabs::-webkit-scrollbar { display: none; }
  #store .stab { flex: none; min-height: 34px; padding: 6px 10px; font-size: 16px; }
  #store .slist { padding: 0 14px; }
  #store .srow { min-height: 44px; padding: 6px 8px; }
  #store .sname { font-size: 17px; }
  #store .slabel { margin: 6px 14px 4px; font-size: 16px; }
  #store .sswatch { padding: 0 14px; }
  #store .swb { width: 30px; height: 30px; }
  #store footer { flex-wrap: nowrap; padding: 8px 14px 10px; margin-top: 6px; }
  #store .sbtn { min-height: 44px; padding: 8px 10px; font-size: 18px; }
  #store .sbtn.pri { flex: 2 1 0; }
  #store .sbtn:not(.pri) { flex: 1 1 0; }
}
@media (orientation: portrait) and (max-width: 560px) {
  #store h2 { font-size: 30px; }
  #store header { padding: 12px 16px 6px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  #store .scash { margin: 0; }
  #store .stabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #store .stabs::-webkit-scrollbar { display: none; }
  #store .stab { flex: none; }
}
@media (prefers-reduced-motion: reduce) { #store { animation: none; } }

@media (orientation: portrait) and (max-width: 560px) {
  #menu .kicker { font-size: 16px; margin-bottom: 8px; }
  #menu h1 { font-size: clamp(48px, 15vw, 80px); }
  #menu .tag { margin-top: 12px; font-size: 14px; }
  #menu .comm { margin-top: 14px; gap: 6px; }
  #menu .comm .ca-box, #menu .comm .soc { min-height: 44px; }
  #menu .comm .comm-note:empty { display: none; }
  #menu nav { margin-top: 14px; }
  #menu nav button { font-size: 26px; padding: 6px 14px; }
}
#upd { position: fixed; z-index: 95; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; width: max-content; max-width: calc(100vw - 24px); padding: 8px 8px 8px 14px; color: var(--ink); background: var(--sun); border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(0, 0, 0, .4); font: 600 14px/1.3 var(--text); pointer-events: auto; animation: peekIn .2s var(--ease); }
#upd button { min-height: 40px; padding: 8px 14px; font: 400 19px/1 var(--display); color: var(--paper); background: var(--ink); border: 2px solid var(--ink); text-align: center; }
#upd button.later { color: var(--ink); background: none; }
#upd button:hover, #upd button:focus-visible { color: var(--ink); background: var(--paper); outline: none; }
