/* Djuu v0.17 – map first. Phone: one floating chip row on top, map buttons on the right, slim draggable sheet at the bottom,
   tabs below. Desktop (>= 900px): the same sheet becomes a fixed left column, map on the right. */
:root {
  --bg: #FBF9FF;
  --surface: #FFFFFF;
  --surface-2: #F1ECFF;
  --ink: #1F1B4D;
  --muted: #4B5078;
  --line: #E2DBF5;
  --brand: #6B4EE6;
  --brand-ink: #FFFFFF;
  --sun: #FFD166;
  --sun-ink: #1F1B4D;
  --yes: #0B7A70;
  --no: #B4423A;
  --limited: #9A5200;
  --unk: #6E7196;
  --sos: #D9432B;
  --shadow: 0 8px 28px rgba(31, 27, 77, .14), 0 1px 3px rgba(31, 27, 77, .08);
  --shadow-sm: 0 2px 10px rgba(31, 27, 77, .12);
  --font-display: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 18px;
  --tabs-h: 58px;
  --peek: 66px;
  --card: 182px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font-body); -webkit-tap-highlight-color: transparent; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a { color: var(--brand); }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

#app { position: fixed; inset: 0; }
#map { position: absolute; inset: 0 0 var(--tabs-h) 0; background: var(--bg); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-control-attribution { font-size: 12px; background: color-mix(in srgb, var(--surface) 75%, transparent) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar { position: absolute; z-index: 1000; top: 0; left: 0; right: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 0 6px; display: grid; gap: 8px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 600 16px/1 var(--font-display); letter-spacing: -.04em; flex: none; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--brand); flex: none; }
.iconbtn.on { background: var(--brand); color: var(--brand-ink); }
.row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 12px 6px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row:empty { display: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; font-size: 14px; white-space: nowrap; }
.cat .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.cat .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cat.on { background: var(--ink); color: var(--bg); }
.cat.on .ic { background: var(--c); color: #fff; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.ctx .chip { box-shadow: var(--shadow-sm); border-color: transparent; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip .n { font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }
.chip svg.i { width: 16px; height: 16px; }

/* ---------- Markers ---------- */
.mk { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--c); display: grid; place-items: center; box-shadow: 0 1px 5px rgba(0,0,0,.3); border: 2px solid var(--c); }
.mk svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.mk.unk { opacity: .45; border-style: dashed; }
.mk.mine { box-shadow: 0 0 0 3px var(--sun), 0 1px 5px rgba(0,0,0,.3); }
.leaflet-marker-icon.sel .mk { transform: scale(1.35); background: var(--c); color: #fff; box-shadow: 0 0 0 4px var(--sun); }
.cluster { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font: 700 13px var(--font-body); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums; }
.cluster.m { width: 46px; height: 46px; }
.cluster.l { width: 54px; height: 54px; font-size: 14px; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1C7ED6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(28,126,214,.25); }

/* ---------- Urgent button ---------- */

/* ---------- Panel (sheet on phone, column on desktop) ---------- */
.panel { position: absolute; z-index: 1100; left: 0; right: 0; bottom: var(--tabs-h); height: var(--peek); background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 30px rgba(31,27,77,.16); display: flex; flex-direction: column; transition: height .25s ease; }
.panel[data-size="half"] { height: 56%; }
.panel[data-size="full"] { height: calc(100% - var(--tabs-h) - env(safe-area-inset-top, 0px) - 6px); }
.grip { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.grip i { width: 42px; height: 5px; border-radius: 3px; background: var(--line); }
.panel-body { flex: 1; overflow-y: auto; padding: 0 16px 24px; overscroll-behavior: contain; }
.panel[data-size="peek"] .panel-body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .panel, .sos { transition: none; } }

.ph { display: flex; align-items: flex-start; gap: 10px; padding: 2px 0 12px; }
.ph h2 { margin: 0; font: 600 21px/1.15 var(--font-display); letter-spacing: -.02em; text-wrap: balance; flex: 1; min-width: 0; }
.ph .sub { display: block; margin-top: 2px; font: 500 13.5px/1.3 var(--font-body); color: var(--muted); letter-spacing: 0; }
.ph .sub button { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 700; text-decoration: underline; }
.round { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--ink); }

