/* ============================================================================
   Mia OS — "Strak" shell-afwerking (laadt NA os.css, laat os.css ongemoeid).
   Vertaalt de bron-tokens uit /home/mia/os-strak/_helder + 14-avond-os naar de
   live shell: Helder (licht) + Avond (donker), Switzer/Satoshi + Fragment Mono,
   accent Mia-teal. Geen glas/blur, geen gradient-tekst, geen paars-blauw.
   Radius 8/12/20, ruimte in stappen van 4, drie schaduwen.
   Styling voor de nieuwe chrome die os.css nog niet kende: .topbar en kinderen,
   paged home, dock, duim, chatknop, DM-paneel, grond-achtergrond.
   ========================================================================== */

/* ---------- 1. Thema-tokens: hermap de os.css-variabelen + eigen Strak-set --- */
html[data-thema="helder"] {
  /* os.css-variabelen hermappen → hele shell reskint mee */
  --bg: #F3F4F4;
  --text: #1A2124;
  --text-dim: #566166;
  --line: rgba(20,32,36,.08);
  --line-soft: rgba(20,32,36,.06);
  --accent: #0E6E73;
  --accent-bright: #0B5A5E;
  --accent-soft: rgba(14,110,115,.08);
  --teal-50: #E3EFEF;
  --glass: #FFFFFF;
  --glass-strong: #FFFFFF;
  --ok: #2F8A5B;
  --warn: #C24A42;
  --radius: 20px;
  --radius-lg: 20px;
  --font-display: 'Switzer', system-ui, sans-serif;
  --font-mono: 'Fragment Mono', ui-monospace, monospace;
  --shadow-glass: var(--sh-s);
  /* eigen Strak-set */
  --grond: #F3F4F4; --grond2: #ECEFEF;
  --vlak: #FFFFFF; --vlak2: #F7F8F8; --zacht: #EEF4F4;
  --lijn: rgba(20,32,36,.08); --lijn2: rgba(20,32,36,.13);
  --inkt: #1A2124; --inkt2: #566166; --inkt3: #8B9599;
  --teal: #0E6E73; --teal2: #0B5A5E; --teal-z: #E3EFEF;
  --oker: #B9821A; --groen: #2F8A5B;
  --r1: 8px; --r2: 12px; --r3: 20px;
  --sh-s: 0 0 0 1px rgba(20,32,36,.06),0 1px 2px rgba(20,32,36,.05),0 4px 10px -4px rgba(20,32,36,.08);
  --sh-m: 0 0 0 1px rgba(20,32,36,.06),0 2px 4px rgba(20,32,36,.04),0 10px 24px -12px rgba(20,32,36,.16);
  --sh-l: 0 0 0 1px rgba(14,110,115,.25),0 4px 8px rgba(14,110,115,.14),0 16px 32px -12px rgba(14,110,115,.40);
  --f: 'Switzer', system-ui, sans-serif; --m: 'Fragment Mono', ui-monospace, monospace;
}
html[data-thema="avond"] {
  --bg: #0E1315;
  --text: #E8ECED;
  --text-dim: #A5AFB2;
  --line: #232C30;
  --line-soft: #1C2427;
  --accent: #2FA79F;
  --accent-bright: #6FD0C6;
  --accent-soft: rgba(47,167,159,.15);
  --teal-50: rgba(47,167,159,.15);
  --glass: #151B1E;
  --glass-strong: #1A2225;
  --ok: #5DBE8A;
  --warn: #E08A82;
  --radius: 20px;
  --radius-lg: 20px;
  --font-display: 'Satoshi', system-ui, sans-serif;
  --font-mono: 'Fragment Mono', ui-monospace, monospace;
  --shadow-glass: var(--sh-s);
  --grond: #0E1315; --grond2: #11171A;
  --vlak: #151B1E; --vlak2: #1A2225; --zacht: #1A2225;
  --lijn: #232C30; --lijn2: #2E393D;
  --inkt: #E8ECED; --inkt2: #A5AFB2; --inkt3: #6F7A7E;
  --teal: #2FA79F; --teal2: #1E8F87; --teal-z: rgba(47,167,159,.15);
  --oker: #D7A24A; --groen: #5DBE8A;
  --r1: 8px; --r2: 12px; --r3: 20px;
  --sh-s: inset 0 1px 0 rgba(255,255,255,.035),0 1px 2px rgba(0,0,0,.35),0 0 0 1px var(--lijn);
  --sh-m: inset 0 1px 0 rgba(255,255,255,.05),0 6px 14px -6px rgba(0,0,0,.6),0 0 0 1px var(--lijn);
  --sh-l: 0 12px 28px -8px rgba(0,0,0,.65),0 0 0 1px var(--lijn);
  --f: 'Satoshi', system-ui, sans-serif; --m: 'Fragment Mono', ui-monospace, monospace;
}

