:root {
  --bg: #14110f;
  --panel: rgba(20, 17, 15, 0.86);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3ede4;
  --muted: #b8ad9f;
  --accent: #f2b234;
  --accent2: #d9572b;
  --green: #5fbf5a;
  --danger: #e2483d;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; }
#app { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
.hidden { display: none !important; }

/* Telas */
.screen { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 20; }
.screen.active { display: flex; }
.screen.dim { background: rgba(10, 8, 6, 0.55); backdrop-filter: blur(3px); }
#loading { background: radial-gradient(ellipse at 50% 35%, #3a2417 0%, #14110f 70%); gap: 28px; z-index: 40; }
#menu { justify-content: center; align-items: flex-start; padding-left: 6vw; background: linear-gradient(90deg, rgba(12,9,7,.82) 0%, rgba(12,9,7,.35) 45%, rgba(0,0,0,0) 70%); }

.brand { text-align: center; }
.brand-mark { font-size: 96px; font-weight: 900; letter-spacing: 6px; line-height: .9;
  background: linear-gradient(180deg, #ffd56a 0%, #f2b234 45%, #d9572b 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 6px 30px rgba(217, 87, 43, .35); }
.brand-sub { font-size: 20px; letter-spacing: 12px; color: var(--text); margin-top: 6px; font-weight: 600; }
.brand-city { font-size: 13px; letter-spacing: 3px; color: var(--muted); margin-top: 10px; text-transform: uppercase; }
.brand.small { text-align: left; margin-bottom: 26px; }
.brand.small .brand-mark { font-size: 72px; }

.load-box { width: min(440px, 80vw); }
.load-bar { height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
#load-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .2s; }
#load-text { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }
.tip { max-width: 520px; text-align: center; color: var(--muted); font-size: 14px; min-height: 40px; padding: 0 20px; }
.error { color: #ffb4ad; background: rgba(120, 20, 10, .5); padding: 12px 18px; border-radius: 8px; max-width: 560px; text-align: center; }

.menu-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px 32px; min-width: 320px; max-width: 92vw; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.menu-panel { touch-action: pan-y; overscroll-behavior: contain; }
#menu .menu-panel { background: transparent; border: none; box-shadow: none; padding: 0; }
.menu-panel.wide { width: min(860px, 94vw); }
.menu-panel h2 { margin: 0 0 18px; font-size: 26px; letter-spacing: 1px; }
.menu-panel h3 { margin: 0 0 8px; font-size: 15px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list.row { flex-direction: row; justify-content: flex-end; margin-top: 18px; }
.menu-list button, .menu-link { font: inherit; font-size: 18px; font-weight: 600; color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line);
  padding: 12px 22px; border-radius: 8px; cursor: pointer; text-align: left; min-width: 260px; transition: background .15s, transform .15s, border-color .15s; text-decoration: none; display: block; }
.menu-list button:hover, .menu-list button:focus-visible, .menu-link:hover { background: linear-gradient(90deg, rgba(242,178,52,.28), rgba(217,87,43,.12)); border-color: var(--accent); transform: translateX(4px); outline: none; }
.menu-list.row button { min-width: 120px; text-align: center; }
.save-info { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.version { position: absolute; right: 16px; bottom: 12px; font-size: 12px; color: var(--muted); }
.danger { color: var(--danger); }
.hint { color: var(--muted); font-size: 13px; }

.options { display: flex; flex-direction: column; gap: 14px; min-width: 340px; }
.options label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.options label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); }
.options select, .options input[type=range] { font: inherit; width: 100%; accent-color: var(--accent); }
.options select { background: #221c18; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px; }

/* Ajustes ficam no menu; valores e perfis têm leitura rápida por dispositivo. */
.settings-menu { width: min(860px, 94vw); padding: 24px 28px; }
.settings-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.settings-eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 10px; letter-spacing: 1.8px; }
.settings-heading h2 { margin-bottom: 18px; }
.settings-saved { max-width: 180px; color: #b8c7af; font-size: 11px; line-height: 1.5; text-align: right; }
.settings-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.settings-tabs { overflow-x: auto; scrollbar-width: thin; }
.settings-tabs button { flex: 1; padding: 11px 10px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.settings-tabs button { white-space: nowrap; }
.settings-tabs [aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); background: #f2b2340b; }
.settings-tabs button:focus-visible, .options input:focus-visible, .options select:focus-visible, .camera-presets button:focus-visible, .settings-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.settings-section { display: flex; flex-direction: column; gap: 18px; }
.settings-section[hidden] { display: none; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.settings-grid label > span { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.options output { color: #f5d18b; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.options small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.options input[type=range] { margin: 4px 0; min-height: 26px; }
.camera-presets { padding: 12px 14px; border-left: 2px solid var(--accent); background: #ffffff06; }
.camera-presets > span { font-size: 12px; color: var(--text); }
.camera-presets > div { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0; }
.camera-presets button, .settings-reset { font: inherit; font-size: 12px; color: var(--text); border: 1px solid #ffffff29; border-radius: 4px; background: #ffffff08; padding: 9px 12px; cursor: pointer; }
.camera-presets button:hover { border-color: var(--accent); background: #f2b23414; }
.settings-reset { align-self: start; color: var(--muted); background: transparent; }
.settings-inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.settings-inline-actions .hint { flex: 1; min-width: 170px; line-height: 1.5; margin: 0; }
.settings-reset:disabled { opacity: .45; cursor: default; }
.settings-tip { margin: 0; font-size: 12px; line-height: 1.8; color: var(--muted); }
.device-status { padding: 10px 12px; margin: 0; border: 1px solid #ffffff14; font-size: 12px; line-height: 1.6; color: #c7d2bf; }
.settings-footer { position: sticky; bottom: -24px; padding-top: 14px; padding-bottom: 4px; background: #121a15f5; }
.settings-footer button { font-size: 14px; }
.controller-menu .screen.active :is(button, input, select, a[href]):focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.controller-menu .screen.active button:focus { background-color: #f2b23420; border-color: var(--accent); }
.large-text .hud-prompt, .large-text #hud-obj-text { font-size: 18px; }
.large-text #hud-street { font-size: 19px; }
.large-text .hud-gps { font-size: 14px; }
.large-text .toast { font-size: 16px; }
.large-text .options label, .large-text .options select, .large-text .controls-grid p { font-size: 16px; }
.reduced-motion .toast, .reduced-motion #hud-money.flash { animation: none; }
.reduced-motion .bar > div, .reduced-motion .hud-damage, .reduced-motion .menu-list button { transition: none; }

.controls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.controls-grid p { margin: 6px 0; font-size: 14px; }
kbd { display: inline-block; background: #2b241f; border: 1px solid #4a3f37; border-bottom-width: 3px; border-radius: 5px; padding: 1px 7px; font-family: inherit; font-size: 12px; color: var(--text); }
.credits p { font-size: 14px; line-height: 1.6; color: var(--text); }

.mission-list { display: grid; gap: 10px; }
.mission-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: rgba(255,255,255,.03); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.mission-item .mt { font-weight: 700; }
.mission-item .md { color: var(--muted); font-size: 13px; grid-column: 1 / 2; }
.mission-item .mr { color: var(--green); font-weight: 700; align-self: center; grid-row: 1 / 3; grid-column: 2; text-align: right; }
.mission-item.done { opacity: .6; }
.mission-item button { font: inherit; font-size: 12px; margin-top: 6px; background: #2b241f; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; cursor: pointer; justify-self: start; }

/* Mapa grande */
#bigmap { background: #1b1714; z-index: 30; }
#bigmap-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#bigmap-canvas.drag { cursor: grabbing; }
.bigmap-ui { position: absolute; inset: 0; pointer-events: none; }
.bigmap-title { position: absolute; top: 18px; left: 24px; font-size: 22px; font-weight: 800; text-shadow: 0 2px 6px #000; }
.bigmap-help { position: absolute; top: 52px; left: 24px; font-size: 13px; color: var(--muted); text-shadow: 0 1px 4px #000; }
.legend { position: absolute; left: 24px; bottom: 22px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; background: rgba(0,0,0,.45); padding: 8px 12px; border-radius: 8px; }
.legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
/* Mesmas cores dos marcadores desenhados em hud.js (COLORS e destino do GPS). */
.dot.player { background: #fff; } .dot.mission { background: #ffc568; } .dot.target { background: #66ddff; }
.dot.discover { background: #91e1ae; } .dot.waypoint { background: #d594ff; }
.bigmap-credit { position: absolute; right: 16px; bottom: 12px; font-size: 11px; color: var(--muted); }
.bigmap-close { pointer-events: auto; position: absolute; top: 16px; right: 18px; font-size: 22px; background: rgba(0,0,0,.5); color: #fff; border: 1px solid var(--line); border-radius: 50%; width: 42px; height: 42px; cursor: pointer; }

/* HUD */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; text-shadow: 0 2px 4px rgba(0,0,0,.8); }
.hud-top-right { position: absolute; top: 18px; right: 24px; text-align: right; }
#hud-money { font-size: 30px; font-weight: 800; color: #7be07a; letter-spacing: 1px; }
#hud-money.flash { animation: flash .6s; }
@keyframes flash { 0% { transform: scale(1.25); color: #fff; } 100% { transform: scale(1); } }
#hud-clock { font-size: 18px; font-weight: 600; color: var(--text); margin-top: 2px; }
.hud-objective { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.55); border-left: 4px solid var(--accent); padding: 10px 18px; border-radius: 6px; max-width: min(560px, 70vw); text-align: center; }
#hud-obj-title { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); }
#hud-obj-text { font-size: 17px; font-weight: 600; margin-top: 2px; }
#hud-obj-timer { font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
#hud-obj-timer.warn { color: var(--danger); }
.hud-minimap { position: absolute; left: 22px; bottom: 22px; width: 220px; }
#minimap { width: 220px; height: 220px; border-radius: 50%; border: 3px solid rgba(0,0,0,.65); box-shadow: 0 4px 18px rgba(0,0,0,.6); background: #2a2420; }
.hud-vitals { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 9px; background: rgba(0,0,0,.6); border-radius: 5px; overflow: hidden; border: 1px solid rgba(0,0,0,.6); }
.bar.thin { height: 5px; margin-top: 6px; }
.bar > div { height: 100%; width: 100%; background: linear-gradient(90deg, #3fae4a, #7be07a); transition: width .2s; }
.bar > div.low { background: linear-gradient(90deg, #b5261d, #e2483d); }
#hud-car-health { background: linear-gradient(90deg, #c98a1a, #f2b234); }
#hud-lives { font-size: 16px; color: #ff6b6b; white-space: nowrap; letter-spacing: 2px; }
.hud-bottom-right { position: absolute; right: 26px; bottom: 26px; text-align: right; }
#hud-street { font-size: 18px; font-weight: 700; color: var(--text); }
#hud-speed { margin-top: 6px; font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
#hud-speed small { font-size: 14px; margin-left: 4px; color: var(--muted); font-weight: 600; }
.hud-prompt { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); padding: 8px 16px; border-radius: 6px; font-size: 16px; }
.hud-toasts { position: absolute; top: 74px; right: 24px; left: auto; transform: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: min(360px, 34vw); }
.toast { background: rgba(12,22,17,.9); padding: 8px 12px; border-radius: 3px; font-size: 13px; font-weight: 600; line-height: 1.45; animation: toast 3.2s forwards; text-align: left; white-space: pre-line; }
.toast.big { font-size: 30px; color: var(--accent); background: rgba(0,0,0,.55); }
.toast.good { color: #7be07a; } .toast.bad { color: #ff7a6e; } .toast.info { color: #8fd3ff; }
@keyframes toast { 0% { opacity: 0; transform: translateY(10px); } 10% { opacity: 1; transform: none; } 82% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
.hud-fps { position: absolute; top: 8px; left: 10px; font: 12px monospace; color: #9f9; }
.hud-damage { position: absolute; inset: 0; box-shadow: inset 0 0 140px rgba(200, 0, 0, 0); transition: box-shadow .4s; }
.hud-credit { position: absolute; left: 252px; bottom: 6px; font-size: 10px; color: rgba(255,255,255,.55); }

.lock-hint { position: absolute; bottom: 82px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); padding: 6px 12px; border-radius: 6px; z-index: 11; pointer-events: none; font-size: 12px; color: #d7dacf; }

/* Toque */
#touch { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
.stick { position: absolute; left: 26px; bottom: 270px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.2); pointer-events: auto; }
.stick, .touch-buttons, .touch-camera, #bigmap-canvas { touch-action: none; }
.stick .knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255,255,255,.35); }
.touch-buttons { position: absolute; right: 18px; bottom: 150px; display: grid; grid-template-columns: repeat(2, 64px); gap: 12px; pointer-events: auto; }
.touch-buttons button { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); color: #fff; font-size: 22px; font-weight: 800; }
.touch-camera { position: absolute; right: max(18px, env(safe-area-inset-right)); top: 82px; display: flex; gap: 7px; pointer-events: auto; }
.touch-camera button { min-width: 48px; min-height: 42px; padding: 7px; font: inherit; font-size: 10px; color: #f2f0df; border: 1px solid #ffffff45; border-radius: 6px; background: #0c1616bb; }
.touch-buttons button { font-size: 11px; font-weight: 600; }
.touch-buttons button.active, .touch-camera button.active { background: #b4771dcc; border-color: var(--accent); }

@media (max-width: 720px) {
  .brand-mark { font-size: 64px; } .brand.small .brand-mark { font-size: 54px; }
  #menu { padding-left: 0; align-items: center; background: rgba(12,9,7,.6); }
  .menu-list button { min-width: 220px; font-size: 16px; padding: 10px 16px; }
  .hud-minimap, #minimap { width: 150px; height: 150px; }
  .hud-minimap { width: 150px; }
  #hud-money { font-size: 22px; } #hud-speed { font-size: 32px; }
  .hud-credit { left: 180px; }
  .hud-objective { top: 70px; }
}

/* Cartografia e interface de exploração: centro da cena livre para jogar. */
.hud-top-right { display: flex; align-items: baseline; gap: 16px; padding: 6px 12px; border-radius: 4px; background: linear-gradient(90deg, transparent, rgba(12,22,17,.5)); }
#hud-money { font-size: 23px; letter-spacing: .5px; }
#hud-clock { font-size: 16px; font-variant-numeric: tabular-nums; }
.hud-objective { top: 20px; left: 24px; transform: none; max-width: min(430px, 49vw); text-align: left; padding: 10px 14px; border-left-width: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(12,22,17,.82), rgba(12,22,17,.25)); }
#hud-obj-title { font-size: 10px; letter-spacing: 1.8px; }
#hud-obj-text { font-size: 14px; line-height: 1.45; font-weight: 500; }
#hud-obj-timer:empty { display: none; }
#hud-obj-timer { font-size: 18px; }
.hud-minimap { bottom: 28px; height: auto; }
#minimap { border-color: rgba(220,230,210,.18); box-shadow: 0 0 0 5px rgba(12,22,17,.65), 0 6px 22px rgba(0,0,0,.4); }
.hud-gps { margin-top: 7px; padding: 5px 8px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; background: rgba(12,22,17,.8); border-left: 2px solid #d594ff; color: #ede4ff; border-radius: 2px; }
.hud-bottom-right { bottom: 30px; }
#hud-street { max-width: min(38vw, 440px); font-size: 15px; letter-spacing: .2px; }
#hud-speed { font-size: 40px; font-style: italic; }
.hud-prompt { bottom: 36px; max-width: 46vw; text-align: center; font-size: 13px; border: 1px solid rgba(255,255,255,.12); background: rgba(12,22,17,.8); }
.hud-toasts { top: 74px; max-width: min(360px, 34vw); z-index: 50; pointer-events: none; text-shadow: 0 2px 4px #000a; }
.toast { max-width: 100%; padding: 8px 12px 8px 13px; border: 1px solid rgba(255,255,255,.08); border-left: 2px solid rgba(242,178,52,.9); border-radius: 3px; background: linear-gradient(90deg, rgba(12,22,17,.92), rgba(12,22,17,.7)); box-shadow: 0 8px 22px rgba(0,0,0,.22); backdrop-filter: blur(4px); }
.toast.good { border-left-color: #7be07a; } .toast.bad { border-left-color: #ff7a6e; } .toast.info { border-left-color: #8fd3ff; }
.toast.big { font-size: 20px; }
.hud-fps { top: auto; bottom: 8px; left: auto; right: 12px; }
.bigmap-title { letter-spacing: -.5px; }
.bigmap-help { max-width: calc(100vw - 90px); font-size: 11px; }
.map-tools { position: absolute; top: 87px; left: 24px; width: min(330px, calc(100vw - 48px)); color: #e6ebdf; pointer-events: auto; }
.map-tools input { width: 100%; padding: 12px 14px; font: inherit; font-size: 13px; color: #f1f4e9; border: 1px solid rgba(220,230,210,.25); border-radius: 5px; background: rgba(16,27,21,.94); box-shadow: 0 5px 15px #0003; }
.map-tools input::placeholder { color: #a8b3a4; }
.map-actions { display: flex; gap: 5px; margin-top: 7px; }
.map-tools button { color: #e6ebdf; font: inherit; font-size: 12px; background: rgba(16,27,21,.93); border: 1px solid rgba(220,230,210,.22); border-radius: 4px; padding: 9px 12px; cursor: pointer; }
.map-tools button:hover { background: #314b3a; border-color: #c9b779; }
.map-tools button:focus-visible, .map-tools input:focus-visible, .bigmap-close:focus-visible { outline: 2px solid #f2b234; outline-offset: 3px; }
.map-status { font-size: 12px; line-height: 1.5; margin-top: 8px; color: #d8d7b8; text-shadow: 0 1px 4px #000, 0 1px 4px #000; }
.map-results { padding: 5px; margin-top: 5px; max-height: 42vh; overflow: auto; border-radius: 5px; background: rgba(16,27,21,.96); }
.map-results button { display: block; text-align: left; width: 100%; margin: 3px 0; border-color: transparent; }
.map-results p { font-size: 12px; margin: 8px; }
#bigmap-canvas:focus-visible { outline: 1px solid rgba(242,178,52,.25); outline-offset: -2px; }
@media (max-width: 720px) {
  .hud-top-right { right: 12px; top: 12px; gap: 10px; }
  #hud-money { font-size: 18px; } #hud-clock { font-size: 13px; }
  .hud-objective { top: 12px; left: 12px; max-width: 52vw; padding: 7px 10px; }
  #hud-obj-title { font-size: 9px; } #hud-obj-text { font-size: 11px; }
  .hud-minimap { left: 14px; bottom: 26px; height: auto; }
  .hud-gps { max-width: 165px; font-size: 10px; }
  .hud-prompt { bottom: 105px; left: auto; right: 12px; transform: none; max-width: 46vw; font-size: 11px; }
  .hud-bottom-right { right: 14px; bottom: 28px; }
  #hud-street { font-size: 12px; max-width: 42vw; }
  .bigmap-title { top: 16px; left: 16px; font-size: 18px; max-width: calc(100vw - 80px); }
  .bigmap-help { top: 44px; left: 16px; line-height: 1.5; }
  .map-tools { top: 92px; left: 16px; width: min(300px, calc(100vw - 32px)); }
  .map-tools button { min-height: 40px; }
  .legend { left: 12px; bottom: 18px; font-size: 10px; gap: 8px; max-width: calc(100vw - 24px); }
  .bigmap-credit { bottom: 3px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; } #hud-money.flash { animation: none; }
  .bar > div, .hud-damage { transition: none; }
}

/* Menus sobre a cidade: tipografia de sinalização, cores da terra e da vegetação. */
#menu { background: linear-gradient(90deg, rgba(9,19,14,.94), rgba(9,19,14,.72) 31%, rgba(9,19,14,.12) 64%, transparent); }
#menu .menu-panel { width: 352px; max-height: 94vh; overflow-x: hidden; padding: 12px 4px; }
#menu .brand.small { margin-bottom: 34px; }
#menu .brand-mark { font-size: clamp(74px, 8.4vw, 122px); font-weight: 950; letter-spacing: -7px; padding-right: 8px; line-height: .85; text-shadow: none; }
#menu .brand-sub { margin-top: 14px; font-size: 16px; font-weight: 700; letter-spacing: 7px; }
#menu .brand-city { margin-top: 13px; max-width: 310px; font-size: 10px; letter-spacing: 1.7px; line-height: 1.7; color: #d0c8ac; }
#menu .menu-list { gap: 6px; }
#menu .menu-list button, #menu .menu-link { position: relative; width: 100%; min-width: 0; padding: 12px 18px; border-radius: 3px; border-color: transparent; background: rgba(8,17,12,.28); font-size: 15px; letter-spacing: .4px; }
#menu #btn-continue:not(.hidden), #menu #btn-continue.hidden + button { background: #efbc62; border-color: #efbc62; color: #192218; font-weight: 800; }
#menu .menu-list button:hover, #menu .menu-list button:focus-visible, #menu .menu-link:hover, #menu .menu-link:focus-visible { border-color: #e5be74; transform: translateX(3px); background: #c1a86633; outline: none; }
#menu #btn-continue:not(.hidden):hover, #menu #btn-continue.hidden + button:hover { background: #ffd98b; }
#menu .save-info { font-size: 11px; line-height: 1.7; color: #c1c7b3; margin-top: 22px; border-top: 1px solid #b9c7b32b; padding-top: 13px; }
#menu .version { font-size: 10px; letter-spacing: .5px; color: #d3d8c6; text-shadow: 0 1px 4px #000; }
.options { min-width: 0; width: 340px; max-width: 100%; }
.mission-card { border: 1px solid #b9c7b329; border-left: 2px solid #e4bd70; border-radius: 5px; padding: 15px 18px; background: linear-gradient(100deg, #788b7421, #788b7408); }
.mission-card h3 { margin-bottom: 7px; }
.mission-card p { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: #c0c5b5; max-width: 68ch; }
.mission-card button, .mission-list > button { font: inherit; font-size: 12px; font-weight: 600; color: #f0e7ce; background: #59674847; border: 1px solid #cfb67f5e; border-radius: 4px; padding: 9px 12px; cursor: pointer; }
.mission-card button:hover, .mission-list > button:hover { background: #8a783f70; }
.mission-card button:disabled { opacity: .5; cursor: default; background: transparent; }
.mission-card button:focus-visible, .mission-list > button:focus-visible { outline: 2px solid #f2b234; outline-offset: 3px; }
.mission-list > button { justify-self: start; margin-top: 8px; color: #c8cbbd; border-color: #b9c7b329; background: transparent; }
.dot.mission { background: #ffc568; } .dot.target { background: #66ddff; } .dot.discover { background: #91e1ae; }
@media (max-width: 720px) {
  #menu { padding: 16px 24px; align-items: flex-start; background: linear-gradient(90deg, #09130ef2, #09130eb3 65%, #09130e29); }
  #menu .menu-panel { width: 300px; min-width: 0; max-width: 100%; padding: 8px 4px; }
  #menu .brand-mark { font-size: 80px; }
  #menu .brand.small { margin-bottom: 24px; }
  .menu-panel { min-width: min(320px, 92vw); padding: 22px; }
  .mission-card { padding: 12px; }
}
@media (max-height: 620px) {
  #menu .brand.small { margin-bottom: 18px; }
  #menu .brand-mark { font-size: 70px; }
  #menu .brand-sub { margin-top: 8px; font-size: 12px; }
  #menu .brand-city { margin-top: 7px; }
  #menu .menu-list button, #menu .menu-link { padding: 8px 14px; font-size: 13px; }
  #menu .save-info { margin-top: 12px; padding-top: 8px; }
}

#reference-scene-note { position: absolute; bottom: 266px; left: 22px; max-width: 220px; padding: 4px 8px; border-left: 2px solid #6d8a72; border-radius: 2px; background: #101b24d9; color: #dbe2d8; font-size: 10px; line-height: 1.45; pointer-events: none; }
/* Comparison framing is temporary; map attribution and normal menus remain. */
.facade-objects-view #hud > :not(.hud-credit),
.facade-objects-view #hud-toasts,
.facade-objects-view #lock-hint,
.facade-objects-view #restore-shop-display { display: none !important; }
#vignette { position: absolute; inset: 0; z-index: 5; pointer-events: none; background:
  radial-gradient(ellipse at 50% 44%, rgba(0,0,0,0) 50%, rgba(3,8,5,.2) 100%),
  linear-gradient(180deg, rgba(3,8,5,.1), rgba(3,8,5,0) 16%, rgba(3,8,5,0) 84%, rgba(3,8,5,.14)); }

/* Notificações compactas: no celular ficam sob o objetivo, nunca sobre o card. */
@media (max-width: 720px) {
  .hud-toasts { top: 126px; left: 12px; right: 12px; max-width: none; align-items: flex-start; }
  .toast { max-width: 76vw; padding: 7px 10px; font-size: 11.5px; line-height: 1.42; }
  #reference-scene-note { bottom: 200px; left: 14px; max-width: calc(100vw - 28px); font-size: 9.5px; }
}

@media (pointer: coarse), (max-width: 720px) {
  .settings-menu { padding: 18px; max-height: 94dvh; width: min(860px, 96vw); }
  .options { min-width: 0; }
  .settings-heading { gap: 10px; }
  .settings-heading h2 { font-size: 22px; }
  .settings-saved { max-width: 112px; font-size: 10px; }
  .settings-tabs button { font-size: 12px; min-height: 44px; padding-inline: 5px; }
  .settings-footer { bottom: -18px; gap: 8px; }
  .settings-footer button { min-width: 0; font-size: 12px; padding: 10px; }
  .touch-buttons { bottom: max(92px, env(safe-area-inset-bottom)); right: max(14px, env(safe-area-inset-right)); grid-template-columns: repeat(3, 50px); gap: 8px; }
  .touch-buttons button { width: 50px; height: 50px; }
  .stick { left: max(18px, env(safe-area-inset-left)); bottom: 224px; width: 112px; height: 112px; }
  .stick .knob { width: 48px; height: 48px; margin: -24px; }
  .hud-prompt { bottom: 218px; }
  #reference-scene-note { max-width: 150px; bottom: 178px; }
}
@media (max-width: 520px) {
  .settings-grid { grid-template-columns: 1fr; gap: 18px; }
  .settings-menu { max-height: 94dvh; }
  .camera-presets button { flex: 1; font-size: 11px; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
  .hud-minimap, #minimap { width: 104px; }
  #minimap { height: 104px; }
  .hud-minimap { left: 14px; bottom: 18px; }
  .hud-gps { max-width: 112px; font-size: 9px; }
  .stick { left: 144px; bottom: max(20px, env(safe-area-inset-bottom)); width: 100px; height: 100px; }
  .touch-buttons { bottom: max(20px, env(safe-area-inset-bottom)); grid-template-columns: repeat(3, 46px); gap: 6px; }
  .touch-buttons button { width: 46px; height: 46px; }
  .touch-camera { top: 66px; }
  .hud-bottom-right { bottom: 126px; }
  .hud-prompt { bottom: 26px; right: 190px; max-width: 30vw; }
  #reference-scene-note { display: none; }
  .hud-toasts { top: 72px; left: 12px; max-width: 35vw; }
}

/* v0.5.27: dificuldade e objetivos */
.difficulty-note { color: var(--muted); font-size: 13px; margin: -4px 0 12px; }
.difficulty-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.difficulty-list button span { font-size: 12px; font-weight: 400; color: var(--muted); }
.objective-heading { margin: 18px 0 8px; font-size: 16px; }
.objective-heading small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 8px; }
.objective-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.objective { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(0,0,0,.25); font-size: 13px; overflow: hidden; }
.objective span { color: var(--muted); font-size: 12px; }
.objective i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--progress, 0%); background: var(--accent); }
.objective.done { border-color: rgba(95,191,90,.6); }
.objective.done i { background: var(--green); }

/* Modo online: bate-papo sobre o jogo e tela de salas */
.chat { position: absolute; left: 16px; bottom: 300px; z-index: 24; width: min(420px, calc(100vw - 32px)); max-height: 34vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none; transition: opacity .4s; }
@media (max-height: 760px), (max-width: 760px) { .chat { bottom: 220px; } }
@media (max-height: 520px) { .chat { bottom: 150px; width: min(340px, calc(100vw - 32px)); } .chat-log li { font-size: 12px; } }
.chat.quiet { opacity: .35; }
.chat-log { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-log li { pointer-events: auto; background: rgba(10,14,12,.62); padding: 4px 8px; border-radius: 6px; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.chat-log b { color: var(--accent); font-weight: 700; }
.chat-tool { margin-left: 6px; padding: 0 4px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; opacity: .7; }
.chat-tool:hover, .chat-tool:focus-visible { opacity: 1; color: #fff; }
.chat-form input { pointer-events: auto; width: 100%; padding: 9px 11px; border-radius: 6px; border: 1px solid var(--line); background: rgba(8,12,10,.9); color: #f3ead6; font: 14px var(--font); }
.online-note, .online-hint { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0 0 10px; }
.online-hint { font-size: 12px; margin-top: -4px; }
.online-field { display: grid; gap: 4px; margin-bottom: 10px; font-size: 13px; }
.online-field input { padding: 9px 11px; border-radius: 6px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: #f3ead6; font: 15px var(--font); }
.online-rooms { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.online-rooms button { padding: 5px 9px; font-size: 12px; }
.online-status { min-height: 1.4em; font-size: 13px; color: #f3ead6; }

/* Renda: Apoie, consentimento e espaços de anúncio (só menu e pausa) */
.support-link { color: var(--accent) !important; font-weight: 700; }
.ad-consent { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.4); font-size: 12px; line-height: 1.45; }
.ad-consent div { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ad-consent button { padding: 6px 10px; font-size: 12px; }
.ad-consent a, .privacy-link { color: var(--muted); font-size: 12px; }
.privacy-link { display: inline-block; margin-top: 10px; }
.ad-slot { margin-top: 12px; min-height: 90px; width: 100%; max-width: 728px; }
.ad-slot::before { content: 'Publicidade'; display: block; font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }

