@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #181715;
  --muted: #6f6962;
  --faint: #8d857c;
  --paper: #f6f3ed;
  --panel: #fbfaf7;
  --line: #ded9d0;
  --amber: #ed6b2f;
  --amber-dark: #bd3d1c;
  --magenta: #bb316b;
  --violet: #6d3d8d;
  --navy: #161a22;
  --score-blue: #2e6cb0;
  --score-green: #38b88a;
  --ease: cubic-bezier(.2,.8,.2,1);
  --topbar: 66px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: "DM Sans", sans-serif; color: var(--ink); font-size: 15px; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--amber-dark); }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  height: var(--topbar); display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  border-bottom: 1px solid rgba(0,0,0,.1); background: rgba(251,250,247,.96); position: relative; z-index: 1000;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font: 700 20px/1 "Manrope"; letter-spacing: -.6px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: url('/assets/favicon.svg') center/cover no-repeat; box-shadow: 0 2px 6px rgba(0,0,0,.18); flex: 0 0 auto; }
.brand-mark span { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.data-status { font-size: 13px; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; margin-right: 8px; }
.data-status i, .system-online i { width: 7px; height: 7px; background: #57a475; display: inline-block; border-radius: 50%; box-shadow: 0 0 0 4px rgba(87,164,117,.12); }
.ghost-button, .primary-button { border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 600; font-size: 14px; transition: .2s var(--ease); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2; }
.ghost-button { background: transparent; color: var(--ink); }
.ghost-button:hover { background: #ece8df; }
.ghost-button.danger { color: #a4382a; }
.ghost-button.danger:hover { background: #f6e2dc; }
.donate-link { color: var(--magenta); }
.primary-button { color: white; background: linear-gradient(135deg,#e56b32,#c84235); box-shadow: 0 7px 18px rgba(190,62,31,.18); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(190,62,31,.28); }
.primary-button:disabled { opacity: .7; transform: none; cursor: progress; }
.primary-button.compact { padding: 10px 16px; }
.primary-button.full { width: 100%; padding: 14px; font-size: 15px; }
.link-button { border: 0; background: none; padding: 0; color: var(--amber-dark); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Layout */
.app-shell { height: calc(100vh - var(--topbar)); height: calc(100dvh - var(--topbar)); display: grid; grid-template-columns: 430px minmax(0,1fr); overflow: hidden; }
.forecast-panel { background: var(--panel); overflow-y: auto; position: relative; z-index: 500; box-shadow: 8px 0 30px rgba(29,24,18,.09); display: flex; flex-direction: column; }
.sheet-handle, .sheet-backdrop { display: none; }
.location-block { padding: 22px 28px 16px; border-bottom: 1px solid var(--line); }
.eyebrow, .dialog-kicker { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; }
.location-row { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.location-text { min-width: 0; }
.location-text strong { display: block; font: 600 21px/1.3 "Manrope"; letter-spacing: -.4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-text small { color: var(--muted); font-size: 12px; }
.round-icon { width: 38px; height: 38px; border: 1px solid var(--line); background: white; display: grid; place-items: center; border-radius: 50%; font-size: 19px; flex: 0 0 auto; color: var(--ink); transition: .2s; }
.round-icon:hover { border-color: var(--amber); color: var(--amber-dark); }
.round-icon.busy { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.search-form { position: relative; margin-top: 12px; display: flex; }
.search-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px 0 0 8px; padding: 10px 12px; background: white; outline: none; font-size: 14px; }
.search-form input:focus { border-color: #d56b43; box-shadow: 0 0 0 3px rgba(213,107,67,.12); }
.search-form > button { border: 1px solid var(--line); border-left: 0; background: #f1ede6; border-radius: 0 8px 8px 0; padding: 0 14px; color: var(--ink); }
.search-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.14); z-index: 20; max-height: 260px; overflow: auto; }
.search-results button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; }
.search-results button:hover { background: #f4f0e9; }
.search-results strong, .search-results small { display: block; }
.search-results strong { font-size: 13px; }
.search-results small { color: var(--faint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-status { padding: 10px; color: var(--muted); font-size: 13px; }

.hero-forecast { padding: 22px 28px 0; }
.score-wrap { display: grid; grid-template-columns: 118px 1fr; gap: 20px; align-items: center; }
.score-ring { width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--amber) calc(var(--score, 0)*1%), #e7e2da 0); position: relative; transition: background .5s; }
.score-ring::before { content: ""; width: 96px; height: 96px; position: absolute; background: var(--panel); border-radius: 50%; }
.score-ring > div { position: relative; text-align: center; }
.score-ring strong { font: 500 40px/1 "Manrope"; letter-spacing: -2px; display: block; }
.score-ring small { font-size: 11px; color: var(--faint); }
.tier-pill { display: inline-block; color: var(--amber-dark); background: #f8dfd2; border-radius: 4px; padding: 4px 8px; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.tier-pill.muted { color: #5b6a7a; background: #e4e9ee; }
.score-copy h1 { font: 600 23px/1.15 "Manrope"; margin: 8px 0 6px; letter-spacing: -.8px; }
.score-copy p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
.sunset-row { margin-top: 22px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 11px; }
.sun-icon { color: var(--amber); font-size: 25px; }
.sunset-row small, .sunset-row strong { display: block; }
.sunset-row small { font-size: 10px; color: var(--faint); letter-spacing: .8px; font-weight: 700; }
.sunset-row strong { font: 600 16px "Manrope"; }
.sunset-note { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
.timeline-section, .ingredients-section { padding: 22px 28px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 1.1px; }
.section-heading button { color: var(--amber-dark); border: 0; background: none; font-size: 12px; padding: 0; font-weight: 600; }
.day-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; margin-top: 14px; }
.day-tabs button { border: 0; background: transparent; padding: 8px 3px 10px; border-radius: 8px; position: relative; color: var(--muted); }
.day-tabs button.active { background: white; color: var(--ink); box-shadow: 0 2px 13px rgba(32,27,22,.07); }
.day-tabs small, .day-tabs strong { display: block; }
.day-tabs small { font-size: 11px; }
.day-tabs strong { font: 600 13px "Manrope"; margin-top: 3px; }
.day-tabs i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #ccc6bd; margin-top: 6px; }
.day-tabs button.active i { background: var(--amber); }
.scrubber { margin-top: 16px; }
.scrubber-labels { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; }
.scrubber-labels strong { color: #5d5751; font-size: 12px; }
input[type=range] { accent-color: var(--amber); width: 100%; }
.scrubber input { margin: 9px 0 0; height: 3px; }
.ingredient-grid { display: grid; gap: 12px; margin-top: 14px; }
.ingredient { display: grid; grid-template-columns: 30px 1fr 78px; gap: 10px; align-items: center; }
.ingredient-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; }
.ingredient-icon.cloud { color: #75527f; background: #eee6f0; }
.ingredient-icon.path { color: #ba582e; background: #f6e5d9; }
.ingredient-icon.rain { color: #58788b; background: #e3edf1; }
.ingredient-icon.aerosol { color: #9a6b20; background: #f5ead0; }
.ingredient small, .ingredient strong { display: block; }
.ingredient small { color: var(--faint); font-size: 11px; }
.ingredient strong { font: 600 13px "Manrope"; }
.mini-bar { height: 4px; border-radius: 2px; background: #e7e2da; overflow: hidden; }
.mini-bar i { height: 100%; display: block; width: 0; border-radius: inherit; transition: width .4s; background: linear-gradient(90deg,#dc7440,#b83c51); }
.notify-card { margin: 20px 28px 12px; width: calc(100% - 56px); display: grid; grid-template-columns: 34px 1fr 20px; gap: 12px; align-items: center; background: #201c1d; color: white; text-align: left; border: 0; border-radius: 10px; padding: 15px; }
.notify-card .bell { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg,#e8753d,#9f3266); display: grid; place-items: center; }
.notify-card strong, .notify-card small { display: block; }
.notify-card strong { font: 600 14px "Manrope"; }
.notify-card small { color: #aaa2a3; font-size: 11px; margin-top: 3px; line-height: 1.35; }
.notify-card .arrow { color: #e28557; }
.panel-footer { margin-top: auto; padding: 12px 28px 22px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--faint); font-size: 12px; }
.panel-footer a { color: var(--magenta); text-decoration: none; font-weight: 600; }

/* Map */
.map-wrap { position: relative; min-width: 0; background: #1e2528; isolation: isolate; }
#map { width: 100%; height: 100%; background: #263035; }
.leaflet-control-attribution { font-size: 10px !important; background: rgba(255,255,255,.75) !important; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 5px 18px rgba(0,0,0,.2) !important; }
.leaflet-control-zoom a { color: #312c29 !important; }
.map-top-left { position: absolute; z-index: 600; top: 18px; left: 18px; display: flex; gap: 10px; align-items: center; }
.layer-switch, .overlay-switch { background: rgba(250,249,245,.94); padding: 4px; border-radius: 8px; box-shadow: 0 5px 18px rgba(0,0,0,.18); display: inline-flex; }
.layer-switch button, .overlay-switch button { border: 0; background: transparent; color: #625d57; font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.layer-switch button.active, .overlay-switch button.active { background: #262323; color: white; }
.satellite-age { color: white; font-size: 11px; background: rgba(25,24,24,.68); backdrop-filter: blur(8px); border-radius: 6px; padding: 8px 10px; white-space: nowrap; }
.satellite-age i { display: inline-block; width: 6px; height: 6px; background: #70d091; border-radius: 50%; margin-right: 4px; }
.overlay-control { position: absolute; z-index: 600; bottom: 26px; left: 18px; width: 262px; display: grid; gap: 8px; }
.overlay-legend { background: rgba(250,249,245,.94); backdrop-filter: blur(10px); padding: 12px 14px 10px; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,.19); }
.legend-title { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #3d3833; }
.legend-title span:last-child { color: var(--faint); letter-spacing: 0; font-weight: 600; }
.gradient { height: 8px; border-radius: 5px; margin: 8px 0 5px; }
.gradient.potential { background: linear-gradient(90deg,#344680,#2e6cb0,#2296b0,#38b88a,#80d454,#daf046); }
.gradient.clouds { background: linear-gradient(90deg,#7a8480,#aeac8b,#f1b03f,#e95d2d,#a72d59,#5b2b7e); }
.gradient-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.min-slider { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.min-slider input { flex: 1; height: 3px; margin: 0; }
.legend-help { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.35; }
.map-hint { position: absolute; z-index: 600; bottom: 28px; right: 18px; background: rgba(24,23,23,.72); color: #e7e2de; padding: 8px 10px; border-radius: 6px; font-size: 11px; backdrop-filter: blur(8px); }
.mobile-panel-toggle { display: none; }
.location-marker { background: white; border: 3px solid #d95735; width: 18px !important; height: 18px !important; border-radius: 50%; box-shadow: 0 0 0 5px rgba(217,87,53,.22), 0 4px 12px rgba(0,0,0,.4); }

/* Dialogs */
dialog { border: 0; padding: 0; border-radius: 14px; background: transparent; box-shadow: 0 25px 70px rgba(0,0,0,.35); max-width: min(440px,calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; }
dialog::backdrop { background: rgba(20,17,18,.66); backdrop-filter: blur(4px); }
.dialog-card { background: #fbfaf7; width: 430px; max-width: 100%; padding: 30px; position: relative; }
.dialog-close { position: absolute; right: 12px; top: 10px; border: 0; background: none; color: #716a63; font-size: 26px; line-height: 1; padding: 6px 10px; }
.dialog-card h2 { font: 600 26px/1.15 "Manrope"; margin: 9px 0; letter-spacing: -1px; }
.dialog-card > p, .about-card p { color: #605953; font-size: 14px; line-height: 1.55; }
.dialog-card label { display: block; color: #514c47; font-size: 13px; font-weight: 600; margin: 16px 0; }
.dialog-card input[type=email], .dialog-card input[type=text], .dialog-card input[type=number], .watch-card input[type=email], .watch-card input[type=text], .watch-card input[type=number] { display: block; width: 100%; margin-top: 6px; border: 1px solid #d5d0c8; border-radius: 8px; background: white; padding: 11px 12px; outline: none; font-size: 15px; font-weight: 400; }
.dialog-card input:focus, .watch-card input:focus { border-color: #d56b43; box-shadow: 0 0 0 3px rgba(213,107,67,.12); }
.dialog-card .use-current-location { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; cursor: pointer; }
.use-current-location input { width: 17px; height: 17px; accent-color: var(--amber); flex: 0 0 auto; margin: 0; }
.use-current-location span { min-width: 0; }
.use-current-location strong, .use-current-location small { display: block; }
.use-current-location strong { font-size: 13px; }
.use-current-location small { color: var(--faint); font-size: 12px; font-weight: 400; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-card input:disabled { color: #8b857e; background: #ebe8e2; border-color: #ddd8d0; cursor: not-allowed; box-shadow: none; }
.dialog-card .location-input-help { display: block; color: var(--faint); font-size: 12px; font-weight: 400; margin-top: 5px; }
.notification-timing { border: 0; padding: 0; margin: 16px 0; }
.notification-timing legend { color: #514c47; font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.notification-timing > label { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; cursor: pointer; font-weight: 400; }
.notification-timing > label input { width: 16px; height: 16px; accent-color: var(--amber); flex: 0 0 auto; margin: 2px 0 0; }
.notification-timing strong, .notification-timing small { display: block; }
.notification-timing strong { font-size: 13px; }
.notification-timing small { color: var(--faint); font-size: 12px; font-weight: 400; margin-top: 1px; }
.custom-time { margin: 8px 0 3px 26px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.dialog-card .custom-time input[type=number], .watch-card .custom-time input[type=number] { width: 80px; margin: 0; padding: 8px; }
.threshold-label span { display: flex; justify-content: space-between; }
.form-note { color: var(--faint); display: block; text-align: center; line-height: 1.45; margin-top: 12px; font-size: 12px; }
.demo-warning { padding: 12px; background: #f4e7db; border-radius: 8px; color: #704a38 !important; font-size: 13px !important; }
.about-links { display: flex; flex-wrap: wrap; gap: 14px; font-weight: 600; }
.about-links a { text-decoration: none; }
.attribution { font-size: 12px !important; color: var(--faint) !important; }

/* Manage page */
.manage-page { background: var(--paper); }
.manage-shell { max-width: 640px; margin: 0 auto; padding: 32px 18px 60px; }
.manage-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 6px 24px rgba(29,24,18,.06); }
.manage-card h1 { font: 600 26px/1.15 "Manrope"; letter-spacing: -.8px; margin: 8px 0; }
.manage-card p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ghost-button.dark { border: 1px solid #d4cfc6; background: #faf9f6; }
.manage-heading { margin: 30px 0 12px; }
.manage-heading span:last-child { letter-spacing: 0; font-weight: 500; text-transform: none; }
.watch-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-bottom: 14px; }
.watch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.watch-label { display: block; font: 600 19px/1.3 "Manrope"; }
.watch-coords { color: var(--muted); font-size: 12px; }
.watch-card label { display: block; color: #514c47; font-size: 13px; font-weight: 600; margin: 14px 0; }
.watch-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.watch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.watch-note { text-align: left; min-height: 1em; }
.manage-footnote { color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Admin */
.admin-page { background: #f2efe9; }
.admin-topbar { height: 64px; background: var(--navy); color: white; display: flex; align-items: center; gap: 15px; padding: 0 25px; }
.brand.light { color: white; }
.admin-divider { width: 1px; height: 23px; background: #3b3e45; }
.admin-topbar > strong { font-size: 14px; color: #bbbcc0; font-weight: 500; }
.admin-top-actions { margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: 12px; }
.admin-top-actions a { color: #d8d8d8; text-decoration: none; }
.system-online { color: #a9aaa9; display: flex; align-items: center; gap: 8px; }
.admin-shell { display: grid; grid-template-columns: 190px 1fr; min-height: calc(100vh - 64px); }
.admin-sidebar { background: #20232a; display: flex; flex-direction: column; padding: 24px 14px; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav button { border: 0; background: transparent; color: #8f9299; text-align: left; padding: 11px 12px; border-radius: 6px; font-size: 13px; }
.admin-sidebar nav button span { display: inline-block; width: 25px; color: #b0b2b6; }
.admin-sidebar nav button.active { color: white; background: #2d3038; }
.admin-sidebar nav button.active span { color: #ee8450; }
.admin-help { margin-top: auto; display: flex; gap: 8px; color: #8c8f96; font-size: 11px; line-height: 1.5; padding: 12px 8px; }
.admin-help > span { flex: 0 0 19px; height: 19px; border: 1px solid #4b4e55; border-radius: 50%; display: grid; place-items: center; }
.admin-help p { margin: 0; }
.admin-help strong { color: #c9cace; display: block; margin-bottom: 3px; }
.admin-content { padding: 35px 42px 55px; max-width: 1380px; width: 100%; margin: 0 auto; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.admin-heading h1 { font: 600 29px "Manrope"; letter-spacing: -1px; margin: 7px 0 5px; }
.admin-heading p { color: #76716b; font-size: 13px; margin: 0; }
.admin-actions { display: flex; gap: 8px; }
.admin-warning { margin: 0 0 18px; padding: 12px 14px; background: #fbe9d9; border: 1px solid #ecc7a8; color: #7a3d1e; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.admin-map-card { border: 1px solid #d5d0c7; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 22px rgba(38,31,24,.06); }
.paint-toolbar { height: 52px; display: flex; align-items: center; gap: 15px; padding: 0 14px; border-bottom: 1px solid #ded9d0; }
.segmented { background: #eeebe5; border-radius: 6px; padding: 3px; }
.segmented button, .paint-toolbar > button { border: 0; background: transparent; padding: 7px 12px; font-size: 12px; color: #6f6963; border-radius: 4px; }
.segmented button.active { background: white; color: #292622; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.paint-toolbar > button { color: #9a5a47; border-left: 1px solid #ddd7cf; border-radius: 0; }
.cell-counter { margin-left: auto; color: #878079; font-size: 12px; }
.cell-counter i { display: inline-block; width: 7px; height: 7px; background: #e36534; border-radius: 2px; margin-right: 5px; }
.cell-counter strong { color: #3e3935; }
#admin-map { height: 520px; background: #e9e6df; }
.buffer-legend { height: 38px; display: flex; justify-content: end; align-items: center; padding: 0 14px; gap: 7px; color: #868079; font-size: 11px; }
.buffer-legend .active-cell { width: 12px; height: 9px; background: rgba(227,101,52,.55); border: 1px solid #d45528; }
.buffer-line { width: 17px; height: 7px; border-top: 1px dashed #8d687b; margin-left: 12px; }
.admin-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 18px; }
.admin-stats article { background: #faf9f6; border: 1px solid #d9d4cc; border-radius: 8px; padding: 16px; }
.admin-stats span, .admin-stats strong, .admin-stats small { display: block; }
.admin-stats span { font-size: 10px; color: #938c84; font-weight: 700; letter-spacing: .9px; }
.admin-stats strong { font: 600 22px "Manrope"; margin: 8px 0 2px; }
.admin-stats small { color: #928a82; font-size: 11px; }
.pipeline-card { margin-top: 15px; border: 1px solid #d9d4cc; background: #faf9f6; border-radius: 8px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pipeline-card h2 { margin: 5px 0 3px; font: 600 16px "Manrope"; }
.pipeline-card p { margin: 0; color: #8a837c; font-size: 12px; }
.delivery-card { flex-wrap: wrap; gap: 15px; }
.delivery-controls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.delivery-controls input { width: 220px; border: 1px solid #d4cfc6; border-radius: 6px; background: white; padding: 10px 11px; font-size: 13px; outline: none; }
.delivery-controls input:focus { border-color: #d56b43; box-shadow: 0 0 0 3px rgba(213,107,67,.12); }
.delivery-card pre { flex: 0 0 100%; margin: 0; padding: 14px; border-radius: 6px; background: #242329; color: #d8d5cf; white-space: pre-wrap; font: 12px/1.55 ui-monospace, monospace; max-height: 230px; overflow: auto; }
.admin-table-card { margin-top: 15px; border: 1px solid #d9d4cc; background: #faf9f6; border-radius: 8px; padding: 18px; }
.admin-table-card h2 { margin: 5px 0 12px; font: 600 16px "Manrope"; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e6e1d8; vertical-align: top; }
.admin-table th { font-size: 10px; letter-spacing: .8px; color: #938c84; }
.admin-table td button { border: 0; background: none; color: var(--amber-dark); font-size: 12px; padding: 0; margin-right: 10px; }
.admin-table .status-pending { color: #8a6d2c; }
.admin-table .status-unsubscribed { color: #9a5a47; }
.admin-table .status-active { color: #3f8a5c; }
.toast { position: fixed; right: 23px; bottom: 23px; background: #222127; color: white; padding: 12px 16px; border-radius: 8px; font-size: 13px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s; z-index: 2000; max-width: min(420px, calc(100vw - 46px)); }
.toast.show { opacity: 1; transform: translateY(0); }
.admin-cell { transition: fill-opacity .12s; }

/* Mobile */
@media (max-width: 900px) {
  :root { --topbar: 58px; }
  .topbar { padding: 0 14px; }
  .data-status, .topbar .ghost-button:not(.donate-link) { display: none; }
  .donate-link { padding: 8px 10px; }
  .app-shell { display: block; position: relative; }
  .map-wrap { height: 100%; }
  .sheet-backdrop { display: block; position: absolute; inset: 0; background: rgba(20,17,18,.35); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 700; }
  .sheet-backdrop.show { opacity: 1; pointer-events: auto; }
  .forecast-panel { position: absolute; z-index: 800; bottom: 0; left: 0; right: 0; max-height: 86vh; max-height: 86dvh; border-radius: 18px 18px 0 0; transform: translateY(calc(100% - 132px)); transition: transform .35s var(--ease); box-shadow: 0 -12px 40px rgba(0,0,0,.2); overflow-y: hidden; }
  .forecast-panel.open { transform: translateY(0); overflow-y: auto; }
  .sheet-handle { display: block; position: sticky; top: 0; z-index: 2; width: 100%; border: 0; background: var(--panel); padding: 10px 0 6px; border-radius: 18px 18px 0 0; }
  .sheet-handle .bar { display: block; width: 42px; height: 5px; border-radius: 3px; background: #cfc9bf; margin: 0 auto 6px; }
  .sheet-handle small { display: block; color: var(--amber-dark); font-size: 12px; font-weight: 600; }
  .forecast-panel { transform: translateY(calc(100% - 150px)); }
  .location-block { padding: 6px 20px 12px; }
  .search-form { margin-top: 10px; }
  .hero-forecast { padding: 16px 20px 0; }
  .score-wrap { grid-template-columns: 98px 1fr; gap: 14px; }
  .score-ring { width: 95px; height: 95px; }
  .score-ring::before { width: 79px; height: 79px; }
  .score-ring strong { font-size: 32px; }
  .timeline-section, .ingredients-section { padding: 18px 20px; }
  .notify-card { margin: 18px 20px 10px; width: calc(100% - 40px); }
  .panel-footer { padding: 10px 20px 28px; }
  .overlay-control { bottom: 186px; left: 12px; width: 210px; }
  .leaflet-bottom { bottom: 150px; }
  .leaflet-control-attribution { font-size: 9px !important; max-width: 100vw; }
  .overlay-switch button { padding: 7px 8px; font-size: 11px; }
  .overlay-legend { padding: 9px 11px 8px; }
  .map-hint { display: none; }
  .map-top-left { left: 12px; top: 12px; }
  .satellite-age { display: none; }
  .admin-shell { display: block; }
  .admin-sidebar { display: none; }
  .admin-content { padding: 25px 16px; }
  .admin-heading { align-items: start; gap: 18px; }
  .admin-heading p { max-width: 380px; }
  #admin-map { height: 55vh; }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
  .admin-table-card { overflow-x: auto; }
}

@media (max-width: 540px) {
  .topbar-actions { gap: 6px; }
  .topbar .primary-button { padding: 9px 12px; font-size: 13px; }
  .dialog-card { padding: 24px 20px; }
  .watch-row { grid-template-columns: 1fr; }
  .admin-top-actions .system-online { display: none; }
  .admin-heading { display: block; }
  .admin-actions { margin-top: 18px; }
  .paint-toolbar { gap: 4px; }
  .segmented button { padding: 7px 8px; }
  .cell-counter { display: none; }
}
