:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #cccccc;
  background: #1e1e1e;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #cccccc;
  --muted: #9d9d9d;
  --line: #3c3c3c;
  --green: #3794ff;
  --green-dark: #007acc;
  --soft-green: #094771;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 1050px; min-height: 700px; }
button { font: inherit; color: inherit; }

.app-shell { width: 100vw; height: 100vh; min-height: 700px; overflow: hidden; background: #1e1e1e; }
.eyebrow { color: #9aa69c; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
kbd { padding: 2px 4px; white-space: nowrap; border: 1px solid #3b463e; border-radius: 4px; color: #b6c0b7; background: #222a24; font: 9px "DM Sans", sans-serif; }

.built-dot { fill: #67a17a; background: #68a17b; }
.building-dot { fill: #e5a84d; background: #e5a84d; }

.workspace { width: 100%; height: 100%; display: flex; min-height: 0; }
.map-column { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.map-toolbar { min-height: 58px; flex: 0 0 58px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: #fff; border-bottom: 1px solid #eeefec; }
.map-title { display: flex; align-items: center; gap: 9px; }
.map-title-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: #5b8067; background: #edf3ee; }
.map-title-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linejoin: round; }
.map-title > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.map-title strong { font: 700 11px "Segoe UI", sans-serif; }
.map-title small { color: #999e99; font-size: 9px; }
.map-toolbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.save-status { display: flex; align-items: center; gap: 6px; color: #929a94; font-size: 9px; }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: #76a783; }
.save-error { background: #dc7f6e; }
.toolbar-separator { height: 22px; border-left: 1px solid #eceeeb; }
.toolbar-button { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #e8eae6; border-radius: 5px; background: #fff; color: #646d67; font-size: 10px; white-space: nowrap; cursor: pointer; }
.toolbar-button:hover { border-color: #b8c8bc; color: #416d53; }
.toolbar-button.active { border-color: #6e9577; background: #edf4ee; color: #416d53; }
.toolbar-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.share-button { border-color: #547a61; background: #547a61; color: #fff; }
.share-button:hover { border-color: #416c50; background: #416c50; color: #fff; }
.map-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; background-color: #eeeae7; background-image: radial-gradient(circle at 1px 1px, rgba(86, 85, 77, .12) 1px, transparent 0); background-size: 16px 16px; }
.map-frame { position: relative; width: min(100%, calc((100vh - 105px) * 1.73307)); aspect-ratio: 1331 / 768; overflow: hidden; transform-origin: center; transition: transform .16s ease-out; border-radius: 4px; box-shadow: 0 13px 38px rgba(62, 44, 49, .19), 0 2px 6px rgba(48, 40, 37, .1); }
.map-image { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; touch-action: none; }
.site-marker { cursor: pointer; transition: opacity .16s ease; outline: none; }
.site-marker:focus-visible .selection-ring, .site-marker.selected .selection-ring { fill: rgba(0,122,204,.22); stroke: #75beff; stroke-width: 2; stroke-dasharray: 4 3; }
.site-halo { fill: rgba(31, 40, 34, .18); opacity: .55; }
.selection-ring { fill: rgba(255,255,255,.32); stroke: transparent; }
.tower-image { pointer-events: none; filter: drop-shadow(0 2px 2px rgba(25, 20, 22, .29)); }
.site-number rect { stroke-width: 1.2; filter: drop-shadow(0 1px 2px rgba(33, 24, 27, .45)); }
.site-number.tower-blue rect { fill: #1d5e9f; stroke: #a8d7f0; }
.site-number.tower-red rect { fill: #a93630; stroke: #f2bca9; }
.site-number.tower-gold rect { fill: #a8740b; stroke: #ffe19a; }
.site-number text { fill: #fff9ee; text-anchor: middle; font: 700 8px "DM Sans", sans-serif; }
.site-status-dot { stroke: #fff; stroke-width: 1.8; filter: drop-shadow(0 1px 2px rgba(25, 22, 23, .35)); }
.site-tag { filter: drop-shadow(0 1px 1px rgba(25, 22, 23, .45)); }
.site-tag circle { fill: none; stroke: currentColor; stroke-width: 2.2; }
.site-tag path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/*.trim-site-tag .tag-outline { stroke: rgba(255, 255, 255, 0.7); stroke-width: 5.5; }
.trim-site-tag .tag-mark { stroke: #ff9b24; stroke-width: 3; }*/

.trim-site-tag { color: rgb(242, 138, 28);  filter: drop-shadow(0 0 5px rgb(250, 229, 207)) drop-shadow(0 5px 5px rgba(25, 22, 23, .45)); }
.destroy-site-tag { color: rgb(105, 214, 255); filter: drop-shadow(0 0 5px rgb(125, 217, 250)) drop-shadow(0 5px 5px rgba(25, 22, 23, .45)); }

.rebuilding-indicator rect { fill: rgba(91, 56, 20, .96); stroke: #ffd18b; stroke-width: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.65)); }
.rebuilding-indicator circle { fill: #ffbd5b; }
.rebuilding-indicator text { fill: #fff2d6; text-anchor: middle; font: 700 7px "DM Sans", sans-serif; letter-spacing: .3px; }
.marker-hit-area { fill: transparent; pointer-events: all; }
.sketch-path { fill: none; stroke: #f8d879; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(37, 28, 27, .52)); pointer-events: none; }
.current-sketch { stroke: #fff3a7; stroke-dasharray: 7 3; }
.sketch-mode .map-overlay { cursor: crosshair; }
.sketch-mode .site-marker { pointer-events: none; }
.map-stage.panning .map-frame { transition: none; cursor: grabbing; }
.map-zoom { position: absolute; right: 15px; bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 0; overflow: hidden; border: 1px solid rgba(61, 68, 61, .14); border-radius: 7px; background: rgba(255,255,255,.95); box-shadow: 0 2px 9px rgba(46,45,38,.1); }
.map-zoom button { width: 31px; height: 30px; border: 0; background: transparent; color: #626b64; font-size: 18px; line-height: 1; cursor: pointer; }
.map-zoom button:hover { color: #3f7452; background: #f2f6f1; }
.map-zoom span { width: 100%; padding: 5px 0; border-top: 1px solid #eff0ec; border-bottom: 1px solid #eff0ec; color: #888f89; font-size: 8px; text-align: center; }
.map-legend { position: absolute; left: 15px; bottom: 14px; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border: 1px solid rgba(61, 68, 61, .1); border-radius: 6px; background: rgba(255,255,255,.93); box-shadow: 0 2px 8px rgba(46,45,38,.07); color: #7d847e; font-size: 8px; }
.legend-heading { color: #a2a7a2; font-size: 7px; letter-spacing: .65px; font-weight: 700; }
.map-legend > span:not(:first-child) { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.built-legend { background: #68a17b; }
.building-legend { background: #e5a84d; }
.legend-pin { display: grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; color: #fff; background: #d97769; font: 700 8px Georgia, serif; }
.sketch-hint { display: none; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid rgba(67, 75, 66, .12); border-radius: 6px; background: rgba(255,255,255,.96); box-shadow: 0 2px 8px rgba(46,45,38,.08); color: #55665a; font-size: 10px; }
.sketch-hint.visible { display: flex; }
.sketch-cursor { font-size: 14px; }
.sketch-hint kbd { font-size: 8px; }
.inspector { width: 310px; flex: 0 0 310px; display: flex; flex-direction: column; background: #fff; border-left: 1px solid #eeefec; z-index: 2; }
.inspector-header { height: 67px; flex: 0 0 67px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid #f0f1ee; }
.inspector-header h1 { margin: 3px 0 0; font: 700 16px "Segoe UI", sans-serif; letter-spacing: -.3px; }
.close-inspector { width: 26px; height: 26px; border: 0; border-radius: 5px; background: #f6f7f4; color: #909791; font-size: 19px; line-height: 1; cursor: pointer; }
.close-inspector:hover { background: #edf3ee; color: #426d53; }
.inspector-scroll { flex: 1; overflow: auto; padding: 14px 16px 10px; }
.tower-preview { position: relative; height: 143px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #efefec; border-radius: 8px; background: radial-gradient(ellipse at 50% 70%, #f5f3ed 0, #f8f8f5 53%, #fbfbf9 100%); }
.preview-glow { position: absolute; left: 50%; bottom: -28px; width: 132px; height: 74px; transform: translateX(-50%); border-radius: 50%; background: rgba(209, 195, 164, .22); filter: blur(13px); }
.tower-preview img { position: relative; z-index: 1; width: 94px; height: 94px; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(38, 35, 29, .15)); }
.preview-number { position: absolute; top: 10px; left: 11px; padding: 4px 7px; border: 1px solid #eaece8; border-radius: 5px; background: rgba(255,255,255,.84); color: #6d756e; font-size: 9px; font-weight: 700; }
.preview-location { position: absolute; right: 10px; bottom: 9px; display: flex; align-items: center; gap: 4px; color: #9b9f99; font-size: 8px; }
.preview-location svg { width: 12px; height: 12px; fill: none; stroke: #7c9681; stroke-width: 1.4; }
.detail-section { padding: 18px 0; border-bottom: 1px solid #f0f1ee; }
.field-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: #8b918c; font-size: 8px; font-weight: 700; letter-spacing: .75px; }
.status-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.status-option { min-height: 51px; display: flex; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid #eceeeb; border-radius: 6px; background: #fff; text-align: left; cursor: pointer; }
.status-option:hover { border-color: #cbd9ce; }
.status-option.selected { border-color: #82a58b; background: #f6faf6; box-shadow: 0 0 0 1px rgba(106, 151, 117, .1); }
.status-radio { width: 12px; height: 12px; flex: 0 0 12px; border: 1px solid #c7cbc7; border-radius: 50%; }
.status-option.selected .status-radio { border: 4px solid #5b8966; }
.status-option > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.status-option strong { color: #505853; font-size: 9px; font-weight: 600; }
.status-option small { color: #a1a6a1; font-size: 8px; white-space: nowrap; }
.rebuilding-card { display: flex; align-items: center; gap: 9px; margin-top: 9px; padding: 9px; border: 1px solid #6b522d; border-radius: 6px; background: #30291f; }
.rebuilding-card[hidden] { display: none; }
.rebuilding-card-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 7px; color: #ffc46e; background: #49371f; }
.rebuilding-card-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.rebuilding-card-copy { display: flex; flex-direction: column; gap: 3px; }
.rebuilding-card-copy strong { color: #f3d9b2; font-size: 9px; font-weight: 700; }
.rebuilding-card-copy small { color: #c4aa83; font-size: 8px; }
.color-section { padding-top: 16px; padding-bottom: 16px; }
.field-heading > span:last-child:not(:first-child) { color: #a1a6a1; font-size: 8px; font-weight: 500; letter-spacing: 0; }
.color-options { display: flex; align-items: center; gap: 8px; }
.color-option { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #e5e7e3; border-radius: 50%; background: #fff; cursor: pointer; }
.color-option > span { width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0,0,0,.15); }
.color-option.blue > span { background: #568bc4; }
.color-option.red > span { background: #d6625b; }
.color-option.gold > span { background: #dfa82d; }
.color-option.selected { border-color: #657f6a; box-shadow: 0 0 0 2px #e6efe7; }
.color-description { margin-left: 2px; color: #a0a59f; font-size: 8px; }
.tag-section { padding-top: 16px; border-bottom: 0; }
.optional-label { color: #b1b5b1; font-size: 7px; font-weight: 500; letter-spacing: .4px; }
.tag-options { display: flex; flex-direction: column; gap: 5px; }
.tag-option { height: 31px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border: 1px solid #eceeeb; border-radius: 5px; background: #fff; color: #777e78; text-align: left; font-size: 9px; cursor: pointer; }
.tag-option:hover { background: #fbfcfa; }
.tag-option.selected { border-color: #c7d6ca; color: #4d7157; background: #f7faf7; }
.tag-symbol { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: #a4aaa4; background: #f0f1ee; font-size: 11px; font-weight: 700; }
.tag-symbol svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trim-tag { color: #e98117; background: transparent; }
.destroy-tag { color: #168fcf; background: transparent; }
.tag-check { display: none; margin-left: auto; color: #63866a; font-size: 11px; }
.tag-option.selected .tag-check { display: block; }
.detail-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 1px; padding: 9px 8px; border-radius: 5px; background: #f8f8f5; }
.note-icon { width: 13px; height: 13px; flex: 0 0 13px; display: grid; place-items: center; border: 1px solid #abb0aa; border-radius: 50%; color: #8c938d; font: italic 9px Georgia, serif; }
.detail-note p { margin: 0; color: #989e98; font-size: 8px; line-height: 1.45; }
.inspector-footer { padding: 10px 16px 12px; border-top: 1px solid #f0f1ee; }
.next-site-button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border: 1px solid #e9ebe7; border-radius: 5px; background: #fff; color: #68716a; font-size: 9px; font-weight: 600; cursor: pointer; }
.next-site-button:hover { border-color: #c4d2c7; color: #4c7658; background: #fbfcfa; }
.next-site-button span { font-size: 14px; font-weight: 400; }
.inspector.empty .inspector-scroll, .inspector.empty .inspector-footer { opacity: .35; pointer-events: none; }
.toast { position: fixed; z-index: 10; bottom: 45px; left: 50%; transform: translate(-50%, 10px); padding: 10px 15px; border-radius: 6px; background: #303b33; box-shadow: 0 6px 22px rgba(22, 32, 24, .2); color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

.map-toolbar { background: #333333; border-bottom-color: #252526; }
.map-title-icon { color: #75beff; background: #252526; }
.map-title small, .save-status { color: #9d9d9d; }
.toolbar-separator { border-color: #3c3c3c; }
.toolbar-button { border-color: #3c3c3c; background: #252526; color: #cccccc; }
.toolbar-button:hover { border-color: #007acc; background: #2a2d2e; color: #ffffff; }
.toolbar-button.active { border-color: #007acc; background: #094771; color: #ffffff; }
.share-button, .share-button:hover { border-color: #0e639c; background: #0e639c; color: #ffffff; }
.map-stage { background-color: #1e1e1e; background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .035) 1px, transparent 0); }
.map-legend { border-color: #3c3c3c; background: rgba(37, 37, 38, .96); color: #cccccc; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.legend-heading { color: #9d9d9d; }
.map-zoom { border-color: #3c3c3c; background: rgba(37, 37, 38, .97); box-shadow: 0 2px 9px rgba(0, 0, 0, .4); }
.map-zoom button { color: #cccccc; }
.map-zoom button:hover { color: #ffffff; background: #094771; }
.map-zoom span { border-color: #3c3c3c; color: #9d9d9d; }
.sketch-hint { border-color: #3c3c3c; background: rgba(37, 37, 38, .97); color: #cccccc; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.inspector { border-left-color: #3c3c3c; background: #252526; }
.inspector-header { border-bottom-color: #3c3c3c; }
.inspector-header h1 { color: #f0f0f0; }
.close-inspector { background: #2a2d2e; color: #cccccc; }
.close-inspector:hover { background: #094771; color: #ffffff; }
.tower-preview { border-color: #3c3c3c; background: radial-gradient(ellipse at 50% 70%, #303033 0, #2a2a2d 53%, #252526 100%); }
.preview-glow { background: rgba(0, 122, 204, .16); }
.preview-number { border-color: #3c3c3c; background: rgba(37, 37, 38, .9); color: #cccccc; }
.preview-location { color: #9d9d9d; }
.preview-location svg { stroke: #75beff; }
.detail-section { border-bottom-color: #3c3c3c; }
.field-heading { color: #cccccc; }
.status-option { border-color: #3c3c3c; background: #2a2d2e; }
.status-option:hover { border-color: #007acc; }
.status-option.selected { border-color: #007acc; background: #094771; box-shadow: 0 0 0 1px rgba(0, 122, 204, .25); }
.status-radio { border-color: #858585; }
.status-option.selected .status-radio { border-color: #75beff; }
.status-option strong { color: #f0f0f0; }
.status-option small { color: #b3b3b3; }
.field-heading > span:last-child:not(:first-child) { color: #9d9d9d; }
.color-option { border-color: #3c3c3c; background: #2a2d2e; }
.color-option.selected { border-color: #007acc; box-shadow: 0 0 0 2px #094771; }
.color-description { color: #9d9d9d; }
.optional-label { color: #9d9d9d; }
.tag-option { border-color: #3c3c3c; background: #2a2d2e; color: #cccccc; }
.tag-option:hover { background: #333333; }
.tag-option.selected { border-color: #007acc; color: #ffffff; background: #094771; }
.tag-symbol { color: #cccccc; background: #3c3c3c; }
.detail-note { background: #2a2d2e; }
.note-icon { border-color: #858585; color: #b3b3b3; }
.detail-note p { color: #b3b3b3; }
.inspector-footer { border-top-color: #3c3c3c; }
.next-site-button { border-color: #3c3c3c; background: #2a2d2e; color: #cccccc; }
.next-site-button:hover { border-color: #007acc; color: #ffffff; background: #094771; }
.toast { background: #252526; border: 1px solid #3c3c3c; }
.toolbar-button:focus-visible, .map-zoom button:focus-visible, .status-option:focus-visible,
.color-option:focus-visible, .tag-option:focus-visible, .next-site-button:focus-visible {
  outline: 1px solid #007acc;
  outline-offset: 2px;
}

@media (max-width: 1250px) {
  .inspector { width: 286px; flex-basis: 286px; }
  .map-legend { gap: 7px; }
  .legend-heading { display: none; }
  .map-toolbar-right { gap: 5px; }
  .save-status { display: none; }
}
