/* Thuis 3.0 — stijl "Avond": diep groen-zwart, glas, gloed van de lampen.
   Ontworpen voor een liggende tablet (±1280×800); op een telefoon één kolom. */
:root {
  color-scheme: dark;
  --bg: #0a0d0c;
  --ink: #edf2ee;
  --dim: #8d9a93;
  --faint: #56625c;
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .1);
  --edge: rgba(255, 255, 255, .09);
  --lamp: #ffb65c;
  --mint: #6ee7b7;
  --rose: #f472b6;
  --sky: #7dd3fc;
  --heat: #ff8a4c;
  --bad: #ff6b6b;
  --f: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--f); color: var(--ink); font-size: 15px; line-height: 1.45;
  background: var(--bg);
  overflow: hidden; -webkit-tap-highlight-color: transparent; user-select: none;
}
/* De gloed staat vast achter het scherm, zodat hij bij scrollen op de telefoon
   niet per schermhoogte opnieuw begint (dat gaf een harde rand). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 30% 60%, rgba(255, 170, 80, var(--warm, .08)), transparent 60%),
    radial-gradient(700px 500px at 0% 0%, #1c3a2d 0%, transparent 60%),
    radial-gradient(600px 500px at 100% 100%, #241b33 0%, transparent 60%);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 10px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--dim); margin: 0; }

.app { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; padding: max(22px, env(safe-area-inset-top)) 22px max(18px, env(safe-area-inset-bottom)); }

/* ---------- Links: het huis ---------- */
.stage { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.stage > .scene3 { flex: 1 1 auto; }
.hi { display: flex; align-items: flex-start; gap: 16px; }
.hi p { margin: 4px 0 0; color: var(--dim); font-size: 15.5px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hi p b { color: var(--ink); font-weight: 600; }
#clock { font-family: var(--mono); color: var(--ink); }
.acts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.conn { font-size: 12.5px; color: var(--heat); padding: 6px 12px; border-radius: 14px; background: rgba(255, 138, 76, .12); }
.ghost-btn { height: 44px; padding: 0 20px; border-radius: 22px; background: var(--glass); border: 1px solid var(--edge); font-weight: 600; }
.ghost-btn:active { background: var(--glass-2); }

.scene3 { position: relative; perspective: 1200px; display: grid; place-items: center; touch-action: none; min-height: 0; overflow: hidden; cursor: grab; }
.house { --rz: -32deg; --hs: 1; --tx: 0px; --ty: 0px; position: relative; transform-style: preserve-3d; transform: translate(var(--tx), var(--ty)) scale(var(--hs)) rotateX(58deg) rotateZ(var(--rz)); }
.level { --z: 0px; position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(var(--z)); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.level > * { transition: opacity .4s; }
.level.hide > * { opacity: 0; pointer-events: none; }
.slab { position: absolute; left: -12px; right: -12px; border-radius: 14px; background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012)); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 0 44px rgba(0, 0, 0, .35); transform: translateZ(-1px); }
.r3:not(.linked) .fl span { color: rgba(255, 255, 255, .18); }
.r3.open .fl { background: rgba(120, 200, 140, .04); border-style: dashed; }
.floors { position: absolute; top: 0; right: 0; z-index: 2; display: flex; gap: 4px; padding: 4px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); }
.floors button { height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.floors button.on { background: rgba(255, 255, 255, .14); color: var(--ink); }
.r3 { --c: var(--lamp); --b: 0; position: absolute; transform-style: preserve-3d; }
.r3 .fl { position: absolute; inset: 2px; border-radius: 4px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .08); transition: background .6s, box-shadow .6s; display: grid; place-items: end start; padding: 6px 8px; }
.r3 .fl span { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .35); }
.r3.on .fl { background: radial-gradient(circle, color-mix(in srgb, var(--c) calc(30% + var(--b) * 70%), transparent), color-mix(in srgb, var(--c) calc(var(--b) * 25%), transparent) 75%); box-shadow: 0 0 calc(20px + var(--b) * 60px) color-mix(in srgb, var(--c) 55%, transparent); }
.r3.on .fl span { color: rgba(20, 14, 6, .55); }
.r3 .w { position: absolute; background: linear-gradient(to bottom, rgba(255, 255, 255, .09), rgba(255, 255, 255, .015)); border: 0; border-top: 1px solid rgba(255, 255, 255, .22); transition: background .6s, border-color .6s; }
.r3.on .w { background: linear-gradient(to bottom, color-mix(in srgb, var(--c) calc(16% + var(--b) * 30%), transparent), color-mix(in srgb, var(--c) 4%, transparent)); border-top-color: color-mix(in srgb, var(--c) 75%, white 12%); }
.r3 .wn, .r3 .ws { left: 0; width: 100%; height: 34px; transform-origin: top; transform: rotateX(90deg); }
.r3 .wn { top: 0; } .r3 .ws { top: 100%; }
.r3 .ww, .r3 .we { top: 0; height: 100%; width: 34px; transform-origin: left; transform: rotateY(-90deg); }
.r3 .ww { left: 0; } .r3 .we { left: 100%; }
.r3.open .w { display: none; }
.r3 .orb { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: rgba(255, 255, 255, .15); transform: translateZ(50px); transition: all .6s; }
.r3.on .orb { background: var(--c); box-shadow: 0 0 calc(10px + var(--b) * 30px) calc(2px + var(--b) * 8px) var(--c); }
.callouts { position: absolute; inset: 0; pointer-events: none; }
.callouts svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; stroke: rgba(255, 255, 255, .35); stroke-width: 1; }
.co { position: absolute; transform: translate(-50%, -100%); text-align: center; white-space: nowrap; }
.co small { display: block; font-size: 12px; color: var(--dim); }
.co b { font-size: 19px; font-weight: 600; }
/* Platte stand voor tragere tablets: zelfde huis, zonder 3D. */
.flat .house { transform: translate(var(--tx), var(--ty)) scale(var(--hs)); }
.flat .level { transform: none; }
.flat .level[data-floor="1"] { left: 110%; }
.flat .r3 .w, .flat .r3 .orb { display: none; }
.flat .callouts { display: none; }

.rooms { display: flex; flex-wrap: wrap; gap: 8px; }
.rooms::-webkit-scrollbar { display: none; }
.pill { --b: 0; --c: var(--lamp); position: relative; overflow: hidden; flex: 1 1 128px; max-width: 220px; height: 60px; padding: 0 16px; border-radius: 22px; background: var(--glass); border: 1px solid var(--edge); display: grid; align-content: center; text-align: left; touch-action: none; cursor: ew-resize; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); transition: border-color .3s, box-shadow .3s; }
.pill .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, transparent), color-mix(in srgb, var(--c) 58%, transparent)); transition: width .25s; }
/* Zacht "brandend" uiteinde van de vulbalk, zoals de Hue-app. */
.pill .fill::after { content: ""; position: absolute; right: -1px; top: 0; bottom: 0; width: 26px; background: radial-gradient(18px 60% at 100% 50%, color-mix(in srgb, var(--c) 55%, white 10%), transparent 70%); opacity: .8; }
.pill.drag .fill { transition: none; }
.pill > span:not(.fill) { position: relative; }
.pill b { font-size: 14px; font-weight: 600; }
.pill small { font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.pill.on { border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 30px -10px color-mix(in srgb, var(--c) 55%, transparent); }
.pill.on small { color: var(--ink); }
.pill.busy { opacity: .7; }

.tabs { justify-self: center; display: flex; gap: 4px; padding: 6px; border-radius: 30px; background: rgba(255, 255, 255, .06); border: 1px solid var(--edge); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.tabs button { width: 92px; padding: 7px 0 6px; border-radius: 24px; display: grid; justify-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--dim); }
.tabs svg { width: 21px; height: 21px; }
.tabs button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--lamp) 26%, transparent), color-mix(in srgb, var(--lamp) 14%, transparent)); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }

/* De huisassistent: micknop in de tabbalk + antwoordvenster erboven. */
/* Wekwoord actief: klein "oor-aan"-stipje op de micknop. */

