:root {
  --bg: #fffaf2;
  --ink: #33281f;
  --ink-soft: #4f3f31;
  --muted: #75604c;
  --line: #ecdfcb;
  --sun: #f29a2e;
  --sun-ink: #9a4f08;
  --half-ink: #83560f;
  --shade-ink: #5d5578;
  --sun-fill: #f5a83a;
  --half-fill: #f7d89e;
  --shade-fill: #e8e3ef;
  --sun-soft: #fdebcc;
  --sky-top: #fff1d6;
  --sky-bottom: #fffaf0;
  --hz-h: 132px;
  --sheet-h: 52vh;
  --shadow: 0 18px 44px -20px rgba(80, 52, 24, .38), 0 2px 6px rgba(80, 52, 24, .06);
  --shadow-sm: 0 4px 12px -6px rgba(80, 52, 24, .28);
  --serif: 'Young Serif', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; overflow: hidden;
  caret-color: var(--sun-ink);
}
::selection { background: #fde0a8; color: var(--ink); }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--sun-ink); outline-offset: 2px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { display: block; flex: none; }

#map { position: fixed; inset: 0; }

/* ---------- Horizont ---------- */
.horizon {
  position: fixed; z-index: 11; top: 16px; left: 436px; width: min(640px, calc(100vw - 452px));
  padding: 12px 18px 8px; border-radius: 26px;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  border: 1px solid rgba(236, 210, 170, .7);
  box-shadow: var(--shadow);
  transition: background .8s var(--ease);
}
.hz-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.hz-time { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.hz-day { font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.horizon.day-in-seg .hz-day { display: none; } /* „Heute/Morgen“ steht schon im Tagesknopf */
.time { font: 400 32px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
/* Sonnenstand als eigene Zeile unter Uhrzeit und Knöpfen – neben ihnen blieb nur ein schmaler Streifen */
.hz-meta { order: 3; flex: 1 0 100%; margin: 0; font-size: 13.5px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hz-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.wx { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.wx:empty { display: none; }

.seg { display: inline-flex; background: rgba(255, 255, 255, .72); border: 1px solid rgba(230, 205, 165, .9); border-radius: 15px; padding: 4px; gap: 3px; flex: none; }
.seg button, .seg .date-btn {
  min-height: 44px; min-width: 44px; border: 0; background: none; padding: 0 12px; border-radius: 11px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft); display: grid; place-items: center;
  transition: background .2s, color .2s;
}
.seg button.on, .seg .date-btn.on { background: var(--ink); color: #fff8ee; }
.date-btn { position: relative; cursor: pointer; }
.now-btn { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #efd2a6; background: #fff; color: var(--sun-ink); font-weight: 700; font-size: 14px; white-space: nowrap; }
body.not-now .hz-right .wx { display: none; }
.date-text { white-space: nowrap; font-size: 13px; }
.icon-btn.play-btn { background: rgba(255, 255, 255, .72); border: 1px solid rgba(230, 205, 165, .9); color: var(--sun-ink); border-radius: 50%; }
.icon-btn.play-btn.on { background: var(--ink); border-color: var(--ink); color: #fff8ee; }
.season { padding: 6px 2px 8px; border-top: 1px dashed rgba(200, 170, 120, .5); margin-top: 4px; }
.season-quick { display: none; gap: 6px; margin-bottom: 6px; }
.season-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); }
.season-head b { color: var(--ink); }
.season input { width: 100%; height: 44px; margin: 0; accent-color: var(--sun-ink); -webkit-appearance: none; appearance: none; background: transparent; }
.season input::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #c9c0dc, #f6c56f 50%, #c9c0dc); }
.season input::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #c9c0dc, #f6c56f 50%, #c9c0dc); }
.season input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: radial-gradient(circle at 35% 32%, #ffe7b0, #f6a234 60%, #e2801a); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(150, 80, 10, .35); }
.season input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #f6a234; border: 3px solid #fff; }
.season-months { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: -6px; }

.arc { width: 100%; height: auto; max-height: 76px; display: block; margin-top: 4px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.arc:active { cursor: grabbing; }
.arc:focus { outline: none; }
.arc.kbd:focus .sun-ring { stroke: var(--sun-ink); stroke-width: 2.5; }
.arc .path-future { fill: none; stroke: #e6c58f; stroke-width: 2; stroke-dasharray: 1 6; stroke-linecap: round; }
.arc .path-past { fill: none; stroke: url(#arcGrad); stroke-width: 3.5; stroke-linecap: round; }
.arc .win { fill: none; stroke: rgba(242, 154, 46, .26); stroke-width: 14; stroke-linecap: round; }
.arc .horizon-line { stroke: #dcc29a; stroke-width: 1.2; }
.arc .tick { stroke: #cdb18a; stroke-width: 1; }
.arc .tick-label { font: 700 10px var(--sans); fill: #7f6142; text-anchor: middle; }
.arc .tick-label.end { font-weight: 700; fill: var(--ink-soft); }
.arc .sun-halo { fill: rgba(255, 196, 92, .32); }
.arc .sun-ring { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 2.5; }
.arc .sun-dot { fill: url(#sunGrad); }
.arc .moon { fill: #fffdf8; stroke: #b9b0d2; stroke-width: 1.4; }
/* Bis zum ersten Ziehen: Pfeile neben der Sonne als Hinweis „schieb mich“ */
.arc .drag-hint path { fill: none; stroke: var(--sun-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.night .arc .drag-hint path { stroke: var(--shade-ink); }

body.night { --sky-top: #e9e4f2; --sky-bottom: #f6f3fa; }
body.night .horizon { border-color: #ddd6ea; }
body.night .arc .path-future { stroke: #c9c0dc; }
body.night .arc .horizon-line { stroke: #cfc7e0; }
body.night .arc .tick { stroke: #c6bdd9; }
body.night .arc .tick-label { fill: #5d5578; }
body.night .hz-meta { color: #5d5578; }

/* ---------- Panel ---------- */
.panel {
  position: fixed; z-index: 10; top: 16px; left: 16px; bottom: 16px; width: 404px;
  background: var(--bg); border: 1px solid rgba(236, 223, 203, .9); border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px 20px 16px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #e6d6bd transparent;
}
.panel::-webkit-scrollbar { width: 8px; }
.panel::-webkit-scrollbar-thumb { background: #e6d6bd; border-radius: 8px; border: 2px solid var(--bg); }
.handle { display: none; }

.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.brand h1 { font: 400 26px/1.05 var(--serif); margin: 0; letter-spacing: -.015em; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.logo {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 32%, #ffe1a0, var(--sun) 58%, #d9761a);
  box-shadow: 0 6px 14px -4px rgba(190, 100, 20, .45), inset 0 -2px 4px rgba(150, 70, 10, .25);
}
body.night .logo { background: radial-gradient(circle at 62% 38%, #fffdf8, #d8d1e8 72%); box-shadow: 0 6px 14px -4px rgba(93, 85, 120, .35); }

/* ---------- Frage ---------- */
.ask { position: relative; display: flex; gap: 8px; margin-bottom: 18px; }
.ask-box { position: relative; flex: 1; }
.ask-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ask input {
  width: 100%; height: 52px; padding: 0 54px 0 44px;
  border: 1.5px solid var(--line); border-radius: 16px; background: #fff;
  font: 16px var(--sans); color: var(--ink); outline: none;
  box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
.ask input::placeholder { color: var(--muted); }
.ask input:focus { border-color: #eebf7c; box-shadow: 0 0 0 4px var(--sun-soft); }
.ask input::-webkit-search-cancel-button { display: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 13px; border: 0; flex: none;
  display: grid; place-items: center; background: transparent; color: var(--ink-soft);
  transition: background .15s, transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.94); }
.mic { position: absolute; right: 4px; top: 4px; background: var(--sun-soft); color: var(--sun-ink); }
.mic.rec { background: var(--sun); color: #fff; animation: rec 1.2s ease-in-out infinite; }
@keyframes rec { 50% { transform: scale(.92); } }
.filter-btn { position: relative; width: 52px; height: 52px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); }
.count-dot { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: #fff8ee; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

.search-results {
  position: absolute; z-index: 5; left: 0; right: 0; top: 60px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); max-height: 340px; overflow-y: auto; animation: pop .18s var(--ease);
}
.search-results li { min-height: 52px; padding: 8px 10px; border-radius: 12px; cursor: pointer; display: flex; gap: 12px; align-items: center; }
.search-results li.active, .search-results li:hover { background: var(--sun-soft); }
.search-results .bubble { width: 36px; height: 36px; border-radius: 11px; }
.search-results .t { font-weight: 700; }
.search-results .s { color: var(--muted); font-size: 13px; }
.search-results .empty { color: var(--muted); cursor: default; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }


.ctx-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.ctx-row:not(:has(> :not([hidden]))) { display: none; }
.ctx-row .intent-chip { flex: 1 1 200px; margin: 0; }
.now-inline {
  flex: 0 0 auto; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid #efd2a6; background: #fff;
  color: var(--sun-ink); font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer; animation: pop .25s var(--ease);
}
.now-inline:focus-visible, .list-more:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.list-more {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 6px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink-soft); font-weight: 700; font-size: 14px; cursor: pointer;
}
.filter-note { margin: 16px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--sun-soft); color: var(--ink); font-size: 14px; }
.intent-chip {
  display: flex; align-items: center; gap: 6px; margin: 12px 0 18px; padding: 0 0 0 14px; min-height: 48px;
  background: var(--sun-soft); border-radius: 14px; font-size: 14px; font-weight: 700; color: var(--ink);
  animation: pop .25s var(--ease);
}
.intent-chip #intentText { flex: 1; padding: 8px 0; }
.chip-x { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: var(--ink-soft); }
.chip-now { display: none; }
/* Zeit ist nicht „jetzt“: × wird zu „Jetzt ×“ – gleiche Wirkung, im Daumenbereich */
.intent-chip.with-now .chip-x {
  width: auto; min-width: 44px; height: 44px; margin: 2px; padding: 0 8px 0 12px; display: inline-flex; align-items: center; gap: 4px;
  border-radius: 11px; background: #fff; border: 1px solid #efd2a6; color: var(--sun-ink); font-weight: 700; font-size: 14px; flex: none; cursor: pointer;
}
.intent-chip.with-now .chip-now { display: inline; }

/* ---------- Antwort ---------- */
.hero { padding: 4px 2px 6px; }
.hero.anim { animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -6px 0 6px -8px; padding: 0 10px 0 4px; border: 0; background: none; font-weight: 700; font-size: 14px; color: var(--ink-soft); border-radius: 12px; }
.hero-main { display: flex; gap: 14px; align-items: center; }
.hero h2 { font: 400 27px/1.12 var(--serif); margin: 0; letter-spacing: -.015em; text-wrap: balance; }
.hero .meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.status { display: flex; align-items: center; gap: 8px; margin: 18px 0 2px; font: 400 19px/1.25 var(--serif); }
.status .ico { margin-top: -1px; }
.status.sun { color: var(--sun-ink); }
.status.half { color: var(--half-ink); }
.status.shade { color: var(--shade-ink); }
.sub-status { margin: 2px 0 0 30px; color: var(--muted); font-size: 14px; }
.sub-status.conf { display: flex; align-items: center; gap: 6px; margin-left: 30px; font-weight: 600; color: var(--ink-soft); }
.sub-status.conf .ico { flex: none; }
.sub-status.conf-sure .ico { color: var(--sun-ink); }
.hero-actions { display: flex; gap: 8px; margin-top: 18px; }
.why { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #f6eee2; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.why .ico { margin-top: 1px; color: var(--shade-ink); }
.why small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 2px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.fact { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 999px; background: #f6eee2; color: var(--ink-soft); }
.loc-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--sun-ink); font-weight: 700; font-size: 14px; }
.hero.calm { text-align: left; }
.hero.calm h2 { font-size: 24px; }
.hero.calm p { color: var(--ink-soft); margin: 8px 0 0; font-size: 15px; }
.hero .art { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 14px; background: var(--shade-fill); color: var(--shade-ink); }
/* Laden: kein Einblenden (blieb in gedrosselten Tabs blass hängen), kleine Sonne wartet am Horizont */
.hero.loading.anim { animation: none; }
.hero.loading h2 { color: var(--ink); }
.hero .dawn { display: block; margin: 2px 0 10px; overflow: visible; }
.dawn-line { stroke: #cdb18a; stroke-width: 1.5; stroke-linecap: round; }
.dawn-sun { fill: var(--sun); transform-box: fill-box; transform-origin: center; animation: dawn 3.2s ease-in-out infinite alternate; }
@keyframes dawn { from { transform: translateY(3px); } to { transform: translateY(-6px); } }
.hero .slow p { margin-top: 12px; }
/* Nacht: Mond neben der Überschrift, damit „planen“ im niedrigen Panel sichtbar bleibt */
.hero.calm .hero-main h2 { font-size: 22px; }
.hero.calm .hero-actions { margin-top: 14px; }

.bubble { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none; background: var(--shade-fill); color: var(--shade-ink); }
.bubble.s1 { background: linear-gradient(140deg, #ffe3a6, #fbbf5f); color: #7a3e04; }
.bubble.s05 { background: linear-gradient(140deg, #fff1d8, #f7d89e); color: var(--half-ink); }
.bubble.sm { width: 42px; height: 42px; border-radius: 13px; }

.btn {
  flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 50px; padding: 0 16px; border-radius: 15px; font-weight: 700; font-size: 15px; text-decoration: none;
  border: 1px solid var(--line); background: #fff; color: var(--ink); transition: transform .15s var(--ease), background .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff8ee; }
.btn.primary:hover { background: #241b14; }
.btn.ghost:hover { background: #fdf7ee; }

/* ---------- Tagesleiste ---------- */
.tl { position: relative; height: 6px; border-radius: 6px; background: var(--shade-fill); margin-top: 8px; overflow: visible; }
.tl.big { height: 14px; margin-top: 16px; border-radius: 8px; }
/* Wolken: helle + dunkle Streifen, damit sie auf Sonne wie Schatten auch in grellem Licht erkennbar sind */
.tl u, .tl-legend i.cloudy { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .92) 0 2px, rgba(51, 40, 31, .6) 2px 3.2px, transparent 3.2px 6px); }
.tl u { position: absolute; top: 0; bottom: 0; text-decoration: none; border-radius: inherit; }
.tl-cloud { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); display: flex; color: var(--ink-soft); pointer-events: none; }
.tl-legend i.cloudy { background-color: var(--sun-fill); }
.lg-cloud .ico { color: var(--ink-soft); margin-left: -2px; }
.tl i { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.tl b { position: absolute; top: -3px; bottom: -3px; border: 1.5px solid rgba(51, 40, 31, .55); border-radius: 7px; }
.tl-hours { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i { width: 14px; height: 8px; border-radius: 3px; display: inline-block; }

/* ---------- Listen ---------- */
.list-title { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 4px 6px; }
.list-title h3 { font: 400 17px var(--serif); margin: 0; }
.list-title span { color: var(--muted); font-size: 13px; font-weight: 600; }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  width: 100%; display: flex; gap: 12px; align-items: center; min-height: 68px; padding: 10px 8px;
  border: 0; background: none; border-radius: 16px; text-align: left; transition: background .15s;
}
.row:hover { background: #fdf3e2; }
.row.sel { background: var(--sun-soft); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--muted); font-size: 13px; }
.row .tl { height: 5px; margin-top: 7px; }
.row .tl i { top: -3px; bottom: -3px; width: 2px; box-shadow: none; }
.row-status { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.row-status.sun { color: var(--sun-ink); }
.row-status.half { color: var(--half-ink); }
.row-status.shade { color: var(--shade-ink); }
.note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #f6eee2; color: var(--ink-soft); font-size: 14px; }
.note .ico { margin-top: 1px; color: var(--muted); }
details.more { margin-top: 18px; }
details.more summary { list-style: none; cursor: pointer; min-height: 48px; padding: 0 14px; border-radius: 14px; background: #f6eee2; font-weight: 700; font-size: 14px; color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
details.more[open] summary::after { transform: rotate(225deg); }

.skeleton-row { height: 68px; border-radius: 16px; margin-top: 6px; background: linear-gradient(100deg, #f6eee2 30%, #fcf7ef 50%, #f6eee2 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

.foot { margin-top: 28px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.foot p { margin: 2px 0 0; }
.lang-switch { display: inline-flex; gap: 4px; margin-left: 12px; vertical-align: middle; }
.lang-switch button { min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 600 14px var(--sans); }
.lang-switch button.on { color: var(--ink); background: var(--line); }
.info-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--sun-ink); font-weight: 700; font-size: 14px; }

/* ---------- Karten-Knöpfe ---------- */
.fab, .dial { position: fixed; z-index: 9; right: 16px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.fab { bottom: 28px; width: 52px; height: 52px; display: grid; place-items: center; color: var(--ink); transition: opacity .25s, bottom .35s var(--ease); }
.fab.active { color: var(--sun-ink); }
.dial { top: calc(16px + var(--hz-h) + 12px); width: 60px; height: 60px; }
.dial::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 1px dashed #dcc6a4; }
.dial-n { position: absolute; left: 50%; top: 50%; font-size: 10px; font-weight: 700; color: var(--muted); }
.dial-sun { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe2a3, var(--sun)); box-shadow: 0 2px 4px rgba(150, 80, 10, .35); transition: opacity .3s; }
body.night .dial-sun { opacity: .25; }
.cam { position: fixed; z-index: 9; right: 20px; bottom: 96px; display: flex; flex-direction: column; border-radius: 22px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: opacity .25s, bottom .35s var(--ease); }
.cam button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); font: 700 13px var(--sans); }
.cam button + button { border-top: 1px solid var(--line); }
.cam button:active { background: var(--line); }
/* 2D | 3D: zeigt den aktuellen Zustand, das aktive Feld ist gefüllt */
.cam .tilt { height: 66px; display: flex; flex-direction: column; gap: 3px; padding: 5px; }
.tilt span { flex: 1; width: 100%; display: grid; place-items: center; border-radius: 8px; font: 700 12px var(--sans); color: var(--muted); }
.tilt span.on { background: var(--ink); color: #fff8ee; }
.link-btn { display: flex; align-items: center; min-height: 44px; margin: 2px 0 -10px; padding: 0; border: 0; background: none; color: var(--sun-ink); font: 700 14px var(--sans); text-decoration: underline; text-underline-offset: 3px; }
#northNeedle { display: grid; color: var(--sun-ink); transition: transform .2s; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }

.toast {
  position: fixed; z-index: 20; left: calc(50% + 212px); bottom: 28px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff8ee;
  padding: 11px 18px 11px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); max-width: calc(100vw - 32px); animation: pop .2s var(--ease);
}
.spin { width: 14px; height: 14px; border-radius: 50%; background: var(--sun); flex: none; animation: breathe 1.2s ease-in-out infinite; }
.toast.static .spin { display: none; }
@keyframes breathe { 50% { transform: scale(.6); opacity: .6; } }

.maplibregl-ctrl-attrib { background: rgba(255, 250, 242, .85) !important; border-radius: 10px !important; }

/* ---------- Dialoge ---------- */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(51, 40, 31, .3); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg); border-radius: 26px; padding: 18px 20px 20px; box-shadow: var(--shadow); animation: rise .3s var(--ease); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font: 400 23px var(--serif); margin: 0; }
.close-btn { background: #f3eadd; }
.modal-card h3 { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 20px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 44px; border: 1px solid var(--line); background: #fff; padding: 0 15px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: background .15s, color .15s; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff8ee; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 4px; white-space: normal; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 12px 14px; border-radius: 16px; background: #f6eee2; cursor: pointer; position: relative; }
.switch-row small { display: block; color: var(--muted); font-size: 13px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 48px; height: 30px; border-radius: 15px; background: #ddd0bd; position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .18); transition: transform .25s var(--ease); }
.switch-row input:checked + .switch { background: var(--sun-ink); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 3px solid var(--sun); outline-offset: 2px; }
.modal-foot { display: flex; gap: 10px; margin-top: 22px; }
.info-body { font-size: 15px; color: var(--ink-soft); }
.info-body h4 { font: 400 16px var(--serif); color: var(--ink); margin: 18px 0 4px; }
.info-body p { margin: 0 0 6px; max-width: 65ch; }
.info-body .good { color: #4d6b2a; font-weight: 700; }
.info-body .meh { color: var(--half-ink); font-weight: 700; }

/* ---------- Schmal (Handy + Desktop bis 1100 px): ein Tages-Knopf „Heute ▾“ ----------
   Heute/Morgen/Kalender passten neben Uhrzeit und Jetzt nicht mehr in den Horizont,
   und „Morgen“ stand doppelt da (Tageslabel + Knopf). Heute/Morgen gibt es im aufgeklappten Bereich. */
@media (max-width: 1100px) {
  .hz-day { display: none; }
  #daySeg [data-day] { display: none; }
  #daySeg .date-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; background: none; color: var(--ink); }
  #daySeg .date-btn.on { background: none; color: var(--ink); }
  #daySeg .chev { transform: rotate(-90deg); }
  #calIcon { display: inline-flex; align-items: center; gap: 4px; }
  .season-quick { display: flex; }
}

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .horizon {
    left: 0; right: 0; top: 0; width: auto; border-radius: 0 0 24px 24px; border-width: 0 0 1px;
    padding: calc(8px + env(safe-area-inset-top)) 14px 2px;
  }
  .hz-row { gap: 10px; }
  .hz-meta { display: none; }
  .seg button, .seg .date-btn { padding: 0 10px; }
  .time { font-size: 28px; }
  .wx { font-size: 13px; }
  .arc { max-height: 60px; margin-top: 2px; }
  .hz-right { gap: 6px; }
  .now-btn { padding: 0 12px; }
  .hero h2 { font-size: 23px; }
  .status { margin-top: 12px; font-size: 18px; }
  .hero-actions { margin-top: 14px; }
  .bubble { width: 44px; height: 44px; }
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--sheet-h);
    border-radius: 26px 26px 0 0; border-width: 1px 0 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom));
    transition: height .35s var(--ease);
  }
  .panel.dragging { transition: none; }
  .handle { display: block; position: sticky; top: 0; z-index: 4; height: 28px; margin: 0 -16px 4px; cursor: grab; touch-action: none; background: linear-gradient(var(--bg) 70%, rgba(255, 250, 242, 0)); }
  .handle span { position: absolute; left: 50%; top: 10px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: #d8c6ab; }
  .brand { display: none; }
  .dial { top: calc(var(--hz-h) + 10px); right: 12px; width: 52px; height: 52px; }
  .fab { bottom: calc(var(--sheet-h) + 14px); right: 12px; }
  .cam { flex-direction: row; bottom: calc(var(--sheet-h) + 18px); right: 76px; }
  .cam button + button { border-top: 0; border-left: 1px solid var(--line); }
  /* Handy: nur Kompass (tippen = Norden, drehen mit zwei Fingern) und 2D | 3D */
  .cam .cam-rot { display: none; }
  .cam #northBtn { border-left: 0; }
  .cam .tilt { width: 84px; height: 44px; flex-direction: row; }
  body.sheet-full .cam, body.sheet-up .cam { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s, visibility 0s .25s; }
  body.sheet-full .fab, body.sheet-full .dial { opacity: 0; pointer-events: none; }
  body:not(.has-sel) .dial { display: none; }
  .toast { left: 50%; bottom: auto; top: calc(var(--hz-h) + 12px); }
  .modal { place-items: end center; padding: 0; }
  .modal-card { border-radius: 26px 26px 0 0; width: 100%; max-height: calc(100dvh - 24px); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
