:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #1d2125;
  --muted: #5f666d;
  --line: #e3e5e8;
  --accent: #2563eb;
  --accent-soft: #eaf1fe;
  --accent-text: #1e4fc2;
  --on-accent: #ffffff;
  --good: #15803d;
  --good-soft: #e7f6ec;
  --mid: #a16207;
  --mid-soft: #fdf4dc;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-pop: 0 4px 16px rgba(0,0,0,.1);
  --star: #d39b00;
  --dot-mid: #d39b00;
  --err-line: #f5c6c1;
  --bar-cold: #60a5fa;
  --bar-warm: #f59e0b;
  --toast-bg: #1d2125;
  --toast-fg: #ffffff;
  --orange: #c2410c;
  --orange-soft: #ffedd5;
  --tabs-h: 62px;
  --backdrop: rgba(15, 20, 25, .4);
  /* წყაროების ფერები (ფიქსირებული რიგით) და საერთო ხაზი */
  --s-yr: #2a78d6;
  --s-ecmwf: #eb6834;
  --s-gfs: #1baf7a;
  --s-icon: #eda100;
  --s-ukmo: #e87ba4;
  --s-consensus: #1d2125;
  --radius: 14px;
  color-scheme: light;
}

/* მუქი თემა: მოწყობილობის პარამეტრით, ან ხელით არჩეული (data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121417; --card: #1b1e22; --text: #e8eaed; --muted: #9aa1a9; --line: #2e3238;
    --accent: #3d74e0; --accent-soft: #1c2a45; --accent-text: #93b4ff; --on-accent: #ffffff;
    --good: #4ade80; --good-soft: #14281c; --mid: #facc15; --mid-soft: #2d2710; --bad: #f87171; --bad-soft: #351a1a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); --shadow-pop: 0 6px 20px rgba(0,0,0,.5);
    --star: #f5c542; --dot-mid: #facc15; --err-line: #6b2a2a; --bar-cold: #3b82f6; --bar-warm: #f59e0b;
    --toast-bg: #e8eaed; --toast-fg: #121417; --backdrop: rgba(0, 0, 0, .6);
    --orange: #fb923c; --orange-soft: #33200f;
    --s-yr: #3987e5; --s-ecmwf: #d95926; --s-gfs: #199e70; --s-icon: #c98500; --s-ukmo: #d55181; --s-consensus: #f0efec;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121417; --card: #1b1e22; --text: #e8eaed; --muted: #9aa1a9; --line: #2e3238;
  --accent: #3d74e0; --accent-soft: #1c2a45; --accent-text: #93b4ff; --on-accent: #ffffff;
  --good: #4ade80; --good-soft: #14281c; --mid: #facc15; --mid-soft: #2d2710; --bad: #f87171; --bad-soft: #351a1a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); --shadow-pop: 0 6px 20px rgba(0,0,0,.5);
  --star: #f5c542; --dot-mid: #facc15; --err-line: #6b2a2a; --bar-cold: #3b82f6; --bar-warm: #f59e0b;
  --toast-bg: #e8eaed; --toast-fg: #121417; --backdrop: rgba(0, 0, 0, .6);
    --orange: #fb923c; --orange-soft: #33200f;
  --s-yr: #3987e5; --s-ecmwf: #d95926; --s-gfs: #199e70; --s-icon: #c98500; --s-ukmo: #d55181; --s-consensus: #f0efec;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Georgian", "BPG Arial", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent-text); }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.stack { display: grid; gap: 14px; padding-bottom: 24px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { color: var(--muted); font-size: .86rem; margin: 4px 0 0; }

/* header */
.top {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: calc(12px + env(safe-area-inset-top)) 0 12px; margin-bottom: 14px;
  position: sticky; top: 0; z-index: 5;
}
.top-inner { display: flex; align-items: center; gap: 12px; }
.top-text { flex: 1; min-width: 0; }
.top h1 { margin: 0; font-size: 1.25rem; }
.top .sub { margin: 0; color: var(--muted); font-size: .85rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 1.2rem; cursor: pointer; flex: none;
}
.icon-btn:hover { border-color: var(--accent); }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); min-width: 0;
}
.card h2 { margin: 0 0 12px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.tag { font-size: .72rem; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; }

button:focus-visible, input:focus, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* buttons */
.btn {
  border: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600;
  border-radius: 10px; padding: 9px 14px; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--bg); color: var(--text); border: 1px solid var(--line); }