/* list */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; width: 100%; text-align: left; }
.list li:first-child .item { border-top: 0; }
.badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.badge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.item h3 { margin: 0; font-size: 15.5px; font-weight: 700; overflow-wrap: anywhere; }
.item .meta { color: var(--muted); font-size: 13px; }
.item .dist { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; align-self: start; padding-top: 3px; }
.open { color: var(--yes); font-weight: 700; }
.closed { color: var(--no); font-weight: 700; }
.mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.mini span { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--yes) 12%, transparent); color: var(--yes); }
.more { display: block; margin: 14px auto 0; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 18px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* detail */
.hero { display: flex; gap: 12px; align-items: flex-start; }
.hero .badge { width: 52px; height: 52px; border-radius: 16px; }
.hero .badge svg { width: 26px; height: 26px; }
.status-line { margin: 4px 0 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); }
.acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 6px; }
.act { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; border: 0; background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--ink); text-decoration: none; }
.act svg.i { width: 22px; height: 22px; }
.act.primary { background: var(--brand); color: var(--brand-ink); }
.act.on { color: var(--sos); }
.sec { margin-top: 20px; }
.sec h4 { margin: 0 0 10px; font: 600 16px/1.2 var(--font-display); letter-spacing: -.01em; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 12px; font-size: 13.5px; font-weight: 600; background: color-mix(in srgb, var(--yes) 11%, transparent); color: var(--yes); }
.fact.no { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.fact.lim { background: color-mix(in srgb, var(--limited) 14%, transparent); color: var(--limited); }
.fact.neutral { background: var(--surface-2); color: var(--ink); }
.fact svg.i { width: 16px; height: 16px; }
.askcard { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border-radius: var(--r); background: color-mix(in srgb, var(--sun) 28%, var(--surface)); }
.askcard div { flex: 1; min-width: 0; }
.askcard b { display: block; }
.askcard span { font-size: 13px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: 10px 16px; font-weight: 700; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); min-height: 44px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.sun { background: var(--sun); color: var(--sun-ink); border-color: transparent; }
.btn.big { flex: 1; min-height: 54px; font-size: 16px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.text { margin: 0 0 8px; }
.muted { color: var(--muted); }
.note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
details.fold { border-top: 1px solid var(--line); padding: 12px 0 0; margin-top: 20px; }
details.fold summary { cursor: pointer; font: 600 16px/1.2 var(--font-display); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.fold summary::after { content: "+"; font: 600 22px/1 var(--font-body); color: var(--muted); }
details.fold[open] summary::after { content: "–"; }
details.fold summary::-webkit-details-marker { display: none; }
.srcrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.srcrow:first-of-type { border-top: 0; }
.srcrow .s { color: var(--muted); font-size: 12.5px; grid-column: 1 / -1; }
.srcrow q { color: var(--muted); font-size: 12.5px; grid-column: 1 / -1; font-style: italic; }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; margin-top: 8px; }
.hours td { padding: 3px 0; }
.hours td:last-child { text-align: right; }
.hours tr.today td { font-weight: 700; }
.photos { display: flex; gap: 8px; overflow-x: auto; }
.photos img { height: 130px; border-radius: 14px; object-fit: cover; flex: none; }
.review { padding: 10px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; }
.stars-read { color: #CC6A00; letter-spacing: 1px; }
.linkbtn { border: 0; background: none; padding: 4px 0; color: var(--muted); font-size: 12.5px; text-decoration: underline; }

/* question flow, forms, wizard */
.qflow { display: grid; gap: 18px; padding: 10px 0; text-align: center; }
.qflow .q { font: 600 24px/1.2 var(--font-display); letter-spacing: -.02em; text-wrap: balance; margin: 0; }
.qflow .count { color: var(--muted); font-weight: 600; font-size: 13px; }
.bigbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bigbtns button { min-height: 64px; border-radius: 18px; border: 0; font-size: 18px; font-weight: 800; }
.bigbtns .yes { background: var(--yes); color: var(--bg); }
.bigbtns .no { background: var(--no); color: #fff; }
.bigbtns .idk { grid-column: 1 / -1; min-height: 50px; background: var(--surface-2); color: var(--ink); font-size: 16px; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; font-size: 32px; line-height: 1; padding: 0 2px; color: var(--line); }
.stars button.on { color: #CC6A00; }
textarea, .field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); font-size: 16px; }
textarea { min-height: 80px; resize: vertical; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field > label { font-weight: 700; font-size: 14px; }
.hint-kids { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--no); }
.error { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--no) 12%, transparent); color: var(--no); font-weight: 600; }
.preview { display: block; max-height: 170px; border-radius: 12px; margin-top: 8px; }
.progress { display: grid; gap: 6px; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.progress .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--sun); border-radius: 3px; }
.minimap { height: 180px; border-radius: var(--r); overflow: hidden; margin-top: 4px; }
.typegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.typebtn { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; min-height: 96px; border-radius: var(--r); border: 2px solid transparent; background: var(--surface-2); font-weight: 700; font-size: 14px; text-align: center; color: var(--ink); }
.typebtn svg.i { width: 30px; height: 30px; color: var(--brand); }
.typebtn.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.suggest { display: grid; gap: 4px; }
.suggest:empty { display: none; }
.suggest button { text-align: left; border: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tri { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.tri:first-of-type { border-top: 0; }
.tri-label { font-weight: 700; }
.seg { display: grid; grid-template-columns: 1fr 1fr 1.3fr; background: var(--surface-2); border-radius: 14px; padding: 3px; gap: 3px; }
.seg button { min-height: 46px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: 15px; color: var(--ink); }
.seg button.on.yes { background: var(--yes); color: var(--bg); }
.seg button.on.no { background: var(--no); color: #fff; }
.seg button.on.unknown { background: var(--surface); box-shadow: var(--shadow-sm); }
.agegrid { display: flex; flex-wrap: wrap; gap: 8px; }
.agegrid .chip { height: 46px; font-size: 15px; padding: 0 18px; }
.sticky-bar { position: sticky; bottom: -24px; display: flex; gap: 8px; padding: 12px 0 16px; margin: 18px -16px -24px; padding-left: 16px; padding-right: 16px; background: var(--surface); border-top: 1px solid var(--line); }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 4px 0 0; }
.summary dt { color: var(--muted); font-weight: 600; }
.summary dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.thanks { text-align: center; padding: 18px 0 8px; display: grid; justify-items: center; gap: 6px; }
.thanks h2 { margin: 6px 0 0; font: 600 26px var(--font-display); }

/* filter view */
.fgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.fgrid .chip { height: 42px; font-size: 14px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 14px; border-radius: 14px; background: var(--surface-2); font-weight: 600; }
.switch input { width: 22px; height: 22px; accent-color: var(--brand); }
.groupgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.groupgrid .cat { justify-content: flex-start; height: 52px; box-shadow: none; background: var(--surface-2); white-space: normal; text-align: left; line-height: 1.2; }
.groupgrid .cat.on { background: var(--ink); }

/* urgent view */
.sosgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sostile { display: grid; justify-items: start; gap: 10px; padding: 16px; min-height: 112px; border: 0; border-radius: 20px; background: var(--surface-2); text-align: left; font-weight: 800; font-size: 16px; color: var(--ink); }
.sostile .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; }
.sostile .ic svg.i { width: 24px; height: 24px; }
.sostile small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.best { padding: 16px; border-radius: 20px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); display: grid; gap: 10px; }
.best .mins { font: 600 30px/1 var(--font-display); letter-spacing: -.02em; }
.calls { display: grid; gap: 6px; margin-top: 18px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); font-size: 14px; }
.calls b { font-variant-numeric: tabular-nums; user-select: all; }

