:root {
  --forest: #173d2b;
  --forest-deep: #0d2e1e;
  --forest-mid: #2f5b45;
  --mint: #dff7e8;
  --mint-bright: #b3f1c9;
  --paper: #fff;
  --surface: #f4f7f2;
  --ink: #152019;
  --muted: #68756c;
  --line: #dce4dd;
  --rust: #a45734;
  --danger: #a13d32;
  --shadow: 0 26px 80px rgba(22, 56, 39, .11);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: Inter, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

.topbar { align-items: center; background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(47,91,69,.12); display: flex; height: 74px; justify-content: space-between; padding: 0 clamp(20px,6vw,88px); position: relative; z-index: 20; }
.brand { align-items: center; display: inline-flex; font-size: 18px; font-weight: 850; gap: 10px; letter-spacing: -.03em; text-decoration: none; }
.brand-logo { border-radius: 11px; display: block; flex: 0 0 auto; height: 42px; object-fit: cover; width: 42px; }
.topbar nav { align-items: center; display: flex; gap: clamp(10px,1.6vw,23px); }
.topbar nav a, .link-button { color: #45544b; font-size: 13px; font-weight: 720; text-decoration: none; }
.nav-link { position: relative; }
.nav-link:hover { color: var(--forest); }
.topbar form { margin: 0; }
.link-button { background: none; border: 0; cursor: pointer; padding: 0; }
.language { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; }
.user-chip { align-items: center; color: var(--muted); display: inline-flex; font-size: 11px; gap: 8px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip > span { align-items: center; background: var(--mint); border-radius: 50%; color: var(--forest); display: inline-flex; flex: 0 0 auto; font-weight: 850; height: 29px; justify-content: center; width: 29px; }
.mobile-menu { display: none; }

.shell { margin: 0 auto; max-width: 1220px; min-height: calc(100vh - 152px); padding: 68px 28px 110px; }
.account-footer { align-items: center; border-top: 1px solid var(--line); color: #7b887e; display: flex; font-size: 11px; justify-content: space-between; margin: 0 clamp(20px,6vw,88px); padding: 26px 0; }
.account-footer a { color: var(--forest-mid); font-weight: 750; text-decoration: none; }
.account-footer-links { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(46px,6vw,72px); font-weight: 760; letter-spacing: -.065em; line-height: .98; }
h2 { font-size: 29px; letter-spacing: -.04em; }
.eyebrow { color: var(--forest-mid); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.back-link { color: var(--forest-mid); font-size: 12px; font-weight: 780; text-decoration: none; }
.page-back { display: inline-block; margin-bottom: 34px; }
.button { align-items: center; background: var(--forest); border: 1px solid var(--forest); border-radius: 13px; color: white; cursor: pointer; display: inline-flex; font-size: 13px; font-weight: 820; gap: 20px; justify-content: center; min-height: 50px; padding: 0 20px; text-decoration: none; transition: box-shadow .16s ease, transform .16s ease; }
.button:hover { box-shadow: 0 12px 30px rgba(23,61,43,.2); transform: translateY(-1px); }
.button:disabled { box-shadow: none; cursor: not-allowed; opacity: .42; transform: none; }
.button.compact { min-height: 38px; }
.button.full { justify-content: space-between; width: 100%; }
.message { align-items: center; background: var(--mint); border: 1px solid rgba(47,91,69,.13); border-radius: 13px; display: flex; font-size: 13px; gap: 10px; margin-bottom: 24px; padding: 14px 18px; }
.message > span { align-items: center; background: var(--forest); border-radius: 50%; color: white; display: inline-flex; height: 21px; justify-content: center; width: 21px; }

/* Authentication */
.auth-page { background: var(--forest-deep); }
.auth-page .topbar { background: var(--forest-deep); border-color: rgba(255,255,255,.1); color: white; }
.auth-page .topbar nav a, .auth-page .link-button { color: #c5d6ca; }
.auth-page .language { border-color: rgba(255,255,255,.18); }
.auth-page .shell { max-width: 1440px; padding-bottom: 78px; padding-top: 48px; }
.auth-page .account-footer { border-color: rgba(255,255,255,.1); color: #718a79; }
.auth-page .account-footer a { color: #b8cec0; }
.auth-layout { background: var(--paper); border-radius: 28px; box-shadow: 0 34px 100px rgba(0,0,0,.28); display: grid; grid-template-columns: minmax(0,1.08fr) minmax(430px,.92fr); margin: 0 auto; max-width: 1210px; min-height: 680px; overflow: hidden; }
.auth-story { background: radial-gradient(circle at 90% 15%, rgba(179,241,201,.12), transparent 31%), linear-gradient(150deg, var(--forest-deep), var(--forest)); color: white; display: flex; flex-direction: column; justify-content: center; padding: clamp(48px,7vw,92px); position: relative; }
.auth-story::after { border: 1px solid rgba(179,241,201,.13); border-radius: 50%; content: ""; height: 420px; position: absolute; right: -180px; top: -150px; width: 420px; }
.auth-story h1 { font-size: clamp(46px,5.2vw,72px); margin: 28px 0; max-width: 680px; }
.auth-story > p { color: #bdd0c3; font-size: 16px; line-height: 1.7; max-width: 560px; }
.story-badge { align-self: flex-start; background: rgba(179,241,201,.13); border: 1px solid rgba(179,241,201,.24); border-radius: 999px; color: var(--mint-bright); font-size: 10px; font-weight: 850; letter-spacing: .12em; padding: 9px 13px; text-transform: uppercase; }
.story-points { border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 17px; margin-top: 44px; padding-top: 27px; }
.story-points span { color: #769582; display: grid; font-size: 10px; gap: 3px; grid-template-columns: 34px 1fr; }
.story-points b { color: #eaf5ed; font-size: 12px; }
.privacy-seal { align-items: center; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; display: flex; gap: 18px; margin-top: 48px; max-width: 460px; padding: 20px; }
.privacy-seal > span { align-items: center; background: var(--mint-bright); border-radius: 50%; color: var(--forest); display: flex; font-size: 24px; height: 50px; justify-content: center; width: 50px; }
.privacy-seal div { display: grid; gap: 5px; }
.privacy-seal small { color: #a9c0b0; line-height: 1.4; }
.auth-card { align-self: center; background: white; margin: 0 auto; max-width: 500px; padding: 58px clamp(34px,5vw,72px); width: 100%; }
.auth-card h2 { font-size: 42px; margin: 9px 0 16px; }
.auth-card > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.6; }
.register-card { padding-bottom: 38px; padding-top: 38px; }
.register-card h2 { font-size: 36px; }
.stack { display: grid; gap: 17px; margin-top: 29px; }
.stack > label, .form-grid > label { color: #35443a; display: grid; font-size: 12px; font-weight: 780; gap: 7px; }
.stack input, .stack select, .stack textarea, .form-grid input, .form-grid textarea { background: #fbfcfa; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); min-height: 47px; outline: none; padding: 11px 13px; transition: border-color .15s, box-shadow .15s; width: 100%; }
.stack input:focus, .stack select:focus, .stack textarea:focus, .form-grid input:focus, .form-grid textarea:focus { border-color: var(--forest-mid); box-shadow: 0 0 0 3px rgba(47,91,69,.1); }
.stack small { color: #859188; font-size: 10px; font-weight: 500; line-height: 1.45; }
.label-row { display: flex; justify-content: space-between; }
.label-row a { color: var(--forest-mid); font-weight: 750; text-decoration: none; }
.password-field { display: flex; position: relative; }
.password-field button { background: transparent; border: 0; color: var(--forest-mid); cursor: pointer; position: absolute; right: 10px; top: 12px; }
.errorlist { color: var(--danger); font-size: 11px; font-weight: 600; list-style: none; margin: 0; padding: 0; }
.form-alert { background: #fbecea; border: 1px solid #ebc8c3; border-radius: 10px; color: var(--danger); font-size: 12px; padding: 12px 14px; }
.auth-switch { border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: 12px; gap: 7px; justify-content: center; margin-top: 26px; padding-top: 22px; }
.auth-switch a { color: var(--forest-mid); font-weight: 800; }
.simple-auth .shell { align-items: center; display: flex; justify-content: center; }
.recovery-card { border-radius: 24px; box-shadow: var(--shadow); max-width: 520px; padding: 48px; }
.recovery-card.centered { text-align: center; }
.recovery-icon { align-items: center; background: var(--mint); border-radius: 16px; color: var(--forest); display: flex; font-size: 24px; height: 58px; justify-content: center; margin: 32px 0 24px; width: 58px; }
.centered .recovery-icon { margin-left: auto; margin-right: auto; }
.success-icon { background: var(--forest); color: white; }

/* Dashboard */
.page-head { align-items: flex-end; display: flex; gap: 40px; justify-content: space-between; margin-bottom: 46px; }
.page-head h1 { margin: 10px 0 18px; }
.page-head p:last-child { color: var(--muted); font-size: 16px; line-height: 1.65; margin-bottom: 0; max-width: 650px; }
.primary-action { flex: 0 0 auto; margin-bottom: 8px; }
.page-actions, .empty-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.page-actions .primary-action { margin-bottom: 0; }
.library-create-actions { align-self: center; flex: 0 0 auto; }
.library-create-menu { position: relative; z-index: 12; }
.library-create-menu > summary { cursor: pointer; list-style: none; min-width: 190px; user-select: none; }
.library-create-menu > summary::-webkit-details-marker { display: none; }
.library-create-menu > summary i { font-size: 14px; font-style: normal; margin-left: 7px; transition: transform .15s; }
.library-create-menu[open] > summary i { transform: rotate(180deg); }
.library-create-popover { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 55px rgba(13,46,30,.18); display: grid; gap: 3px; min-width: 320px; padding: 7px; position: absolute; right: 0; top: calc(100% + 9px); }
.library-create-popover a { align-items: center; border-radius: 11px; display: grid; gap: 12px; grid-template-columns: 38px 1fr; padding: 11px 12px; text-decoration: none; }
.library-create-popover a:hover { background: #f0f7f1; }
.library-create-popover a > span { align-items: center; background: var(--mint); border-radius: 10px; color: var(--forest); display: flex; font-size: 10px; font-weight: 900; height: 38px; justify-content: center; width: 38px; }
.library-create-popover a > div { display: grid; gap: 3px; }
.library-create-popover strong { color: var(--ink); font-size: 12px; }
.library-create-popover small { color: var(--muted); font-size: 10px; }
.secondary-action { background: white; color: var(--forest); }
.primary-action > span { font-size: 20px; font-weight: 400; }
.overview-grid { display: grid; gap: 14px; grid-template-columns: 1.7fr .65fr .65fr; margin-bottom: 58px; }
.storage-card, .metric-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; min-height: 138px; padding: 23px; }
.card-top { align-items: center; color: var(--muted); display: grid; font-size: 12px; font-weight: 720; gap: 10px; grid-template-columns: auto 1fr auto; }
.card-top strong { color: var(--forest); }
.metric-icon { align-items: center; background: var(--mint); border-radius: 10px; color: var(--forest); display: inline-flex; font-size: 18px; height: 36px; justify-content: center; width: 36px; }
.storage-track { background: #e8ede9; border-radius: 999px; height: 7px; margin: 22px 0 12px; overflow: hidden; }
.storage-track span { background: var(--forest-mid); border-radius: inherit; display: block; height: 100%; min-width: 3px; }
.storage-meta { color: var(--muted); display: flex; font-size: 11px; justify-content: space-between; }
.storage-meta b { color: var(--ink); }
.storage-note { color: var(--muted); display: block; font-size: 9px; line-height: 1.4; margin-top: 10px; }
.metric-card { align-items: center; display: flex; gap: 17px; }
.metric-card div { display: grid; gap: 4px; }
.metric-card b { font-size: 28px; letter-spacing: -.04em; }
.metric-card div span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.ready-icon { background: #edf7f0; }
.section-bar { align-items: center; display: flex; justify-content: space-between; margin-bottom: 18px; }
.section-bar > div { align-items: baseline; display: flex; gap: 12px; }
.section-bar h2 { font-size: 26px; margin: 0; }
.section-bar span { color: var(--muted); font-size: 11px; }
.section-bar > a { color: var(--forest-mid); font-size: 12px; font-weight: 780; text-decoration: none; }
.library-search { align-items: end; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 10px; grid-template-columns: minmax(220px,1fr) auto auto; margin: 0 0 16px; padding: 13px; }
.library-search label { color: #35443a; display: grid; font-size: 10px; font-weight: 800; gap: 6px; }
.library-search input { background: #fbfcfa; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); min-height: 42px; outline: none; padding: 9px 12px; width: 100%; }
.library-search input:focus { border-color: var(--forest-mid); box-shadow: 0 0 0 3px rgba(47,91,69,.1); }
.library-search .button { min-height: 42px; }
.library-search > a { color: var(--forest-mid); font-size: 10px; font-weight: 800; padding: 12px 7px; text-decoration: none; }
.library-search-empty { background: var(--paper); border: 1px dashed #b9c8bd; border-radius: 18px; padding: 34px 24px; text-align: center; }
.library-search-empty strong { font-size: 20px; }
.library-search-empty p { color: var(--muted); font-size: 12px; }
.library-search-empty a { color: var(--forest-mid); font-size: 11px; font-weight: 800; }
.map-list { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.map-row { align-items: center; color: var(--ink); display: flex; gap: 18px; min-height: 90px; padding: 14px 22px; transition: background .15s; }
.map-row + .map-row { border-top: 1px solid var(--line); }
.map-row:hover { background: #f9fbf8; }
.map-row-main { align-items: center; color: inherit; display: grid; flex: 1; gap: 18px; grid-template-columns: 58px minmax(180px,1fr) 150px 100px; min-width: 0; text-decoration: none; }
.map-row-actions { align-items: center; display: flex; flex: 0 0 auto; gap: 8px; }
.map-row-actions > a { border: 1px solid var(--line); border-radius: 9px; color: var(--forest-mid); font-size: 10px; font-weight: 800; padding: 9px 11px; text-decoration: none; white-space: nowrap; }
.map-row-actions > a:hover { background: var(--mint); border-color: #b8d7c2; }
.map-row-actions .row-open { border: 0; font-size: 16px; padding-left: 7px; padding-right: 7px; }
.map-row-actions form { display: flex; margin: 0; }
.map-row-delete { background: white; border: 1px solid #e0c1bd; border-radius: 9px; color: var(--danger); cursor: pointer; font-size: 10px; font-weight: 800; padding: 9px 11px; white-space: nowrap; }
.map-row-delete:hover { background: #fbecea; border-color: #d7aaa4; }
.backup-overview { grid-template-columns: 1.7fr .65fr .65fr; }
.backup-icon { font-size: 10px; letter-spacing: .04em; }
.backup-row-main { grid-template-columns: 58px minmax(220px,1fr) 145px; }
.backup-thumb { background: linear-gradient(145deg,#e8f2eb,#d4e7d9); }
.backup-hash { color: #7b887f; display: block; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; margin-top: 3px; }
.backup-actions > a { min-width: 88px; text-align: center; }
.backup-security-note { align-items: flex-start; background: #edf5ee; border: 1px solid #cfe0d2; border-radius: 16px; display: flex; gap: 13px; margin-top: 22px; padding: 18px 20px; }
.backup-security-note > span { align-items: center; background: var(--forest); border-radius: 50%; color: white; display: flex; flex: 0 0 auto; height: 30px; justify-content: center; width: 30px; }
.backup-security-note strong { color: var(--forest); font-size: 12px; }
.backup-security-note p { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 4px 0 0; }
.map-thumb { align-items: center; background: linear-gradient(145deg,#dceadd,#bcd5c1); border-radius: 12px; color: var(--forest); display: flex; font-size: 10px; font-weight: 900; height: 58px; justify-content: center; overflow: hidden; position: relative; width: 58px; }
.map-thumb::before, .map-thumb i { border: 1px solid rgba(47,91,69,.3); border-radius: 50%; content: ""; height: 54px; left: -20px; position: absolute; top: 18px; width: 54px; }
.map-thumb i { height: 35px; left: 30px; top: -12px; width: 35px; }
.map-primary, .map-size { display: grid; gap: 7px; }
.map-primary strong { font-size: 14px; }
.map-primary span, .map-size span { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-primary .store-library-badge { align-items: center; background: var(--forest); border-radius: 999px; color: white; display: inline-flex; font-size: 9px; font-weight: 820; justify-self: start; line-height: 1; max-width: 100%; overflow: visible; padding: 6px 9px; text-overflow: clip; }
.map-primary .store-library-badge.draft { background: #fff1da; color: #8b6020; }
.map-primary .store-library-badge.archived { background: #eef1ee; color: #657169; }
.status { align-items: center; background: #eef1ee; border-radius: 999px; color: #637067; display: inline-flex; font-size: 10px; font-weight: 800; gap: 7px; padding: 7px 10px; }
.status i { background: currentColor; border-radius: 50%; height: 5px; width: 5px; }
.status.ready { background: var(--mint); color: #245e3e; }
.status.processing, .status.pending, .status.queued, .status.running { background: #fff1da; color: #8b6020; }
.status.cancelled { background: #edf0ed; color: #66736b; }
.status.invalid, .status.failed { background: #f8e4e1; color: var(--danger); }
.map-size { text-align: right; }
.map-size strong { font-size: 12px; }
.row-arrow { color: #859188; }
.empty { background: var(--paper); border: 1px dashed #b9c8bd; border-radius: 22px; padding: 60px 24px; text-align: center; }
.empty h2 { font-size: 30px; margin-bottom: 12px; }
.empty > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; margin: 0 auto 24px; max-width: 520px; }
.empty small { color: var(--muted); display: block; font-size: 10px; margin-top: 15px; }
.empty-visual { align-items: center; background: var(--mint); border-radius: 50%; color: var(--forest); display: flex; font-size: 24px; height: 80px; justify-content: center; margin: 0 auto 24px; overflow: hidden; position: relative; width: 80px; }
.empty-visual i { border: 1px solid rgba(47,91,69,.28); border-radius: 50%; height: 55px; position: absolute; right: -30px; width: 55px; }
.empty-visual i:last-child { bottom: -34px; left: -5px; }

/* Upload */
.upload-layout { display: grid; gap: clamp(48px,8vw,110px); grid-template-columns: minmax(0,1fr) 340px; }
.upload-layout h1 { margin: 12px 0 20px; max-width: 700px; }
.page-lead { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 680px; }
.upload-form { display: grid; gap: 24px; margin-top: 34px; }
.drop-zone { align-items: center; background: rgba(223,247,232,.38); border: 1.5px dashed #8eac99; border-radius: 20px; cursor: pointer; display: flex; flex-direction: column; min-height: 250px; padding: 35px; text-align: center; transition: background .15s, border-color .15s; }
.drop-zone:hover, .drop-zone.dragging { background: var(--mint); border-color: var(--forest-mid); }
.drop-zone.has-file { background: var(--mint); border-color: var(--forest); border-style: solid; }
.drop-zone.has-error { background: #fff3f0; border-color: #b84a3a; }
.drop-zone input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.upload-symbol { align-items: center; background: var(--forest); border-radius: 13px; color: white; display: flex; font-size: 24px; height: 52px; justify-content: center; margin-bottom: 20px; width: 52px; }
.drop-zone b { font-size: 17px; }
.drop-zone > span:not(.upload-symbol) { color: var(--muted); font-size: 12px; margin-top: 6px; }
.drop-zone small { color: #89968d; font-size: 10px; margin-top: 20px; }
.file-selection { background: var(--mint); border-radius: 10px; color: var(--forest); font-size: 12px; margin: -12px 0 0; padding: 10px 14px; }
.file-selection.error { background: #fff3f0; color: #9b3025; }
.upload-progress { background: white; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 9px; margin: -10px 0 0; padding: 14px 16px; }
.upload-progress[hidden] { display: none; }
.upload-progress-head { align-items: center; display: flex; gap: 16px; justify-content: space-between; }
.upload-progress-head strong { color: var(--forest); font-size: 12px; }
.upload-progress-head span { color: var(--forest); font-size: 14px; font-weight: 850; }
.upload-progress-track { background: #e6ede8; border-radius: 999px; height: 9px; overflow: hidden; }
.upload-progress-track span { background: var(--forest-mid); border-radius: inherit; display: block; height: 100%; transition: width .2s ease; width: 0; }
.upload-progress.is-checking .upload-progress-track span { animation: upload-checking 1.1s ease-in-out infinite; width: 35% !important; }
.upload-progress small { color: var(--muted); font-size: 10px; }
.upload-form.is-uploading .drop-zone { cursor: wait; opacity: .72; pointer-events: none; }
.upload-form.is-uploading [data-upload-submit] { cursor: wait; opacity: .72; }
@keyframes upload-checking { from { transform: translateX(-120%); } to { transform: translateX(340%); } }
.bbox-grid { display: grid; gap: 12px; grid-template-columns: repeat(4,1fr); }
.bbox-grid label, .wide-field { color: #35443a; display: grid; font-size: 12px; font-weight: 780; gap: 7px; }
.bbox-grid input, .wide-field textarea { background: #fbfcfa; border: 1px solid var(--line); border-radius: 11px; min-height: 47px; padding: 11px 13px; width: 100%; }
.wide-field textarea { min-height: 90px; resize: vertical; }
.generation-state { color: var(--forest-mid) !important; font-size: 11px; font-weight: 750; margin: 12px 0 0 !important; }
.generation-layout { grid-template-columns: minmax(0,1fr) 300px; }
.region-picker-shell { background: #dfe9df; border: 1px solid #cbd8cd; border-radius: 20px; box-shadow: 0 18px 50px rgba(23,61,43,.1); min-height: 470px; overflow: hidden; position: relative; }
.region-picker-map { height: 470px; width: 100%; }
.region-picker-map.unavailable { align-items: center; color: var(--muted); display: flex; font-size: 13px; justify-content: center; padding: 30px; text-align: center; }
.region-selection-frame { border: 3px solid var(--forest); border-radius: 13px; box-shadow: 0 0 0 999px rgba(13,46,30,.2), inset 0 0 0 1px rgba(255,255,255,.8); inset: 12%; pointer-events: none; position: absolute; z-index: 500; }
.region-selection-frame > span { background: var(--mint-bright); border: 2px solid white; border-radius: 50%; height: 11px; position: absolute; width: 11px; }
.region-selection-frame > span:nth-child(1) { left: -7px; top: -7px; }
.region-selection-frame > span:nth-child(2) { right: -7px; top: -7px; }
.region-selection-frame > span:nth-child(3) { bottom: -7px; right: -7px; }
.region-selection-frame > span:nth-child(4) { bottom: -7px; left: -7px; }
.region-location-button { align-items: center; background: white; border: 1px solid rgba(23,61,43,.2); border-radius: 9px; box-shadow: 0 3px 14px rgba(23,61,43,.16); color: var(--forest); cursor: pointer; display: flex; font-size: 21px; height: 36px; justify-content: center; left: 12px; position: absolute; top: 12px; width: 36px; z-index: 600; }
.region-summary { align-items: center; background: var(--mint); border: 1px solid #c8e4d1; border-radius: 14px; display: flex; gap: 13px; padding: 14px 16px; }
.region-summary-icon { align-items: center; background: var(--forest); border-radius: 50%; color: white; display: flex; flex: 0 0 auto; font-size: 10px; height: 26px; justify-content: center; width: 26px; }
.region-summary > div { display: grid; gap: 3px; }
.region-summary b { font-size: 12px; }
.region-summary small { color: var(--forest-mid); font-size: 10px; }
.region-summary.is-error { background: #fff3f0; border-color: #eccbc5; }
.region-summary.is-error .region-summary-icon { background: var(--danger); }
.region-summary.is-error small { color: var(--danger); }
.coordinate-details { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; }
.coordinate-details summary { color: var(--forest-mid); cursor: pointer; font-size: 11px; font-weight: 800; }
.coordinate-details > p { color: var(--muted); font-size: 10px; margin: 12px 0; }
.coordinate-details .bbox-grid { margin-top: 14px; }
.generation-form .button:disabled { box-shadow: none; cursor: not-allowed; opacity: .45; transform: none; }
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.form-grid .wide-field { grid-column: 1 / -1; }
.form-grid textarea { min-height: 90px; resize: vertical; }
.upload-aside { align-self: start; background: var(--forest); border-radius: 22px; color: white; margin-top: 58px; padding: 30px; }
.conversion-status-card { background: white; border: 1px solid var(--line); border-radius: 24px; display: grid; gap: 20px; margin: 18px auto; max-width: 900px; padding: clamp(24px,5vw,52px); }
.conversion-status-card h1 { margin: 0; }
.conversion-status-card > p { margin: 0; }
.conversion-status-card > .status { justify-self: start; }
.conversion-status-card .detail-actions { justify-content: flex-start; }
.upload-aside h3 { font-size: 20px; margin-bottom: 28px; }
.upload-aside ol { display: grid; gap: 24px; list-style: none; margin: 0; padding: 0; }
.upload-aside li { display: grid; gap: 13px; grid-template-columns: 30px 1fr; }
.upload-aside li > span { align-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: var(--mint-bright); display: flex; font-size: 10px; height: 28px; justify-content: center; width: 28px; }
.upload-aside li b { font-size: 12px; }
.upload-aside li p { color: #a9c0b0; font-size: 11px; line-height: 1.5; margin: 5px 0 0; }
.georef-upload-layout { align-items: start; gap: clamp(32px,6vw,80px); }
.georef-upload-form { background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 55px rgba(22,56,39,.06); display: grid; gap: 20px; padding: clamp(22px,3vw,32px); }
.georef-upload-form > label:not(.drop-zone) { color: #35443a; display: grid; font-size: 12px; font-weight: 780; gap: 8px; }
.georef-upload-form > label:not(.drop-zone) input { background: #fbfcfa; border: 1px solid var(--line); border-radius: 11px; min-height: 48px; padding: 12px 14px; width: 100%; }
.georef-upload-form .drop-zone { min-height: 280px; }
.georef-upload-form .drop-zone strong { font-size: 16px; }
.georef-upload-form > .button { justify-self: start; margin: 0; }
.georef-upload-form .errorlist { color: var(--danger); font-size: 11px; list-style: none; margin: 0; padding: 0; }
.georef-upload-aside { margin-top: 0; padding: 34px 30px; }
.georef-upload-aside .aside-number { color: var(--mint-bright); display: block; font-size: 12px; font-weight: 850; margin-bottom: 8px; }
.georef-upload-aside h2 { color: white; font-size: 28px; line-height: 1.15; margin: 0 0 24px; }
.georef-upload-aside > p { color: #c0d1c5; font-size: 12px; line-height: 1.65; margin: 0; }
.aside-note { align-items: flex-start; background: rgba(255,255,255,.08); border-radius: 14px; display: flex; gap: 12px; margin-top: 30px; padding: 16px; }
.aside-note > span { color: var(--mint-bright); font-size: 20px; }
.aside-note p { color: #b7c9bd; font-size: 10px; line-height: 1.55; margin: 0; }
.aside-note b { color: white; }

/* Detail */
.detail-hero { align-items: center; background: linear-gradient(130deg,#eef5ed,#e2eee4); border: 1px solid #d3e0d5; border-radius: 24px; display: grid; gap: 30px; grid-template-columns: 140px 1fr auto; margin-bottom: 28px; overflow: hidden; padding: 36px; }
.detail-map-art { align-items: center; background: linear-gradient(150deg,#b8d2bd,#ddecdf); border-radius: 20px; color: var(--forest); display: flex; font-size: 17px; font-weight: 900; height: 130px; justify-content: center; overflow: hidden; position: relative; width: 130px; }
.detail-map-art i { border: 1px solid rgba(47,91,69,.28); border-radius: 50%; height: 90px; position: absolute; right: -45px; top: -20px; width: 90px; }
.detail-map-art i:nth-child(2) { bottom: -50px; left: -25px; top: auto; }
.detail-map-art i:nth-child(3) { height: 44px; left: 20px; top: 12px; width: 44px; }
.detail-title h1 { font-size: clamp(38px,5vw,60px); margin: 16px 0 12px; }
.detail-title > p { color: var(--muted); margin-bottom: 16px; }
.detail-actions { align-items: stretch; display: grid; gap: 9px; min-width: 210px; }
.detail-actions .button { justify-content: center; margin: 0; }
.detail-facts { color: var(--muted); display: flex; font-size: 10px; gap: 22px; }
.detail-facts span + span::before { color: #a7b3aa; content: "·"; margin-right: 22px; }
.detail-grid { display: grid; gap: 22px; grid-template-columns: 1fr 300px; }
.detail-viewer-panel { margin: 0 0 28px; }
.detail-viewer-head { align-items: end; display: flex; gap: 32px; justify-content: space-between; margin: 0 4px 16px; }
.detail-viewer-head h2 { font-size: 30px; margin: 7px 0 7px; }
.detail-viewer-head > div > p:last-child { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 0; }
.detail-panel, .danger-panel { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.panel-head { align-items: center; display: flex; justify-content: space-between; }
.panel-head h2 { font-size: 22px; margin: 0; }
.panel-head span { color: var(--forest-mid); font-size: 10px; font-weight: 750; }
.metadata { display: grid; gap: 1px; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 24px 0 0; }
.metadata div { border-top: 1px solid var(--line); min-width: 0; padding: 17px 0; }
.metadata div:nth-child(odd) { padding-right: 24px; }
.metadata dt { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.metadata dd { font-size: 12px; margin: 7px 0 0; overflow-wrap: anywhere; }
.metadata .wide-meta { grid-column: 1 / -1; padding-right: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px !important; }
.danger-panel h3 { font-size: 18px; }
.danger-panel p { color: var(--muted); font-size: 11px; line-height: 1.65; margin-bottom: 24px; }
.danger { background: white; border: 1px solid #ddb8b3; border-radius: 10px; color: var(--danger); cursor: pointer; font-size: 11px; font-weight: 800; min-height: 42px; padding: 0 15px; }

/* Personal map editing and viewer */
.edit-map-layout { align-items: start; display: grid; gap: clamp(40px,8vw,110px); grid-template-columns: minmax(0,1fr) 330px; }
.edit-map-layout h1 { margin: 12px 0 18px; }
.map-edit-form { background: white; border: 1px solid var(--line); border-radius: 20px; display: grid; gap: 20px; margin-top: 30px; padding: 28px; }
.map-edit-form input, .map-edit-form textarea { background: #fbfcfa; border: 1px solid var(--line); border-radius: 11px; min-height: 48px; padding: 12px 14px; width: 100%; }
.map-edit-form textarea { min-height: 130px; resize: vertical; }
.form-actions { align-items: center; display: flex; gap: 18px; justify-content: flex-end; }
.form-actions > a { color: var(--muted); font-size: 11px; font-weight: 750; }
.edit-map-note { align-items: center; background: var(--forest); border-radius: 20px; color: white; display: flex; gap: 16px; margin-top: 55px; padding: 24px; }
.edit-map-note > span { align-items: center; background: var(--mint); border-radius: 12px; color: var(--forest); display: flex; flex: 0 0 auto; font-size: 12px; font-weight: 900; height: 52px; justify-content: center; width: 52px; }
.edit-map-note > div { display: grid; gap: 6px; min-width: 0; }
.edit-map-note b { font-size: 12px; overflow-wrap: anywhere; }
.edit-map-note small { color: #b7c9bd; font-size: 9px; }
.viewer-head { align-items: end; display: flex; gap: 35px; justify-content: space-between; margin-bottom: 20px; }
.viewer-head h1 { font-size: clamp(34px,5vw,58px); margin: 14px 0 8px; }
.viewer-head p { color: var(--muted); margin: 0; }
.opacity-control { align-items: center; background: white; border: 1px solid var(--line); border-radius: 14px; display: grid; flex: 0 0 300px; gap: 8px; grid-template-columns: 1fr auto; padding: 14px 16px; }
.opacity-control span { font-size: 10px; font-weight: 800; grid-column: 1 / -1; }
.opacity-control input { accent-color: var(--forest); width: 100%; }
.opacity-control output { color: var(--forest); font-size: 11px; font-weight: 850; }
.library-map-viewer { background: #dfe9df; border: 1px solid #c5d2c7; border-radius: 20px; box-shadow: 0 20px 60px rgba(23,61,43,.1); height: min(68vh,760px); min-height: 520px; overflow: hidden; position: relative; }
.viewer-loading { background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 8px 28px rgba(23,61,43,.15); color: var(--forest); font-size: 11px; font-weight: 800; left: 50%; max-width: 420px; padding: 13px 17px; position: absolute; text-align: center; top: 18px; transform: translateX(-50%); z-index: 10; }
.viewer-loading.error { color: var(--danger); }
.viewer-bounds-hint { align-items: center; background: rgba(255,255,255,.94); border: 1px solid #dfc0ae; border-radius: 11px; bottom: 18px; box-shadow: 0 8px 28px rgba(23,61,43,.12); color: #713d27; display: flex; font-size: 10px; gap: 10px; left: 50%; line-height: 1.45; max-width: min(520px,calc(100% - 110px)); padding: 11px 14px; position: absolute; transform: translateX(-50%); z-index: 10; }
.viewer-bounds-hint[hidden] { display: none; }
.viewer-bounds-hint i { background: rgba(224,115,61,.12); border: 2px dashed #c34f24; border-radius: 3px; flex: 0 0 auto; height: 18px; width: 24px; }
.viewer-note { color: var(--muted); font-size: 10px; line-height: 1.55; margin: 12px 4px 0; }

/* Store */
.store-page .shell { max-width: 1440px; }
.store-hero { align-items: end; background: var(--forest); border-radius: 26px; color: white; display: grid; gap: 40px; grid-template-columns: minmax(0,1fr) auto; margin-bottom: 22px; overflow: hidden; padding: clamp(34px,5vw,66px); position: relative; }
.store-hero h1 { color: white; font-size: clamp(46px,6vw,76px); margin: 10px 0 20px; max-width: 850px; }
.store-hero p:not(.eyebrow) { color: #bad0c0; font-size: 16px; line-height: 1.7; margin: 0; max-width: 720px; }
.store-hero .eyebrow { color: var(--mint-bright); }
.store-hero-stat { align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 19px; display: flex; flex-direction: column; min-width: 150px; padding: 24px; text-align: center; }
.store-hero-stat b { color: var(--mint-bright); font-size: 44px; letter-spacing: -.05em; }
.store-hero-stat span { color: #b8cbbd; font-size: 10px; font-weight: 750; margin-top: 5px; }
.store-toolbar { align-items: end; background: white; border: 1px solid var(--line); border-radius: 18px; display: grid; gap: 12px; grid-template-columns: minmax(220px,1fr) 210px auto; margin-bottom: 18px; padding: 16px; }
.store-toolbar label { color: #35443a; display: grid; font-size: 10px; font-weight: 800; gap: 6px; }
.store-toolbar input, .store-toolbar select { background: #fbfcfa; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); min-height: 44px; outline: none; padding: 9px 12px; width: 100%; }
.store-toolbar input:focus, .store-toolbar select:focus { border-color: var(--forest-mid); box-shadow: 0 0 0 3px rgba(47,91,69,.1); }
.store-toolbar .button { min-height: 44px; }
.store-layout { align-items: start; display: grid; gap: 22px; grid-template-columns: minmax(310px,390px) minmax(0,1fr); }
.store-map-panel, .store-coverage { background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.store-map-panel { position: sticky; top: 18px; }
.store-map { background: #dfe9df; height: 520px; width: 100%; }
.store-map.unavailable { align-items: center; color: var(--muted); display: flex; font-size: 12px; justify-content: center; padding: 30px; text-align: center; }
.store-map-actions { display: grid; gap: 12px; padding: 14px; }
.store-map-actions p { color: var(--muted); font-size: 10px; line-height: 1.45; margin: 0; }
.store-map-actions a { color: var(--forest-mid); font-size: 10px; font-weight: 800; }
.store-map-controls { align-items: end; display: grid; gap: 10px; grid-template-columns: minmax(0,1fr) auto; margin: 0; }
.store-map-controls label { color: #35443a; display: grid; font-size: 10px; font-weight: 800; gap: 6px; }
.store-map-controls select { background: #fbfcfa; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); min-height: 42px; outline: none; padding: 8px 10px; width: 100%; }
.store-map-controls select:focus { border-color: var(--forest-mid); box-shadow: 0 0 0 3px rgba(47,91,69,.1); }
.store-map-controls .button { min-height: 42px; }
.store-map-popup { color: var(--forest); font-weight: 800; text-decoration: none; }
.store-map-popup-list > strong { color: var(--forest); display: block; font-size: 12px; margin-bottom: 8px; }
.store-map-popup-list ul { display: grid; gap: 5px; list-style: none; margin: 0; padding: 0; }
.store-map-popup-list li + li { border-top: 1px solid var(--line); padding-top: 5px; }
.store-map-popup-list .store-map-popup { display: block; font-size: 11px; line-height: 1.4; padding: 3px 0; }
.store-results { min-width: 0; }
.store-grid { display: grid; gap: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.store-card { background: white; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); display: flex; flex-direction: column; min-height: 300px; overflow: hidden; padding: 22px; text-decoration: none; transition: border-color .16s, box-shadow .16s, transform .16s; }
.store-card:hover { border-color: #aac1af; box-shadow: 0 18px 48px rgba(22,56,39,.09); transform: translateY(-2px); }
.store-card-preview { aspect-ratio: 16/9; border-radius: 13px; display: block; margin: -10px -10px 18px; object-fit: cover; width: calc(100% + 20px); }
.store-card-preview.placeholder { align-items: center; background: linear-gradient(135deg,#dce9dd,#b9d1c0); color: var(--forest); display: flex; font-size: 11px; font-weight: 800; justify-content: center; letter-spacing: .12em; }
.store-card-top, .store-card-footer { align-items: center; display: flex; justify-content: space-between; }
.store-format, .store-owned { background: var(--mint); border-radius: 999px; color: var(--forest); font-size: 9px; font-weight: 850; letter-spacing: .06em; padding: 7px 9px; text-transform: uppercase; }
.store-owned { background: var(--forest); color: white; letter-spacing: 0; text-transform: none; }
.store-card-body { flex: 1; padding: 27px 0 19px; }
.store-card-body h3 { font-size: 25px; margin: 8px 0 11px; }
.store-card-body > p:last-child { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.store-coverage-warning { align-items: flex-start; background: #fff8e9; border: 1px solid #eddfbf; border-radius: 10px; color: #765b22; display: flex; font-size: 9px; gap: 8px; line-height: 1.45; margin: 0 0 16px; padding: 10px 11px; }
.store-coverage-warning > span { align-items: center; background: #e8c878; border-radius: 50%; color: #604714; display: inline-flex; flex: 0 0 auto; font-size: 8px; font-weight: 900; height: 16px; justify-content: center; width: 16px; }
.detail-coverage-warning { margin: 14px 16px 16px; }
.store-card-facts { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,1fr); margin: 0; padding: 14px 0; }
.store-card-facts div + div { border-left: 1px solid var(--line); padding-left: 13px; }
.store-card-facts dt { color: var(--muted); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.store-card-facts dd { font-size: 11px; font-weight: 780; margin: 5px 0 0; }
.store-card-footer { padding-top: 17px; }
.store-card-footer strong { color: var(--forest); font-size: 17px; }
.store-card-footer span { color: var(--forest-mid); font-size: 10px; font-weight: 800; }
.store-empty { background: white; border: 1px dashed #b9c8bd; border-radius: 20px; padding: 70px 32px; text-align: center; }
.store-empty h2 { font-size: 34px; margin: 10px 0 12px; }
.store-empty > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; margin: 0 auto 24px; max-width: 520px; }
.store-pagination { align-items: center; display: flex; font-size: 11px; justify-content: center; margin-top: 24px; gap: 20px; }
.store-pagination a { color: var(--forest-mid); font-weight: 800; }
.store-pagination span { color: var(--muted); }
.store-detail-hero { align-items: center; background: linear-gradient(130deg,#edf5ec,#deece0); border: 1px solid #d2dfd3; border-radius: 25px; display: grid; gap: clamp(30px,6vw,90px); grid-template-columns: minmax(0,1fr) 300px; margin-bottom: 22px; padding: clamp(30px,5vw,62px); }
.store-detail-hero h1 { font-size: clamp(44px,6vw,72px); margin: 10px 0 18px; }
.store-detail-hero > div > p:not(.eyebrow) { color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 720px; }
.store-buy-card { background: white; border: 1px solid rgba(47,91,69,.14); border-radius: 20px; box-shadow: var(--shadow); display: grid; gap: 15px; padding: 25px; }
.store-buy-card > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.store-buy-card > strong { color: var(--forest); font-size: 32px; letter-spacing: -.04em; }
.store-buy-card form { margin: 0; }
.store-buy-card small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.store-buy-card .button:disabled { box-shadow: none; cursor: not-allowed; opacity: .55; }
.store-detail-grid { display: grid; gap: 22px; grid-template-columns: minmax(0,1.3fr) minmax(320px,.7fr); }
.store-about-preview { border-top: 1px solid var(--line); margin: 24px 0 0; padding-top: 20px; }
.store-about-preview > div { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.store-about-preview strong { color: var(--forest); font-size: 13px; }
.store-about-preview > div span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.store-about-preview img { border-radius: 12px; display: block; max-height: 360px; object-fit: cover; width: 100%; }
.store-about-preview figcaption { color: var(--muted); font-size: 9px; line-height: 1.55; margin-top: 11px; }
.rights-complaint { background: #fff; border: 1px solid var(--line); border-radius: 20px; margin-top: 22px; overflow: hidden; }
.rights-complaint > summary { align-items: center; color: var(--forest); cursor: pointer; display: flex; font-size: 12px; font-weight: 820; justify-content: space-between; list-style: none; padding: 18px 22px; }
.rights-complaint > summary::-webkit-details-marker { display: none; }
.rights-complaint > summary:hover { background: #f7faf6; }
.rights-complaint > summary i { border-bottom: 2px solid currentColor; border-right: 2px solid currentColor; height: 8px; margin: -4px 3px 0 20px; transform: rotate(45deg); transition: transform .2s ease; width: 8px; }
.rights-complaint[open] > summary { border-bottom: 1px solid var(--line); }
.rights-complaint[open] > summary i { margin-top: 4px; transform: rotate(225deg); }
.rights-complaint-body { display: grid; gap: 34px; grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); padding: clamp(24px,4vw,42px); }
.rights-complaint h2 { font-size: clamp(28px,4vw,40px); margin: 8px 0 14px; }
.rights-complaint-copy > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.rights-complaint-copy small { color: var(--muted); display: block; font-size: 9px; line-height: 1.6; margin-top: 22px; }
.rights-complaint-form { display: grid; gap: 13px; }
.rights-complaint-form > label:not(.rights-checkbox) { color: #35443a; display: grid; font-size: 11px; font-weight: 780; gap: 7px; }
.rights-complaint-form input:not([type="checkbox"]), .rights-complaint-form select, .rights-complaint-form textarea { background: #fbfcfa; border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 10px 12px; width: 100%; }
.rights-complaint-form textarea { min-height: 125px; resize: vertical; }
.rights-checkbox { align-items: flex-start; color: var(--muted); display: flex; font-size: 10px; gap: 9px; line-height: 1.5; }
.rights-checkbox input { margin-top: 2px; }
.rights-complaint-form .button { justify-self: start; }
.field-errors, .form-errors { color: #9b352e; font-size: 10px; }
.field-errors ul, .form-errors ul { margin: 0; padding-left: 17px; }
.store-coverage { display: flex; flex-direction: column; min-height: 0; padding: 0; }
.store-coverage .panel-head { padding: 23px 26px; }
.detail-store-map { flex: 1 1 auto; height: auto; min-height: 430px; }
.library-note .button { width: 100%; }

@media (max-width: 960px) {
  .user-chip { display: none; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: 470px; }
  .auth-card { max-width: 620px; padding-bottom: 60px; padding-top: 60px; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .backup-overview { grid-template-columns: 1fr 1fr; }
  .storage-card { grid-column: 1 / -1; }
  .upload-layout { grid-template-columns: 1fr; }
  .upload-aside { margin-top: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-viewer-head { align-items: stretch; flex-direction: column; }
  .detail-viewer-head .opacity-control { flex-basis: auto; width: 100%; }
  .map-row-main { grid-template-columns: 58px 1fr 130px; }
  .map-size { display: none; }
  .store-layout { grid-template-columns: 1fr; }
  .store-map-panel { position: static; }
  .store-map { height: 390px; }
  .store-detail-grid { grid-template-columns: 1fr; }
  .detail-store-map { flex: none; height: 390px; min-height: 390px; }
  .rights-complaint-body { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .topbar { height: 66px; padding: 0 16px; }
  .mobile-menu { background: transparent; border: 1px solid var(--line); border-radius: 9px; color: inherit; display: block; height: 36px; width: 40px; }
  .topbar nav { align-items: stretch; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: none; flex-direction: column; gap: 15px; padding: 20px; position: absolute; right: 16px; top: 58px; width: 230px; }
  .topbar nav.open { display: flex; }
  .auth-page .topbar nav { background: var(--forest); border-color: rgba(255,255,255,.1); }
  .topbar nav .user-chip { display: flex; }
  .shell { padding: 42px 17px 75px; }
  .account-footer { align-items: flex-start; flex-direction: column; gap: 12px; margin: 0 17px; }
  .account-footer-links { justify-content: flex-start; }
  .auth-page .shell { padding: 20px 12px 55px; }
  .auth-layout { border-radius: 20px; }
  .auth-story { min-height: 410px; padding: 38px 26px; }
  .auth-story h1 { font-size: 42px; }
  .auth-card, .recovery-card { padding: 38px 24px; }
  .auth-card h2 { font-size: 34px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 32px; }
  .library-create-actions, .library-create-menu, .library-create-menu > summary { width: 100%; }
  .library-create-menu > summary { justify-content: center; }
  .library-create-popover { left: 0; min-width: 0; right: auto; width: 100%; }
  .page-head h1 { font-size: 50px; }
  .overview-grid { grid-template-columns: 1fr 1fr; margin-bottom: 42px; }
  .metric-card { align-items: flex-start; flex-direction: column; }
  .section-bar > a { display: none; }
  .map-row { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px; }
  .map-row-main { grid-template-columns: 50px minmax(0,1fr); }
  .backup-row-main { grid-template-columns: 50px minmax(0,1fr); }
  .map-thumb { height: 50px; width: 50px; }
  .map-status-cell { grid-column: 2; }
  .map-row-actions { justify-content: flex-end; }
  .map-row-actions > a:not(.row-open) { flex: 1; text-align: center; }
  .map-row-actions form { flex: 1; }
  .map-row-delete { width: 100%; }
  .edit-map-layout { grid-template-columns: 1fr; }
  .edit-map-note { margin-top: 0; }
  .viewer-head { align-items: stretch; flex-direction: column; }
  .opacity-control { flex-basis: auto; width: 100%; }
  .library-map-viewer { height: 62vh; min-height: 430px; }
  .viewer-bounds-hint { bottom: 12px; max-width: calc(100% - 24px); width: max-content; }
  .form-grid { grid-template-columns: 1fr; }
  .bbox-grid { grid-template-columns: 1fr 1fr; }
  .region-picker-shell { min-height: 390px; }
  .region-picker-map { height: 390px; }
  .drop-zone { min-height: 220px; padding: 25px 18px; }
  .upload-aside { padding: 24px; }
  .detail-hero { align-items: flex-start; grid-template-columns: 90px 1fr; padding: 22px; }
  .detail-map-art { height: 85px; width: 85px; }
  .detail-actions { grid-column: 1 / -1; }
  .detail-actions .button { width: 100%; }
  .detail-facts { flex-wrap: wrap; gap: 9px 14px; }
  .detail-facts span + span::before { margin-right: 14px; }
  .metadata { grid-template-columns: 1fr; }
  .metadata .wide-meta { grid-column: auto; }
  .metadata div:nth-child(odd) { padding-right: 0; }
  .store-hero { align-items: start; grid-template-columns: 1fr; padding: 32px 24px; }
  .store-hero h1 { font-size: 44px; }
  .store-hero-stat { align-items: baseline; flex-direction: row; gap: 10px; min-width: 0; padding: 14px 17px; }
  .store-hero-stat b { font-size: 28px; }
  .store-toolbar { grid-template-columns: 1fr 1fr; }
  .store-search { grid-column: 1 / -1; }
  .store-toolbar .button { grid-column: 1 / -1; }
  .store-grid { grid-template-columns: 1fr; }
  .store-map { height: 330px; }
  .store-map-controls { grid-template-columns: 1fr; }
  .store-map-controls .button { width: 100%; }
  .detail-store-map { height: 330px; min-height: 330px; }
  .store-detail-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .store-detail-hero h1 { font-size: 42px; }
  .store-buy-card { padding: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.georef-head { align-items: flex-start; display: flex; gap: 24px; justify-content: space-between; margin-bottom: 24px; }
.georef-head h1 { font-size: clamp(38px,5vw,66px); margin: 5px 0 10px; }
.georef-head p { color: var(--muted); margin: 0; }
.georef-workspace { background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 55px rgba(22,56,39,.07); overflow: hidden; }
.georef-toolbar { align-items: start; background: #f8faf7; border-bottom: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: minmax(260px,1fr) minmax(280px,1fr) auto; padding: 14px 18px; }
.georef-toolbar label { color: var(--muted); display: grid; font-size: 11px; font-weight: 750; gap: 5px; max-width: none; min-width: 0; text-transform: uppercase; }
.georef-toolbar select { background: white; border: 1px solid var(--line); border-radius: 10px; max-width: 100%; min-width: 0; padding: 10px; text-transform: none; width: 100%; }
.georef-toolbar label small { font-size: 9px; font-weight: 500; line-height: 1.35; text-transform: none; }
.georef-transform-field { max-width: none !important; }
.georef-toolbar-meta { align-items: center; align-self: start; display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.georef-tool-button, .georef-preview-bar > button { background: white; border: 1px solid var(--line); border-radius: 11px; color: var(--forest); cursor: pointer; font-size: 11px; font-weight: 800; min-height: 42px; padding: 0 15px; white-space: nowrap; }
.georef-tool-button:hover, .georef-preview-bar > button:hover:not(:disabled) { border-color: var(--forest-mid); }
.georef-tool-button.danger { border-color: #e5bbb4; color: var(--danger); }
.georef-tool-button:disabled { cursor: not-allowed; opacity: .38; }
.georef-preview-bar { align-items: center; background: #fbfcfa; border-bottom: 1px solid var(--line); display: grid; gap: 18px; grid-template-columns: auto minmax(190px,260px) minmax(250px,1fr); min-height: 72px; padding: 12px 18px; }
.georef-preview-bar > button.is-active { background: var(--forest); border-color: var(--forest); color: white; }
.georef-preview-bar > button:disabled { cursor: not-allowed; opacity: .42; }
.georef-preview-opacity { align-items: center; display: grid; gap: 4px 9px; grid-template-columns: minmax(110px, 190px) auto; }
.georef-preview-opacity[hidden] { display: none; }
.georef-preview-opacity span { color: var(--muted); font-size: 9px; font-weight: 750; grid-column: 1 / -1; }
.georef-preview-opacity input { accent-color: var(--forest); margin: 0; width: 100%; }
.georef-preview-opacity output { color: var(--forest); font-size: 10px; font-weight: 850; }
.georef-quality { display: grid; gap: 4px; justify-self: end; max-width: 480px; text-align: right; }
.georef-quality strong { color: var(--forest); font-size: 12px; }
.georef-quality small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.georef-quality.is-warning strong { color: #a36b15; }
.georef-quality.is-bad strong { color: var(--danger); }
.georef-progress { display: grid; min-width: 82px; }
.georef-progress strong { color: var(--forest); font-size: 24px; line-height: 1; }
.georef-progress span { color: var(--muted); font-size: 10px; }
.georef-panels { display: grid; grid-template-columns: 1fr 1fr; min-height: 620px; }
.georef-panel { min-width: 0; position: relative; }
.georef-panel + .georef-panel { border-left: 1px solid var(--line); }
.georef-panel-title { align-items: center; background: rgba(255,255,255,.94); display: flex; gap: 9px; left: 12px; padding: 8px 10px; position: absolute; top: 12px; z-index: 5; }
.georef-panel-title b { align-items: center; background: var(--forest); border-radius: 50%; color: white; display: flex; height: 23px; justify-content: center; width: 23px; }
.georef-panel-title span { font-size: 11px; font-weight: 750; }
.georef-map, .georef-image-viewport { height: 620px; position: relative; width: 100%; }
.georef-warp-preview { inset: 0; pointer-events: none; position: absolute; z-index: 1; }
.georef-image-viewport { background: #20241f; cursor: grab; overflow: hidden; touch-action: none; }
.georef-image-stage { left: 0; position: absolute; top: 0; transform-origin: 0 0; }
.georef-image-stage > img { display: block; height: 100%; user-select: none; width: 100%; }
.georef-image-stage > div { inset: 0; pointer-events: none; position: absolute; }
.georef-pin { align-items: center; background: #d85e35; border: 2px solid white; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.35); color: white; cursor: move; display: flex; font-size: 10px; font-weight: 850; height: 25px; justify-content: center; padding: 0; position: absolute; transform: translate(-50%,-50%); width: 25px; z-index: 4; }
.maplibregl-marker .georef-pin { left: 0; position: relative; top: 0; transform: none; }
.georef-pin.pending { background: #e4a92f; }
.georef-pin.quality-warning { background: #d99725; }
.georef-pin.quality-bad { background: var(--danger); }
[data-image-points] .georef-pin { pointer-events: auto; transform: translate(-50%,-50%) scale(var(--georef-pin-scale,1)); transform-origin: center; }
.georef-footer { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; min-height: 72px; padding: 14px 18px; }
.georef-footer p { color: var(--muted); font-size: 12px; margin: 0; }
.georef-footer p.error { color: var(--danger); }
.georef-actions form { margin: 0; }
.georef-delete { display: flex; justify-content: flex-end; margin-top: 14px; }

@media (max-width: 900px) {
  .library-search { align-items: stretch; grid-template-columns: 1fr; }
  .library-search .button { width: 100%; }
  .library-search > a { justify-self: start; }
  .georef-toolbar { align-items: stretch; grid-template-columns: 1fr; }
  .georef-toolbar label { max-width: none; width: 100%; }
  .georef-transform-field { max-width: none !important; }
  .georef-toolbar-meta { justify-content: flex-start; margin-top: 0; }
  .georef-preview-bar { align-items: stretch; grid-template-columns: 1fr; }
  .georef-preview-opacity { width: 100%; }
  .georef-quality { justify-self: stretch; max-width: none; text-align: left; }
  .georef-panels { grid-template-columns: 1fr; }
  .georef-panel + .georef-panel { border-left: 0; border-top: 1px solid var(--line); }
  .georef-map, .georef-image-viewport { height: 480px; }
  .georef-footer { align-items: stretch; flex-direction: column; }
}

.legal-page .shell { max-width: 1050px; }
.legal-document { background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 60px rgba(22,56,39,.06); overflow: hidden; }
.legal-document > header { background: linear-gradient(130deg,#edf5ec,#deece0); border-bottom: 1px solid #d2dfd3; padding: clamp(34px,6vw,68px); }
.legal-document > header h1 { font-size: clamp(42px,6vw,68px); margin: 10px 0 14px; }
.legal-document > header > p:last-child { color: var(--muted); margin: 0; }
.legal-document > section { padding: 28px clamp(24px,6vw,68px); }
.legal-document > section + section { border-top: 1px solid var(--line); }
.legal-document h2 { color: var(--forest); font-size: 24px; margin: 0 0 14px; }
.legal-document p, .legal-document li { color: #46554b; font-size: 13px; line-height: 1.75; }
.legal-document ul { margin: 0; padding-left: 22px; }
.legal-document a { color: var(--forest-mid); overflow-wrap: anywhere; }

.pricing-hero { margin: 35px auto 34px; max-width: 820px; text-align: center; }
.pricing-hero h1 { font-size: clamp(42px,6vw,72px); line-height: .98; margin: 12px 0 20px; }
.pricing-hero > p:last-child { color: var(--muted); line-height: 1.7; }
.pricing-grid { align-items: stretch; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); }
.pricing-card { background: white; border: 1px solid var(--line); border-radius: 24px; display: flex; flex-direction: column; min-height: 410px; padding: 26px; position: relative; }
.pricing-card.featured { border-color: var(--forest); box-shadow: 0 18px 55px rgba(22,56,39,.12); }
.pricing-card h2 { font-size: 28px; margin: 7px 0 8px; }
.pricing-card > p:not(.eyebrow) { color: var(--muted); font-size: 11px; min-height: 34px; }
.pricing-storage { color: var(--forest); font-size: 21px; margin: 12px 0; }
.pricing-price { align-items: baseline; display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0; }
.pricing-price b { font-size: 28px; }
.pricing-price s, .pricing-price span, .pricing-card > small { color: var(--muted); font-size: 10px; }
.pricing-card ul { color: #46554b; flex: 1; font-size: 11px; line-height: 1.6; margin: 20px 0; padding-left: 19px; }
.pricing-card .button { width: 100%; }
.pricing-badge { background: #e4f7e9; border-radius: 999px; color: var(--forest); font-size: 9px; font-weight: 850; padding: 8px 11px; position: absolute; right: 18px; top: 18px; }
.pricing-note { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 25px auto; max-width: 760px; text-align: center; }
.checkout-layout { display: grid; min-height: 65vh; place-items: center; }
.checkout-card { max-width: 560px; width: 100%; }
.checkout-card h1 { font-size: 42px; margin: 8px 0; }
.checkout-card form { display: grid; gap: 18px; }
.checkout-card label { display: grid; gap: 7px; }
.checkout-card label > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.checkout-card select, .checkout-card input { background: white; border: 1px solid var(--line); border-radius: 12px; min-height: 48px; padding: 10px 13px; }
.checkout-card .checkout-consent { align-items: center; display: flex; }
.checkout-card .checkout-consent input { min-height: 18px; padding: 0; width: 18px; }
.checkout-consent a { color: var(--forest-mid); }
.checkout-quota { color: var(--forest-mid); font-size: 20px; font-weight: 800; }
.checkout-total { background: #f0f6ef; border-radius: 15px; display: grid; gap: 4px; padding: 17px; }
.checkout-total span, .checkout-total small { color: var(--muted); font-size: 10px; }
.checkout-total strong { font-size: 30px; }
.payment-result { margin: 70px auto; max-width: 620px; text-align: center; }
.billing-list article { align-items: center; display: grid; gap: 18px; grid-template-columns: minmax(0,1fr) auto auto; padding: 18px 22px; }
@media (max-width: 650px) { .pricing-grid { grid-template-columns: 1fr; } .billing-list article { align-items: start; grid-template-columns: 1fr; } }

/* Community finds */
.community-page .shell { max-width: 1240px; }
.community-hero { align-items: end; display: flex; gap: 28px; justify-content: space-between; margin: 34px 0 26px; }
.community-hero h1 { font-size: clamp(40px,5.5vw,70px); line-height: 1; margin: 10px 0 14px; max-width: 850px; }
.community-hero > div > p:last-child { color: var(--muted); line-height: 1.6; max-width: 760px; }
.community-hero-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.community-sort { background: white; border: 1px solid var(--line); border-radius: 999px; display: inline-flex; gap: 4px; margin-bottom: 24px; padding: 4px; }
.community-sort a { border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 800; padding: 10px 18px; text-decoration: none; }
.community-sort a.active { background: var(--forest); color: white; }
.finding-grid { display: grid; gap: 18px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.finding-card { background: white; border: 1px solid var(--line); border-radius: 21px; overflow: hidden; }
.finding-photo { aspect-ratio: 4 / 3; background: #e5ebe4; display: block; overflow: hidden; }
.finding-photo img { height: 100%; object-fit: cover; transition: transform .25s ease; width: 100%; }
.finding-card:hover .finding-photo img { transform: scale(1.025); }
.finding-card-body { padding: 20px; }
.finding-card-meta { color: var(--muted); display: flex; font-size: 9px; justify-content: space-between; }
.finding-card h2 { font-size: 21px; line-height: 1.15; margin: 10px 0; }
.finding-card h2 a { color: inherit; text-decoration: none; }
.finding-card p { color: #58675d; font-size: 11px; line-height: 1.6; min-height: 52px; }
.finding-tags, .finding-awards { display: flex; flex-wrap: wrap; gap: 6px; }
.finding-tags > span:not(.achievement-medal), .finding-tags > strong, .finding-awards > span { background: #edf4ec; border-radius: 999px; color: var(--forest); font-size: 8px; font-weight: 800; padding: 7px 9px; }
.finding-tags > strong, .finding-awards > span { background: #fff1d5; color: #835a12; }
.finding-detail { background: white; border: 1px solid var(--line); border-radius: 25px; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(340px,.7fr); margin-top: 22px; overflow: hidden; }
.finding-detail-photo { background: #e5ebe4; min-height: 650px; }
.finding-detail-photo img { height: 100%; object-fit: contain; width: 100%; }
.finding-detail-copy { padding: clamp(28px,4vw,54px); }
.finding-detail-copy h1 { font-size: clamp(38px,4vw,58px); line-height: 1; margin: 12px 0; }
.finding-author { color: var(--muted); font-size: 10px; }
.finding-description { color: #435349; font-size: 13px; line-height: 1.75; margin: 28px 0; }
.finding-facts { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; margin: 24px 0; }
.finding-facts div { display: flex; justify-content: space-between; padding: 12px 0; }
.finding-facts div + div { border-top: 1px solid var(--line); }
.finding-facts dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.finding-facts dd { font-size: 11px; margin: 0; text-align: right; }
.finding-report { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 18px; }
.finding-report summary { color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 750; }
.finding-report form { display: grid; gap: 12px; margin-top: 15px; }
.finding-report label { display: grid; font-size: 10px; gap: 6px; }
.finding-report select, .finding-report textarea { border: 1px solid var(--line); border-radius: 10px; min-height: 42px; padding: 9px; }
.community-form-shell { background: white; border: 1px solid var(--line); border-radius: 25px; margin: 35px auto; max-width: 900px; overflow: hidden; }
.community-form-shell > header { background: #edf4ec; padding: 36px; }
.community-form-shell h1 { font-size: 45px; margin: 9px 0; }
.community-form-shell header > p:last-child { color: var(--muted); }
.community-form { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; padding: 36px; }
.community-form label { display: grid; font-size: 10px; font-weight: 750; gap: 7px; }
.community-form .wide { grid-column: 1 / -1; }
.community-form input, .community-form select, .community-form textarea { background: #fbfcfa; border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 10px; width: 100%; }
.privacy-note { background: #edf4ec; border-radius: 13px; display: grid; gap: 5px; padding: 16px; }
.privacy-note span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.personal-finding-list { background: white; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.personal-finding-list article { align-items: center; display: grid; gap: 18px; grid-template-columns: 100px minmax(0,1fr) auto; padding: 14px 18px; }
.personal-finding-list article + article { border-top: 1px solid var(--line); }
.personal-finding-list img { border-radius: 12px; height: 74px; object-fit: cover; width: 100px; }
.personal-finding-list h2 { font-size: 18px; margin: 0 0 6px; }
.personal-finding-list p, .personal-finding-list small { color: var(--muted); font-size: 9px; }
.personal-finding-actions { display: flex; gap: 8px; }
.finding-card-meta a, .finding-author a { color: inherit; font-weight: 750; }
.achievement-showcase { align-items: center; background: linear-gradient(120deg,#fff,#f1f6ef); border: 1px solid var(--line); border-radius: 22px; display: flex; gap: 28px; justify-content: space-between; margin: 0 0 24px; padding: 22px 25px; }
.achievement-showcase h2 { font-size: 25px; margin: 5px 0 0; }
.achievement-list { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.achievement-showcase .achievement-list { justify-content: flex-end; margin: 0; }
.achievement-medal { align-items: center; background: #f5eee2; border: 1px solid #bd8755; border-radius: 16px; display: inline-flex; gap: 10px; padding: 7px 11px 7px 7px; }
.achievement-medal.silver { background: #eef1f2; border-color: #98a5aa; }
.achievement-medal.gold { background: #fff4cc; border-color: #c79720; }
.achievement-medal.platinum { background: linear-gradient(135deg,#edf7f4,#dfe8f1); border-color: #6e9694; box-shadow: 0 4px 16px rgba(20,63,45,.12); }
.achievement-medal-icon { display: block; height: 42px; position: relative; width: 42px; }
.achievement-medal-icon img { display: block; height: 100%; width: 100%; }
.achievement-medal-icon b { background: var(--forest); border: 2px solid white; border-radius: 999px; bottom: -5px; color: white; font-size: 8px; line-height: 18px; min-width: 20px; padding: 0 3px; position: absolute; right: -7px; text-align: center; }
.achievement-medal-copy { display: grid; gap: 2px; max-width: 150px; }
.achievement-medal-copy strong { color: var(--forest); font-size: 10px; line-height: 1.25; }
.achievement-medal-copy small { color: var(--muted); font-size: 8px; }
.achievement-medal.compact { background: transparent; border: 0; padding: 0 4px; }
.achievement-medal.compact .achievement-medal-icon { height: 31px; width: 31px; }
.achievement-medal.compact .achievement-medal-icon b { bottom: -4px; font-size: 7px; line-height: 15px; min-width: 17px; right: -5px; }
.author-hero { margin-bottom: 18px; }
.leaflet-control-attribution a[href^="https://leafletjs.com"] svg { display: none !important; }
@media (max-width: 900px) { .finding-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .finding-detail { grid-template-columns: 1fr; } .finding-detail-photo { min-height: 420px; } }
@media (max-width: 650px) { .community-hero { align-items: stretch; flex-direction: column; } .community-hero-actions { flex-direction: column; } .finding-grid { grid-template-columns: 1fr; } .community-form { grid-template-columns: 1fr; padding: 22px; } .community-form .wide { grid-column: auto; } .personal-finding-list article { align-items: start; grid-template-columns: 70px 1fr; } .personal-finding-list img { height: 60px; width: 70px; } .personal-finding-actions { grid-column: 1 / -1; } .achievement-showcase { align-items: flex-start; flex-direction: column; } .achievement-showcase .achievement-list { justify-content: flex-start; } }
