[hidden] { display: none !important; }
:root { --panel: #f8f2e4; --edge: #3b2f5c; --ink: #1d1830; --soft: #6b6283; --go: #7c5cff; --heart: #ef7d1a; --paper: #fffaf0;
  --cream: #fffbe9; --tan: #efe2c2; --brown: #6b4f2a; --bark: #3e2812; --wood: #7a5230; --wood-l: #b5834f; --wood-d: #5e3d22; --bink: #3a2614; --bsoft: #7a6248;
  --purple: #5e43b8; --green: #3f8a3a; --red: #c0442e; --gold: #e0b43a; --gold-d: #b07800; --line: #cdb98e;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; font: 14px/1.35 Tahoma, Verdana, system-ui, sans-serif; color: var(--ink); background: #9fd3f0; overscroll-behavior: none; }
#map, #play { position: fixed; inset: 0; width: 100%; height: 100%; }
#play { touch-action: none; opacity: 0; pointer-events: none; transition: opacity .6s; }
body.playing #play { opacity: 1; pointer-events: auto; }
#map { transition: opacity .6s; }
body.playing #map { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .6s, visibility 0s .6s; } /* a crossfade both ways, never a cut */
.mk-you, .mk-name { width: 0; height: 0; cursor: pointer; } .mk-you .label { font-weight: 700; } .mk-you i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #e0503a; border: 2px solid #fff; box-shadow: 0 0 0 1px #0004; } .mk-you .label, .mk-name .label { top: -8px; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.panel { background: var(--panel); border: 3px solid var(--edge); border-radius: 6px; box-shadow: 3px 3px 0 #0005; }
button { font: inherit; color: var(--ink); background: #e2d3ad; border: 2px outset #f3e8cc; padding: 6px 12px; cursor: pointer; border-radius: 4px; }
button:active { border-style: inset; }
button.go { background: #7c5cff; color: #fff; border-color: #a993ff #4b3aa8 #4b3aa8 #a993ff; }
button.heart { background: #fbd3a4; }
input, select, textarea { font: inherit; border: 2px inset #cbb98f; padding: 6px 8px; background: var(--paper); border-radius: 3px; max-width: 100%; }
a { color: var(--purple); }

/* intro: the loading screen. It covers everything (the hidden map, the buttons) until the city's first frame is drawn
   (main.js introDone); its bar moves only when something real has loaded (main.js bootStep), and its shine runs on the
   compositor, so it keeps moving while the page is busy */
#intro { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; text-align: center; padding: 0 16px 12vh;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 90' preserveAspectRatio='none'%3E%3Cpath fill='%23281f45' d='M0 90V62h14V48h10v-8h8v8h10v22h12V34h18v36h8V54h14v-6h6v6h10v16h10V22h4v-6h4v6h4v6h10v42h12V44h16v26h10V58h18v12h8V30h20v40h6V50h12v-8h6v8h8v20h10V40h14v30h8V60h18v10h10V26h6v-8h4v8h6v44h12V52h14v18h8V46h10v-6h8v6h10v24h8V62h16v28z'/%3E%3C/svg%3E") bottom / 100% 22vh no-repeat,
    radial-gradient(circle at 50% 108%, #ffb45ccc, #ffb45c00 42%), linear-gradient(#2a2150, #5a44a8 52%, #c77a8a 82%, #f2a65a);
  transition: opacity .8s; touch-action: none; }
#intro.gone { opacity: 0; pointer-events: none; }
#intro .ibar { position: relative; width: min(300px, 74vw); height: 14px; margin-top: 18px; border-radius: 8px; border: 2px solid #1d1830; background: #fffbe933; box-shadow: 0 2px 10px #0006; overflow: hidden; }
#intro .ibar i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--f, .04)); background: linear-gradient(90deg, var(--heart), var(--gold)); transition: transform .45s ease-out; } /* (scaled, not resized: no layout on the busy main thread) */
#intro .ibar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #fff0, #fff8, #fff0); transform: translateX(-100%); animation: ibarShine 1.3s linear infinite; }
@keyframes ibarShine { to { transform: translateX(100%); } }
#intro .step { margin-top: 8px; min-height: 1.3em; color: #fff4c9; font-size: 14px; text-shadow: 0 1px 4px #000; }
#intro .tip { position: absolute; left: 16px; right: 16px; bottom: calc(22vh + 14px + var(--safe-b)); color: #fff; font-size: 14px; text-shadow: 0 1px 4px #000; opacity: .9; }
@media (max-height: 560px) { #intro .tip { display: none; } }
@media (max-width: 420px) { #intro .motto { font-size: 14.5px; } }
@media (prefers-reduced-motion: reduce) { #intro .ibar::after { animation: none; } #intro .ibar i { transition: none; } }
#intro .logo { margin-top: .9em; font: 900 clamp(36px, 10.5vw, 96px)/.9 Georgia, serif; color: #fff4c9; text-shadow: 4px 4px 0 var(--edge), 0 0 30px #0008; letter-spacing: 1px; }
#intro .logo .ins { position: relative; white-space: nowrap; display: inline-block; } #intro .logo .caret { position: relative; display: inline-block; width: .3em; color: var(--heart); }
#intro .logo .caret em { position: absolute; bottom: 2.05em; left: 50%; transform: translateX(-50%) rotate(-6deg); font: italic 700 .44em/1 Georgia, serif; letter-spacing: 2px; white-space: nowrap; text-shadow: 3px 3px 0 var(--edge), 0 0 16px #000a; }
#intro .logo .caret svg { position: absolute; left: 50%; bottom: .3em; width: .32em; height: .58em; transform: translateX(-50%); overflow: visible; filter: drop-shadow(2px 2px 0 var(--edge)) drop-shadow(0 0 6px #000a); } /* Simulation, written in between the words */
#intro .logo small { display: block; margin-top: .12em; font: italic 700 .46em/1 Georgia, serif; color: var(--heart); letter-spacing: 3px; transform: rotate(-4deg); text-shadow: 3px 3px 0 var(--edge), 0 0 20px #0008; } /* "Simulation", stylized under the name */
#intro .tag { margin-top: 14px; color: #fff; font-size: 18px; text-shadow: 0 2px 6px #000; }
#gate { position: fixed; inset: 0; z-index: 31; display: grid; place-items: end center; padding-bottom: 16vh; } #gate[hidden] { display: none; } /* 18+, before anything starts */
#gate .gatebox { display: grid; gap: 12px; justify-items: center; color: #fff; font-size: 18px; text-shadow: 0 2px 6px #000; padding: 0 16px; text-align: center; }
#gate .go { font-size: 20px; padding: 11px 28px; text-shadow: none; }
#gate .gatelink { background: none; border: 0; color: #fff; text-decoration: underline; text-shadow: 0 1px 4px #000; font-size: 14px; box-shadow: none; }
#gateKeyBox { display: grid; gap: 8px; justify-items: center; } #gateKeyBox[hidden] { display: none; } #gateKey { width: min(320px, 80vw); text-align: center; }

/* hud */
#hud { position: fixed; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; z-index: 10; display: flex; gap: 6px; align-items: flex-start; pointer-events: none; }
#hud > * { pointer-events: auto; }
#gatePin { letter-spacing: 6px; text-align: center; } #gateMsg { color: #ffd23f; font-size: 14px; min-height: 0; } #gateMsg:empty { display: none; }
.pinform input { width: 92px; letter-spacing: 4px; text-align: center; }
#hud .right { display: flex; gap: 6px; flex: none; position: relative; }
#shareMenu { position: absolute; top: calc(100% + 6px); right: 0; width: 230px; display: flex; flex-direction: column; gap: 4px; padding: 4px; background: var(--paper); border: 2px solid var(--edge); border-radius: 6px; box-shadow: 2px 2px 0 #0004; z-index: 12; }
#shareMenu[hidden] { display: none; }
#shareMenu button { text-align: left; padding: 8px 10px; border: 0; border-radius: 4px; background: none; box-shadow: none; font-weight: bold; }
#shareMenu button:hover { background: #fff4c9; } #shareMenu small { display: block; font-weight: normal; color: var(--soft); }
.chip { background: var(--panel); border: 2px solid var(--edge); border-radius: 20px; padding: 5px 11px; box-shadow: 2px 2px 0 #0004; white-space: nowrap; }
/* your name, the place, the buttons: one row that shrinks with an ellipsis, never overlapping */
#vis, #cash { flex: 0 0 auto; } #vis.private { background: #3d3a36; color: #fff; }
#bar .meface { font-weight: normal; line-height: 1; } #bar .meface img { width: 22px; height: 22px; }
#bar #meName { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#place { flex: 0 1 auto; min-width: 0; margin: 0 auto; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
#here { color: var(--soft); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1px solid #0006; vertical-align: -1px; margin-right: 4px; }

/* the tracker (main.js renderQuests): your first steps one at a time, then the next quest that pays gold; a tap folds it */
#quests { position: fixed; z-index: 9; top: calc(96px + var(--safe-t)); right: 8px; width: 240px; padding: 9px 10px 10px; font-size: 13px; }
#quests.min { width: auto; padding: 0; background: none; box-shadow: none; border: 0; }
#quests .qchip { display: block; max-width: min(260px, 64vw); min-height: 40px; padding: 8px 13px; border: 2px solid var(--edge); border-radius: 20px; font: 700 13px Tahoma, Verdana, system-ui, sans-serif; color: var(--ink); background: linear-gradient(#fffbe9, #f1e2bd); box-shadow: 2px 2px 0 #0004; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: qin .35s ease-out; }
#quests .qhead { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: -2px 0 7px; }
#quests .qmin { width: 36px; height: 32px; padding: 0; border-radius: 8px; font: 800 16px/1 system-ui, sans-serif; flex: none; }
#quests .qnow { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: center; }
#quests .qnow > span { font-size: 28px; line-height: 1; }
#quests .qnow b { display: block; font-size: 14px; }
#quests .qnow small { display: block; margin-top: 2px; color: var(--soft); font-size: 12px; line-height: 1.3; }
#quests .qdo { width: 100%; margin-top: 8px; min-height: 40px; font-weight: 700; }
#quests .qrow { display: flex; gap: 6px; margin-top: 8px; } #quests .qrow button { flex: 1; min-height: 40px; padding: 6px; font-size: 13px; }
#quests .qdots { display: flex; justify-content: space-between; margin-top: 9px; }
#quests .qdots i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 14px; line-height: 1; filter: grayscale(1); opacity: .4; }
#quests .qdots i.ok { filter: none; opacity: 1; background: #e3f2d5; }
#quests .qdots i.now { filter: none; opacity: 1; background: #fff4c9; box-shadow: 0 0 0 2px var(--heart); }
@keyframes qin { from { transform: translateY(-6px); opacity: 0; } }

#worldbar { position: fixed; z-index: 11; left: 0; right: 0; margin: 0 auto; top: calc(56px + var(--safe-t)); padding: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; width: min(560px, calc(100% - 16px)); max-height: calc(100% - 140px - var(--safe-t) - var(--safe-b)); overflow: auto; }
body:not(.playing) #toast { top: auto; bottom: calc(80px + var(--safe-b)); } /* on the world map the search is at the top: messages wait below */
@media (max-width: 640px) { body:not(.playing) #toast { left: 8px; right: 76px; width: auto; transform: none; bottom: calc(236px + var(--safe-b)); } } /* on a phone's map they stop short of 🧭, + and − on the right, and sit above the wide 🚶 Street, never over them */
#picks[hidden] { display: none; }
#picks .shuffle { background: #fff4c9; font-weight: bold; }
#place { cursor: pointer; }
#picks { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } @media (min-width: 600px) { #picks { grid-template-columns: repeat(4, 1fr); } }
#picks button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font-size: 13px; } #picks button b { font-size: 22px; line-height: 1; }
#worldbar input { flex: 1; min-width: 160px; }
.searchwrap { position: relative; flex: 1; min-width: 160px; display: flex; } .searchwrap input { width: 100%; }
#searchList, .droplist { position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--paper); border: 2px solid var(--edge); border-radius: 6px; box-shadow: 2px 2px 0 #0004; max-height: 46vh; overflow: auto; z-index: 5; }
#searchList li { padding: 8px 10px; border-radius: 4px; cursor: pointer; } #searchList li:hover, #searchList li.on { background: #fff4c9; } #searchList small { display: block; color: var(--soft); }
@keyframes savepulse { 0%, 100% { box-shadow: 0 0 0 0 #5aa83c99; transform: scale(1); } 50% { box-shadow: 0 0 0 9px #5aa83c00; transform: scale(1.06); } }
#psavekey.pulse { animation: savepulse 1.1s ease-in-out infinite; }
#worldbar small { width: 100%; color: var(--soft); }

/* bottom bar */
#bar { position: fixed; z-index: 11; left: 50%; transform: translateX(-50%); bottom: calc(8px + var(--safe-b)); display: flex; gap: 6px; }
#bar button { display: grid; place-items: center; font-size: 20px; line-height: 1; padding: 6px 10px 5px; min-width: 64px; position: relative; background: var(--panel); border: 3px solid var(--edge); box-shadow: 2px 2px 0 #0005; }
#bar button span { font-size: 11px; margin-top: 3px; }
#bar button.on { background: #fff4c9; }
#bar i { position: absolute; top: -6px; right: -6px; background: var(--heart); color: #fff; font: bold 11px/18px sans-serif; min-width: 18px; border-radius: 9px; padding: 0 4px; font-style: normal; }
#bar i:empty { display: none; }

/* sheet (bottom drawer) */
#sheet { position: fixed; z-index: 12; left: 8px; bottom: calc(78px + var(--safe-b)); width: min(400px, calc(100% - 16px)); max-height: min(62vh, 560px); overflow: auto; padding: 10px 12px; }
#sheet h3 { margin: 0 0 8px; font-size: 16px; }
.x { position: sticky; top: 0; float: right; padding: 2px 8px; z-index: 1; }
.about h4 { margin: 12px 0 2px; } .about p { margin: 4px 0; line-height: 1.45; }
.lookrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 7px 0; } .lookrow > span { width: 50px; font-size: 13px; color: var(--soft); }
.sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #6b4f2a; padding: 0; } .sw.on { box-shadow: 0 0 0 3px #ef7d1a; }
.chipbtn { padding: 3px 10px; border-radius: 14px; font-size: 13px; } .chipbtn.on { background: #fff4c9; font-weight: bold; }
/* Run Ads */
.adform { display: grid; gap: 6px; margin-top: 8px; } .adform input:not([type=file]) { width: 100%; box-sizing: border-box; }
.adprev { display: flex; gap: 6px; flex-wrap: wrap; } .adprev img { height: 54px; border-radius: 4px; border: 1px solid #cdb98e; }
.bbprev { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 6px; margin: 6px 0; border: 1px solid #cdb98e; } .bbsteps button:disabled { opacity: .5; }
.myad { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #cdb98e; } .myad img { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; }
.myad .grow small { display: block; }
.myad { flex-wrap: wrap; } .myad .grow { flex: 1 1 140px; min-width: 0; } .myad button { white-space: nowrap; } /* buttons wrap under the ad on a phone */
/* Me: a grid of boxes that open when tapped */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0 4px; }
.tile { background: var(--paper); border: 2px solid #cdb98e; border-radius: 8px; box-shadow: 1px 2px 0 #0002; min-width: 0; }
.tile.hot { border-color: var(--heart); background: #fff1e0; }
.tile.open { grid-column: 1 / -1; }
.tile .thead { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 10px; border-radius: 8px; box-shadow: none; }
.tile .thead .ti { grid-row: span 2; font-size: 22px; }
.tile .thead small { color: var(--soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tbody { display: none; padding: 0 10px 10px; }
.tile.open .tbody { display: block; }
.tile.open .thead { border-bottom: 1px dashed #cdb98e; border-radius: 8px 8px 0 0; margin-bottom: 6px; }
.gear { float: right; margin: -2px 6px 0 0; padding: 2px 8px; font-size: 15px; line-height: 1.2; } .gear.on { background: #fff4c9; }
[data-person] { cursor: pointer; }
.row { display: flex; gap: 6px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 8px; align-items: center; padding: 7px 2px; border-top: 1px dashed #cdb98e; cursor: pointer; }
.list li .grow { flex: 1; min-width: 0; }
.list li small { color: var(--soft); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li button { padding: 4px 8px; }
.list.lq li { align-items: flex-start; } .list.lq li small { white-space: normal; } .list.lq .qe { font-size: 26px; padding-top: 2px; } .list.lq li button { flex: 1; }
.grpmark { width: 26px; height: 26px; border-radius: 50%; background: var(--heart); color: #fff; font: bold 13px/26px sans-serif; text-align: center; border: 2px solid #fff; box-shadow: 0 1px 4px #0006; cursor: pointer; }
label.tick { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; }
.evlog { max-height: 160px; overflow-y: auto; background: var(--paper); border: 1px solid #cdb98e; border-radius: 6px; padding: 6px 8px; margin: 4px 0; font-size: 14px; }
.evlog div { margin: 2px 0; }
.face { border-radius: 50%; object-fit: cover; vertical-align: middle; border: 1px solid #0003; }
.pface { float: right; margin: 0 34px 0 8px; }
.regs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.reg { display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 1px solid #cdb98e; border-radius: 14px; padding: 2px 8px 2px 2px; font-size: 12px; color: var(--ink); }
.reg .dot { margin: 0 2px 0 4px; }
.pill { font-size: 11px; padding: 1px 6px; border-radius: 9px; color: #fff; white-space: nowrap; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.chips button { padding: 3px 9px; border-radius: 14px; font-size: 12px; }
.chips button.on { background: #fff4c9; }
.meetbox { background: #fff0de; border: 2px solid #f2b26b; border-radius: 6px; padding: 8px; margin-bottom: 10px; }
.meetbox b { color: #b85a0c; }
.empty { color: var(--soft); padding: 10px 0; }
#log { height: 38vh; max-height: 300px; overflow: auto; background: var(--paper); border: 2px inset #cbb98f; padding: 6px; margin: 6px 0; }
#log .me b { color: #2e7d32; }
#log .sys { color: var(--soft); font-style: italic; }

/* card (tapped thing) */
#card { position: fixed; z-index: 13; right: 8px; top: calc(52px + var(--safe-t)); width: min(320px, calc(100% - 16px)); max-height: 70vh; overflow: auto; padding: 10px 12px; }
@media (min-width: 641px) { #card { left: 8px; right: auto; top: calc(84px + var(--safe-t)); } } /* a computer or a tablet: cards open on the left, under your gold, never on the First-steps tracker or the RFC panel (top right) */
#card h2 { margin: 0 0 3px; font-size: 17px; padding-right: 30px; }
#card img { max-width: 100%; border-radius: 4px; margin: 6px 0; }
#card .sw { width: 40px; height: 30px; padding: 0; }
#card .x { position: absolute; right: 8px; top: 8px; float: none; }
.muted { color: var(--soft); }

.label { position: absolute; transform: translate(-50%, -100%); font-size: 11px; background: #fffbe9e6; border: 1px solid var(--edge); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.label.bubble { background: #fff; font-size: 12px; max-width: 200px; white-space: normal; border-radius: 10px; box-shadow: 1px 2px 0 #0003; }
.label.bot { border-color: #3a7de0; }
.label.team { border: 2px solid #1d2b53; background: #fffbe9f2; font-weight: bold; font-size: 12px; padding: 2px 7px; border-radius: 8px; line-height: 1.35; } /* a pro team's stadium on the map (main.js mapTeams) */
.label.heart { border-color: var(--heart); background: #ffe9d1; }
.label.critter { border-color: #6b8a3a; background: #f3f8e6e6; } .label.critter.legend { border-color: #8d4fd6; background: #f3e9ffe6; font-weight: bold; } .label.bubble.critter { border-color: #6b8a3a; font-style: italic; }
ol.quests { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
ol.quests > li { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border: 1px dashed #cdb98e; border-radius: 6px; background: #fffdf4; }
ol.quests > li.done { background: #eef7e2; border-style: solid; border-color: #9cc27a; } ol.quests > li.done b { text-decoration: line-through; text-decoration-color: #6b8a3a; }
ol.quests .qe { font-size: 22px; line-height: 1.1; } ol.quests small { display: block; color: var(--soft); } ol.quests .qok { font-size: 18px; }
.qbar { height: 6px; background: #eadfc4; border-radius: 3px; margin: 4px 0 1px; overflow: hidden; } .qbar i { display: block; height: 100%; background: #6b8a3a; }
ul.qlist { list-style: none; padding: 0; margin: 4px 0; max-height: 260px; overflow: auto; } ul.qlist li { padding: 3px 0; font-size: 13px; } ul.qlist button { padding: 0 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; margin-bottom: 6px; } .stat { background: #fffdf4; border: 1px dashed #cdb98e; border-radius: 6px; padding: 6px 8px; } .stat b { display: block; font-size: 17px; } .stat small { color: var(--soft); }
.mefoot { display: flex; gap: 8px; justify-content: center; margin: 14px 0 6px; padding-top: 10px; border-top: 1px dashed #cdb98e; }
button.warn { color: #a3261e; border-color: #a3261e; }
.droplist { margin: 0; padding: 4px; list-style: none; background: var(--paper); border: 2px solid var(--edge); border-radius: 6px; box-shadow: 2px 2px 0 #0004; max-height: 40vh; overflow: auto; z-index: 5; } .droplist li { padding: 8px 10px; border-radius: 4px; cursor: pointer; } .droplist li:hover { background: #fff4c9; } .droplist small { display: block; color: var(--soft); }
.tile.open > .thead { position: sticky; top: 0; z-index: 2; background: var(--paper); } .tile.open > .thead::after { content: '▲'; margin-left: auto; font-size: 13px; color: var(--soft); padding-left: 6px; }
.champ { font-weight: bold; color: #8a5a00; background: #fff4c9; border: 2px solid #e8b400; border-radius: 6px; padding: 6px 10px; margin: 6px 0; }
.label.hint { background: #fff4c9; border: 2px solid var(--edge); font-weight: bold; animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { margin-top: -5px; } }

/* messages (main.js toast): one or two at a time, over everything but the phone's home screen; a big ✕, or flick one away */
#toast { position: fixed; z-index: 50; top: calc(56px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: grid; gap: 6px; width: min(380px, calc(100% - 16px)); pointer-events: none; margin-top: var(--tdrop, 0px); } /* --tdrop (main.js toastClear): where messages would sit on the First-steps tracker, they open just under it */
#toast .tx { position: absolute; top: 0; right: 0; width: 40px; height: 40px; margin: 0; padding: 0; display: grid; place-items: center; background: none; border: 0; box-shadow: none; font-size: 15px; color: var(--soft); line-height: 1; }
#toast > div { position: relative; padding: 9px 40px 9px 12px; background: var(--panel); border: 2px solid var(--edge); border-radius: 10px; box-shadow: 2px 3px 0 #0004; pointer-events: auto; animation: pop .25s; touch-action: none; line-height: 1.38; transition: opacity .2s, transform .2s; }
#toast > div.out { opacity: 0; transform: translateY(-10px) scale(.97); pointer-events: none; }
#toast .tacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
#toast .tacts button { margin: 0; padding: 6px 12px; min-height: 38px; border-radius: 8px; font-weight: 600; }
#toast .tacts button:first-child { background: #fff4c9; border-color: #fffbe9 #b49a5e #b49a5e #fffbe9; }
@media (max-width: 640px) { #toast > div { font-size: 13.5px; padding: 8px 38px 8px 11px; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }

@media (max-width: 640px) {
  #quests { top: calc(50px + var(--safe-t)); bottom: auto; right: 8px; width: 232px; font-size: 12.5px; } /* under the top row, on the right: never on the joystick or the buttons */
  #card { top: auto; bottom: calc(78px + var(--safe-b)); left: 8px; right: 8px; width: auto; max-height: 58vh; }
  #sheet { left: 8px; right: 8px; width: auto; }
  #bar { gap: 4px; } #bar button { min-width: 52px; padding: 6px 6px 5px; font-size: 18px; } #bar button span { font-size: 10px; }
  #bar button { min-width: 58px; }
}
.maplibregl-ctrl-bottom-right { bottom: 70px; }

/* quiet links: there if you look, never in the way */
a.quiet { font-size: 11px; font-weight: normal; color: var(--soft); text-decoration: none; opacity: .85; margin-left: 6px; }
a.quiet:hover { text-decoration: underline; opacity: 1; }
#worldbar .quiet-row { width: 100%; color: var(--soft); font-size: 11px; }
#intro .motto { margin-top: 12px; color: #fff4c9; font-size: 17px; font-style: italic; text-shadow: 0 1px 5px #000; }

/* photo mode (?photo): just the world */
body.photo #hud, body.photo #bar, body.photo #quests, body.photo #toast, body.photo #card, body.photo #sheet, body.photo #labels, body.photo #worldbar, body.photo #intro, body.photo .maplibregl-control-container { display: none !important; }
/* the live 3D view at the top of /robot-fight-club (?rfc=1&embed=1: main.js EMBED; the worker marks html and body before the
   first paint): only the world, the ringside clock and the robots' labels; The Arena's picture while it loads; the page
   behind it scrolls with the wheel (play.js lets plain wheel turns through) */
html.embed, html.embed body { background: #0d0a1f url(../rfc.jpg) center / cover no-repeat; overscroll-behavior: auto; }
html.embed body > :not(#map):not(#play):not(#rfcHud):not(.rfcTag) { display: none !important; }
html.embed #map { opacity: 0 !important; pointer-events: none !important; }
html.embed #rfcHud { top: 10px !important; }
/* The RFC's ringside clock (client/src/rfcarena.js): on a phone under the hunger and energy pill, never on it; while it shows, messages open below it */
#rfcHud { position: fixed; left: 50%; top: calc(58px + var(--safe-t)); transform: translateX(-50%); z-index: 5; background: rgba(18,14,36,.82); color: #fff; font: 600 13px system-ui, sans-serif; padding: 5px 12px; border-radius: 999px; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
body:has(#rfcHud:not([hidden])) #toast { top: calc(94px + var(--safe-t)); }
@media (max-width: 640px) { #rfcHud { top: calc(76px + var(--safe-t)); font-size: 12px; padding: 4px 10px; max-width: calc(100vw - 16px); } body:has(#rfcHud:not([hidden])) #toast { top: calc(108px + var(--safe-t)); } body:has(#rfcHud:not([hidden])) #blHud { top: calc(108px + var(--safe-t)) !important; } } /* (the blaster chip under the fight clock, never on it) */

/* desktop only: shortcuts by the money, quick jumps and a search by the globe */
.desk { display: none; }
@media (min-width: 1000px) and (pointer: fine) {
  .desk { display: flex; gap: 6px; align-items: center; }
  .deskSearch { min-width: 180px; } .deskSearch input { width: 190px; padding: 5px 10px; border-radius: 20px; }
  #jumps { display: flex; gap: 4px; } #jumps button { padding: 5px 9px; }
}

#labels .label[data-av], #labels .label[data-crit] { pointer-events: auto; cursor: pointer; } /* tap a name to open them */
.adsbtn { padding-left: 18px !important; padding-right: 18px !important; font-weight: bold; } /* desktop: the way in to Run Ads */

/* text boxes: 16px so iPhones (and in-app browsers like X's) never zoom, and the cursor stays in the box */
input, textarea, select { font-size: 16px; }
#bar i.online { background: #2fa66b; }

/* the bottom search: thin, just above the bar, only in the 3D view; no transform on it (iPhone in-app browsers) */
#gobar { display: none; position: fixed; z-index: 10; left: 8px; right: 8px; bottom: calc(68px + var(--safe-b)); padding: 3px; gap: 4px; align-items: center; margin: 0; }
body.playing #gobar { display: flex; }
#sheet:not([hidden]) ~ #gobar, #card:not([hidden]) ~ #gobar, body.photo #gobar { display: none; }
#gobarIn { flex: 1; min-width: 0; font-size: 16px; padding: 4px 10px; height: 32px; box-sizing: border-box; border-radius: 16px; }
#gobar button { padding: 3px 10px; height: 32px; flex: none; }
#gobarList { position: absolute; left: 0; right: 0; top: auto; bottom: calc(100% + 4px); max-height: min(46vh, calc(100vh - 220px)); }
@media (min-width: 700px) { #gobar { left: calc(50% - 240px); right: auto; width: 480px; } }
@media (max-width: 640px) { html body.playing #quests, html body.fpTouch #quests { top: calc(50px + var(--safe-t)) !important; bottom: auto !important; max-height: none !important; overflow: visible !important; opacity: 1 !important; } } /* (controls.js moves it for first person: the top right is its place everywhere now) */
.acts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; } .acts button { padding: 3px 10px; font-size: 13px; }
/* game coins: always gold (the coin emoji is grey on many phones) */
.coin { display: inline-block; width: .95em; height: .95em; margin: 0 .2em -.12em 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0 0 18%, #ffd23f 40%, #d99a00 100%); box-shadow: inset 0 0 0 .09em #b07800; vertical-align: baseline; }
.gold { color: #b07800; font-weight: bold; }
/* gold, top left: the coin total; counts up with a floating +N and a quick shine when you earn */
#cash.goldchip { position: relative; overflow: visible; color: #8a5d00; font-weight: 800; font-size: 15px; background: linear-gradient(#fff8d6, #ffe58a); border-color: #c99a1e; font-variant-numeric: tabular-nums; }
#cash.goldchip .coin { width: 1.05em; height: 1.05em; margin-right: .3em; }
#cash.earn { animation: goldpulse .6s ease-out; }
#cash.earn::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(110deg, transparent 30%, #fffbe0cc 50%, transparent 70%) -150% 0 / 200% 100% no-repeat; animation: goldshine .7s ease-out forwards; }
.goldplus { position: absolute; left: 50%; top: -2px; transform: translateX(-50%); color: #b07800; font-weight: 800; font-size: 13px; text-shadow: 0 1px 0 #fff; pointer-events: none; animation: goldup 1s ease-out forwards; will-change: transform, opacity; }
@keyframes goldpulse { 0% { transform: scale(1); } 30% { transform: scale(1.12); box-shadow: 0 0 0 4px #ffd23f66; } 100% { transform: scale(1); } }
@keyframes goldshine { to { background-position: 150% 0; } }
@keyframes goldup { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -26px); } }
@media (prefers-reduced-motion: reduce) { #cash.earn { animation: goldpulse .3s; } #cash.earn::after, .goldplus { display: none; } }
/* rare things in a bag */
li.rare { background: linear-gradient(90deg, #fff6d0, transparent); } li.rare.r3, li.rare.r4 { background: linear-gradient(90deg, #f3e1ff, #fff6d0 60%, transparent); }
li.rare small { display: block; color: #8a5d00; }

/* the phone keyboard: whatever you're typing in sits just above it (visualViewport sets --kb and --vvh) */
body.kb #bar, body.kb #gobar { visibility: hidden; }
/* body.kb #sheet: placed by liftFor in main.js (one rule, the visible area's own coordinates) */
body.kb #card { max-height: calc(var(--vvh, 100vh) - 70px - var(--safe-t)); overflow: auto; }
body.kb #gobar:focus-within { visibility: visible; bottom: calc(var(--kb, 0px) + 6px); }

[data-person] { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; } /* names open their profile */
/* Trending: each row's name and numbers on their own line, the buttons wrap underneath */
#card:has(.trendcard) .list li { flex-wrap: wrap; } #card:has(.trendcard) .list li .grow { flex: 1 1 100%; } #card:has(.trendcard) .list li button { flex: 1 1 auto; }

#labels .label.bubble { z-index: 3; } #labels .label:not(.bubble) { z-index: 1; } /* what they say is never behind a name tag */

/* the Notification Center's green count dot (Me button and its tile) */
.ndot { display: inline-block; background: #2fa66b; color: #fff; font: bold 12px/18px sans-serif; font-style: normal; min-width: 18px; border-radius: 9px; padding: 0 5px; margin-left: 6px; text-align: center; vertical-align: middle; }
.ndot[hidden] { display: none; }
#me #badgeEvents, #me #badgeGroup { display: none; }

#pfBack { display: block; margin: 0 0 6px; padding: 4px 10px; font-size: 14px; }
#pfBack[hidden] { display: none; }

/* one search bar, always under the top row while you play; the other search boxes step aside (the globe still pops the world map) */
#gobar { top: calc(52px + var(--safe-t)); bottom: auto; }
#gobarList { top: calc(100% + 4px); bottom: auto; max-height: 50vh; }
body.playing .searchwrap { display: none; }
@media (max-width: 699px) { body.playing #vis { display: none; } }

/* search: a 🔍 on the right; it slides open leftward, → folds it back */
#searchBtn { display: none; position: fixed; z-index: 11; right: 8px; top: calc(52px + var(--safe-t)); }
body.playing:not(.searchOpen) #searchBtn { display: block; }
body.playing:not(.searchOpen) #gobar { display: none !important; }
#gobar { left: auto !important; right: 8px; width: min(480px, calc(100% - 16px)); height: auto; transform-origin: right center; animation: gobarIn .18s ease-out; }
@keyframes gobarIn { from { transform: scaleX(.2); opacity: 0; } to { transform: none; opacity: 1; } }
#gobarList[hidden] { display: none; }

#vis { display: none !important; } /* always public: no switch */

/* the world map: tap away and the whole panel goes; 🔍 brings it back */
body.worldFolded:not(.playing) #worldbar { display: none !important; }
body.worldFolded:not(.playing) #searchBtn { display: block; }
/* the search stays a slim bar up top, keyboard or not; just the box and → (the keyboard's go key searches) */
body.kb #gobar:focus-within, #gobar { bottom: auto !important; }
#gobarGo, #gobarMe { display: none !important; }

/* the world feed (📰): Twitter for this world, full screen, newest first */
#feedBtn { display: none; position: fixed; z-index: 11; right: 8px; top: calc(98px + var(--safe-t)); }
body.playing #feedBtn, body.worldFolded:not(.playing) #feedBtn { display: block; }
#feed { position: fixed; inset: 0; z-index: 60; background: var(--paper); color: var(--bink); display: flex; flex-direction: column; padding-top: var(--safe-t); }
#feed[hidden] { display: none; }
#feed header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #0002; font-size: 1.15em; }
#feed header b { flex: 1; }
#feed header .x { position: static; }
#feedTabs { display: flex; border-bottom: 1px solid #0002; }
#feedTabs button { flex: 1; background: none; border: 0; padding: 10px; font: inherit; color: inherit; opacity: .6; border-bottom: 3px solid transparent; cursor: pointer; }
#feedTabs button.on { opacity: 1; font-weight: 700; color: var(--purple); border-bottom-color: var(--purple); }
#feedCompose { padding: 10px 12px; border-bottom: 1px solid #0002; }
#feedCompose[hidden] { display: none; }
#feedCompose textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.05em; border: 1px solid #0002; border-radius: 10px; padding: 8px; resize: none; background: transparent; color: inherit; }
#feedCompose div { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 6px; }
#feedList { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.fi { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid #0001; }
.fi .av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2em; background: #c9a22722; }
.fi .bd { flex: 1; min-width: 0; line-height: 1.35; }
.fi .nm { font-weight: 700; cursor: pointer; }
.fi .nm:hover, .fi .pl:hover { text-decoration: underline; }
.fi .tm { opacity: .55; font-size: .88em; }
.fi .tx { margin-top: 2px; overflow-wrap: anywhere; }
.fi.post .tx, .fi.bot .tx { font-size: 1.05em; }
.fi .pl { color: var(--purple); cursor: pointer; font-size: .9em; margin-top: 2px; }
.fi .tag { font-size: .75em; opacity: .6; border: 1px solid #0003; border-radius: 6px; padding: 0 4px; margin-left: 4px; }
#feedList .more { text-align: center; padding: 16px; opacity: .6; }
@media (prefers-color-scheme: dark) { #feed { background: #2a1d13; color: #f6ead2; } #feed header, #feedTabs, #feedCompose, .fi { border-color: #ffe3b022; } .fi .pl, #feedTabs button.on { color: #c4b0ff; border-bottom-color: #c4b0ff; } }
#feedBadge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #1fb35a; color: #fff; font: 700 12px/20px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff; }
#feedBadge[hidden] { display: none; }
#feedBtn { position: fixed; }
.fi .acts { display: flex; gap: 20px; margin-top: 4px; font-size: .92em; opacity: .75; }
.fi .acts button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.fi .acts .on { color: #e0245e; opacity: 1; }
.fi .reps { margin-top: 6px; }
.fi .rp { padding: 6px 10px; margin-top: 4px; border-radius: 10px; background: #8881; }
.fi .rbox { display: flex; gap: 6px; margin-top: 6px; }
.fi .rbox input { flex: 1; min-width: 0; font: inherit; padding: 6px 8px; border: 1px solid #0002; border-radius: 8px; background: transparent; color: inherit; }

/* desktop: an on-screen pad to walk, turn and zoom (it holds the same keys: arrows/WASD, Q/E, + and -) */
#navPad { display: none; position: fixed; z-index: 11; right: 16px; bottom: 24px; grid-template-columns: repeat(3, 44px); gap: 6px; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) { body.playing.navpad #navPad { display: grid; } }
#navPad button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--brown); background: #fffbe9ee; box-shadow: 2px 2px 0 #0004; font-size: 1.15em; cursor: pointer; user-select: none; color: #3a2a12; }
#navPad button:hover { background: var(--cream); } #navPad button:active, #navPad button.on { background: #c9a227; color: #fff; }
#navPad button[data-k="="] { grid-column: 1; } #navPad button[data-k="-"] { grid-column: 3; }

/* Clankbook in the bar: left of Me on desktop, just above Me on phones; the badge is green */
#bar #clankBtn #feedBadge { background: #1fb35a; }
#bar #clankBtn #feedBadge[hidden] { display: none; }
@media (max-width: 699px) { #bar #clankBtn { position: absolute; right: 0; bottom: calc(100% + 8px); } }
#feed #feedX { position: fixed; z-index: 2; right: 14px; bottom: calc(14px + var(--safe-b)); width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--edge); background: var(--panel); font-size: 22px; box-shadow: 2px 2px 0 #0005; cursor: pointer; }
#feed iframe { border: 0; width: 100%; height: 100%; display: block; background: var(--paper); }
#feed { padding-top: 0 !important; }

#intro .motto.clank { font-size: .85em; opacity: .85; margin-top: 6px; font-style: italic; }

/* 📸 snap the view to Clankbook: a round button just above the bar, on the left */
#bar #snapBtn { position: absolute; left: 0; bottom: calc(100% + 8px); width: 48px; height: 48px; min-width: 0; padding: 0; border-radius: 50%; font-size: 22px; display: grid; place-items: center; }


/* Time (Me): the game clock and the calendar */
.gclock { text-align: center; padding: 8px; margin: 4px 0 8px; border-radius: 10px; background: linear-gradient(180deg, #fff4c9, #efdcae); border: 2px solid var(--brown); box-shadow: 2px 2px 0 #0003; color: var(--bink); } .gclock b { font-size: 1.5em; letter-spacing: 1px; } .gclock .muted { color: var(--bsoft); }
.calg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 6px 0 10px; text-align: center; } .calg button { padding: 6px 0; border-radius: 8px; font: inherit; } .calg button.played { background: #ffe9a3; font-weight: 700; } .calg button.today { outline: 2px solid var(--edge, #3b2f5c); } .calg button.on { background: #7c5cff; color: #fff; }
/* a company's numbers on its Finance tab */
.sttg { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 8px 0; } .stt { padding: 6px 8px; border-radius: 8px; background: #fffdf4; border: 1px dashed var(--line); } .stt b { display: block; } .stt small { opacity: .7; font-size: 11px; }

/* the phone: every app in one pocket (the old bottom bar's buttons live here) */
#bar { display: none !important; }
#phoneBtn { position: fixed; z-index: 12; right: 14px; bottom: calc(14px + var(--safe-b)); width: 62px; height: 62px; border-radius: 18px; border: 3px solid var(--bark); background: linear-gradient(160deg, var(--wood-l), var(--wood) 60%, var(--wood-d)); color: #fff; font-size: 32px; box-shadow: inset 0 0 0 2px var(--gold), inset 0 3px 0 #ffe7b066, 3px 4px 0 var(--bark), 0 6px 14px #3e281255; cursor: pointer; }
#phoneBtn i { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); box-shadow: 0 0 0 2px var(--cream); color: #fff; font: 700 12px/20px system-ui; font-style: normal; }
body:not(.playing) #phoneBtn { display: none; }
#phone { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: #2a1a0c99; backdrop-filter: blur(6px); animation: phIn .22s ease-out; }
@keyframes phIn { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
#phone .ph { position: relative; width: min(420px, 100vw); height: min(860px, 100dvh); border-radius: 38px; overflow: hidden; background: radial-gradient(circle at 18% 8%, #fffaf0 0, transparent 50%), radial-gradient(circle at 88% 86%, #e3cc9c 0, transparent 55%), repeating-linear-gradient(0deg, transparent 0 3px, #6b4f2a08 3px 4px), repeating-linear-gradient(90deg, transparent 0 5px, #6b4f2a05 5px 6px), linear-gradient(170deg, #f7ecd2, #ead8b0); color: var(--bink); display: flex; flex-direction: column; padding: calc(10px + var(--safe-t)) 18px calc(14px + var(--safe-b)); box-shadow: inset 0 0 0 3px var(--bark), 0 0 0 10px var(--wood), 0 0 0 13px var(--bark), 0 30px 60px #2a1a0caa; }
@media (max-width: 500px) { #phone .ph { border-radius: 0; box-shadow: none; width: 100vw; height: 100dvh; } }
.phs { display: flex; justify-content: space-between; font: 700 14px Tahoma, Verdana, system-ui, sans-serif; color: var(--brown); padding: 4px 6px 14px; }
.phgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; align-content: start; flex: 1; padding-top: 8px; }
.phapp { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; box-shadow: none; padding: 6px 0; color: var(--bink); font: 700 11.5px Tahoma, Verdana, system-ui, sans-serif; cursor: pointer; position: relative; }
.phapp span { width: 66px; height: 66px; border-radius: 16px; display: grid; place-items: center; font-size: 40px; line-height: 1; border: 3px solid var(--bark); box-shadow: inset 0 3px 0 #fff5, inset 0 -4px 0 #0002, 3px 3px 0 #3e281288; }
.phapp span { background-image: linear-gradient(180deg, #fff8e655, transparent 48%, #5a3a1a26) !important; } /* the accent color shows through, a touch softer and warmer */
.phapp:active span { transform: translate(2px, 2px); box-shadow: inset 0 3px 0 #fff5, inset 0 -4px 0 #0002, 1px 1px 0 #3e281288; }
.phapp i { position: absolute; top: -6px; right: 2px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--red); color: #fff; border: 2px solid var(--cream); font: 700 11px/16px system-ui; font-style: normal; box-shadow: 1px 1px 0 #0004; }
.phdock { display: flex; justify-content: space-around; padding: 12px 8px; margin: 10px 0 8px; border-radius: 18px; border: 3px solid var(--bark); background: repeating-linear-gradient(176deg, #ffffff0d 0 2px, transparent 2px 9px), linear-gradient(180deg, #e2bd85, #c99a5e 55%, #ad7f47); box-shadow: inset 0 3px 0 #fff3d699, inset 0 -4px 0 #0002, 3px 3px 0 #3e281288; }
.phdock .phapp { color: var(--bink); }
.phdock .phapp small { display: block; } /* names under the dock apps too */
.phhome { align-self: center; width: 130px; height: 6px; border-radius: 3px; border: 0; padding: 0; box-shadow: none; background: var(--brown); cursor: pointer; }

/* first person, one small tap away (bottom left) */
#fpBtn { position: fixed; z-index: 12; left: 14px; bottom: calc(14px + var(--safe-b)); width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--edge, #3b2f5c); background: #fffbe9ee; font-size: 22px; box-shadow: 2px 3px 0 var(--edge, #3b2f5c); cursor: pointer; }
body:not(.playing) #fpBtn { display: none; }

/* every screen is an app on the phone: the sheet fills the phone, with Home and close up top */
#sheet:not([hidden]) { position: fixed; z-index: 41; left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(420px, 100vw); height: min(860px, 100dvh); max-height: none; border-radius: 38px; padding: 0; display: flex; flex-direction: column; overflow: hidden; border-color: var(--bark); background: linear-gradient(180deg, var(--cream), var(--panel) 40%, #f1e6cc); box-shadow: 0 0 0 10px var(--wood), 0 0 0 13px var(--bark), 0 0 0 100vmax #2a1a0c99; }
#sheet .apphead { flex: none; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + var(--safe-t)) 14px 8px; background: linear-gradient(180deg, #efe0bb, #e2cc9a); border-bottom: 3px solid var(--brown); }
#sheet .apphead button { position: static; margin: 0; padding: 6px 12px; border-radius: 8px; font: 700 14px Tahoma, Verdana, system-ui, sans-serif; color: var(--bink); background: #e2d3ad; border: 2px solid; border-color: #f3e8cc #9c8a5c #9c8a5c #f3e8cc; box-shadow: 2px 2px 0 #0004; }
#sheet .apphead button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #0004; }
#sheetBody { flex: 1; overflow: auto; padding: 8px 16px calc(24px + var(--safe-b)); }
#pfBack:not([hidden]) { margin: 6px 16px 0; align-self: flex-start; }
@media (max-width: 500px) { #sheet:not([hidden]) { border-radius: 0; box-shadow: none; width: 100vw; height: 100dvh; } }
#sheetBody.meonly > :not(.tiles) { display: none; } #sheetBody.meonly .thead { pointer-events: none; }
/* the home screens: pages you swipe through, dots under them */
.phpages { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; } .phpages::-webkit-scrollbar { display: none; }
.phpage { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; align-content: start; padding-top: 8px; }
.phdots { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 6px 0 2px; } .phdots i { width: 8px; height: 8px; border-radius: 50%; background: #6b4f2a55; cursor: pointer; }
.phdots .pharr { display: none; border: 2px solid var(--brown); background: var(--cream); color: var(--bink); width: 28px; height: 28px; border-radius: 50%; font: 700 16px/24px system-ui; cursor: pointer; margin: 0 8px; padding: 0; box-shadow: 2px 2px 0 #0003; } .phdots .pharr:hover { background: #fff4c9; } .phdots .pharr:disabled { opacity: .25; cursor: default; }
.phdots .pharr { display: inline-block; width: 34px; height: 34px; font-size: 20px; line-height: 30px; } .phdots .pharr:disabled { visibility: hidden; } /* the arrows show everywhere there's more than one page */ .phdots i.on { background: var(--brown); }
#phX { margin-left: 8px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--brown); background: var(--cream); color: var(--bink); font: 700 13px system-ui; cursor: pointer; box-shadow: 2px 2px 0 #0003; }
/* the phone is in front: pop-ups wait behind it; five dock apps fit any phone */
body:has(#phone:not([hidden])) #toast { display: none; }
.phdock { gap: 4px; padding: 10px 6px; justify-content: space-between; } .phdock .phapp span { width: 58px; height: 58px; font-size: 34px; }
#phone .ph { box-sizing: border-box; } /* padding inside the phone's width, so nothing is cut off on narrow screens */
.phpage { grid-template-columns: repeat(4, minmax(0, 1fr)); } .phapp { min-width: 0; } .phapp small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .phdock .phapp { flex: 1; } /* app names never push the grid wider than the phone */
/* a card opened from an app shows on top of it, like a page inside the phone */
#card { z-index: 45; } body:has(#sheet:not([hidden])) #card:not([hidden]) { box-shadow: 0 0 0 100vmax #0006; }

/* login */
.acctnum { font-size: 1.15em; margin: 4px 0 8px; } .pwform { display: grid; gap: 6px; margin: 8px 0; } .warn { color: #b45309; font-weight: 600; }

/* Messages, like a phone's: an inbox of conversations, then bubbles */
.convos { list-style: none; margin: 0; padding: 0; } .convos li { display: flex; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; } .convos .grow { min-width: 0; flex: 1; }
.cav { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 18px system-ui; border: 2px solid var(--bark); box-shadow: inset 0 -2px 0 #0002, 1px 1px 0 #0004; }
.crow { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .csub { display: block; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbadge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--go); color: #fff; font: 700 12px/20px system-ui; font-style: normal; text-align: center; }
.chatback { margin: 0 0 6px; padding: 4px 10px; border-radius: 14px; font-weight: 700; }
#log.bubbles { height: auto; max-height: none; min-height: 45vh; flex: 1; border: 0; background: none; display: flex; flex-direction: column; gap: 6px; padding: 6px 2px; }
#log.bubbles > div { max-width: 80%; padding: 8px 12px; border-radius: 18px 18px 18px 4px; background: var(--cream); border: 2px solid var(--line); align-self: flex-start; line-height: 1.35; box-shadow: 1px 1px 0 #0002; }
#log.bubbles > div.me { align-self: flex-end; background: var(--go); border-color: #4b3aa8; color: #fff; border-radius: 18px 18px 4px 18px; } #log.bubbles > div.me b { display: none; }
#log.bubbles.one > div:not(.me) b { display: none; } #log.bubbles > div.sys { align-self: center; background: none; border: 0; font-size: 12px; }
#say { position: sticky; bottom: 0; background: var(--panel, #fffbe9); padding: 6px 0; } #say input { border-radius: 20px; padding: 8px 14px; }

/* arranging the phone: press and hold, the apps wiggle, drag one anywhere */
.phapp { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
#phone.edit .phapp { touch-action: none; animation: phwig .28s ease-in-out infinite alternate; } #phone.edit .phapp:nth-child(2n) { animation-delay: -.14s; }
#phone.edit .phapp.lift { animation: none; z-index: 5; position: relative; opacity: .92; transition: none; } #phone.edit .phapp.lift span { box-shadow: 0 10px 24px #3e2812aa; }
@keyframes phwig { from { rotate: -2.2deg; } to { rotate: 2.2deg; } }
.phdone { position: absolute; top: 34px; right: 14px; z-index: 6; padding: 5px 14px; border-radius: 8px; border: 2px solid; border-color: #a993ff #4b3aa8 #4b3aa8 #a993ff; background: var(--go); color: #fff; font: 700 13px Tahoma, Verdana, system-ui, sans-serif; box-shadow: 2px 2px 0 #0004; }
#phone.edit #phApps { overflow-x: hidden; }

/* the top bar on a phone: one clean row. Your gold, where you are (room to read it), log in, Clankbook, search.
   Trending, the world map and sharing live in the phone. */
#place .pin { display: none; }
@media (max-width: 699px) {
  body.playing #hud { right: 56px; flex-wrap: nowrap; align-items: center; }
  body.playing #hud #trendBtn, body.playing #hud #share, body.playing #hud #worldBtn { display: none; }
  body.playing #place { flex: 1 1 auto; max-width: none; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  body.playing #place .pin { display: inline; margin-right: 3px; } body.playing #place #here { display: none; }
  body.playing #loginChip .lbl { display: none; }
  body.playing:not(.searchOpen) #searchBtn { top: calc(8px + var(--safe-t)); right: 8px; }
}

/* 🗺️ above the phone: the map, 5 miles around you, north up */
#mapBtn { position: fixed; z-index: 12; right: 14px; bottom: calc(88px + var(--safe-b)); width: 62px; height: 62px; border-radius: 18px; border: 3px solid var(--bark); background: linear-gradient(160deg, var(--wood-l), var(--wood) 60%, var(--wood-d)); color: #fff; font-size: 32px; display: grid; place-items: center; cursor: pointer; box-shadow: inset 0 0 0 2px var(--gold), inset 0 3px 0 #ffe7b066, 3px 4px 0 var(--bark), 0 6px 14px #3e281255; } /* the same size as 📱 */
body:not(.playing):not(.mapview) #mapBtn { display: none; } body.mapview:not(.playing) #mapBtn { bottom: calc(20px + var(--safe-b)); }
/* zoom in and out on the map, above 🚶: big steps, and they keep going while held */
.zoombtn { position: fixed; z-index: 8; right: 14px; width: 52px; height: 52px; border-radius: 16px; border: 3px solid var(--bark); background: linear-gradient(160deg, var(--wood-l), var(--wood) 60%, var(--wood-d)); color: #fff; font: 800 32px/1 system-ui, sans-serif; display: grid; place-items: center; padding: 0 0 3px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: inset 0 0 0 2px var(--gold), inset 0 3px 0 #ffe7b066, 3px 4px 0 var(--bark), 0 6px 14px #3e281255; }
#zoomIn { bottom: calc(172px + var(--safe-b)); } #zoomOut { bottom: calc(110px + var(--safe-b)); } /* clear of the map's credits line */
#northBtn { bottom: calc(234px + var(--safe-b)); font-size: 26px; } #northBtn[hidden] { display: none; } /* 🧭 north up and flat, only while the map is tilted or turned */
body.playing .zoombtn, body.photo .zoombtn { display: none; } /* on any map (🌍 or 🗺️): − goes on out to the whole world */
body:not(.playing) #joy, body:not(.playing) #walkBtn, body.mapview #walkBtn, body.driving #walkBtn { display: none !important; } /* first person's joystick belongs to the street, never the map */
#fpBtn { display: none !important; } /* the eyeball is gone: the map button does the switching */
body.photo #mapBtn { display: none; }

/* an app that is a Clankbook page, inside the phone; ⤢ Expand for the full screen */
#sheet.web #sheetBody { padding: 0; overflow: hidden; display: flex; } #webApp { flex: 1; width: 100%; min-height: 70vh; border: 0; background: var(--panel, #fffbe9); }
#sheetExpand { margin-left: auto; margin-right: 8px; padding: 4px 12px; border-radius: 14px; font-weight: 700; }

/* a card opened from the phone (Trending): it fills the phone like every other app */
#card.inphone:not([hidden]) { position: fixed; z-index: 46; left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(420px, 100vw); height: min(860px, 100dvh); max-height: none; max-width: none; border-radius: 38px; overflow: auto; padding: calc(16px + var(--safe-t)) 16px calc(24px + var(--safe-b)); }
@media (max-width: 500px) { #card.inphone:not([hidden]) { border-radius: 0; width: 100vw; height: 100dvh; } }

/* Browzer: the phone's web browser */
.bz { display: flex; flex-direction: column; height: 100%; min-height: 70vh; } .bzbar { display: flex; gap: 6px; align-items: center; padding: 4px 0 8px; }
.bzbar button { flex: none; width: 34px; height: 34px; border-radius: 8px; padding: 0; font: 700 18px system-ui; box-shadow: 2px 2px 0 #0003; } .bzbar form { flex: 1; min-width: 0; } #bzAddr { width: 100%; border-radius: 18px; padding: 8px 14px; font-size: 15px; }
.bzbody { flex: 1; display: flex; flex-direction: column; } #bzFrame { flex: 1; width: 100%; min-height: 64vh; border: 2px solid var(--brown); border-radius: 8px; background: var(--cream); }
.bzhome { text-align: center; padding: 18px 6px; } .bzlogo { font: 800 28px Georgia, serif; color: var(--brown); margin: 8px 0 2px; }
.bzgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; } .bzgrid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 10px; font: 700 12px Tahoma, Verdana, system-ui, sans-serif; box-shadow: 2px 2px 0 #0003; } .bzgrid button span { font-size: 32px; }
.bzmarks { list-style: none; padding: 0; text-align: left; } .bzmarks li { padding: 8px 4px; border-bottom: 1px dashed var(--line); } .bzmarks small { display: block; opacity: .6; }
.bzload { display: grid; place-items: center; min-height: 40vh; } .bzload i { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #6b4f2a33; border-top-color: var(--brown); animation: bzspin .8s linear infinite; } @keyframes bzspin { to { transform: rotate(1turn); } }
#sheet.bzsheet #sheetBody { padding: 6px 10px 10px; display: flex; flex-direction: column; }

/* ✉️ Email */
.emaddr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: #7c5cff14; border: 2px solid #7c5cff44; } .emaddr small { width: 100%; opacity: .7; } .emaddr b { flex: 1; word-break: break-all; } .emaddr button { padding: 4px 12px; border-radius: 12px; }
.emtext { margin: 12px 0; padding: 12px; border-radius: 8px; background: var(--cream); border: 1px dashed var(--line); line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; white-space: normal; }
/* 📞 Calls (calls.js): the call screen fills the phone */
.callbtns { float: right; display: inline-flex; gap: 6px; }
.callbtns button { margin: 0; padding: 4px 10px; border-radius: 14px; font-size: 16px; line-height: 1.2; }
#callScreen { position: fixed; z-index: 90; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 100vw); height: min(860px, 100dvh); border-radius: 38px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #fffaf0, #ead8b0 70%); color: var(--bink); display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(56px + var(--safe-t)) 20px calc(44px + var(--safe-b)); box-sizing: border-box; box-shadow: inset 0 0 0 3px var(--bark), 0 0 0 10px var(--wood), 0 0 0 13px var(--bark), 0 0 0 100vmax #2a1a0cbb; font-family: Tahoma, Verdana, system-ui, sans-serif; }
@media (max-width: 500px) { #callScreen { border-radius: 0; box-shadow: none; width: 100vw; height: 100dvh; } }
#callScreen .cwho { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
#callScreen .cwho b { font-size: 28px; font-weight: 600; }
#callScreen small#cState, #callScreen .ctop small { font-size: 15px; opacity: .8; font-variant-numeric: tabular-nums; }
#callScreen .cav.big { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; font-weight: 700; background: var(--go); border: 3px solid var(--bark); box-shadow: 3px 3px 0 #3e281288; margin-top: 30px; }
#callScreen .cbtns { position: relative; z-index: 2; display: flex; gap: 26px; justify-content: center; }
#callScreen .cbtn { width: 68px; height: 68px; border-radius: 50%; border: 3px solid var(--bark); margin: 0; padding: 0; background: var(--cream); color: var(--bink); box-shadow: 3px 3px 0 #3e281288; font-size: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; }
#callScreen .cbtn small { position: absolute; top: 100%; margin-top: 6px; font-size: 12px; white-space: nowrap; opacity: .85; }
#callScreen .cbtn.off { background: var(--brown); color: #fff; }
#callScreen .cbtn.no { background: var(--red); color: #fff; }
#callScreen .cbtn.yes { background: var(--green); color: #fff; }
#callScreen.vid { background: #000; color: #fff; } #callScreen.vid .cbtn small { text-shadow: 0 1px 4px #000; }
#callScreen .cremote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
#callScreen .cself { position: absolute; z-index: 2; top: calc(16px + var(--safe-t)); right: 16px; width: 28%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: #222; box-shadow: 0 2px 12px #0008; transform: scaleX(-1); }
#callScreen .ctop { position: relative; z-index: 2; align-self: flex-start; display: flex; flex-direction: column; gap: 2px; text-shadow: 0 1px 6px #000c; }
#callScreen .ctop b { font-size: 20px; }

/* the phone fits any screen height (in-app browsers like X's are short): four rows always show, icons scale with the height */
#phone .ph { display: flex; flex-direction: column; padding-bottom: calc(8px + var(--safe-b)); }
.phpages { min-height: 0; } .phpage { grid-template-rows: repeat(4, minmax(0, 1fr)); align-content: stretch; row-gap: clamp(4px, 1.4dvh, 18px); overflow: hidden; }
.phapp span { width: clamp(44px, 7.6dvh, 66px); height: clamp(44px, 7.6dvh, 66px); font-size: clamp(26px, 4.6dvh, 40px); }
.phpage .phapp { min-height: 0; gap: 3px; padding: 2px 0; justify-content: center; } .phapp small { line-height: 1.3; padding-bottom: 1px; } /* short screens (X's built-in browser): icons shrink first so every name stays readable */
@media (max-height: 760px) { .phapp span { width: clamp(38px, 6.4dvh, 60px); height: clamp(38px, 6.4dvh, 60px); font-size: clamp(22px, 3.9dvh, 36px); } }
@media (max-height: 780px) { .phhome { display: none; } .phdock { margin: 6px 0 4px; padding: 8px; } .phs { padding-bottom: 6px; } .phdots { padding-top: 2px; } }

/* the map and the 3D world fill the whole screen, under see-through browser bars (X's in-app browser and others); the page
   behind them is ground-colored so nothing blue ever shows. Buttons stay inside the usable area (bottom/top with safe insets). */
html, body { background: #d5dacb; }
#map, #play { top: 0; left: 0; right: 0; bottom: auto; height: 100%; height: 100lvh; }

/* the button column, bottom right: Clankbook, Online, Portfolio, the map, the phone. All the same, a little smaller */
.sidebtn { position: fixed; z-index: 12; right: 14px; width: 52px; height: 52px; border-radius: 16px; border: 3px solid var(--bark); background: linear-gradient(160deg, var(--wood-l), var(--wood) 60%, var(--wood-d)); color: #fff; font-size: 26px; box-shadow: inset 0 0 0 2px var(--gold), inset 0 3px 0 #ffe7b066, 3px 4px 0 var(--bark), 0 6px 14px #3e281255; display: grid; place-items: center; cursor: pointer; padding: 0; }
.sidebtn i { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); box-shadow: 0 0 0 2px var(--cream); color: #fff; font: 700 12px/20px system-ui; font-style: normal; }
/* every button in the column the same: 44 px, 52 px apart (the phone and the map have their own rules above; these win) */
.sidebtn, #phoneBtn, #mapBtn { width: 44px !important; height: 44px !important; font-size: 22px !important; border-radius: 14px !important; right: 14px !important; }
#phoneBtn { bottom: calc(14px + var(--safe-b)) !important; } #mapBtn { bottom: calc(66px + var(--safe-b)) !important; }
#bagBtn { bottom: calc(118px + var(--safe-b)); } #pfBtn { bottom: calc(170px + var(--safe-b)); } #onBtn { bottom: calc(222px + var(--safe-b)); } #cbBtn { bottom: calc(274px + var(--safe-b)); }
.sidebtn i, #phoneBtn i { top: -7px; right: -7px; min-width: 18px; height: 18px; font: 700 11px/18px system-ui; }
body:not(.playing) .sidebtn, body.photo .sidebtn { display: none; }

/* the column sits under every pop-up (cards, quests, messages), and folds down to the map and the phone; ▲ brings the rest back */
.sidebtn, #mapBtn, #phoneBtn, #sideMore { z-index: 8; }
body:not(.sideOpen) .sidebtn { display: none; }
#sideMore { position: fixed; right: 21px; bottom: calc(118px + var(--safe-b)); width: 30px; height: 26px; border-radius: 13px; border: 2px solid var(--bark); background: var(--cream, #fff6dc); color: var(--bark, #4a3220); font: 800 12px/1 system-ui; padding: 0; cursor: pointer; box-shadow: 0 2px 0 var(--bark); }
#ntBtn { bottom: calc(326px + var(--safe-b)); } body.sideOpen #sideMore { bottom: calc(378px + var(--safe-b)); } /* 🔔 on top of the side buttons */
#acctSum { margin: 0 0 10px; } #acctSum .list li { cursor: pointer; }
body:not(.playing) #sideMore, body.photo #sideMore { display: none; }
/* + and − in the 3D world: little buttons on top of the side buttons, under the 🔍. Folded column: above ▲; open: above 🔔's ▲ */
.gzoom { position: fixed; z-index: 8; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--bark, #4a3220); background: var(--cream, #fff6dc); color: var(--bark, #4a3220); font: 800 24px/1 system-ui, sans-serif; display: grid; place-items: center; padding: 0 0 2px; cursor: pointer; box-shadow: 0 2px 0 var(--bark, #4a3220), 0 4px 10px #3e281233; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.gzoom:active { transform: translateY(2px); box-shadow: 0 0 0 var(--bark, #4a3220); }
#gzIn { bottom: calc(198px + var(--safe-b)); } #gzOut { bottom: calc(154px + var(--safe-b)); }
body.sideOpen #gzIn { bottom: calc(458px + var(--safe-b)); } body.sideOpen #gzOut { bottom: calc(414px + var(--safe-b)); }
body:not(.playing) .gzoom, body.photo .gzoom { display: none; }
@media (min-width: 700px) and (max-height: 860px) { body.sideOpen.playing #quests:not(.min) { right: 66px; } } /* a short screen: your first steps make room for the zoom and the column */
/* 💰 Money: one app, a tab per money page; scrolls sideways on a narrow phone */
#sheet.web #sheetBody { flex-direction: column; }
.moneytabs { display: flex; gap: 6px; overflow-x: auto; flex: none; padding: 6px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.moneytabs::-webkit-scrollbar { display: none; }
#card .moneytabs { padding: 0 34px 8px 0; margin: 0 0 4px; }
.moneytabs button { flex: none; white-space: nowrap; padding: 5px 11px; border-radius: 16px; font-size: 13px; }
.moneytabs button.on { background: #fff4c9; font-weight: 700; }

/* hunger and energy, beside your gold: two small bars (eat and drink fill them; nothing bad happens when they're low) */
#needs { flex: 0 0 auto; display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; font-size: 12px; }
#needs[hidden] { display: none; }
#needs span { display: inline-flex; align-items: center; gap: 3px; }
#needs i { display: inline-block; width: 30px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.15); overflow: hidden; }
#needs i b { display: block; height: 100%; background: #2fa66b; transition: width .6s; }
#needs i b.low { background: #e0892a; }
@media (max-width: 640px) { #needs { position: fixed; z-index: 9; left: 8px; top: calc(48px + var(--safe-t)); gap: 4px; padding: 2px 7px; font-size: 11px; } #needs i { width: 22px; height: 5px; } }

@media (pointer: coarse) { #gobarList li { padding-top: 11px; padding-bottom: 11px; } } /* big tap targets for search suggestions */

/* ================= UX pass (2026-10-06): one welcome, buttons that say what they do, nothing to tap under 40 px ================= */
/* the welcome card: where you landed, your gold, six things you can do, one big Let's go */
#card .welcome h2 { font-size: 20px; margin-bottom: 2px; }
#card .wwhere { color: var(--soft); margin: 0 0 6px; line-height: 1.4; }
#card .wgold { font-size: 1.12em; font-weight: 700; margin: 2px 0 8px; }
#card .wtips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 10px; }
#card .wtip { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-width: 0; padding: 6px 8px; background: var(--paper); border: 2px solid var(--line); border-radius: 10px; }
#card .wtip span { grid-row: span 2; font-size: 24px; line-height: 1; }
#card .wtip b { font-size: 14px; } #card .wtip small { color: var(--soft); font-size: 12px; line-height: 1.25; }
#wcStart { width: 100%; padding: 12px; border-radius: 10px; font-size: 1.2em; font-weight: 700; }
@media (max-width: 360px) { #card .wtip small { font-size: 11px; } #card .wtip span { font-size: 20px; } }
/* every card: a 40 px ✕ in the corner, the title clear of it; the save card's way to log in instead */
#card .x { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; right: 6px; top: 6px; font-size: 16px; border-radius: 10px; }
#card h2 { padding-right: 46px; }
#card .orlogin { margin-top: 10px; padding-top: 6px; border-top: 1px dashed var(--line); text-align: center; }
#card .orlogin button { min-height: 40px; background: none; border: 0; box-shadow: none; color: var(--purple); text-decoration: underline; font-weight: 700; }
/* the button column: Clankbook is in the top row (🤖) and the phone's dock, so the column is 🔔 👋 💰 🎒 🗺️ 📱; ▲, + and − are 40 px */
#cbBtn { display: none !important; }
#ntBtn { bottom: calc(274px + var(--safe-b)); }
#sideMore { right: 16px; width: 40px; height: 30px; border-radius: 15px; font-size: 13px; bottom: calc(118px + var(--safe-b)); }
body.sideOpen #sideMore { bottom: calc(326px + var(--safe-b)); }
.gzoom { right: 16px; width: 40px; height: 40px; }
#gzOut { bottom: calc(156px + var(--safe-b)); } #gzIn { bottom: calc(202px + var(--safe-b)); }
body.sideOpen #gzOut { bottom: calc(364px + var(--safe-b)); } body.sideOpen #gzIn { bottom: calc(410px + var(--safe-b)); }
/* a new player's 📱 glows until it's opened once (main.js phoneNew); the phone's ✕ is a real button */
@keyframes phpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
body.phoneNew.playing #phoneBtn { animation: phpulse 1.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { body.phoneNew.playing #phoneBtn { animation: none; } }
#phX { width: 40px; height: 40px; font-size: 15px; }
/* the map (🗺️, 🌍 or a pinch out): no walking buttons on it, a clear 🚶 Street to go back, a top row that fits a phone */
body:not(.playing) #touchBtns, body:not(.playing) #wfly { display: none !important; } /* (a helicopter's offer waits in the street) */
body:not(.playing) #mapBtn { width: auto !important; padding: 0 14px; font-size: 16px !important; font-weight: 700; white-space: nowrap; }
@media (max-width: 699px) { #hud #trendBtn, #hud #share, #hud #worldBtn { display: none; } #loginChip .lbl { display: none; } body:not(.playing) #place { flex: 1 1 auto; max-width: none; margin: 0; } }
@media (max-width: 640px) { html body.playing:has(#rfcHud:not([hidden])) #quests { top: calc(106px + var(--safe-t)) !important; } } /* ringside: under the LIVE bar */
/* 🤖 Clankbook says its name on a computer; there 💾 Save is the one save button */
#clankQuick .lbl { display: none; }
@media (min-width: 1000px) and (pointer: fine) { #clankQuick .lbl { display: inline; } #loginChip { display: none !important; } }
/* ✈️ Travel (a computer's top row): every famous place in one menu, not five chips */
.travelwrap { position: relative; }
#hud:has(#travelMenu:not([hidden])), #hud:has(#shareMenu:not([hidden])) { z-index: 55; } /* an open menu up top is over any message */
.deskSearch { display: none !important; } /* one search on the map: the box over the places grid (🔍 brings it back) */
#travelMenu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 12; width: 400px; padding: 10px 10px 8px; background: var(--paper); border: 3px solid var(--edge); border-radius: 12px; box-shadow: 3px 3px 0 #0005; }
#travelMenu > b { display: block; margin: 0 0 8px; font-size: 15px; }
#travelMenu #jumps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#travelMenu #jumps button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 8px 4px; border-radius: 8px; font-size: 12px; line-height: 1.15; white-space: normal; }
#travelMenu #jumps button b { font-size: 22px; line-height: 1; }
#travelMenu .tmrow { display: flex; gap: 6px; margin-top: 8px; } #travelMenu .tmrow button { flex: 1; min-height: 38px; border-radius: 8px; font-weight: 600; }
@media (max-width: 400px) { body.playing #hud .chip:not(#needs) { padding: 5px 8px; } body.playing #place .pin { display: none !important; } #cash.goldchip { font-size: 14px; } } /* a narrow phone: tighter chips, so where you are still reads */
/* fingers: every button you'd tap is at least 40 px to touch, even where it looks smaller (an invisible margin around it) */
@media (pointer: coarse) {
  #hud button.chip:not(#cash):not(#needs), #hud #place, .phdots .pharr { position: relative; } /* (#cash is already; #needs, #searchBtn and #sideMore are fixed: they hold their own) */
  #hud button.chip::before, #hud #place::before, #searchBtn::before { content: ''; position: absolute; inset: -4px -1px; }
  #sideMore::before { content: ''; position: absolute; inset: -6px -2px; } .phdots .pharr::before { content: ''; position: absolute; inset: -4px; }
  #card .row > button, #card .row > a > button, #card .acts > button, #sheetBody .row > button, #toast .tacts button { min-height: 40px; }
}
body.worldFolded:not(.playing) #searchBtn::after { content: ' Places'; font: 700 14px Tahoma, Verdana, system-ui, sans-serif; } /* on the map, 🔍 opens the search and the famous places */
body.searchOpen #toast { top: calc(104px + var(--safe-t)); } /* typing a search: an answer shows under the box, never on it */
#sheet .apphead button { min-height: 40px; } /* an app's ‹ Home, ⤢ Expand and ✕: real buttons to a finger */
.wlbl { display: none; } @media (min-width: 1200px) and (pointer: fine) { .wlbl { display: inline; } } /* a wide screen: 📈 Trending and 🔗 Share say their names too */
/* Nothing on the game's screen is ever selected or opens iOS's Copy / Look Up menu: not a button you hold (fly Up/Down,
   Power, zoom, the joystick), not the crosshair, a label, a card or a toast. Only what people type stays selectable. */
html, body, body * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
button, .chip, .gzoom, .zoombtn, .sidebtn, #joy, #joy *, #hud, #bar, [role="button"], [data-app], .phApp, #phApps, #phDock, #labels { touch-action: manipulation; }
input, textarea, select, [contenteditable="true"], [contenteditable="true"] * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* ================= a calm screen (2026-10-07): one top bar, a lane for each thing under it, news in 📱 =================
   The top bar holds your gold, where you are and the buttons. Under it, main.js hudFlow gives each item its own lane: the
   needs and the First-steps pill share a row on a phone, the RFC's live strip goes under them, the blaster chip under that,
   and a message opens under all of it. Nothing sits on anything. Most news goes to 📱 Notifications (main.js notify): the
   phone buzzes and wiggles, and only what needs you now (or answers what you just did) pops up, one small card at a time. */
/* the needs, small: three icons with thin bars, its own pill under your gold */
@media (max-width: 699px) {
  #needs { position: fixed; z-index: 9; left: 8px; top: calc(50px + var(--safe-t)); height: 26px; gap: 5px; padding: 0 8px; font-size: 11px; line-height: 1; }
  #needs span { gap: 2px; } #needs i { width: 16px; height: 4px; border-radius: 2px; }
  body.playing #quests { right: 8px; width: auto; }
  body.playing #quests.min .qchip { min-height: 26px; height: 26px; padding: 0 11px; display: flex; align-items: center; font-size: 12px; line-height: 1; max-width: min(250px, calc(100vw - 150px)); border-width: 2px; }
  body.playing #quests:not(.min) { width: min(232px, calc(100vw - 150px)); }
  #rfcHud { font-size: 12px; padding: 4px 10px; line-height: 16px; }
}
@media (max-width: 699px) and (pointer: coarse) { #quests .qchip { position: relative; } #quests .qchip::before, #needs::before { content: ''; position: absolute; inset: -7px -1px; } #needs { position: fixed; } } /* (still a 40 px target to a finger) */
#quests .qchip.qcheer { background: linear-gradient(#eaf7df, #cfe9b8); border-color: #3f8a3a; color: #1f4d1c; animation: qin .35s ease-out; } /* a step done: the pill cheers, then shows the next one */
/* + and − in the street: a phone pinches (and has 🎥 for the views), so they stay on computers; on the map they're still there */
@media (pointer: coarse) and (max-width: 699px) { body.playing .gzoom { display: none !important; } }
/* the RFC's betting panel on a computer: left of the button column, never on it */
body.playing #rfcSide { right: 66px !important; }
body.playing #rfcTab { right: 62px !important; border-right: 2px solid var(--edge) !important; border-radius: 8px !important; }
/* one small message at a time, brief */
#toast { width: min(360px, calc(100% - 16px)); }
#toast > div { padding: 7px 36px 7px 11px; font-size: 13.5px; line-height: 1.32; border-radius: 12px; }
#toast .tx { width: 36px; height: 36px; }
#toast .tacts { margin-top: 5px; } #toast .tacts button { min-height: 34px; padding: 4px 11px; }
@media (max-width: 640px) { #toast > div { font-size: 13px; padding: 7px 34px 7px 10px; } }
/* 📱 buzzes when a line lands in Notifications: a small wiggle and a pulse of its badge */
@keyframes phbuzz { 0%, 100% { transform: none; } 15% { transform: rotate(-9deg); } 30% { transform: rotate(8deg); } 45% { transform: rotate(-6deg); } 60% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }
@keyframes phbadge { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
#phoneBtn.buzz { animation: phbuzz .6s ease-in-out; } #phoneBtn.buzz i { animation: phbadge .6s ease-out; }
@media (prefers-reduced-motion: reduce) { #phoneBtn.buzz, #phoneBtn.buzz i { animation: none; } }
/* a line in 🔔 Notifications that came with buttons keeps them for this visit */
#notifList .nacts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; } #notifList .nacts button { padding: 4px 10px; min-height: 34px; border-radius: 8px; font-size: 13px; font-weight: 600; }
#notifList .list li { align-items: flex-start; } #notifList .list li b { font-weight: 600; line-height: 1.3; }
#toast small { font-size: 12px; line-height: 1.3; color: var(--soft); }
#toast > div { max-height: min(34vh, 220px); overflow: hidden auto; overscroll-behavior: contain; } /* a short screen (an in-app browser): a message never reaches the joystick */
/* the welcome: compact on a phone, the walking buttons out of its way until Let's go */
body:has(#card:not([hidden]) .welcome) :is(#joy, #touchBtns, #blTouch, #sideMore, .gzoom, #mapBtn) { visibility: hidden; }
@media (max-width: 699px), (max-height: 760px) { /* a phone, or a short window: the welcome fits without scrolling */
  #card .welcome h2 { font-size: 18px; } #card .wwhere { font-size: 13px; margin-bottom: 4px; } #card .wgold { margin: 0 0 6px; }
  #card .wtips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 2px 0 8px; }
  #card .wtip { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 6px 4px; row-gap: 2px; }
  #card .wtip span { grid-row: auto; font-size: 22px; } #card .wtip b { font-size: 12.5px; } #card .wtip small { display: none; }
  #wcStart { padding: 10px; font-size: 1.1em; }
}
