:root { --bg: #070a16; --ink: #f3e2bd; --font: 'Jersey 15', monospace; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; user-select: none; }
#stage { position: absolute; inset: 0; touch-action: none; overflow: hidden; }      /* (the picture swaying, drunk, stays in it: on a phone it would widen the page) */
.px-canvas { display: block; image-rendering: pixelated; }
#title {
  position: absolute; left: 0; right: 0; top: 16%;
  text-align: center; font-size: 56px; letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(255, 190, 110, 0.45);
  pointer-events: none; transition: opacity 2.5s;
}
.gone { opacity: 0 !important; }
#pause {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(7, 8, 14, 0.62); text-align: center; padding: 16px;
  z-index: 40;      /* (over the HUD: the pockets, the badge, the doze list, the toast) */
}
#pause[hidden] { display: none; }
#pause .paused { font-size: 64px; text-shadow: 0 0 18px rgba(255, 190, 110, 0.45); }
#pause .resume { font-size: 20px; opacity: 0.8; margin-top: 6px; }
#pause .pz-tabs { display: flex; gap: 10px; margin-top: 18px; }
#pause .pz-tabs button { font: inherit; font-size: 20px; color: #e8dcc0; background: rgba(30, 32, 42, 0.9); border: 1px solid #4a4c58; border-radius: 10px; padding: 5px 16px; cursor: pointer; }
#pause .pz-tabs button.on { border-color: #c8a868; color: #ffe0a8; }
#pause .pz-panel { margin-top: 14px; max-width: min(760px, calc(100vw - 40px)); max-height: 50vh; overflow: auto; background: rgba(14, 15, 20, 0.92); border: 1px solid #2e303a; border-radius: 12px; padding: 12px 18px; font-size: 16px; line-height: 21px; color: #d8d0bc; text-align: left; }
#pause .pz-panel[hidden] { display: none; }
#pause .pz-panel td { padding: 3px 14px 3px 0; vertical-align: top; }
#pause .pz-panel td:first-child { color: #ffe0a8; white-space: nowrap; }
#pause .pz-panel tr.dev td { opacity: 0.55; }
#pause .pz-panel p { margin: 4px 0; }
#pause .pz-high { text-align: center; margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid #2e303a; }
#pause .pz-mark { display: inline-flex; align-items: center; gap: 0.45em; font-size: 26px; color: #f3e2bd; text-decoration: none; }
#pause .pz-mark img { height: 30px; width: auto; display: block; }
#pause .pz-mark:hover img { opacity: 0.75; }
#pause .pz-links { margin-top: 6px; font-size: 17px; color: #8a8c96; }
#pause .pz-links a { color: #c8a868; text-decoration: none; }
#pause .pz-links a:hover { color: #ffe0a8; }
#pause .pz-hint { margin-top: 14px; font-size: 15px; opacity: 0.55; }
/* The title: Nite Club, in yellow neon. The face has no é or à, so the
   accents are drawn over a plain e and a (.acc). */
@font-face { font-family: NiteClub; src: url(fonts/niteclub.ttf) format('truetype'); font-display: block; }
#title .dn {
  font-family: NiteClub, 'Jersey 15', sans-serif; font-size: 168px; line-height: 1; letter-spacing: 0.02em; white-space: nowrap;
  color: #fff7d6; text-shadow: none;
  filter: drop-shadow(0 0 3px #fffbe8) drop-shadow(0 0 10px #ffd84a) drop-shadow(0 0 24px #ffbf1f) drop-shadow(0 0 54px #b07a00);
}
#title .acc { position: relative; display: inline-block; }
#title .acc::before { content: ''; position: absolute; top: 0.16em; width: 0.034em; height: 0.17em; background: currentColor; border-radius: 0.02em; }
#title .acute::before { left: 52%; transform: rotate(42deg); }
#title .grave::before { left: 40%; transform: rotate(-42deg); }
#title .sub { font-size: 22px; letter-spacing: 1px; opacity: 0.75; margin-top: 18px; text-shadow: none; }

