/* Hüüf – light, airy "liquid glass": translucent surfaces, strong blur, a soft top highlight */
/* Apple-style glass: dense white glass (72-86 %), strong blur, black text, black accent */
:root {
  --pind: #ffffff;
  --pind-2: rgba(0, 0, 0, .045);
  --pind-3: rgba(0, 0, 0, .10);
  --tint: #111111;
  --tint-2: #3a3a3c;
  --tint-3: #6e6e73;
  --joon: rgba(0, 0, 0, .08);
  --aktsent: #111111;
  --aktsent-tekst: #ffffff;
  --aktsent-pehme: rgba(0, 0, 0, .06);
  --roheline: #1e8a3e;
  --rohk: #c94a2a;
  --klaas: rgba(255, 255, 255, .72);
  --klaas-tugev: rgba(255, 255, 255, .86);
  --klaas-serv: rgba(255, 255, 255, .9);
  --klaas-valgus: inset 0 1px 0 rgba(255, 255, 255, .9);
  --vari: 0 8px 30px rgba(0, 0, 0, .10), 0 1px 3px rgba(0, 0, 0, .06);
  --hagu: blur(24px) saturate(1.8);
  --raadius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pind: #1c1c1e;
    --pind-2: rgba(255, 255, 255, .07);
    --pind-3: rgba(255, 255, 255, .14);
    --tint: #f5f5f7;
    --tint-2: #d1d1d6;
    --tint-3: #98989d;
    --joon: rgba(255, 255, 255, .10);
    --aktsent: #f5f5f7;
    --aktsent-tekst: #111111;
    --aktsent-pehme: rgba(255, 255, 255, .12);
    --rohk: #f08a6a;
    --klaas: rgba(30, 30, 32, .72);
    --klaas-tugev: rgba(30, 30, 32, .88);
    --klaas-serv: rgba(255, 255, 255, .14);
    --klaas-valgus: inset 0 1px 0 rgba(255, 255, 255, .12);
    --vari: 0 8px 30px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  --pind: #1c1c1e;
  --pind-2: rgba(255, 255, 255, .07);
  --pind-3: rgba(255, 255, 255, .14);
  --tint: #f5f5f7;
  --tint-2: #d1d1d6;
  --tint-3: #98989d;
  --joon: rgba(255, 255, 255, .10);
  --aktsent: #f5f5f7;
  --aktsent-tekst: #111111;
  --aktsent-pehme: rgba(255, 255, 255, .12);
  --rohk: #f08a6a;
  --klaas: rgba(30, 30, 32, .72);
  --klaas-tugev: rgba(30, 30, 32, .88);
  --klaas-serv: rgba(255, 255, 255, .14);
  --klaas-valgus: inset 0 1px 0 rgba(255, 255, 255, .12);
  --vari: 0 8px 30px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #e9ecee;
  color: var(--tint);
  font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
#kaart { position: absolute; inset: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: var(--tint); background: transparent; border: 0; border-radius: 12px; padding: 6px 10px; cursor: pointer; }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, label:focus-within { outline: 2px solid var(--aktsent); outline-offset: 2px; }
.peidetud { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- glass ---------- */
.klaas {
  background: var(--klaas);
  backdrop-filter: var(--hagu);
  -webkit-backdrop-filter: var(--hagu);
  border: 1px solid var(--klaas-serv);
  box-shadow: var(--klaas-valgus), var(--vari);
}

/* ---------- corners ---------- */
.brand { position: absolute; z-index: 5; top: 14px; left: 14px; display: flex; align-items: center; gap: 9px;
         padding: 7px 16px 7px 10px; border-radius: 999px; }
.logo { width: 26px; height: 26px; color: #e3a019; stroke: none; }
.brand-tekst { display: grid; line-height: 1.1; }
.brand-tekst strong { font-size: 16px; letter-spacing: -.01em; }
.brand-tekst span { font-size: 11.5px; color: var(--tint-2); }

.nurganupud { position: absolute; z-index: 6; top: 14px; right: 14px; display: flex; gap: 8px; }
.ring { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; color: var(--tint); }
.ring svg { width: 20px; height: 20px; }
.ring:hover { background: var(--klaas-tugev); }
.menyy-hoidja { position: relative; }
.menyy { position: absolute; top: 52px; right: 0; min-width: 150px; padding: 6px; border-radius: 16px; display: grid; gap: 2px; }
.menyy[hidden] { display: none; }
.menyy-pealkiri { padding: 6px 12px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--tint-3); }
.menyy button { text-align: left; padding: 8px 12px; font-size: 13.5px; }
.menyy button:hover { background: var(--pind-2); }
.menyy button.aktiivne { background: var(--aktsent-pehme); color: var(--tint); font-weight: 650; }

.ring-vaike { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; color: var(--tint-2); flex: none; }
.ring-vaike:hover:not(:disabled) { background: var(--pind-2); color: var(--tint); }
.kalender { position: relative; cursor: pointer; overflow: hidden; }
.kalender input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.kalender input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

.arv { text-align: right; font-variant-numeric: tabular-nums; color: var(--tint-2); }
.marker { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 50%; font-size: 12px; font-weight: 700;
          color: #fff; background: rgba(22, 34, 42, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
          border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 3px 10px rgba(0, 0, 0, .3); cursor: pointer; }
.marker[hidden] { display: none; }
.tapp { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 5px solid #111; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }

/* ---------- timeline (bottom) ---------- */
.ajatelg { position: absolute; z-index: 4; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(720px, calc(100% - 28px));
           padding: 12px 14px 12px; border-radius: 24px; display: grid; gap: 10px; }
.ajatelg-pea { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.segment { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--pind-2); }
.segment button { padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--tint-2); border-radius: 999px; }
.segment button.aktiivne { background: var(--klaas-tugev); color: var(--tint); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

.paevarida { display: flex; align-items: center; gap: 4px; }
.paevad { flex: 1; display: flex; gap: 3px; min-width: 0; }
.paev { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 1px; padding: 6px 0 5px; border-radius: 14px; line-height: 1.1; position: relative; }
.paev:hover:not(:disabled) { background: var(--pind-2); }
.paev .nadal { font-size: 10.5px; color: var(--tint-3); font-weight: 650; text-transform: uppercase; }
.paev .kp { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.paev.prognoos .kp { color: var(--tint-2); font-weight: 500; }
.paev.tana .nadal { color: var(--tint); }
.paev.aktiivne { background: var(--aktsent); }
.paev.aktiivne .nadal, .paev.aktiivne .kp { color: var(--aktsent-tekst); }
.paev.aktiivne::after { border-color: rgba(255, 255, 255, .7); }

.kokkuvote { margin: 0; font-size: 13.5px; line-height: 1.4; }
.vananenud { margin: 0; padding: 5px 9px; border-radius: 8px; font-size: 12.5px; line-height: 1.35;
             background: #fdf1e3; color: #7a3b0c; border: 1px solid #f1d3ad; }
.vananenud[hidden] { display: none; }
.kokkuvote b { font-size: 14px; }
.tekstinupp { padding: 0; border: 0; background: none; font: inherit; font-weight: 650; color: var(--aktsent); text-decoration: underline; cursor: pointer; }
.pp-markus { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
             padding: 2px 7px; border-radius: 999px; background: var(--aktsent-pehme); color: var(--aktsent); margin-right: 4px; vertical-align: 1px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legend li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.legend .arv { font-size: 12px; }
.lapp { width: 12px; height: 12px; border-radius: 4px; }

/* MapLibre controls above the timeline */
.maplibregl-ctrl-bottom-right { bottom: 190px; right: 6px; }
.maplibregl-ctrl-bottom-left { bottom: 190px; left: 6px; }
.maplibregl-ctrl-group { border-radius: 14px !important; overflow: hidden; background: var(--klaas-tugev) !important;
                         backdrop-filter: var(--hagu); -webkit-backdrop-filter: var(--hagu); box-shadow: var(--vari) !important; }
.maplibregl-ctrl-attrib { background: var(--klaas) !important; backdrop-filter: blur(8px); border-radius: 10px; }
.maplibregl-ctrl-scale { background: var(--klaas) !important; border-color: var(--tint-2) !important; color: var(--tint); }

/* ---------- side drawer ---------- */
.sahtel { position: absolute; z-index: 7; top: 70px; right: 14px; bottom: 18px; width: 380px; border-radius: 24px;
          display: flex; flex-direction: column; overflow: hidden; background: var(--klaas-tugev); animation: sisse .18s ease-out; }
@keyframes sisse { from { opacity: 0; transform: translateX(12px); } }
.sahtel[hidden] { display: none; }
.sahtel-pea { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 10px 16px; }
.sahtel-sisu { overflow-y: auto; padding: 4px 16px 18px; }
.otsus-silt { display: inline-block; font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em;
              padding: 5px 11px; border-radius: 999px; background: var(--pind-3); color: var(--tint-2); }
.otsus-silt.k0 { background: #1e8a3e; color: #fff; }
.otsus-silt.k1 { background: #f08a00; color: #1c1c1a; }
.otsus-silt.k2 { background: #f2c40f; color: #1c1c1a; }

.kaksik { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kaksik.yks { grid-template-columns: 1fr; }
.naitaja { padding: 12px; border-radius: 18px; background: var(--pind-2); border: 1px solid var(--joon); }
.n-pea { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--tint-2); text-transform: uppercase; letter-spacing: .04em; }
.n-pea svg { width: 16px; height: 16px; }
.n-sona { font-size: 22px; font-weight: 750; margin: 4px 0 10px; letter-spacing: -.01em; }
.astmeriba { position: relative; }
.aste-segmendid { position: relative; display: flex; gap: 3px; height: 10px; }
.aste-seg { flex: 1; border-radius: 4px; }
.aste-seg.tuhm { opacity: .28; }
.aste-marker { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px;
               background: var(--tint); box-shadow: 0 0 0 2px var(--pind); }

.omadused { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; }
.omadused li { display: grid; grid-template-columns: 120px 1fr; gap: 2px 10px; align-items: center; font-size: 13px; }
.omadused .pohjus { grid-column: 2; font-size: 12px; color: var(--tint-2); }
.riba { height: 8px; border-radius: 4px; background: var(--pind-3); overflow: hidden; }
.riba > span { display: block; height: 100%; border-radius: 4px; background: var(--tint-3); }
.riba.q-hea > span { background: #1e8a3e; }
.riba.q-keskmine > span { background: #e0a100; }
.riba.q-nork > span { background: #c94a2a; }

.sel-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
         color: var(--tint-2); margin: 20px 0 4px; padding-top: 14px; border-top: 1px solid var(--joon); }
.sel-h svg { width: 17px; height: 17px; }
.g-h { font-size: 13.5px; margin: 18px 0 6px; }
.g-vesi { fill: none; stroke: #2f6f8f; stroke-width: 2.5; }
.g-tapp.g-tapp-vesi { fill: #2f6f8f; }
.g-vihm { fill: #8fb4cc; stroke: none; }
.g-vihm-prog { opacity: .55; }
.g-muld { fill: none; stroke: #c0632f; stroke-width: 2.5; }
.g-ohk { fill: none; stroke: var(--tint-3); stroke-width: 1.25; opacity: .8; }
.g-tapp.g-tapp-muld { fill: #c0632f; }
.g-opt { fill: #2f7a4f; opacity: .10; stroke: none; }
.g-legend i.g-l-opt { background: rgba(47, 122, 79, .22); }
.g-legend i.g-l-marg { background: rgba(164, 67, 42, .18); }
.g-marg { fill: #a4432a; opacity: .08; stroke: none; }
.g-legend i.g-l-vesi { height: 3px; background: #2f6f8f; vertical-align: 2px; }
.g-legend i.g-l-vihm { background: #8fb4cc; }
.g-legend i.g-l-muld { height: 3px; background: #c0632f; vertical-align: 2px; }
.g-legend i.g-l-ohk { height: 2px; background: var(--tint-3); vertical-align: 2px; }
.g-markus { margin: 8px 0 0; }
svg.g { width: 100%; height: auto; display: block; overflow: visible; }
.g-prognoosiala { fill: var(--tint); opacity: .05; stroke: none; }
.g-tee { fill: none; stroke: var(--roheline); stroke-width: 2.5; }
.g-prognoos { stroke-dasharray: 4 4; opacity: .85; }
.g-joon { stroke: var(--tint-3); stroke-width: 1; stroke-dasharray: 2 3; opacity: .5; }
.g-tana { stroke: var(--tint-2); stroke-width: 1; }
.g-tapp { fill: var(--roheline); stroke: var(--pind); stroke-width: 2; }
.g-silt { fill: var(--tint-3); font-size: 10px; stroke: none; }
.g-halo { stroke: #fff; stroke-width: 3px; paint-order: stroke; stroke-linejoin: round; }
.g-tugev { fill: var(--tint); font-weight: 700; }
.g-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11px; color: var(--tint-2); }
.g-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.g-legend i.g-l-joon { height: 3px; background: var(--roheline); vertical-align: 2px; }
/* card overview: Koht x Aeg plane and forest waterfall */
.vaade-valik { margin: 2px 0 12px; width: max-content; }
.k-kosk rect, .k-kosk text { stroke: none; }
.k-nimi, .k-arv { font-size: 11.5px; fill: var(--tint-2); }
.k-arv { font-variant-numeric: tabular-nums; }
.k-pluss { fill: #2f7a4f; }
.k-kadu { fill: var(--pind-3); }
.k-miinus { fill: #c94a2a; opacity: .55; }
.k-summa { fill: var(--tint-2); }
.k-koht { fill: #1f4d3a; }
.k-sild { stroke: var(--tint-3); stroke-width: 1; stroke-dasharray: 2 2; }
.k-piir { stroke: #a4432a; stroke-width: 1; stroke-dasharray: 1 3; opacity: .55; }
.k-eraldus { stroke: var(--joon); stroke-width: 1; }
.g-legend i.k-l-pluss { background: #2f7a4f; }
.g-legend i.k-l-kadu { background: var(--pind-3); }
.g-legend i.k-l-miinus { background: rgba(201, 74, 42, .55); }
.g-legend i.k-l-piir { width: 2px; background: #a4432a; opacity: .6; }
.kypseb { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--pind-2); font-size: 13px; }

/* ---------- guide dialog ---------- */
#giid { width: min(680px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 1px solid var(--klaas-serv); border-radius: 24px;
        background: var(--klaas-tugev); backdrop-filter: var(--hagu); -webkit-backdrop-filter: var(--hagu); color: var(--tint);
        box-shadow: var(--klaas-valgus), var(--vari); }
#giid::backdrop { background: rgba(10, 20, 26, .28); backdrop-filter: blur(3px); }
.giid-pea { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
            padding: 14px 14px 12px 22px; background: var(--klaas-tugev); backdrop-filter: var(--hagu); -webkit-backdrop-filter: var(--hagu);
            border-bottom: 1px solid var(--joon); }
.giid-pea h2 { margin: 0; font-size: 18px; }
#giid-sisu { padding: 6px 22px 22px; font-size: 14px; }
#giid-sisu h3 { font-size: 15px; margin: 24px 0 6px; }
#giid-sisu p { margin: 8px 0; }
.valemikast { margin: 14px 0; padding: 14px 16px; border-radius: 16px; background: var(--pind-2); display: grid; gap: 6px; font-size: 15px; }
.valemikast small { color: var(--tint-2); font-size: 11px; }
.vk { font-weight: 700; }
.vk.hinne { color: var(--aktsent); }
.giid-klassid, .giid-loend, .giid-kaalud { margin: 8px 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.giid-loend { list-style: disc; padding-left: 20px; }
.giid-klassid li { display: flex; align-items: center; gap: 8px; }
.tuhi-lapp { border: 1px dashed var(--tint-3); }
.giid-kaalud li { display: grid; grid-template-columns: 150px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.giid-kaalud .riba > span { background: var(--aktsent); }
#giid details { border: 1px solid var(--joon); border-radius: 14px; margin: 6px 0; padding: 0 14px; background: var(--pind-2); }
#giid summary { cursor: pointer; padding: 10px 0; font-weight: 650; }
#giid details[open] { padding-bottom: 10px; }
#giid table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
#giid th { text-align: left; font-weight: 600; color: var(--tint-2); font-size: 12px; border-bottom: 1px solid var(--joon); padding: 5px 0; }
#giid td { padding: 4px 0; border-bottom: 1px solid var(--joon); }
#giid th:last-child, #giid td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
#giid tr.summa td { font-weight: 700; border-bottom: 2px solid var(--joon); }
#giid table.maatriks { table-layout: fixed; text-align: center; }
.giid-valik { margin: 10px 0 4px; }
#giid table.andmed-tabel { table-layout: fixed; }
#giid .andmed-tabel th:nth-child(1) { width: 27%; } #giid .andmed-tabel th:nth-child(2) { width: 30%; }
#giid .andmed-tabel th, #giid .andmed-tabel td, #giid .andmed-tabel th:last-child, #giid .andmed-tabel td:last-child { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; font-variant-numeric: normal; }
#giid .andmed-tabel td small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--tint-3); line-height: 1.35; }
#giid .andmed-tabel a { color: inherit; }
@media (max-width: 560px) {
  #giid .andmed-tabel thead { display: none; }
  #giid .andmed-tabel tr { display: block; border-bottom: 1px solid var(--joon); padding: 8px 0; }
  #giid .andmed-tabel td { display: block; border: 0; padding: 2px 0; }
  #giid .andmed-tabel td:nth-child(3) { color: var(--tint-2); }
}
#giid .maatriks th, #giid .maatriks td { text-align: center; padding: 8px 4px; border: 2px solid transparent; }
#giid .maatriks th small { font-weight: 400; color: var(--tint-3); }
#giid .maatriks td { font-weight: 650; font-size: 12px; color: #1c1c1a; border-radius: 8px; }
#giid .maatriks td.tyhi { background: var(--pind-2); color: var(--tint-3); }
.naide { border: 1px solid var(--joon); border-radius: 16px; padding: 4px 14px 10px; }
.vaike { font-size: 12.5px; color: var(--tint-2); }
.markus { font-size: 12px; color: var(--tint-3); margin-top: 18px; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .brand { top: 10px; left: 10px; padding: 6px 14px 6px 8px; }
  .brand-tekst span { display: none; }
  .nurganupud { top: 10px; right: 10px; gap: 6px; }
  .ring { width: 42px; height: 42px; }
  .ajatelg { bottom: 10px; width: calc(100% - 20px); padding: 10px 10px 10px; border-radius: 22px; gap: 8px; }
  .segment button { padding: 6px 11px; }
  .paev { padding: 5px 0 4px; }
  .paev .kp { font-size: 12.5px; }
  .paev .nadal { font-size: 9.5px; }
  .legend .arv { display: none; }
  .maplibregl-ctrl-bottom-right { bottom: 200px; }
  .maplibregl-ctrl-bottom-left { bottom: 200px; }
  .sahtel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 80vh; border-radius: 26px 26px 0 0; animation-name: ules; }
  @keyframes ules { from { transform: translateY(24px); opacity: 0; } }
  .omadused li { grid-template-columns: 104px 1fr; }
  .n-sona { font-size: 19px; }
}

/* phones: the day strip scrolls sideways, the chosen day is centred */
@media (max-width: 760px) {
  .paevad { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .paevad::-webkit-scrollbar { display: none; }
  .paev { flex: 0 0 40px; scroll-snap-align: center; }
  .paev .kp { font-size: 14px; }
  .paev .nadal { font-size: 10px; }
}
.ajatelg > *, .paevarida { min-width: 0; }
.paevad { position: relative; }

/* score back in the place card */
.sahtel-pea-vasak { display: flex; align-items: center; gap: 12px; }
.sahtel-hinne { display: grid; justify-items: center; line-height: 1; }
.hinne-arv { font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hinne-silt { font-size: 10.5px; color: var(--tint-2); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.n-rida { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.n-rida .n-sona { margin: 0; }
.n-arv { font-size: 15px; font-weight: 650; color: var(--tint-2); font-variant-numeric: tabular-nums; }

/* dark theme: MapLibre's dark control icons on dark glass */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .maplibregl-ctrl-group button .maplibregl-ctrl-icon,
  :root:not([data-theme="light"]) .maplibregl-ctrl-attrib-button { filter: invert(1); }
}
:root[data-theme="dark"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon,
:root[data-theme="dark"] .maplibregl-ctrl-attrib-button { filter: invert(1); }

/* =====================================================================
   "Matkarakendus" (outdoor app): opaque white panels, gently rounded
   corners instead of pills, thin border and soft shadow, Figtree,
   dark forest green accent, chanterelle class colours.
   ===================================================================== */
:root, :root[data-theme="light"] {
  --pind: #ffffff;
  --pind-2: #f3f4f1;
  --pind-3: #e4e7e2;
  --tint: #1d2420;
  --tint-2: #4a554e;
  --tint-3: #7b857e;
  --joon: #e4e7e2;
  --aktsent: #1f4d3a;
  --aktsent-tekst: #ffffff;
  --aktsent-pehme: #e6efe9;
  --roheline: #a4432a;
  --klaas: #ffffff;
  --klaas-tugev: #ffffff;
  --klaas-serv: #dfe3dc;
  --klaas-valgus: none;
  --vari: 0 2px 10px rgba(20, 32, 26, .10), 0 1px 2px rgba(20, 32, 26, .06);
  --hagu: none;
  --raadius: 14px;
}
body { font-family: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-feature-settings: normal; background: #eef0ea; }
.klaas { backdrop-filter: none; -webkit-backdrop-filter: none; }

.brand { border-radius: 12px; padding: 7px 14px 7px 9px; }
.brand-tekst strong { font-size: 17px; font-weight: 700; color: var(--aktsent); }
.logo { color: #e3a019; }
.logo { width: 38px; height: 38px; }
.logo-seen { fill: #eaa91c; }
.logo-lehter { fill: none; stroke: #c98a10; stroke-width: 1.2; stroke-linecap: round; }
.logo-voldid { fill: none; stroke: #b9780b; stroke-width: 1; stroke-linecap: round; opacity: .85; }
.brand-tekst .ladina { font-style: italic; font-size: 11px; color: var(--tint-3); }
.brand-tekst strong { font-size: 18px; }
/* mode switch: the eye button hides the layer; the day strip and calendar only where the day matters */
#ajatelg[data-reziim="koht"] #paeva-osa,
#ajatelg[data-reziim="peidus"] > :not(.ajatelg-pea), #ajatelg[data-reziim="peidus"] #parimad-nupp,
#ajatelg[data-reziim="peidus"] .kalender-hoidja { display: none; }
#ajatelg[data-reziim="peidus"] { width: auto; }
.ring { border-radius: 12px; width: 44px; height: 44px; }
.ring:hover { background: var(--pind-2); }
.menyy { border-radius: 12px; top: 50px; }
.menyy button { border-radius: 8px; }
.menyy button.aktiivne { background: var(--aktsent-pehme); color: var(--aktsent); }
.ring-vaike { border-radius: 10px; }

.marker { background: var(--aktsent); border-color: #fff; backdrop-filter: none; }
.tapp { border-color: var(--aktsent); }

.ajatelg { border-radius: 16px; padding: 12px 12px 12px; }
.segment { border-radius: 10px; background: var(--pind-2); }
.segment button { border-radius: 8px; }
.segment button.aktiivne { background: #fff; color: var(--aktsent); box-shadow: 0 1px 3px rgba(20, 32, 26, .14); }
.paev { border-radius: 10px; }
.paev.aktiivne { background: var(--aktsent); }
.paev.tana .nadal { color: var(--aktsent); }
.pp-markus { border-radius: 6px; background: var(--aktsent-pehme); color: var(--aktsent); }
.kokkuvote b { color: var(--tint); }

.sahtel { border-radius: 16px; background: #fff; }
.otsus-silt { border-radius: 6px; }
.otsus-silt.k0 { background: #a4432a; color: #fff; }
.otsus-silt.k1 { background: #d9894a; color: #2a1606; }
.otsus-silt.k2 { background: #e9cf8f; color: #3a2a04; }
.hinne-arv { color: var(--tint); }
.naitaja { border-radius: 12px; background: var(--pind-2); border-color: transparent; }
.riba.q-hea > span { background: #2f7a4f; }
.kypseb { border-radius: 10px; }
.g-tee { stroke: #a4432a; }
.g-tapp { fill: #a4432a; }
.g-legend i.g-l-joon { background: #a4432a; }

#giid { border-radius: 16px; background: #fff; backdrop-filter: none; }
.giid-pea { background: #fff; backdrop-filter: none; }
#giid details { border-radius: 10px; background: #fff; }
#giid .maatriks td { border-radius: 6px; }
.valemikast, .naide { border-radius: 12px; }
.vk.hinne { color: #a4432a; }
.giid-kaalud .riba > span { background: var(--aktsent); }

.maplibregl-ctrl-group { border-radius: 12px !important; background: #fff !important; backdrop-filter: none; border: 1px solid var(--klaas-serv); }
.maplibregl-ctrl-attrib { background: rgba(255, 255, 255, .9) !important; backdrop-filter: none; }

/* timeline: month under the first day and at month changes */
.paev .kuu { font-size: 10px; color: var(--tint-3); font-weight: 600; line-height: 1; height: 10px; }
.paev.aktiivne .kuu { color: rgba(255, 255, 255, .8); }

/* place card: one line per property, the reason cut short until the row is clicked */
.omadused { margin: 8px 0 0; gap: 0; }
.omadused li { grid-template-columns: 116px 56px minmax(0, 1fr); gap: 0 10px; padding: 5px 6px; margin: 0 -6px;
               border-radius: 8px; cursor: pointer; }
.omadused li:hover { background: var(--pind-2); }
.omadused .pohjus { grid-column: 3; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.omadused li.lahti { background: var(--pind-2); }
.omadused li.lahti .pohjus { grid-column: 1 / -1; white-space: normal; margin-top: 4px; }
.sel-h { margin: 16px 0 2px; padding-top: 12px; }
.kypseb { margin: 10px 0 0; padding: 8px 12px; }
.vaade-valik { margin: 0 0 12px; }
/* coordinates under the class label, with a copy button */
.sahtel-pea-tekst { display: grid; gap: 4px; justify-items: start; }
.koord { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--tint-2); font-variant-numeric: tabular-nums; }
.kopeeri { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border: 1px solid var(--klaas-serv); border-radius: 7px;
           background: #fff; font: inherit; font-size: 12px; font-weight: 600; color: var(--aktsent); cursor: pointer; }
.kopeeri:hover { background: var(--aktsent-pehme); }
.kopeeri svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.kopeeri.tehtud { background: var(--aktsent); border-color: var(--aktsent); color: #fff; }
@media (max-width: 760px) {
  .omadused li { grid-template-columns: 100px 46px minmax(0, 1fr); }
}
.n-rida { gap: 6px; }
.n-rida .n-sona { white-space: nowrap; font-size: 19px; }
.segment button { white-space: nowrap; }

/* logo button and "what a chanterelle needs" dialog */
button.brand { font: inherit; color: inherit; text-align: left; cursor: pointer; background: var(--pind); border: 1px solid var(--klaas-serv); box-shadow: var(--vari); }
button.brand:hover { background: var(--pind-2); }
#seeninfo { width: min(520px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 1px solid var(--klaas-serv);
            border-radius: 16px; background: #fff; color: var(--tint); box-shadow: var(--vari); }
#seeninfo::backdrop { background: rgba(10, 20, 26, .28); }
#seeninfo-sisu { padding: 4px 22px 22px; font-size: 14px; line-height: 1.45; }
.si-sissejuhatus { margin: 0 0 12px; }
.si-read { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.si-read li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.si-read svg { margin-top: 2px; padding: 4px; width: 30px; height: 30px; border-radius: 9px; background: var(--aktsent-pehme);
               fill: none; stroke: var(--aktsent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.si-read b, .si-read span { display: block; }
.si-read span { color: var(--tint-2); font-size: 13.5px; }
.si-kuud { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-items: end; text-align: center; margin-top: 10px; }
.si-kuud small { display: block; font-size: 11.5px; color: var(--tint-2); margin-top: 3px; }
.si-tulp { display: block; border-radius: 4px; background: var(--pind-3); }
.si-tulp.t0 { height: 6px; } .si-tulp.t1 { height: 14px; background: #e9cf8f; }
.si-tulp.t2 { height: 26px; background: #d9894a; } .si-tulp.t3 { height: 38px; background: #a4432a; }
.sel-h-esimene { margin-top: 4px; padding-top: 0; }



/* panel head: two switches and the calendar button with its menu (day and "Head metsad") */
.pea-nupud { display: flex; gap: 6px; min-width: 0; }
.luliti, .kalender-nupp { display: flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px; border-radius: 10px;
  border: 1px solid var(--joon); background: var(--pind-2); color: var(--tint-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.luliti svg, .kalender-nupp svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.luliti[aria-pressed="true"] { background: var(--aktsent); border-color: var(--aktsent); color: #fff; }
.luliti:hover, .kalender-nupp:hover { border-color: var(--tint-3); }
.kalender-nupp { color: var(--tint); }
.kalender-hoidja { flex: none; }
.kalender-menyy { top: auto; bottom: 44px; right: 0; min-width: 220px; padding: 10px; gap: 8px; }
.kalender-menyy input[type="date"] { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--joon); border-radius: 10px; background: var(--pind); color: var(--tint); }
.kalender-menyy .segment { justify-content: stretch; }
.kalender-menyy .segment button { flex: 1; }
@media (max-width: 760px) {
  .luliti span { display: none; }
  .luliti { padding: 6px 9px; }
}

/* "Hüüf": the user's own mushroom spots as pins in the logo's chanterelle gold */
.pinn { width: 24px; height: 32px; cursor: pointer; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.pinn svg { width: 100%; height: 100%; display: block; }
.pinn path { fill: #e3a019; stroke: #fff; stroke-width: 1.6; }
.pinn circle { fill: #fff; }
.maplibregl-popup-content { font: 13px/1.4 Figtree, sans-serif; border-radius: 10px; padding: 8px 12px; }
.maplibregl-popup-content small { color: var(--tint-2); }