/* search */
.search { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
}
.results { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.results li + li { border-top: 1px solid var(--line); }
.results button { width: 100%; text-align: left; border: 0; background: var(--card); font: inherit; color: var(--text); padding: 10px 12px; cursor: pointer; }
.results button:hover { background: var(--bg); }
.results small { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }

/* hero */
.hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hero-head h2 { margin: 0; font-size: 1.3rem; }
.star { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--star); cursor: pointer; padding: 2px 4px; }
.hero-body { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: center; margin-top: 10px; }
.now { display: flex; align-items: center; gap: 12px; }
.now-icon { font-size: 3.4rem; line-height: 1; }
.now-temp { font-size: 3.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.now-cond { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.now-side { justify-self: end; text-align: right; }
.meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { background: var(--bg); border-radius: 999px; padding: 5px 12px; font-size: .88rem; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .hero-body { grid-template-columns: 1fr; }
  .now-side { justify-self: start; text-align: left; }
}

/* agreement */
.agree { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.agree::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.agree.high { color: var(--good); background: var(--good-soft); }
.agree.mid { color: var(--mid); background: var(--mid-soft); }
.agree.low { color: var(--bad); background: var(--bad-soft); }
.agree.single { color: var(--muted); background: var(--bg); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.high { background: var(--good); }
.dot.mid { background: var(--dot-mid); }
.dot.low { background: var(--bad); }
.dot.single { background: transparent; border: 1.5px solid var(--muted); }

/* sources */
.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.src { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.src.muted { background: var(--bg); }
.src.err { background: var(--bad-soft); border-color: var(--err-line); }
.src.stale { border-style: dashed; }
.src-head { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; }
.src-head a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-head a:hover { text-decoration: underline; }
.src-by { font-size: .72rem; color: var(--muted); margin-top: -2px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; margin-right: 2px; }
.src-main { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.src-icon { font-size: 1.5rem; }
.src-temp { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.diff { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.src-cond { font-size: .85rem; }
.src-meta { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.src-time { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.src-msg { margin: 6px 0 2px; font-size: .85rem; color: var(--muted); }
.src.err .src-msg { color: var(--bad); }

/* hourly */
.hourly { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.hour {
  flex: 0 0 64px; scroll-snap-align: start; text-align: center; background: var(--bg);
  border-radius: 12px; padding: 8px 4px; display: grid; gap: 2px;
}
.hour-t { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hour-i { font-size: 1.4rem; line-height: 1.3; }
.hour-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.hour-p { font-size: .72rem; color: var(--accent-text); min-height: 1em; }
.hour-a { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: .7rem; color: var(--muted); }

/* segmented */
.seg { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; gap: 3px; }
.seg-btn { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 8px; font: inherit; font-size: .84rem; cursor: pointer; }
.seg-btn.active { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

/* chart */
.chart { position: relative; width: 100%; min-height: 230px; touch-action: pan-y; }
.chart svg { display: block; max-width: 100%; height: auto; }
.c-grid line { stroke: var(--line); stroke-width: 1; }
.c-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.c-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.c-dot { stroke: var(--card); stroke-width: 2; }
.c-tip {
  position: absolute; top: 8px; pointer-events: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-pop); padding: 8px 10px; font-size: .8rem; min-width: 160px; z-index: 2;
}
.c-tip-h { font-weight: 700; margin-bottom: 4px; }
.c-row { display: flex; align-items: center; gap: 6px; }
.c-row i { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.c-row span { flex: 1; color: var(--muted); }
.c-row b { font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 14px; height: 3px; border-radius: 2px; }
.lg.bold { color: var(--text); font-weight: 600; }
.lg.bold i { height: 4px; }

/* daily */
.daily { display: grid; margin-top: 8px; }
.day { border-top: 1px solid var(--line); }
.day:last-child { border-bottom: 1px solid var(--line); }
.day summary {
  list-style: none; cursor: pointer; display: grid; align-items: center; gap: 8px;
  grid-template-columns: 92px 34px 56px 1fr 14px; padding: 10px 2px;
}
.day summary::-webkit-details-marker { display: none; }
.day summary:hover { background: var(--bg); }
.day-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.day-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-name small { color: var(--muted); font-size: .75rem; }
.day-icon { font-size: 1.4rem; text-align: center; }
.day-p { white-space: nowrap; font-size: .78rem; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.day-range { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.t-lo { color: var(--muted); width: 34px; text-align: right; }
.t-hi { font-weight: 700; width: 34px; }
.bar { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; position: relative; min-width: 40px; }
.bar span { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--bar-cold), var(--bar-warm)); }
.day-body { padding: 0 2px 12px; }
.day-body .hint { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
@media (max-width: 420px) {
  .day summary { grid-template-columns: 80px 28px 46px 1fr 10px; gap: 6px; }
  .day-name b { font-size: .9rem; }
  .t-lo, .t-hi { width: 30px; }
  .hide-sm { display: none; }
}

/* table */
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; }

/* how */
.how ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .9rem; }

/* footer */
.foot { color: var(--muted); font-size: .78rem; text-align: center; padding-bottom: calc(var(--tabs-h) + 24px + env(safe-area-inset-bottom)); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--toast-bg); color: var(--toast-fg); border-radius: 10px; padding: 10px 16px; font-size: .9rem;
  box-shadow: var(--shadow-pop); z-index: 20; max-width: calc(100vw - 32px);
}

@media (max-width: 520px) {
  .hide-sm { display: none; }
  .top .sub { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- ჩანართები (ქვედა ნავიგაცია) ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left, 0px));
}
.tab {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: .74rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 10px;
  min-height: 52px; justify-content: center;
}
.tab-i { font-size: 1.25rem; line-height: 1.1; }
.tab.active { color: var(--accent-text); font-weight: 700; background: var(--accent-soft); }
@media (min-width: 900px) {
  .tabs { max-width: 560px; left: 50%; transform: translateX(-50%); bottom: 12px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-pop); padding: 4px; }
}
.icon-btn.small { width: 36px; height: 36px; font-size: 1.05rem; }
.hero-actions { display: flex; align-items: center; gap: 4px; }

/* ---------- გაფრთხილებები ---------- */
.alerts { display: grid; gap: 8px; }
.alerts:empty { display: none; }
.alert { border-radius: 12px; padding: 10px 14px; font-size: .9rem; border: 1px solid transparent; }
.alert.yellow { background: var(--mid-soft); color: var(--mid); border-color: var(--mid); }
.alert.orange { background: var(--orange-soft); color: var(--orange); border-color: var(--orange); }
.alert.red { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.alert-when { opacity: .85; }

/* ---------- hero დამატებები ---------- */
.now-feels { color: var(--muted); font-size: .88rem; }
.yesterday { margin: 6px 0 0; font-size: .86rem; font-weight: 600; }
.arrow { display: inline-block; font-weight: 700; line-height: 1; }

/* ---------- რა ჩავიცვა ---------- */
.wear-main { margin: 0; font-size: 1.1rem; font-weight: 700; }
.wear-extras { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wear-extras li { background: var(--bg); border-radius: 999px; padding: 4px 12px; font-size: .86rem; }

/* ---------- ფილები ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.sun-row { display: block; }
.tile { background: var(--bg); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.tile-h { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; }
.tile-v { font-weight: 700; font-size: 1.02rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile-s { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.tile.warm .tile-v { color: var(--orange); }
.tile.cold .tile-v { color: var(--accent-text); }
.lvl { display: inline-block; }
.aqi-good, .uv-low { color: var(--good); }
.aqi-fair, .uv-moderate { color: var(--mid); }
.aqi-moderate, .uv-high { color: var(--orange); }
.aqi-poor, .aqi-veryPoor, .aqi-extreme, .uv-veryHigh, .uv-extreme { color: var(--bad); }
.hour-w { font-size: .7rem; color: var(--muted); min-height: 1em; }

/* ---------- საუკეთესო დღე ---------- */
.best { display: grid; gap: 4px; }
.best-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 1.3fr 1fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.best-row:first-child { border-top: 0; }
.best-act { font-weight: 600; }
.best-day { font-variant-numeric: tabular-nums; }
.muted-text { color: var(--muted); }
.meter { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--good); border-radius: 3px; }
@media (max-width: 420px) { .best-row { grid-template-columns: 1fr 1fr; } .best-row .meter { grid-column: 1 / -1; } }

/* ---------- რუკა ---------- */
.map { height: min(62vh, 520px); border-radius: 12px; overflow: hidden; background: var(--bg); position: relative; z-index: 0; }
.map-controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.map-controls input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.map-time { font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
.leaflet-container { font: inherit; background: var(--bg); }

/* ---------- გზა და მთა ---------- */
.status { margin: 0; font-weight: 700; font-size: 1.05rem; }
.status.ok { color: var(--good); }
.status.caution { color: var(--orange); }
.status.danger { color: var(--bad); }
.risk-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: .92rem; }
.risk-list .danger { color: var(--bad); }
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.place { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.place-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.place-s { color: var(--muted); font-size: .78rem; }
.place-d { font-size: .86rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.badge { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.badge.ok { color: var(--good); background: var(--good-soft); }
.badge.caution { color: var(--orange); background: var(--orange-soft); }
.badge.danger { color: var(--bad); background: var(--bad-soft); }
.sub-h { font-size: .92rem; margin: 14px 0 8px; }
.alt { display: flex; gap: 8px; overflow-x: auto; }
.alt span { background: var(--bg); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; align-items: center; min-width: 76px; }
.alt small { color: var(--muted); font-size: .74rem; }

/* ---------- სიზუსტე და ისტორია ---------- */
.acc { display: grid; gap: 10px; margin-top: 8px; }
.acc-row { display: grid; grid-template-columns: minmax(130px, 1fr) 1.4fr; grid-template-areas: "n b" "n v"; gap: 2px 12px; align-items: center; }
.acc-name { grid-area: n; font-weight: 600; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.acc-bar { grid-area: b; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.acc-bar span { display: block; height: 100%; border-radius: 4px; }
.acc-v { grid-area: v; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.hist-cmp { margin: 12px 0 0; font-weight: 600; }

/* ---------- პარამეტრები ---------- */
dialog {
  border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  box-shadow: var(--shadow-pop); color: var(--text); background: var(--card);
}
dialog::backdrop { background: var(--backdrop); }
dialog form { padding: 18px; display: grid; gap: 14px; }
dialog h2 { margin: 0; font-size: 1.15rem; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
legend { font-weight: 700; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.seg-opt { flex: 1; position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-opt span { display: block; text-align: center; padding: 7px 8px; border-radius: 8px; font-size: .86rem; color: var(--muted); }
.seg-opt input:checked + span { background: var(--card); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); }
.checks { display: grid; gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.check small { color: var(--muted); }
.check input, .switch input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.switch { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.switch span { display: grid; gap: 2px; }
.switch small { color: var(--muted); font-size: .78rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- მხარდაჭერა ---------- */
.support p { margin: 0 0 10px; }
.support-links { display: flex; flex-wrap: wrap; gap: 8px; }
.support-links .btn { text-decoration: none; display: inline-block; }
.sponsor { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sponsor .hint { margin: 2px 0 8px; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.email { font-weight: 600; word-break: break-all; user-select: all; }