/* ---------- Rechts: kaarten ---------- */
.col { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.col::-webkit-scrollbar { display: none; }
.card { background: var(--glass); border: 1px solid var(--edge); border-radius: 26px; padding: 16px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 44px -28px rgba(0, 0, 0, .85); }
.card h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.card h4 .r { margin-left: auto; color: var(--ink); font-weight: 600; }
.card .err { font-size: 12.5px; color: var(--heat); margin: 8px 0 0; }

.scenes { display: grid; gap: 8px; }
.gl { position: relative; height: 48px; padding: 0 16px; border-radius: 24px; font-weight: 600; font-size: 14.5px; background: var(--glass); border: 1px solid var(--edge); display: flex; align-items: center; gap: 10px; transition: all .3s; }
.gl svg { width: 18px; height: 18px; color: var(--dim); }
.gl.on, .gl:active { background: linear-gradient(100deg, rgba(110, 231, 183, .22), rgba(255, 182, 92, .22) 55%, rgba(244, 114, 182, .2)); border-color: rgba(255, 255, 255, .22); box-shadow: 0 0 30px -6px rgba(255, 182, 92, .45); }
.gl.on svg { color: var(--ink); }

.lcd { border-radius: 20px; padding: 10px; background: linear-gradient(180deg, #1f2a24, #121815); border: 1px solid rgba(255, 255, 255, .08); box-shadow: inset 0 2px 14px rgba(0, 0, 0, .6); text-align: center; }
.lcd b { font-family: var(--mono); font-weight: 400; font-size: 58px; line-height: 1; color: #cfe8d8; text-shadow: 0 0 18px rgba(110, 231, 183, .45); font-variant-numeric: tabular-nums; }
.lcd.done b { color: var(--lamp); text-shadow: 0 0 22px rgba(255, 182, 92, .7); }
.chips { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.chips button { height: 32px; padding: 0 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); font-size: 13px; font-weight: 600; }
.chips button.on { background: rgba(255, 255, 255, .18); }
/* Dé actieknop: één duidelijk accent (mint), overal hetzelfde. */
.go { width: 100%; height: 48px; border-radius: 24px; font-weight: 700; font-size: 15px; border: 1px solid color-mix(in srgb, var(--mint) 40%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--mint) 28%, transparent), color-mix(in srgb, var(--mint) 14%, transparent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); transition: background .2s ease, transform .2s ease; }
.go:active { transform: scale(.98); background: linear-gradient(180deg, color-mix(in srgb, var(--mint) 36%, transparent), color-mix(in srgb, var(--mint) 20%, transparent)); }

.wx { display: flex; align-items: center; gap: 14px; }
.wx b { font-size: 46px; font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.wx span { color: var(--dim); font-size: 13.5px; }
.wx span strong { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.advice { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.advice span { font-size: 12.5px; padding: 4px 10px; border-radius: 10px; background: rgba(255, 255, 255, .07); }
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; align-items: end; }
.day { display: grid; justify-items: center; gap: 4px; font-size: 11.5px; color: var(--dim); }
.day i { width: 10px; border-radius: 5px; background: linear-gradient(0deg, var(--mint), var(--sky) 60%, var(--rose)); }
.day b { font-size: 13px; color: var(--ink); font-weight: 600; }

.np { display: grid; grid-template-columns: 52px 1fr 46px; gap: 12px; align-items: center; }
.np .cv { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, rgba(110, 231, 183, .28), rgba(125, 211, 252, .18)) center / cover; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.np b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np small { color: var(--dim); font-size: 12.5px; }
.np button { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.np button svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.vol { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.vol input { flex: 1; accent-color: var(--mint); }
.zones { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.zones button { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 12px; color: var(--dim); }
.zones button.on { background: rgba(255, 255, 255, .1); color: var(--ink); }

/* ---------- Lampen-paneel (vasthouden) ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .5); display: grid; align-items: end; justify-items: center; }
.sheet .pnl { width: min(720px, 100%); max-height: 80%; overflow: auto; background: #131a17; border: 1px solid var(--edge); border-bottom: 0; border-radius: 30px 30px 0 0; padding: 22px 24px 28px; }
.sheet .pnl.enter { animation: up .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.pnl .top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pnl .top b { font-size: 22px; }
.pnl .top small { color: var(--dim); }
.pnl .top button:not(.tg) { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; background: var(--glass-2); font-size: 20px; }
.place { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; font-size: 13.5px; color: var(--dim); }
.place select { flex: 1; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--edge); color: var(--ink); padding: 0 10px; font: inherit; }
.tg { width: 50px; height: 30px; border-radius: 15px; background: rgba(255, 255, 255, .14); position: relative; transition: background .2s; }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tg.on { background: var(--lamp); }
.tg.on::after { transform: translateX(20px); }

.codegate { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(0, 0, 0, .7); padding: 16px; }
.codegate form { width: min(420px, 100%); display: grid; gap: 12px; }
.codegate h2 { margin: 0; }
.codegate input { height: 48px; border-radius: 14px; border: 1px solid var(--edge); background: rgba(0, 0, 0, .3); padding: 0 14px; font-size: 17px; user-select: text; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); z-index: 40; padding: 10px 18px; border-radius: 16px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; opacity: 0; transition: all .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.flash { position: fixed; inset: 0; z-index: 35; pointer-events: none; background: var(--lamp); opacity: 0; }
.flash.go { animation: flash .6s ease 5 alternate; }
@keyframes flash { to { opacity: .35; } }

/* ---------- Telefoon / smal scherm ---------- */
@media (max-width: 860px) {
  body { overflow: auto; }
  .app { height: auto; grid-template-columns: minmax(0, 1fr); padding-bottom: 96px; }
  .stage > .scene3 { flex: none; height: 300px; }
  .tabs { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 10; }
  .tabs button { width: 64px; font-size: 10.5px; }
  .col { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Kamer-paneel in Hue-stijl ---------- */
.sheet .pnl.hue { --cur: #ffbe78; width: min(1040px, 100%); max-height: 92%; padding: 20px 24px 24px; background: radial-gradient(700px 300px at 20% 0%, color-mix(in srgb, var(--cur) 22%, transparent), transparent 70%), #121815; user-select: none; }
.hue .top { gap: 14px; }
.hue .top b { display: block; font-size: 24px; }
.hue .top small { color: var(--dim); }
.hue .top .x { margin-left: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--glass-2); font-size: 22px; }
.hue .top .tg.big { margin-left: auto; width: 62px; height: 36px; border-radius: 18px; }
.hue .top .tg.big::after { width: 30px; height: 30px; }
.hue .top .tg.big.on::after { transform: translateX(26px); }
.hue .target { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; }
.hue .hint { font-size: 12.5px; color: var(--faint); }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(255, 255, 255, .07); border: 1px solid var(--edge); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; }
.chip.on { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .25); }
.hue .bri { position: relative; height: 64px; border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, .06); border: 1px solid var(--edge); display: flex; align-items: center; padding: 0 22px; cursor: ew-resize; touch-action: none; }
.hue .bri .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--cur) 25%, transparent), color-mix(in srgb, var(--cur) 75%, transparent)); }
.hue .bri .lbl, .hue .bri b { position: relative; }
.hue .bri .lbl { font-weight: 600; }
.hue .bri b { margin-left: auto; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hue .cols { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; margin-top: 16px; }
.hue .colorcol { display: grid; gap: 12px; align-content: start; }
.wheel { position: relative; width: 100%; aspect-ratio: 1; max-width: 100%; touch-action: none; cursor: crosshair; }
.wheel canvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 60px -10px color-mix(in srgb, var(--cur) 60%, transparent); }
.knob { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); pointer-events: none; }
.ctbar { position: relative; height: 44px; border-radius: 22px; touch-action: none; cursor: ew-resize; }
.ctbar .knob { top: 50%; background: transparent; }
.ctlbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-top: -6px; }
.fx { display: flex; gap: 8px; flex-wrap: wrap; }
.hue h5 { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.hue .listcol { min-width: 0; display: grid; gap: 4px; align-content: start; }
.hue .scn { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 12px; }
.sc { height: 64px; border-radius: 16px; padding: 10px 12px; text-align: left; display: flex; align-items: flex-end; font-weight: 700; font-size: 13.5px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); background: radial-gradient(120% 120% at 0% 0%, var(--a), transparent 70%), linear-gradient(135deg, var(--a), var(--b)); transition: transform .15s; }
.sc:active { transform: scale(.97); }
.hue .lamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 12px; }
.lt { --l: #2a302d; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--edge); cursor: pointer; }
.lt.on { background: linear-gradient(135deg, color-mix(in srgb, var(--l) 30%, transparent), rgba(255, 255, 255, .04)); }
.lt.sel { border-color: #fff; box-shadow: 0 0 0 1px #fff inset; }
.lt.gone { opacity: .5; }
.lt .sw { width: 34px; height: 34px; border-radius: 50%; flex: none; background: rgba(255, 255, 255, .1); }
.lt.on .sw { background: var(--l); box-shadow: 0 0 16px var(--l); }
.lt .nm { min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.lt .nm small { display: block; font-weight: 500; color: var(--dim); font-size: 12px; }
.lt .tg { margin-left: auto; flex: none; }
@media (max-width: 860px) {
  .hue .cols { grid-template-columns: minmax(0, 1fr); }
  .hue .colorcol { max-width: 320px; justify-self: center; width: 100%; }
}

/* =========================================================
   Homescreen: alles op één scherm (links · huis · rechts)
   ========================================================= */
.app.home { grid-template-columns: 318px minmax(0, 1fr) 352px; gap: 18px; }
.left { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.clockblock { padding: 2px 4px 0; }
.bigclock { font-size: 104px; font-weight: 200; letter-spacing: -0.05em; line-height: .86; font-variant-numeric: tabular-nums; }
.dateline { margin-top: 10px; font-size: 16px; color: var(--dim); }
.dateline #greet { color: var(--ink); font-weight: 600; }
.home .hi { align-items: center; }
.home .hi p { margin: 0; }
.card.today { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.tline { position: relative; display: grid; overflow: hidden; }
/* De lijn loopt precies door het midden van de bolletjes (dotkolom-midden). */
.tline::before { content: ""; position: absolute; left: 79px; top: 8px; bottom: 8px; border-left: 2px dashed rgba(255, 255, 255, .1); }
.tline.big::before { left: 82px; }
.tline .node { display: grid; grid-template-columns: 58px 28px minmax(0, 1fr); gap: 0 8px; align-items: center; min-height: 46px; position: relative; }
.tline .tm { font-family: var(--mono); font-size: 12px; color: var(--dim); text-align: right; white-space: nowrap; }
.tline .dot { width: 12px; height: 12px; border-radius: 50%; justify-self: center; background: var(--mint); box-shadow: 0 0 0 4px rgba(110, 231, 183, .12); }
.tline .node.af .dot { background: #3fb36b; box-shadow: 0 0 0 4px rgba(63, 179, 107, .2), 0 0 14px #3fb36b; }
.tline .node.past { opacity: .4; }
.tline .tx { min-width: 0; }
.tline .tx b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tline .tx small { display: block; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tline .nowl { display: grid; grid-template-columns: 58px 28px 1fr; gap: 0 8px; align-items: center; min-height: 30px; }
.tline .nowl .tm { color: var(--heat); font-weight: 400; }
.tline .nowl .pip { width: 10px; height: 10px; border-radius: 50%; background: var(--heat); justify-self: center; box-shadow: 0 0 0 4px rgba(255, 138, 76, .2); animation: pip 2s ease-in-out infinite; }
@keyframes pip { 50% { box-shadow: 0 0 0 8px rgba(255, 138, 76, .05); } }
.tline .nowl .lbl { font-size: 12.5px; font-weight: 600; color: var(--heat); display: flex; align-items: center; gap: 8px; }
.tline .nowl .lbl::after { content: ""; flex: 1; border-top: 1.5px solid rgba(255, 138, 76, .6); }
.scenes.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scenes.row .gl { justify-content: center; padding: 0 8px; gap: 6px; font-size: 13.5px; }
.pill.zone { opacity: .75; border-style: dashed; }

/* ---------- Energie ---------- */
.energy { padding-bottom: 12px; }
.eflow { width: 100%; height: auto; display: block; overflow: visible; }
.eflow .pipe { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 6; stroke-linecap: round; }
.eflow .flow { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 12; animation: flow linear infinite; }
.eflow .flow.rev { animation-direction: reverse; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.eflow .node circle, .eflow .node path, .eflow .node line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eflow .sun circle { fill: #ffd36b; stroke: none; filter: drop-shadow(0 0 10px rgba(255, 211, 107, .8)); }
.eflow .sun .rays line { stroke: #ffd36b; }
.eflow .sun .rays { animation: spin 18s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.eflow .sun .moon { fill: #cfd8ff; stroke: none; filter: drop-shadow(0 0 8px rgba(207, 216, 255, .5)); }
.eflow .hnode .halo { fill: rgba(255, 182, 92, .1); stroke: rgba(255, 182, 92, .35); animation: halo 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 50% { transform: scale(1.12); opacity: .6; } }
.eflow .lbl { fill: var(--dim); font: 600 11px var(--f); }
.eflow .lbl.strong { fill: var(--ink); font-size: 14px; }
.eflow .pct { fill: #fff; font: 700 20px var(--f); paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 3px; }
.etotals { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--dim); margin-top: 4px; }
.etotals .d { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.etotals .d.sun { background: #ffd36b; } .etotals .d.use { background: #7dd3fc; } .etotals .d.ret { background: #6ee7b7; }

/* ---------- Afval ---------- */
.afval { position: relative; overflow: hidden; padding-bottom: 10px; }
.bins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-items: end; }
.bin { position: relative; display: grid; justify-items: center; gap: 1px; text-align: center; }
.bin .binsvg { width: 34px; height: 44px; overflow: visible; }
.bin b { font-size: 12px; font-weight: 600; }
.bin small { font-size: 11px; color: var(--dim); }
.bin.due .binsvg { animation: hop 1.1s cubic-bezier(.3, 1.6, .5, 1) infinite; }
.bin.due::before { content: ""; position: absolute; top: 30px; width: 44px; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(110, 231, 183, .45), transparent); animation: glowp 1.1s ease-in-out infinite; }
@keyframes glowp { 30% { transform: scale(.7); opacity: .5; } }
.bin.due .lid { animation: lid 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 100%; }
.bin.due small { color: var(--mint); font-weight: 700; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-9px) rotate(-3deg); } }
@keyframes lid { 0%, 60%, 100% { transform: rotate(0); } 30% { transform: rotate(-24deg); } }
.bin.out .binsvg { opacity: .9; }
.bin .tick { position: absolute; top: -4px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--mint); color: #08130e; font-size: 12px; font-weight: 800; display: grid; place-items: center; animation: pop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes pop { from { transform: scale(0); } }
.bin.rolling .binsvg { animation: roll 1.2s cubic-bezier(.4, 0, .2, 1); }
@keyframes roll { 0% { transform: translateX(0) rotate(0); } 40% { transform: translateX(26px) rotate(8deg); } 70% { transform: translateX(-4px) rotate(-3deg); } 100% { transform: none; } }
.amsg { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 6px 6px 6px 12px; border-radius: 16px; background: rgba(110, 231, 183, .1); border: 1px solid rgba(110, 231, 183, .28); font-size: 13px; }
.amsg button { margin-left: auto; height: 30px; padding: 0 14px; border-radius: 15px; background: var(--mint); color: #08130e; font-weight: 700; font-size: 13px; flex: none; }
.amsg.ok { background: rgba(255, 255, 255, .05); border-color: var(--edge); color: var(--dim); }
.road { position: relative; height: 30px; margin: 6px -16px -10px; border-top: 1px dashed rgba(255, 255, 255, .08); overflow: hidden; }
.road.quiet { height: 0; border: 0; }
.road .truck { position: absolute; bottom: 0; height: 28px; width: auto; left: -70px; animation: drive 9s linear infinite; }
.road .truck .wheel { animation: spin .6s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes drive { 0% { left: -70px; } 45%, 55% { left: calc(50% - 30px); } 100% { left: 110%; } }

/* ---------- compacter rechts ---------- */
.home .col { gap: 10px; }
.home .col > .card { flex: none; }
.home .day i { max-height: 26px; }
.home .day { gap: 2px; }
.home #weather .wx span { font-size: 12.5px; }
.home .col .card, .home .left .card { padding: 13px 15px; border-radius: 22px; }
.home .col .card h4, .home .left .card h4 { margin-bottom: 6px; }
.home #weather .wx b { font-size: 38px; }
.home #weather .days { margin-top: 8px; }
.home #weather .advice { display: none; }
.card.timer { display: grid; grid-template-columns: 1fr auto 46px; gap: 10px; align-items: center; }
.card.timer .lcd { padding: 4px 10px; border-radius: 14px; }
.card.timer .lcd b { font-size: 30px; }
.card.timer .lcd.run b { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .75; } }
.card.timer .chips { margin: 0; gap: 4px; }
.card.timer .chips button { min-width: 34px; padding: 0 8px; height: 30px; font-size: 12px; }
.card.timer .go { width: 46px; height: 46px; border-radius: 50%; padding: 0; font-size: 15px; }

@media (max-width: 1100px) {
  .app.home { grid-template-columns: minmax(0, 1fr); height: auto; padding-bottom: 96px; }
  body { overflow: auto; }
  .home .stage > .scene3 { flex: none; height: 340px; }
  .home .left, .home .col { overflow: visible; }
  .card.today { flex: none; }
  .bigclock { font-size: 80px; }
  .home .tabs { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 10; }
  /* Kopregel op de telefoon: status op één regel, knoppen er netjes onder. */
  .hi { flex-wrap: wrap; }
  .hi > p { width: 100%; }
  .hi .acts { margin-left: 0; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}
.left .card.timer { grid-template-columns: minmax(0, 1fr) auto 42px; gap: 8px; padding: 10px 12px; }
.left .card.timer .lcd b { font-size: 26px; }
.left .card.timer .chips button { min-width: 28px; padding: 0 6px; }
.left .card.timer .go { width: 42px; height: 42px; }

/* =========================================================
   Indeling met tabbalk onder het midden, en het tabblad Taken
   ========================================================= */
/* De tabbalk zweeft vast gecentreerd onderaan — op élk tabblad exact dezelfde
   plek, dus geen verspringen bij het wisselen. De inhoud houdt er ruimte voor. */
.app.home { grid-template-rows: minmax(0, 1fr); padding-bottom: 88px; }
.app.home > .left { grid-column: 1; grid-row: 1; }
.app.home > .stage { grid-column: 2; grid-row: 1; }
.app.home > .col { grid-column: 3; grid-row: 1; }
.app.home > .tabs { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; }
.app.home.view-side > .stage, .app.home.view-side > .col { display: none; }
.app.home > .taken, .app.home > .panel { grid-column: 2 / 4; grid-row: 1; }
.app.home.view-side > .tabs { grid-column: 2 / 4; }
.tabs button { position: relative; }
.tabs .badge { position: absolute; top: 2px; right: 18px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--heat); color: #1a0d05; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

.taken { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; min-height: 0; animation: viewin .35s ease; }
@keyframes viewin { from { opacity: 0; transform: translateY(8px); } }
.taken .card { min-height: 0; }
.tk-main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 20px 22px; }
.tk-head { display: flex; align-items: center; gap: 18px; }
.tk-head h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.tk-head p { margin: 2px 0 0; }
.tk-head em.late { font-style: normal; color: var(--bad); font-weight: 600; }
.ring { position: relative; width: 72px; height: 72px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring .bg { stroke: rgba(255, 255, 255, .08); }
.ring .fg { stroke: var(--mint); transition: stroke-dasharray .6s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 6px rgba(110, 231, 183, .5)); }
.ring b { position: absolute; inset: 0; display: grid; place-content: center; font-size: 22px; font-weight: 700; }
.ring b small { font-size: 13px; color: var(--dim); font-weight: 500; display: inline; }
.ring b { grid-auto-flow: column; align-items: baseline; }
.tk-add { margin: 16px 0 10px; display: grid; gap: 8px; }
.tk-add input#tk-text, .nadd input { height: 52px; border-radius: 18px; border: 1px solid var(--edge); background: rgba(0, 0, 0, .25); padding: 0 18px; font-size: 16px; user-select: text; }
.tk-add .opts, .nadd .opts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip.pp { border-color: color-mix(in srgb, var(--p) 40%, transparent); }
.chip.pp.on { background: var(--p); color: #0b0f0d; border-color: var(--p); }
.chip.duein { gap: 6px; padding-right: 8px; }
.chip.duein input { background: transparent; border: 0; color: inherit; font: inherit; width: 86px; color-scheme: dark; }
.tk-add .addbtn { margin-left: auto; width: auto; height: 38px; padding: 0 20px; border-radius: 19px; font-size: 14px; }
.tk-list { display: grid; gap: 6px; overflow-y: auto; min-height: 0; scrollbar-width: none; }
.tk-list::-webkit-scrollbar { display: none; }
.task { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--edge); transition: transform .3s, opacity .3s, background .3s; }
.task.late { border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .07); }
.task.soon { border-color: rgba(255, 207, 90, .4); }
.task .ck { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); display: grid; place-items: center; transition: all .25s; }
.task .ck svg { width: 20px; height: 20px; stroke: #08130e; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .3s .1s; }
.task.done .ck, .task.checking .ck { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 16px rgba(110, 231, 183, .5); }
.task.done .ck svg, .task.checking .ck svg { stroke-dashoffset: 0; }
.task.checking { transform: scale(.98); }
.task.checking .tt { color: var(--dim); text-decoration: line-through; }
.task.pop { animation: popin .4s ease; }
@keyframes popin { from { transform: scale(.96); opacity: .5; } }
.task .tt { font-size: 16px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.task .tt small { display: block; font-size: 12px; font-weight: 500; color: var(--dim); }
.task.done .tt { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .3); }
.task .meta { display: flex; align-items: center; gap: 6px; }
.task .who { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 10px; background: var(--p); color: #0b0f0d; }
.task .rep { font-size: 11.5px; color: var(--dim); padding: 2px 8px; border-radius: 8px; border: 1px solid var(--edge); }
.task .due { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.task .due.soon { background: rgba(255, 207, 90, .2); color: #ffd98a; }
.task .due.late { background: rgba(255, 107, 107, .22); color: #ffaaaa; animation: pip 1.6s ease-in-out infinite; }
.task .del, .note .del { width: 30px; height: 30px; border-radius: 50%; color: var(--faint); font-size: 18px; }
.task .del:hover, .note .del:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.donehdr { margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--dim); text-align: left; }
.donelist { max-height: 30%; }
.alldone { display: grid; justify-items: center; gap: 4px; padding: 36px 10px; text-align: center; }
.alldone b { font-size: 22px; }
.alldone span { color: var(--dim); font-size: 13.5px; max-width: 40ch; }
.alldone .spark { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle, #6ee7b7, rgba(110, 231, 183, 0) 70%); animation: halo 2.4s ease-in-out infinite; }
.muted.pad { padding: 24px 4px; }
.tk-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.routine .seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.routine .seg button { padding: 3px 10px; border-radius: 10px; font-size: 12.5px; color: var(--dim); }
.routine .seg button.on { background: rgba(255, 255, 255, .16); color: var(--ink); }
.rbar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 4px 0 10px; }
.rbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), #7dd3fc); border-radius: 3px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.ritems { display: grid; gap: 4px; }
.ritem { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 6px; border-radius: 12px; font-size: 14.5px; }
.ritem .ck { width: 28px; height: 28px; flex: none; border-radius: 9px; border: 2px solid rgba(255, 255, 255, .25); display: grid; place-items: center; transition: all .25s; }
.ritem .ck svg { width: 15px; height: 15px; stroke: #08130e; stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: all .25s; }
.ritem.done { color: var(--dim); }
.ritem.done .ck { background: var(--mint); border-color: var(--mint); }
.ritem.done .ck svg { opacity: 1; transform: none; }
.rdone { margin: 8px 0 0; color: var(--mint); font-weight: 700; font-size: 13.5px; }
.notes { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.nlist { display: grid; gap: 8px; overflow-y: auto; min-height: 0; flex: 1 1 auto; scrollbar-width: none; align-content: start; }
.note { position: relative; padding: 10px 34px 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--p) 14%, rgba(255, 255, 255, .03)); border-left: 3px solid var(--p); }
.note p { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.note small { color: var(--dim); font-size: 11.5px; }
.note .del { position: absolute; top: 4px; right: 4px; }
.nadd { display: grid; gap: 6px; margin-top: 10px; }
.nadd input { height: 44px; font-size: 14.5px; }
.chip.send { margin-left: auto; background: rgba(255, 255, 255, .14); }
.taken canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
@media (max-width: 1100px) {
  .app.home > .left, .app.home > .stage, .app.home > .col, .app.home > .taken { grid-column: 1; grid-row: auto; }
  .taken { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================
   Tabbladen Agenda, Muziek, Mees & Sil
   ========================================================= */
.panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; min-height: 0; animation: viewin .35s ease; }
.panel .card { min-height: 0; }
.panel h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }

/* Agenda */
.ag-main { display: flex; flex-direction: column; overflow: hidden; padding: 20px 22px; }
.ag-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.calf { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.calf .chip { gap: 7px; opacity: .55; }
.calf .chip.on { opacity: 1; }
.calf .chip i { width: 9px; height: 9px; border-radius: 50%; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 16px 0 12px; }
.wd { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 10px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--edge); transition: all .2s; }
.wd small { font-size: 11.5px; color: var(--dim); text-transform: capitalize; }
.wd b { font-size: 24px; font-weight: 600; line-height: 1.1; }
.wd .dots { display: flex; gap: 3px; height: 6px; }
.wd .dots i { width: 6px; height: 6px; border-radius: 50%; }
.wd.today small { color: var(--heat); font-weight: 700; }
.wd.on { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); transform: translateY(-2px); }
.dayh { margin: 2px 0 6px; font-size: 14px !important; color: var(--ink) !important; }
.tline.big { overflow-y: auto; scrollbar-width: none; }
/* De stippellijn loopt precies door het midden van de bolletjes:
   tijdkolom 60 + tussenruimte 8 + halve bolkolom 15 = 83, min de halve lijndikte. */
.tline.big::before { left: 82px; }
/* Zonder afspraken geen losse lijn in beeld. */
.tline:not(:has(.node, .nowl))::before { display: none; }
.tline.big .node { grid-template-columns: 60px 30px minmax(0, 1fr); min-height: 54px; }
.tline.big .nowl { grid-template-columns: 60px 30px 1fr; }
.tline.big .tm small { display: block; color: var(--faint); font-size: 11px; }
.tline.big .node .dot { background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.tline.big .tx b { font-size: 15.5px; white-space: normal; }
.ag-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.nextup .cd { font-size: 44px; font-weight: 200; letter-spacing: -0.03em; line-height: 1; margin: 2px 0 8px; background: linear-gradient(90deg, #ffb65c, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nextup b { display: block; font-size: 16px; }
.nextup small { color: var(--dim); font-size: 13px; }
.bdays { flex: 1 1 auto; overflow: hidden; }
.bd { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--edge); }
.bd .av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, rgba(244, 114, 182, .35), rgba(255, 182, 92, .3)); }
.bd .nm { min-width: 0; flex: 1; }
.bd .nm b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd .nm small { color: var(--dim); font-size: 12px; }
.bd .cnt { font-size: 22px; font-weight: 300; text-align: right; line-height: 1; }
.bd .cnt small { display: block; font-size: 10.5px; color: var(--dim); font-weight: 500; }
.bd.now .cnt { font-size: 14px; font-weight: 700; color: var(--rose); }

/* Muziek */
.mu-main { position: relative; overflow: hidden; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px; }
.mu-bg { position: absolute; inset: -40px; background: var(--img, linear-gradient(135deg, #e5332a, #ff8a3d)) center / cover; filter: blur(60px) saturate(1.4); opacity: .35; z-index: -1; transform: scale(1.1); }
.mu-cover { position: relative; aspect-ratio: 1; width: 100%; max-width: 100%; }
.mu-cover img, .mu-cover .ph { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); display: block; }
.mu-cover .ph { background: linear-gradient(135deg, #e5332a, #ff8a3d); }
.mu-main.playing .mu-cover img, .mu-main.playing .mu-cover .ph { animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.025); } }
.mu-cover .eq { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 3px; align-items: end; height: 22px; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); }
.mu-cover .eq i { width: 4px; height: 30%; border-radius: 2px; background: var(--mint); }
.mu-main.playing .eq i { animation: eqb .9s ease-in-out infinite alternate; }
.mu-main.playing .eq i:nth-child(2) { animation-delay: -.3s; } .mu-main.playing .eq i:nth-child(3) { animation-delay: -.6s; } .mu-main.playing .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eqb { to { height: 100%; } }
.mu-info small { color: var(--dim); font-size: 13.5px; }
.mu-info h2 { font-size: 28px; margin: 6px 0 18px; line-height: 1.1; }
.mu-ctl { display: flex; align-items: center; gap: 16px; }
.mu-ctl button { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.mu-ctl button svg { width: 22px; height: 22px; }
.mu-ctl .pp { width: 72px; height: 72px; background: var(--ink); color: var(--bg); box-shadow: 0 10px 30px -8px rgba(255, 255, 255, .4); }
.mu-ctl .pp svg { width: 28px; height: 28px; }
.vol.big { margin: 20px 0 16px; font-size: 13px; }
.groups { display: flex; flex-wrap: wrap; gap: 6px; }
.groups .live { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 6px; animation: pip 1.6s infinite; }
.mu-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.favs { flex: 1 1 auto; overflow-y: auto; scrollbar-width: none; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fav { display: grid; gap: 6px; text-align: left; font-size: 13px; font-weight: 600; }
.fav img, .fav .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; background: linear-gradient(135deg, #7c3aed, #f472b6); transition: transform .2s; }
.fav:active img, .fav.loading img { transform: scale(.95); opacity: .7; }
.disco { position: relative; overflow: hidden; }
.disco .go { margin-top: 10px; }
.discobars { display: flex; gap: 4px; align-items: end; height: 26px; margin-top: 12px; }
.discobars i { flex: 1; height: 15%; border-radius: 3px; background: linear-gradient(0deg, #f472b6, #ffb65c, #6ee7b7, #7dd3fc); background-size: 100% 300%; opacity: .35; }
.disco.on .discobars i { opacity: 1; animation: eqb .5s ease-in-out infinite alternate, hueshift 3s linear infinite; }
@keyframes hueshift { to { background-position: 0 300%; } }
.disco.on { border-color: rgba(244, 114, 182, .45); box-shadow: 0 0 40px -10px rgba(244, 114, 182, .5); }

/* Mees & Sil */
.bb-main { display: flex; flex-direction: column; gap: 6px; padding: 24px; overflow: hidden; }
/* De sprongenlijn gecentreerd in de vrije ruimte (niet alles tegen de kop). */
.bb-main > h4 { margin-top: auto; }
.bb-hero { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.bb-hero small { color: var(--dim); font-size: 14px; font-weight: 600; }
.bb-hero .age { font-size: 110px; font-weight: 200; letter-spacing: -0.05em; line-height: .9; }
.bb-hero .age span { font-size: 22px; font-weight: 500; letter-spacing: 0; margin-left: 10px; color: var(--dim); }
.bb-bday { margin-left: auto; text-align: right; padding: 14px 18px; border-radius: 20px; background: linear-gradient(135deg, rgba(244, 114, 182, .18), rgba(255, 182, 92, .14)); border: 1px solid rgba(244, 114, 182, .3); }
.bb-bday b { font-size: 40px; font-weight: 300; line-height: 1; display: block; }
.bb-bday small { font-size: 12.5px; }
.leapline { position: relative; height: 96px; margin: 14px 18px 8px; }
.leapline .track { position: absolute; left: 0; right: 0; top: 18px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); }
.leapline .track i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--rose), #ffb65c); }
.lp { position: absolute; top: 6px; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; width: 70px; text-align: center; }
.lp span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #1a201d; border: 2px solid rgba(255, 255, 255, .15); }
.lp small { font-size: 10.5px; color: var(--faint); line-height: 1.2; }
.lp.past span { border-color: var(--rose); background: color-mix(in srgb, var(--rose) 25%, #1a201d); }
.lp.active span { background: var(--rose); color: #2a0b19; border-color: #fff; box-shadow: 0 0 0 6px rgba(244, 114, 182, .2), 0 0 24px var(--rose); animation: pip 1.8s ease-in-out infinite; }
.lp.active small { color: var(--ink); font-weight: 700; }
.leapline .you { position: absolute; top: -4px; transform: translateX(-50%); }
.leapline .you span { font-size: 10.5px; font-weight: 700; color: #ffb65c; }
.bb-alert { margin-top: auto; padding: 16px 18px; border-radius: 18px; background: rgba(244, 114, 182, .1); border: 1px solid rgba(244, 114, 182, .35); }
.bb-alert.calm { background: rgba(255, 255, 255, .04); border-color: var(--edge); }
.bb-alert b { font-size: 15.5px; }
.bb-alert p { margin: 4px 0 0; color: var(--dim); font-size: 14px; }
.bb-side { overflow-y: auto; scrollbar-width: none; }
.bandnav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bandnav b { flex: 1; text-align: center; font-size: 15px; }
.bandnav button { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 20px; }
.bandnav button:disabled { opacity: .3; }
.chip.back { margin: -2px auto 10px; display: flex; width: max-content; }
.schema { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.schema div { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.schema small { display: block; color: var(--dim); font-size: 11px; }
.schema b { font-size: 13.5px; }
.rule { margin: 10px 0 0; font-size: 13px; color: var(--dim); font-style: italic; }
.miles { display: grid; gap: 8px; margin-top: 12px; }
.miles small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; }
.miles ul { margin: 2px 0 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 2px; }
.src { font-size: 11.5px; color: var(--faint); margin: 12px 0 0; }
@media (max-width: 1100px) {
  .panel { grid-template-columns: minmax(0, 1fr); }
  .mu-main { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================
   Knoppen bovenin, fotolijst, Terror, feest en instellingen
   ========================================================= */
.hi .ib { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--edge); }
.hi .ib svg { width: 20px; height: 20px; }
.hi .ib:active { background: var(--glass-2); }

/* Fotolijst */
.saver { position: fixed; inset: 0; z-index: 50; background: #050706; overflow: hidden; cursor: pointer; transition: opacity .45s; }
.saver.closing { opacity: 0; }
.ss-layer { position: absolute; inset: -6%; background: center / cover no-repeat; opacity: 0; transition: opacity 2.2s ease; }
.ss-layer.show { opacity: 1; animation: kenburns 14s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.12) translate(1.5%, 1%); } to { transform: scale(1) translate(0, 0); } }
.ss-ambient { position: absolute; inset: -20%; display: none; background: radial-gradient(40% 40% at 30% 30%, rgba(255, 170, 80, .35), transparent 70%), radial-gradient(40% 40% at 70% 60%, rgba(110, 231, 183, .25), transparent 70%), radial-gradient(50% 50% at 50% 90%, rgba(196, 181, 253, .25), transparent 70%); filter: blur(30px); animation: drift 30s ease-in-out infinite alternate; }
.saver.noalbum .ss-ambient { display: block; }
@keyframes drift { to { transform: translate(6%, -4%) rotate(12deg) scale(1.1); } }
.ss-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, .25)); }
.ss-info { position: absolute; left: 56px; right: 56px; bottom: 48px; color: #fff; }
.ss-clock { font-size: 168px; font-weight: 200; letter-spacing: -0.05em; line-height: .85; text-shadow: 0 6px 40px rgba(0, 0, 0, .4); }
.ss-greet { font-size: 32px; font-weight: 600; margin-top: 14px; animation: viewin .8s ease; }
.ss-date { font-size: 18px; opacity: .8; margin-top: 2px; }
.ss-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ss-tiles span { padding: 10px 16px; border-radius: 16px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .14); font-size: 16px; }
.ss-hint { position: absolute; right: 0; bottom: -28px; font-size: 12px; opacity: .5; }

/* Tablet of Terror */
.flash.terror { background: #ff1a1a; animation: terror 2.4s steps(1) 1; }
@keyframes terror { 0%, 20%, 40%, 60% { opacity: .6; } 10%, 30%, 50%, 70%, 100% { opacity: 0; } }
body.shake .app { animation: shake .5s linear 3; }
@keyframes shake { 20% { transform: translate(-6px, 2px) rotate(-.4deg); } 40% { transform: translate(5px, -3px) rotate(.4deg); } 60% { transform: translate(-4px, 3px); } 80% { transform: translate(4px, -1px); } }

/* Feest */
.party-banner { position: relative; z-index: 1; display: grid; justify-items: center; padding: 12px 26px; border-radius: 22px; text-align: center; cursor: pointer; background: linear-gradient(100deg, #f472b6, #ffb65c, #6ee7b7, #7dd3fc, #f472b6); background-size: 300% 100%; animation: partyb 6s linear infinite, viewin .6s ease; color: #1a0d14; box-shadow: 0 10px 40px -10px rgba(244, 114, 182, .7); }
.party-banner b { font-size: 16px; line-height: 1.25; }
.party-banner span { font-size: 12px; opacity: .75; }
@keyframes partyb { to { background-position: 300% 0; } }
.party-layer { position: fixed; inset: 0; z-index: 44; pointer-events: none; overflow: hidden; }
.cf { position: absolute; top: -90px; border-radius: 3px; animation: fall linear forwards; }
.cf.st { border-radius: 50%; object-fit: cover; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
@keyframes fall { to { transform: translate(var(--dx), 112vh) rotate(var(--r)); } }
body.party .bigclock { background: linear-gradient(90deg, #f472b6, #ffb65c, #6ee7b7); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Instellingen */
.sheet.settings { z-index: 30; align-items: center; }
.setp { width: min(860px, 100%); max-height: 88%; display: flex; flex-direction: column; border-radius: 30px !important; border-bottom: 1px solid var(--edge) !important; overflow: hidden !important; padding: 22px 24px !important; }
.setp .top b { font-size: 24px; }
.setp .top .x { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; background: var(--glass-2); font-size: 22px; }
.settabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.setbody { overflow-y: auto; min-height: 0; display: grid; gap: 12px; padding-right: 4px; user-select: text; }
.set { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--edge); }
.set h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.set .help { margin: -2px 0 10px; color: var(--dim); font-size: 13px; }
.set .st { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--dim); }
.set .st.ok { background: rgba(110, 231, 183, .15); color: var(--mint); }
.set .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.set input:not([type=file]) { flex: 1 1 160px; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--edge); background: rgba(0, 0, 0, .25); padding: 0 12px; color-scheme: dark; }
.set label input:not([type=file]) { flex: none; }
.set label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; font-size: 12.5px; color: var(--dim); }
.set label.chip { flex: none; flex-direction: row; font-size: 13px; color: var(--ink); cursor: pointer; }
.chip.danger { color: #ffaaaa; border-color: rgba(255, 107, 107, .35); }
.calrow { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--edge); flex-wrap: wrap; }
.calrow b { flex: 1 1 140px; }
.cals { margin-bottom: 10px; }
.code { font-size: 14px; } .code a { color: var(--sky); }
.stk { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stk span { position: relative; }
.stk img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; }
.stk span button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: #2a302d; border: 1px solid var(--edge); font-size: 13px; }

/* =========================================================
   Spotify in het Muziek-tabblad
   ========================================================= */
.srcsw { display: inline-flex; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(255, 255, 255, .07); margin-bottom: 10px; }
.srcsw button { height: 30px; padding: 0 14px; border-radius: 11px; font-size: 13px; font-weight: 700; color: var(--dim); }
.srcsw button.on { background: rgba(255, 255, 255, .16); color: var(--ink); }
.srcsw button[data-src="spotify"].on { background: #1db954; color: #04130a; }
.sp-empty { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 32px; }
.sp-browse { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 18px 20px; }
.sp-top { display: flex; align-items: center; gap: 12px; }
.sp-top .srcsw { margin: 0; flex: none; }
.sp-search { flex: 1; }
.sp-search input { width: 100%; height: 44px; border-radius: 16px; border: 1px solid var(--edge); background: rgba(0, 0, 0, .25); padding: 0 16px; font-size: 15px; user-select: text; }
.sp-tabs { display: flex; gap: 6px; margin: 12px 0 10px; }
.sp-listhead { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.sp-listhead b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-scroll { overflow-y: auto; min-height: 0; scrollbar-width: none; }
.sp-scroll::-webkit-scrollbar { display: none; }
.sp-scroll h5 { margin: 10px 0 8px; font-size: 13px; color: var(--dim); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 4px; text-align: left; min-width: 0; }
.tile img, .tile .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; background: linear-gradient(135deg, #1db954, #0d5c2a); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8); transition: transform .2s; }
.tile b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile small { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile:active img, .tile.loading img { transform: scale(.95); opacity: .6; }
.tiles.rows { grid-template-columns: 1fr 1fr; gap: 6px; }
.tiles.rows .tile { grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.tiles.rows .tile img, .tiles.rows .tile .ph { grid-row: 1 / 3; width: 48px; border-radius: 8px; }
.sp-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.sp-now { position: relative; overflow: hidden; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 18px; }
.sp-cover { width: 180px; height: 180px; border-radius: 18px; object-fit: cover; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .8); margin-bottom: 8px; }
/* Geen hoes bekend: rustig muzieknoot-vlak i.p.v. een kapot-plaatje-icoon. */
.sp-cover-ph { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); }
.sp-now.playing .sp-cover { animation: breathe 4s ease-in-out infinite; }
.sp-title { font-size: 18px; line-height: 1.2; }
.sp-artist { color: var(--dim); font-size: 13.5px; }
.sp-prog { width: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); margin-top: 10px; cursor: pointer; overflow: hidden; }
.sp-prog i { display: block; height: 100%; background: #1db954; border-radius: 3px; transition: width 1s linear; }
.sp-times { width: 100%; display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--dim); }
.sp-ctl { justify-content: center; gap: 8px; margin-top: 4px; }
.sp-ctl button { width: 42px; height: 42px; }
.sp-ctl button svg { width: 18px; height: 18px; }
.sp-ctl .pp { width: 58px; height: 58px; }
.sp-ctl button.on { color: #1db954; }
.sp-now .vol { width: 100%; margin-top: 8px; }
.sp-devs { flex: 1 1 auto; overflow-y: auto; scrollbar-width: none; }
.dev { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; text-align: left; font-size: 14px; font-weight: 600; border: 1px solid transparent; }
.dev svg { width: 20px; height: 20px; color: var(--dim); flex: none; }
.dev span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev.on { background: rgba(29, 185, 84, .14); border-color: rgba(29, 185, 84, .5); }
.dev.on svg { color: #1db954; }
.dev .live { width: 8px; height: 8px; border-radius: 50%; background: #1db954; animation: pip 1.6s infinite; }
.dev:disabled { opacity: .4; }
.mood { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 12.5px; color: var(--dim); }
.mood select { height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--edge); color: var(--ink); padding: 0 10px; font: inherit; }
.steps { margin: 0 0 10px; padding-left: 20px; font-size: 13.5px; display: grid; gap: 4px; }
code.sel { user-select: all; background: rgba(0, 0, 0, .35); padding: 2px 6px; border-radius: 6px; font: 12.5px var(--mono); word-break: break-all; }

.spdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1db954; margin-right: 6px; vertical-align: 1px; }
[data-open-music] { cursor: pointer; }

/* ---- De Klusarena (tabblad Spel, alleen op de tablet) ---- */
.panel.spel { grid-template-columns: minmax(0, 1fr) 300px; overflow: hidden; }
.sp-hoofd { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.sp-zij { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: none; }
.sp-duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.sp-speler { background: var(--glass); border: 1px solid var(--edge); border-radius: 22px; padding: 10px 18px; text-align: center; transition: box-shadow .3s, border-color .3s; }
.sp-speler small { color: var(--dim); font-weight: 600; letter-spacing: .02em; }
.sp-speler b { display: block; font-family: var(--mono); font-size: 42px; line-height: 1.1; font-weight: 400; }
.sp-speler.voor { border-color: rgba(255, 182, 92, .45); box-shadow: 0 0 34px -10px rgba(255, 182, 92, .55), inset 0 1px 0 rgba(255, 255, 255, .06); }
.sp-vs { color: var(--faint); font-weight: 700; }
.sp-doel { padding: 12px 15px; }
.sp-doelkop { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sp-doelkop h4 { margin: 0; }
.sp-doelkop span { color: var(--dim); font-size: 13px; }
.sp-balk { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 8px; }
.sp-balk i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--mint), var(--lamp)); transition: width .5s ease; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; overflow-y: auto; scrollbar-width: none; padding-bottom: 90px; align-content: start; }
.sp-klus { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; text-align: left; transition: transform .12s ease; }
.sp-klus:active { transform: scale(.95); }
.sp-klus .em { font-size: 26px; line-height: 1; }
.sp-klus .wat { font-weight: 600; font-size: 14px; }
.pt { color: var(--mint); font-family: var(--mono); font-size: 13px; }
.sp-regel { margin: 6px 0; font-size: 14px; color: var(--dim); }
.sp-regel b { color: var(--ink); }
.sp-oeps { margin-top: 10px; font-size: 13px; }
.sp-vorige p { margin: 6px 0; }
.sp-kies { position: fixed; inset: 0; z-index: 40; background: rgba(5, 8, 7, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; animation: viewin .2s ease; }
.sp-kieskaart { width: min(430px, 92vw); text-align: center; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.sp-kieskaart h3 { margin: 0; font-size: 22px; }
.sp-kieskaart .em { font-size: 22px; }
.sp-kiesrij { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sp-naam { padding: 22px 10px; border-radius: 20px; background: var(--glass-2); border: 1px solid var(--edge); font-size: 21px; font-weight: 700; transition: transform .12s ease; }
.sp-naam:active { transform: scale(.94); }
.conf { position: fixed; z-index: 60; width: 9px; height: 9px; border-radius: 2px; pointer-events: none; transition: transform 1s cubic-bezier(.16, .8, .4, 1), opacity 1s ease; }
@media (max-width: 900px) { .panel.spel { grid-template-columns: minmax(0, 1fr); } }

/* ---- vensters slepen en schalen (aanpasstand) ---- */
.ib.on { color: var(--lamp); }
.vmode [data-venster], .vmode .v-vlak { position: relative; outline: 1.5px dashed rgba(255, 255, 255, .25); outline-offset: 4px; border-radius: 20px; touch-action: none; }
.v-grip { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; z-index: 7; display: grid; place-items: center; color: var(--lamp); background: rgba(20, 26, 23, .85); border: 1px solid var(--glass-2); border-radius: 12px; cursor: nwse-resize; touch-action: none; }
.v-grip svg { width: 18px; height: 18px; }
.v-sleep { opacity: .92; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); pointer-events: auto; }
.v-gat { border: 1.5px dashed rgba(255, 182, 92, .5); border-radius: 20px; background: rgba(255, 182, 92, .06); }

/* ---- beide kolommen als vrij raster: elk venster half of vol breed ---- */
.home .col, .home .left { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: max-content; gap: 10px; align-content: start; }
.home .col > *, .home .left > * { grid-column: span 4; min-width: 0; }
/* Compacte inhoud zodra een venster op halve breedte staat. */
[data-venster].smal .bins { grid-template-columns: repeat(2, 1fr); gap: 5px; }
[data-venster].smal .days { grid-template-columns: repeat(5, 1fr); gap: 3px; font-size: 11px; }
[data-venster].smal .wx b { font-size: 26px; }
[data-venster].smal .scenes.row, .smal.scenes.row { grid-template-columns: 1fr; }

/* ---- verwarmingspaneel (tik op de temperatuurregel) ---- */
.hs { position: fixed; inset: 0; z-index: 40; background: rgba(5, 8, 7, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; animation: viewin .2s ease; }
.hs-kaart { width: min(560px, 94vw); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.hs-kop { display: flex; justify-content: space-between; align-items: center; }
.hs-kop h3 { margin: 0; font-size: 22px; }
.hs-dicht { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 16px; }
.hs-raam { margin: 0; padding: 9px 12px; border-radius: 14px; background: rgba(125, 211, 252, .12); border: 1px solid rgba(125, 211, 252, .25); font-size: 13.5px; }
.hs-stand { margin: 0; color: var(--dim); font-size: 13px; }
.hs-rij { display: flex; gap: 10px; }
.hs-rij .ghost-btn:disabled { opacity: .4; }
.hs-grafiek { margin-top: 4px; position: relative; }
.hs-grafiek h4 { margin: 0 0 6px; }
.hs-grafiek svg { width: 100%; height: 90px; display: block; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.hs-grafiek .lijn { fill: none; stroke: var(--lamp); stroke-width: 2; }
.hs-grafiek .vul { fill: rgba(255, 182, 92, .12); stroke: none; }
.hs-as { position: absolute; right: 8px; top: 26px; bottom: 4px; display: flex; flex-direction: column; justify-content: space-between; color: var(--faint); font-size: 11px; pointer-events: none; }

/* ---- het huis als levende maquette ---- */
/* De binnenlaag draait heel zachtjes heen en weer (goedkope transform-
   animatie op de GPU, zodat de beeldsnelheid-bewaking niet ingrijpt). */
.house .kern { position: absolute; inset: 0; transform-style: preserve-3d; animation: zweef 18s ease-in-out infinite alternate; }
.scene3.grab .kern { animation-play-state: paused; }
@keyframes zweef { from { transform: rotateZ(-0.7deg); } to { transform: rotateZ(0.7deg); } }
/* De hele scène baadt zachtjes in de kleur van de felste lamp die aanstaat. */
.scene3::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(46% 42% at 50% 60%, color-mix(in srgb, var(--amb, #ffb65c) calc(var(--ambi, 0) * 13%), transparent), transparent 72%); transition: background 1.2s ease; }
.house .ground { position: absolute; inset: -80px -100px; transform: translateZ(-26px); border-radius: 60px; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--amb, #ffb65c) calc(5% + var(--ambi, 0) * 15%), transparent), transparent 74%); transition: background 1.2s ease; }
/* Lichtplas die zachtjes ademt onder een kamer die aanstaat. */
.r3.on .fl::before { content: ""; position: absolute; inset: -10px; border-radius: 12px; z-index: -1; filter: blur(8px); background: radial-gradient(ellipse at center, color-mix(in srgb, var(--c) calc(16% + var(--b) * 24%), transparent), transparent 70%); animation: adem 5.5s ease-in-out infinite; }
@keyframes adem { 50% { opacity: .55; transform: scale(1.12); } }
.r3.on .orb { animation: orbzweef 4.2s ease-in-out infinite; }
@keyframes orbzweef { 50% { transform: translateZ(64px); } }
.flat .house .kern { animation: none; }

/* ---- batterij en energieschema: gloed naar toestand ---- */
.eflow .sterren circle { fill: #cfd8ff; animation: ster 2.6s ease-in-out infinite; }
@keyframes ster { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---- vuilniswagen met koplampen in het donker ---- */
.road .beam { display: none; }
.road.avond .beam { display: block; animation: ster 1.8s ease-in-out infinite; }

/* ---- vuilniswagen in de lijnstijl van het dashboard ---- */
.road .truck { color: var(--dim); }
.road .truck .vaart path { stroke: rgba(255, 255, 255, .28); animation: vaartl 1s ease-out infinite; }
.road .truck .vaart path:nth-child(2) { animation-delay: .33s; }
.road .truck .vaart path:nth-child(3) { animation-delay: .66s; }
@keyframes vaartl { from { transform: translateX(7px); opacity: 0; } 30% { opacity: .9; } to { transform: translateX(-9px); opacity: 0; } }

/* ---- breedte-knop in de aanpasstand ---- */
/* De hoekgreep laat de huidige breedte als breukje zien. */
.v-grip[data-breed]::after { content: attr(data-breed); position: absolute; right: 40px; bottom: 7px; color: var(--dim); font: 700 12px var(--mono); background: rgba(20, 26, 23, .85); border: 1px solid var(--glass-2); border-radius: 10px; padding: 2px 7px; white-space: nowrap; }

/* ---- muziekkleur- en disco-knopjes in het muziekvenster ---- */
.mkrij { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chip.mk { height: 32px; padding: 0 13px; border-radius: 16px; font-size: 12.5px; font-weight: 600; color: var(--dim); background: rgba(255, 255, 255, .06); border: 1px solid var(--edge); }
.chip.mk.disco.on { background: linear-gradient(90deg, rgba(255, 60, 170, .22), rgba(150, 90, 255, .22)); animation: halo 1.2s ease-in-out infinite; }
.chip.mk.on { color: var(--ink); background: linear-gradient(90deg, rgba(255, 143, 177, .18), rgba(125, 211, 252, .18)); border-color: rgba(255, 255, 255, .22); }

/* ---- sluimerverbruik-regel in het energievenster ---- */
.sluimer { margin: 8px 0 0; font-size: 12.5px; color: var(--dim); }
.sluimer b { color: var(--ink); font-family: var(--mono); font-weight: 400; }

/* ---- het huis als 3D-maquette (WebGL) ---- */
.scene3 canvas.h3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.floors [data-huis] { color: var(--lamp); border-left: 1px solid var(--edge); border-radius: 0 15px 15px 0; margin-left: 2px; }
.scene3 canvas.h3d ~ .callouts { display: block; }

/* ---- thermostaat als draaiknop (lichte tekening, geen 3D) ---- */
.hs-knoprij { display: flex; align-items: center; justify-content: center; gap: 14px; }
.hs-knop { position: relative; width: 250px; height: 250px; flex: none; touch-action: none; cursor: grab; --w: #ffb65c; }
.hs-knop svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hs-knop .spoor { stroke: rgba(255, 255, 255, .08); stroke-width: 14; }
.hs-knop .kb { stroke-width: 14; filter: drop-shadow(0 0 9px var(--w)); transition: stroke .25s; }
.hs-knop .tik { stroke: rgba(255, 255, 255, .2); stroke-width: 1.5; }
.hs-knop .tik.groot { stroke: rgba(255, 255, 255, .5); stroke-width: 2; }
.hs-knop .nu { stroke: #fff; stroke-width: 2; opacity: .85; }
.hs-knop .knopvlak { stroke: rgba(255, 255, 255, .13); stroke-width: 1; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .55)); }
.hs-knop .greep { fill: #fff; stroke: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.hs-knop .stip { fill: var(--w); stroke: none; }
.hs-knop-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.hs-knop-mid b { font-size: 44px; font-weight: 250; letter-spacing: -0.03em; line-height: 1.05; }
.hs-knop-mid small { color: var(--dim); font-size: 12.5px; max-width: 110px; }
.hs-pm { width: 48px; height: 48px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .09); font-size: 22px; }
.hs-nulijn { margin: 0; text-align: center; color: var(--dim); font-size: 14px; }
.hs-nulijn b { color: var(--ink); font-weight: 600; }
.hs-nulijn em { font-style: normal; color: var(--heat); }

/* ---- de thermostaat als eigen venster ---- */
/* De knop schaalt mee met de breedte van het venster; de cijfers schalen mee
   met de knop (cqw), dus hij blijft in elk formaat in verhouding. */
.card.heat { container-type: inline-size; }
.heatrij { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.heatrij .hs-knop { width: 150px; width: clamp(96px, 44cqw, 210px); height: auto; aspect-ratio: 1; }
.heat.smal .heatrij { flex-direction: column; gap: 6px; text-align: center; }
.heat.smal .heatrij .hs-knop { width: 130px; width: clamp(80px, 82cqw, 190px); }
.hs-knop { container-type: inline-size; }
.hs-knop-mid b { font-size: 17.5cqw; }
.hs-knop-mid small { font-size: max(9px, 5cqw); max-width: 46cqw; }
.tmptekst { min-width: 0; }
.tmptekst b { font-size: 15px; font-weight: 600; display: block; }
.tmptekst small { display: block; color: var(--dim); font-size: 12.5px; }
.tmptekst .hint { color: var(--faint); margin-top: 3px; }

/* ---- batterij als ring (zelfde stijl als de thermostaatknop) ---- */
.eflow.high { --bat: #6ee7b7; } .eflow.mid { --bat: #ffcf5a; } .eflow.low { --bat: #ff7a6b; }
.eflow .ringspoor { stroke: rgba(255, 255, 255, .08); stroke-width: 9; }
.eflow .ring { stroke: var(--bat); stroke-width: 9; filter: drop-shadow(0 0 7px var(--bat)); }
.eflow .ringknop { stroke: rgba(255, 255, 255, .13); stroke-width: 1; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.eflow .batring .pct { font: 600 16px var(--f); stroke: none; }
.eflow .batring .richting { stroke: var(--bat); stroke-width: 2; animation: ster 1.6s ease-in-out infinite; }

/* ---- schuiven: dunne lijn met gloed en een witte greep ---- */
.vol input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; outline: none; background: linear-gradient(90deg, var(--lamp) var(--p, 50%), rgba(255, 255, 255, .1) var(--p, 50%)); box-shadow: 0 0 10px -2px rgba(255, 182, 92, .55); }
.vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 5px rgba(0, 0, 0, .6); }
.vol input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 5px rgba(0, 0, 0, .6); }

/* =========================================================
   Telefoon en staande tablet: één doorlopende kolom
   ========================================================= */
/* De twee zijkolommen lossen op in één raster van vier, zodat de vensters
   hun eigen breedte houden (Afval en Weer naast elkaar) en het huis er
   tussenin kan staan. Op de andere tabbladen blijft alleen dat tabblad over. */
@media (max-width: 1100px) {
  .app.home { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: max-content; gap: 12px; height: auto; padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .app.home > .left, .app.home > .col { display: contents; }
  .app.home.view-side > .left { display: none; }
  .app.home > .stage, .app.home > .taken, .app.home > .panel, .app.home .party-banner { grid-column: 1 / -1; grid-row: auto; }
  .app.home [data-venster="klok"] { order: 1; }
  .app.home [data-venster="scenes"] { order: 2; }
  .app.home > .stage { order: 3; }
  .app.home [data-venster="vandaag"] { order: 4; }
  .app.home [data-venster="verwarming"] { order: 5; }
  .app.home [data-venster="energie"] { order: 6; }
  .app.home [data-venster="afval"], .app.home [data-venster="weer"] { order: 7; }
  .app.home [data-venster="media"] { order: 8; }
  .app.home [data-venster="timer"] { order: 9; }
  #btn-maat { display: none; }
  /* Muziek: wat er speelt en de bediening eerst, de lijsten eronder. */
  .panel.mu > .sp-side, .panel.mu > .mu-main { order: -1; }
  .panel.mu .sp-cover { width: 128px; height: 128px; }
  .app.home > .tabs { left: 10px; right: 10px; transform: none; justify-self: stretch; justify-content: space-between; max-width: 620px; margin: 0 auto; }
  .panel.spel { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .sp-grid { overflow: visible; padding-bottom: 0; }
  .app.home > .tabs button { flex: 1 1 0; width: auto; min-width: 0; }
}
@media (max-width: 700px) {
  .app.home { padding-left: 14px; padding-right: 14px; padding-top: max(14px, env(safe-area-inset-top)); }
  .bigclock { font-size: 64px; }
  .dateline { margin-top: 6px; font-size: 14.5px; }
  .home .stage > .scene3 { height: 290px; }
  .app.home > .tabs { left: 8px; right: 8px; padding: 5px; gap: 0; }
  .app.home > .tabs button { font-size: 10px; padding: 7px 0 5px; white-space: nowrap; }
  .tabs .badge { right: 6px; }
  .panel h2 { font-size: 24px; }
  .sp-top { flex-wrap: wrap; }
  .sp-top .sp-search { flex: 1 1 160px; }
  .sp-browse { padding: 14px; }
  .setp { max-height: 94%; padding: 16px 14px !important; border-radius: 24px !important; }
  .set { padding: 13px; }
  .hs-knoprij { gap: 6px; }
  .hs-knoprij .hs-knop { width: min(250px, 58vw); height: auto; aspect-ratio: 1; }
  .hs-pm { width: 44px; height: 44px; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); text-align: center; }
}

/* =========================================================
   Telefoon: ontworpen om met één duim te bedienen
   ========================================================= */
/* Geen klok (die heeft de telefoon zelf) en geen 3D-huis (te klein, en slepen
   botst met scrollen). Bovenaan: groet, de stand van het huis in één regel,
   de scèneknoppen en dan meteen de kamers als grote tegels. */
@media (max-width: 700px) {
  html, body { height: auto; min-height: 100%; }
  .app.home { position: relative; gap: 10px; }
  .app.home > .stage { display: contents; }
  .app.home.view-side > .stage { display: none; }
  .app.home .hi, .app.home .rooms { grid-column: 1 / -1; }
  .app.home .scene3 { display: none; }
  .app.home [data-venster="klok"] { order: 1; padding: 4px 108px 0 2px; min-height: 48px; }
  .app.home .hi { order: 2; }
  .app.home [data-venster="scenes"] { order: 3; }
  .app.home .rooms { order: 4; margin-bottom: 4px; }
  .app.home [data-venster="vandaag"] { order: 5; }
  .app.home [data-venster="verwarming"] { order: 6; }
  .app.home [data-venster="energie"] { order: 7; }
  .app.home [data-venster="afval"], .app.home [data-venster="weer"] { order: 8; }
  .app.home [data-venster="media"] { order: 9; }
  .app.home [data-venster="timer"] { order: 10; }

  .bigclock { display: none; }
  .dateline { margin: 0; font-size: 0; }
  .dateline #greet { display: block; font-size: 25px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
  .dateline #date { display: block; font-size: 13.5px; color: var(--dim); margin-top: 2px; }

  /* Instellingen en alles-uit rechtsboven naast de groet; de rest hoort bij de tablet. */
  .app.home .hi .acts { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; width: auto; margin: 0; flex-wrap: nowrap; gap: 8px; }
  #btn-terror, #btn-saver { display: none; }
  .app.home .hi .conn { position: fixed; left: 14px; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 15; text-align: center; background: #3a2114; }

  /* De stand van het huis als rij plaatjes die je opzij kunt vegen. */
  .app.home .hi > p { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; width: auto; font-size: 13px; }
  .app.home .hi > p::-webkit-scrollbar { display: none; }
  .app.home .hi > p span { flex: none; white-space: nowrap; padding: 6px 11px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
  .app.home .hi { display: block; min-width: 0; }

  .scenes.row { gap: 8px; }
  .scenes.row .gl { height: 48px; }

  /* Kamers: twee grote tegels naast elkaar, makkelijk te raken. */
  .app.home .rooms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .app.home .rooms .pill { max-width: none; height: 64px; flex: none; }
  .app.home .rooms > p { grid-column: 1 / -1; }

  .home .col .card, .home .left .card { padding: 14px 15px; }
  .app.home > .tabs button { min-height: 50px; }
}

/* ---- Gebruikers en uitnodigen ---- */
.users { display: grid; gap: 8px; }
.urow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.urow b { flex: 1 1 90px; font-size: 15px; }

/* =========================================================
   iPhone-vast: niets mag een venster breder duwen dan het scherm
   ========================================================= */
/* Safari op iOS geeft datum- en tijdvelden een vaste minimumbreedte en laat
   rasters meegroeien met hun breedste kind. Daardoor werd het instellingen-
   venster breder dan het scherm en vielen knoppen rechts buiten beeld. */
.sheet { grid-template-columns: minmax(0, 1fr); }
.sheet .pnl { min-width: 0; max-width: 100%; }
.setbody { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
.set { min-width: 0; overflow-wrap: anywhere; }
.set .row > *, .urow > * { min-width: 0; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; }
.set input[type=date] { display: block; text-align: left; line-height: 40px; }
.set code { overflow-wrap: anywhere; word-break: break-all; }
@media (max-width: 700px) {
  /* Onder de 16 px zoomt iOS het hele scherm in zodra je een veld aantikt,
     en zoomt daarna niet meer terug. */
  input, select, textarea { font-size: 16px !important; }
  /* Gebruikers: naam boven, knoppen eronder even breed — altijd in beeld. */
  .urow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 0; }
  .urow b { grid-column: 1 / -1; }
  .urow .chip { justify-content: center; height: 42px; }
  .set .row { gap: 8px; }
  .set .row input[style] { max-width: none !important; }
  .set .row .chip { min-height: 42px; }
  .sheet.settings { align-items: end; }
  .setp { width: 100%; border-radius: 26px 26px 0 0 !important; max-height: 92% !important; padding-bottom: max(16px, env(safe-area-inset-bottom)) !important; }
}



/* =========================================================
   Nalooptronde: wat de controle aan het licht bracht
   ========================================================= */
/* De timer-flits kreeg per ongeluk de maat van een knop (zelfde klassenaam). */
.flash.go { width: auto; height: auto; border: 0; border-radius: 0; box-shadow: none; }
/* Meldingen altijd bovenop, ook boven het verwarmingspaneel en de fotolijst;
   en op de telefoon mogen ze de breedte van het scherm gebruiken. */
.toast { z-index: 70; left: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; transform: translateY(20px); text-align: center; }
.toast.show { transform: none; }
/* Het verwarmingspaneel past altijd op het scherm (ook een iPhone op zijn kant). */
.hs-kaart { max-height: calc(100% - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; scrollbar-width: none; }
/* Geen tekstselectie of vergrootglas bij vasthouden: dat zit de gebaren in de weg. */
body { -webkit-user-select: none; -webkit-touch-callout: none; }
input, textarea, .setbody, .code { -webkit-user-select: text; user-select: text; }
.mu-cover .eq { -webkit-backdrop-filter: blur(6px); }
/* Kamertegels: omhoog/omlaag vegen scrolt de pagina, opzij vegen dimt. */
.pill { touch-action: pan-y; }
/* Rand van het scherm vrijhouden bij een iPhone op zijn kant (inkeping). */
.app { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
/* iPhone/iPad: onder de 16 px zoomt Safari in bij het aantikken van een veld,
   ook als het scherm breder is dan een staande telefoon. */
@supports (-webkit-touch-callout: none) {
  input, select, textarea { font-size: 16px !important; }
}
@media (max-width: 700px) {
  .app.home { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .sheet .pnl.hue { padding: 18px 16px max(24px, env(safe-area-inset-bottom)); }
  /* Routine-schakelaar: groot genoeg voor een duim. */
  .routine .seg button { padding: 8px 14px; font-size: 13.5px; }
  /* Zoekbalk bij Spotify: een hogere raakzone rond de dunne voortgangsbalk. */
  .sp-prog { position: relative; }
  .sp-prog::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; bottom: -14px; }
}

/* Instellingen op de telefoon: een los venster met lucht eromheen, niet tegen
   de schermrand gedrukt. */
@media (max-width: 700px) {
  .sheet.settings { align-items: end; padding: max(12px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
  .setp { width: 100%; max-height: 100% !important; border-radius: 26px !important; padding: 18px 16px 16px !important; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
  .set { padding: 14px; border-radius: 18px; }
  .urow { grid-template-columns: 1fr; }
}

/* ---- Navraag bij een hoge temperatuur ---- */
.warmvraag { position: fixed; inset: 0; z-index: 65; background: rgba(5, 8, 7, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: viewin .2s ease; }
.warmkaart { width: min(440px, 100%); text-align: center; padding: 24px 22px; display: flex; flex-direction: column; gap: 10px; border-color: rgba(255, 138, 76, .45); box-shadow: 0 0 60px -18px rgba(255, 138, 76, .6); }
.warmgraad { font-size: 56px; font-weight: 250; letter-spacing: -0.03em; line-height: 1; color: var(--heat); }
.warmkaart h3 { margin: 0; font-size: 21px; }
.warmkaart p { margin: 0; color: var(--dim); font-size: 14.5px; }
.warmrij { display: grid; gap: 10px; margin-top: 8px; }
.warmrij button { height: 54px; border-radius: 20px; font-weight: 700; font-size: 16px; }
.warmnee { background: var(--mint); color: #062016; }
.warmja { background: var(--glass); border: 1px solid var(--edge); color: var(--ink); }
/* Telefoon: over de knop op het beginscherm scrol je gewoon heen. */
@media (max-width: 700px) { .heat .hs-knop { touch-action: auto; cursor: pointer; } }

/* ---- Klusarena: statistieken ---- */
.sp-wissel { display: flex; justify-content: center; }
.sp-wissel .seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.sp-wissel .seg button { padding: 8px 18px; border-radius: 13px; font-size: 13.5px; font-weight: 600; color: var(--dim); }
.sp-wissel .seg button.on { background: rgba(255, 255, 255, .16); color: var(--ink); }
.sp-stats { min-height: 0; overflow-y: auto; scrollbar-width: none; padding-bottom: 90px; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-kaart { padding: 14px 16px; }
.st-kaart h4 { margin: 0 0 10px; }
.st-breed { grid-column: 1 / -1; }
.st-kaart .g, .st-legenda .g { --k: var(--sky); } .st-kaart .m, .st-legenda .m { --k: var(--rose); }
.st-dagen, .st-weken { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; }
.st-weken { margin-top: 14px; }
.st-dag { display: grid; gap: 5px; justify-items: center; }
.st-dag small { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.st-dag.nu small { color: var(--lamp); }
.st-staven { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 92px; width: 100%; border-bottom: 1px solid var(--edge); }
.st-weken .st-staven { height: 64px; }
.st-staven i { width: min(16px, 34%); min-height: 2px; border-radius: 6px 6px 0 0; background: var(--k); box-shadow: 0 0 12px -2px var(--k); }
.st-legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--dim); }
.st-legenda i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--k); margin-right: 7px; }
.st-balans { display: flex; height: 30px; border-radius: 15px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.st-balans i { display: grid; place-items: center; background: var(--k); color: #06131a; font-style: normal; font-weight: 700; font-size: 13px; transition: width .5s ease; }
.st-kaart p { margin: 8px 0 0; font-size: 13.5px; }
.st-top { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.st-top li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--edge); }
.st-top li:last-child { border-bottom: 0; padding-bottom: 0; }
.st-top b { font-family: var(--mono); font-weight: 400; color: var(--k); }
.st-cijfers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.st-cijfers > div { display: grid; justify-items: center; gap: 1px; padding: 10px 6px; border-radius: 16px; background: rgba(255, 255, 255, .04); text-align: center; }
.st-cijfers small { font-size: 11px; color: var(--faint); }
.st-cijfers b { font-family: var(--mono); font-size: 28px; font-weight: 400; line-height: 1.15; color: var(--k, var(--ink)); }
.st-cijfers span { font-size: 12px; color: var(--dim); }
.st-records { margin-top: 10px; display: grid; gap: 2px; }
.st-records p { margin: 0; color: var(--dim); }
.st-records b { color: var(--ink); font-family: var(--mono); font-weight: 400; }
.st-records small { color: var(--faint); }
@media (max-width: 700px) {
  .st-grid { grid-template-columns: minmax(0, 1fr); }
  .st-cijfers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-stats { overflow: visible; padding-bottom: 0; }
}

/* ---- Klusarena: inzet, afsluiting, beheer ---- */
.sp-inzet { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 16px; border-radius: 18px; background: var(--glass); border: 1px dashed var(--edge); color: var(--dim); font-size: 14px; text-align: left; }
.sp-inzet.gezet { border-style: solid; border-color: rgba(255, 182, 92, .35); color: var(--ink); }
.sp-inzet b { color: var(--lamp); }
.sp-inzetform { display: flex; gap: 8px; }
.sp-inzetform input { flex: 1; min-width: 0; height: 46px; border-radius: 16px; border: 1px solid var(--edge); background: rgba(0, 0, 0, .25); padding: 0 14px; font-size: 15px; user-select: text; }
.sp-inzetform .go { width: auto; height: 46px; padding: 0 20px; }
.sp-naam.ik { border-color: rgba(110, 231, 183, .55); box-shadow: 0 0 26px -10px var(--mint); }
.sp-slotkaart { gap: 10px; border-color: rgba(255, 182, 92, .45); box-shadow: 0 0 70px -20px rgba(255, 182, 92, .7); }
.sp-slotkaart > small { color: var(--dim); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
.sp-slotkaart h3 { font-size: 26px; }
.sp-slotkaart p { margin: 0; color: var(--dim); font-size: 14.5px; }
.sp-slotkaart p b { color: var(--ink); }
.sp-sloteind { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-sloteind span { display: grid; padding: 10px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); }
.sp-sloteind span.voor { border-color: rgba(255, 182, 92, .5); }
.sp-sloteind small { color: var(--dim); font-weight: 600; }
.sp-sloteind b { font-family: var(--mono); font-size: 34px; font-weight: 400; line-height: 1.1; }
.sp-slotinzet b { color: var(--lamp) !important; }
.st-label { display: block; margin: 8px 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.st-schoon { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--edge); font-size: 14px; }
.st-schoon span { display: grid; }
.st-schoon small { color: var(--faint); font-size: 12px; }
.st-schoon .ghost-btn { height: 40px; font-size: 13.5px; }
.sp-beheer { padding: 16px; display: grid; gap: 10px; }
.sp-beheer h4 { margin: 0; }
.sp-bkop, .sp-brij { display: grid; grid-template-columns: 48px minmax(0, 1fr) 64px 64px 40px 40px; gap: 6px; align-items: center; }
.sp-bkop { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 0 2px; }
.sp-bkop span:nth-child(n+3) { text-align: center; }
.sp-blijst { display: grid; gap: 6px; }
.sp-brij input:not([type=checkbox]) { width: 100%; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--edge); background: rgba(0, 0, 0, .25); padding: 0 10px; font-size: 14.5px; user-select: text; }
.sp-brij .b-em, .sp-brij .b-num { text-align: center; padding: 0 4px; }
.b-sm { display: grid; place-items: center; height: 42px; cursor: pointer; }
.b-sm input { position: absolute; opacity: 0; pointer-events: none; }
.b-sm i { width: 24px; height: 24px; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .25); }
.b-sm input:checked + i { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 12px -2px var(--mint); }
.b-weg { width: 40px; height: 42px; border-radius: 12px; background: rgba(255, 107, 107, .12); color: #ffaaaa; font-size: 20px; }
.sp-bknoppen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-bknoppen .go { width: auto; padding: 0 26px; }
.sp-bstd { margin-left: auto; font-size: 13px; }
@media (max-width: 700px) {
  .sp-wissel .seg button { padding: 9px 12px; font-size: 13px; }
  .sp-bkop, .sp-brij { grid-template-columns: 40px minmax(0, 1fr) 50px 50px 32px 34px; gap: 4px; }
  .sp-bstd { margin-left: 0; }
  .panel.spel { padding-bottom: 8px; }
}
/* Beheer: op de tablet staan de kolomkoppen erboven; op de telefoon krijgt
   elk klusje twee regels met kleine labels, zodat de naam leesbaar blijft. */
.b-lab { display: block; min-width: 0; }
.b-lab small, .b-sm small { display: none; }
@media (max-width: 700px) {
  .sp-bkop { display: none; }
  .sp-brij { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr) 40px; grid-template-areas: "em wat wat wat weg" ". p min sm sm"; gap: 6px; padding: 8px 0 10px; border-bottom: 1px solid var(--edge); align-items: end; }
  .sp-brij .b-em { grid-area: em; align-self: start; } .sp-brij .b-wat { grid-area: wat; } .sp-brij .b-weg { grid-area: weg; align-self: start; }
  .b-p { grid-area: p; } .b-min { grid-area: min; } .sp-brij .b-sm { grid-area: sm; }
  .b-lab small { display: block; margin: 0 0 3px 4px; font-size: 11.5px; color: var(--faint); }
  .b-sm { display: flex; align-items: center; justify-content: flex-start; gap: 8px; height: 42px; }
  .b-sm i { flex: none; }
  .b-sm small { display: block; font-size: 12.5px; color: var(--dim); }
}
