/* City Architect: Next Generation - styles */
:root {
  --bg: #0a1220;
  --panel: rgba(16, 26, 44, 0.86);
  --panel-solid: #101a2c;
  --glass: rgba(22, 34, 56, 0.72);
  --stroke: rgba(120, 160, 220, 0.16);
  --stroke-2: rgba(120, 160, 220, 0.3);
  --text: #e7eef8;
  --muted: #93a4bf;
  --accent: #ffb347;
  --accent-2: #4fe08a;
  --blue: #5aa0ff;
  --danger: #ff5a5a;
  --zR: #45d67a;
  --zC: #5aa0ff;
  --zI: #f2c14e;
  --font: "Trebuchet MS", "Segoe UI", system-ui, ui-sans-serif, sans-serif;
  --title: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); }
body { position: fixed; inset: 0; -webkit-user-select: none; user-select: none; }
#game-canvas { position: absolute; inset: 0; display: block; cursor: crosshair; }
.hidden { display: none !important; }
button { font-family: var(--font); cursor: pointer; color: var(--text); }

/* ---------- Loading ---------- */
#loading-screen {
  position: absolute; inset: 0; z-index: 100;
  background: radial-gradient(1200px 700px at 50% 30%, #16305a, #070c16 70%);
  display: flex; align-items: center; justify-content: center;
}
.load-inner { text-align: center; }
.load-title { font-size: clamp(38px, 8vw, 82px); letter-spacing: .18em; font-weight: 800;
  background: linear-gradient(180deg, #fff, #9fc4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.load-sub { letter-spacing: .55em; color: var(--accent); font-weight: 700; margin: 6px 0 28px; font-size: 14px; }
.load-track { width: min(420px, 70vw); height: 8px; background: rgba(255,255,255,.08); border-radius: 20px; overflow: hidden; margin: 0 auto; }
#load-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }
.load-note { margin-top: 14px; color: var(--muted); font-size: 13px; }
.load-studio { margin-top: 40px; color: #56688a; font-size: 12px; letter-spacing: .2em; }

/* ---------- Screens ---------- */
.screen { position: absolute; inset: 0; z-index: 40; }
.modal-screen { display: flex; align-items: center; justify-content: center; background: rgba(6, 10, 20, 0.72); backdrop-filter: blur(6px); padding: 20px; }
#modal-generic { z-index: 50; }

/* Main menu */
.menu-screen { z-index: 45; }
.menu-hero { position: absolute; inset: 0; background: url("assets/ui/menu_hero.jpg") center/cover no-repeat; }
.menu-overlay { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(6,10,22,.92) 0%, rgba(6,10,22,.6) 42%, rgba(6,10,22,.15) 100%); }
.menu-content { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 6vw; max-width: 900px; }
.brand { margin-bottom: 42px; }
.game-title { font-size: clamp(40px, 6vw, 82px); font-weight: 800; line-height: .92; letter-spacing: .03em; white-space: nowrap;
  background: linear-gradient(180deg, #ffffff, #a9c9ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 8px 40px rgba(0,0,0,.5); }
.game-sub { letter-spacing: .5em; color: var(--accent); font-weight: 700; margin-top: 8px; font-size: clamp(13px, 1.6vw, 18px); }
.menu-buttons { display: flex; flex-direction: column; gap: 12px; max-width: 340px; }
.menu-footer { margin-top: 40px; color: #7f92b3; font-size: 12px; letter-spacing: .18em; }

.mbtn { position: relative; padding: 13px 20px; border: 1px solid var(--stroke-2); border-radius: 12px;
  background: var(--glass); backdrop-filter: blur(10px); font-size: 15px; font-weight: 600; letter-spacing: .04em;
  text-align: left; transition: transform .16s ease, background .2s, border-color .2s, box-shadow .2s; overflow: hidden; }
.mbtn::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); transform: scaleY(0); transition: transform .18s; transform-origin: bottom; }
.mbtn:hover { transform: translateX(6px); background: rgba(40, 60, 96, .85); border-color: var(--accent); box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.mbtn:hover::after { transform: scaleY(1); }
.mbtn.primary { background: linear-gradient(100deg, #ff9d2f, #ffb347); color: #23160a; border-color: transparent; }
.mbtn.primary:hover { box-shadow: 0 8px 30px rgba(255,150,40,.4); }
.mbtn.danger { border-color: rgba(255,90,90,.4); }
.mbtn.danger:hover { background: rgba(120,30,30,.6); border-color: var(--danger); }
.mbtn.small { padding: 7px 12px; font-size: 12px; border-radius: 9px; text-align: center; }

/* Panels / modals */
.panel { width: min(560px, 94vw); background: var(--panel); border: 1px solid var(--stroke); border-radius: 18px;
  padding: 26px; backdrop-filter: blur(16px); box-shadow: 0 30px 80px rgba(0,0,0,.5); position: relative; animation: pop .22s ease; }
.panel.wide { width: min(760px, 94vw); max-height: calc(100vh - 32px); overflow-y: auto; }
.panel.scrolly { max-height: 86vh; overflow: auto; }
.budget-modal { width: min(720px, 94vw); max-height: calc(100vh - 56px); overflow-y: auto; padding: 20px 22px 18px; }
.budget-modal .panel-title { margin-bottom: 14px; }
.budget-modal .budget-top { margin-bottom: 8px; }
.budget-modal .budget-section { margin: 8px 0 10px; padding: 8px 10px; }
.budget-modal .budget-table td, .budget-modal .budget-table th { padding: 5px 4px; }
.budget-modal .budget-table .sep th { padding-top: 10px; }
@keyframes pop { from { transform: scale(.94) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-title { font-size: 24px; font-weight: 800; letter-spacing: .02em; margin-bottom: 18px; color: #fff; }
.panel-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; }
.modal-x, .info-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--stroke); background: rgba(255,255,255,.05); font-size: 15px; }
.modal-x:hover, .info-close:hover { background: rgba(255,90,90,.3); }

/* New game form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.form-grid input, .form-grid select, .settings-grid input {
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--stroke-2); background: rgba(8,14,26,.8); color: var(--text); font-size: 14px; }
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: var(--accent); }
.seed-row { display: flex; gap: 8px; }
.seed-row input { flex: 1; }
.sbtn { width: 42px; border-radius: 10px; border: 1px solid var(--stroke-2); background: rgba(8,14,26,.8); font-size: 16px; }
.sbtn:hover { border-color: var(--accent); }

/* Settings */
.settings-grid { display: flex; flex-direction: column; gap: 16px; }
.settings-grid label { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.toggle { flex-direction: row !important; align-items: center; justify-content: space-between; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
input[type=range] { accent-color: var(--accent); }

/* How to / credits */
.howto { line-height: 1.7; color: #c6d3e6; font-size: 14px; }
.howto ol { margin: 12px 0 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.howto b { color: #fff; }
.tagR { color: var(--zR); font-weight: 700; } .tagC { color: var(--zC); font-weight: 700; } .tagI { color: var(--zI); font-weight: 700; }
.credits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; text-align: left; margin-bottom: 10px; }
.credit-role { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.credit-name { font-weight: 700; }
.credit-studio { grid-column: 1/3; text-align: center; margin-top: 24px; font-size: 18px; line-height: 1.8; color: var(--accent); }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
#hud > * { pointer-events: auto; }

#topbar { position: absolute; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; gap: 18px;
  padding: 0 16px; background: linear-gradient(180deg, rgba(8,14,26,.95), rgba(8,14,26,.7)); border-bottom: 1px solid var(--stroke); backdrop-filter: blur(10px); }
.tb-left { min-width: 150px; }
.tb-city { font-weight: 800; font-size: 17px; letter-spacing: .02em; }
.tb-date { font-size: 12px; color: var(--muted); }
.tb-stats { display: flex; gap: 8px; flex: 1; }
.stat { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(255,255,255,.04); border: 1px solid var(--stroke); border-radius: 10px; font-weight: 700; font-size: 13px; }
.stat .s-ico { color: var(--accent); font-weight: 800; }
.stat.neg { color: var(--danger); border-color: rgba(255,90,90,.4); background: rgba(255,60,60,.08); }
.tb-right { display: flex; align-items: center; gap: 12px; }
.rci { display: flex; gap: 5px; align-items: flex-end; height: 34px; padding: 0 6px; }
.rci-bar { position: relative; width: 16px; height: 100%; background: rgba(255,255,255,.06); border-radius: 4px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.rci-bar i { position: absolute; bottom: 0; left: 0; right: 0; height: 0%; transition: height .4s ease; }
.rci-bar b { position: relative; font-size: 9px; color: #cfe0f5; z-index: 2; padding-bottom: 1px; }
.speed { display: flex; gap: 3px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); border-radius: 10px; padding: 3px; }
.spd { width: 34px; height: 28px; border: none; background: transparent; border-radius: 7px; font-size: 11px; color: var(--muted); }
.spd.active { background: var(--accent); color: #23160a; }
.spd:hover { color: #fff; }
.menu-btn { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--stroke-2); background: rgba(255,255,255,.05); font-weight: 700; font-size: 13px; }
.menu-btn:hover { border-color: var(--accent); }

/* Toolbar */
#toolbar { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 16px; padding: 12px 10px; backdrop-filter: blur(12px); box-shadow: 0 20px 50px rgba(0,0,0,.4); max-height: calc(100vh - 80px); overflow-y: auto; }
.tool-group { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--stroke); }
.tool-group:last-child { border-bottom: none; padding-bottom: 0; }
.tool { width: 62px; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(255,255,255,.04); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 4px; transition: transform .14s, background .18s, border-color .18s; }
.tico { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); pointer-events: none; }
.tlabel { font-size: 9px; font-weight: 700; letter-spacing: .01em; color: #c3d2e8; pointer-events: none; }
.tool:hover { transform: scale(1.06); border-color: var(--accent); background: rgba(255,180,70,.12); }
.tool.active { background: var(--accent); border-color: transparent; box-shadow: 0 6px 18px rgba(255,150,40,.4); }
.tool.active .tlabel { color: #23160a; }
.tool.danger.active { background: var(--danger); }
.tool.danger.active .tlabel { color: #fff; }

/* Flyouts */
.flyout { position: absolute; left: 92px; top: 50%; transform: translateY(-50%); width: 320px; max-height: 78vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--stroke); border-radius: 16px; padding: 16px; backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: slideL .2s ease; }
@keyframes slideL { from { opacity: 0; transform: translate(-14px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
.flyout-title { font-weight: 800; font-size: 16px; margin-bottom: 12px; }
.fl-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 14px 0 8px; }
.fl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fl-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--stroke); background: rgba(255,255,255,.03); transition: transform .14s, border-color .18s, background .18s; }
.fl-item:hover { transform: translateY(-3px); border-color: var(--accent); background: rgba(255,180,70,.1); }
.fl-item img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.fi-name { font-size: 12px; font-weight: 700; text-align: center; }
.fi-cost { font-size: 11px; color: var(--accent-2); font-weight: 700; }
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ov { padding: 10px; border-radius: 10px; border: 1px solid var(--stroke); background: rgba(255,255,255,.03); font-weight: 600; font-size: 13px; }
.ov:hover { border-color: var(--accent); }
.ov.active { background: var(--blue); color: #051230; border-color: transparent; }

/* Info panel */
.info-panel { position: absolute; right: 14px; top: 70px; width: 250px; max-height: calc(100vh - 100px); overflow-y: auto; background: var(--panel); border: 1px solid var(--stroke); border-radius: 16px; padding: 16px; text-align: center; backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.5); animation: pop .2s ease; }
.info-img { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.info-name { font-weight: 800; font-size: 17px; margin-top: 6px; }
.info-cat { display: inline-block; margin: 6px 0 12px; font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.cat-R { background: rgba(69,214,122,.2); color: var(--zR); } .cat-C { background: rgba(90,160,255,.2); color: var(--zC); }
.cat-I { background: rgba(242,193,78,.2); color: var(--zI); } .cat-S { background: rgba(255,180,70,.2); color: var(--accent); }
.info-row { font-size: 13px; color: var(--muted); padding: 3px 0; }
.info-row b { color: var(--text); }
.info-row.fire { color: var(--danger); font-weight: 800; }
.info-row.crime { color: #7fa8ff; font-weight: 700; }
.info-panel .mbtn.small { width: 100%; margin-top: 12px; text-align: center; }

/* hints, fps */
.tool-hint { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 8px 18px; background: var(--panel); border: 1px solid var(--stroke); border-radius: 20px; font-size: 13px; color: #cbd8ec; backdrop-filter: blur(10px); }
.fps { position: absolute; bottom: 14px; right: 14px; font-size: 11px; color: #5d708f; }

/* Budget / laws / graphs */
.budget-top { display: flex; gap: 10px; margin-bottom: 10px; }
.bt-card { flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.bt-card span { font-size: 11px; color: var(--muted); } .bt-card b { font-size: 20px; }
.pos { color: var(--accent-2); } .neg { color: var(--danger); }
.budget-section { margin: 10px 0 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--stroke); background: rgba(255,255,255,.03); }
.budget-bonds-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.budget-bonds-row .bt-card { flex: 1; margin: 0; }
.budget-bonds-row .mbtn { white-space: nowrap; }
.budget-bonds-row .mbtn:disabled { opacity: .45; cursor: not-allowed; }
.budget-section-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.budget-section-title { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }
.budget-section-note { margin-top: 3px; font-size: 11px; color: var(--muted); line-height: 1.3; }
.budget-section-tag { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(90,160,255,.35); background: rgba(90,160,255,.08); color: #cde2ff; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.budget-tax-sliders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.budget-sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.budget-slider { border: 1px solid var(--stroke); border-radius: 12px; background: rgba(0,0,0,.14); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.budget-slider.compact { min-height: 0; }
.budget-slider-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.budget-slider-title { font-size: 13px; font-weight: 800; }
.budget-slider-sub { font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.25; }
.budget-slider-value { font-size: 15px; font-weight: 900; color: var(--accent-2); }
.budget-slider input[type="range"] { width: 100%; }
.budget-slider-foot { font-size: 10px; color: #8ea0ba; line-height: 1.25; }
.budget-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.budget-table td, .budget-table th { text-align: left; padding: 6px 5px; border-bottom: 1px solid var(--stroke); }
.budget-table th { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.budget-table td:last-child, .budget-table th:last-child { text-align: right; font-weight: 700; }
.budget-table .total td { border-top: 2px solid var(--stroke-2); font-size: 15px; font-weight: 800; }
.budget-table .sep th { padding-top: 12px; }

.laws-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.law { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.03); }
.law.on { border-color: rgba(79,224,138,.4); background: rgba(79,224,138,.06); }
.law-info { flex: 1; } .law-name { font-weight: 700; } .law-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.law-toggle { min-width: 56px; padding: 8px 0; border-radius: 8px; border: 1px solid var(--stroke-2); background: rgba(255,255,255,.05); font-weight: 800; font-size: 12px; }
.law-toggle.on { background: var(--accent-2); color: #05270f; border-color: transparent; }

.stats-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.sc { background: rgba(255,255,255,.04); border: 1px solid var(--stroke); border-radius: 12px; padding: 12px; text-align: center; }
.sc span { font-size: 11px; color: var(--muted); display: block; } .sc b { font-size: 20px; }
.graph-title { font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; margin: 12px 0 6px; }
.graph { width: 100%; height: auto; border: 1px solid var(--stroke); border-radius: 10px; background: rgba(0,0,0,.2); }

.dis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.dis-grid .mbtn { text-align: center; }
.weather-row { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--muted); }

/* Save list */
.save-list { display: flex; flex-direction: column; gap: 10px; }
.save-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.03); }
.save-item.empty { opacity: .6; }
.si-info b { font-size: 14px; } .si-info span { display: block; font-size: 12px; color: var(--muted); } .si-info small { font-size: 11px; color: #61728f; }
.si-actions { display: flex; gap: 8px; align-items: center; }
.muted { color: #5d708f; }

/* Toasts */
.toasts { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--stroke-2); font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(16px); transition: all .3s ease; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: none; }
.toast.warn { border-color: var(--danger); color: #ffd0d0; background: #2a1414; }
.toast.police { border-color: var(--blue); color: #cfe0ff; }
.toast.info { border-color: var(--accent-2); }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .tb-stats { display: none; }
  #toolbar { transform: none; top: 64px; left: 8px; }
  .flyout { top: 64px; transform: none; }
  .advisor-pill { max-width: 120px; }
  .budget-top { flex-direction: column; }
  .budget-tax-sliders { grid-template-columns: 1fr; }
  .budget-sliders { grid-template-columns: 1fr; }
  .budget-section-head { flex-direction: column; }
}

/* Advisor pill */
.advisor-pill { display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 20px; border: 1px solid var(--stroke-2); background: rgba(255,255,255,.05); font-weight: 700; font-size: 12px; max-width: 230px; overflow: hidden; white-space: nowrap; color: var(--text); }
.advisor-pill:hover { border-color: var(--accent); background: rgba(255,180,70,.12); }
.advisor-pill.alert { border-color: var(--accent); }
.ap-dot { width: 10px; height: 10px; border-radius: 50%; background: #4fe08a; flex: 0 0 auto; }
.ap-dot.pulse { animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,90,90,.6); } 50% { box-shadow: 0 0 0 6px rgba(255,90,90,0); } }
#advisor-pill-text { text-overflow: ellipsis; overflow: hidden; }

/* Advisor modal */
.adv-list { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow: auto; }
.adv { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.03); }
.adv-badge { flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: .05em; color: #12202f; padding: 4px 8px; border-radius: 6px; margin-top: 2px; }
.adv-title { font-weight: 700; }
.adv-tip { font-size: 12px; color: var(--muted); margin-top: 2px; }
.adv-crit { border-color: rgba(255,90,90,.4); }
.adv-warn { border-color: rgba(255,179,71,.4); }
.adv-good { border-color: rgba(79,224,138,.4); }

/* Needs breakdown in info panel */
.needs-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin: 12px 0 6px; text-align: left; }
.needs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; text-align: left; }
.need { font-size: 12px; display: flex; align-items: center; gap: 5px; color: #c3d2e8; }
.need .nk { width: 15px; height: 15px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; }
.need.ok .nk { background: rgba(79,224,138,.22); color: #4fe08a; }
.need.bad .nk { background: rgba(255,90,90,.22); color: #ff7a7a; }
.need.bad { color: #ffb0b0; }
.fix-box { margin-top: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255,179,71,.12); border: 1px solid rgba(255,179,71,.35); font-size: 12px; text-align: left; color: #ffe0b0; }
.fix-box.good { background: rgba(79,224,138,.12); border-color: rgba(79,224,138,.35); color: #bff0d2; }

/* ---------- Map buttons: rotate + music mute (bottom-right) ---------- */
#map-btns {
  position: absolute;
  bottom: 44px;
  right: 14px;
  display: flex;
  gap: 6px;
  pointer-events: auto;
  z-index: 25;
}
#map-btns button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--stroke-2);
  background: rgba(10, 18, 32, 0.82);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  transition: background .15s, border-color .15s;
}
#map-btns button:hover {
  background: rgba(90, 160, 255, 0.18);
  border-color: var(--blue);
}
#map-btns button.muted {
  color: var(--muted);
  border-color: var(--stroke);
}