/* events */
.banner { background: color-mix(in srgb, var(--sun) 30%, var(--surface)); border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; font-size: 14px; }
.event { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.event .date { text-align: center; border-radius: 14px; background: var(--surface-2); padding: 7px 0; font-variant-numeric: tabular-nums; }
.event .date b { display: block; font: 600 21px/1 var(--font-display); }
.event .date span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.event h3 { margin: 0; font-size: 15.5px; }
.tagb { display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: var(--sun); color: var(--sun-ink); margin-left: 6px; vertical-align: 2px; }

/* nearby confirmation */
.nearby { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--sun) 28%, var(--surface)); margin-bottom: 10px; }
.nearby div { flex: 1; min-width: 0; font-size: 14px; }
.nearby .yn { display: flex; gap: 6px; flex: none; }
.nearby .yn button { min-width: 50px; min-height: 42px; border-radius: 12px; border: 0; font-weight: 800; background: var(--surface); }

.addhint { position: absolute; z-index: 1150; left: 12px; right: 12px; top: calc(70px + env(safe-area-inset-top, 0px)); display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--sun); color: var(--sun-ink); padding: 10px 14px; border-radius: 16px; font-weight: 700; box-shadow: var(--shadow); }

/* tabs */
.tabs { position: absolute; z-index: 1200; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); }
.tabs button { border: 0; background: none; display: grid; place-items: center; align-content: center; gap: 3px; font-size: 12px; padding: 0; font-weight: 700; color: var(--muted); }
.tabs button svg.i { width: 24px; height: 24px; }
.tabs button.on { color: var(--brand); }
.tabs .add svg.i { width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: var(--sun); color: var(--sun-ink); stroke-width: 2.4; }

