/* ───────────────────────────────────────────────────────────────────────────
   Weekagenda — stijlen
   Ontwerpprincipes: OLED-zwart, systeemlettertype (SF), glas alleen op de
   kleine dock, geen zware schaduwen, alles via transform/opacity animeren.
   Afspraken worden met CSS-variabelen gepositioneerd: draaien of schalen van
   het scherm kost daardoor geen JavaScript-render.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;
  --bg: #05060b;
  --surface: #12141d;
  --surface-2: #1a1d29;
  --surface-3: #252938;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f5fa;
  --text-2: rgba(236, 239, 250, .62);
  --text-3: rgba(236, 239, 250, .38);
  --accent: #8b93ff;
  --accent-ink: #0a0c1a;
  --now: #ff5a52;
  --ok: #34d6a0;
  --danger: #ff6b6b;
  --warn: #ffb547;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --gutter: 28px;
  --hh: 44px;           /* uurhoogte — wordt door fit() in app.js gezet */
  --span: 10;           /* aantal zichtbare uren */
  --bn-h: 18px;         /* hoogte van een hele-dag-balk */
  --dock-h: 52px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;           /* geen dubbeltik-zoom */
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
input, textarea { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ── App-frame ─────────────────────────────────────────────────────────── */
#app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  padding-left: var(--safe-l); padding-right: var(--safe-r);
  background:
    radial-gradient(120% 60% at 12% -8%, rgba(110, 120, 255, .13), transparent 60%),
    var(--bg);
}

/* ── Kop: titel + legenda ──────────────────────────────────────────────── */
#top { flex: none; padding-top: calc(var(--safe-t) + 4px); }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4px 16px 8px; }
.wk-no { display: block; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
h1 { font-size: 27px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin-top: 1px; white-space: nowrap; }
h1.long { font-size: 22px; }
.title { min-width: 0; }

.sync { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px; border-radius: 15px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface); border: .5px solid var(--line); margin-bottom: 3px; position: relative; }
.sync::after { content: ""; position: absolute; inset: -7px -4px; }
.sync .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.sync.busy .ic { animation: spin .8s linear infinite; color: var(--accent); }
.sync.err { color: var(--warn); border-color: rgba(255, 181, 71, .35); }
.sync.off { color: var(--text-3); }
@keyframes spin { to { transform: rotate(360deg); } }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 16px 10px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { --c: #8b93ff; flex: none; position: relative; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: 15px; font-size: 13px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 17%, var(--surface)); border: .5px solid color-mix(in srgb, var(--c) 45%, transparent); color: var(--text); transition: background .2s, color .2s, border-color .2s; }
.chip::after { content: ""; position: absolute; inset: -7px -2px; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--c) 25%, transparent); transition: all .2s; }
.chip.off { background: transparent; border-color: var(--line-2); color: var(--text-3); }
.chip.off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.chip b { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); margin-left: -1px; }

/* ── Stage: dagkoppen + tijdraster, beide met 3 weken naast elkaar ─────── */
#stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.track { display: flex; will-change: transform; transform: translate3d(-100%, 0, 0); }
.track.anim { transition: transform .3s var(--ease); }
.track > * { flex: 0 0 100%; min-width: 0; }

#heads { flex: none; overflow: hidden; position: relative; z-index: 2; touch-action: pan-y; border-bottom: .5px solid var(--line-2); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.wk-head { display: grid; grid-template-columns: var(--gutter) 1fr; padding-bottom: 5px; }
.days, .allday { grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.dh { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0 2px; }
.dw { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); line-height: 1; }
.dn { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.dh.we .dw, .dh.we .dn { opacity: .55; }
.dh.today .dw { color: var(--accent); }
.dh.today .dn { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.dh.today.we .dn, .dh.today.we .dw { opacity: 1; }

.allday { grid-auto-rows: var(--bn-h); row-gap: 2px; padding: 3px 0 0; }
.bn { --c: #8b93ff; margin: 0 1.5px; height: var(--bn-h); padding: 0 6px; border-radius: 5px; font-size: 10.5px; line-height: var(--bn-h); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--c) 34%, var(--bg)); color: color-mix(in srgb, var(--c) 42%, #fff); }
.bn.cl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bn.cr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bn.tn { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, .08) 4px 8px); }
.more { grid-column: 1 / -1; height: var(--bn-h); border-radius: 5px; font-size: 10.5px; font-weight: 600; color: var(--text-2); background: var(--surface); }

#scroller { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; position: relative;
  padding-top: 9px; padding-bottom: calc(var(--dock-h) + var(--safe-b) + 22px); scrollbar-width: none; }
