:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; background: #0b1320; }
#app, #cesium-container, #map { width: 100vw; height: 100vh; }
.panel { position: fixed; top: 20px; left: 20px; width: min(340px, calc(100vw - 40px)); padding: 20px; border: 1px solid #41516b; border-radius: 12px; background: rgb(11 19 32 / 92%); box-shadow: 0 18px 45px rgb(0 0 0 / 35%); color: #eff6ff; z-index: 1001; transition: transform .18s ease; }
.panel-toggle { position: fixed; top: 20px; left: min(360px, calc(100vw - 20px)); z-index: 1002; min-height: 36px; padding: 0 10px; border-radius: 0 7px 7px 0; font-size: .78rem; transition: left .18s ease; }
body.tools-hidden .panel { transform: translateX(calc(-100% - 20px)); }
body.tools-hidden .panel-toggle { left: 0; }
.eyebrow { color: #79d6c4; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.back-link { display: inline-block; margin-bottom: 16px; color: #b7c7db; font-size: .85rem; text-decoration: none; }
.back-link:hover { color: #79d6c4; }
h1 { margin: 5px 0 1px; font-size: 1.6rem; }
.subtitle { margin: 0 0 17px; color: #b7c7db; font-size: .92rem; }
.controls, .actions { display: grid; gap: 8px; }
.controls { margin-bottom: 12px; }
.toggle, button { min-height: 40px; border: 1px solid #42536d; border-radius: 7px; background: #162338; color: inherit; font: inherit; }
.toggle { display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.toggle input { width: 17px; height: 17px; accent-color: #79d6c4; }
.actions { grid-template-columns: 1fr 1fr; }
button { cursor: pointer; font-size: .9rem; }
button:hover { background: #213652; border-color: #79d6c4; }
.measure-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.measure-controls #clear-measurements { grid-column: 1 / -1; }
.measure-controls button.is-active { border-color: #79d6c4; background: #1e4a55; color: #e9fffa; }
.measure-help { min-height: 2.8em; margin: 11px 0 0; color: #bfeff0; font-size: .78rem; line-height: 1.4; }
.leaflet-control-scale { margin: 0 0 20px 20px !important; }
.leaflet-control-scale-line { border-color: #eff6ff; border-top: 0; background: rgb(11 19 32 / 85%); color: #eff6ff; text-shadow: none; }
.measurement-label { border: 1px solid #f6c75f; border-radius: 4px; background: rgb(11 19 32 / 92%); color: #fff4cf; font-weight: 700; box-shadow: none; }
.measurement-label::before { display: none; }
.measurement-vertex { width: 14px !important; height: 14px !important; margin: 0 !important; border: 2px solid #0b1320; border-radius: 50%; background: #f6c75f; box-shadow: 0 0 0 1px #f6c75f; }
.measurement-vertex.is-editable { cursor: grab; }
.measurement-vertex.is-editable:active { cursor: grabbing; }
#map.is-measuring { cursor: crosshair; }
.note { margin: 16px 0 0; color: #d0dceb; font-size: .78rem; line-height: 1.45; }
.status { position: fixed; right: 20px; bottom: 20px; max-width: min(450px, calc(100vw - 40px)); padding: 12px 15px; border-radius: 8px; background: rgb(11 19 32 / 92%); color: #eff6ff; z-index: 1001; }
.error { border: 1px solid #f9a8a8; color: #ffe3e3; }
.warming { border: 1px solid #416a78; color: #bfeff0; }
@media (max-width: 600px) { .panel { top: 12px; left: 12px; width: calc(100vw - 24px); padding: 15px; } .panel-toggle { top: 12px; left: calc(100vw - 80px); } body.tools-hidden .panel { transform: translateX(calc(-100% - 12px)); } .note { display: none; } .status { right: 12px; bottom: 12px; } }
.landing { display: grid; min-height: 100vh; overflow: auto; place-items: center; padding: 24px; color: #eff6ff; }
.landing-content { width: min(680px, 100%); }
.landing h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); margin: 7px 0 12px; }
.landing p { color: #b7c7db; font-size: 1.1rem; line-height: 1.55; }
.view-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.view-cards a { display: grid; gap: 8px; min-height: 150px; padding: 20px; border: 1px solid #42536d; border-radius: 12px; background: #162338; color: #eff6ff; text-decoration: none; }
.view-cards a:hover { border-color: #79d6c4; background: #213652; }
.view-cards strong { font-size: 1.15rem; }
.view-cards span { color: #b7c7db; line-height: 1.4; }
@media (max-width: 600px) { .view-cards { grid-template-columns: 1fr; } }
.library { min-height: 100vh; overflow: auto; color: #eff6ff; }
.library-content { width: min(1200px, 100%); margin: 0 auto; padding: 42px 24px 64px; }
.library-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; border-bottom: 1px solid #41516b; padding-bottom: 26px; }
.library-header h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); margin: 7px 0 10px; }
.library-header p, .library-status, .folder-name, .project-summary { color: #b7c7db; }
.library-header p { margin: 0; max-width: 670px; line-height: 1.5; }
.library-header code, .empty-state code { color: #bfeff0; }
.library-controls { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 24px 0 8px; }
.library-controls label { display: grid; gap: 7px; color: #b7c7db; font-size: .85rem; }
.library-controls input, dialog input, dialog textarea { width: min(390px, calc(100vw - 48px)); border: 1px solid #42536d; border-radius: 7px; background: #162338; color: #eff6ff; font: inherit; padding: 10px 12px; }
.library-controls input:focus, dialog input:focus, dialog textarea:focus { outline: 2px solid #79d6c4; outline-offset: 2px; }
.library-status { min-height: 1.4em; margin: 0 0 22px; font-size: .9rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.project-card { overflow: hidden; border: 1px solid #42536d; border-radius: 12px; background: #162338; }
.project-card.is-incomplete { opacity: .76; }
.project-thumbnail { position: relative; height: 180px; background: #0d1a2c; }
.map-preview { position: absolute; inset: 0; display: grid; width: 100%; height: 100%; grid-template-columns: repeat(var(--preview-columns), minmax(0, 1fr)); grid-template-rows: repeat(var(--preview-rows), minmax(0, 1fr)); overflow: hidden; }
.map-preview img { width: 100%; height: 100%; object-fit: fill; image-rendering: auto; }
.generated-thumbnail { display: block; width: 100%; height: 100%; object-fit: contain; background: #0d1a2c; }
.project-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: #79d6c4; font-size: 1.4rem; font-weight: 700; }
.project-body { padding: 16px; }
.project-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.project-card h2 { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.folder-name { margin: 4px 0 0; font-size: .75rem; overflow-wrap: anywhere; }
.secondary-button { min-height: 30px; padding: 0 8px; font-size: .78rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px; margin-top: 12px; }
.tag { padding: 3px 7px; border-radius: 99px; background: #1e4a55; color: #c5f6ed; font-size: .73rem; }
.project-summary { margin: 12px 0 0; font-size: .82rem; line-height: 1.4; }
.project-warning { margin: 12px 0 0; color: #ffe3a3; font-size: .82rem; line-height: 1.4; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.project-actions a { padding: 9px 11px; border: 1px solid #79d6c4; border-radius: 7px; color: #e9fffa; font-size: .85rem; text-decoration: none; }
.project-actions a:hover { background: #1e4a55; }
.empty-state { grid-column: 1 / -1; padding: 32px; border: 1px dashed #42536d; border-radius: 12px; color: #b7c7db; text-align: center; }
dialog { width: min(540px, calc(100vw - 32px)); border: 1px solid #41516b; border-radius: 12px; background: #0b1320; color: #eff6ff; box-shadow: 0 18px 45px rgb(0 0 0 / 55%); }
dialog::backdrop { background: rgb(0 0 0 / 60%); }
dialog form { display: grid; gap: 15px; }
dialog label { display: grid; gap: 7px; color: #d0dceb; font-size: .85rem; }
dialog input, dialog textarea { width: 100%; }
.field-help { margin: -8px 0 0; color: #aabbd1; font-size: .78rem; }
.dialog-heading, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { margin: 4px 0 0; }
.dialog-actions { justify-content: end; }
.icon-button { min-height: 32px; min-width: 32px; font-size: 1.4rem; line-height: 1; }
@media (max-width: 600px) { .library-content { padding: 28px 16px 48px; } .library-header { align-items: start; flex-direction: column; } .library-controls { align-items: start; flex-direction: column; } .library-controls input { width: calc(100vw - 32px); } }