.toast { position: fixed; z-index: 3000; left: 50%; bottom: calc(var(--tabs-h) + var(--peek) + 18px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  :root { --col: 420px; --tabs-h: 0px; }
  #map { left: var(--col); bottom: 0; }
  .topbar { left: 0; right: auto; width: var(--col); background: var(--surface); padding-bottom: 10px; border-right: 1px solid var(--line); }
  .cat { box-shadow: none; background: var(--surface-2); }
  .ctx .chip { box-shadow: none; border-color: var(--line); }
  .panel, .panel[data-size] { left: 0; right: auto; width: var(--col); top: var(--top-h, 170px); bottom: 64px; height: auto; border-radius: 0; box-shadow: none; border-right: 1px solid var(--line); }
  .panel .panel-body { overflow-y: auto !important; padding-top: 6px; }
  .grip { display: none; }
  .tabs { left: 0; right: auto; width: var(--col); height: 64px; border-right: 1px solid var(--line); }
  .addhint { left: calc(var(--col) + 16px); right: 16px; top: 80px; }
  .toast { left: calc(var(--col) / 2); bottom: 84px; }
}

/* v0.5: Djuu-Tipps */
.mk { position: relative; }
.mk.tip { border-color: #E0A100; box-shadow: 0 0 0 3px #FFD45C, 0 1px 5px rgba(0,0,0,.3); }
.mk .star { position: absolute; top: -7px; right: -7px; width: 16px; height: 16px; border-radius: 50%; background: #E0A100; display: grid; place-items: center; }
.mk .star svg { width: 10px; height: 10px; fill: #fff; stroke: #fff; stroke-width: 1.5; }
.tipdot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #E0A100; vertical-align: -2px; margin-left: 2px; }
.tipdot svg { width: 11px; height: 11px; fill: #fff; stroke: #fff; stroke-width: 1.5; }
.tipbanner { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, #FFD45C 34%, var(--surface)); color: var(--ink); }
.tipbanner svg.i { width: 24px; height: 24px; fill: #E0A100; stroke: #E0A100; flex: none; }
.tipbanner b { display: block; font: 600 15px var(--font-display); }
.cat[data-group="tipps"] .ic svg { fill: currentColor; }

/* v0.6: offers, family settings */
.item.offer { text-decoration: none; color: inherit; grid-template-columns: 58px 1fr auto; }
.datebox { width: 58px; min-height: 48px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; align-content: center; text-align: center; padding: 4px 2px; font-variant-numeric: tabular-nums; }
.datebox b { font: 600 13px/1.1 var(--font-display); }
.datebox span { font-size: 12px; color: var(--muted); }
.mini span { background: var(--surface-2); color: var(--ink); }
.mini .fitchip { background: color-mix(in srgb, var(--yes) 14%, transparent); color: var(--yes); }
.kidrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.kidrow input { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); font-size: 15px; }
.stepper { display: inline-flex; align-items: center; gap: 14px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 22px; font-weight: 700; }
.stepper b { font: 600 22px var(--font-display); min-width: 20px; text-align: center; }
.askcard svg.i { flex: none; }

/* v0.7: Erleben / Service switch, tag chips, indoor/outdoor */
.modes { flex: none; display: inline-flex; padding: 3px; gap: 2px; height: 40px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); }
.modes button { border: 0; background: none; border-radius: 999px; padding: 0 13px; font: 700 14px var(--font-body); color: var(--muted); }
.modes button.on { background: var(--brand); color: var(--brand-ink); }
.chip.tag.on { background: var(--c); border-color: var(--c); color: #fff; }
.chip.io svg.i { width: 15px; height: 15px; }
.ctx .sep { flex: none; width: 1px; margin: 6px 2px; background: color-mix(in srgb, var(--ink) 18%, transparent); }

/* v0.8: panel tools (Gebiet, Filter), active filter chips, date picker, kid row with optional day */
.tools { display: flex; gap: 8px; margin: -4px 0 10px; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; min-width: 0; color: var(--ink); }
.tool span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool svg.i { width: 16px; height: 16px; flex: none; }
.tool.on { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.active { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.active .chip { height: 30px; font-size: 13px; padding: 0 10px; }
.datepick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.datepick label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.datepick input { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); }
.datepick .tool { margin-left: auto; }
.kidrow { grid-template-columns: 1fr 1fr auto; }
.kidrow input:first-child { grid-column: 1 / 3; }
.kidrow select { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); font-size: 15px; grid-column: 2 / 4; }
.kidrow { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.zs .mk { transform: scale(.62); transition: transform .15s; }
.zs .mk.tip { transform: scale(.8); }
.zs .leaflet-marker-icon.sel .mk { transform: scale(1.1); }

/* v0.9: map owns the screen. Pill + one chip row on top, slim sheet, small card for a tapped pin */
.ctx .chip { height: 36px; box-shadow: var(--shadow-sm); border-color: transparent; }
.chip .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--c); margin-left: -4px; }
.chip .ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip.on, .chip.tag.on, .chip.kat.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.kat.on .ic { color: #fff; }
.chip.up { background: color-mix(in srgb, var(--c) 14%, var(--surface)); padding-left: 8px; }

/* map buttons on the right, above the sheet */
.fabs { position: absolute; z-index: 1050; right: 12px; bottom: calc(var(--tabs-h) + var(--peek) + 12px); display: grid; justify-items: end; gap: 10px; transition: bottom .25s ease, opacity .15s; }
.fab { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.fab.on { color: #1C7ED6; }
#filterBtn { position: relative; }
#filterBtn.on { background: var(--ink); color: #fff; }
.fab .count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--sos); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.fab.sos { background: var(--sos); color: #fff; }
.fab.sos svg.i { width: 22px; height: 22px; stroke-width: 2.2; }
#app[data-size="card"] .fabs { bottom: calc(var(--tabs-h) + var(--card) + 12px); }
#app[data-size="half"] .fabs, #app[data-size="full"] .fabs { opacity: 0; pointer-events: none; }
.leaflet-bottom.leaflet-left { bottom: var(--peek); }
.leaflet-control-attribution { max-width: 62vw; }

/* sheet */
.panel { border-radius: 20px 20px 0 0; box-shadow: 0 -4px 20px rgba(31,27,77,.12); }
.panel[data-size="card"] { height: var(--card); }
.panel[data-size="card"] .panel-body { overflow: hidden; padding-bottom: 8px; }
.grip { height: 18px; }
.panel[data-size="peek"] .ph { justify-content: center; text-align: center; padding: 0; }
.panel[data-size="peek"] .ph h2 { font: 700 16px/1.25 var(--font-body); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel[data-size="peek"] .ph .sub { display: none; }
.pincard { display: flex; gap: 10px; align-items: flex-start; }
.pinmain { flex: 1; min-width: 0; display: grid; grid-template-columns: 44px 1fr; gap: 12px; border: 0; background: none; padding: 0; text-align: left; }
.pinmain h3 { margin: 0; font-size: 16px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pinmain .meta { display: block; color: var(--muted); font-size: 13px; }
.pinmain .mini { display: flex; flex-wrap: nowrap; overflow: hidden; gap: 4px; margin-top: 4px; }
.pinacts { display: flex; gap: 8px; margin-top: 10px; }
.pinacts .btn { margin: 0; flex: 1; min-height: 40px; }
.pinacts .btn[data-fav] { flex: 0 0 48px; padding: 0; }
.pinacts .btn.on { color: var(--sos); }
.drawhint { margin: 2px 0 0; }

/* search sheet */
.searchfield { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-radius: 14px; background: var(--surface-2); }
.searchfield input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 16px; outline: none; }
.catgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.catcard { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; font-weight: 600; font-size: 14px; }
.catcard .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.catcard .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.catcard.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }


@media (min-width: 900px) {
  .ctx .chip { box-shadow: none; border-color: var(--line); }
  .ctx .chip.on { border-color: var(--ink); }
  .fabs, #app[data-size] .fabs { left: calc(var(--col) + 16px); right: auto; top: 16px; bottom: auto; justify-items: start; opacity: 1; pointer-events: auto; }
  .leaflet-bottom.leaflet-left { bottom: 0; }
  .panel[data-size="peek"] .ph { text-align: left; }
}
.panel[data-size="peek"] .panel-body > :not(.ph) { display: none; }
@media (min-width: 900px) { .panel[data-size] .panel-body > :not(.ph) { display: revert-layer; } }

/* v0.11: map style picker, weather chip, photo */
.stylesec { flex-basis: 100%; margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.stylecard { display: inline-grid; gap: 4px; width: calc(33.33% - 6px); margin: 0 6px 8px 0; padding: 0; border: 0; background: none; font-size: 12.5px; font-weight: 600; text-align: left; vertical-align: top; }
.stylecard:nth-of-type(n) img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; border: 2px solid transparent; outline: 1px solid var(--line); background: var(--surface-2); }
.stylecard.on img { border-color: var(--ink); outline-color: var(--ink); }
.tool.wx.plain { border-color: transparent; background: var(--surface-2); font-weight: 500; }
.heroimg { margin: 12px 0 0; }
.heroimg img { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 16px; }
.heroimg figcaption { margin-top: 4px; font-size: 12px; }
.heroimg a { color: var(--muted); }
.tools { flex-wrap: wrap; }
.askcard.ferien { width: 100%; border: 0; text-align: left; margin: 0 0 10px; }
.askcard.ferien svg.i { color: var(--sun-ink); }
.field select { appearance: auto; }

/* v0.13: Djuu colours and type. Fredoka: headings, buttons, pills, cluster numbers. Nunito: everything else. */
h2, h3, h4, .ph h2, .item h3, .pinmain h3, .sec h4, .stylesec { font-family: var(--font-display); font-weight: 600; }
.chip, .tool, .btn, .act, .cat, .catcard, .bigbtns button, .seg button, .stars button, .more, .cluster, .stylecard, .datebox b { font-family: var(--font-display); font-weight: 600; }
.tabs button { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: #4B5078; }
.tabs button.on { color: var(--brand); font-weight: 800; }
.text, .sec p, .field label { font-size: max(14px, 1em); }

/* pins and clusters */
.mkhit { width: 44px; height: 44px; display: grid; place-items: center; }
.mk { background: var(--c); color: #fff; border: 2px solid #fff; }
.mk.unk { border-style: dashed; }
.mk.tip { border-color: #fff; box-shadow: 0 0 0 5px rgba(255, 209, 102, .55), 0 1px 5px rgba(0, 0, 0, .3); }
.mk .star { background: var(--sun); }
.mk .star svg { fill: var(--ink); stroke: var(--ink); }
.tipdot { background: var(--sun); }
.tipdot svg { fill: var(--ink); stroke: var(--ink); }
.tipbanner svg.i { fill: var(--ink); stroke: var(--ink); }
.leaflet-marker-icon.sel .mk { background: var(--c); color: #fff; box-shadow: 0 0 0 4px var(--sun); }
.cluster { background: #6B4EE6; color: #fff; border: 3px solid #fff; }
.me-dot { background: #6B4EE6; box-shadow: 0 0 0 6px rgba(107, 78, 230, .25); }

/* pills, map buttons, sheet */
.chip { color: var(--ink); }
.chip.on, .chip.tag.on, .chip.kat.on { background: #6B4EE6; border-color: #6B4EE6; color: #fff; }
.fab { background: #fff; color: var(--ink); }
.fab.on { color: var(--brand); }
#filterBtn.on { background: #6B4EE6; color: #fff; }
.fab .count { background: #D6336C; color: #fff; }
.fab.sos { background: #D9432B; color: #fff; }
.panel { background: #FFFCF5; }
.ph h2 { color: var(--ink); }
.sticky-bar { background: #FFFCF5; }
.tabs { background: #fff; }
:focus-visible { outline-color: #6B4EE6; }
.leaflet-control-attribution { font-size: 12px; }

/* tap areas of at least 44 px without changing the look */
.chip, .tool, .round, .linkbtn { position: relative; }
.chip::after, .tool::after, .round::after, .linkbtn::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.round::after { left: -3px; right: -3px; }
.row.ctx { padding: 6px 12px 8px; }
.mini span, .pinmain .mini span { white-space: nowrap; }

/* v0.14: logo, start screen and decorative balls from the design PDF */
.logo { position: relative; display: inline-block; padding-right: .6em; font: 700 88px/1 var(--font-display); letter-spacing: -.021em; white-space: nowrap; }
.balls { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ball { position: absolute; border-radius: 50%; }
.ball i { position: absolute; left: 20%; top: 14%; width: 30%; height: 16%; border-radius: 50%; background: #fff; opacity: .4; transform: rotate(-35deg); }
.splash { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: #6B4EE6; overflow: hidden; transition: opacity .25s ease; }
.splash .logo { z-index: 1; }
.splash.out { opacity: 0; pointer-events: none; }
.thanks, .empty { position: relative; overflow: hidden; }
.thanks > :not(.balls), .empty > :not(.balls) { position: relative; z-index: 1; }
.thanks { padding-top: 28px; padding-bottom: 72px; padding-left: 56px; padding-right: 56px; min-height: 300px; }
.empty { padding: 40px 48px; min-height: 170px; border-radius: 18px; display: grid; align-content: center; }
@media (prefers-reduced-motion: reduce) { .splash { transition: none; } }

/* v0.15: logo in Meins; map credits as plain text instead of a tinted box */
.melogo { padding: 4px 0 12px; }
.melogo .logo { font-size: 52px; }
.leaflet-container .leaflet-control-attribution { background: none !important; box-shadow: none; max-width: none; padding: 0 8px 2px; color: var(--ink); white-space: nowrap; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.leaflet-container .leaflet-control-attribution a { color: var(--ink); }

/* v0.17: voice input in the search field */
.searchfield { padding-right: 3px; }
.micbtn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink); display: grid; place-items: center; }
.micbtn.on { background: #6B4EE6; color: #fff; }

/* v0.18 */
.fact.no { text-decoration: none; }
.zd .mk { transform: scale(.42); }
.zd .mk svg, .zd .mk .star { opacity: 0; }
.zd .mk.tip { transform: scale(.55); }
.zd .leaflet-marker-icon.sel .mk { transform: scale(1); }
.zd .leaflet-marker-icon.sel .mk svg { opacity: 1; }
.calls a { color: inherit; }
.evrow { padding: 0 0 8px; margin: 0 -2px; }
.evrow .sep { flex: none; width: 1px; align-self: stretch; margin: 6px 2px; background: var(--line); }
.melinks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.melinks a { padding: 10px 0; font-weight: 700; }

/* v0.19 Termine */
.evrange { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.evrange label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.evrange input { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); }
.savedmark svg { width: 14px; height: 14px; fill: var(--brand); stroke: var(--brand); vertical-align: -2px; }
.mini .visitchip { background: var(--lav, #F1ECFF); color: var(--brand); }
.calmenu { display: grid; gap: 8px; margin: 4px 0 8px; }
.calmenu .btn { justify-content: flex-start; }
.hero .datebox { flex: none; }
b.yes { color: var(--yes); }

/* v0.20 Familie, Einkauf, Besorgungen */
.famseg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; margin: 0 0 14px; border-radius: 14px; background: var(--surface-2); }
.famseg button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; font: 600 15px var(--font-display); color: var(--ink); }
.famseg button.on { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--brand); }
.famseg .n { font: 700 12px var(--font-body); color: var(--muted); }
.shadd { display: flex; gap: 8px; margin: 0 0 10px; }
.shadd input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); font-size: 16px; }
.shadd .btn { min-width: 48px; justify-content: center; }
.shoften { margin: 0 -2px 6px; padding-bottom: 4px; }
.shoften .chip svg.i { width: 14px; height: 14px; }
.shcat { margin: 16px 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.shlist, .erlist { list-style: none; margin: 0; padding: 0; }
.shrow { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); min-height: 52px; }
.shname { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 12px 0; font-size: 16px; color: var(--ink); }
.shcheck { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--brand); background: var(--surface); display: grid; place-items: center; color: #fff; padding: 0; }
.shcheck svg.i { width: 16px; height: 16px; }
.shrow.done .shcheck, .ercard.done .shcheck { background: var(--brand); }
.shrow.done .shname { color: var(--muted); text-decoration: line-through; }
.shmenu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.round.sm { width: 36px; height: 36px; font-size: 18px; }
.by { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; color: var(--c); }
.by::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 4px; vertical-align: 1px; }
.dupcard { padding: 12px 14px; margin: 0 0 10px; border-radius: 14px; background: #FFF3D6; }
.dupcard .fgrid { margin-top: 8px; }
.ercard { padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.erhead { display: flex; align-items: flex-start; gap: 10px; }
.erhead .shcheck { margin-top: 2px; }
.ertitle { flex: 1; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.ermeta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.ermeta .by { margin-left: 0; }
.ercard.done .ertitle b { text-decoration: line-through; color: var(--muted); }
.erstates { display: flex; gap: 6px; margin: 8px 0 0 38px; }
.eredit { display: grid; gap: 8px; margin: 10px 0 0 38px; }
.eredit input, .eredit select, .kidmore input { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); font-size: 15px; }
.kidmore { grid-column: 1 / -1; }
.kidmore summary { cursor: pointer; font-size: 14px; color: var(--brand); font-weight: 700; padding: 4px 0; }
.kidmore[open] { display: grid; gap: 8px; }
.kidrow .wide { grid-column: 1 / -1; }
.toastbtn { margin-left: 10px; border: 0; background: none; color: var(--sun, #FFD166); font-weight: 800; text-decoration: underline; }
/* v0.22 map style picker folded */
.stylefold summary { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; list-style: none; }
.stylefold summary::-webkit-details-marker { display: none; }
.stylefold summary img { width: 60px; height: 40px; border-radius: 8px; object-fit: cover; }
.stylefold summary span { display: grid; }
.stylefold summary small { color: var(--brand); font-weight: 700; }
.stylefold[open] summary { margin-bottom: 8px; }
/* v0.23 sync, pings */
.syncbox { padding: 14px; border-radius: 16px; background: var(--lav, #F1ECFF); }
.syncbox .shadd { margin-top: 10px; }
.syfam { display: grid; gap: 8px; margin-top: 10px; }
.syfam input { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); font-size: 16px; }
.syok { color: var(--yes); } .syoff { color: #CC6A00; }
.pingbar { position: fixed; z-index: 2500; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 64px); max-width: 520px; margin: 0 auto; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: 0 8px 30px rgba(31, 27, 77, .25); display: grid; gap: 10px; }
.pingbar[hidden] { display: none; }
.pingbar div { display: flex; gap: 8px; flex-wrap: wrap; }
.pingdot { width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; border: 3px solid #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent), 0 2px 8px rgba(0,0,0,.3); display: grid; place-items: center; font: 700 15px var(--font-display); }