#scroller::-webkit-scrollbar { display: none; }

/* Tijdraster */
.wk-body { display: grid; grid-template-columns: var(--gutter) 1fr; height: calc(var(--span) * var(--hh)); contain: layout style; }
.gut { position: relative; }
.gut i { position: absolute; right: 5px; top: calc(var(--i) * var(--hh)); transform: translateY(-50%); font: 500 10px/1 -apple-system, system-ui, sans-serif; font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cols { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  background-image: linear-gradient(to bottom, var(--line) .5px, transparent .5px); background-size: 100% var(--hh); border-bottom: .5px solid var(--line); }
.col { position: relative; border-left: .5px solid var(--line); }
.col.today { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.col.we:not(.today) { background: rgba(255, 255, 255, .013); }

/* Afspraak-blok */
.ev { --c: #8b93ff; position: absolute; container-type: size; overflow: hidden; border-radius: 6px;
  left: calc(var(--x) * 100% + 1px); width: calc(var(--w) * 100% - 2px);
  top: calc(var(--s) * var(--hh)); height: calc(var(--d) * var(--hh) - 1.5px); min-height: 16px;
  padding: 2px 2px 2px 5px;
  background: color-mix(in srgb, var(--c) 27%, var(--bg)); color: color-mix(in srgb, var(--c) 40%, #fff);
  box-shadow: inset 2.5px 0 0 var(--c); transition: opacity .2s; }
.ev.past { opacity: .5; }
.ev.tn { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, .07) 4px 8px); }
.ev:active, .bn:active { filter: brightness(1.25); }
.ev .et { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; font-size: 10.5px; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.ev .tm, .ev .lc { display: none; font-size: 9.5px; line-height: 1.2; font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Hoeveel regels titel passen? Per hoogte van het blok (regelhoogte ≈ 12px). */
@container (min-height: 26px) { .ev .et { -webkit-line-clamp: 2; } }
@container (min-height: 38px) { .ev .et { -webkit-line-clamp: 3; } }
@container (min-height: 50px) { .ev .et { -webkit-line-clamp: 4; } }
@container (min-height: 62px) { .ev .et { -webkit-line-clamp: 5; } }
@container (min-height: 86px) { .ev .et { -webkit-line-clamp: 7; } }
/* Breed genoeg (landschap, werkweek, of enige afspraak): tijd + locatie erbij */
@container (min-height: 36px) and (min-width: 62px) { .ev .tm { display: block; } .ev .et { -webkit-line-clamp: 2; } }
@container (min-height: 50px) and (min-width: 62px) { .ev .et { -webkit-line-clamp: 3; } }
@container (min-height: 64px) and (min-width: 62px) { .ev .et { -webkit-line-clamp: 4; } .ev .lc { display: block; } }
@container (min-height: 90px) and (min-width: 62px) { .ev .et { -webkit-line-clamp: 6; } }
/* Smalle baan (overlappende afspraken): te laag voor tekst → alleen kleur; hoog genoeg → titel verticaal */
@container (max-width: 42px) and (max-height: 39px) { .ev .et { display: none; } }
@container (max-width: 42px) and (min-height: 40px) {
  .ev .et { writing-mode: vertical-rl; display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
            height: calc(100cqh - 4px); font-size: 9.5px; line-height: 1.05; hyphens: none; -webkit-hyphens: none; }
  .ev .tm, .ev .lc { display: none !important; }
}

.now { position: absolute; left: -1px; right: 0; top: calc(var(--t) * var(--hh)); height: 0; border-top: 1.5px solid var(--now); z-index: 3; pointer-events: none; }
.now::before { content: ""; position: absolute; left: -4px; top: -4.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--now); }

#hint { position: absolute; left: 0; right: 0; top: 36%; text-align: center; color: var(--text-3); font-size: 14px; font-weight: 500; pointer-events: none; z-index: 1; padding: 0 40px; }

/* Pull-to-refresh */
#ptr { position: absolute; left: 50%; top: calc(var(--heads-h, 60px) + 4px); z-index: 5; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: .5px solid var(--line-2); color: var(--accent); opacity: 0; pointer-events: none; transform: translateY(-20px); }
#ptr .ic { width: 18px; height: 18px; }
#ptr.armed .ic { transform: rotate(180deg); transition: transform .2s; }
#ptr.spin .ic { animation: spin .8s linear infinite; }

/* ── Dock (iOS 26-achtig glas, alleen hier — klein oppervlak, goedkoop) ── */
#dock { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 6px); z-index: 20; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; pointer-events: none; }
#dock > * { pointer-events: auto; }
.glass { background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .045)), rgba(24, 27, 40, .66);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  border: .5px solid rgba(255, 255, 255, .17); box-shadow: 0 6px 20px rgba(0, 0, 0, .38), inset 0 .5px 0 rgba(255, 255, 255, .25); }
.pill { display: flex; align-items: center; height: var(--dock-h); border-radius: calc(var(--dock-h) / 2); padding: 0 4px; }
.dbtn { height: 44px; min-width: 44px; display: grid; place-items: center; border-radius: 22px; color: var(--text); transition: background .15s, transform .15s; }
.dbtn:active { background: rgba(255, 255, 255, .14); transform: scale(.94); }
.today-btn { padding: 0 14px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.today-btn.here { color: var(--text-3); }
.circ { width: var(--dock-h); height: var(--dock-h); border-radius: 50%; display: grid; place-items: center; color: var(--text); transition: transform .15s; }
.circ:active { transform: scale(.92); }
.circ.busy .ic { animation: spin .8s linear infinite; color: var(--accent); }

/* ── Sheets ────────────────────────────────────────────────────────────── */
.backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .58); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.backdrop.open { opacity: 1; pointer-events: auto; }
.sheet { width: 100%; max-height: 86%; display: flex; flex-direction: column; background: var(--surface); border-radius: 28px 28px 0 0; border-top: .5px solid var(--line-2);
  padding-bottom: calc(var(--safe-b) + 6px); transform: translate3d(0, 100%, 0); transition: transform .42s var(--ease); touch-action: none; }