/* ---------- 2. Grondbeginselen: font, geen glas/blur, rustige achtergrond ---- */
html[data-thema] body {
  font-family: var(--f);
  letter-spacing: 0;
  color: var(--inkt);
  background: linear-gradient(180deg, var(--grond) 0%, var(--grond2) 100%) !important;
}
/* doctrine: geen glas/blur nergens in de strak-shell */
html[data-thema] *,
html[data-thema] *::before,
html[data-thema] *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-thema] .mono { font-family: var(--m); letter-spacing: 0; }

/* rustige achtergrondlaag (profielmenu kan 'm wisselen) */
html[data-thema] #grond.grond {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
html[data-thema="helder"] #grond.grond {
  background:
    radial-gradient(820px 520px at 88% -8%, rgba(14,110,115,.05), transparent 60%),
    radial-gradient(680px 480px at -6% 108%, rgba(14,110,115,.035), transparent 55%);
}
html[data-thema="avond"] #grond.grond {
  background:
    radial-gradient(820px 520px at 88% -8%, rgba(47,167,159,.10), transparent 60%),
    radial-gradient(680px 480px at -6% 108%, rgba(47,167,159,.06), transparent 55%);
}
html[data-thema="avond"][data-grond="geen"] #grond.grond,
html[data-thema="helder"][data-grond="geen"] #grond.grond { background: none; }

/* oude knoppen nooit zichtbaar (gekoppeld via het profielmenu) */
.legacy-slot { display: none !important; }

/* ---------- 3. Topbar ------------------------------------------------------- */
.topbar {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px 2px; height: 56px;
  padding: 0 10px;
  padding-top: 0;
  background: var(--vlak);
  border: 1px solid var(--lijn);
  border-radius: var(--r2);
  box-shadow: var(--sh-m);
  flex-shrink: 0; z-index: 50;
}
@supports (padding: env(safe-area-inset-top)) {
  .topbar { margin-top: max(10px, env(safe-area-inset-top)); }
}

/* merk / home */
.topbar .merk {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--inkt);
  font-family: var(--f); font-weight: 600; font-size: 17px; letter-spacing: -.01em;
  padding: 4px 8px 4px 4px; border-radius: var(--r1);
  transition: background .18s;
}
.topbar .merk:hover { background: var(--vlak2); }
.topbar .merk svg { width: 32px; height: 32px; flex: none; }
.topbar .merk span { line-height: 1; }

