/* the game's title font, bundled (Anton, SIL Open Font License: fonts/Anton-OFL.txt) so it looks the same on every phone */
@font-face { font-family: Anton; src: url(fonts/Anton.woff) format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0f1a0c; color: #f3f1e6; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; border: 1px solid #ffffff33; background: #1e2b18cc; color: #f3f1e6; border-radius: 10px; padding: 9px 14px; }
button:hover { background: #2c3f23; }
button.primary { background: #e0a526; border-color: #e0a526; color: #1b1405; font-weight: 700; }
button.primary:hover { background: #f0b83a; }
button.link { background: none; border: none; color: #c9d7b4; text-decoration: underline; padding: 4px 0; }
input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #ffffff33; background: #0c140acc; color: #fff; }
.small { font-size: 13px; }
.muted { color: #b8c2a8; }
.hidden { display: none !important; }

.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: block; }

/* start */
#start { background: radial-gradient(circle at 50% 30%, #3d6b2a 0%, #1a2e12 55%, #0b1408 100%); }
.start-card { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, 92vw); text-align: center; display: grid; gap: 12px; }
.start-card h1 { margin: 0; font-size: 46px; letter-spacing: 1px; color: #f6e7b6; text-shadow: 0 3px 0 #2a1d05; }
.logo { width: min(480px, 90vw); height: auto; display: block; margin: 0 auto; }
.year { margin: -6px 0 0; letter-spacing: 8px; color: #e0a526; font-weight: 700; }
.story { line-height: 1.5; color: #dfe6d2; }

/* map: the game board */
#mapScreen { background: #04070a; }
#board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#board:active { cursor: grabbing; }
.hudbar { position: absolute; left: 16px; right: 16px; top: 14px; height: 46px; display: flex; align-items: center; gap: 22px; padding: 0 16px; background: linear-gradient(90deg, #0b1116f0, #0b111699); border: 1px solid #e3a23a44; font-size: 14px; pointer-events: none; }
.hudbar b { color: #f3c056; font-size: 16px; }
.hudbar .brand { font-family: Anton, Impact, sans-serif; letter-spacing: 2px; font-size: 18px; color: #f3c056; }
.hudbar .sep { width: 1px; height: 22px; background: #2c3b48; }
.hudbar .right { margin-left: auto; opacity: .8; }
.finder { position: absolute; left: 16px; top: 74px; width: 340px; max-height: calc(100vh - 90px); overflow: visible; padding: 16px; display: grid; gap: 9px; align-content: start; background: linear-gradient(180deg, #121a21f4, #0b1116f4); border: 1px solid #e3a23a55; clip-path: polygon(0 14px, 14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); transition: transform .3s; }
.finder.closed { transform: translateX(calc(-100% + 10px)); }
.finder-toggle { position: absolute; right: 6px; top: 8px; padding: 2px 9px; border-radius: 6px; background: none; border: 1px solid #2c3b48; }
.finder h2 { margin: 0; font: 400 20px Anton, Impact, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: #f3c056; }
.finder .sub { font-size: 13px; opacity: .7; margin-top: -6px; }
.finder input, .finder select { width: 100%; padding: 10px 12px; border-radius: 0; border: 1px solid #2c3b48; background: #070b0e; color: #eef2f4; font-size: 15px; }
.finder input { border-color: #e3a23a; box-shadow: inset 0 0 12px #e3a23a22; }
.finder select:disabled { opacity: .5; }
.search { position: relative; }
#suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; list-style: none; margin: 0; padding: 0; background: #070b0e; border: 1px solid #2c3b48; max-height: 330px; overflow: auto; }
#suggest li { padding: 8px 12px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #1b2630; cursor: pointer; }
#suggest li:hover, #suggest li.on { background: linear-gradient(90deg, #e3a23a33, transparent); }
#suggest li small { opacity: .6; font-size: 12px; white-space: nowrap; }
#suggest li em { color: #f3c056; font-style: normal; font-size: 12px; margin-left: 6px; }
#suggest li.muted { cursor: default; opacity: .6; }
.or { font-size: 11px; text-align: center; opacity: .55; letter-spacing: 1px; text-transform: uppercase; }
.lbl { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #e3a23a; margin-bottom: 3px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick { display: grid; gap: 7px; padding-top: 8px; border-top: 1px solid #2c3b48; }
.pick-name { font: 400 22px Anton, Impact, sans-serif; letter-spacing: 1px; color: #fff; }
.pick-info { font-size: 13px; color: #c9d4db; margin-top: -4px; }
button.gold { border: none; border-radius: 0; padding: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; background: linear-gradient(180deg, #f7c24a, #d98a1c); color: #1b1405; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
button.ghost { border-radius: 0; text-transform: uppercase; letter-spacing: 1px; font-size: 13px; background: transparent; border: 1px solid #2c3b48; }
.tip { font-size: 12px; opacity: .6; }
.home-box { background: #e0a52618; border: 1px solid #e0a52655; padding: 8px 10px; display: grid; gap: 6px; font-size: 14px; }
.rail { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; }
.rail button { width: 46px; height: 46px; padding: 0; border-radius: 10px; font-size: 18px; background: #0b1116e6; border: 1px solid #e3a23a55; color: #f3c056; }
.rail button:hover { background: #1d2a33; }
.legend { position: absolute; right: 16px; bottom: 16px; padding: 10px 14px; background: #0b1116e6; border: 1px solid #2c3b48; font-size: 12.5px; display: grid; gap: 5px; pointer-events: none; }
.legend .t { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: #e3a23a; font-weight: 700; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.tooltip { position: absolute; pointer-events: none; background: #0b1116f0; border: 1px solid #e3a23a88; padding: 8px 10px; font-size: 13px; line-height: 1.4; min-width: 160px; transform: translate(14px, 14px); }
.tooltip b { color: #f3c056; letter-spacing: 1px; }
.maphelp { position: absolute; right: 74px; top: 50%; transform: translateY(-50%); width: 300px; padding: 12px 14px; background: #0b1116f2; border: 1px solid #2c3b48; font-size: 13px; line-height: 1.5; }
.maphelp ul { margin: 6px 0 0; padding-left: 18px; }
.fade { position: fixed; inset: 0; background: radial-gradient(circle, #1a2a12 0%, #000 70%); opacity: 0; pointer-events: none; transition: opacity .45s; z-index: 50; }
.fade.on { opacity: 1; pointer-events: all; }
.fade.on::after { content: 'Entering…'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 400 22px Anton, Impact, sans-serif; letter-spacing: 3px; color: #f3c056; }
@media (max-width: 760px) { .hide-sm { display: none; } .finder { top: auto; bottom: 12px; left: 12px; width: calc(100vw - 24px); max-height: 48vh; overflow: auto; } .finder.closed { transform: translateY(calc(100% - 46px)); } .rail { top: 74px; transform: none; } .rail button { width: 40px; height: 40px; } .legend { display: none; } .hudbar { gap: 12px; font-size: 12px; } .hudbar .brand { font-size: 14px; } }

/* game */
#view2d, #view3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: absolute; top: 10px; left: 10px; display: grid; gap: 6px; pointer-events: none; }
.hud-top, .hud-stats { background: #0b1408bb; border-radius: 12px; padding: 8px 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
#placeName { font-weight: 700; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #3d6b2a; }
.badge.visit { background: #7a4b12; }
.energy { display: inline-flex; align-items: center; gap: 6px; }
.energy i { display: inline-block; width: 90px; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #e0a526, #8cd156); }
.game-rail button { font-size: 14px; font-weight: 700; }
#prompt { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); background: #0b1408dd; padding: 8px 14px; border-radius: 10px; pointer-events: none; }
#toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; pointer-events: none; }
#toast div { background: #e0a526; color: #1b1405; font-weight: 600; padding: 8px 14px; border-radius: 10px; animation: fade 3.5s forwards; }
@keyframes fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
#restOverlay { position: absolute; inset: 0; background: rgba(4, 8, 12, 0.45); display: grid; place-items: center; pointer-events: none; animation: restIn 0.6s ease-out; }
@keyframes restIn { from { background: rgba(4, 8, 12, 0); } }
.rest-card { pointer-events: auto; background: #0b1014d9; border: 1px solid #e3a23a66; padding: 16px 24px; text-align: center; min-width: 260px; }
.rest-title { font-size: 20px; font-weight: 700; color: #f3c056; margin-bottom: 10px; }
.rest-bar { height: 8px; background: #ffffff1a; margin-bottom: 8px; }
.rest-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #e3a23a, #f3c056); }
.rest-info { font-size: 13px; color: #c9d1d6; margin-bottom: 10px; }
#view3d { background: #a9d8f0; }
#chat { position: absolute; left: 10px; bottom: 10px; width: min(380px, calc(100vw - 20px)); }
#chatLog { list-style: none; margin: 0 0 6px; padding: 0; max-height: 160px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 14px; }
#chatLog li { background: #0b1408aa; padding: 3px 8px; border-radius: 6px; margin-top: 2px; }
#chatLog li b { color: #e0a526; }
#chatLog li.sys { color: #c9d7b4; font-style: italic; }
#help { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(460px, 92vw); background: #101a0df5; border: 1px solid #ffffff22; border-radius: 14px; padding: 16px; line-height: 1.5; }
#help h3 { margin-top: 0; }
#touch #stick { position: absolute; left: 24px; bottom: 120px; width: 120px; height: 120px; border-radius: 50%; background: #ffffff18; border: 2px solid #ffffff33; touch-action: none; }
#touch #stick i { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: #ffffff55; }
#touch #actBtn { position: absolute; right: 24px; bottom: 130px; width: 76px; height: 76px; border-radius: 50%; font-size: 24px; font-weight: 700; background: #e0a526cc; color: #1b1405; }
@media (max-width: 640px) { #chat { bottom: 6px; } #chatLog { max-height: 90px; } .start-card h1 { font-size: 36px; } }

/* landing */
.attract { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 18px; pointer-events: none; background: radial-gradient(ellipse at center, rgba(4,7,10,0.15) 30%, rgba(4,7,10,0.7) 100%); transition: opacity .6s; }
.attract img { width: min(520px, 80vw); filter: drop-shadow(0 8px 24px #000); }
.attract .tap { font: 400 20px Anton, Impact, sans-serif; letter-spacing: 4px; color: #f3c056; text-transform: uppercase; animation: pulse 1.6s ease-in-out infinite; }
.attract.gone { opacity: 0; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* top bar buttons */
.hudbar button { pointer-events: auto; }
.coinchip, .topbtn, .profilechip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 0; background: #0b1116; border: 1px solid #e3a23a77; color: #eef2f4; font-size: 14px; }
.coinchip b { color: #f3c056; }
.coinchip i { font-style: normal; font-weight: 800; color: #1b1405; background: #f3c056; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; }
.profilechip { padding: 2px 10px 2px 2px; }
.profilechip canvas { width: 32px; height: 40px; }

/* dialogs */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0,0,0,0.72); backdrop-filter: blur(3px); animation: fadein .35s; }
@keyframes fadein { from { opacity: 0; } }
.dlg { position: relative; width: min(560px, 94vw); max-height: 92vh; overflow: auto; padding: 22px; display: grid; gap: 8px; background: linear-gradient(180deg, #121a21, #0b1116); border: 1px solid #e3a23a66; box-shadow: 0 20px 60px #000c; }
.dlg.wide { width: min(860px, 96vw); }
.dlg h2 { margin: 0; font: 400 26px Anton, Impact, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: #f3c056; }
.dlg .x { position: absolute; right: 10px; top: 10px; padding: 4px 10px; background: none; border: 1px solid #2c3b48; }
.dlg input { border-radius: 0; border: 1px solid #2c3b48; background: #070b0e; }
.dlg input:focus { outline: none; border-color: #e3a23a; }
.acct-grid { display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.preview canvas { width: 170px; height: 212px; border: 1px solid #2c3b48; display: block; }
.acct-fields { display: grid; gap: 6px; align-content: start; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button { border-radius: 0; padding: 10px; background: #070b0e; border: 1px solid #2c3b48; }
.seg button.on { border-color: #e3a23a; background: #e3a23a22; color: #f3c056; font-weight: 700; }
.swatches { display: flex; gap: 7px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid #ffffff22; }
.swatches button.on { border-color: #f3c056; box-shadow: 0 0 0 2px #f3c05666; }
#landSuggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; list-style: none; margin: 0; padding: 0; background: #070b0e; border: 1px solid #2c3b48; max-height: 220px; overflow: auto; }
#landSuggest li { padding: 8px 12px; font-size: 14px; display: flex; justify-content: space-between; border-top: 1px solid #1b2630; cursor: pointer; }
#landSuggest li:hover, #landSuggest li.on { background: #e3a23a22; }
#landSuggest li small { opacity: .6; }
.locked { padding: 10px 12px; border: 1px dashed #2c3b48; font-size: 14px; }
.err { color: #ff8a70; font-size: 14px; min-height: 18px; }
.acct-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; font-size: 13px; }
.acct-stats div { padding: 8px 10px; background: #070b0e; border: 1px solid #1b2630; }
.acct-stats b { display: block; color: #f3c056; font-size: 16px; }
@media (max-width: 560px) { .acct-grid { grid-template-columns: 1fr; } .preview canvas { margin: 0 auto; } }

/* market */
.market-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-right: 40px; }
.balance { font-size: 18px; } .balance b { color: #f3c056; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid #2c3b48; }
.tabs button { border-radius: 0; background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 14px; color: #c9d4db; }
.tabs button.on { color: #f3c056; border-bottom-color: #e3a23a; }
.mk-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding-top: 6px; }
.card { padding: 14px; background: #070b0e; border: 1px solid #1b2630; display: grid; gap: 6px; align-content: start; }
.card .ic { font-size: 30px; }
.card .nm { font-weight: 800; font-size: 16px; }
.card .ds { font-size: 13px; color: #b9c7d1; min-height: 36px; }
.card .pr { color: #f3c056; font-weight: 800; }
.card .own { font-size: 12px; color: #8cd156; }
.card button { border-radius: 0; }
.card.tag { border-color: #e3a23a88; }
.card .badge2 { justify-self: start; font-size: 11px; padding: 2px 8px; background: #e3a23a; color: #1b1405; font-weight: 800; }
.qty { display: flex; gap: 6px; } .qty input { width: 70px; padding: 8px; }

/* in-game tools row and toast actions */
.hud-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.hud-tools span { background: #0b1408bb; border-radius: 8px; padding: 3px 8px; font-size: 13px; }
#toast div button { margin-left: 10px; padding: 3px 10px; background: #1b1405; color: #f3c056; border: none; border-radius: 6px; pointer-events: auto; }
#toast { z-index: 70; }

/* character editor */
.editor { display: grid; grid-template-columns: 250px 1fr; gap: 18px; }
.editor .preview canvas { width: 240px; height: 320px; }
.edit-fields { display: grid; gap: 8px; align-content: start; }
.ed-body { display: grid; gap: 8px; align-content: start; max-height: 300px; overflow: auto; padding-right: 4px; }
.ed-body .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-body .chips button { border-radius: 0; padding: 7px 10px; font-size: 13px; background: #070b0e; border: 1px solid #2c3b48; display: inline-flex; gap: 6px; align-items: center; }
.ed-body .chips button.on { border-color: #e3a23a; background: #e3a23a22; color: #f3c056; }
.ed-body .chips i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid #ffffff33; }
.ed-body input[type=range] { width: 100%; accent-color: #e3a23a; }
.seg.four { grid-template-columns: repeat(4, 1fr); } .seg.three { grid-template-columns: repeat(3, 1fr); }
.dlg-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.dlg-actions .gold { flex: 1; }
button.danger { border-radius: 0; background: #3a1210; border: 1px solid #c62828; color: #ffb4a8; padding: 11px 14px; }
button.danger:hover { background: #5a1a16; }
.garage { display: grid; gap: 6px; }
.garage button { text-align: left; border-radius: 0; background: #070b0e; border: 1px solid #2c3b48; }
.garage button.on { border-color: #8cd156; }
@media (max-width: 720px) { .editor { grid-template-columns: 1fr; } .editor .preview canvas { margin: 0 auto; display: block; } }

/* big market */
.dlg.market { width: min(1100px, 97vw); height: min(88vh, 900px); grid-template-rows: auto 1fr; }
.mk-layout { display: grid; grid-template-columns: 170px 1fr; gap: 14px; min-height: 0; }
.mk-cats { display: grid; gap: 4px; align-content: start; }
.mk-cats button { text-align: left; border-radius: 0; background: #070b0e; border: 1px solid #1b2630; padding: 10px 12px; }
.mk-cats button.on { border-color: #e3a23a; color: #f3c056; background: #e3a23a18; }
.mk-main { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; min-height: 0; }
.mk-filters { display: grid; grid-template-columns: 1fr 150px 140px 170px; gap: 6px; }
.mk-filters input, .mk-filters select { padding: 9px 10px; border-radius: 0; border: 1px solid #2c3b48; background: #070b0e; color: #eef2f4; }
.mk-main .mk-body { overflow: auto; align-content: start; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card .ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: #1b2630; }
.mk-pages { display: flex; gap: 6px; justify-content: center; align-items: center; }
.mk-pages button { border-radius: 0; padding: 6px 12px; }
@media (max-width: 760px) { .mk-layout { grid-template-columns: 1fr; } .mk-cats { grid-auto-flow: column; overflow-x: auto; } .mk-filters { grid-template-columns: 1fr 1fr; } }

#touch .tb { position: absolute; right: 30px; width: 52px; height: 52px; border-radius: 50%; font-size: 20px; background: #0b1116cc; }
#touch #jumpBtn { bottom: 220px; } #touch #punchBtn { bottom: 280px; } #touch #carBtn { bottom: 340px; }

/* jobs / earn panel */
#jobsPanel { position: absolute; top: 120px; right: 74px; width: min(430px, calc(100vw - 100px)); max-height: calc(100vh - 160px); overflow: auto; background: #0b1014ee; border: 1px solid #e3a23a55; padding: 12px 14px; z-index: 5; }
.jp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: #f3c056; font-size: 16px; }
.jp-head button { padding: 2px 8px; }
.jp-sec { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #9fb0bb; }
.jp-job { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid #ffffff12; font-size: 14px; }
.jp-job.done { color: #8fd48f; }
.jp-job .bar { grid-column: 1 / -1; height: 5px; background: #ffffff18; }
.jp-job .bar i { display: block; height: 100%; background: #e3a23a; }
.jp-job.done .bar i { background: #5cb85c; }
.jp-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.jp-streak { display: flex; gap: 4px; margin: 4px 0; }
.jp-streak span { flex: 1; text-align: center; font-size: 11px; padding: 4px 0; background: #ffffff10; }
.jp-streak span.on { background: #e3a23a; color: #1b1405; font-weight: 700; }
#jobsBody .primary { width: 100%; margin-top: 8px; }
/* treasure found */
#findPop { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); background: #0b1014ee; border: 2px solid #f3c056; padding: 14px 22px; text-align: center; animation: findIn 3.2s ease-out forwards; pointer-events: none; z-index: 6; }
#findPop .big { font-size: 48px; line-height: 1.1; }
#findPop b { color: #f3c056; font-size: 18px; display: block; }
@keyframes findIn { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 20% { transform: translate(-50%, -50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }

/* my places / navigation */
#navPanel { position: absolute; top: 120px; right: 74px; width: min(340px, calc(100vw - 100px)); max-height: calc(100vh - 160px); overflow: auto; background: #0b1014ee; border: 1px solid #e3a23a55; padding: 12px 14px; z-index: 5; }
.nav-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #ffffff12; font-size: 14px; }
.nav-row small { display: block; color: #9fb0bb; font-size: 12px; }
.nav-row button { padding: 5px 12px; }
.nav-row.on { color: #f3c056; }
#navBar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: #0b1014e6; border: 1px solid #e3a23a; padding: 7px 8px 7px 14px; display: flex; gap: 12px; align-items: center; font-size: 15px; z-index: 4; white-space: nowrap; }
#navBar button { padding: 4px 12px; }

/* hub */
.hub-tabs { display: flex; gap: 3px; margin-bottom: 6px; flex-wrap: wrap; }
.hub-tabs button { flex: 1; padding: 6px 2px; font-size: 11.5px; white-space: nowrap; border-radius: 0; background: #070b0e; border: 1px solid #1b2630; }
.hub-tabs button.on { border-color: #e3a23a; color: #f3c056; background: #e3a23a18; }
#jobsBody .bar { height: 5px; background: #ffffff18; margin: 3px 0; }
#jobsBody .bar.big { height: 9px; }
#jobsBody .bar i { display: block; height: 100%; background: #e3a23a; }
.news { background: #e3a23a14; border: 1px solid #e3a23a44; padding: 8px 10px; font-size: 13px; margin: 6px 0; line-height: 1.45; }
.jobcard { border: 1px solid #ffffff1a; padding: 8px 10px; margin: 6px 0; display: grid; gap: 4px; }
.jobcard button { justify-self: start; }
.form { display: grid; gap: 6px; margin: 6px 0; font-size: 13px; }
.form label { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 6px; }
.form label.chk { display: flex; gap: 6px; }
.form input, .form select { padding: 6px 8px; background: #070b0e; border: 1px solid #2c3b48; color: #eef2f4; border-radius: 0; min-width: 0; }
.form input[type=checkbox] { width: auto; }
#jobsBody .jp-row button { padding: 3px 10px; margin-left: 4px; }
#jobsBody input.mini { width: 80px; padding: 3px 6px; background: #070b0e; border: 1px solid #2c3b48; color: #eef2f4; }
.card.wide { grid-column: 1 / -1; }
.card .form label { grid-template-columns: 110px 1fr; }
.lvchip { background: #e3a23a33 !important; color: #f3c056; font-weight: 700; }

#editBar { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); background: #0b1014e6; border: 1px solid #5cb85c; padding: 7px 8px 7px 14px; display: flex; gap: 12px; align-items: center; font-size: 14px; z-index: 4; white-space: nowrap; }
#editBar button { padding: 4px 12px; }
.btnrow { display: flex; gap: 6px; flex-wrap: wrap; }

/* settings */
#help { width: min(420px, 92vw); max-height: calc(100vh - 80px); overflow: auto; background: #0b1014f2; border: 1px solid #e3a23a55; border-radius: 0; padding: 12px 14px; z-index: 46; }
.set-body { font-size: 14px; }
.keys { display: grid; grid-template-columns: 1fr auto auto; gap: 5px 10px; align-items: center; margin-bottom: 10px; }
kbd { background: #1b2630; border: 1px solid #2c3b48; border-bottom-width: 3px; padding: 2px 8px; font-family: inherit; font-size: 13px; text-align: center; min-width: 34px; }
kbd.wait { border-color: #e3a23a; color: #f3c056; }
button.tiny { padding: 2px 8px; font-size: 11px; }
ul.play { margin: 4px 0; padding-left: 4px; list-style: none; display: grid; gap: 8px; }
label.opt { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #ffffff12; }
/* leaderboard */
#lbPanel { position: fixed; top: 76px; right: 74px; width: min(380px, calc(100vw - 100px)); max-height: calc(100vh - 160px); overflow: auto; background: #0b1014ee; border: 1px solid #e3a23a55; padding: 12px 14px; z-index: 5; }
.lb-tabs button { flex: 0 0 auto; padding: 5px 8px; }
.lb-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid #ffffff10; font-size: 14px; }
.lb-n { text-align: center; }
.lb-name small { display: block; color: #9fb0bb; font-size: 11px; }
.lb-v { color: #f3c056; font-weight: 700; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 12px; }
.badges div { padding: 5px 6px; background: #ffffff08; color: #9fb0bb; }
.badges div.on { background: #e3a23a22; color: #f3c056; }
.sellctl { display: inline-flex; gap: 3px; align-items: center; }

.jobcard .btnrow button, .jobcard .sellctl button { padding: 4px 10px; font-size: 13px; }
.jobcard .btnrow { margin-top: 4px; }

/* health, buffs, danger */
.hud-stats .health { display: inline-flex; align-items: center; gap: 6px; }
.hud-stats .health::before { content: '❤️'; font-size: 13px; }
#hpBar { display: inline-block; height: 8px; width: 44px; background: #5cb85c; border-radius: 0; }
#hpText { font-style: normal; font-size: 13px; }
.buffs { font-size: 12px; color: #f3c056; margin: 4px 0 0 2px; text-shadow: 0 1px 2px #000; }
#danger { position: absolute; top: 112px; left: 50%; transform: translateX(-50%); background: #7a1010ee; border: 2px solid #ff5b5b; color: #fff; padding: 8px 16px; font-weight: 700; font-size: 15px; z-index: 6; max-width: min(900px, 94vw); text-align: center; pointer-events: none; }
#danger .adv { font-size: 13px; font-weight: 600; color: #ffe08a; margin-top: 4px; }
#danger .adv.ok { color: #9dffb0; }
#danger.chase { animation: dangerPulse 0.6s infinite alternate; }
@keyframes dangerPulse { from { background: #7a1010ee; } to { background: #c21b1bee; } }
body.danger-on #gameScreen::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px 30px #ff000055; animation: dangerPulse2 0.6s infinite alternate; z-index: 3; }
@keyframes dangerPulse2 { from { opacity: 0.5; } to { opacity: 1; } }
body.hurt-flash #gameScreen::before { content: ''; position: absolute; inset: 0; background: #ff000033; pointer-events: none; z-index: 3; }
/* pen panel and travel dialog */
#penPanel { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); width: min(420px, 92vw); max-height: calc(100vh - 170px); overflow: auto; background: #0b1014f2; border: 1px solid #e3a23a66; padding: 12px 14px; z-index: 6; }
#travelDlg, #catchDlg, #carDlg { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(440px, 92vw); background: #0b1014f5; border: 1px solid #e3a23a; padding: 14px 16px; z-index: 50; }
.trv { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #ffffff12; }
.trv .ic { font-size: 24px; }
.trv small { display: block; color: #9fb0bb; }
.trv button { min-width: 90px; }

/* ---------- drone: pilot's eye view ---------- */
#droneHud { position: absolute; inset: 0; pointer-events: none; z-index: 4; color: #d8ffe0; font: 600 13px ui-monospace, Consolas, monospace; text-shadow: 0 1px 2px #000; }
#droneHud button, #droneHud .dh-btns { pointer-events: auto; }
.dh-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.07) 0 1px, transparent 1px 3px); box-shadow: inset 0 0 160px 40px rgba(0,0,0,0.55); }
.dh-c { position: absolute; width: 46px; height: 46px; border: 3px solid #d8ffe0cc; }
.dh-c.tl { top: 120px; left: 24px; border-right: 0; border-bottom: 0; } .dh-c.tr { top: 120px; right: 90px; border-left: 0; border-bottom: 0; }
.dh-c.bl { bottom: 24px; left: 24px; border-right: 0; border-top: 0; } .dh-c.br { bottom: 24px; right: 90px; border-left: 0; border-top: 0; }
.dh-top { position: absolute; top: 128px; left: 84px; display: flex; gap: 14px; }
.dh-top .rec { color: #ff4d4d; animation: recBlink 1s steps(2) infinite; }
@keyframes recBlink { 50% { opacity: 0; } }
.dh-compass { position: absolute; top: 122px; left: 50%; transform: translateX(-50%); width: 300px; text-align: center; }
#dhTape { height: 16px; border-bottom: 2px solid #d8ffe0aa; background-image: repeating-linear-gradient(90deg, #d8ffe0aa 0 2px, transparent 2px 30px); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
#dhHead { display: inline-block; margin-top: 4px; padding: 1px 8px; border: 1px solid #d8ffe0aa; background: #0006; }
.dh-cross { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.dh-cross i { position: absolute; background: #d8ffe0dd; }
.dh-cross i:nth-child(1) { left: -34px; top: -1px; width: 22px; height: 2px; } .dh-cross i:nth-child(2) { left: 12px; top: -1px; width: 22px; height: 2px; }
.dh-cross i:nth-child(3) { left: -1px; top: -34px; width: 2px; height: 22px; } .dh-cross i:nth-child(4) { left: -1px; top: 12px; width: 2px; height: 22px; }
.dh-cross b { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; }
.dh-alt { position: absolute; right: 100px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dh-altbar { width: 8px; height: 160px; border: 1px solid #d8ffe0aa; position: relative; background: #0005; }
.dh-altbar i { position: absolute; bottom: 0; left: 0; right: 0; background: #7dff9a; }
.dh-left { position: absolute; left: 40px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.dh-bottom { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.dh-fuel { display: flex; align-items: center; gap: 8px; }
.dh-fuelbar { display: inline-block; width: 160px; height: 9px; border: 1px solid #d8ffe0aa; background: #0005; }
.dh-fuelbar i { display: block; height: 100%; background: #7dff9a; }
#droneHud.low .dh-fuelbar i { background: #ff4d4d; } #droneHud.low .dh-fuel { color: #ff8080; animation: recBlink 0.8s steps(2) infinite; }
.dh-btns { display: flex; gap: 8px; }
.dh-btns button { background: #0b1014cc; color: #d8ffe0; border: 1px solid #d8ffe0aa; padding: 5px 12px; font: inherit; cursor: pointer; }
.dh-btns button:hover { background: #1d3a2a; }
body.flying #prompt { bottom: 140px; }
body.flying .hud-tools, body.flying #chat { opacity: 0.35; }
/* split screen: you with the headset on the left, the drone's camera on the right */
#selfView { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; z-index: 2; border-right: 3px solid #e3a23a; background: #111; }
#selfCanvas { width: 100%; height: 100%; display: block; }
body.split #view2d, body.split #view3d { left: 50%; width: 50%; }
body.split #droneHud { left: 50%; }
body.split #droneHud .dh-c.tr, body.split #droneHud .dh-c.br, body.split .dh-alt { right: 84px; }
body.split .dh-compass { width: 200px; }
body.split #hud, body.split #chat { visibility: hidden; }
body.split #prompt, body.split #danger, body.split #toast { left: 75%; }

.dh-alt button { pointer-events: auto; width: 40px; height: 34px; background: #0b1014cc; color: #d8ffe0; border: 1px solid #d8ffe0aa; font-size: 16px; cursor: pointer; touch-action: none; user-select: none; }
.dh-alt button:active { background: #1d3a2a; }

/* ---------- inside your house ---------- */
#interior { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
#interior .in-top, #interior #inPanel { pointer-events: auto; }
#in3d, #in2d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#in3d.hidden, #in2d.hidden { display: none; }
.in-top { position: absolute; bottom: 62px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 96vw; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; z-index: 2; }
.in-top b { background: #0b1014d9; color: #f3c056; padding: 8px 14px; font-size: 16px; }
.in-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.in-btns button { background: #0b1014d9; color: #fff; border: 1px solid #ffffff33; padding: 7px 11px; cursor: pointer; font-size: 13px; }
.in-btns button.on { background: #e3a23a; color: #1b1405; border-color: #e3a23a; }
.in-btns button.gold { background: #e3a23a; color: #1b1405; font-weight: 700; }
.in-btns button.hidden { display: none; }
#inPanel { position: absolute; top: 120px; right: 74px; width: min(360px, 92vw); max-height: calc(100vh - 240px); overflow: auto; background: #0b1014f2; border: 1px solid #e3a23a66; padding: 10px 12px; z-index: 2; color: #fff; }
#inPanel .gold { width: 100%; margin-top: 8px; }
#inPrompt { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); background: #0b1014dd; color: #fff; padding: 8px 14px; font-size: 14px; pointer-events: none; z-index: 2; max-width: 92vw; text-align: center; }
.bgsw { display: inline-block; width: 26px; height: 18px; border: 1px solid #fff6; vertical-align: middle; }
body.indoors #restOverlay { position: fixed; z-index: 45; }
body.indoors #toast { z-index: 70; }

.paints { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0; }
.paints .paint { height: 34px; border: 2px solid #ffffff33; cursor: pointer; padding: 0; }
.paints .paint.on { border-color: #e3a23a; box-shadow: 0 0 0 2px #e3a23a; }
#inTurn { display: inline-flex; gap: 6px; } #inTurn.hidden { display: none; }
#editBar button#editTurnL, #editBar button#editTurnR { padding: 2px 9px; margin: 0 2px; }
.garage-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.garage-row button { border-radius: 0; background: #070b0e; border: 1px solid #2c3b48; color: #fff; padding: 6px 8px; }
.garage-row button.on { border-color: #8cd156; }

.in-btns button.dim { opacity: 0.6; }
body.indoors #chat, body.indoors #prompt, body.indoors .hud-tools { display: none; }

/* main market search, colour/pattern picker */
.mk-all { flex: 1; min-width: 160px; max-width: 520px; padding: 9px 12px; border: 1px solid #3a4d5c; background: #070b0e; color: #eef2f4; font-size: 14px; }
.mk-catlab { margin-bottom: 4px; }
.pats { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin: 6px 0; }
.pats .pat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; }
.pats .pat.on { outline: 2px solid #f3c056; }
.pats .pat .sw { display: block; width: 48px; height: 32px; border: 1px solid #0006; background: #ccc; }
.pats .pat small { font-size: 10px; }
.pats .pat .x { position: absolute; top: -4px; right: -4px; padding: 0 4px; font-size: 10px; }
#interior button.on { outline: 2px solid #f3c056; }
.pats .pat .sw.p-ankara1 { background: radial-gradient(circle, #1f3a68 30%, #f2c230 31% 45%, #ef7d22 46%) 0 0 / 14px 14px; }
.pats .pat .sw.p-ankara2 { background: repeating-linear-gradient(60deg, #2e8b3a 0 6px, #c9a227 6px 10px, #1f5a2e 10px 14px); }
.pats .pat .sw.p-ankara3 { background: radial-gradient(circle, #1f3a68 25%, #f2c230 26% 40%, #c62828 41%) 0 0 / 16px 16px; }
.pats .pat .sw.p-asooke { background: repeating-linear-gradient(0deg, #7a2e4a 0 3px, #c9a227 3px 6px, #efe3c2 6px 8px); }
.pats .pat .sw.p-adire { background: repeating-radial-gradient(circle, #1f3a68 0 3px, #8fb0d8 3px 4px); }
.pats .pat .sw.p-kente { background: conic-gradient(#f2c230 25%, #2e8b3a 0 50%, #c62828 0 75%, #262626 0) 0 0 / 12px 12px; }
.pats .pat .sw.p-wood_light { background: repeating-linear-gradient(0deg, #d8b47a 0 3px, #c49a60 3px 4px); }
.pats .pat .sw.p-wood_dark { background: repeating-linear-gradient(0deg, #5a3a20 0 3px, #3a2410 3px 4px); }
.pats .pat .sw.p-marble { background: linear-gradient(135deg, #f2efe8 40%, #bdbdc6 45%, #f2efe8 50%); }
.pats .pat .sw.p-leather { background: #5a3420; }
.pats .pat .sw.p-denim { background: repeating-linear-gradient(45deg, #3a5a8a 0 3px, #4a6a9a 3px 4px); }
.pats .pat .sw.p-checks { background: conic-gradient(#c62828 25%, #f4f4f4 0 50%, #c62828 0 75%, #f4f4f4 0) 0 0 / 12px 12px; }
.pats .pat .sw.p-dots { background: radial-gradient(circle, #fff 25%, #2456c8 27%) 0 0 / 8px 8px; }
.pats .pat .sw.p-stripes { background: repeating-linear-gradient(90deg, #1f3a68 0 4px, #f4f4f4 4px 8px); }
.pats .pat .sw.p-camo { background: radial-gradient(circle at 30% 30%, #3f4a1e 20%, transparent 21%), radial-gradient(circle at 70% 60%, #8a7a4a 20%, #6b7a2e 21%); }
.pats .pat .sw.p-flowers { background: radial-gradient(circle, #f2c230 15%, #e86fa3 16% 40%, #fbe3ef 41%) 0 0 / 12px 12px; }
.pats .pat .sw.p-gold { background: linear-gradient(135deg, #c9a227, #f5e08a, #c9a227); }

/* the cursor tools float above the house toolbar while you hold a piece */
#inTurn:not(.hidden) { position: fixed; left: 50%; transform: translateX(-50%); bottom: 132px; display: flex; gap: 4px; padding: 6px; background: rgba(8, 13, 17, 0.88); border: 1px solid #2c3b48; z-index: 31; flex-wrap: wrap; justify-content: center; max-width: 96vw; }
#inTurn button:disabled { opacity: 0.35; }
#inHist:not(.hidden) { display: inline-flex; gap: 4px; }

#uNameMsg { min-height: 16px; margin-top: 3px; }
.ok-msg { color: #6fd27a; }
.bad-msg { color: #ff7a6e; }

/* the radar and the big map of your LGA */
#miniMap { position: absolute; top: 14px; right: 82px; width: 128px; height: 128px; border-radius: 50%; overflow: hidden; border: 3px solid #0b1116; box-shadow: 0 0 0 2px #f3c05688, 0 6px 18px #0008; cursor: pointer; z-index: 5; background: #1b2530; }
#miniMap canvas { width: 100%; height: 100%; display: block; }
#miniMap .mm-n { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font: 700 10px system-ui; color: #fff; text-shadow: 0 1px 2px #000; }
#miniMap #miniDist { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font: 600 10px system-ui; color: #fff; background: #000a; padding: 0 6px; border-radius: 8px; }
#miniMap:hover { box-shadow: 0 0 0 3px #f3c056, 0 6px 18px #0008; }
#bigMap { position: absolute; inset: 0; z-index: 40; background: #0b1116f2; display: flex; flex-direction: column; }
#bigMap.hidden { display: none; }
#bigMap .bm-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: #fff; flex-wrap: wrap; }
#bigMap .bm-btns { margin-left: auto; display: flex; gap: 6px; }
#bigMapCanvas { flex: 1; width: 100%; min-height: 0; cursor: crosshair; touch-action: none; }
#bigMap .bm-legend { color: #ccd; padding: 6px 14px 10px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
#bigMap .bm-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; border-radius: 2px; }
@media (max-width: 700px) { #miniMap { width: 92px; height: 92px; right: 70px; } }

/* 📱 phone, talking and calls */
#phonePanel { position: absolute; right: 82px; top: 220px; width: min(340px, 92vw); max-height: calc(100vh - 300px); overflow: auto; background: #0b1014f2; border: 1px solid #5aa9ff66; color: #fff; z-index: 30; padding: 10px 12px; border-radius: 14px; }
#phonePanel.hidden { display: none; }
#phonePanel .ph-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
#phonePanel .ph-x { margin-left: auto; }
#phonePanel .ph-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
#phonePanel .ph-tabs button.on { outline: 2px solid #5aa9ff; }
#phonePanel .ph-body { display: flex; flex-direction: column; gap: 6px; }
#phonePanel .ph-sub { font-weight: 600; color: #9fd0ff; }
#phonePanel .ph-log { max-height: 180px; overflow: auto; background: #0005; padding: 6px; border-radius: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
#phonePanel .ph-log .mine { color: #f3c056; text-align: right; }
#phonePanel .ph-row { display: flex; gap: 6px; }
#phonePanel .ph-row input { flex: 1; }
#phonePanel input, #phonePanel textarea { background: #070b0e; color: #fff; border: 1px solid #3a4d5c; padding: 6px 8px; border-radius: 6px; font: inherit; }
#phonePanel .ph-contact { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid #ffffff14; }
#phonePanel .ph-sms { background: #ffffff0d; padding: 6px 8px; border-radius: 8px; }
#phonePanel .ph-sms.out { background: #f3c05618; }
#callBar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 45; background: #0b1116f2; border: 1px solid #5aa9ff; color: #fff; padding: 8px 12px; border-radius: 30px; display: flex; gap: 8px; align-items: center; box-shadow: 0 6px 20px #0009; }
#callBar.hidden { display: none; }
#callBar .ok, .ph-ask .ok { background: #2e8b3a; color: #fff; }
#callBar .no, .ph-ask .no { background: #b3261e; color: #fff; }
.ph-ask { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); z-index: 45; background: #0b1116f2; border: 1px solid #f3c056; color: #fff; padding: 10px 14px; border-radius: 12px; display: flex; gap: 8px; align-items: center; }

/* on the road between LGAs */
#journeyBox { position: fixed; inset: 0; z-index: 60; background: #0b1116; display: flex; flex-direction: column; color: #fff; }
#journeyBox.hidden { display: none; }
#journeyBox .jb-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 17px; }
#journeyBox .jb-top button { margin-left: auto; }
#journeyCanvas { flex: 1; width: 100%; min-height: 0; }
#journeyBox .jb-bottom { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
#journeyBox .jb-bar { height: 10px; background: #ffffff22; border-radius: 5px; overflow: hidden; }
#journeyBox .jb-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f3c056, #ff8a3d); }
#bigMap .bm-btns button.on { outline: 2px solid #f3c056; }

/* the drone under the water, and a lost picture */
body.underwater #view3d::after, body.underwater #view2d + #view3d::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 20%, rgba(80,170,220,0.25), rgba(10,50,90,0.65)); mix-blend-mode: multiply; }
body.underwater #view3d { filter: hue-rotate(-15deg) saturate(1.3); }
#noSignal { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 90; image-rendering: pixelated; }
#noSignal.hidden { display: none; }

/* bad weather */
#wxBar { margin-top: 6px; background: #3a1c1ccc; border: 1px solid #ff8a65; color: #fff; padding: 6px 10px; font-size: 13px; max-width: 760px; pointer-events: none; }
#wxBar .wx-track { height: 5px; background: #0006; margin-top: 4px; }
#wxFill { height: 100%; width: 0; background: linear-gradient(90deg, #f3c056, #e34b4b); }

/* lens (focal length) for the eye view */
#lensBox { position: fixed; right: 82px; bottom: 18px; z-index: 32; display: flex; align-items: center; gap: 8px; background: #0b1014e6; border: 1px solid #e3a23a88; color: #fff; padding: 6px 10px; font-size: 13px; }
#lensBox input { width: 160px; }
#lensBox b { min-width: 58px; text-align: right; }
#lensBox button { padding: 2px 8px; }
#eyeBtn.on { box-shadow: 0 0 0 2px #f3c056 inset; }
/* CCTV viewer */
#cctvHud { position: fixed; inset: 0; z-index: 35; pointer-events: none; color: #e8ffe8; font: 600 14px ui-monospace, Consolas, monospace; }
#cctvHud .cc-top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: #000a; padding: 6px 10px; pointer-events: auto; }
#cctvHud .cc-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: #000a; padding: 4px 10px; font-size: 12px; }
#cctvNoPower { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; background: #000; text-align: center; }
#cctvNoPower canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0.55; }
#cctvNoPower b, #cctvNoPower small { position: relative; background: #000c; padding: 6px 14px; }
#cctvNoPower b { font-size: 34px; color: #ff4d4d; letter-spacing: 4px; }
#cctvNoPower small { max-width: 520px; color: #fff; }
body.cctv-on #view3d { filter: grayscale(0.8) contrast(1.15) brightness(1.05); }
body.cctv-on #cctvHud::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, #0000 0 2px, #0002 2px 3px); pointer-events: none; }
#cctvHud .cc-top, #cctvHud .cc-hint { z-index: 2; }

#lbPanel { z-index: 45; }

#editBar { white-space: normal; flex-wrap: wrap; justify-content: center; max-width: 96vw; }
#editBar .eb-tools { display: flex; flex-wrap: wrap; gap: 4px; }
#editBar .eb-tools button { padding: 3px 9px; font-size: 13px; }
#editBar button.on { box-shadow: 0 0 0 2px #5cb85c inset; }

.fit-dirs { display: inline-flex; gap: 2px; margin: 0 4px; padding: 2px; border: 1px solid #e3a23a66; border-radius: 6px; }
.fit-dirs button { padding: 3px 7px; min-width: 0; }

/* playing a challenge */
#chPlay { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); width: min(560px, 94vw); z-index: 60; background: #0b1014f2; border: 2px solid #8e44ad; color: #fff; padding: 14px 16px; box-shadow: 0 10px 40px #000a; }
#chPlay .ch-top { display: flex; align-items: center; gap: 10px; } #chPlay .ch-top b { flex: 1; } #chPlay .ch-top button { padding: 2px 8px; }
#chPlay .ch-track { height: 6px; background: #ffffff22; margin: 8px 0; } #chTime { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f3c056, #8e44ad); transition: width 0.2s linear; }
#chQ { font-size: 18px; font-weight: 700; margin: 6px 0 10px; }
#chBody { display: grid; gap: 8px; } .ch-opt { text-align: left; padding: 10px 12px; font-size: 15px; } .ch-opt.picked { outline: 2px solid #f3c056; }
.ch-phrase { font: 600 20px ui-monospace, Consolas, monospace; background: #ffffff10; padding: 10px; user-select: none; }
#chBody input { font-size: 18px; padding: 8px; } #chMsg { margin-top: 10px; font-weight: 700; } .ch-res { font-size: 16px; }

.sec-bar{height:8px;border-radius:4px;background:#0003;margin:4px 0 6px;overflow:hidden}.sec-bar>div{height:100%}

#farmBar{position:absolute;right:74px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:8px;align-items:stretch;width:min(320px,calc(100vw - 100px));max-height:80vh;overflow:auto;background:rgba(20,28,20,.82);border:1px solid #3f5a32;border-radius:12px;padding:6px 10px;z-index:6;font-size:13px;color:#e8f0e0}
#farmBar button{padding:5px 10px;border-radius:8px;border:1px solid #4d6a3d;background:#2e4a25;color:#fff;cursor:pointer;font-size:13px}
#farmBar button:hover{background:#3d6131}#farmBar button:disabled{opacity:.45;cursor:default}
#farmBar select{background:#1e2a1a;color:#fff;border:1px solid #4d6a3d;border-radius:6px;padding:3px;font-size:12px;max-width:150px}
#farmInfo{margin-right:4px;white-space:nowrap}

#lbTabs,#lbBtns{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
#farmBar .lb-tab{background:transparent;border-color:#3f5a32;color:#cfe0c4;padding:3px 9px;font-size:12px}
#farmBar .lb-tab.on{background:#c9a227;border-color:#c9a227;color:#1b1b1b;font-weight:600}

#bizPanel{position:absolute;right:80px;top:120px;width:min(560px,92vw);max-height:72vh;overflow:auto;background:#1b2330f2;border:1px solid #3a4a5e;border-radius:14px;padding:12px 14px;z-index:30;color:#eef;font-size:13px;box-shadow:0 10px 30px #0008}
#bizPanel .biz-head{display:flex;justify-content:space-between;align-items:center;font-size:16px;margin-bottom:6px}
#bizPanel .biz-x{background:transparent;border:0;color:#ccd;font-size:18px;cursor:pointer}
#bizPanel .biz-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:5px 0}
#bizPanel .biz-row span{flex:1 1 200px}
#bizPanel .biz-sec{margin-top:10px;font-weight:700;color:#c9a227}
#bizPanel input{background:#0f1520;color:#fff;border:1px solid #3a4a5e;border-radius:6px;padding:4px}
#bizPanel input.mini{width:70px}
#bizPanel button{padding:5px 10px;border-radius:8px;border:1px solid #3a4a5e;background:#26334a;color:#fff;cursor:pointer}
#bizPanel button.primary{background:#c9a227;color:#1b1b1b;border-color:#c9a227;font-weight:600}
#bizPanel button:disabled{opacity:.45}
.biz-game{position:relative;min-height:150px;margin:10px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-size:30px}
.biz-status{text-align:center;color:#c9a227;font-weight:600}
.biz-big{font-size:26px!important;padding:8px 14px!important}
.biz-track{position:relative;width:90%;height:26px;background:#0f1520;border-radius:13px;overflow:hidden;border:1px solid #3a4a5e}
.biz-zone{position:absolute;top:0;bottom:0;background:#2e7d32}
.biz-needle{position:absolute;top:-2px;bottom:-2px;width:4px;background:#ffd23a;margin-left:-2px}
.biz-arrow{font-size:54px}
.biz-head-area{height:220px;background:radial-gradient(circle at 50% 60%,#5a3a26 0 38%,transparent 39%);}
.biz-tuft{position:absolute;font-size:22px!important;background:#222!important;border-radius:50%!important;padding:4px 8px!important}
#townBar{position:absolute;left:50%;transform:translateX(-50%);bottom:222px;display:flex;gap:6px;align-items:center;background:rgba(40,20,50,.85);border:1px solid #c9a227;border-radius:12px;padding:6px 12px;z-index:6;font-size:13px;color:#fff}
#townBar button{padding:4px 10px;border-radius:8px;border:1px solid #c9a227;background:#5a3a10;color:#fff;cursor:pointer}

#fillDlg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(440px,92vw);background:#0b1014f2;border:1px solid #e3a23a88;border-radius:12px;padding:14px;z-index:30;display:grid;gap:6px;color:#fff}
#fillDlg select,#fillDlg input{background:#1a2228;color:#fff;border:1px solid #ffffff33;border-radius:6px;padding:6px}
#fillDlg .fill-head{display:flex;justify-content:space-between;align-items:center}

#storePop { position: absolute; top: 112px; left: 50%; transform: translateX(-50%); background: #0b1014f0; border: 1px solid #5cb85c; padding: 10px; z-index: 6; display: flex; flex-direction: column; gap: 6px; min-width: 240px; max-height: 50vh; overflow: auto; }
#storePop button { text-align: left; }

#farmBar .fb-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
#farmBar .fb-head button{padding:2px 8px}
#lbarTabs,#lbarBtns{display:flex;gap:6px;flex-wrap:wrap}
#lbarBtns button,#lbarBtns select{flex:1 1 auto}
#farmInfo{color:#cfe0c4;line-height:1.35}
#landBtn{position:relative;font-size:20px!important}
#landBtn.on{background:#3d6131;border-color:#8cd156}
#landBtn i{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#e0533a;color:#fff;font-size:11px;font-style:normal;line-height:18px;font-weight:700;box-shadow:0 0 0 2px #0b1116}
#landBtn i.hidden{display:none}

/* the leaderboard and settings sit under the little map */
#mapTools { position: absolute; top: 152px; right: 82px; width: 128px; display: flex; justify-content: center; gap: 8px; z-index: 5; }
#miniMap.hidden + #mapTools { display: none; }
#mapTools button { width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 18px; background: #0b1116e6; border: 1px solid #e3a23a88; color: #f3c056; cursor: pointer; box-shadow: 0 3px 10px #0007; }
#mapTools button:hover { background: #1d2a33; border-color: #f3c056; }
@media (max-width: 700px) { #mapTools { top: 108px; right: 70px; width: 92px; } #mapTools button { width: 34px; height: 34px; font-size: 15px; } }

#lbPanel .lb-sub { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 8px; padding-bottom: 8px; border-bottom: 1px solid #ffffff14; }
#lbPanel .lb-sub button { font-size: 12px; padding: 3px 9px; border-radius: 12px; background: transparent; border: 1px solid #e3a23a44; color: #e8e2d0; }
#lbPanel .lb-sub button.on { background: #e3a23a; color: #1b1b1b; border-color: #e3a23a; }

#editBar { top: 62px; gap: 8px; padding: 6px 8px; flex-wrap: nowrap; max-width: calc(100vw - 260px); overflow-x: auto; }
#editBar .eb-tools { flex-wrap: nowrap; }
#editBar .eb-t { white-space: nowrap; color: #8cd156; }
#editBar #editDone { background: #5cb85c; color: #0b1014; font-weight: 700; }
#storePop { top: 112px; }
#editBar button { white-space: nowrap; }
#farmBar{white-space:normal;overflow-x:hidden}#farmBar #farmInfo{overflow-wrap:anywhere}#lbarBtns select{max-width:100%;min-width:0}

/* ---- a clear screen ---- */
#hud .hud-top, #hud .hud-stats { justify-self: start; width: max-content; padding: 5px 10px; gap: 10px; }
#hud .hud-top { font-size: 14px; }
.hud-tools { max-width: min(760px, calc(100vw - 220px)); }
.hud-tools .hud-fold { pointer-events: auto; cursor: pointer; background: #0b1408cc; color: #f3e2b8; border: 1px solid #ffffff22; border-radius: 8px; padding: 3px 8px; font-size: 13px; }
.hud-tools .hud-fold:hover { border-color: #f3c056; }
#buffs { max-width: min(520px, calc(100vw - 240px)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#miniMap { width: 96px; height: 96px; top: 10px; }
#mapTools { top: 112px; width: 96px; gap: 6px; }
#mapTools button { width: 30px; height: 30px; font-size: 14px; }
@media (max-width: 700px) { #miniMap { width: 76px; height: 76px; } #mapTools { top: 90px; width: 76px; } #mapTools button { width: 26px; height: 26px; font-size: 12px; } }
#chat { width: auto; max-width: min(380px, calc(100vw - 20px)); }
#chatLog li { transition: opacity .8s; }
#chatLog li.old { opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden; }
#chat.open #chatLog { max-height: 220px; overflow-y: auto; }
#chat.open #chatLog li.old { opacity: 1; height: auto; padding: 3px 8px; margin-top: 2px; }
#chatForm { display: flex; gap: 6px; align-items: center; }
#chatMore { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #0b1408cc; border: 1px solid #ffffff22; cursor: pointer; font-size: 15px; flex: none; }
#chat.open #chatMore { border-color: #f3c056; }
#chatInput { width: 150px; transition: width .2s; }
#chatInput:focus { width: min(300px, calc(100vw - 70px)); }
/* inside the house: only the main buttons; ☰ More shows the rest */
#interior .in-btns:not(.more) > button[data-x] { display: none; }
#interior .in-top > b { display: none; }
#interior #inMore.on { background: #e3a23a; color: #1b1405; }
#interior .in-btns.arranging > #inStyle { display: inline-block; }

/* how the LGA is run */
.gov-road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0; }
.gov-step { background: #ffffff0d; border: 1px solid #ffffff1a; padding: 6px 8px; display: grid; gap: 2px; }
.gov-step b { font-size: 13px; } .gov-step small { color: #cbbf9e; font-size: 11px; }
.gov-step.done { border-color: #5cb85c; background: #5cb85c22; } .gov-step.done b::after { content: ' ✓'; color: #8ee88e; }
.gov-step.next { border-color: #f3c056; }
.gov-bar { height: 8px; background: #ffffff14; margin: 4px 0; } .gov-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c46a1e, #f3c056); }
.gov-two { display: flex; gap: 8px; } .gov-two button { flex: 1; }
.gov-council { display: grid; gap: 6px; min-width: 0; } .gov-council select { width: 100%; max-width: 100%; min-width: 0; }

.real-tip { margin: 6px 0 4px; padding: 8px 10px; background: #f3c0561a; border-left: 3px solid #f3c056; font-size: 12.5px; color: #f3e2b8; line-height: 1.4; }
/* the title on the start screen */
.logo-txt { display: grid; justify-items: center; line-height: .9; text-align: center; filter: drop-shadow(0 8px 24px #000); }
.logo-txt .l1 { font: 400 clamp(22px, 4vw, 40px) Anton, Impact, sans-serif; letter-spacing: .5em; padding-left: .5em; color: #f6f1e4; }
.logo-txt .l2 { font: 400 clamp(56px, 11vw, 130px) Anton, Impact, sans-serif; letter-spacing: .02em; background: linear-gradient(180deg, #ffe9a8 0%, #f3c056 45%, #c4791e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px #6b3a0c55; }
.logo-txt .l3 { margin-top: 14px; font: 600 clamp(11px, 1.4vw, 15px) Inter, system-ui, sans-serif; letter-spacing: .35em; text-transform: uppercase; color: #cdbb8f; }

.share-dlg { position: fixed; inset: 0; z-index: 80; background: #000b; display: grid; place-items: center; }
.share-card { display: grid; gap: 10px; justify-items: center; max-height: 94vh; }
.share-card img { max-height: 80vh; max-width: 92vw; box-shadow: 0 10px 40px #000; }
.share-btns { display: flex; gap: 8px; }
.share-btns .btnlike, .share-btns button { padding: 9px 16px; background: #1d2a33; color: #fff; border: 1px solid #ffffff33; text-decoration: none; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
.share-btns .gold { background: #e3a23a; color: #1b1405; border-color: #e3a23a; }
#lbBody > button.gold { margin-top: 10px; width: 100%; }

/* the story film */
#story { position: fixed; inset: 0; z-index: 90; background: radial-gradient(ellipse at center, rgba(5,8,11,0.55) 0%, rgba(3,5,7,0.92) 75%); display: grid; place-items: center; cursor: default; transition: opacity .6s; }
#story.out { opacity: 0; }
#story canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#story .st-text { position: relative; max-width: min(900px, 88vw); text-align: center; display: grid; gap: 18px; opacity: 0; transform: translateY(14px) scale(.98); }
#story .st-text.in { animation: stIn 1s ease forwards; }
@keyframes stIn { to { opacity: 1; transform: none; } }
#story .st-big { font: 400 clamp(34px, 6vw, 72px) Anton, Impact, sans-serif; letter-spacing: .02em; color: #fff4d6; text-shadow: 0 4px 30px #000; }
#story .st-small { font: 500 clamp(15px, 2vw, 22px) Inter, system-ui, sans-serif; color: #d8cba6; line-height: 1.5; text-shadow: 0 2px 12px #000; }
#story .st-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ffffff14; }
#story .st-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c46a1e, #f3c056); }
#story .st-ctl { position: absolute; right: 22px; bottom: 22px; display: flex; gap: 8px; }
#story .st-ctl button { background: #0b1014cc; color: #f3e2b8; border: 1px solid #ffffff33; padding: 8px 16px; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
#story .st-ctl button:hover { border-color: #f3c056; }
#story .st-pause { min-width: 104px; }
#story.paused .st-pause { background: #e3a23a; color: #1b1405; border-color: #e3a23a; }
#story.paused .st-text { animation-play-state: paused; }
#story .st-note { position: absolute; left: 22px; bottom: 28px; font: 600 12px Inter, system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #cdbb8f99; }
.story-btn { margin: 4px 0 8px; width: 100%; background: transparent; border: 1px dashed #f3c05677; color: #f3c056; padding: 7px; cursor: pointer; font: 600 13px Inter, system-ui, sans-serif; }
.story-btn:hover { background: #f3c0561a; }

.attract .fiction { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: min(720px, 90vw); text-align: center; font: 500 12.5px Inter, system-ui, sans-serif; color: #b9ab86; line-height: 1.5; }

#wxCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.pen-sell { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---- Build: a see-through window in the middle ---- */
#buildMenu { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(5, 9, 12, 0.25); }
#buildMenu.hidden { display: none; }
#buildMenu .bd-card { width: min(1100px, 94vw); min-width: 0; grid-template-columns: minmax(0, 1fr); max-height: 86vh; display: grid; gap: 10px; padding: 14px 16px 12px; background: rgba(12, 20, 16, 0.62); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); border: 1px solid #ffffff26; border-radius: 16px; box-shadow: 0 20px 60px #0008; color: #f2efe4; }
#buildMenu .bd-head { display: flex; align-items: center; gap: 12px; }
#buildMenu .bd-head b { font: 400 24px Anton, Impact, sans-serif; letter-spacing: 1px; color: #f3c056; }
#buildMenu .bd-have { font-size: 13px; color: #e8e2d0; white-space: nowrap; }
#buildMenu .bd-q { flex: 1; min-width: 120px; background: #ffffff14; border: 1px solid #ffffff2a; color: #fff; padding: 8px 12px; border-radius: 10px; }
#buildMenu .bd-x { background: #ffffff14; border: 1px solid #ffffff2a; color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
#buildMenu .bd-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
#buildMenu .bd-tabs button { background: #ffffff12; border: 1px solid #ffffff22; color: #f2efe4; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; }
#buildMenu .bd-tabs button.on { background: #e3a23a; color: #1b1405; border-color: #e3a23a; font-weight: 700; }
#buildMenu .bd-slide { position: relative; display: flex; align-items: stretch; gap: 6px; }
#buildMenu .bd-row { flex: 1; min-width: 0; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: thin; cursor: grab; user-select: none; }
#buildMenu .bd-row:active { cursor: grabbing; }
#buildMenu .bd-arrow { flex: none; width: 36px; background: #ffffff14; border: 1px solid #ffffff22; color: #fff; font-size: 26px; border-radius: 10px; cursor: pointer; }
#buildMenu .bd-arrow:hover { background: #ffffff26; }
#buildMenu .bd-item { flex: 0 0 178px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 12px 10px 10px; background: rgba(255, 255, 255, 0.08); border: 1px solid #ffffff22; border-radius: 14px; color: #f2efe4; cursor: pointer; transition: transform .12s, background .12s, border-color .12s; }
#buildMenu .bd-item:hover:not(.off) { transform: translateY(-3px); background: rgba(243, 192, 86, 0.16); border-color: #f3c056; }
#buildMenu .bd-item .bd-ic { font-size: 40px; line-height: 1.1; }
#buildMenu .bd-item b { font-size: 14px; line-height: 1.2; min-height: 34px; display: grid; place-items: center; }
#buildMenu .bd-item small { color: #c9d7b4; font-size: 11.5px; }
#buildMenu .bd-cost { font-weight: 700; color: #f3c056; font-size: 13px; }
#buildMenu .bd-why { margin-top: auto; width: 100%; padding: 6px; border-radius: 8px; background: #e3a23a; color: #1b1405; font-weight: 700; font-size: 12.5px; }
#buildMenu .bd-item.own .bd-why { background: #5cb85c; }
#buildMenu .bd-item.off { cursor: not-allowed; opacity: 0.45; filter: grayscale(0.7); }
#buildMenu .bd-item.off .bd-why { background: #ffffff1f; color: #f2d0c8; font-weight: 600; }
#buildMenu .bd-empty { padding: 30px; color: #c9d7b4; }
#buildMenu .bd-foot { font-size: 12px; color: #c9d7b4; }
@media (max-width: 640px) { #buildMenu .bd-item { flex-basis: 140px; } #buildMenu .bd-head { flex-wrap: wrap; } }

/* cold and wet: blue, misty edges (snow: frosty white) */
#coldFx { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(70,110,160,0.35) 78%, rgba(150,190,230,0.55) 100%); }
#coldFx.snow { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(200,225,250,0.35) 75%, rgba(245,250,255,0.75) 100%); }
.vol { display: inline-flex; align-items: center; gap: 8px; } .vol-n { min-width: 38px; text-align: right; font-size: 12px; }

#hud .hud-top .hud-gear { pointer-events: auto; cursor: pointer; background: transparent; border: 0; font-size: 15px; padding: 0 2px; line-height: 1; filter: drop-shadow(0 1px 2px #000); }
#hud .hud-top .hud-gear:hover { transform: rotate(30deg); }
#hornBtn { position: absolute; right: 90px; bottom: 120px; width: 64px; height: 64px; border-radius: 50%; font-size: 28px; background: #0b1116d9; border: 2px solid #f3c056; color: #fff; cursor: pointer; box-shadow: 0 4px 16px #0008; z-index: 5; }
#carSleepBtn { position: absolute; right: 90px; bottom: 196px; width: 52px; height: 52px; border-radius: 50%; font-size: 24px; background: #0b1116d9; border: 2px solid #8fb3ff; color: #fff; z-index: 20; }
#carSleepBtn:active { transform: scale(0.92); }
#hornBtn:active { transform: scale(0.92); background: #f3c056; }
#farmBar #farmInfo{white-space:pre-line}.lb-buy{display:flex;gap:6px;width:100%}.lb-buy select{flex:1;min-width:0}

/* 🔐 log in + keep your account safe */
.login-link{margin:-4px 0 10px;font-size:13px;opacity:.9}.login-link button{padding:4px 10px;margin-left:6px}
#loginDlg input{width:100%;box-sizing:border-box;margin-bottom:6px}
.login-code{margin-top:12px;font-size:13px}.login-code summary{cursor:pointer;opacity:.85}.login-code input{margin-top:8px}#loginCode{text-transform:uppercase;letter-spacing:1px}
.acct-safe{margin:12px 0 4px;padding:12px;border:1px solid #f3c05655;border-radius:10px;background:#f3c05612}
.acct-safe h3{margin:0 0 6px;font-size:15px}.acct-safe .row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:8px}
.acct-safe input{flex:1;min-width:140px}.acct-safe .code{font:600 18px/1.4 ui-monospace,monospace;letter-spacing:2px;background:#0006;padding:8px 12px;border-radius:8px;user-select:all}
.acct-safe .ok{color:#7fd38a}.acct-safe .warn{color:#f3c056}

/* ================= 📱 phones: every control has its own place, nothing on top of anything else ================= */
#railMore { display: none; }
#railMore.on { background: #f3c056; color: #1b1405; }
#railMoreBox { position: absolute; top: 122px; right: 62px; display: grid; grid-template-columns: repeat(3, 46px); gap: 6px; padding: 8px; background: #0b1116f2; border: 1px solid #e3a23a66; border-radius: 12px; z-index: 40; box-shadow: 0 8px 24px #000a; }
#railMoreBox.hidden { display: none; }
#railMoreBox button { width: 46px; height: 46px; padding: 0; border-radius: 10px; font-size: 18px; background: #16212a; border: 1px solid #e3a23a55; color: #f3c056; }
#railMoreBox button.hidden { display: none; }
body.phone #railMore { display: block; }

/* phone, upright */
body.phone-port .hudbar { left: 8px; right: 8px; top: 8px; height: auto; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 8px; font-size: 11px; }
body.phone-port .hudbar .sep { display: none; }
body.phone-port .hudbar .brand { order: 1; font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
body.phone-port .hudbar .coinchip { order: 2; margin-left: auto; padding: 4px 8px; font-size: 13px; }
body.phone-port .hudbar .profilechip { order: 3; padding: 1px 6px 1px 1px; }
body.phone-port .hudbar .profilechip canvas { width: 24px; height: 30px; }
body.phone-port .hudbar #chipName { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
body.phone-port .hudbar .right { order: 4; flex-basis: 100%; height: 0; margin: 0; }
body.phone-port .hudbar .lit { order: 5; white-space: nowrap; }
body.phone-port .hudbar .ppl { order: 6; white-space: nowrap; }
body.phone-port .hudbar .fic { order: 9; flex-basis: 100%; font-size: 10px; opacity: .6; white-space: nowrap; margin-top: -2px; }
body.phone-port .hudbar b { font-size: 12px; }
body.phone-port .hudbar .topbtn { order: 8; padding: 4px 9px; font-size: 15px; }
body.phone-port .hudbar #leadersBtn { margin-left: auto; }
body.phone-port .hudbar .topbtn .t { display: none; }
body.phone-port #mapRail { top: 112px; right: 8px; left: auto; transform: none; display: flex; gap: 5px; }
body.phone-port #mapRail button { width: 36px; height: 36px; font-size: 15px; }
body.phone-port .finder { max-height: 50vh; }
body.phone-port #hud { max-width: calc(100vw - 100px); --eb: 56px; --hb: 34px; }
body.phone-port #hud .hud-top, body.phone-port #hud .hud-stats { width: auto; max-width: 100%; flex-wrap: wrap; row-gap: 3px; gap: 8px; box-sizing: border-box; }
body.phone-port #hud .hud-top { font-size: 12px; }
body.phone-port #hud .hud-stats { font-size: 13px; }
body.phone-port #miniMap { top: 10px; right: 10px; width: 72px; height: 72px; }
body.phone-port #mapTools { top: 86px; right: 10px; width: 72px; gap: 6px; }
body.phone-port #mapTools button { width: 28px; height: 28px; font-size: 13px; }
body.phone-port #buttons.game-rail { top: 122px; right: 10px; transform: none; gap: 6px; }
body.phone-port #buttons.game-rail button { width: 44px; height: 44px; font-size: 13px; }
body.phone-port #touch #stick { left: 16px; bottom: 120px; width: 112px; height: 112px; }
body.phone-port #touch #stick i { left: 31px; top: 31px; }
body.phone-port #touch #actBtn { right: 16px; bottom: 124px; width: 70px; height: 70px; }
body.phone-port #touch .tb { right: 25px; width: 50px; height: 50px; font-size: 19px; }
body.phone-port #touch #jumpBtn { bottom: 202px; }
body.phone-port #touch #punchBtn { bottom: 258px; }
body.phone-port #touch #carBtn { bottom: 314px; }
body.phone-port #hornBtn { right: 96px; bottom: 124px; width: 54px; height: 54px; font-size: 24px; }
body.phone-port #carSleepBtn { right: 96px; bottom: 186px; width: 46px; height: 46px; font-size: 20px; }
body.phone-port #chat { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; }
body.phone-port #chatLog { max-height: 26px; font-size: 12px; }
body.phone-port #chatLog li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.phone-port #chat:not(.open) #chatLog li:not(:last-child), body.phone-port #chat:not(.open) #chatLog li.old { display: none; }
body.phone-port #chat.open #chatLog { max-height: 38vh; background: #0b1116e6; border-radius: 8px; padding: 4px; }
body.phone-port #chat.open #chatLog li { white-space: normal; }
body.phone-port #prompt { bottom: 250px; max-width: calc(100vw - 170px); font-size: 13px; padding: 6px 10px; text-align: center; }
body.phone-port #toast { top: 160px; left: calc(50% - 30px); width: max-content; max-width: calc(100vw - 140px); }
body.phone-port #toast div { font-size: 13px; padding: 6px 10px; }

/* phones held sideways: map top-right, side bar under it, controls in the bottom corners, chat in the middle */
/* phone, sideways */
body.phone-land #hud { --eb: 64px; --hb: 36px; }
body.phone-land #hud .hud-top { font-size: 12px; }
body.phone-land #hud .hud-stats { font-size: 13px; }
body.phone-land #miniMap { top: 8px; right: 8px; width: 64px; height: 64px; }
body.phone-land #mapTools { top: 76px; right: 8px; width: 64px; gap: 6px; }
body.phone-land #mapTools button { width: 26px; height: 26px; font-size: 12px; }
body.phone-land #buttons.game-rail { top: 110px; right: 8px; transform: none; gap: 5px; }
body.phone-land #buttons.game-rail button { width: 38px; height: 38px; font-size: 12px; }
body.phone-land #railMoreBox { top: 110px; right: 54px; }
body.phone-land #touch #stick { left: 16px; bottom: 16px; width: 100px; height: 100px; }
body.phone-land #touch #stick i { left: 25px; top: 25px; }
body.phone-land #touch #actBtn { right: 60px; bottom: 14px; width: 64px; height: 64px; }
body.phone-land #touch .tb { right: 67px; width: 46px; height: 46px; font-size: 18px; }
body.phone-land #touch #jumpBtn { bottom: 86px; }
body.phone-land #touch #punchBtn { bottom: 138px; }
body.phone-land #touch #carBtn { bottom: 190px; }
body.phone-land #hornBtn { right: 134px; bottom: 14px; width: 52px; height: 52px; font-size: 22px; }
body.phone-land #carSleepBtn { right: 134px; bottom: 74px; width: 44px; height: 44px; font-size: 19px; }
body.phone-land #chat { left: 130px; right: auto; bottom: 8px; width: min(320px, calc(100vw - 330px)); max-width: none; }
body.phone-land #chatLog { max-height: 24px; font-size: 12px; }
body.phone-land #chatLog li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.phone-land #chat:not(.open) #chatLog li:not(:last-child), body.phone-land #chat:not(.open) #chatLog li.old { display: none; }
body.phone-land #chat.open #chatLog { max-height: 50vh; background: #0b1116e6; border-radius: 8px; padding: 4px; }
body.phone-land #chat.open #chatLog li { white-space: normal; }
body.phone-land #prompt { bottom: 104px; max-width: min(320px, calc(100vw - 330px)); font-size: 13px; padding: 5px 10px; text-align: center; }
body.phone-land #toast { top: 78px; max-width: min(420px, calc(100vw - 300px)); }
body.phone-land #toast div { font-size: 13px; padding: 6px 10px; }
body.phone-land .hudbar { top: 6px; height: 40px; gap: 10px; font-size: 11px; }
body.phone-land .hudbar .topbtn .t { display: none; }
body.phone-land .finder { max-height: calc(100vh - 70px); }

.login-row{display:flex;gap:6px}.login-row input{flex:1;margin:0!important}
#forgotStep2 input{margin-top:6px}
.acct-safe .mail-ok{color:#7fd38a;font-weight:600}
/* phone, upright */
body.phone-port:has(.modal:not(.hidden)) #toast { top: auto; bottom: 8px; left: 50%; max-width: calc(100vw - 24px); }
body.phone-port:has(.modal:not(.hidden)) #toast div { font-size: 12px; padding: 5px 10px; box-shadow: 0 4px 14px #000a; }


/* 🏷️ Laikro Games: on the title, in the map corner, while entering, in the story */
.attract .by-laikro, #story .by-laikro, .by-laikro { width: clamp(110px, 14vw, 170px); height: auto; opacity: .92; margin-top: 4px; filter: drop-shadow(0 2px 8px #000); pointer-events: none; }
.laikro-mark { position: absolute; left: 16px; bottom: 14px; width: 92px; opacity: .55; pointer-events: none; z-index: 2; }
.finder:not(.hidden) ~ .laikro-mark { display: none; }
.fade.on::before { content: ''; position: absolute; left: 50%; top: calc(50% + 34px); width: 120px; height: 45px; transform: translateX(-50%); background: url(laikro-sm.png) center / contain no-repeat; opacity: .8; }
#story .st-studio { width: min(420px, 62vw); height: auto; filter: drop-shadow(0 6px 24px #000); }
#story .by-laikro { display: block; margin: 14px auto 0; }

/* 📱 "turn your phone" card (only in the game, only when the phone is upright) */
.rotate-card { position: absolute; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; background: #0b1116f2; color: #eef2f4; }
.rotate-card.hidden { display: none; }
.rotate-card .rc-phone { font-size: 64px; animation: rc-turn 2.2s ease-in-out infinite; }
.rotate-card b { font: 400 26px Anton, Impact, sans-serif; letter-spacing: 2px; color: #f3c056; text-transform: uppercase; }
.rotate-card p { max-width: 300px; margin: 0; color: #b9c4cc; font-size: 14px; }
.rotate-card .rc-btns { display: grid; gap: 8px; margin-top: 8px; }
@keyframes rc-turn { 0%, 30% { transform: rotate(0deg); } 60%, 100% { transform: rotate(-90deg); } }

/* 🏃 joystick pushed to the edge = running */
#touch #stick::after { content: '🏃'; position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 15px; opacity: 0; transition: opacity .2s; }
#touch #stick.run { border-color: #f3c056; box-shadow: 0 0 0 3px #f3c05655, 0 0 18px #f3c05688; }
#touch #stick.run::after { opacity: 1; }
#touch #stick.run i { background: #f3c056cc; }

/* phone, sideways: the map screen */
body.phone-land .hudbar { left: 6px; right: 6px; top: 6px; height: 38px; gap: 10px; padding: 0 10px; font-size: 11px; }
body.phone-land .hudbar .sep, body.phone-land .hudbar .hide-sm, body.phone-land .hudbar .topbtn .t { display: none; }
body.phone-land .hudbar .brand { font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
body.phone-land .hudbar .fic { font-size: 10px; opacity: .65; white-space: nowrap; }
body.phone-land .hudbar .lit, body.phone-land .hudbar .ppl { white-space: nowrap; }
body.phone-land .hudbar b { font-size: 12px; }
body.phone-land .hudbar .coinchip { padding: 3px 8px; font-size: 13px; }
body.phone-land .hudbar .topbtn { padding: 3px 8px; font-size: 14px; }
body.phone-land .hudbar .profilechip { padding: 1px 6px 1px 1px; }
body.phone-land .hudbar .profilechip canvas { width: 22px; height: 28px; }
body.phone-land .hudbar #chipName { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
body.phone-land #mapRail { top: 50px; right: 6px; transform: none; gap: 4px; }
body.phone-land #mapRail button { width: 34px; height: 34px; font-size: 14px; }
body.phone-land .legend { display: none; }
body.phone-land .finder { top: 50px; left: 6px; bottom: 6px; width: min(320px, 45vw); max-height: none; overflow: auto; padding: 10px; gap: 7px; }
body.phone-land .finder.closed { transform: translateX(calc(-100% + 10px)); }
body.phone-land .laikro-mark { width: 70px; left: 10px; bottom: 8px; }
/* the title screen sideways: everything fits between the bar and the notice */
body.phone-land .attract { gap: 6px; padding-top: 30px; }
body.phone-land .logo-txt .l1 { font-size: 18px; }
body.phone-land .logo-txt .l2 { font-size: min(17vh, 13vw); }
body.phone-land .logo-txt .l3 { margin-top: 6px; font-size: 10px; }
body.phone-land .attract .tap { font-size: 16px; }
body.phone-land .attract .by-laikro { width: 96px; margin-top: 0; }
body.phone-land .attract .fiction { bottom: 6px; font-size: 10px; width: 80vw; }
/* phone, upright: the title screen */
body.phone-port .logo-txt .l2 { font-size: 17vw; }
body.phone-port .attract .fiction { font-size: 11px; bottom: 14px; }
.attract:not(.hidden):not(.gone) ~ .laikro-mark { display: none; } /* (the title already shows the logo) */

.pay-mail{display:flex;gap:8px;align-items:center;padding:8px 10px;border:1px solid #e3a23a55;border-radius:10px;background:#f3c05610}.pay-mail input{flex:1;min-width:0}
.attract .fiction .legal{display:block;margin-top:4px;opacity:.8}.attract .fiction .legal a{color:#f3c056;pointer-events:auto}
