#shipDesignModal { width:min(1100px,calc(100vw - 32px)); max-width:none; height:min(760px,calc(100dvh - 32px)); max-height:none; padding:0; color:var(--ink,#e3f4ff); background:#071522; border:1px solid #38627b; box-shadow:0 24px 90px #000b; }
#shipDesignModal::backdrop { background:#020911d9; }
#shipDesignModal[open] { display:flex; flex-direction:column; }
.design-heading { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #28516e; flex:none; }
.design-heading h2 { margin:0; font-size:1.4rem; }
.design-heading button { font-size:1.2rem; }
.design-class-bar { display:flex; flex-wrap:wrap; align-items:end; gap:10px; padding:12px 20px; border-bottom:1px solid #28516e; flex:none; }
.design-class-field { flex:1 1 180px; min-width:0; }
.design-name-field { flex:2 1 220px; }
.design-class-field label { display:block; margin-bottom:5px; font-size:12px; }
.design-class-field input,.design-class-field select { box-sizing:border-box; width:100%; min-height:42px; padding:8px; border:1px solid #38627b; background:#071522; color:#e3f4ff; font:inherit; }
#designClassStatus,.design-storage-note { flex-basis:100%; margin:0; font-size:11px; color:#9ab4c8; overflow-wrap:anywhere; }
#designClassStatus { color:#65e3ec; }
.design-body { display:grid; grid-template-columns:150px minmax(0,1fr); flex:1; min-height:0; }
.design-systems { display:block; width:150px; min-width:0; box-sizing:border-box; padding:12px 10px; border-right:1px solid #28516e; overflow-y:auto; background:#0b1e2d; }
.design-systems label,.design-systems h3 { display:block; font-size:12px; margin:0 0 8px; }
.design-systems select { box-sizing:border-box; width:100%; background:#071522; color:#e3f4ff; border:1px solid #38627b; padding:8px 3px; margin-bottom:18px; }
.design-palette { display:grid; gap:8px; }
.design-system { display:flex; align-items:center; gap:7px; width:100%; padding:6px 3px; border:1px solid #28516e; background:#10283b; color:#e3f4ff; text-align:left; cursor:grab; font:inherit; font-size:11px; }
.design-system small { display:block; color:#9ab4c8; margin-top:3px; }
.design-symbol { display:grid; place-items:center; flex:none; font-size:21px; width:28px; color:#65e3ec; }
.design-system:disabled { opacity:.4; cursor:not-allowed; }
.design-workspace { display:flex; flex-direction:column; min-width:0; min-height:0; }
.design-summary { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; padding:16px; border-bottom:1px solid #203d50; font-size:13px; }
.design-summary strong { color:#65e3ec; }
.design-capacity { margin-left:auto; font-variant-numeric:tabular-nums; }
.design-drop { position:relative; flex:1; min-height:120px; overflow:auto; padding:16px; background:radial-gradient(ellipse at center,#102b3b 0,#071522 75%); }
.design-drop.drag-over { box-shadow:inset 0 0 0 2px #65e3ec; }
.design-grid { display:grid; grid-template-columns:repeat(20,38px); grid-auto-rows:38px; gap:5px; width:855px; align-content:start; }
.design-grid.system-drop-preview { position:relative; }
.design-insert-marker { position:absolute; z-index:5; width:4px; height:42px; border-radius:3px; background:#73e9f3; box-shadow:0 0 8px #73e9f3,0 0 14px #73e9f388; pointer-events:none; }
.design-insert-marker::before { content:''; position:absolute; left:-4px; top:-4px; border-left:6px solid transparent; border-right:6px solid transparent; border-top:7px solid #73e9f3; }
.design-installed { box-sizing:border-box; width:38px; height:38px; padding:0; display:grid; place-items:center; border:1px solid #41778b; background:#143647; color:#8ef5fa; font-size:23px; cursor:pointer; }
.design-installed:hover { border-color:#ff9ba5; color:#ff9ba5; }
.design-empty { position:sticky; left:0; max-width:100%; margin:60px 0; text-align:center; color:#9ab4c8; font-size:14px; }
.design-empty[hidden] { display:none; }
.design-footer { min-height:44px; padding:10px 16px; border-top:1px solid #203d50; font-size:12px; color:#9ab4c8; }
.design-footer p { margin:0; line-height:1.5; }
.design-error { color:#ffb08f; }
#shipDesignModal :focus-visible { outline:2px solid #65e3ec; outline-offset:2px; }
.design-symbol img { width:28px; height:28px; display:block; pointer-events:none; }.design-installed img { width:36px; height:36px; display:block; pointer-events:none; }

.design-category h4 { margin:4px 0 7px; padding-bottom:5px; border-bottom:1px solid #38627b; color:#73e9f3; font-size:12px; }
.design-category-items { display:grid; gap:8px; }
.design-palette { gap:18px; }
.design-hull-label { display:block; font-size:12px; margin-bottom:8px; }
.design-hull-picker { margin-bottom:18px; }
#designShipType { display:flex; align-items:center; justify-content:space-between; gap:3px; width:100%; padding:7px 4px; border:1px solid #38627b; background:#071522; color:#e3f4ff; cursor:pointer; font:inherit; font-size:11px; text-align:left; }
.design-hull-selected,#designHullOptions [role=option],#designTypeLabel { display:flex; align-items:center; gap:5px; min-width:0; }
.design-hull-selected img,#designHullOptions img,#designTypeLabel img { width:32px; height:32px; flex:none; }
.design-hull-selected small,#designHullOptions small,#designTypeLabel small { display:block; color:#9ab4c8; margin-top:3px; }
#designHullOptions { max-height:310px; overflow-y:auto; border:1px solid #38627b; background:#071522; margin-top:4px; }
#designHullOptions[hidden] { display:none; }
#designHullOptions [role=option] { width:100%; min-height:49px; padding:6px 4px; border:0; border-bottom:1px solid #203d50; background:transparent; color:#e3f4ff; font:inherit; font-size:11px; text-align:left; cursor:pointer; }
#designHullOptions [aria-selected=true] { background:#184153; }
#designHullOptions [role=option]:hover,#designHullOptions [role=option]:focus { background:#20556b; outline-offset:-2px; }

.design-installed[draggable=true] { cursor:grab; }
.design-installed.design-dragging { opacity:.45; cursor:grabbing; }

.design-installed,.design-system,#designShipType,#designHullOptions,#designHullOptions [role=option] { border-radius:7px; }
#shipDesignModal img,.design-symbol { border-radius:5px; }
.design-installed.design-dragging { opacity:1; border:2px dashed #73e9f3; background:#14364780; }
.design-installed.design-dragging img { opacity:.15; }

/* Flak fire is a short-lived stream of bright white particles across the tactical board. */
.flak-particle { position:absolute; z-index:7; width:2px; height:2px; border-radius:50%; background:#fff; box-shadow:0 0 3px #fff,0 0 6px #dcecff; pointer-events:none; }

/* The Command Console reuses the class assets for the selected ship. */
.systems { grid-template-columns:repeat(auto-fill,38px); gap:5px; margin-top:7px; }
.system.system-icon { box-sizing:border-box; width:38px; min-height:38px; height:38px; display:grid; place-items:center; padding:0; border:1px solid #25425a; border-radius:7px; background:#071522; color:#a5ffcf; appearance:none; -webkit-appearance:none; cursor:help; }
.system.system-icon { position:relative; }
.constructor-build-countdown { position:absolute; right:2px; bottom:1px; min-width:13px; padding:0 2px; border-radius:3px; background:#ffe45c; color:#241d00; font-size:9px; font-weight:800; line-height:13px; text-align:center; }
.fighter-squadron-count { position:absolute; right:2px; bottom:1px; min-width:13px; padding:0 2px; border-radius:3px; background:#071522; color:#66f4ff; border:1px solid #4b9caf; font-size:9px; font-weight:800; line-height:13px; text-align:center; }
.fighter-squadron-count.launched { background:#541622; color:#ff6879; border-color:#ff5063; }
.squadron-action-icon { width:30px; height:30px; object-fit:contain; vertical-align:middle; margin-right:6px; }
.system.system-icon.damaged { color:#ffd36e; border-color:#7a6330; background:#2b220d; }
.system.system-icon.construction-locked { color:#ff6474; border-color:#8d2f42; background:#35101a; cursor:not-allowed; }
.system.system-icon.destroyed { color:#ff6474; border-color:#8d2f42; background:repeating-linear-gradient(135deg,#281019 0 5px,#40151f 5px 10px); }
.system.system-icon.fired { color:#ffe45c; border-color:#a88a1f; background:#3b310d; opacity:.82; cursor:not-allowed; box-shadow:inset 0 0 8px #ffe45c22; }
.system.system-icon.building { color:#ffe45c; border-color:#b9951e; background:#4a3b0b; opacity:.92; cursor:not-allowed; box-shadow:inset 0 0 8px #ffe45c33; }
.system.system-icon.faction-concord:not(.damaged):not(.destroyed):not(.fired):not(.building) { color:#66f4ff; border-color:#4b9caf; }
.system-icon-art { width:30px; height:30px; display:grid; place-items:center; }

/* The active ship's current impulse range.  Content remains above the tint. */
.grid .cell.impulse-reachable::after { content:''; position:absolute; inset:0; z-index:1; pointer-events:none; background:rgba(255,224,75,.14); box-shadow:inset 0 0 10px rgba(255,224,75,.16); }
.grid .cell.impulse-reachable > * { position:relative; z-index:2; }
.system-icon-art img { display:block; width:30px; height:30px; }
.system.system-icon.damaged .system-icon-art img { filter:grayscale(1) sepia(1) saturate(4) hue-rotate(355deg) brightness(.95); }
.system.system-icon.construction-locked .system-icon-art img { filter:grayscale(1) sepia(1) saturate(6) hue-rotate(315deg) brightness(.9); }
.system.system-icon.destroyed .system-icon-art img { filter:grayscale(1) sepia(1) saturate(6) hue-rotate(315deg) brightness(.82); }
.system.system-icon.fired .system-icon-art img { filter:grayscale(1) brightness(.62); }
.system.system-icon.building .system-icon-art img { filter:sepia(1) saturate(4) hue-rotate(355deg) brightness(1.08); }
.system.system-icon:hover,.system.system-icon:focus { border-color:#73e9f3; background:#1a455d; box-shadow:0 0 12px #73e9f355; outline:none; }
.system.system-icon.system-selectable { cursor:pointer; }
.system.system-icon.system-fighter-assign-active { color:#fff!important; border-color:#71ff8a!important; background:#17652a!important; box-shadow:0 0 14px #46ff6a!important; }
.build-preview-systems-label { margin-top:14px; color:#9ab4c8; font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.build-preview-systems { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.build-preview-system { flex:0 0 38px; }
.command-actions { grid-template-columns:1fr 1fr; margin-top:9px; }
.command-actions .btn { grid-column:auto!important; }
.command-actions [data-cmd="next-turn"].primary { background:#1a4a63; border-color:#4f9abc; color:#dffaff; }
.command-actions [data-cmd="next-turn"].primary:hover { background:#235c78; border-color:#73e9f3; }
.command-passive { display:grid; grid-template-columns:repeat(auto-fill,38px); justify-content:start; gap:5px; margin-top:6px; }
.command-passive .btn { grid-column:auto!important; width:38px; min-width:38px; height:38px; min-height:38px; padding:4px; border-radius:7px; display:grid; place-items:center; }
.command-passive .scan-command { min-height:38px; }
.scan-command-icon { display:grid; place-items:center; width:30px; height:30px; box-sizing:border-box; object-fit:contain; }
.scan-command-icon.scan-star { color:#fff2ad; font-size:30px; line-height:1; filter:drop-shadow(0 0 5px #ffd95c); }
.scan-command-icon.radiation-icon { font-size:30px; line-height:1; }
.scan-command-icon.passive-glyph { font-size:30px; line-height:1; }
.scan-command-icon.scan-meteor { filter:grayscale(1) brightness(1.25) drop-shadow(0 0 3px #8c9baa); }
.system-rollover { position:fixed; z-index:100; width:260px; box-sizing:border-box; padding:12px; border:1px solid #73e9f3; background:#071522; color:#e3f4ff; box-shadow:0 10px 28px #000b; pointer-events:none; }
.system-rollover[hidden] { display:none; }
.system-rollover header { display:flex; gap:9px; align-items:center; padding-bottom:9px; border-bottom:1px solid #28516e; }
.system-rollover-icon { width:32px; height:32px; display:grid; place-items:center; flex:none; }
.system-rollover-icon img { width:32px; height:32px; display:block; }
.system-rollover h3 { margin:0; font-size:14px; color:#8ef5fa; }.system-rollover p { margin:2px 0 0; font-size:11px; color:#9ab4c8; }
.system-rollover dl { margin:9px 0 0; display:grid; gap:5px; }.system-rollover dl div { display:grid; grid-template-columns:82px 1fr; gap:7px; font-size:11px; }.system-rollover dt { color:#9ab4c8; }.system-rollover dd { margin:0; color:#e3f4ff; }.system-rollover-special { border-top:1px solid #28516e; padding-top:8px; line-height:1.3; }
.system-rollover-construction { border-top:1px solid #b9951e; padding-top:8px; color:#ffe45c !important; font-weight:700; }

/* Scourge tactical rollovers show each installed system with its icon and damage color. */
.asset-system-status { display:grid; grid-template-columns:repeat(auto-fill,38px); gap:5px; margin:9px 0 0; }
.asset-system-status-item { box-sizing:border-box; display:grid; place-items:center; width:38px; height:38px; padding:3px; border:1px solid #25425a; border-radius:7px; background:#071522; color:#a5ffcf; }
.asset-system-status-icon { width:30px; height:30px; display:grid; place-items:center; }
.asset-system-status-icon img { display:block; width:30px; height:30px; object-fit:contain; }
.asset-system-status-item.damaged { color:#ffd36e; border-color:#7a6330; background:#2b220d; }
.asset-system-status-item.destroyed { color:#ff6474; border-color:#8d2f42; background:repeating-linear-gradient(135deg,#281019 0 5px,#40151f 5px 10px); }
.asset-system-status-item.scourge-system-status.ok { color:#ff6474; border-color:#7d3341; }
.asset-system-status-item.scourge-system-status .asset-system-status-icon img { filter:brightness(1.12) saturate(1.2) drop-shadow(0 0 3px #ff5c6a); }
.asset-system-status-item.scourge-system-status.damaged .asset-system-status-icon img,.asset-system-status-item.scourge-system-status.destroyed .asset-system-status-icon img { filter:grayscale(1) sepia(1) saturate(4) hue-rotate(325deg) brightness(.85); }

/* Outposts use the same asset in tactical, strategic and mini-map views. */
.grid .ship-sprite.outpost, .grid .outpost-sprite { width:min(54.6%,21px)!important; height:min(54.6%,21px)!important; max-width:21px!important; max-height:21px!important; }
#galaxy .ship-sprite.outpost { width:min(43.68%,16.8px)!important; height:min(43.68%,16.8px)!important; max-width:16.8px!important; max-height:16.8px!important; }
.mini-marker .ship-sprite.outpost { width:7px!important; height:7px!important; max-width:7px!important; max-height:7px!important; }
.legend .legend-item:nth-child(4) .legend-icon { width:14px; height:14px; max-width:14px; max-height:14px; }

.design-heading { gap:16px; }
.design-heading h2 { flex:none; }
.design-header-controls { display:flex; flex:1; align-items:flex-end; gap:10px; min-width:0; }
.design-header-controls .design-saved-field { flex:1 1 200px; }
.design-header-controls .design-name-field { flex:1 1 240px; }
.design-header-controls button { flex:none; min-height:42px; white-space:nowrap; font-size:12px; }
#newShipClass { width:42px; padding:0; font-size:26px; line-height:1; }
.design-hull-toolbar { display:flex; align-items:center; gap:20px; padding:12px 20px; border-bottom:1px solid #28516e; flex:none; }
.design-hull-toolbar #designClassStatus { flex:1; }
.design-hull-field { position:relative; width:210px; flex:none; }
.design-hull-field .design-hull-picker { margin-bottom:0; }
.design-hull-field #designHullOptions { position:absolute; z-index:5; top:100%; left:0; right:0; box-shadow:0 8px 24px #0009; }
@media(max-width:900px) {
 .design-heading { flex-wrap:wrap; padding:12px; gap:12px; }
 .design-header-controls { order:3; flex-basis:100%; flex-wrap:wrap; }
 #closeShipDesign { margin-left:auto; }
 .design-header-controls .design-class-field { flex:1 1 180px; }
 .design-hull-toolbar { padding:12px; gap:12px; }
}

.design-totals { margin-left:auto; align-self:flex-start; display:flex; flex-direction:column; gap:8px; text-align:right; font-size:13px; flex:none; font-variant-numeric:tabular-nums; }
.design-totals strong { color:#65e3ec; }
@media(max-width:650px) {
 .design-hull-toolbar { flex-wrap:wrap; align-items:flex-start; }
 .design-hull-field { width:170px; }
 .design-hull-toolbar #designClassStatus { order:3; flex-basis:100%; }
 .design-hull-toolbar #designClassStatus:empty { display:none; }
 .design-totals { font-size:12px; }
}
.design-rollover { position:fixed; z-index:100; width:min(260px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; box-sizing:border-box; padding:10px; border:1px solid #477b91; border-radius:9px; background:#0b1e2e; color:#e3f4ff; box-shadow:0 10px 28px #000b; font-size:11px; line-height:1.35; }
.design-rollover[hidden] { display:none; }
.design-rollover header { display:flex; align-items:center; gap:8px; padding:0; margin:0 0 8px; border:0; background:none; }
.design-rollover h3 { margin:0 0 2px; font-size:14px; color:#effaff; }
.design-rollover header p { margin:0; color:#9ab4c8; font-size:11px; }
.rollover-icon { display:grid; place-items:center; width:36px; height:36px; flex:none; background:#143647; border:1px solid #38627b; border-radius:7px; }
.rollover-icon img { width:30px; height:30px; }
.rollover-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:12px; }
.rollover-stats > div { padding:9px 12px; border-radius:8px; background:#143044; }
.rollover-stats strong { display:block; font-size:20px; color:#73e9f3; }
.rollover-stats span { color:#acc3d4; font-size:11px; }
.design-rollover dl { margin:0; }
.design-rollover dl > div { display:flex; justify-content:space-between; gap:16px; padding:5px 0; border-bottom:1px solid #203b4e; }
.design-rollover dt { color:#9ab4c8; flex:none; }
.design-rollover dd { margin:0; text-align:right; }
.design-rollover section { margin:12px 0 0; padding:0; background:none; border:0; }
.design-rollover h4 { margin:0 0 6px; color:#73e9f3; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.design-rollover p { margin:0; }
.design-rollover .rollover-ability { padding:10px; background:#123448; border-left:2px solid #73e9f3; border-radius:5px; }
.design-rollover table { width:100%; border-collapse:collapse; font-size:11px; font-variant-numeric:tabular-nums; }
.design-rollover th,.design-rollover td { padding:5px 6px; text-align:right; border-bottom:1px solid #203b4e; }
.design-rollover th { color:#9ab4c8; font-weight:500; }
.design-rollover th:first-child,.design-rollover td:first-child { text-align:left; }
.design-rollover .rollover-damage { margin-top:12px; padding-top:10px; border-top:1px solid #38627b; color:#e9b49a; }
.rollover-damage strong { display:block; margin-bottom:3px; font-size:11px; }

.design-rollover.rollover-installed { pointer-events:none; }

.design-heading { position:relative; padding:12px 44px 12px 16px; gap:12px; }
.design-heading h2 { font-size:1.2rem; }
.design-header-controls { gap:8px; }
.design-header-controls label { font-size:10px; margin-bottom:4px; }
.design-header-controls input,.design-header-controls select { height:32px; min-height:32px; padding:5px 7px; font-size:12px; }
.design-header-controls button { min-height:32px; height:32px; padding:5px 10px; font-size:10px; }
#newShipClass { width:32px; height:32px; font-size:22px; padding:0; }
.danger-icon { width:32px; height:32px; padding:0; color:#ffb0a0; font-size:18px; line-height:1; }
.danger-icon:disabled { color:#758b99; opacity:.45; }
.danger { background:#8d3540; border-color:#ca6872; color:#fff; }
#deleteShipClassDialog,#unsavedShipClassDialog { position:absolute; z-index:200; inset:0; display:grid; place-items:center; padding:16px; box-sizing:border-box; background:#020911d9; }
#deleteShipClassDialog[hidden],#unsavedShipClassDialog[hidden] { display:none; }
#deleteShipClassDialog > div,#unsavedShipClassDialog > div { width:min(420px,100%); padding:22px; border:1px solid #7f4b56; border-radius:12px; background:#0b1e2e; color:#e3f4ff; box-shadow:0 24px 90px #000b; }
#deleteShipClassDialog h2,#unsavedShipClassDialog h2 { margin:0 0 10px; font-size:1.15rem; }
#deleteShipClassWarning,#unsavedShipClassWarning { margin:0 0 10px; color:#ffb0a0; font-size:15px; font-weight:600; }
.delete-class-note { margin:0; color:#b8cad5; font-size:13px; line-height:1.5; }
#deleteShipClassDialog > div > div,#unsavedShipClassDialog > div > div { display:flex; justify-content:flex-end; gap:9px; margin-top:20px; }
#closeShipDesign { position:absolute; top:6px; right:6px; width:26px; height:26px; min-height:0; padding:0; font-size:18px; line-height:1; display:grid; place-items:center; }
@media(max-width:900px) { .design-heading { padding:12px 16px; } .design-heading h2 { padding-right:28px; } }
.ship-sprite.fed { filter:drop-shadow(0 0 6px #66F4FF)!important; opacity:1!important; }
.ship-sprite.klingon,.mini-scourge .ship-sprite.klingon { filter:brightness(0) saturate(100%) invert(13%) sepia(100%) saturate(7190%) hue-rotate(2deg) brightness(190%) contrast(140%) drop-shadow(0 0 9px #ff1e36)!important; opacity:1!important; }
.legend .legend-icon.fed { filter:drop-shadow(0 0 4px #66F4FF)!important; opacity:1!important; }
.legend .legend-icon.klingon { filter:brightness(0) saturate(100%) invert(13%) sepia(100%) saturate(7190%) hue-rotate(2deg) brightness(190%) contrast(140%) drop-shadow(0 0 7px #ff1e36)!important; opacity:1!important; }

/* Keep the design grid inside the modal at every viewport width. At wide
   widths this still presents the normal 20-system row; on narrower screens
   the 38px cells wrap into additional rows instead of creating a horizontal
   scrollbar. */
.design-drop { overflow-x:hidden; }
.design-grid { width:100%; max-width:855px; grid-template-columns:repeat(auto-fill,38px); }
@media(max-width:900px) {
  .design-body { grid-template-columns:minmax(120px,150px) minmax(0,1fr); }
  .design-systems { width:auto; }
}

/* Stationary structures cannot install movement systems. */
#shipDesignModal.stationary-hull .design-category[data-category='Movement']{display:none}

.admin-defaults-toggle,.admin-default-save{font-size:10px;white-space:nowrap}.admin-defaults-toggle[aria-pressed='true']{border-color:#ffe04b;color:#ffe04b}.admin-mode .admin-default-save{display:inline-block}
.fighter-squadron-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px;padding-top:7px;border-top:1px solid #28516e}.fighter-squadron-action{width:38px;height:38px;padding:3px;display:grid;place-items:center;border:1px solid #28516e;border-radius:7px;background:#071522;color:#66f4ff;cursor:pointer}.fighter-squadron-action img{width:30px;height:30px;object-fit:contain;border-radius:6px}.fighter-squadron-action:hover,.fighter-squadron-action:focus{border-color:#73e9f3;background:#1a455d;box-shadow:0 0 12px #73e9f355;outline:none}.fighter-squadron-action:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.5)}.system.system-icon.system-fighter-selection-active{color:#fff!important;border-color:#71ff8a!important;background:#17652a!important;box-shadow:0 0 14px #46ff6a!important}

#adminKeyDialog{position:absolute;z-index:1000;inset:0;display:grid;place-items:center;padding:20px;box-sizing:border-box;background:#020911d9}
#adminKeyDialog[hidden]{display:none}
#adminKeyDialog>.modal-box{position:relative;width:min(420px,100%);margin:0;padding:30px;text-align:left;border:1px solid var(--cyan,#66f4ff);background:#081422;box-shadow:0 0 80px #2fcfff2c}
#adminKeyDialog h2{margin:8px 0;font-size:1.4rem}
#adminKeyDialog p{color:var(--muted,#9ab4c8);line-height:1.5}
#adminKeyDialog .move-form{margin-top:20px}
#adminKeyDialog .field{margin-bottom:15px}
#adminKeyDialog .form-actions{margin-top:20px}
.admin-key-close{position:absolute;top:8px;right:8px;width:24px;height:24px;min-height:24px;padding:0;font-size:17px;line-height:1;display:grid;place-items:center}
.admin-key-error{color:#ffb0a0!important;font-weight:600}
#adminKeyDialog #adminKeyInput{background:#03070c!important;color:#66f4ff!important;border:1px solid #66f4ff!important;border-radius:7px!important;box-shadow:inset 0 0 10px #000!important}
#adminKeyDialog #adminKeyInput:focus{outline:1px solid #b8fbff!important;outline-offset:1px;box-shadow:0 0 10px #2fcfff66,inset 0 0 10px #000!important}
#adminKeyDialog #adminKeyInput:-webkit-autofill,#adminKeyDialog #adminKeyInput:-webkit-autofill:hover,#adminKeyDialog #adminKeyInput:-webkit-autofill:focus{-webkit-text-fill-color:#66f4ff!important;-webkit-box-shadow:0 0 0 1000px #03070c inset!important;caret-color:#66f4ff!important;border:1px solid #66f4ff!important}
#adminKeyNotice{position:absolute;z-index:1001;inset:0;display:grid;place-items:center;padding:20px;box-sizing:border-box;background:#020911d9}
#adminKeyNotice[hidden]{display:none}
#adminKeyNotice>.modal-box{position:relative;width:min(420px,100%);margin:0;padding:30px;text-align:left;border:1px solid var(--cyan,#66f4ff);background:#081422;box-shadow:0 0 80px #2fcfff2c}
#adminKeyNotice h2{margin:8px 0;font-size:1.4rem}
#adminKeyNotice p{color:var(--muted,#9ab4c8);line-height:1.5}
#adminKeyNotice .form-actions{margin-top:20px}

/* The tactical map is a report-only surface while the next game turn resolves. */
.tactical-board.interturn-locked .tactical-grid { filter:grayscale(.8) brightness(.45); pointer-events:none; }
.tactical-board.interturn-locked::after { content:'INTER-GAME TURN IN PROGRESS'; position:absolute; inset:0; z-index:20; display:grid; place-items:center; padding:18px; box-sizing:border-box; background:rgba(2,8,15,.5); color:#9aafc0; font-size:12px; font-weight:700; letter-spacing:.14em; text-align:center; pointer-events:auto; }