/* zoek */
.topbar .zoek {
  display: flex; align-items: center; gap: 10px;
  flex: 1; max-width: 440px; height: 38px; margin: 0 2px;
  padding: 0 12px; border: 1px solid var(--lijn); border-radius: var(--r1);
  background: var(--vlak2); color: var(--inkt3);
  cursor: text; transition: border-color .18s, background .18s;
}
.topbar .zoek:hover { border-color: var(--lijn2); }
.topbar .zoek:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-z); }
.topbar .zoek svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.topbar .zoek .zoek-ph { flex: 1; text-align: left; font-size: 13px; color: var(--inkt3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .zoek .kbds { display: flex; gap: 3px; flex: none; }
.topbar .zoek .kbd {
  font-family: var(--m); font-size: 11px; line-height: 1;
  padding: 3px 5px; border-radius: 5px;
  background: var(--vlak); border: 1px solid var(--lijn); color: var(--inkt3);
}

/* rechterblok */
.topbar .rechts { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* chip (live / credits) */
.topbar .chip.lijn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--lijn); border-radius: var(--r1);
  background: var(--vlak2); color: var(--inkt2);
  font-family: var(--f); font-size: 12px; font-weight: 500;
  transition: background .18s, border-color .18s, color .18s;
}
.topbar .chip.lijn:hover { background: var(--zacht); border-color: var(--lijn2); color: var(--inkt); }
.topbar .chip.lijn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--groen); box-shadow: 0 0 0 3px rgba(47,138,91,.15); flex: none; }
.topbar .chip.lijn b.mono { font-family: var(--m); font-size: 13px; color: var(--inkt); }
.topbar .chip.lijn span { color: var(--inkt3); }
.topbar .chip.lijn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.topbar .chip.lijn.cr-low { color: var(--oker); }
.topbar .chip.lijn.cr-zero { color: var(--warn); }

/* status-stip */
.topbar .stat {
  position: relative; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--r1);
  transition: background .18s;
}
.topbar .stat:hover { background: var(--vlak2); }
.topbar .stat i { width: 8px; height: 8px; border-radius: 50%; background: var(--oker); box-shadow: 0 0 0 3px rgba(185,130,26,.16); }
.topbar .stat.ok i { background: var(--groen); box-shadow: 0 0 0 3px rgba(47,138,91,.15); }
.topbar .stat.warn i { background: var(--warn); box-shadow: 0 0 0 3px rgba(194,74,66,.18); }
.topbar .stat .tip {
  position: absolute; top: 40px; right: -10px; z-index: 80;
  white-space: nowrap; display: none; align-items: center; gap: 10px;
  background: var(--inkt); color: #fff;
  border-radius: var(--r1); padding: 7px 12px; font-size: 12px; line-height: 1.4;
  box-shadow: 0 8px 20px -8px rgba(20,32,36,.4);
}
html[data-thema="avond"] .topbar .stat .tip { background: #20292D; color: var(--inkt); border: 1px solid var(--lijn2); }
.topbar .stat .tip::before { content: ""; position: absolute; top: -5px; right: 18px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.topbar .stat:hover .tip, .topbar .stat.open .tip { display: flex; }

/* icoonknop (bel) */
.topbar .ik {
  position: relative; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--r1); color: var(--inkt2);
  transition: background .18s, color .18s;
}
.topbar .ik:hover { background: var(--vlak2); color: var(--inkt); }
.topbar .ik svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.topbar .ik .bd {
  position: absolute; top: 3px; right: 3px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--teal); color: #fff;
  font-family: var(--m); font-size: 9px; font-weight: 500; line-height: 15px; text-align: center;
  box-shadow: 0 0 0 2px var(--vlak);
}

/* avatar / profiel */
.topbar .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f); font-size: 14px; font-weight: 600;
  transition: filter .18s, transform .1s;
}
.topbar .avatar:hover { filter: brightness(1.08); }
.topbar .avatar:active { transform: scale(.95); }
.topbar .avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--teal-z); }