/* The phone: always in hand at the bottom right. */
#phone {
  position: absolute; right: 24px; bottom: 0; width: 280px; height: 440px; max-height: calc(100% - 40px);
  background: #0e0f14; border: 3px solid #2a2c34; border-bottom: none; border-radius: 22px 22px 0 0;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; overflow: hidden;
  transition: transform 0.35s ease;
  z-index: 7;       /* (over the tunnel's map, which a short window brings down onto it) */
}
/* Running: the phone goes down out of the way, just its top showing. */
#phone.away { transform: translateY(calc(100% - 34px)); }
.ph-bar { position: relative; display: flex; justify-content: flex-start; gap: 8px; align-items: center; min-height: 24px; padding: 10px 16px 4px; font-size: 18px; line-height: 24px; color: #e8e0cc; }
.ph-bar > .ph-time { margin-right: auto; }        /* the time on the left; the chevron in the middle; signal, battery on the right */
.ph-hide { position: absolute; left: 50%; top: calc(50% + 3px); transform: translate(-50%, -50%); width: 36px; height: 24px; padding: 0; margin: 0; background: none; border: 0; font-size: 0; color: #e8e0cc; cursor: pointer; opacity: 0.75; transition: transform 0.2s; display: flex; align-items: center; justify-content: center; }
.ph-hide::before { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.ph-hide:hover { opacity: 1; }
#phone.down .ph-hide { transform: translate(-50%, -50%) rotate(180deg); }
#phone.running .ph-hide { visibility: hidden; }
.ph-tabs { display: flex; gap: 4px; padding: 4px 12px 8px; }
.ph-tabs button { flex: 1; background: #1c1e26; border: none; color: #a8a49a; font: inherit; font-size: 17px; padding: 4px; border-radius: 8px; cursor: pointer; }
.ph-tabs button.on { background: #3a3e4c; color: #f3e2bd; }
.ph-tabs button.new { color: #ffd890; box-shadow: inset 0 -2px 0 #ffb860; }
@keyframes phlit { from { box-shadow: 0 0 40px rgba(255, 210, 140, 0.55); border-color: #6a5a40; } to { box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); border-color: #2a2c34; } }
#phone.lit { animation: phlit 1.6s ease-out; }
.ph-messages { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.ph-msg { background: #262a36; border-radius: 12px 12px 12px 3px; padding: 7px 10px; margin: 8px 30px 0 0; font-size: 17px; line-height: 19px; color: #ece6d6; }
.ph-mapwrap { flex: 1; position: relative; min-height: 0; }
.ph-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1c1e26; touch-action: none; cursor: grab; }
.ph-map:active { cursor: grabbing; }
.ph-mapwrap[hidden], .ph-messages[hidden] { display: none; }
.ph-search { position: absolute; left: 8px; right: 8px; top: 6px; }
.ph-search input { width: 100%; box-sizing: border-box; background: rgba(14, 15, 20, 0.92); border: 1px solid #3a3e4c; border-radius: 10px; color: #ece6d6; font: inherit; font-size: 15px; padding: 5px 9px; outline: none; }
.ph-search input:focus { border-color: #8a7a5a; }
.ph-results { margin-top: 3px; background: rgba(14, 15, 20, 0.96); border: 1px solid #2e303a; border-radius: 10px; overflow: hidden; }
.ph-results[hidden] { display: none; }
.ph-results button { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #1e2028; color: #ece6d6; font: inherit; font-size: 15px; padding: 4px 9px; cursor: pointer; }
.ph-results button:hover { background: #22242e; }
.ph-results i { font-style: normal; color: #7a7c86; font-size: 13px; }
.ph-zoom { position: absolute; right: 8px; top: 44px; display: flex; flex-direction: column; gap: 4px; }
.ph-zoom button { width: 28px; height: 28px; background: rgba(14, 15, 20, 0.85); border: 1px solid #3a3e4c; border-radius: 8px; color: #ece6d6; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.ph-route { position: absolute; left: 8px; right: 8px; bottom: 22px; background: rgba(14, 15, 20, 0.94); border: 1px solid #2e303a; border-radius: 12px; padding: 6px 8px; }
.ph-route[hidden] { display: none; }
.ph-dest { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: #5ae0c0; }
.ph-dest span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-go { margin-left: auto; margin-right: 6px; background: #2a6a58; border: 0; border-radius: 8px; color: #eafff8; font: inherit; font-size: 14px; padding: 2px 10px; cursor: pointer; }
.ph-go.on { background: #6a3a34; }
.ph-x { background: none; border: 0; color: #a8a49a; font: inherit; font-size: 20px; cursor: pointer; line-height: 1; }
.ph-modes { display: flex; gap: 4px; margin-top: 4px; }
.ph-modes button { flex: 1; display: flex; flex-direction: column; align-items: flex-start; background: #1c1e26; border: 1px solid transparent; border-radius: 8px; color: #ece6d6; font: inherit; padding: 3px 6px; cursor: pointer; }
.ph-modes button b { font-weight: normal; font-size: 15px; }
.ph-modes button span { font-size: 12px; color: #a8a49a; }
.ph-modes button.on { border-color: #8a7a5a; background: #2a2a30; }
.ph-modes button.off { opacity: 0.5; cursor: default; }
.ph-ride { font-size: 13px; color: #c8c4b8; margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.ph-ride i { width: 10px; height: 10px; border-radius: 50%; flex: none; }


#end {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(30, 34, 46, 0.85); text-align: center;
  z-index: 40;
}
#end[hidden] { display: none; }
#end .paused { font-size: 72px; }
#end .resume { font-size: 24px; margin-top: 6px; }
#end .sub { font-size: 18px; opacity: 0.6; margin: 6px 0 18px; }
#end button { font: inherit; font-size: 22px; color: #f3e2bd; background: #2a2e3c; border: 2px solid #4a4e5c; border-radius: 10px; padding: 6px 18px; cursor: pointer; }

/* Messages: a list of conversations, and a conversation. */
.ph-messages { display: flex; flex-direction: column; padding: 0; }
.ph-list { flex: 1; overflow-y: auto; }
.ph-list[hidden], .ph-convo[hidden] { display: none; }
.ph-empty { text-align: center; opacity: 0.4; margin-top: 40px; font-size: 17px; }
.ph-row { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #1e2028; cursor: pointer; }
.ph-row:hover { background: #181a22; }
.ph-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; color: #f3ead8; }
.ph-mid { flex: 1; min-width: 0; }
.ph-top { display: flex; align-items: center; gap: 6px; }
.ph-rname { flex: 1; font-size: 17px; color: #ece6d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-rtime { font-size: 13px; opacity: 0.5; }
.ph-badge { background: #e8a040; color: #1a1410; font-size: 13px; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.ph-prev { font-size: 14px; line-height: 17px; color: #a8a49a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-row.unread .ph-rname, .ph-row.unread .ph-prev { color: #fff4dc; }
.ph-convo { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ph-head { display: flex; align-items: center; gap: 8px; padding: 4px 10px 8px; border-bottom: 1px solid #1e2028; }
.ph-head .ph-avatar { width: 26px; height: 26px; font-size: 15px; }
.ph-back { background: none; border: none; color: #e8c890; font: inherit; font-size: 28px; line-height: 20px; cursor: pointer; padding: 0 4px; }
.ph-name { font-size: 18px; color: #ece6d6; }
.ph-bubbles { flex: 1; overflow-y: auto; padding: 4px 12px 14px; }
.ph-stamp { text-align: center; font-size: 13px; opacity: 0.45; margin: 10px 0 2px; }
.ph-bubbles .ph-msg { margin: 5px 34px 0 0; width: fit-content; max-width: 100%; }
.ph-bubbles .ph-msg.me { margin: 5px 0 0 auto; background: #3a4a6a; border-radius: 12px 12px 3px 12px; color: #eef0f6; }
.ph-replies { display: flex; flex-direction: column; gap: 4px; padding: 6px 10px 10px; border-top: 1px solid #1e2028; }
.ph-replies[hidden] { display: none; }
.ph-replies button { text-align: left; background: #2a3450; border: none; color: #eef0f6; font: inherit; font-size: 15px; padding: 5px 9px; border-radius: 10px; cursor: pointer; }
.ph-replies button b { color: #ffd890; font-weight: normal; margin-right: 4px; }
.ph-replies button:hover { background: #34406a; }

/* Talk in the street: bubbles over heads, the prompt, the choices. */
#bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bubble {
  position: absolute; left: 0; top: 0; max-width: 260px; padding: 5px 10px 6px; margin-top: -10px;
  background: rgba(240, 232, 214, 0.94); color: #1a1614; border-radius: 12px; font-size: 18px; line-height: 19px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); transition: opacity 0.2s;
}
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: rgba(240, 232, 214, 0.94); }
.bubble.me { background: rgba(200, 214, 240, 0.95); }
.bubble.me::after { border-top-color: rgba(200, 214, 240, 0.95); }
#prompt { position: absolute; left: 0; top: 0; pointer-events: none; font-size: 17px; color: #ffe9b0; background: rgba(14, 15, 20, 0.75); padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
#prompt[hidden], #choices[hidden], #hint[hidden] { display: none; }
#hint { position: absolute; left: 0; top: 0; pointer-events: none; font-size: 17px; color: #c8e0ff; background: rgba(14, 15, 20, 0.75); padding: 2px 8px; border-radius: 8px; white-space: nowrap; }

/* The screen going dark while time passes (a ride, getting lost). */
#fade { position: fixed; inset: 0; background: #050507; opacity: 0; pointer-events: none; transition: opacity 1.1s ease; display: flex; align-items: center; justify-content: center; z-index: 30; }
#fade.on { opacity: 1; pointer-events: auto; }
#fade p { color: #d8d0bc; font-size: 30px; letter-spacing: 0.04em; }

/* The metro: the network's map. */
#metro { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1180px, calc(100vw - 32px)); height: min(820px, calc(100vh - 40px)); display: flex; flex-direction: column; background: rgba(12, 13, 18, 0.97); border: 1px solid #2e303a; border-radius: 14px; padding: 14px 18px; z-index: 25; color: #e8e0cc; box-sizing: border-box; }
#metro[hidden] { display: none; }
.mx-head, .mx-info, .mx-foot { flex: none; }
.mx-title { display: flex; align-items: center; gap: 10px; font-size: 28px; line-height: 1.2; white-space: nowrap; overflow: hidden; }
.mx-chips { display: inline-flex; gap: 3px; flex: none; }
.mx-name { overflow: hidden; text-overflow: ellipsis; }
.mx-sub { color: #8a8c96; font-size: 16px; margin-top: 2px; }
.mx-chip { display: inline-block; width: 16px; height: 16px; border-radius: 50%; }
.mx-map { flex: 1; width: 100%; min-height: 0; margin-top: 10px; border-radius: 10px; background: #14161e; }
.mx-info { min-height: 46px; margin-top: 8px; font-size: 16px; color: #e8e0cc; }
.mx-trip { font-size: 18px; color: #fff4dc; }
.mx-leg { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; color: #c8c4b8; }
.mx-leg i { width: 12px; height: 12px; border-radius: 50%; }
.mx-foot { color: #6a6c76; font-size: 14px; margin-top: 4px; text-align: right; }
#choices { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; min-width: 320px; max-width: 520px; }
#choices button { text-align: left; font: inherit; font-size: 19px; color: #f3e2bd; background: rgba(20, 22, 30, 0.92); border: 2px solid #3a3e4c; border-radius: 10px; padding: 6px 12px; cursor: pointer; }
#choices button:hover { border-color: #8a7a5a; }
#choices button b { color: #ffd890; font-weight: normal; margin-right: 6px; }

/* Directions on the street, while a way is being followed. */
#nav { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(12, 14, 18, 0.85); border: 1px solid #2a6a58; border-radius: 12px; padding: 6px 16px; font-size: 20px; color: #dffaf2; white-space: nowrap; pointer-events: none; display: flex; align-items: center; gap: 10px; }
#nav[hidden] { display: none; }
#nav.under { top: 86px; }      /* (under the metro's line, underground) */
#nav b { font-size: 26px; color: #5ae0c0; font-weight: normal; line-height: 1; }
#nav span { color: #8fb8ad; font-size: 16px; }

/* A shop's counter, the cash machine (shop.js). */
#shop { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: rgba(12, 13, 18, 0.97); border: 1px solid #2e303a; border-radius: 14px; padding: 14px 18px 10px; z-index: 25; color: #e8e0cc; box-sizing: border-box; box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); }
#shop[hidden] { display: none; }
#shop button { font: inherit; cursor: pointer; }
.sh-head, .sh-purse, .sh-pay, .sh-result, .sh-foot { flex: none; }
.sh-title { display: flex; align-items: center; gap: 10px; font-size: 28px; line-height: 1.2; }
.sh-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff4dc; }
.sh-x { background: none; border: 0; color: #a8a49a; font-size: 28px !important; line-height: 1; padding: 0 2px; }
.sh-x:hover { color: #fff4dc; }
.sh-sub { color: #8a8c96; font-size: 16px; margin-top: 2px; }
.sh-purse { display: flex; gap: 18px; margin-top: 10px; padding: 6px 10px; background: #14161e; border-radius: 10px; font-size: 16px; color: #a8a49a; }
.sh-purse b { font-weight: normal; color: #ffe0a8; margin-left: 4px; }
.sh-time { margin-left: auto; color: #6a6c76; }
.sh-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.sh-item { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; background: #1a1c24; border: 1px solid transparent; border-radius: 9px; color: #ece6d6; font-size: 19px !important; padding: 5px 10px; }
.sh-item:hover { background: #20222c; }
.sh-item.on { background: #2a2a30; border-color: #8a7a5a; color: #fff4dc; }
.sh-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-have { font-size: 15px; color: #8fb8ad; }
.sh-p { color: #ffe0a8; min-width: 52px; text-align: right; }
.sh-pay { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.sh-how { display: flex; gap: 4px; }
.sh-how button { background: #1c1e26; border: 1px solid transparent; border-radius: 8px; color: #a8a49a; font-size: 17px; padding: 4px 14px; }
.sh-how button.on { background: #3a3e4c; border-color: #8a7a5a; color: #f3e2bd; }
.sh-only { font-size: 16px; color: #c8a868; }
.sh-buy { margin-left: auto; background: #2a6a58; border: 0; border-radius: 9px; color: #eafff8; font-size: 18px; padding: 5px 16px; }
.sh-buy:hover { background: #327a66; }
.sh-result { min-height: 24px; margin-top: 8px; font-size: 18px; }
.sh-result.ok { color: #5ae0c0; }
.sh-result.no { color: #ff8a7a; }
@keyframes shflash { from { opacity: 0.2; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.sh-result.flash { animation: shflash 0.25s ease-out; }
.sh-foot { color: #6a6c76; font-size: 14px; margin-top: 2px; text-align: right; }
/* The cash machine's screen. */
.sh-atm { margin-top: 10px; padding: 12px 14px; background: #0c1a1e; border: 1px solid #1e3a40; border-radius: 10px; }
.at-top { display: flex; align-items: center; gap: 16px; }
.at-lbl { font-size: 15px; color: #7aa8a8; }
.at-lbl b { font-weight: normal; color: #ffe0a8; margin-left: 4px; }
.at-sum { font-size: 40px; line-height: 1; color: #dffaf2; margin: 2px 0 4px; }
.at-ask { margin-top: 12px; }
.at-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.at-grid button { display: flex; align-items: center; gap: 10px; background: #12282e; border: 1px solid #1e3a40; border-radius: 9px; color: #dffaf2; font-size: 24px; padding: 6px 12px; }
.at-grid button b { font-weight: normal; font-size: 15px; color: #5ae0c0; }
.at-grid button span { margin-left: auto; }
.at-grid button.on { border-color: #5ae0c0; background: #183a40; }
.at-grid button.off { opacity: 0.4; }
.at-fee { font-size: 15px; color: #7aa8a8; margin-top: 10px; }

/* A bank card, drawn (the ATM, the phone's Bank). */
.bk-card { position: relative; flex: none; width: 150px; height: 94px; border-radius: 8px; background: linear-gradient(135deg, #2e6a72 0%, #1c3e52 55%, #182a3e 100%); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08); color: #e8f4f0; overflow: hidden; }
.bk-card::after { content: ''; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); }
.bk-bank { position: absolute; left: 10px; top: 7px; font-size: 14px; letter-spacing: 1px; }
.bk-chip { position: absolute; left: 11px; top: 32px; width: 22px; height: 16px; border-radius: 3px; background: linear-gradient(135deg, #e8cf8a, #a88a48); }
.bk-num { position: absolute; left: 10px; bottom: 7px; font-size: 15px; letter-spacing: 1px; }
.bk-kind { position: absolute; right: 10px; bottom: 7px; font-size: 11px; opacity: 0.7; letter-spacing: 1px; }
.bk-card.small { width: 128px; height: 80px; }
.bk-card.small .bk-chip { top: 27px; }

/* The phone's Bank. */
.ph-bank { flex: 1; overflow-y: auto; padding: 4px 12px 14px; }
.ph-bank[hidden] { display: none; }
.pb-top { display: flex; align-items: center; gap: 12px; padding: 4px 0 10px; }
.pb-sums { min-width: 0; }
.pb-lbl { font-size: 13px; color: #8a8c96; }
.pb-bal { font-size: 26px; line-height: 1; color: #fff4dc; margin-bottom: 6px; }
.pb-h { font-size: 14px; color: #8a8c96; letter-spacing: 1px; text-transform: uppercase; margin: 8px 0 2px; padding-bottom: 3px; border-bottom: 1px solid #1e2028; }
.pb-row { display: flex; align-items: baseline; gap: 7px; padding: 4px 0; border-bottom: 1px solid #16181e; font-size: 15px; }
.pb-t { flex: none; font-size: 13px; color: #6a6c76; }
.pb-m { flex: 1; min-width: 0; color: #ece6d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-m small { display: block; font-size: 12px; color: #7a7c86; }
.pb-a { flex: none; color: #ece6d6; }
.pb-row.declined .pb-m { color: #a8a49a; }
.pb-row.declined .pb-a { color: #6a6c76; text-decoration: line-through; }
.pb-tag { color: #ff8a7a; font-size: 12px; margin-left: 4px; }
.pb-row.atm .pb-a { color: #8fb8ad; }
.pb-empty { font-size: 14px; color: #6a6c76; padding: 6px 0; }
.pb-none { text-align: center; opacity: 0.4; margin-top: 40px; font-size: 17px; }

/* What you're carrying: down the left of the screen. */
#pockets { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 6; min-width: 150px; max-width: min(240px, 40vw); max-height: 60vh; overflow-y: auto; background: rgba(14, 15, 20, 0.82); border: 1px solid #2e303a; border-radius: 12px; padding: 8px 12px 10px; font-family: "Jersey 15", monospace; color: #e8e0cc; pointer-events: none; }
#pockets[hidden] { display: none; }
.pk-h { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8c96; margin-bottom: 4px; }
.pk-row { display: flex; justify-content: space-between; gap: 10px; font-size: 17px; line-height: 21px; }
.pk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-n { color: #c8a868; }
.pk-cash { color: #ffd890; padding-bottom: 3px; margin-bottom: 3px; border-bottom: 1px solid #2e303a; }

/* ---------- Things to do in places (js/systems: arcade, gambling, food, jukebox, battery, sights, overheard) ---------- */
/* Places named on the phone: links to the map. */
.ph-link { color: #8fd8c4; text-decoration: underline; text-decoration-color: rgba(143, 216, 196, 0.45); text-underline-offset: 2px; cursor: pointer; }
.ph-link:hover { color: #c8fff0; text-decoration-color: #c8fff0; }
.ph-msg.me .ph-link { color: #cfe4ff; text-decoration-color: rgba(207, 228, 255, 0.5); }
/* The phone's tabs: four now. */
.ph-tabs button { font-size: 16px; padding: 4px 2px; }
/* The battery, in the top bar. */
/* The signal: four bars, filled to the level; none, a cross. */
.ph-net { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; font-size: 0; }
.ph-net i { width: 3px; background: #4a4c56; border-radius: 1px; }
.ph-net i:nth-child(1) { height: 4px; } .ph-net i:nth-child(2) { height: 6px; } .ph-net i:nth-child(3) { height: 9px; } .ph-net i:nth-child(4) { height: 12px; }
.ph-net.s1 i:nth-child(-n+1), .ph-net.s2 i:nth-child(-n+2), .ph-net.s3 i:nth-child(-n+3), .ph-net.s4 i { background: #e8e0cc; }
.ph-net.s1 i:nth-child(1) { background: #ff9a7a; }
.ph-net.s0 { position: relative; }
.ph-net.s0::after { content: '×'; position: absolute; left: -9px; top: -6px; font-size: 13px; color: #ff8a7a; }
.ph-nosig { position: absolute; left: 8px; right: 8px; top: 40px; background: rgba(40, 16, 14, 0.92); border: 1px solid #6a3a34; border-radius: 8px; color: #ffb0a0; font-size: 14px; text-align: center; padding: 3px 6px; pointer-events: none; }
.ph-nosig[hidden] { display: none; }
#phone.nosig .ph-map { filter: grayscale(0.7) brightness(0.7); }
.ph-batt { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: #c8c4b8; }
.ph-batt i { position: relative; width: 20px; height: 10px; border: 1px solid #a8a49a; border-radius: 2px; display: inline-block; }
.ph-batt i::after { content: ''; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px; background: #a8a49a; border-radius: 0 1px 1px 0; }
.ph-batt u { position: absolute; left: 1px; top: 1px; bottom: 1px; max-width: calc(100% - 2px); background: #c8e0b0; border-radius: 1px; }
.ph-batt.low u { background: #ff7a5a; }
.ph-batt.low b { color: #ff9a7a; }
.ph-batt.charging u { background: #7affc8; }
.ph-batt.charging b::after { content: ' ⚡'; color: #ffd84a; }
#phone.low > :not(.ph-bar):not(.ph-dead) { filter: brightness(0.6) saturate(0.7); }
.ph-dead { position: absolute; inset: 34px 0 0 0; background: #050507; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #6a6c76; font-size: 18px; text-align: center; padding: 0 24px; }
.ph-dead[hidden] { display: none; }
.ph-dead small { font-size: 13px; color: #4a4c56; line-height: 16px; }
.ph-deadbatt { width: 44px; height: 20px; border: 2px solid #6a3a34; border-radius: 4px; position: relative; }
.ph-deadbatt i { position: absolute; left: 2px; top: 2px; bottom: 2px; width: 4px; background: #c83a2a; animation: phblink 1.2s steps(2) infinite; }
@keyframes phblink { 50% { opacity: 0; } }
#phone.dead .ph-time { opacity: 0.25; }
/* Notes: what you know will happen tonight. */
.ph-notes { flex: 1; overflow-y: auto; padding: 4px 12px 14px; }
.ph-notes[hidden] { display: none; }
.pn-empty { text-align: center; color: #6a6c76; margin-top: 34px; font-size: 17px; padding: 0 8px; }
.pn-empty small { display: block; font-size: 13px; line-height: 16px; margin-top: 8px; color: #4e505a; }
.pn-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid #16181e; }
.pn-row.has-where { cursor: pointer; }
.pn-row.has-where:hover { background: #14161c; }
.pn-t { flex: none; width: 46px; font-size: 18px; line-height: 19px; color: #ffe0a8; }
.pn-t i { display: block; font-style: normal; font-size: 12px; line-height: 14px; color: #8fd8c4; }
.pn-mid { flex: 1; min-width: 0; }
.pn-text { font-size: 16px; line-height: 18px; color: #ece6d6; }
.pn-where { font-size: 13px; line-height: 16px; margin-top: 1px; }
.pn-from { font-size: 12px; line-height: 15px; color: #7a7c86; }
.pn-row.now { background: rgba(90, 224, 192, 0.07); box-shadow: inset 3px 0 0 #5ae0c0; padding-left: 6px; }
.pn-row.now .pn-t i { color: #5ae0c0; }
.pn-row.near .pn-t { color: #ffd36a; }
.pn-row.near .pn-text { color: #fff4dc; }
.pn-row.any .pn-t { color: #6a6c76; }
.pn-row.past { opacity: 0.45; }
.pn-row.past .pn-t { color: #8a8c96; }
/* Pockets: things to use, how you are. */
#pockets .pk-use { pointer-events: auto; cursor: pointer; border-radius: 6px; margin: 0 -6px; padding: 0 6px; }
#pockets .pk-use:hover { background: rgba(255, 224, 168, 0.1); }
#pockets .pk-verb { color: #8fd8c4; font-size: 13px; opacity: 0; transition: opacity 0.15s; }
#pockets .pk-use:hover .pk-verb { opacity: 1; }
#pockets .pk-use:hover .pk-n { display: none; }
.pk-tip { font-size: 12px; color: #5a5c66; margin-top: 4px; }
.pk-st { margin-top: 6px; padding-top: 5px; border-top: 1px solid #2e303a; font-size: 14px; line-height: 17px; }
.pk-st .pk-boost { color: #7affc8; }
.pk-st .pk-drunk { color: #ffb07a; }
.pk-st .pk-warm { color: #ffd890; }
.pk-st .pk-sit { color: #a8b8ff; }
/* A line of text at the bottom. */
#pl-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 8px); max-width: min(560px, calc(100vw - 380px)); background: rgba(14, 15, 20, 0.86); border: 1px solid #2e303a; border-radius: 10px; padding: 5px 14px; font-size: 18px; line-height: 21px; color: #e8e0cc; text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.3s, transform 0.3s; z-index: 20; }
#pl-toast.on { opacity: 1; transform: translate(-50%, 0); }
/* Talk overheard: small, faint, drifting up. */
.overheard { position: absolute; left: 0; top: 0; max-width: 230px; font-size: 15px; line-height: 16px; color: #e8dcc0; font-style: italic; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, 0.8); text-align: center; pointer-events: none; transition: opacity 0.6s; }
.jb-notes { position: absolute; left: 0; top: 0; font-size: 22px; color: #ffb84a; text-shadow: 0 0 8px rgba(255, 150, 60, 0.8); pointer-events: none; }
.jb-notes[hidden] { display: none; }
/* The jukebox's card. */
.jb-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.jb-song { display: flex; align-items: center; gap: 12px; text-align: left; background: #1e1410; border: 1px solid #3a2818; border-radius: 9px; color: #f3e2bd; padding: 5px 10px; }
.jb-song:hover { background: #2a1c14; }
.jb-song.on { border-color: #ffb84a; background: #2e1e12; }
.jb-song b { font-weight: normal; color: #ff8a4a; font-size: 18px; width: 28px; }
.jb-song .jb-n { display: block; font-size: 19px; }
.jb-song small { display: block; font-size: 14px; color: #a88a68; }
#shop.jb { border-color: #5a3a20; background: rgba(20, 12, 8, 0.97); }
/* The arcade cabinet's screen. */
#shop.ar { width: min(700px, calc(100vw - 32px)); background: #0a0814; border: 2px solid #ff4ad8; box-shadow: 0 0 30px rgba(255, 74, 216, 0.35), 0 0 60px rgba(0, 0, 0, 0.7); padding: 10px 14px 8px; }
.ar-top { display: flex; align-items: center; justify-content: center; position: relative; }
.ar-title { font-size: 30px; letter-spacing: 4px; color: #ff7ae8; text-shadow: 0 0 10px #ff4ad8; }
.ar-top .sh-x { position: absolute; right: 0; top: 0; }
.ar-screen { display: block; width: 100%; aspect-ratio: 4 / 3; margin-top: 6px; border-radius: 10px; background: #07060e; box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8); cursor: none; }
.ar-foot { display: flex; justify-content: space-between; font-size: 14px; color: #8a82a8; margin-top: 6px; }
.ar-pay { color: #ffd84a; }
/* A scratch card. */
.sc-card { display: block; width: 100%; aspect-ratio: 300 / 190; margin-top: 10px; border-radius: 8px; cursor: crosshair; touch-action: none; }
/* The lottery ticket. */
.lo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 10px; }
.lo-grid button { background: #f4ecd8; color: #2a2a30; border: 1px solid #c8b890; border-radius: 6px; font-size: 18px; padding: 3px 0; }
.lo-grid button.on { background: #c83a3a; color: #fff4dc; border-color: #8a2020; }
.lo-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 16px; color: #ffe0a8; }
.lo-dip { margin-left: auto; background: #3a3e4c; border: 0; border-radius: 8px; color: #f3e2bd; font-size: 16px; padding: 3px 12px; }
/* Blackjack. */
.bj-table { margin-top: 10px; padding: 8px 12px 10px; background: radial-gradient(ellipse at 50% 30%, #2a6a3e, #143a22); border-radius: 12px; border: 3px solid #3a2418; min-height: 230px; }
.bj-lbl { font-size: 15px; color: #c8e8c8; margin-top: 4px; }
.bj-lbl span { color: #ffe0a8; margin-left: 6px; font-size: 18px; }
.bj-hand { display: flex; gap: 6px; min-height: 76px; margin-top: 3px; }
.bj-card { width: 50px; height: 72px; background: #f8f4ea; border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); color: #1a1a1e; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.bj-card b { font-weight: normal; font-size: 24px; }
.bj-card i { font-style: normal; font-size: 22px; }
.bj-card.red { color: #c02a2a; }
.bj-card.down { background: repeating-linear-gradient(45deg, #7a2a2a 0 4px, #5a1a1a 4px 8px); border: 3px solid #f8f4ea; }
.bj-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 16px; color: #a8a49a; }
.bj-bar b { font-weight: normal; color: #ffe0a8; }
.bj-stakes { margin-left: auto; display: flex; gap: 4px; }
.bj-stakes button, .bj-acts button { background: #1c1e26; border: 1px solid transparent; border-radius: 8px; color: #e8e0cc; font-size: 16px; padding: 3px 10px; }
.bj-stakes button b { font-weight: normal; font-size: 13px; color: #8fd8c4; }
.bj-stakes button.on { border-color: #8a7a5a; background: #2a2a30; }
.bj-acts { display: flex; gap: 6px; margin-top: 8px; }
.bj-acts button { flex: 1; font-size: 18px; padding: 5px; }
.bj-acts button:disabled { opacity: 0.35; cursor: default; }
.bj-acts button[data-a=deal] { background: #2a6a58; color: #eafff8; }

/* The street's life (js/systems/street.js, hours.js): a line at the foot of the screen, a choice, the last-train notice. */
#st-cap { position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 7; max-width: min(640px, 80vw); text-align: center; font-family: "Jersey 15", monospace; font-size: 19px; color: #f0e8d6; background: rgba(14, 15, 20, 0.78); padding: 4px 14px; border-radius: 10px; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
#st-cap.on { opacity: 1; }
#st-ask { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 8; display: flex; flex-direction: column; align-items: stretch; gap: 6px; max-width: min(560px, 86vw); font-family: "Jersey 15", monospace; }
#st-ask[hidden] { display: none; }
.st-ask-t { font-size: 17px; color: #c8c2b2; text-align: center; background: rgba(14, 15, 20, 0.8); padding: 4px 12px; border-radius: 8px; }
#st-ask button { font: inherit; font-size: 19px; text-align: left; color: #ffe9b0; background: rgba(14, 15, 20, 0.86); border: 1px solid #3a3c48; border-radius: 9px; padding: 5px 14px; cursor: pointer; }
#st-ask button:hover { border-color: #ffe9b0; }
#st-ask button b { color: #8a8c96; font-weight: normal; margin-right: 6px; }
/* Dozing off on a ride (js/systems/doze.js): sat down aboard, where to sleep till (1-3, or a click). */
#doze { position: fixed; left: 16px; bottom: 24px; z-index: 8; display: flex; flex-direction: column; align-items: stretch; gap: 4px; max-width: min(380px, 60vw); font-family: "Jersey 15", monospace; }
#doze[hidden] { display: none; }
#doze .dz-t { font-size: 15px; color: #8a8c96; padding: 0 4px; }
#doze button { font: inherit; font-size: 17px; text-align: left; color: #ffe9b0; background: rgba(14, 15, 20, 0.86); border: 1px solid #3a3c48; border-radius: 9px; padding: 3px 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#doze button:hover { border-color: #ffe9b0; }
#doze button b { color: #8a8c96; font-weight: normal; margin-right: 6px; }
#doze button span { color: #8a8c96; font-size: 15px; margin-left: 4px; }
#doze button.dz-up { color: #c8c4b8; }
.st-sign { position: absolute; left: 0; top: 0; pointer-events: none; font-family: "Jersey 15", monospace; font-size: 15px; letter-spacing: 0.04em; color: #ffd860; background: rgba(20, 16, 8, 0.82); border: 1px solid #806a20; padding: 1px 8px; border-radius: 4px; white-space: nowrap; }
.st-sign[hidden] { display: none; }
.st-sign.blink { animation: st-blink 1s steps(2) infinite; }
@keyframes st-blink { 50% { color: #fff4c0; border-color: #ffd860; } }
/* The phone's map: what a mark is, hovered or tapped. */
.ph-tip { position: absolute; left: 0; top: 0; z-index: 3; max-width: 210px; background: rgba(14, 15, 20, 0.95); border: 1px solid #3a3e4c; border-radius: 9px; padding: 4px 8px 5px; font-size: 13px; line-height: 15px; color: #c8c4b8; pointer-events: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.ph-tip[hidden] { display: none; }
.ph-tip b { display: block; font-weight: normal; font-size: 15px; line-height: 17px; color: #fff4dc; }
.ph-tip span { display: block; }
.ph-tip.tap { pointer-events: auto; cursor: pointer; }
.ph-tipgo { display: block; font-style: normal; color: #8fd8c4; margin-top: 3px; text-decoration: underline; text-decoration-color: rgba(143, 216, 196, 0.45); }
/* Getting about: the taxi's where-to (systems/taxi.js), like a shop's counter. */
#ride { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: rgba(12, 13, 18, 0.97); border: 1px solid #2e303a; border-top: 3px solid #d9a520; border-radius: 14px; padding: 12px 18px 10px; z-index: 25; color: #e8e0cc; box-sizing: border-box; box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); }
#ride[hidden] { display: none; }
#ride button { font: inherit; cursor: pointer; }
.rd-title { display: flex; align-items: center; gap: 10px; font-size: 28px; line-height: 1.2; flex: none; }
.rd-name { flex: 1; color: #ffd860; }
.rd-x { background: none; border: 0; color: #a8a49a; font-size: 28px !important; line-height: 1; padding: 0 2px; }
.rd-x:hover { color: #fff4dc; }
.rd-sub { color: #8a8c96; font-size: 16px; margin-top: 2px; flex: none; }
.rd-purse { display: flex; gap: 18px; margin-top: 10px; padding: 6px 10px; background: #14161e; border-radius: 10px; font-size: 16px; color: #a8a49a; flex: none; }
.rd-purse b { font-weight: normal; color: #ffe0a8; margin-left: 4px; }
.rd-time { margin-left: auto; color: #6a6c76; }
.rd-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.rd-item { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; background: #1a1c24; border: 1px solid transparent; border-radius: 9px; color: #ece6d6; font-size: 19px !important; padding: 5px 10px; }
.rd-item:hover { background: #20222c; }
.rd-item.on { background: #2a2a30; border-color: #8a7a5a; color: #fff4dc; }
.rd-item.dear .rd-p { color: #a86a5a; }
.rd-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-k { font-size: 14px; color: #7a7c86; white-space: nowrap; }
.rd-p { color: #ffe0a8; min-width: 52px; text-align: right; }
.rd-result { min-height: 24px; margin-top: 8px; font-size: 18px; flex: none; }
.rd-result.no { color: #ff8a7a; }
.rd-foot { color: #6a6c76; font-size: 14px; margin-top: 2px; text-align: right; flex: none; }
@media (max-width: 520px) { .rd-k { display: none; } }

/* ---------- Achievements (js/achievements.js): the pop when one's done, the pause menu's list ---------- */
#ach-pop { position: fixed; top: 22px; left: 50%; transform: translate(-50%, -12px); min-width: 280px; max-width: min(460px, calc(100vw - 32px)); background: rgba(14, 15, 20, 0.92); border: 1px solid #c8a858; border-radius: 12px; padding: 8px 18px 10px; text-align: center; color: #ece6d6; z-index: 30; opacity: 0; transition: opacity 0.35s, transform 0.35s; pointer-events: none; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
#ach-pop.on { opacity: 1; transform: translate(-50%, 0); }
#ach-pop[hidden] { display: none; }
/* Clear of what else is up there: the way's line, the metro's line (and the way under it). */
body:has(#nav:not([hidden])) #ach-pop, body:has(#ug:not([hidden])) #ach-pop { top: 76px; }
body:has(#nav.under:not([hidden])) #ach-pop { top: 140px; }
#ach-pop .ach-k { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: #c8a858; }
#ach-pop .ach-n { font-size: 26px; line-height: 28px; color: #ffe0a8; }
#ach-pop .ach-h { font-size: 15px; color: #a8a49a; }
#ach-pop .ach-u { margin-top: 6px; font-size: 17px; color: #8fd8c4; }
.pz-ach { max-height: min(62vh, 560px); overflow-y: auto; text-align: left; min-width: min(560px, calc(100vw - 32px)); }
.ach-sum { font-size: 17px; color: #a8a49a; margin-bottom: 6px; }
.ach-sum b { font-size: 26px; color: #ffe0a8; font-weight: normal; }
.ach-bar { position: relative; height: 8px; background: #23252e; border-radius: 4px; margin: 6px 0 4px; overflow: visible; }
.ach-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #c8a858; border-radius: 4px; }
.ach-bar s { position: absolute; top: -3px; width: 2px; height: 14px; background: #8fd8c4; text-decoration: none; }
.ach-unl { display: flex; gap: 12px; font-size: 14px; color: #6a6c76; }
.ach-unl .got { color: #8fd8c4; }
.ach-g { margin: 12px 0 2px; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8c96; }
.ach-row { display: grid; grid-template-columns: 16px minmax(0, 11em) minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 16px; line-height: 21px; color: #6a6c76; }
.ach-row i { font-style: normal; color: #c8a858; }
.ach-row.got .ach-rn { color: #ffe0a8; }
.ach-row.got .ach-rh { color: #a8a49a; }
.ach-w { color: #4a4c56; font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
.ach-row.got .ach-w { color: #c8a858; }
@media (max-width: 560px) { .ach-row { grid-template-columns: 16px 1fr auto; } .ach-rh { grid-column: 2 / 4; } }
/* The police (systems/police.js): noticed, pulled over, wanted. Top left, only while it matters. */
#police { position: fixed; left: 16px; top: 14px; z-index: 7; display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 10px; background: rgba(14, 15, 20, 0.84); border: 1px solid #2e303a; font-family: "Jersey 15", monospace; color: #e8e0cc; pointer-events: none; white-space: nowrap; }
#police[hidden] { display: none; }
#police i { width: 10px; height: 10px; border-radius: 50%; background: #5a6a90; flex: none; }
#police b { font-weight: normal; font-size: 19px; letter-spacing: 0.04em; }
#police span { font-size: 16px; color: #a8a49a; }
#police.warm b { color: #c8d4f0; }
#police.hot { border-color: #6a2a34; }
#police.hot b { color: #ffb0a8; }
#police.hot i { animation: police-flash 0.7s steps(1) infinite; }
@keyframes police-flash { 0% { background: #ff3a30; box-shadow: 0 0 8px #ff3a30; } 50% { background: #3a6aff; box-shadow: 0 0 8px #3a6aff; } }

/* ---------- The touch layout (js/touch.js: body.touch; nothing here touches the desktop) ---------- */
html.touch, body.touch { overscroll-behavior: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body.touch { touch-action: manipulation; --sb: env(safe-area-inset-bottom, 0px); --st: env(safe-area-inset-top, 0px); --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px); }
body.touch #stage, body.touch .px-canvas { touch-action: none; }
body.touch .px-canvas { image-rendering: auto; }            /* (drawn at a capped pixel ratio, smoothed up) */
body.touch #title { font-size: 40px; top: 20%; padding: 0 16px; }
body.touch #title .dn { font-size: 74px; }
/* The hint is the button: a pill near the bottom, above the phone's handle. */
body.touch #hint, body.touch #prompt, #tp-next {
  position: fixed; left: 50% !important; top: auto !important; bottom: calc(var(--sb) + 70px); transform: translateX(-50%) !important; opacity: 1 !important;
  max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; z-index: 9;
  font-size: 22px; line-height: 26px; padding: 12px 24px; border-radius: 999px; pointer-events: auto; cursor: pointer;
  color: #ffe9b0; background: rgba(20, 22, 30, 0.92); border: 2px solid #8a7a5a; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}
body.touch #hint:not(.tap) { color: #c8c4b8; border-color: #3a3e4c; pointer-events: none; }
/* (A word with nothing to tap, like a stop's timetable, is read in full: it wraps.) */
body.touch #hint:not(.tap) { white-space: normal; text-overflow: clip; width: max-content; text-align: center; font-size: 18px; line-height: 23px; padding: 10px 20px; border-radius: 20px; }
body.touch #hint.tap:active, body.touch #prompt:active, #tp-next:active { background: rgba(60, 54, 40, 0.95); }
#tp-next { display: none; }
body.touch #tp-next:not([hidden]) { display: block; }
/* Choices (talk, the street's asks): thumb-sized. */
body.touch #choices { left: 16px; right: 16px; bottom: calc(var(--sb) + 70px); transform: none; min-width: 0; max-width: none; gap: 8px; z-index: 9; }
body.touch #choices button { font-size: 21px; padding: 13px 16px; min-height: 52px; }
body.touch #st-ask { left: 16px; right: 16px; bottom: calc(var(--sb) + 130px); transform: none; max-width: none; gap: 8px; }
body.touch #st-ask button { font-size: 20px; padding: 12px 16px; min-height: 50px; }
body.touch #doze { left: 16px; right: 16px; bottom: calc(var(--sb) + 164px); max-width: none; gap: 6px; }     /* (clear of a hint wrapped onto two lines under it) */
body.touch #doze button { font-size: 19px; padding: 10px 14px; min-height: 46px; }
body.touch #doze .dz-t { color: #c8c2b2; text-shadow: 0 1px 2px #000; }
body.touch #st-cap { bottom: calc(var(--sb) + 132px); max-width: calc(100vw - 32px); }
body.touch #pl-toast { bottom: calc(var(--sb) + 132px); max-width: calc(100vw - 32px); }
body.touch #nav { top: calc(var(--st) + 64px); width: max-content; max-width: calc(100vw - 24px); box-sizing: border-box; font-size: 17px; padding: 6px 12px; white-space: normal; }
/* Down in the metro: its line at the top (systems/subway.js #ug), clear of the pockets and the pause; the way's line under it. */
body.touch #ug { top: calc(var(--st) + 64px); width: max-content; max-width: calc(100vw - 24px); box-sizing: border-box; white-space: normal; padding: 5px 12px 6px; }
body.touch #ug .ug-t { font-size: 18px; }
body.touch #ug .ug-r, body.touch #ug .ug-s { font-size: 14px; }
/* In the tunnel, the network (metro.js TunnelMap): across the screen under the lines at the top, clear of the hint at the foot. */
body.touch #ug-map { left: calc(var(--sl) + 12px); right: auto; top: calc(var(--st) + 136px); width: calc(100vw - var(--sl) - var(--sr) - 24px); height: auto; aspect-ratio: 16 / 10; }
body.touch:has(#nav.under:not([hidden])) #ug-map { top: calc(var(--st) + 200px); }
body.touch #nav.under { top: calc(var(--st) + 142px); }
body.touch #ach-pop { top: calc(var(--st) + 60px); }
body.touch #police { top: calc(var(--st) + 64px); left: calc(var(--sl) + 12px); }
/* The police badge, the way's line, the metro's line and the pop all want the
   same strip under the pockets: each that's up pushes the next one down. */
body.touch:has(#police:not([hidden])) #nav:not(.under) { top: calc(var(--st) + 108px); }
body.touch:has(#police:not([hidden])) #ach-pop { top: calc(var(--st) + 108px); }
body.touch:has(#nav:not([hidden])) #ach-pop, body.touch:has(#ug:not([hidden])) #ach-pop { top: calc(var(--st) + 132px); }
body.touch:has(#police:not([hidden])):has(#nav:not([hidden])) #ach-pop { top: calc(var(--st) + 176px); }
body.touch:has(#nav.under:not([hidden])) #ach-pop { top: calc(var(--st) + 210px); }
/* (The badge underground: the metro's line, the way and the tunnel's map all go down under it.) */
body.touch:has(#police:not([hidden])) #ug { top: calc(var(--st) + 108px); }
body.touch:has(#police:not([hidden])) #nav.under { top: calc(var(--st) + 186px); }
body.touch:has(#police:not([hidden])) #ug-map { top: calc(var(--st) + 180px); }
body.touch:has(#police:not([hidden])):has(#nav.under:not([hidden])) #ug-map { top: calc(var(--st) + 244px); }
body.touch:has(#police:not([hidden])):has(#nav.under:not([hidden])) #ach-pop { top: calc(var(--st) + 232px); }
/* Panels (shop, cash machine, jukebox, games, taxi, bus): full width, big rows. */
body.touch #shop, body.touch #ride { width: calc(100vw - 16px); max-height: calc(100% - var(--st) - var(--sb) - 24px); padding: 12px 14px 10px; }
body.touch .sh-x, body.touch .rd-x { min-width: 48px; min-height: 48px; font-size: 36px !important; }
body.touch .sh-item, body.touch .rd-item { min-height: 50px; align-items: center; padding: 8px 12px; }
body.touch .sh-list, body.touch .rd-list { gap: 6px; }
body.touch .sh-how button { min-height: 46px; padding: 6px 18px; font-size: 19px; }
body.touch .sh-buy { min-height: 50px; font-size: 20px; padding: 8px 18px; }
body.touch .sh-pay { flex-wrap: wrap; }
body.touch .at-grid button { min-height: 56px; }
body.touch .sh-foot, body.touch .rd-foot, body.touch .mx-foot { display: none; }
body.touch .jb-song { min-height: 54px; }
body.touch .bj-stakes button, body.touch .bj-acts button { min-height: 46px; font-size: 18px; }
body.touch .lo-grid button { min-height: 42px; }
body.touch .lo-dip { min-height: 44px; }
body.touch .ar-screen { touch-action: none; }
body.touch #metro { width: calc(100vw - 12px); height: calc(100% - var(--st) - var(--sb) - 16px); padding: 12px; }
body.touch .mx-title { font-size: 22px; padding-right: 48px; }
#tp-mxclose { display: none; }
body.touch #tp-mxclose:not([hidden]) { display: block; position: fixed; top: calc(var(--st) + 14px); right: calc(var(--sr) + 14px); z-index: 26; width: 48px; height: 48px; font: inherit; font-size: 34px; line-height: 1; color: #e8e0cc; background: rgba(30, 32, 42, 0.95); border: 1px solid #4a4c58; border-radius: 12px; }
/* Pockets: a chip top left; a tap opens it. */
body.touch #pockets { top: calc(var(--st) + 12px); left: calc(var(--sl) + 12px); transform: none; min-width: 0; max-width: calc(100vw - 100px); max-height: 60vh; padding: 6px 12px; pointer-events: auto; cursor: pointer; }
body.touch #pockets:not(.open) > :not(.pk-cash) { display: none; }
body.touch #pockets:not(.open) .pk-cash { border: 0; margin: 0; padding: 4px 0; }
body.touch #pockets:not(.open) .pk-cash::after { content: ' ▾'; color: #8a8c96; }
body.touch #pockets .pk-cash .pk-name::before { content: 'Pockets · '; color: #8a8c96; }
body.touch #pockets.open { padding: 8px 12px 10px; z-index: 10; background: rgba(14, 15, 20, 0.96); }      /* (opened, over the badge, the metro's line and map, the doze list) */
body.touch #pockets .pk-row { font-size: 19px; line-height: 24px; }
body.touch #pockets .pk-use { min-height: 44px; align-items: center; }
body.touch #pockets .pk-use .pk-verb { opacity: 1; }
body.touch #pockets .pk-use .pk-n { display: none; }
body.touch #pockets .pk-tip, body.touch #pockets .pk-h { display: none; }
/* Pause: a button top right; the menu above everything. */
#tp-pause { display: none; }
body.touch #tp-pause { display: flex; gap: 6px; align-items: center; justify-content: center; position: fixed; top: calc(var(--st) + 10px); right: calc(var(--sr) + 12px); z-index: 8; width: 48px; height: 48px; padding: 0; background: rgba(14, 15, 20, 0.82); border: 1px solid #2e303a; border-radius: 12px; cursor: pointer; }
body.touch #tp-pause i { width: 5px; height: 18px; border-radius: 1px; background: #e8e0cc; }
body.touch #pause { z-index: 40; padding: calc(var(--st) + 16px) 12px calc(var(--sb) + 16px); }
body.touch #pause .paused { font-size: 52px; }
body.touch #pause .pz-tabs { flex-wrap: wrap; justify-content: center; gap: 8px; }
body.touch #pause .pz-tabs button { min-height: 46px; font-size: 19px; }
body.touch #pause .pz-panel { max-height: 58vh; max-width: calc(100vw - 24px); padding: 10px 12px; }
body.touch #pause .pz-panel td:first-child { white-space: normal; width: 38%; }
body.touch .pz-ach { min-width: 0; }
#pz-leave { display: none; }
body.touch #pz-leave { display: block; border-color: #6a5a40; }
#tp-left { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: rgba(7, 8, 14, 0.94); padding: 24px; }
#tp-left[hidden] { display: none; }
#tp-left .paused { font-size: 56px; text-shadow: 0 0 18px rgba(255, 190, 110, 0.45); }
#tp-left .resume { font-size: 20px; line-height: 26px; color: #c8c4b8; }
#tp-left button { margin-top: 12px; font: inherit; font-size: 22px; min-height: 50px; color: #f3e2bd; background: #2a2e3c; border: 2px solid #4a4e5c; border-radius: 12px; padding: 6px 24px; }
#end button { touch-action: manipulation; }
body.touch #end button { min-height: 52px; padding: 8px 24px; }
/* The phone as a sheet: the whole screen, its tabs at the bottom; put away, a handle. */
body.touch #phone { position: fixed; left: 0; right: 0; top: var(--st); bottom: 0; width: auto; height: auto; max-height: none; z-index: 22; border: 0; border-top: 1px solid #2a2c34; border-radius: 18px 18px 0 0; transition: transform 0.3s ease; }
body.touch #phone.down, body.touch #phone.away { transform: translateY(calc(100% + 8px)); }
body.touch .ph-bar { min-height: 44px; padding: 12px 18px 6px; touch-action: none; }
body.touch .ph-bar::before { content: ''; position: absolute; left: 50%; top: 5px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #3a3c46; }
body.touch .ph-hide { width: 56px; height: 40px; }
body.touch .ph-tabs { order: 10; padding: 6px 10px calc(var(--sb) + 8px); border-top: 1px solid #1e2028; }
body.touch .ph-tabs button { font-size: 19px; padding: 12px 2px; }
body.touch .ph-row { padding: 12px 14px; }
body.touch .ph-msg { font-size: 19px; line-height: 22px; }
body.touch .ph-replies button { font-size: 18px; padding: 12px 12px; }
body.touch .ph-back { font-size: 36px; min-width: 44px; min-height: 40px; }
body.touch .ph-zoom button { width: 44px; height: 44px; font-size: 24px; }
body.touch .ph-zoom { top: 50px; }
body.touch .ph-search input { font-size: 17px; padding: 9px 12px; }
body.touch .ph-results button { font-size: 17px; padding: 10px 12px; }
body.touch .ph-route { bottom: 12px; }
body.touch .ph-modes button { min-height: 44px; }
body.touch .ph-go { min-height: 36px; font-size: 16px; padding: 4px 14px; }
body.touch .ph-x { min-width: 40px; min-height: 36px; font-size: 26px; }
body.touch .pn-row { padding: 10px 0; }
#ph-handle { display: none; }
body.touch #ph-handle { position: fixed; left: 50%; bottom: calc(var(--sb) + 8px); transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 8px; min-width: 132px; height: 48px; padding: 14px 18px 4px; justify-content: center; font: inherit; font-size: 18px; color: #e8e0cc; background: #0e0f14; border: 2px solid #2a2c34; border-radius: 16px; box-shadow: 0 0 24px rgba(0, 0, 0, 0.6); touch-action: none; cursor: pointer; }
body.touch #phone:not(.down):not(.away) + #ph-handle { display: none; }
body.touch #ph-handle i { position: absolute; left: 50%; top: 6px; width: 34px; height: 4px; margin-left: -17px; border-radius: 2px; background: #4a4c56; }
body.touch #ph-handle .phh-n { font-weight: normal; background: #e8a040; color: #1a1410; font-size: 14px; min-width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
body.touch #ph-handle .phh-n[hidden] { display: none; }
body.touch #ph-handle.lit { animation: phlit 1.6s ease-out; }
/* Upright only: on its side, a cover. */
#tp-turn { display: none; }
@media (orientation: landscape) {
  body.touch-device #tp-turn { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #070a16; color: #f3e2bd; font-size: 26px; text-align: center; }
  body.touch-device #tp-turn p { margin: 0; }
  body.touch-device #tp-turn .tp-phone { width: 34px; height: 58px; border: 3px solid #c8a868; border-radius: 8px; animation: tp-rot 2.4s ease-in-out infinite; }
}
@keyframes tp-rot { 0%, 25% { transform: rotate(90deg); } 55%, 100% { transform: rotate(0deg); } }
