/* Arcline — the city screen. Dark sci-fi panels with neon accents; desktop first, phone fully playable (360 px).
   Top bar = only what is always there (lessons rule 14); the row below holds meters and alerts. */
:root {
  --bg: #0a0e18; --panel: rgba(14, 20, 32, 0.9); --panel2: rgba(22, 30, 46, 0.95); --line: rgba(120, 170, 220, 0.22);
  --text: #e3ecf5; --dim: #93a4b8; --cyan: #3ff0ff; --mag: #ff4fd8; --amber: #ffb02e; --good: #6bf09a; --bad: #ff6a5a;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.4 var(--font); overflow: hidden; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
button { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; min-height: 40px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: rgba(63, 240, 255, 0.55); }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
button.primary { background: linear-gradient(180deg, #19c6d6, #0f8ea0); color: #031418; border-color: transparent; font-weight: 700; }
button.danger { border-color: rgba(255, 106, 90, 0.6); color: #ffc2ba; }
button.small { min-height: 32px; padding: 3px 10px; font-size: 13px; }
button:disabled { opacity: .45; cursor: default; }
#app { position: fixed; inset: 0; }
.city { position: absolute; inset: 0; }
.city[hidden] { display: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#map.building { cursor: crosshair; }

/* ---------- top bar ---------- */
.ac-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: stretch; gap: 6px; padding: calc(6px + var(--safe-t)) calc(8px + var(--safe-r)) 6px calc(8px + var(--safe-l));
  background: linear-gradient(180deg, rgba(6, 9, 16, 0.92), rgba(6, 9, 16, 0.75)); border-bottom: 1px solid var(--line); z-index: 5; }
.ac-top > * { flex: none; }
.ac-menubtn { width: 44px; font-size: 20px; padding: 0; }
.ac-money, .ac-people, .ac-date { display: flex; flex-direction: column; justify-content: center; text-align: left; padding: 2px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.ac-money { cursor: pointer; }
.ac-top .lbl { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.ac-top b { font-size: 16px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ac-top small { font-size: 12px; color: var(--dim); }
.ac-top small.good { color: var(--good); } .ac-top small.bad { color: var(--bad); }
.ac-date { flex: 1 1 auto; overflow: hidden; } .ac-date b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.ac-date .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: inline-flex; gap: 3px; align-items: center; }
.ac-speed button { min-width: 40px; padding: 0 6px; }
.seg button.on { border-color: var(--cyan); color: var(--cyan); background: rgba(63, 240, 255, 0.1); }

/* ---------- row 2 ---------- */
.ac-row2 { position: absolute; top: calc(64px + var(--safe-t)); left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; z-index: 4; pointer-events: none; }
.ac-row2 > * { pointer-events: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; font-size: 13px; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.ac-demand { gap: 4px; padding: 3px 8px; }
.dm { position: relative; width: 18px; height: 28px; background: rgba(255, 255, 255, 0.06); border-radius: 4px; overflow: hidden; }
.dm i { position: absolute; left: 2px; right: 2px; border-radius: 2px; }
.dm.r i { background: #56d678; } .dm.c i { background: #50a0ff; } .dm.i i { background: #ffbe46; }
.dm i.down { opacity: .35; }
.dm em { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font: 700 12px/1 var(--font); color: rgba(255, 255, 255, 0.8); font-style: normal; }
.ac-chip .gly { width: 14px; height: 14px; color: var(--amber); }
#h-water .gly { color: #4ab0ff; }
.ac-chip.bad { border-color: rgba(255, 106, 90, 0.7); color: #ffc2ba; }
.ac-mile { flex-direction: column; align-items: stretch !important; gap: 2px !important; min-width: 170px; }
.ac-mile span { font-size: 12px; color: var(--dim); }
.ac-mile .bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ac-mile .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--mag)); border-radius: 3px; transition: width .4s; }
.ac-stock { color: var(--dim); }
.ac-alert { background: rgba(80, 20, 16, 0.92) !important; border-color: rgba(255, 106, 90, 0.7) !important; color: #ffd6cf; font-weight: 600; }

/* ---------- ships strip ---------- */
.ac-sky { position: absolute; top: calc(108px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 4; max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
.ac-sky:empty { display: none; }

/* ---------- tool bar + tray ---------- */
.ac-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 8px calc(8px + var(--safe-r)) calc(8px + var(--safe-b)) calc(8px + var(--safe-l)); background: linear-gradient(0deg, rgba(6, 9, 16, 0.94), rgba(6, 9, 16, 0.78)); border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; z-index: 5; }
.ac-group { flex: none; min-height: 44px; }
.ac-group.on { border-color: var(--cyan); color: var(--cyan); }
.ac-tray { position: absolute; left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); bottom: calc(68px + var(--safe-b)); display: flex; gap: 8px; padding: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; z-index: 6; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.ac-tray[hidden] { display: none; }
.ac-tcard { flex: none; width: 128px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border-radius: 12px; text-align: center; }
.ac-tcard .thumb { width: 96px; height: 72px; }
.ac-tcard .nm { font-size: 13px; font-weight: 600; line-height: 1.2; }
.ac-tcard .pr { font-size: 12px; color: var(--amber); }
.ac-tcard.locked { opacity: .5; } .ac-tcard.locked .pr { color: var(--dim); }
.ac-toolchip { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(68px + var(--safe-b)); display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; background: var(--panel2); border: 1px solid var(--cyan); border-radius: 22px; z-index: 6; max-width: calc(100% - 16px); font-size: 14px; }
.ac-toolchip[hidden] { display: none; }
.ac-toolchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-overlays { position: absolute; right: calc(8px + var(--safe-r)); bottom: calc(68px + var(--safe-b)); z-index: 4; flex-direction: column; align-items: stretch; }
.ac-overlays button { min-height: 34px; font-size: 13px; background: var(--panel); }
.ac-tray:not([hidden]) ~ .ac-overlays { display: none; }

/* ---------- info panel ---------- */
.ac-info { position: absolute; left: calc(8px + var(--safe-l)); top: var(--hud-bottom, calc(110px + var(--safe-t))); width: min(300px, calc(100% - 16px)); background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; z-index: 6; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.ac-info[hidden] { display: none; }
.ac-info h3 { margin: 0 0 4px; font-size: 17px; color: var(--cyan); }
.ac-info .dim { color: var(--dim); font-size: 13px; margin: 0 0 8px; }
.ac-info dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 0 10px; font-size: 14px; }
.ac-info dt { color: var(--dim); } .ac-info dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ac-info .row { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- sheets, toasts, banner ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(4, 6, 12, 0.6); display: flex; align-items: safe center; justify-content: center; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); overflow-y: auto; z-index: 50; }
.ac-modal, .gr-modal { width: min(460px, 100%); background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; margin: auto 0; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.ac-modal h2, .gr-modal h2 { margin: 0 0 4px; font-size: 21px; color: var(--cyan); letter-spacing: .02em; }
.ac-modal h3, .gr-modal h3 { margin: 10px 0 2px; font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.ac-modal > button, .gr-modal > button { width: 100%; }
.ac-modal .dim, .gr-modal .dim { color: var(--dim); font-size: 13px; margin: 0; }
.bud .taxrow { display: grid; grid-template-columns: 1fr 1.3fr 52px; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.bud .taxrow input { width: 100%; accent-color: var(--cyan); }
.bud .taxrow b { text-align: right; font-variant-numeric: tabular-nums; }
.bud .bl { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); }
.bud .bl b { font-variant-numeric: tabular-nums; }
.bud .total { border-bottom: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; font-weight: 700; }
.bud .good b { color: var(--good); } .bud .bad b, .bud p.bad { color: var(--bad); }
#toasts { position: fixed; top: calc(112px + var(--safe-t)); right: calc(10px + var(--safe-r)); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; z-index: 60; pointer-events: none; max-width: calc(100% - 20px); }
.toast { background: var(--panel2); border: 1px solid var(--line); padding: 8px 12px; border-radius: 10px; font-size: 14px; animation: rise .25s; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); }
.toast.good { border-color: rgba(107, 240, 154, 0.55); } .toast.bad { border-color: rgba(255, 106, 90, 0.6); }
.banner { position: fixed; top: 26%; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; width: max-content; max-width: 92vw; z-index: 40; animation: rise .35s; }
.banner.hidden { display: none; }
.banner h2 { margin: 0; font-size: clamp(28px, 7vw, 48px); color: var(--cyan); text-shadow: 0 0 18px rgba(63, 240, 255, 0.55), 0 3px 0 #04121a; letter-spacing: .04em; }
.banner p { margin: 6px 0 0; font-size: 17px; text-shadow: 0 1px 6px #000; }
@keyframes rise { from { opacity: 0; transform: translate(var(--tx, 0), 8px); } to { opacity: 1; transform: translate(var(--tx, 0), 0); } }
.banner { --tx: -50%; }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .ac-top { gap: 4px; }
  .ac-date { display: none; }
  .ac-money, .ac-people { padding: 2px 8px; }
  .ac-top b { font-size: 15px; }
  .ac-speed button { min-width: 36px; }
  .ac-speed [data-speed="2"] { display: none; }
  .ac-mile { min-width: 130px; flex: 1; }
  .ac-stock { display: none !important; }
  .ac-overlays { flex-direction: row; bottom: calc(64px + var(--safe-b)); right: 8px; left: 8px; overflow-x: auto; }
  .ac-info { top: auto; bottom: calc(112px + var(--safe-b)); }
}

/* ---------- getting started ---------- */
.ac-guide { position: absolute; right: calc(8px + var(--safe-r)); top: var(--hud-bottom, calc(110px + var(--safe-t))); width: min(300px, calc(100% - 16px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; z-index: 4; font-size: 13.5px; }
.ac-guide header { display: flex; align-items: center; gap: 8px; }
.ac-guide header b { flex: 1; color: var(--cyan); }
.ac-guide header .dim { color: var(--dim); font-size: 12px; }
.ac-guide ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.ac-guide li { color: var(--dim); }
.ac-guide li.ok { color: var(--good); text-decoration: line-through; text-decoration-color: rgba(107, 240, 154, 0.5); }
.ac-guide li.next { color: var(--text); font-weight: 600; }
.ac-guide p { margin: 6px 0 0; }
.ac-guide ol + .nextline { display: none; }
@media (max-width: 640px) { .ac-guide { top: auto; bottom: calc(118px + var(--safe-b)); left: 8px; right: auto; width: calc(100% - 16px); } .ac-guide ol { display: none; } .ac-guide ol + .nextline { display: block; } }

/* ---------- ships overhead + strikes ---------- */
.ac-ship { display: grid; grid-template-columns: auto; gap: 1px; min-width: 150px; text-align: left; padding: 6px 10px; border-radius: 12px; background: var(--panel2); }
.ac-ship .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.ac-ship b { font-size: 14px; white-space: nowrap; }
.ac-ship .bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; margin-top: 3px; }
.ac-ship .bar i { display: block; height: 100%; background: var(--cyan); }
.ac-ship.settlers { border-color: rgba(107, 240, 154, 0.6); } .ac-ship.settlers .bar i { background: var(--good); }
.ac-ship.warship { border-color: rgba(255, 106, 90, 0.6); } .ac-ship.warship .bar i { background: var(--bad); }
.ac-ship.merchant { border-color: rgba(255, 176, 46, 0.6); } .ac-ship.merchant .bar i { background: var(--amber); }
.ac-row2 .ac-strikebtn { pointer-events: auto; background: #2a1408; border-color: #ff9a3a; color: #ffd6a0; font-weight: 600; min-height: 32px; }
.ac-row2 .ac-strikebtn.ready { box-shadow: 0 0 12px rgba(255, 154, 58, 0.55); }
.shiplines { margin: 0; padding-left: 18px; color: var(--text); font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.ac-modal button small, .gr-modal button small { display: block; font-size: 12px; font-weight: 400; opacity: .85; }
.ac-modal button small.why { color: #ffc2ba; }

#screens { position: absolute; inset: 0; z-index: 2; }
#screens:empty { display: none; }
.ac-overlays button { white-space: nowrap; }
/* the guide steps aside while the build tray or the info panel is open */
.ac-tray:not([hidden]) ~ .ac-guide, .ac-info:not([hidden]) ~ .ac-guide { display: none; }

/* ---------- comms panel (ui/comms.js) ---------- */
.ac-row2 .ac-commsbtn { pointer-events: auto; min-height: 32px; font-weight: 600; color: var(--cyan); }
.ac-commsbtn b { background: var(--cyan); color: #031418; border-radius: 9px; min-width: 18px; padding: 0 5px; font-size: 12px; line-height: 18px; text-align: center; }
.ac-modal.cm-sheet { width: min(520px, 100%); }
.cm-status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(63, 240, 255, 0.06); border: 1px solid var(--line); }
.cm-status b { display: block; font-size: 15px; } .cm-status small { color: var(--dim); font-size: 13px; }
.cm-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.cm-status.on .cm-dot { background: var(--good); box-shadow: 0 0 10px var(--good); }
.cm-empty { padding: 4px 0; }
.cm-ship { border: 1px solid var(--line); border-left: 4px solid var(--cyan); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: rgba(255, 255, 255, 0.025); }
.cm-ship.settlers { border-left-color: var(--good); } .cm-ship.warship { border-left-color: var(--bad); } .cm-ship.merchant { border-left-color: var(--amber); }
.cm-ship header { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; }
.cm-ship header b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-ship header small { color: var(--dim); font-size: 12px; white-space: nowrap; }
.cm-ship p { margin: 0; font-size: 14px; }
.cm-kind { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.cm-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.cm-bar i { display: block; height: 100%; background: var(--cyan); }
.cm-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-acts button { flex: 1 1 140px; text-align: left; }
.cm-times { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cm-times li { display: grid; grid-template-columns: 62px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.cm-times li .cm-kind { grid-row: span 2; align-self: center; }
.cm-times li.merchant .cm-kind { color: var(--amber); } .cm-times li.warship .cm-kind { color: #ff9a8e; }
.cm-times li b { font-size: 14px; } .cm-times li small { grid-column: 2 / 4; color: var(--dim); font-size: 12px; }
.cm-when { color: var(--cyan); font-size: 13px; font-variant-numeric: tabular-nums; }
.cm-reqs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cm-req { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.cm-req.merchant { border-color: rgba(255, 176, 46, 0.5); } .cm-req.warship { border-color: rgba(255, 106, 90, 0.5); }
.cm-line { margin: 0; font-size: 14px; }
.cm-hist { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.cm-hist li { display: flex; justify-content: space-between; gap: 8px; } .cm-hist small { color: var(--dim); font-size: 12px; }
@media (max-width: 480px) { .cm-reqs { grid-template-columns: 1fr; } .cm-ship header { grid-template-columns: 1fr auto; } .cm-ship header .cm-kind { grid-column: 1 / 3; } }
/* info panel: move + comms */
.ac-info .row.wide > button { flex: 1; }
.ac-movebtn { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.ac-movebtn small { font-size: 12px; color: var(--good); font-variant-numeric: tabular-nums; }
/* a chosen tool's chip sits where the phone's map views row is: lift the views above it */
@media (max-width: 640px) { .ac-toolchip:not([hidden]) ~ .ac-overlays { bottom: calc(114px + var(--safe-b)); } .ac-toolchip:not([hidden]) ~ .ac-guide { bottom: calc(164px + var(--safe-b)); } }
/* the tool bar's text wraps instead of running off a phone screen (walk 2026-11-16: "Move Colony Core · free · …") */
.ac-toolchip span { min-width: 0; flex: 1 1 auto; white-space: normal; line-height: 1.25; }
@media (max-width: 640px) { .ac-toolchip { width: calc(100% - 16px); border-radius: 16px; font-size: 13px; } }

/* ---------- pay day bar, utility warnings, pill sheets, level up (owner reports #79 #80 #84, 2026-11-16) ---------- */
/* the day's progress to the next pay day: under the date; on a phone (no date) a hairline along the Credits pill */
.ac-daybar { display: block; height: 4px; margin-top: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ac-daybar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--good), var(--cyan)); border-radius: 2px; }
.ac-money { position: relative; }
.ac-daybar.phone { display: none; }
@media (max-width: 640px) { .ac-daybar.phone { display: block; position: absolute; left: 8px; right: 8px; bottom: 2px; height: 3px; margin: 0; } }
/* the second row's pills are buttons now: same look, a pointer, and a state colour */
.ac-row2 button.ac-demand, .ac-row2 button.ac-chip { color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.ac-row2 button.ac-demand:hover, .ac-row2 button.ac-chip:hover { border-color: rgba(63, 240, 255, 0.55); }
.ac-chip.near { border-color: rgba(255, 176, 46, 0.85); color: #ffd590; background: rgba(60, 38, 8, 0.92); }
.ac-chip.near .gly { color: #ffd590; }
.ac-chip.bad { background: rgba(70, 18, 16, 0.92); animation: ac-pulse 1.6s ease-in-out infinite; }
.ac-chip.bad .gly { color: #ff8d80; }
@keyframes ac-pulse { 50% { box-shadow: 0 0 0 3px rgba(255, 106, 90, 0.35); } }
@media (prefers-reduced-motion: reduce) { .ac-chip.bad { animation: none; } }
.ac-util-head { margin: 0; font-size: 15px; font-weight: 600; }
.ac-util.lv-near .ac-util-head { color: #ffd590; } .ac-util.lv-over .ac-util-head { color: #ffb0a6; } .ac-util.lv-ok .ac-util-head { color: var(--good); }
.ac-meter .bar, .ac-dem .bar, .ac-level .bar { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; position: relative; }
.ac-meter .bar i { display: block; height: 100%; border-radius: 5px; background: var(--good); }
.ac-util.lv-near .ac-meter .bar i { background: var(--amber); } .ac-util.lv-over .ac-meter .bar i { background: var(--bad); }
.ac-meter .nums { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ac-util .row { display: flex; gap: 8px; flex-wrap: wrap; } .ac-util .row > button { flex: 1 1 140px; }
.ac-dem { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.ac-dem .hd { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.ac-dem .hd span { font-size: 13px; color: var(--dim); } .ac-dem .hd span.up { color: var(--good); } .ac-dem .hd span.down { color: #ffb0a6; }
.ac-dem .bar.two::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.35); }
.ac-dem .bar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.ac-dem.r .bar i { background: #56d678; } .ac-dem.c .bar i { background: #50a0ff; } .ac-dem.i .bar i { background: #ffbe46; }
.ac-dem small { font-size: 13px; color: var(--dim); }
.ac-dem ul, .ac-level ul { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.ac-level { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); display: flex; flex-direction: column; gap: 6px; }
.ac-level .hd { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--dim); }
.ac-level .hd b { color: var(--text); font-variant-numeric: tabular-nums; }
.ac-level .bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--cyan), var(--good)); }
.ac-level li.ok { color: var(--good); } .ac-level li.no { color: var(--text); }
.ac-level p.ok { margin: 0; font-size: 13px; color: var(--good); }
.ac-level.ready { border-color: rgba(107, 240, 154, 0.45); }
.ac-info { max-height: calc(100vh - var(--hud-bottom, 120px) - 130px); overflow-y: auto; }
/* the panel's buttons stay in reach while its middle scrolls */
.ac-info > .row:last-child { position: sticky; bottom: -12px; margin: 0 -14px -12px; padding: 8px 14px 12px; background: var(--panel2); border-radius: 0 0 14px 14px; }
/* phones: short words, only what's still missing (as chips), and no scrolling box (nothing hidden under the views row) */
.ac-level .s { display: none; }
@media (max-width: 640px) {
  .ac-info { max-height: none; overflow: visible; }
  .ac-level .l { display: none; } .ac-level .s { display: inline; }
  .ac-level ul { flex-direction: row; flex-wrap: wrap; padding: 0; list-style: none; gap: 4px; }
  .ac-level li { padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); }
  .ac-level li.ok { display: none; }
}

/* phones: Credits and People may shrink; their small second line is cut short (the tooltip has it in full) so the
   speed buttons never run off a 360-390 px screen with big numbers (2026-11-17) */
@media (max-width: 480px) {
  .ac-top .ac-money, .ac-top .ac-people { flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .ac-top .ac-money small, .ac-top .ac-people small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}

/* a tappable alert (attack incoming): small and brief, not a banner (owner 2026-11-17) */
.ac-alert.go { cursor: pointer; pointer-events: auto; }
.ac-alert.go:hover, .ac-alert.go:focus-visible { border-color: #ffb3a8 !important; outline: none; }