/* ---------- 4. Profielmenu (gebouwd door os.js) ----------------------------- */
.pm-menu {
  position: fixed; z-index: 9000; width: 248px;
  background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r2);
  box-shadow: var(--sh-l); padding: 6px; color: var(--inkt);
  font-family: var(--f); font-size: 14px;
  animation: pm-in .16s cubic-bezier(.16,1,.3,1);
}
@keyframes pm-in { from { opacity: 0; transform: translateY(-6px); } }
.pm-menu .pm-kop { padding: 8px 10px 6px; }
.pm-menu .pm-naam { font-weight: 600; font-size: 14px; }
.pm-menu .pm-sub { font-size: 12px; color: var(--inkt3); }
.pm-menu .pm-scheid { height: 1px; background: var(--lijn); margin: 6px 4px; }
.pm-menu .pm-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--inkt3); text-transform: uppercase; }
.pm-menu .pm-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; background: none; border-radius: var(--r1);
  color: var(--inkt); font: inherit; text-align: left; cursor: pointer;
  transition: background .14s;
}
.pm-menu .pm-item:hover { background: var(--vlak2); }
.pm-menu .pm-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--inkt2); }
.pm-menu .pm-item.pm-gevaar:hover { background: rgba(194,74,66,.1); color: var(--warn); }
.pm-menu .pm-item.pm-gevaar:hover svg { color: var(--warn); }
.pm-seg { display: flex; gap: 4px; padding: 2px 8px 8px; }
.pm-seg button {
  flex: 1; height: 32px; border: 1px solid var(--lijn); border-radius: var(--r1);
  background: var(--vlak2); color: var(--inkt2); font: 500 12px var(--f); cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.pm-seg button:hover { border-color: var(--lijn2); color: var(--inkt); }
.pm-seg button.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* live-popover (chip-live) */
.lv-pop {
  position: fixed; z-index: 9000; width: 280px; max-height: 60vh; overflow: auto;
  background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r2);
  box-shadow: var(--sh-l); padding: 6px; color: var(--inkt);
  font-family: var(--f); animation: pm-in .16s cubic-bezier(.16,1,.3,1);
}
.lv-pop .lv-label { padding: 8px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--inkt3); text-transform: uppercase; }
.lv-pop a.lv-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r1);
  text-decoration: none; color: var(--inkt); transition: background .14s;
}
.lv-pop a.lv-row:hover { background: var(--vlak2); }
.lv-pop .lv-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--groen); }
.lv-pop .lv-tekst { min-width: 0; display: flex; flex-direction: column; }
.lv-pop .lv-naam { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-pop .lv-url { font-family: var(--m); font-size: 11px; color: var(--inkt3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-pop .lv-leeg { padding: 14px 12px; font-size: 13px; color: var(--inkt3); text-align: center; }

/* ---------- 5. Home / paged grid ------------------------------------------- */
.home { padding: 18px clamp(16px, 4vw, 56px) 108px; }
.page { gap: 20px; }
.page-dots { padding-top: 12px; }
.page-dot { background: rgba(14,110,115,.2); }
html[data-thema="avond"] .page-dot { background: rgba(111,208,198,.25); }
.page-dot.active {
  width: 24px; background: var(--teal) !important; box-shadow: none !important;
}

/* geen iriserende waas op tegels/vlakken (doctrine: rust, geen spectrum) */
html[data-thema] .iri::before,
html[data-thema] .app-tile .app-icon::after { content: none !important; display: none !important; }
/* speelse pixel-mascottes uit: Strak = rustig en scanbaar */
html[data-thema] .app-tile .held-bubble { display: none !important; }

/* tegels: vlak, rustig, Strak (thema-gescoped = wint van os.css-glasregels) */
html[data-thema] .app-tile .app-icon {
  width: 76px; height: 76px; border-radius: var(--r3);
  background: var(--vlak) !important;
  background-image: none !important;
  border: 1px solid var(--lijn);
  box-shadow: var(--sh-s);
  color: var(--c, var(--teal));
  animation: none !important;
  transition: box-shadow .22s, transform .22s;
}
html[data-thema] .app-tile:hover .app-icon {
  background: var(--vlak) !important;
  background-image: none !important;
  box-shadow: var(--sh-m);
  transform: translateY(-2px);
}
.app-tile:focus-visible .app-icon { box-shadow: 0 0 0 2px var(--teal), var(--sh-s); }
.app-tile:active .app-icon { transform: scale(.97); }
.app-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* StrakIconen-sprite (svg.ap) — gevuld detail netjes houden */
.app-icon svg.ap { width: 32px; height: 32px; }
/* ook buiten de tegel (zoeklijst, meldingen, snelmenu klonen de tegel-svg) altijd als lijn tekenen */
svg.ap { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* .avl/.adt staan in de <use>-schaduwboom: selector zonder voorouder, anders matcht hij niet */
#strak-sprite .avl, svg.ap .avl, .avl { fill: currentColor; fill-opacity: .14; stroke: currentColor; }
#strak-sprite .adt, svg.ap .adt, .adt { fill: currentColor; stroke: none; }
.qm-blob svg.ap { width: 26px; height: 26px; }
.app-tile-name {
  font-family: var(--f) !important;
  font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0;
  color: var(--inkt);
  background: none !important; border: none !important;
  padding: 0 !important; max-width: 118px;
  box-shadow: none !important;
  text-shadow: none !important; /* 03-10 Daan: geen gloed achter app-namen */
}
.app-tile:hover .app-tile-name, .app-tile:focus-visible .app-tile-name { color: var(--teal); }

/* ---------- 6. Dock -------------------------------------------------------- */
.dock {
  bottom: 16px; gap: 8px; padding: 8px 10px;
  background: var(--vlak) !important;
  border: 1px solid var(--lijn);
  border-radius: 999px;
  box-shadow: var(--sh-m);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.dock-item {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--lijn);
  background: var(--vlak2);
  box-shadow: none;
  color: var(--teal);
}
.dock-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.dock-item::after { background: var(--teal); box-shadow: none; }
.dock-item:hover { transform: translateY(-3px); border-color: var(--lijn2); box-shadow: var(--sh-s); }

/* ---------- 6b. Topbar op telefoon: compact, zoek verhuist naar de duim ----- */
@media (max-width: 759px) {
  .topbar { margin: 8px; height: 52px; gap: 6px; padding: 0 8px; }
  .topbar .zoek { display: none; }           /* zoek staat onderaan (duim) */
  .topbar #chip-live,
  .topbar #topbar-credits,
  .topbar #topbar-model,
  .topbar .stat { display: none; }           /* rust: alleen merk + bel + profiel */
  .topbar .merk { font-size: 16px; flex: none; }
  .topbar .merk span { white-space: nowrap; }
  .topbar .rechts { gap: 2px; }
}

/* ---------- 7. Duim-balk (alleen telefoon) --------------------------------- */
.duim { display: none; }
@media (max-width: 759px) {
  .duim {
    display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .duim-zoek {
    width: 100%; display: flex; align-items: center; gap: 10px;
    height: 48px; padding: 0 16px; border: 1px solid var(--lijn); border-radius: var(--r3);
    background: var(--vlak); color: var(--inkt3); box-shadow: var(--sh-m); font-family: var(--f);
  }
  .duim-zoek svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .duim-zoek span { font-size: 14px; }
  /* Start als cockpit, stap 0 #9: zoekvak + DM-knop naast elkaar in één onderbalk (knop lag over het zoekvak) */
  .duim { right: 72px; }
}

/* ---------- 8. Chatknop (zwevende Mia DM-knop) ----------------------------- */
.chatknop {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--teal); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-l);
  margin-bottom: env(safe-area-inset-bottom);
  transition: transform .2s cubic-bezier(.16,1,.3,1), filter .2s;
}
.chatknop svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chatknop:hover { transform: scale(1.06); filter: brightness(1.05); }
.chatknop:active { transform: scale(.97); }

/* Start als cockpit, stap 0 #9: op de telefoon staat de DM-knop naast het zoekvak, in dezelfde onderbalk */
@media (max-width: 759px) {
  .chatknop { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: 52px; height: 48px; border-radius: var(--r3); margin-bottom: 0; }
}

/* ---------- 9. Mia DM-paneel (iframe) -------------------------------------- */
.dm-paneel {
  position: fixed; right: 16px; bottom: 16px; z-index: 72;
  width: 400px; height: min(640px, calc(100dvh - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r2);
  box-shadow: var(--sh-l);
  animation: dm-in .24s cubic-bezier(.16,1,.3,1);
}
@keyframes dm-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dm-paneel.groot { width: min(760px, calc(100vw - 32px)); height: min(880px, calc(100dvh - 32px)); }
.dm-kop {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--lijn); flex: none;
}
.dm-kop .dm-logo { display: flex; }
.dm-kop .dm-logo svg { width: 26px; height: 26px; }
.dm-kop .dm-titel { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-kop .dm-titel b { font-size: 14px; font-weight: 600; color: var(--inkt); }
.dm-kop .dm-titel small { font-size: 11px; color: var(--inkt3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-kop .ik {
  position: relative; width: 32px; height: 32px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--r1); color: var(--inkt2);
  transition: background .18s, color .18s;
}
.dm-kop .ik:hover { background: var(--vlak2); color: var(--inkt); }
.dm-kop .ik svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dm-lijf { position: relative; flex: 1; min-height: 0; background: var(--vlak2); }
#dm-frame { width: 100%; height: 100%; border: none; display: block; background: var(--vlak); }
.dm-laden, .dm-fout {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--vlak); color: var(--inkt2); font-size: 13px; text-align: center; padding: 24px;
}
.dm-fout b { color: var(--inkt); font-size: 15px; }
.dm-fout button {
  margin-top: 6px; height: 36px; padding: 0 16px; border: 1px solid var(--teal); border-radius: var(--r1);
  background: var(--teal); color: #fff; font: 500 13px var(--f); cursor: pointer;
}
.dm-fout button:hover { filter: brightness(1.06); }
.dm-puls {
  width: 14px; height: 14px; border-radius: 50%; background: var(--teal);
  animation: dm-puls 1.4s ease-in-out infinite;
}
@keyframes dm-puls { 0%,100% { transform: scale(.75); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }

@media (max-width: 759px) {
  .dm-paneel, .dm-paneel.groot {
    right: 8px; left: 8px; bottom: 8px; width: auto;
    height: min(78dvh, 640px);
  }
}

/* Strak: widget = gewoon vlak, geen glas */
.home-widget { background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r3); box-shadow: var(--sh-s); color: var(--inkt); }
.widget-proxy { background: var(--vlak); color: var(--inkt); border-color: var(--lijn2); box-shadow: var(--sh-l); }
.widget-menu .wm-maat.on { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }

/* Strak: widget = gewoon vlak, geen glas */
.home-widget { background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r3); box-shadow: var(--sh-s); color: var(--inkt); }
.widget-proxy { background: var(--vlak); color: var(--inkt); border-color: var(--lijn2); box-shadow: var(--sh-l); }
.widget-menu .wm-maat.on { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.widget-tip { background: var(--vlak); color: var(--inkt); border-color: var(--lijn2); box-shadow: var(--sh-l); }
.widget-tip button[data-k="maat"] { background: var(--teal); }

/* ---------- homescreen-widgets v2 (greep, maten, slepen) ---------- */
.home-widget { position: relative; min-width: 0; align-self: start; border-radius: 20px; overflow: hidden; }
.home-widget iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.home-widget.drag-ghost { opacity: .35; }
body.reordering .home-widget iframe { pointer-events: none; }
.hw-grip {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 28px; height: 28px; border-radius: 8px; padding: 0;
  display: grid; place-items: center; cursor: grab; touch-action: none;
  border: 0; background: transparent; color: currentColor; opacity: .38;
  transition: opacity .15s, background .15s;
}
.hw-grip svg { width: 16px; height: 16px; fill: currentColor; }
.home-widget:hover .hw-grip, .hw-grip:focus-visible { opacity: .9; background: rgba(127,127,127,.12); }
.hw-grip:focus-visible { outline: 2px solid var(--accent, #0E6E73); outline-offset: 1px; }
@media (hover: none) { .hw-grip { opacity: .7; width: 34px; height: 34px; top: 6px; right: 6px; } }
.widget-proxy {
  position: fixed; z-index: 999; pointer-events: none; border-radius: 16px;
  display: grid; place-items: center; font-size: 13px; font-weight: 500;
  background: var(--glass-strong, #fff); box-shadow: 0 18px 40px rgba(0,0,0,.18);
  border: 1px solid rgba(127,127,127,.2); color: var(--text, #1A2124);
}
.widget-menu .wm-maten { display: grid; grid-auto-flow: column; gap: 6px; padding: 4px 8px 8px; }
.widget-menu .wm-maat {
  display: grid; justify-items: center; gap: 6px; padding: 8px 6px; border-radius: 10px;
  border: 1px solid rgba(127,127,127,.22); background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer;
}
.widget-menu .wm-maat.on { border-color: var(--accent, #0E6E73); box-shadow: inset 0 0 0 1px var(--accent, #0E6E73); }
.widget-menu .wm-maat:focus-visible { outline: 2px solid var(--accent, #0E6E73); outline-offset: 2px; }
.wm-vorm { display: block; border-radius: 3px; border: 1.5px solid currentColor; opacity: .7; }
.wm-s { width: 14px; height: 14px; } .wm-m { width: 21px; height: 14px; } .wm-l { width: 28px; height: 21px; }
.widget-tip {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 900;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; max-width: min(560px, calc(100vw - 24px));
  padding: 12px 12px 12px 16px; border-radius: 14px; font-size: 14px;
  background: var(--glass-strong, #fff); color: var(--text, #1A2124);
  border: 1px solid rgba(127,127,127,.22); box-shadow: 0 16px 40px rgba(0,0,0,.16);
  animation: wtIn .22s ease-out;
}
.widget-tip.weg { opacity: 0; transform: translate(-50%, -8px); transition: opacity .18s, transform .18s; }
@keyframes wtIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translateX(-50%); } }
.widget-tip .wt-tekst { flex: 1 1 220px; }
.widget-tip .wt-knoppen { display: flex; gap: 6px; align-items: center; }
.widget-tip button { height: 34px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid rgba(127,127,127,.3); background: transparent; color: inherit; white-space: nowrap; }
.widget-tip button[data-k="maat"] { background: var(--accent, #0E6E73); border-color: transparent; color: #fff; }
.widget-tip .wt-x { width: 34px; padding: 0; font-size: 18px; font-weight: 400; border-color: transparent; }
.widget-tip button:focus-visible { outline: 2px solid var(--accent, #0E6E73); outline-offset: 2px; }
.home-widget.hw-nieuw { animation: hwNieuw 1.4s ease-out 3; }
@keyframes hwNieuw { 0% { box-shadow: 0 0 0 0 rgba(14,110,115,.45); } 100% { box-shadow: 0 0 0 14px rgba(14,110,115,0); } }
@media (prefers-reduced-motion: reduce) { .widget-tip, .home-widget.hw-nieuw { animation: none; } }
.widget-menu .wm-hint { padding: 0 12px 8px; font-size: 11.5px; opacity: .65; max-width: 260px; line-height: 1.4; }
/* Strak: widget = gewoon vlak, geen glas */
.home-widget { background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r3); box-shadow: var(--sh-s); color: var(--inkt); }
.widget-proxy { background: var(--vlak); color: var(--inkt); border-color: var(--lijn2); box-shadow: var(--sh-l); }
.widget-menu .wm-maat.on { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.widget-tip { background: var(--vlak); color: var(--inkt); border-color: var(--lijn2); box-shadow: var(--sh-l); }
.widget-tip button[data-k="maat"] { background: var(--teal); }