.sheet.tall { height: 93%; max-height: 93%; background: #0e1018; }
.backdrop.open .sheet { transform: translate3d(0, 0, 0); }
.sheet.drag { transition: none; }
.grab { flex: none; padding: 9px 0 6px; display: grid; place-items: center; touch-action: none; }
.grab span { width: 38px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 2px 20px 12px; }
.sheet-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.x .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 0 16px 14px; }

/* Afspraak-detail */
.ev-top { --c: #8b93ff; display: flex; gap: 12px; padding: 4px 4px 14px; }
.ev-bar { width: 5px; border-radius: 3px; background: var(--c); flex: none; }
.ev-top h2 { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.ev-cal { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.ev-cal i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.card { background: var(--surface-2); border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.row { display: flex; align-items: flex-start; gap: 13px; padding: 13px 15px; border-bottom: .5px solid var(--line); font-size: 15px; line-height: 1.4; min-height: 48px; }
.row:last-child { border-bottom: 0; }
.row > .ic { width: 20px; height: 20px; margin-top: 1px; color: var(--text-2); }
.row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.row small { display: block; color: var(--text-2); font-size: 13px; margin-top: 1px; }
.row a { color: var(--accent); text-decoration: none; font-weight: 600; }
.join { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 50px; border-radius: 14px; margin-bottom: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; text-decoration: none; }
.join .ic { width: 20px; height: 20px; }
.people { padding: 0; }
.people summary { list-style: none; display: flex; align-items: center; gap: 13px; padding: 13px 15px; font-size: 15px; min-height: 48px; cursor: pointer; }
.people summary::-webkit-details-marker { display: none; }
.people summary .ic { color: var(--text-2); width: 20px; height: 20px; }
.people[open] summary { border-bottom: .5px solid var(--line); }
.person { display: flex; align-items: center; gap: 11px; padding: 9px 15px; font-size: 14.5px; border-bottom: .5px solid var(--line); }
.person:last-child { border-bottom: 0; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11.5px; font-weight: 700; color: var(--text-2); flex: none; }
.av.org { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.person span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.desc { padding: 13px 15px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.desc a { color: var(--accent); }

/* Instellingen */
.lbl { margin: 8px 6px 7px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.note { margin: -6px 8px 16px; font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.cal-card { margin-bottom: 12px; }
.cal-head { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.dot { --c: #8b93ff; width: 28px; height: 28px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 28%, transparent); position: relative; }
.dot::after { content: ""; position: absolute; inset: -8px; }
.field { width: 100%; height: 42px; padding: 0 13px; border-radius: 11px; background: var(--surface-3); border: 1px solid transparent; font-size: 16px; outline: none; transition: border-color .15s; min-width: 0; }
.field:focus { border-color: var(--accent); }
.field::placeholder { color: var(--text-3); }
.cal-url { padding: 0 14px 12px; }
.cal-stat { padding: 0 16px 12px; font-size: 12.5px; line-height: 1.4; color: var(--text-3); overflow-wrap: anywhere; }
.cal-stat.ok { color: var(--ok); } .cal-stat.err { color: var(--danger); }
.palette { display: none; flex-wrap: wrap; gap: 11px; padding: 4px 14px 14px; }
.cal-card.pal .palette { display: flex; }
.sw { width: 32px; height: 32px; border-radius: 50%; background: var(--c); position: relative; }
.sw.sel::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--text); }
.cal-del { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; border-top: .5px solid var(--line); color: var(--danger); font-size: 15px; font-weight: 600; }
.cal-del .ic { width: 17px; height: 17px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; z-index: 2; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--surface-3); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .35); transition: transform .25s var(--ease); }
.switch input:checked + span { background: #30d158; }
.switch input:checked + span::after { transform: translateX(20px); }
.seg { display: flex; padding: 2px; border-radius: 10px; background: var(--surface-3); }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.seg span { display: block; text-align: center; padding: 7px 4px; font-size: 13.5px; font-weight: 600; border-radius: 8px; color: var(--text-2); transition: background .2s, color .2s; }
.seg input:checked + span { background: #4a4f66; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-bottom: .5px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row > :first-child { flex: 1; min-width: 0; font-size: 15px; }
.set-row.col { flex-direction: column; align-items: stretch; gap: 9px; }
.lnk { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 15px; height: 50px; font-size: 15.5px; color: var(--accent); text-align: left; border-bottom: .5px solid var(--line); font-weight: 500; }
.lnk:last-child { border-bottom: 0; }
.lnk .ic { width: 19px; height: 19px; }
.lnk.danger { color: var(--danger); }
.btn { height: 46px; padding: 0 20px; border-radius: 14px; font-size: 15.5px; font-weight: 650; background: var(--surface-3); color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.wide { width: 100%; }
.about { text-align: center; font-size: 12px; color: var(--text-3); padding: 8px 0 18px; line-height: 1.6; }

/* Welkomstkaart */
#empty { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 20px; background: rgba(5, 6, 11, .72); }
.empty-card { width: min(100%, 340px); padding: 26px 22px 22px; border-radius: 26px; background: var(--surface); border: .5px solid var(--line-2); text-align: center; }
.empty-ic { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 20%, var(--surface-2)); color: var(--accent); }
.empty-ic .ic { width: 30px; height: 30px; }
.empty-card h2 { font-size: 20px; letter-spacing: -.02em; margin-bottom: 8px; }
.empty-card p { font-size: 14.5px; line-height: 1.5; color: var(--text-2); margin-bottom: 18px; }
.empty-btns { display: flex; flex-direction: column; gap: 9px; }

#toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 10px); z-index: 90; max-width: calc(100% - 32px); transform: translate(-50%, -140%); padding: 11px 18px; border-radius: 22px; font-size: 14px; font-weight: 600; text-align: center;
  background: rgba(34, 38, 54, .94); border: .5px solid var(--line-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); transition: transform .4s var(--ease); pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }

/* ── Liggend: compacter, kop en legenda op één regel ───────────────────── */
@media (orientation: landscape) and (max-height: 520px) {
  #top { display: flex; align-items: center; padding-top: calc(var(--safe-t) + 2px); }
  .title-row { padding: 2px 12px 4px; flex: none; gap: 14px; }
  h1 { font-size: 20px; } .wk-no { display: inline; margin-right: 8px; font-size: 11px; }
  .title { display: flex; align-items: baseline; }
  .sync { margin-bottom: 0; }
  .chips { padding: 0 12px 0 0; flex: 1; min-width: 0; }
  .dh { flex-direction: row; justify-content: center; gap: 6px; padding: 2px 0; }
  .dn { width: 24px; height: 24px; font-size: 14px; }
  #dock { justify-content: flex-end; bottom: calc(var(--safe-b) + 4px); }
  :root { --dock-h: 44px; }
  .dbtn { height: 36px; min-width: 38px; }
  .sheet { max-width: 640px; margin: 0 auto; }
}
@media (min-width: 700px) { .sheet { max-width: 560px; margin: 0 auto; } }

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