  :root {
    --blue: #123C69;
    --teal: #2A9D8F;
    --mint: #A8DADC;
    --amber: #F4B942;
    --ivory: #FAFAF7;
    --line: #d7dde3;
    --blue-soft: #3d5a7a;
    --blue-muted: #5b7590;
    --danger: #b3261e;
    --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }
  *, *::before, *::after { box-sizing: border-box; border-radius: 0; }
  [hidden] { display: none !important; }
  html, body {
    margin: 0; height: 100%; overflow: hidden;
    background: #cfd8df; font-family: var(--font); color: var(--blue);
    -webkit-tap-highlight-color: transparent;
  }
  button { font: inherit; color: inherit; }
  button:focus-visible, input:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

  #app { position: fixed; inset: 0; }
  #app canvas { display: block; width: 100%; height: 100%; touch-action: none; }
  body.playing #app canvas { cursor: grab; }
  body.playing #app canvas:active { cursor: grabbing; }

  /* ---------- Logo ---------- */
  .logo { width: 36px; height: 36px; background: var(--blue); position: relative; flex: none; }
  .logo::after { content: ''; position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; background: var(--amber); }

  /* ---------- Login ---------- */
  #login {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(380px, 100%);
    background: var(--ivory); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; justify-content: center;
    padding: 40px 32px calc(40px + env(safe-area-inset-bottom));
  }
  #login h1 { font-size: 26px; font-weight: 500; line-height: 1.25; margin: 22px 0 0; }
  #login p { font-size: 15px; line-height: 1.6; color: var(--blue-soft); margin: 10px 0 26px; }
  #gbtn { min-height: 44px; }
  #login .note { font-size: 12px; color: var(--blue-muted); margin-top: 14px; }
  .err { font-size: 14px; color: var(--danger); margin-top: 10px; min-height: 0; }
  .err:empty { display: none; }
  #loginBusy { font-size: 14px; color: var(--blue-soft); margin-top: 10px; }

  /* ---------- Visitekaartje v2 (voorbeeld én pop-up) ---------- */
  .bizcard { width: 100%; max-width: 300px; background: #fff; border-bottom: 4px solid var(--amber); color: var(--blue); }
  /* v241: geen blauwe kopbalk meer; de foto staat op wit naast de tekst, het kruisje grijs rechtsboven */
  .bc-top { position: relative; height: 0; }
  .bc-top button { position: absolute; right: 4px; top: 4px; z-index: 1; width: 32px; height: 32px; border: none; background: none; color: var(--blue-soft); font-size: 18px; cursor: pointer; }
  .bc-top button:hover { color: var(--blue); }
  .bc-id { display: flex; align-items: flex-start; gap: 12px; padding: 16px 14px 0; }
  .bc-id .ph-box { width: 64px; height: 64px; font-size: 22px; }
  .bc-id .tx { min-width: 0; flex: 1; padding-right: 22px; }
  .bc-st { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: var(--teal); }
  .bc-st .qw-stars { font-size: 13px; }
  .bc-since { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 11px; color: var(--blue-soft); }
  .bc-since .ti { font-size: 12px; }
  .bc-nm { font: 500 17px 'Space Grotesk', var(--font); overflow-wrap: anywhere; }
  .bc-sub { font-size: 12px; color: var(--blue-soft); overflow-wrap: anywhere; }
  .bc-logo-s { width: 28px; height: 28px; margin-left: auto; margin-top: 26px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; flex: none; }
  .bc-logo-s img { max-width: 24px; max-height: 24px; display: block; }
  .bc-match { margin: 12px 14px 0; padding: 9px 11px; background: #e3f3f1; color: #0f5d54; font-size: 13px; line-height: 1.35; display: flex; gap: 10px; align-items: center; }
  .bc-match b { font: 500 22px 'Space Grotesk', var(--font); color: var(--teal); }
  .bc-desc { padding: 10px 14px 0; font-size: 13px; line-height: 1.5; color: var(--blue-soft); overflow-wrap: anywhere; }
  .bc-tags { padding: 10px 14px 12px; display: flex; flex-wrap: wrap; gap: 5px; }
  .bc-tag { font-size: 11px; padding: 3px 8px; border: 1px solid #d7dde3; background: #fff; display: inline-flex; gap: 3px; align-items: center; }
  .bc-tag.s { background: var(--teal); border-color: var(--teal); color: var(--ivory); }
  .bc-empty { padding: 12px 14px; font-size: 13px; color: var(--blue-muted); }
  .bc-foot { display: flex; border-top: 1px solid var(--line); }
  .bc-foot a, .bc-foot button, .bc-foot span {
    flex: 1; min-width: 0; height: 42px; border: none; background: var(--ivory); font-size: 14px;
    display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; cursor: pointer;
    padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .bc-foot > * + * { border-left: 1px solid var(--line); }
  .bc-foot.primary button:first-child { background: var(--blue); color: var(--ivory); }
  .bc-foot.primary button:first-child:hover { background: #1a4b80; }
  .bc-foot a, .bc-foot span { color: var(--teal); }
  .bc-foot span { justify-content: flex-start; cursor: default; }
  .bc-foot button { color: var(--blue); }
  .bc-foot a:hover, .bc-foot button:hover { background: #eef3f5; }
  #bizPop { position: fixed; z-index: 20; width: min(300px, calc(100vw - 24px)); max-width: none; }
  .bc-loading { padding: 18px 14px; font-size: 14px; color: var(--blue-soft); }

  #cDesc { width: 100%; height: 80px; resize: none; border: 1px solid var(--blue); background: #fff; color: var(--blue); font: inherit; font-size: 14px; line-height: 1.45; padding: 8px 10px; }
  .btn-text { background: none; border: none; color: var(--blue-soft); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 0; }
  .note { font-size: 13px; color: var(--blue-muted); line-height: 1.4; }

  /* ---------- HUD ---------- */
  #place { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; display: flex; }
  #place .a { background: var(--blue); color: var(--ivory); padding: 8px 12px; font-size: 14px; font-weight: 500; }
  #place .b { background: var(--ivory); color: var(--blue); padding: 8px 12px; font-size: 14px; }

  #topRight { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; display: flex; border: 1px solid var(--line); }
  .tb {
    height: 36px; padding: 0 12px; background: var(--ivory); color: var(--blue);
    border: none; border-left: 1px solid var(--line); font-size: 14px; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
  }
  .tb:first-child { border-left: none; }
  .tb i { font-size: 18px; }

  /* ---------- Taal: vlaggetjes NL · EN · DE (bovenbalk en inlogscherm) ---------- */
  .lang-flags { display: flex; flex: none; }
  .lang-fl {
    position: relative; width: 40px; height: 36px; padding: 0; border: none; border-left: 1px solid var(--line);
    background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  }
  .lang-fl svg { display: block; width: 22px; height: 14px; opacity: 0.45; transition: opacity 0.15s; }
  .lang-fl:hover svg, .lang-fl:focus-visible svg, .lang-fl[aria-pressed="true"] svg { opacity: 1; }
  .lang-fl[aria-pressed="true"]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; background: var(--teal); }
  .lang-fl:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
  #login .lang-flags { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; border: 1px solid var(--line); }
  #login .lang-fl:first-child { border-left: none; }

  #help {
    position: fixed; top: calc(max(12px, env(safe-area-inset-top)) + 46px); right: 12px;
    width: min(300px, calc(100vw - 24px)); background: var(--ivory); border: 1px solid var(--line);
    padding: 14px 16px; font-size: 14px; line-height: 1.55;
  }
  #help h2 { margin: 0 0 8px; font-size: 15px; font-weight: 500; }
  #help dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
  #help dt { font-weight: 500; white-space: nowrap; }
  #help dd { margin: 0; color: var(--blue-soft); }

  #bar {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(820px, calc(100vw - 24px));
    display: flex; border: 1px solid var(--line); background: var(--ivory);
  }
  .hb {
    flex: 1; min-width: 0; height: 56px; border: none; border-left: 1px solid var(--line);
    background: var(--ivory); color: var(--blue); font-size: 13px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  }
  .hb:first-child { border-left: none; }
  .hb i { font-size: 20px; }
  .hb:hover { background: #eef3f5; }
  .hb[aria-pressed="true"] { background: var(--teal); color: var(--ivory); }
  .hb { position: relative; }
  .hb .dot { position: absolute; top: 8px; right: calc(50% - 17px); width: 9px; height: 9px; background: var(--amber); }
  .hb .hbn { position: absolute; top: 6px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; background: var(--amber); color: var(--blue); font-size: 11px; font-weight: 500; line-height: 18px; text-align: center; }
  .hb.strong { flex: 0 0 72px; background: var(--blue); color: var(--ivory); }
  .hb.strong:hover { background: #1a4b80; }
  @media (max-width: 600px) {
    .hb span { display: none; }
    .hb { height: 48px; }
    .hb.strong { flex: 0 0 52px; }
    .tb span { display: none; }
  }

  /* ---------- Profiel-hub ---------- */
  #hub { position: fixed; inset: 0; z-index: 12; background: rgba(18, 60, 105, 0.35); display: grid; place-items: center; padding: 16px; }
  .hub-win {
    width: min(1100px, 100%); height: min(700px, calc(100vh - 32px)); height: min(700px, calc(100dvh - 32px));
    background: #fff; display: flex; flex-direction: column; overflow: hidden;
  }
  .hub-bar { position: relative; flex: none; background: var(--blue); padding: 12px 10px 0 16px; display: flex; align-items: flex-end; gap: 4px; }
  .hub-bar .hub-tab, .hub-bar .hub-tab:hover, .hub-bar .hub-tab:focus, .hub-bar .hub-tab:active {
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: none;
  }
  .hub-tab {
    position: relative; z-index: 2; height: 46px; padding: 0 18px; background: rgba(168, 218, 220, 0.16); color: var(--mint);
    font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 7px; white-space: nowrap;
    transition: color 0.35s ease, background 0.25s ease;
  }
  .hub-tab:hover { background: rgba(168, 218, 220, 0.26); color: var(--ivory); }
  .hub-bar .hub-tab[aria-selected="true"], .hub-bar .hub-tab[aria-selected="true"]:hover { background: transparent; color: var(--blue); font-weight: 500; }
  .hub-bar .hub-tab:focus-visible { box-shadow: inset 0 -2px 0 var(--amber) !important; }
  .hub-tab i { font-size: 17px; }
  .hub-n { background: var(--amber); color: var(--blue); font-size: 10px; font-weight: 500; line-height: 16px; padding: 0 5px; }
  .hub-sheet {
    position: absolute; z-index: 1; bottom: 0; left: 0; width: 0; height: 46px; background: #fff;
    transition: transform 0.45s cubic-bezier(.65, 0, .35, 1), width 0.45s cubic-bezier(.65, 0, .35, 1);
  }
  .hub-sheet::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--amber); }
  .hub-sheet.instant { transition: none; }
  #hubHome { margin-left: auto; align-self: center; margin-bottom: 4px; height: 36px; padding: 0 14px; border: 1px solid rgba(250,250,247,.45); border-radius: 18px; background: none; color: var(--ivory); font: inherit; font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
  #hubHome:hover { background: rgba(250,250,247,.12); }
  #hubHome i { font-size: 18px; }
  @media (max-width: 600px) { #hubHome span { display: none; } #hubHome { padding: 0 10px; } }
  #hubClose { margin-left: 4px; align-self: center; margin-bottom: 4px; width: 40px; height: 40px; border: none; background: none; color: var(--ivory); font-size: 20px; cursor: pointer; }
  .hub-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
  .hub-pane { position: absolute; inset: 0; display: flex; background: #fff; transition: transform 0.5s cubic-bezier(.65, 0, .35, 1), opacity 0.4s ease; }
  .hub-pane.off-l { transform: translateX(-40px); opacity: 0; pointer-events: none; }
  .hub-pane.off-r { transform: translateX(40px); opacity: 0; pointer-events: none; }
  @media (prefers-reduced-motion: reduce) { .hub-sheet, .hub-pane { transition: none; } }
  .hub-col { border-right: 1px solid #e6eaee; padding: 18px; min-width: 0; flex: none; }
  .hub-col h3, .hub-aside h3 { margin: 0 0 12px; font: 500 16px 'Space Grotesk', var(--font); }
  .hub-aside { flex: 1; background: #f6f8fa; min-width: 0; display: flex; flex-direction: column; margin: 12px; border-radius: 14px; overflow: hidden; }
  .hub-foot { flex: none; height: 62px; display: flex; align-items: center; gap: 6px; padding: 0 16px; }
  #hubStatus { flex: 1; font-size: 13px; color: var(--blue-muted); display: flex; align-items: center; gap: 7px; }
  #hubStatus .sq { width: 8px; height: 8px; background: var(--amber); }
  #hubStatus.err { color: var(--danger); }
  .hb2 { height: 40px; padding: 0 16px; border: none; border-radius: 999px; background: transparent; color: var(--blue); font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
  .hb2:hover { background: #f4f7f9; }
  .hb2.primary { background: var(--amber); border-color: var(--amber); font-weight: 500; padding: 0 24px; }
  .hb2:disabled { opacity: 0.6; cursor: wait; }
  .hb3 { height: 32px; padding: 0 10px; border: 1px solid var(--blue); background: #fff; color: var(--blue); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; flex: none; }
  .hb3.fill { background: var(--blue); color: var(--ivory); }
  .hb3.amber { background: var(--amber); border-color: var(--amber); font-weight: 500; }
  .hb3.icon { width: 32px; padding: 0; justify-content: center; }
  .hb3[disabled] { opacity: 0.6; cursor: default; }

  /* Avatar-tab: clean, zonder kaders */
  .hub-nav { width: 158px; flex: none; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
  .wd-rb {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 12px; border: none; border-radius: 10px;
    background: transparent; color: #5f7287; font-size: 13px; cursor: pointer; text-align: left; transition: background 0.2s, color 0.2s;
  }
  .wd-rb i { font-size: 17px; }
  .wd-rb { white-space: nowrap; }
  .wd-rb:hover { color: var(--blue); }
  .wd-rb[aria-selected="true"] { background: #f1f4f8; color: var(--blue); font-weight: 500; }
  .wd-new { font-size: 10px; font-weight: 500; background: #fdf0d2; color: #7a5408; padding: 1px 6px; border-radius: 999px; margin-left: auto; }
  .hub-opts { width: 320px; flex: none; padding: 18px 20px; overflow-y: auto; }
  .hub-opts h3 { margin: 0 0 14px; font: 500 16px 'Space Grotesk', var(--font); }
  #hubView { flex: 1; min-height: 0; cursor: grab; touch-action: none; }
  #hubView:active { cursor: grabbing; }
  #hubView canvas { display: block; }
  .hub-hint { padding: 8px 14px; font-size: 12px; color: var(--blue-muted); display: flex; justify-content: space-between; }
  .wd-lb { font-size: 12px; color: #8a9bb0; margin: 0 0 6px; display: flex; justify-content: space-between; }
  .wd-tiles, .wd-segs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
  .wd-tile, .wd-seg {
    height: 34px; padding: 0 13px; border: none; border-radius: 999px; background: transparent; color: #33475b; font-size: 13px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s, color 0.15s;
  }
  .wd-tile i { font-size: 16px; color: #7b8ea3; }
  .wd-tile:hover, .wd-seg:hover { background: #f4f6f9; }
  .wd-tile[aria-pressed="true"], .wd-seg[aria-pressed="true"] { background: #e6edf5; color: var(--blue); font-weight: 500; }
  .wd-tile[aria-pressed="true"] i { color: var(--blue); }

  /* Stijltegels met voxel-plaatje (kapsels, kleding, schoenen, accessoires) */
  .wd-tiles.thumbs { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 6px; }
  .wd-tiles.thumbs .wd-tile {
    height: auto; padding: 4px 4px 7px; border-radius: 10px; flex-direction: column; gap: 2px;
    background: #f6f8fa; font-size: 12px; min-width: 0;
  }
  .wd-tiles.thumbs .wd-tile:hover { background: #eef2f6; }
  .wd-tiles.thumbs .wd-tile[aria-pressed="true"] { background: #e6edf5; }
  .wd-tiles.thumbs .wd-tile img { width: 100%; aspect-ratio: 1; display: block; pointer-events: none; }
  .wd-tiles.thumbs .wd-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .wd-tiles.thumbs .wd-tile i { font-size: 22px; margin: 14px 0 8px; }
  .wd-sws { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
  .wd-sw { width: 26px; height: 26px; border: none; border-radius: 50%; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
  .wd-sw.light { box-shadow: inset 0 0 0 1px #c9d1d9; }
  .wd-sw[aria-pressed="true"] { outline: 2px solid var(--blue); outline-offset: 2px; }
  /* Van foto */
  .wd-txt { font-size: 13px; line-height: 1.6; color: var(--blue-soft); margin: 0 0 14px; }
  .wd-drop {
    width: 100%; border: none; border-radius: 14px; background: #f6f8fa; padding: 22px 14px; cursor: pointer; font: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--blue); font-size: 14px; font-weight: 500;
  }
  .wd-drop:hover { background: #eef2f6; }
  .wd-drop i { font-size: 26px; }
  .wd-drop small { font-size: 12px; font-weight: 400; color: var(--blue-muted); }
  .wd-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--blue-soft); margin: 14px 0 4px; cursor: pointer; }
  .wd-check input, .wd-row input { accent-color: var(--blue); margin-top: 3px; flex: none; }
  .wd-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; color: var(--blue); cursor: pointer; }
  .wd-row input { margin-top: 0; }
  .wd-row .k { color: var(--blue-muted); min-width: 96px; }
  .wd-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
  .wd-steps > div { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 5px 0; color: #9aa8b6; }
  .wd-steps > div.done { color: var(--blue); }
  .wd-steps > div.done i { color: var(--teal); }
  .wd-spin { display: inline-block; animation: wdspin 1s linear infinite; }
  @keyframes wdspin { to { transform: rotate(360deg); } }
  .wd-act { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
  .wd-btn { height: 36px; padding: 0 16px; border: none; border-radius: 999px; background: var(--blue); color: var(--ivory); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
  .wd-btn.ghost { background: transparent; color: var(--blue); }
  .wd-btn.ghost:hover { background: #f4f7f9; }
  .wd-in, .hub-in {
    width: 100%; height: 38px; border: 1px solid #e6eaee; border-radius: 8px; background: #fff; color: var(--blue); font: inherit; font-size: 14px; padding: 0 10px;
  }
  .wd-in:focus, .hub-in:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
  .wd-range { width: 100%; accent-color: var(--blue); margin: 2px 0 14px; }

  /* Zakelijk profiel */
  .hub-field { margin-bottom: 12px; }
  textarea.hub-in { height: 72px; padding: 8px 10px; resize: none; line-height: 1.45; }
  .chip2 {
    height: 30px; padding: 0 10px; border: 1px solid #e1e6ea; background: #fff; color: var(--blue); font-size: 13px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px; margin: 0 5px 6px 0;
  }
  .chip2[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--ivory); }
  .ph-box { position: relative; display: grid; place-items: center; flex: none; background: var(--teal); color: var(--ivory); font-weight: 500; overflow: hidden; }
  .ph-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .ph-box.mark::after { content: ''; position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; background: var(--amber); }
  .ph-dot { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; background: var(--teal); border: 2px solid #fff; }

  /* Netwerk & berichten */
  .prow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef1f4; }
  .prow .pn { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
  .prow .ps { font-size: 12px; color: var(--blue-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pcard { background: #fff; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
  .stag { font-size: 11px; padding: 2px 7px; background: var(--teal); color: var(--ivory); display: inline-block; margin: 4px 4px 0 0; }
  .empty { font-size: 14px; color: var(--blue-muted); line-height: 1.55; padding: 10px 0; }
  .hm-thread {
    display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 14px; border: none; border-left: 3px solid transparent;
    background: #fff; color: var(--blue); text-align: left; cursor: pointer;
  }
  .hm-thread:hover { background: #f7f9fa; }
  .hm-thread[aria-selected="true"] { border-left-color: var(--amber); background: #f2f5f7; }
  .hm-row { display: flex; }
  .hm-row.me { justify-content: flex-end; }
  .hm-bub { max-width: 72%; font-size: 14px; line-height: 1.45; padding: 8px 11px; background: #fff; overflow-wrap: anywhere; }
  .hm-row.me .hm-bub { background: var(--blue); color: var(--ivory); }

  @media (max-width: 760px) {
    #hub { padding: 0; }
    .hub-win { width: 100%; height: 100%; }
    .hub-tab { padding: 0 13px; }
    .hub-tab span.lbl { display: none; }
    .hub-pane { flex-direction: column; overflow-y: auto; }
    .hub-col, .hub-opts { width: auto !important; border-right: none; border-bottom: 1px solid #e6eaee; overflow: visible; }
    .hub-opts { border-bottom: none; }
    .hub-nav { width: auto; flex-direction: row; overflow-x: auto; padding: 8px; }
    .wd-rb { width: auto; flex: none; }
    .hub-aside { margin: 0 12px 12px; }
    #hubView { min-height: 300px; flex: none; }
    .hub-aside { min-height: 320px; flex: none; }
  }

  /* ---------- Emoji-keuze ---------- */
  #emojiPick { position: fixed; z-index: 15; display: flex; background: var(--ivory); border: 1px solid var(--line); }
  #emojiPick button { width: 52px; height: 52px; border: none; border-left: 1px solid var(--line); background: var(--ivory); font-size: 26px; cursor: pointer; }
  #emojiPick button:first-child { border-left: none; }
  #emojiPick button:hover { background: #eef3f5; }

  /* ---------- Dansmenu: wit, geen kaders om de opties ---------- */
  #dancePick { position: fixed; z-index: 15; width: 250px; background: #fff; padding: 6px 0; }
  #dancePick button {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px;
    border: 0 !important; border-left: 3px solid transparent !important; border-radius: 0 !important; box-shadow: none !important;
    background: #fff; color: var(--blue); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  }
  #dancePick button:hover, #dancePick button:focus-visible { background: #f4f7f9; outline: none; }
  #dancePick button[aria-checked="true"] { border-left-color: var(--amber) !important; background: #f4f7f9; font-weight: 500; }
  #dancePick i { font-size: 20px; width: 22px; text-align: center; }
  #dancePick small { display: block; font-size: 12px; color: var(--blue-muted); font-weight: 400; }
  #dancePick kbd { margin-left: auto; font: inherit; font-size: 11px; color: #8a97a5; }
  @media (pointer: coarse) { #dancePick kbd { display: none; } }

  /* ---------- Chat ---------- */
  #chat {
    position: fixed; z-index: 5; left: 12px;
    top: calc(max(12px, env(safe-area-inset-top)) + 46px);
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px);
    width: 300px; background: var(--ivory); border: 1px solid var(--line);
    display: flex; flex-direction: column;
  }
  .ch-tabs { background: var(--blue); display: flex; }
  .ch-tab {
    flex: 1; height: 44px; border: none; background: transparent; color: var(--mint); font-size: 14px; cursor: pointer;
    border-bottom: 3px solid transparent; display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .ch-tab[aria-selected="true"] { color: var(--ivory); border-bottom-color: var(--amber); }
  .ch-badge { background: var(--amber); color: var(--blue); font-size: 11px; font-weight: 500; padding: 1px 5px; }
  .ch-body { flex: 1; overflow-y: auto; padding: 6px 0; overscroll-behavior: contain; }
  .ch-note { font-size: 12px; color: var(--blue-muted); padding: 4px 12px 8px; }
  .ch-msg { padding: 5px 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
  .ch-msg b { font-weight: 500; margin-right: 4px; }
  .ch-msg b.me { color: var(--teal); }
  .ch-empty { padding: 18px 14px; font-size: 14px; color: var(--blue-muted); line-height: 1.5; }
  .ch-compose { display: flex; border-top: 1px solid var(--line); }
  #chatInput { flex: 1; min-width: 0; height: 46px; border: none; background: #fff; color: var(--blue); font: inherit; font-size: 15px; padding: 0 10px; }
  #chatSend { width: 50px; height: 46px; border: none; background: var(--blue); color: var(--ivory); font-size: 18px; cursor: pointer; }
  #chatErr { font-size: 12px; color: var(--danger); padding: 0 10px; }
  #chatErr:empty { display: none; }
  @media (max-width: 600px) {
    #chat { right: 12px; width: auto; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 62px); }
  }

  /* ---------- Spraak ---------- */
  #micIntro {
    position: fixed; z-index: 16; left: 50%; transform: translateX(-50%);
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 78px);
    width: min(360px, calc(100vw - 24px)); background: var(--ivory); border: 1px solid var(--line); padding: 14px;
  }
  #micIntro .mi-top { display: flex; gap: 10px; align-items: flex-start; }
  #micIntro .mi-top i { font-size: 22px; color: var(--teal); }
  #micIntro h3 { margin: 0; font-size: 15px; font-weight: 500; }
  #micIntro p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--blue-soft); }
  #micIntro .mi-btns { display: flex; margin-top: 12px; border: 1px solid var(--blue); }
  #micIntro .mi-btns button { flex: 1; height: 40px; border: none; font-size: 14px; cursor: pointer; }
  #micYes { background: var(--amber); color: var(--blue); font-weight: 500; }
  #micNo { background: var(--ivory); color: var(--blue); border-left: 1px solid var(--blue) !important; }
  #toast {
    position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 78px);
    width: max-content; max-width: calc(100vw - 24px);
    background: var(--blue); color: var(--ivory); font-size: 14px; line-height: 1.45; padding: 10px 14px;
    border-bottom: 3px solid var(--amber);
  }

  #stick {
    position: fixed; left: 22px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px);
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(18, 60, 105, 0.35); border: 2px solid var(--ivory);
    touch-action: none; display: none;
  }
  #knob {
    position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px;
    border-radius: 50%; background: var(--amber); border: 3px solid var(--ivory); pointer-events: none;
  }
  @media (pointer: coarse) { body.playing #stick { display: block; } }

  /* ---------- Laden ---------- */
  #loading {
    position: fixed; inset: 0; display: grid; place-items: center;
    background: var(--blue); color: var(--ivory); font-size: 16px; transition: opacity .4s;
  }
  #loading.done { opacity: 0; pointer-events: none; }
  #loading .spin { width: 28px; height: 28px; margin: 0 auto 16px; background: var(--amber); animation: spin 1.2s steps(4) infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { #loading .spin { animation: none; } }

  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* Ruimtes */
  #spView { flex: 1; min-height: 0; cursor: grab; touch-action: none; }
  #spView:active { cursor: grabbing; }
  #spView canvas { display: block; }
  .sp-empty { background: #f6f8fa; border-radius: 14px; padding: 26px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--blue); }
  .sp-empty i { font-size: 28px; }
  .sp-empty strong { font-size: 14px; font-weight: 500; margin-top: 4px; }
  .sp-empty span { font-size: 12px; color: var(--blue-muted); margin-bottom: 12px; }
  .sp-url { font-size: 12px; color: var(--blue-muted); margin: 6px 0 4px; overflow-wrap: anywhere; }
  .sp-url b { color: var(--blue); font-weight: 500; }
  .sp-link { display: flex; align-items: center; gap: 8px; background: #f6f8fa; border-radius: 12px; padding: 6px 6px 6px 12px; margin: 4px 0 14px; color: var(--blue); }
  .sp-link span { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sp-line { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; padding: 3px 0; color: var(--blue); }
  .sp-line i { color: var(--teal); margin-top: 2px; }
  .sp-prompt { height: 110px; padding: 8px 10px; resize: none; line-height: 1.5; margin-bottom: 6px; }
  .wd-btn.amber { background: var(--amber); color: var(--blue); font-weight: 500; }
  .wd-btn.danger { color: var(--danger); }
  #hubPane_space .wd-lb { margin-top: 14px; }
/* ============================================================
   Winkel (Hoodie Lab): paneel bij het passen, Assets in het profiel
   ============================================================ */
#shopPanel {
  position: fixed; z-index: 9; right: 14px; top: calc(max(14px, env(safe-area-inset-top)) + 54px);
  width: min(290px, calc(100vw - 28px)); background: #fff; border-radius: 14px; padding: 16px; color: var(--blue);
}
#shopPanel button { font: inherit; }
.sp-head { display: flex; align-items: center; justify-content: space-between; }
.sp-kick { font-size: 12px; color: #6b7c8d; }
.sp-x { width: 30px; height: 30px; border: none; border-radius: 50%; background: transparent; color: var(--blue); font-size: 17px; cursor: pointer; }
.sp-x:hover { background: #f1f4f7; }
#shopPanel h3 { margin: 2px 0 4px; font: 500 20px 'Space Grotesk', var(--font); }
.sp-price { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--teal); }
.sp-note { font-size: 12px; color: #6b7c8d; margin-top: 4px; line-height: 1.5; }
.sp-lb { font-size: 12px; color: #6b7c8d; margin: 14px 0 7px; }
.sp-vars { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-var { width: 28px; height: 28px; border-radius: 50%; border: none; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.sp-var[aria-pressed="true"] { outline: 2px solid var(--blue); outline-offset: 2px; }
.sp-bal { font-size: 13px; margin: 14px 0 4px; color: #3d5a7a; }
.sp-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 44px; margin-top: 8px;
  border: none; border-radius: 22px; font-size: 14px; cursor: pointer;
}
.sp-btn.primary { background: var(--amber); color: var(--blue); font-weight: 500; }
.sp-btn.ghost { background: #eef2f6; color: var(--blue); }
.sp-btn:disabled { opacity: .55; cursor: default; }
.sp-ok { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #e3f3f1; color: #0f5d54; font-size: 13px; line-height: 1.45; }
.sp-warn { margin-top: 10px; font-size: 13px; color: var(--danger); }
@media (max-width: 600px) {
  #shopPanel { top: auto; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px); right: 12px; left: 12px; width: auto; }
}

#assetsPane { width: 100%; padding: 22px 26px; overflow: hidden; }
.as-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.as-head h3 { margin: 0; font: 500 19px 'Space Grotesk', var(--font); }
.as-bal { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; background: #fff6e0; color: #7a5a12; font-weight: 500; white-space: nowrap; }
.as-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.as-card { background: #f6f8fa; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.as-card img { width: 100%; max-width: 150px; aspect-ratio: 1; display: block; }
.as-name { font-size: 14px; font-weight: 500; }
.as-off { border: none; background: transparent; color: #6b7c8d; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.as-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 420px; font-size: 14px; color: #3d5a7a; line-height: 1.55; }
@media (max-width: 760px) { .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wd-outfit { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-bottom: 14px; border-radius: 10px; background: #fff6e0; font-size: 13px; color: #7a5a12; }

/* Pasvorm, cadeau geven en assets-acties */
.sp-fits { display: flex; gap: 4px; flex-wrap: wrap; }
.sp-fit { height: 32px; padding: 0 12px; border: none; border-radius: 16px; background: #f1f4f7; color: #33475b; font-size: 13px; cursor: pointer; }
.sp-fit:hover { background: #e9eef3; }
.sp-fit[aria-pressed="true"] { background: var(--blue); color: #fafaf7; font-weight: 500; }
.sp-fits.small .sp-fit { height: 26px; padding: 0 9px; font-size: 12px; }
.sp-btn.dark { background: var(--blue); color: #fafaf7; }
#giftDlg { position: fixed; inset: 0; z-index: 30; background: rgba(18, 60, 105, 0.35); display: grid; place-items: center; padding: 16px; }
#giftDlg[hidden] { display: none; }
.gd-box { width: min(380px, 100%); background: #fff; border-radius: 16px; padding: 18px; color: var(--blue); }
.gd-box h3 { margin: 0 0 2px; font: 500 19px 'Space Grotesk', var(--font); }
.gd-in { width: 100%; height: 38px; margin-top: 12px; border: 1px solid #e1e6ea; border-radius: 19px; padding: 0 14px; font: inherit; font-size: 14px; color: var(--blue); }
.gd-in:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.gd-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; min-height: 60px; }
.gd-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: none; border-radius: 10px; background: #fff; color: var(--blue); text-align: left; font: inherit; cursor: pointer; }
.gd-row:hover { background: #f4f7f9; }
.gd-row[aria-pressed="true"] { background: #e6edf5; }
.gd-row[aria-pressed="true"] i { color: var(--teal); font-size: 20px; }
.gd-row:disabled { opacity: 0.5; cursor: default; }
.gd-row .ph-box { border-radius: 8px; }
.gd-name { font-size: 14px; font-weight: 500; }
.as-gift { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #fff6e0; color: #7a5a12; }
.as-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.as-link { display: inline-flex; align-items: center; gap: 4px; border: none; background: transparent; color: #3d5a7a; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }

/* ============================================================
   Eager Business Wear: combineerpaneel en pakken in Assets
   ============================================================ */
#shopPanel.wide { width: min(370px, calc(100vw - 28px)); max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow: hidden; padding: 14px 16px; }
#shopPanel.wide h3 { margin: 0 0 8px; }
.sp-slot { margin-top: 10px; }
.sp-slot-head { display: flex; align-items: center; gap: 4px; font-size: 13px; margin-bottom: 5px; }
.sp-slot-head b { font-weight: 500; margin-right: 4px; }
.sp-slot-price { margin-left: auto; font-size: 12px; color: #6b7c8d; }
.sp-mini { height: 22px; padding: 0 8px; border: none; border-radius: 11px; background: #f1f4f7; color: #33475b; font: inherit; font-size: 11px; cursor: pointer; }
.sp-mini[aria-pressed="true"] { background: var(--blue); color: #fafaf7; }
.sp-mini.icon { width: 24px; padding: 0; display: grid; place-items: center; font-size: 14px; }
.sp-tiles { display: flex; gap: 5px; }
.sp-tile {
  position: relative; flex: 1; min-width: 0; max-width: 64px; padding: 2px 2px 4px; border: none; border-radius: 10px;
  background: #f6f8fa; color: #33475b; font: inherit; font-size: 11px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.sp-tile:hover { background: #eef2f6; }
.sp-tile[aria-pressed="true"] { background: #e6edf5; color: var(--blue); font-weight: 500; box-shadow: inset 0 0 0 2px var(--blue); }
.sp-tile img { width: 100%; aspect-ratio: 1; display: block; pointer-events: none; }
.sp-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sp-tile.none { justify-content: center; color: #6b7c8d; }
.sp-tile.none i { font-size: 18px; margin: 14px 0 6px; }
.sp-tile-sw { width: 34px; height: 34px; border-radius: 8px; margin: 8px 0 4px; }
.sp-owned { position: absolute; top: 3px; right: 3px; font-size: 14px; color: var(--teal); }
.sp-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; font-size: 13px; color: #3d5a7a; }
.sp-total b { font-size: 15px; color: var(--blue); }
.sp-tiles.big { flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.sp-tiles.big .sp-tile { flex: 0 0 82px; max-width: 82px; }
.sp-gift { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 13px; color: #3d5a7a; }
.sp-gift:hover { background: var(--amber); color: var(--blue); }
@media (max-height: 760px) { .sp-tile img { width: 80%; } #shopPanel.wide .sp-bal { display: none; } }

/* ============================================================
   Paskamer (winkels): witte modal, avatar links, kopen rechts
   ============================================================ */
#fitRoom { position: fixed; inset: 0; z-index: 28; background: rgba(18, 60, 105, 0.35); display: grid; place-items: center; padding: 16px; }
#fitRoom[hidden] { display: none; }
.fr-modal { width: min(920px, 100%); height: min(560px, calc(100vh - 32px)); height: min(560px, calc(100dvh - 32px)); background: #fff; border-radius: 18px; display: flex; overflow: hidden; }
.fr-stage { position: relative; flex: 1; min-width: 0; background: #fff; }
.fr-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.fr-tag { position: absolute; left: 18px; top: 16px; display: flex; gap: 6px; font-size: 13px; }
.fr-tag span { background: var(--blue); color: #fafaf7; padding: 4px 10px; border-radius: 6px; }
.fr-tag b { background: var(--amber); color: var(--blue); padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.fr-tag b[hidden] { display: none; }
.fr-anim { position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; display: flex; gap: 4px; background: #f1f4f7; padding: 4px; border-radius: 22px; }
.fr-anim button { height: 32px; padding: 0 13px; border: none; border-radius: 16px; background: transparent; color: #33475b; font: inherit; font-size: 13px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.fr-anim button[aria-pressed="true"] { background: #fff; color: var(--blue); font-weight: 500; }
.fr-panel { width: 310px; flex: none; padding: 22px 22px 18px; border-left: 1px solid #eef1f4; display: flex; flex-direction: column; overflow: hidden; color: var(--blue); }
.fr-panel h3 { margin: 6px 0 2px; font: 500 22px 'Space Grotesk', var(--font); }
.fr-panel .sp-bal { margin-top: auto; padding-top: 12px; }
.fr-panel button { font: inherit; }
@media (max-width: 760px) {
  .fr-modal { flex-direction: column; height: calc(100vh - 32px); height: calc(100dvh - 32px); }
  .fr-stage { flex: 1 1 45%; }
  .fr-panel { width: auto; border-left: none; border-top: 1px solid #eef1f4; padding: 14px 16px; }
  .fr-panel .sp-note:last-child { display: none; }
}
#giftDlg { z-index: 32; }

/* ============================================================
   Markt (tabblad in het profielscherm)
   ============================================================ */
#marketPane { display: flex; width: 100%; height: 100%; min-height: 0; }
.mk-nav { width: 190px; flex: none; padding: 14px 10px; border-right: 1px solid #eef1f4; }
.mk-nl { font-size: 11px; color: #8a97a5; margin: 12px 10px 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.mk-nl:first-child { margin-top: 2px; }
.mk-ni { display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; padding: 0 10px; border: none; border-radius: 9px; background: transparent; color: #33475b; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.mk-ni:hover { background: #f4f7f9; }
.mk-ni[aria-pressed="true"] { background: #eef2f6; color: var(--blue); font-weight: 500; }
.mk-ni i { font-size: 17px; }
.mk-c { margin-left: auto; font-size: 12px; color: #8a97a5; font-weight: 400; }
.mk-ni.soon { color: #a7b2bd; cursor: default; }
.mk-ni.soon:hover { background: transparent; }
.mk-ni.soon .mk-c { background: #f1f4f7; padding: 1px 7px; border-radius: 9px; }
.mk-main { flex: 1; min-width: 0; padding: 16px 20px; display: flex; flex-direction: column; }
.mk-top { display: flex; gap: 10px; align-items: center; }
.mk-search { position: relative; flex: 1; }
.mk-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8a97a5; }
.mk-search input { width: 100%; height: 38px; border: 1px solid #e1e6ea; border-radius: 19px; padding: 0 14px 0 36px; font: inherit; font-size: 14px; color: var(--blue); }
.mk-search input:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.mk-sort { height: 38px; border: none; border-radius: 19px; background: #f1f4f7; padding: 0 12px; font: inherit; font-size: 13px; color: #33475b; cursor: pointer; }
.mk-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.mk-grid .empty { grid-column: 1 / -1; color: #6b7c8d; font-size: 14px; padding: 20px 0; }
.mk-card { position: relative; min-height: 0; border: none; border-radius: 14px; background: #f6f8fa; padding: 8px 10px 10px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; font: inherit; color: var(--blue); cursor: pointer; overflow: hidden; }
.mk-card:hover { background: #eef2f6; }
.mk-card img { width: 100%; flex: 1; min-height: 0; object-fit: contain; display: block; pointer-events: none; }
.mk-n { font-size: 14px; font-weight: 500; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mk-s { font-size: 12px; color: #6b7c8d; }
.mk-p { font-size: 13px; color: var(--teal); font-weight: 500; margin-top: 2px; display: flex; align-items: center; gap: 3px; }
.mk-own { position: absolute; top: 10px; left: 10px; background: #e3f3f1; color: #0f5d54; font-size: 11px; padding: 2px 8px; border-radius: 9px; z-index: 1; }
.mk-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; color: #6b7c8d; }
.mk-pages { display: flex; gap: 4px; }
.mk-pages button { min-width: 32px; height: 32px; border: none; border-radius: 16px; background: #f1f4f7; color: #33475b; font: inherit; font-size: 13px; cursor: pointer; display: grid; place-items: center; }
.mk-pages button[aria-current="page"] { background: var(--blue); color: #fff; }
.mk-pages button:disabled { opacity: 0.4; cursor: default; }
.sp-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; border: none; background: transparent; color: #3d5a7a; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; align-self: center; }
@media (max-width: 760px) {
  #marketPane { flex-direction: column; }
  .mk-nav { width: auto; display: flex; gap: 4px; overflow-x: auto; border-right: none; border-bottom: 1px solid #eef1f4; padding: 8px; }
  .mk-nl { display: none; }
  .mk-ni { width: auto; white-space: nowrap; }
  .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); }
  .as-bal { display: none; }
}

/* ============================================================
   Taxirit (New York)
   ============================================================ */
#rideBar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 9;
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 74px);
  display: flex; gap: 4px; padding: 5px; background: #fff; border-radius: 24px; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center;
}
#rideBar[hidden] { display: none; }
#rideBar button { height: 36px; padding: 0 13px; border: none; border-radius: 18px; background: transparent; color: #33475b; font: inherit; font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
#rideBar button:hover { background: #f1f4f7; }
#rideBar button[aria-pressed="true"] { background: var(--blue); color: #fafaf7; }
#rideBar button.exit { background: var(--amber); color: var(--blue); font-weight: 500; }
#taxiBtn[aria-pressed="true"] { background: var(--amber) !important; }
@media (max-width: 600px) { #rideBar span { display: none; } #rideBar button { padding: 0 11px; } }

/* ============================================================
   Teleporteren
   ============================================================ */
#tpCard {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  top: calc(max(12px, env(safe-area-inset-top)) + 56px);
  width: min(360px, calc(100vw - 24px)); background: #fff; border-radius: 14px; padding: 14px; color: var(--blue);
  animation: tpIn .35s ease;
}
@keyframes tpIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { #tpCard { animation: none; } }
.tp-top { display: flex; gap: 10px; align-items: center; }
.tp-top .ph-box { border-radius: 8px; }
.tp-name { font-size: 15px; font-weight: 500; }
.tp-where { font-size: 12px; color: #6b7c8d; }
.tp-row { display: flex; gap: 6px; margin-top: 12px; }
.tp-row button { height: 40px; border: none; border-radius: 20px; font: inherit; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; }
.tp-yes { flex: 1; background: var(--amber); color: var(--blue); font-weight: 500; }
.tp-no { background: #f1f4f7; color: #33475b; }
.tp-bar { height: 4px; background: #eef2f6; border-radius: 2px; margin-top: 10px; overflow: hidden; }
.tp-bar i { display: block; height: 100%; width: 100%; background: var(--amber); transition: width .2s linear; }
.tp-flash { position: fixed; inset: 0; z-index: 60; pointer-events: none; background: radial-gradient(circle at 50% 55%, rgba(255,246,200,.95), rgba(244,185,66,.35) 35%, rgba(244,185,66,0) 70%); opacity: 1; transition: opacity .9s ease; }
.tp-flash.go { opacity: 0; }

/* ============================================================
   TV-laag (YouTube achter het 3D-beeld) en Mijn kamer
   ============================================================ */
#app > canvas { position: relative; z-index: 1; }
#css3d { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#css3d iframe { border: 0; }
#roomPanel {
  position: fixed; z-index: 9; right: 14px; top: calc(max(14px, env(safe-area-inset-top)) + 54px);
  width: min(320px, calc(100vw - 28px)); background: #fff; border-radius: 0; padding: 16px; color: var(--blue);
}
#roomPanel[hidden] { display: none; }
.rp-head { display: flex; align-items: center; justify-content: space-between; }
.rp-title { font: 500 18px 'Space Grotesk', var(--font); }
.rp-lb { font-size: 12px; color: #6b7c8d; margin: 14px 0 6px; }
.rp-lb b { color: var(--blue); }
#roomPanel input[type="range"] { width: 100%; accent-color: var(--blue); }
.rp-pills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.rp-pills .sp-fit { display: inline-flex; align-items: center; gap: 4px; }
.rp-url { display: flex; gap: 6px; }
.rp-url input { flex: 1; min-width: 0; height: 38px; border: 1px solid #e1e6ea; border-radius: 19px; padding: 0 13px; font: inherit; font-size: 13px; color: var(--blue); }
.rp-url input:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.rp-go { width: 38px; height: 38px; border: none; border-radius: 50%; background: var(--amber); color: var(--blue); font-size: 17px; cursor: pointer; display: grid; place-items: center; }
.rp-sync { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding: 8px 10px; border-radius: 10px; background: #e3f3f1; color: #0f5d54; font-size: 12px; }
#roomBtn[aria-pressed="true"] { background: var(--amber) !important; }
/* Meubels verplaatsen: witte balk bovenaan, vierkant, zonder kaders om de knoppen */
#furnBar {
  position: fixed; z-index: 9; left: 50%; transform: translateX(-50%); top: calc(max(14px, env(safe-area-inset-top)) + 54px);
  display: flex; align-items: center; gap: 2px; background: #fff; border-radius: 0; padding: 4px 4px 4px 14px; color: var(--blue);
  max-width: calc(100vw - 24px);
}
#furnBar[hidden] { display: none; }
.fb-status { font-size: 13px; color: #6b7c8d; margin-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fb-btn { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border: none; border-radius: 0; background: #fff; color: var(--blue); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.fb-btn:hover { background: #FAFAF7; }
.fb-btn.fb-ok { background: var(--blue); color: #FAFAF7; }
.fb-btn.fb-ok:hover { background: #0e2f53; }
@media (max-width: 600px) {
  #furnBar { flex-wrap: wrap; justify-content: center; padding: 6px; left: 12px; right: 12px; transform: none; }
  .fb-status { width: 100%; text-align: center; margin: 0 0 4px; }
}

.prow.tp-err .ps { color: var(--danger, #c0392b); }

/* teleportverzoek in de chat */
.hm-bub.tp { display: flex; flex-direction: column; gap: 8px; }
.hm-tp { align-self: flex-start; height: 32px; padding: 0 14px; border: none; border-radius: 16px; background: var(--amber); color: var(--blue); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.hm-tp:disabled { background: #e6eaee; color: #6b7c8d; cursor: default; }

/* ============================================================
   Qorner Coffee: menu
   ============================================================ */
#cafeMenu { position: fixed; z-index: 9; right: 14px; top: calc(max(14px, env(safe-area-inset-top)) + 54px); width: min(320px, calc(100vw - 28px)); background: #16171a; color: #f4ede0; border-radius: 16px; padding: 16px; }
#cafeMenu[hidden] { display: none; }
#cafeMenu .sp-x { color: #f4ede0; }
#cafeMenu .sp-x:hover { background: rgba(255,255,255,.08); }
.cm-head { display: flex; align-items: flex-start; justify-content: space-between; }
.cm-title { font: 600 22px Georgia, 'Times New Roman', serif; }
.cm-sub { font-size: 12px; color: #c9a45a; margin-top: 2px; }
.cm-list { display: flex; flex-direction: column; margin-top: 10px; }
.cm-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 8px; border: none; border-bottom: 1px solid rgba(244,237,224,.1); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.cm-item:hover, .cm-item:focus-visible { background: rgba(244,237,224,.07); outline: none; }
.cm-name { font-size: 14px; font-weight: 500; }
.cm-desc { font-size: 12px; color: #a99f8f; }
.cm-price { font-size: 13px; color: #c9a45a; white-space: nowrap; }
.cm-bal { margin-top: 10px; font-size: 12px; color: #a99f8f; }
@media (max-width: 600px) { #cafeMenu { top: auto; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px); left: 12px; right: 12px; width: auto; } }

/* eerste persoon: puntje in het midden (alleen met mouse look) */
#fpDot { position: fixed; z-index: 6; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fafaf7; box-shadow: 0 0 0 1.5px rgba(18,60,105,.6); pointer-events: none; display: none; }
body.fp.fp-locked #fpDot { display: block; }
body.fp.fp-locked #app canvas { cursor: none; }
#fpBtn[aria-pressed="true"] { background: var(--amber) !important; }

/* ============================================================
   Bouwen: paneel (Mijn objecten / Sfeer) en de werkplaats
   Huisstijl: wit, vierkant, geen kaders om knoppen, nooit scrollen
   ============================================================ */
.rp-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 10px; }
.rp-tab { height: 32px; padding: 0 10px; border: none; border-radius: 0; background: #fff; color: var(--blue); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.rp-tab:hover { background: #FAFAF7; }
.rp-tab[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--amber); font-weight: 500; }
.rp-tab:disabled { opacity: .35; cursor: default; }
.rp-go-work { margin-left: auto; }
.rp-objs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 10px; }
.rp-obj { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border: none; border-radius: 0; background: #fff; color: var(--blue); cursor: pointer; font: inherit; }
.rp-obj:hover { background: #FAFAF7; }
.rp-obj img, .rp-obj-ph { width: 72px; height: 72px; object-fit: contain; display: grid; place-items: center; font-size: 26px; color: #9fb3c4; }
.rp-obj-name { font-size: 12px; line-height: 1.25; text-align: center; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-objfoot { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.rp-objfoot .sp-fit { margin-left: auto; border-radius: 0; }
.rp-pg { font-size: 12px; color: #6b7c8d; }
.rp-hint { font-size: 12px; color: #6b7c8d; margin-top: 10px; line-height: 1.4; }

#bdTop {
  position: fixed; z-index: 9; left: 50%; transform: translateX(-50%); top: calc(max(12px, env(safe-area-inset-top)) + 46px);
  display: flex; align-items: center; gap: 2px; background: #fff; padding: 4px 4px 4px 12px; color: var(--blue); max-width: calc(100vw - 24px);
}
.bd-title { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 14px; margin-right: 8px; white-space: nowrap; }
.bd-name { width: 190px; min-width: 0; height: 34px; border: none; border-bottom: 1px solid var(--mint, #A8DADC); border-radius: 0; padding: 0 6px; font: inherit; font-size: 14px; color: var(--blue); background: #fff; margin-right: 6px; }
.bd-name:focus { outline: none; border-bottom-color: var(--amber); }
.bd-btn { height: 36px; padding: 0 10px; border: none; border-radius: 0; background: #fff; color: var(--blue); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.bd-btn:hover { background: #FAFAF7; }
.bd-btn:disabled { opacity: .4; cursor: default; }
.bd-btn.bd-ok { background: var(--blue); color: #FAFAF7; }
#bdTools { position: fixed; z-index: 9; left: 12px; top: calc(max(12px, env(safe-area-inset-top)) + 100px); display: flex; flex-direction: column; background: #fff; }
.bd-tool { width: 64px; height: 56px; border: none; border-radius: 0; background: #fff; color: var(--blue); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: 11px; }
.bd-tool i { font-size: 20px; }
.bd-tool:hover { background: #FAFAF7; }
.bd-tool[aria-pressed="true"] { background: var(--blue); color: #FAFAF7; }
#bdSide { position: fixed; z-index: 9; right: 12px; top: calc(max(12px, env(safe-area-inset-top)) + 100px); width: 200px; background: #fff; padding: 10px 12px 12px; color: var(--blue); }
.bd-lb { font-size: 11px; color: #6b7c8d; margin: 10px 0 5px; }
.bd-lb:first-child { margin-top: 0; }
.bd-swatches { display: grid; grid-template-columns: repeat(6, 26px); gap: 4px; }
.bd-sw { width: 26px; height: 26px; border: none; border-radius: 0; cursor: pointer; padding: 0; position: relative; }
.bd-sw[aria-pressed="true"] { outline: 2px solid var(--amber); outline-offset: 1px; }
.bd-sw-add { display: grid; place-items: center; background: #FAFAF7; color: var(--blue); font-size: 14px; }
.bd-sw-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: none; padding: 0; }
.bd-pills { display: flex; flex-wrap: wrap; gap: 2px; }
.bd-pill { height: 28px; padding: 0 8px; border: none; border-radius: 0; background: #fff; color: var(--blue); font: inherit; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.bd-pill:hover { background: #FAFAF7; }
.bd-pill[aria-pressed="true"] { background: var(--amber); }
.bd-wide { margin-top: 8px; width: 100%; justify-content: center; background: #FAFAF7; }
.bd-step { display: flex; align-items: center; gap: 2px; height: 30px; }
.bd-step-l { font-size: 12px; flex: 1; }
.bd-stepb { width: 28px; height: 28px; border: none; border-radius: 0; background: #FAFAF7; color: var(--blue); cursor: pointer; display: grid; place-items: center; }
.bd-stepb:disabled { opacity: .35; cursor: default; }
.bd-step-v { min-width: 58px; text-align: center; font-size: 12px; font-weight: 500; }
.bd-info { font-size: 11px; color: #6b7c8d; margin-top: 12px; line-height: 1.4; }
#bdOpen { position: fixed; z-index: 12; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); background: #fff; padding: 14px 16px; color: var(--blue); }
#bdOpen[hidden] { display: none; }
.bd-open-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bd-open-title { font: 500 18px 'Space Grotesk', var(--font); }
.bd-open-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.bd-open-item { position: relative; }
.bd-open-pick { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: none; border-radius: 0; background: #fff; color: var(--blue); cursor: pointer; font: inherit; font-size: 12px; }
.bd-open-pick:hover { background: #FAFAF7; }
.bd-open-pick img, .bd-open-pick > i { width: 88px; height: 88px; object-fit: contain; font-size: 30px; display: grid; place-items: center; color: #9fb3c4; }
.bd-open-pick span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-open-del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: none; border-radius: 0; background: #fff; color: #c8342c; cursor: pointer; display: none; place-items: center; }
.bd-open-item:hover .bd-open-del, .bd-open-del:focus { display: grid; }
.bd-open-nav { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; font-size: 12px; }
@media (max-width: 700px) {
  #bdTop { flex-wrap: wrap; justify-content: center; left: 12px; right: 12px; transform: none; }
  .bd-btn { padding: 0 8px; }
  #bdTools { top: auto; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px); flex-direction: row; }
  .bd-tool { width: 52px; height: 48px; }
  #bdSide { top: auto; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 124px); width: 188px; padding: 8px 10px; }
  .bd-open-grid { grid-template-columns: repeat(2, 1fr); }
}


/* Bouwset stap 2: kiezen, exacte maten, magneet */
.bd-toggle[aria-pressed="true"] { background: var(--amber); }
.bd-hint { font-size: 11px; color: #6b7c8d; line-height: 1.4; margin-top: 8px; }
.bd-selname { font-size: 14px; font-weight: 500; }
.bd-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.bd-field { display: flex; align-items: center; gap: 6px; height: 28px; font-size: 12px; }
.bd-field span { width: 12px; color: #6b7c8d; }
.bd-field input { width: 100%; min-width: 0; height: 24px; border: none; border-bottom: 1px solid var(--mint); border-radius: 0; padding: 0 4px; font: inherit; font-size: 12px; color: var(--blue); background: #fff; }
.bd-field input:focus { outline: none; border-bottom-color: var(--amber); }
#bdTools .bd-tool { height: 50px; }
/* Gaten: bladeren tussen gaten, kleine kleurenrij voor het kozijn */
.bd-holenav { display: flex; align-items: center; gap: 2px; height: 30px; }
.bd-holenav .bd-step-v { flex: 1; }
.bd-mini { display: grid; grid-template-columns: repeat(10, 14px); gap: 3px; margin-top: 6px; }
.bd-sw-mini { width: 14px; height: 14px; }
#bdSide .bd-pills + .bd-pills { margin-top: 4px; }

/* ============================================================
   Midtown: liftpaneel en overgangen (lift, metro, taxi)
   ============================================================ */
#liftPanel { position: fixed; z-index: 12; right: 16px; top: 50%; transform: translateY(-50%); width: 168px; background: #c9ced4; color: #1e1f22; padding: 12px; box-shadow: inset 0 0 0 1px #aab0b7; }
#liftPanel[hidden] { display: none; }
.lp-disp { display: flex; align-items: center; justify-content: space-between; background: #0d0f12; color: #ffb347; font: 600 22px/1 'Space Grotesk', var(--font); padding: 8px 10px; margin-bottom: 10px; }
.lp-arrow { font-size: 12px; opacity: .8; }
.lp-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; margin-bottom: 10px; color: #2b2d31; }
.lp-head i { font-size: 16px; }
.lp-grid { display: grid; grid-template-columns: 1fr; gap: 8px; justify-items: center; }
.lp-btn { width: 100%; height: 46px; border: none; border-radius: 0; background: transparent; color: #1e1f22; cursor: pointer; display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 10px; font: inherit; text-align: left; padding: 0; }
.lp-n { width: 44px; height: 44px; border-radius: 50%; background: #e9ecef; box-shadow: inset 0 0 0 3px #9aa1a8; display: grid; place-items: center; font-size: 17px; font-weight: 600; }
.lp-s { font-size: 11px; color: #3a3d42; }
.lp-btn:hover .lp-n { box-shadow: inset 0 0 0 3px #F4B942; }
.lp-btn.here .lp-n, .lp-btn.lit .lp-n { box-shadow: inset 0 0 0 3px #ffb347, 0 0 10px #ffb347; color: #b86a00; }
.lp-btn.here { cursor: default; }
#transit { position: fixed; inset: 0; z-index: 50; pointer-events: all; display: grid; place-items: center; overflow: hidden; }
#transit .tr-disp { position: relative; z-index: 2; background: #0d0f12; color: #ffb347; font: 600 18px/1 'Space Grotesk', var(--font); letter-spacing: .06em; padding: 12px 18px; opacity: 0; transition: opacity .3s .35s; }
#transit.on .tr-disp { opacity: 1; }
.tr-lift .tr-door { position: absolute; top: 0; bottom: 0; width: 50%; background: repeating-linear-gradient(90deg, #b9bec4 0 14px, #aeb3b9 14px 15px); transition: transform .55s ease-in; }
.tr-lift .tr-door.l { left: 0; transform: translateX(-100%); border-right: 2px solid #8d939a; }
.tr-lift .tr-door.r { right: 0; transform: translateX(100%); border-left: 2px solid #8d939a; }
.tr-lift.on .tr-door.l, .tr-lift.on .tr-door.r { transform: translateX(0); }
.tr-metro { background: #0b0d10; opacity: 0; transition: opacity .35s; }
.tr-metro.on { opacity: 1; }
.tr-metro .tr-tunnel { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 140px, rgba(255, 214, 140, .55) 140px 150px, transparent 150px 300px); animation: tr-run .25s linear infinite; }
@keyframes tr-run { from { background-position: 0 0; } to { background-position: -300px 0; } }
.tr-taxi { background: #f2c014; opacity: 0; transition: opacity .35s; }
.tr-taxi.on { opacity: 1; }
.tr-taxi .tr-stripe { position: absolute; left: 0; right: 0; top: 50%; height: 26px; margin-top: 30px; background: repeating-linear-gradient(90deg, #15191f 0 26px, #f2c014 26px 52px); }

/* ---------- Praten met AI-personages (Tony) ---------- */
#npcPanel { position: fixed; z-index: 14; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 120px)); background: #fff; color: #1e1f22; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(18, 60, 105, .18); font-family: var(--font); }
#npcPanel[hidden] { display: none; }
.np-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.np-av { width: 38px; height: 38px; border-radius: 50%; background: var(--mint); color: var(--blue); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.np-who { flex: 1; min-width: 0; } .np-who p { margin: 0; }
.np-nm { font-weight: 600; font-size: 14px; color: var(--blue); }
.np-rl { font-size: 12px; color: var(--blue-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-badge { font-size: 11px; background: #e8f3f2; color: var(--teal); padding: 2px 8px; white-space: nowrap; }
.np-x { border: none; background: none; color: var(--blue-muted); font-size: 18px; cursor: pointer; padding: 4px; }
.np-live { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #123C69; color: #fff; font-size: 13px; }
.np-live[hidden] { display: none; }
.np-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff5a4a; box-shadow: 0 0 0 0 rgba(255, 90, 74, .6); animation: npPulse 1.4s infinite; flex: none; }
@keyframes npPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 74, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 90, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 74, 0); } }
.np-hang { margin-left: auto; border: none; background: #F4B942; color: #123C69; font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; cursor: pointer; }
.np-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.np-msg { max-width: 86%; padding: 8px 11px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; }
.np-msg.them { align-self: flex-start; background: #f1f3f5; }
.np-msg.me { align-self: flex-end; background: var(--blue); color: #fff; }
.np-msg.live::after, .np-msg.typing { color: var(--blue-muted); }
.np-msg.live::after { content: ' ▍'; animation: npBlink 1s steps(1) infinite; }
@keyframes npBlink { 50% { opacity: 0; } }
.np-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.np-chip { border: 1px solid var(--line); background: #fff; color: var(--blue); font: inherit; font-size: 12px; padding: 4px 9px; cursor: pointer; }
.np-chip:hover { border-color: var(--teal); }
.np-row { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: center; }
.np-inp { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line); padding: 0 10px; font: inherit; font-size: 14px; outline: none; }
.np-inp:focus { border-color: var(--teal); }
.np-mic, .np-spk, .np-go { width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; color: var(--blue); cursor: pointer; display: grid; place-items: center; font-size: 18px; flex: none; }
.np-mic.on { background: #ff5a4a; border-color: #ff5a4a; color: #fff; }
.np-mic.busy { opacity: .6; cursor: progress; }
.np-spk.off { color: var(--blue-muted); }
.np-go { background: var(--blue); border-color: var(--blue); color: #fff; }
.np-note { margin: 0; padding: 0 12px 10px; font-size: 11px; color: var(--blue-muted); }

/* ---------- Geluid & sfeer (rechtsboven) ---------- */
#prefsPanel { position: fixed; z-index: 15; top: 58px; right: 16px; width: min(320px, calc(100vw - 32px)); background: #fff; color: #1e1f22; padding: 12px 14px; box-shadow: 0 10px 30px rgba(18, 60, 105, .18); font-family: var(--font); }
#prefsPanel[hidden] { display: none; }
.pf-h { margin: 4px 0 4px; font-weight: 600; font-size: 14px; color: var(--blue); }
.pf-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.pf-row > i { font-size: 18px; color: var(--blue); }
.pf-tx { flex: 1; display: flex; flex-direction: column; } .pf-tx b { font-weight: 500; font-size: 13px; } .pf-tx small { font-size: 11px; color: var(--blue-muted); }
.pf-sw { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 11px; background: #cfd6dd; position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.pf-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.pf-sw:checked { background: var(--teal); } .pf-sw:checked::after { left: 19px; }
.pf-sw:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.pf-seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin-top: 4px; }
.pf-seg button { border: none; border-left: 1px solid var(--line); background: #fff; color: var(--blue); font: inherit; font-size: 12px; padding: 7px 0; cursor: pointer; }
.pf-seg button:first-child { border-left: none; }
.pf-seg button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.pf-seg button:disabled { opacity: .45; cursor: default; }
.pf-note { margin: 6px 0 0; font-size: 11px; color: var(--blue-muted); }

/* Kamer: sfeerlicht */
.rp-swatches { display: flex; gap: 8px; margin: 4px 0 8px; }
.rp-sw { width: 30px; height: 30px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.rp-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--blue); }
.rp-sub { font-weight: 600; font-size: 13px; color: var(--blue); align-self: center; margin-right: auto; }

/* ---------- Bus (Midtown) ---------- */
#busBar { position: fixed; z-index: 13; left: 50%; transform: translateX(-50%); bottom: 96px; display: flex; align-items: center; gap: 10px; background: #123C69; color: #fff; padding: 8px 10px 8px 14px; font-family: var(--font); font-size: 13px; box-shadow: 0 8px 24px rgba(18, 60, 105, .25); }
#busBar[hidden] { display: none; }
#busBar > i { font-size: 18px; color: #F4B942; }
.bb-label { white-space: nowrap; }
.bb-btn { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font: inherit; font-size: 12px; padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.bb-btn.primary { background: #F4B942; border-color: #F4B942; color: #123C69; font-weight: 600; }
.bb-btn[hidden] { display: none; }

/* ---------- Tech Talk Podcast ---------- */
#podPanel { position: fixed; z-index: 13; right: 16px; top: 64px; width: min(340px, calc(100vw - 32px)); max-height: min(440px, 46vh); display: flex; flex-direction: column; background: #fff; color: #1e1f22; box-shadow: 0 10px 30px rgba(18, 60, 105, .18); font-family: var(--font); }
#podPanel[hidden] { display: none; }
.pd-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #0e0f11; color: #fff; font-size: 13px; }
.pd-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4a4a; animation: npPulse 1.4s infinite; }
.pd-n { margin-left: auto; font-size: 11px; color: var(--mint); }
.pd-chips { display: flex; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; }
.pd-chip { font-size: 11px; padding: 2px 7px; }
.pd-topic { margin: 6px 12px 0; font-size: 12px; color: var(--teal); font-weight: 600; }
.pd-log { flex: 1; overflow-y: auto; padding: 8px 12px; min-height: 120px; }
.pd-line { margin: 0 0 6px; font-size: 13px; line-height: 1.45; } .pd-line.muted { color: var(--blue-muted); }
.pd-you { margin: 0 12px 6px; font-size: 12px; color: var(--blue); font-weight: 500; }
.pd-row { display: flex; gap: 6px; padding: 0 12px 8px; }
.pd-inp { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line); padding: 0 10px; font: inherit; font-size: 13px; }
.pd-ic { width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; color: var(--blue); cursor: pointer; display: grid; place-items: center; font-size: 17px; flex: none; }
.pd-ic.primary, .pd-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.pd-btn { margin: 0 12px 8px; height: 36px; border: 1px solid var(--line); background: #fff; color: var(--blue); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pd-note { margin: 0; padding: 0 12px 10px; font-size: 11px; color: var(--blue-muted); }

/* ---------- Hub: tab Locaties ---------- */
.loc-root { display: flex; width: 100%; min-height: 0; }
.loc-nav { width: 190px; flex: none; padding: 14px 10px; border-right: 1px solid var(--line); overflow-y: auto; }
.loc-grp { margin: 12px 8px 4px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--blue-muted); }
.loc-grp:first-child { margin-top: 0; }
.loc-it { display: block; width: 100%; text-align: left; border: none; background: none; font: inherit; font-size: 14px; color: var(--blue-soft); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.loc-it:hover { background: #f1f4f7; }
.loc-it.on { background: #eef2f6; color: var(--blue); font-weight: 600; }
.loc-main { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 20px; }
.loc-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.loc-t { flex: 1; min-width: 0; } .loc-t h3 { margin: 0; font-size: 20px; color: var(--blue); } .loc-where { margin: 2px 0 0; font-size: 13px; color: var(--blue-muted); }
.loc-cover { height: 230px; border-radius: 12px; overflow: hidden; background: #eef2f6; display: grid; place-items: center; cursor: zoom-in; }
.loc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.loc-empty { font-size: 13px; color: var(--blue-muted); }
.loc-desc { margin: 10px 0 12px; font-size: 14px; line-height: 1.55; color: var(--blue-soft); max-width: 640px; }
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.loc-th { position: relative; height: 96px; border-radius: 8px; overflow: hidden; background: #eef2f6; }
.loc-th img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.loc-th.cover { outline: 2px solid var(--amber); outline-offset: -2px; }
.loc-badge { position: absolute; left: 6px; top: 6px; background: var(--amber); color: var(--blue); font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.loc-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 2px; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transition: opacity .15s; }
.loc-th:hover .loc-tools, .loc-th:focus-within .loc-tools { opacity: 1; }
.loc-tools button { width: 28px; height: 28px; border: none; border-radius: 6px; background: rgba(255,255,255,.92); color: var(--blue); cursor: pointer; display: grid; place-items: center; font-size: 15px; }
.loc-tools button:disabled { opacity: .35; cursor: default; }
.loc-add { height: 96px; border: 1.5px dashed #b8c4cf; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--blue-muted); cursor: pointer; }
.loc-add i { font-size: 22px; } .loc-add:hover { border-color: var(--teal); color: var(--teal); }
.loc-note { margin: 12px 0 0; font-size: 12px; color: var(--blue-muted); } .loc-note.err { color: var(--danger); }
.loc-zoom { position: fixed; inset: 0; z-index: 60; background: rgba(10, 16, 24, .85); display: grid; place-items: center; cursor: zoom-out; }
.loc-zoom img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
@media (max-width: 720px) { .loc-root { flex-direction: column; } .loc-nav { width: auto; border-right: none; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px; } .loc-grp { width: 100%; } .loc-it { width: auto; } .loc-cover { height: 170px; } }

/* ---------- Hub: niet-opgeslagen wijzigingen ---------- */
.hub-confirm { position: fixed; inset: 0; z-index: 55; background: rgba(10, 16, 24, .45); display: grid; place-items: center; }
.hc-card { background: #fff; border-radius: 14px; padding: 20px; width: min(360px, calc(100vw - 32px)); box-shadow: 0 16px 40px rgba(18, 60, 105, .25); display: flex; flex-direction: column; gap: 8px; font-family: var(--font); }
.hc-t { margin: 0; font-size: 17px; font-weight: 600; color: var(--blue); }
.hc-p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--blue-soft); }
.hc-card .hb2 { width: 100%; justify-content: center; }
.hc-card .hb2.ghost { border-color: transparent; background: transparent; color: var(--blue-muted); }

/* podcastpaneel: rechtsboven (de chat zit links), in te klappen */
.pd-mini { margin-left: 6px; border: none; background: transparent; color: #fff; cursor: pointer; font-size: 16px; display: grid; place-items: center; }
#podPanel.mini .pd-head { cursor: default; }

/* ---------- Kantoorvloer huren (Midtown) ---------- */
#rentPanel { position: fixed; z-index: 13; right: 16px; top: 64px; width: min(320px, calc(100vw - 32px)); background: #fff; color: #1e1f22; box-shadow: 0 10px 30px rgba(18, 60, 105, .18); font-family: var(--font); }
.rt-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--blue); color: #fff; font-size: 13px; }
.rt-head > i { color: var(--amber); font-size: 16px; }
.rt-mini { margin-left: auto; border: none; background: transparent; color: #fff; cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.rt-body { padding: 10px 12px 12px; }
.rt-t { margin: 0 0 4px; font-weight: 600; font-size: 14px; color: var(--blue); }
.rt-p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--blue-soft); }
.rt-sub { margin: 10px 0 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--blue-muted); }
.rt-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rt-plan { border: 1px solid var(--line); background: #fff; padding: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font: inherit; color: var(--blue); }
.rt-plan b { font-size: 13px; } .rt-plan span { font-size: 12px; color: var(--blue-muted); }
.rt-plan[aria-pressed="true"] { border-color: var(--blue); background: #eef2f6; }
.rt-inp { width: 100%; height: 36px; border: 1px solid var(--line); padding: 0 10px; font: inherit; font-size: 14px; box-sizing: border-box; }
.rt-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.rt-seg button { border: none; border-left: 1px solid var(--line); background: #fff; color: var(--blue); font: inherit; font-size: 12px; padding: 7px 0; cursor: pointer; }
.rt-seg button:first-child { border-left: none; } .rt-seg button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.rt-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.rt-bal { font-size: 12px; color: var(--blue-muted); margin-right: auto; }
.rt-btn { border: 1px solid var(--line); background: #fff; color: var(--blue); font: inherit; font-size: 13px; padding: 7px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.rt-btn.primary { background: var(--amber); border-color: var(--amber); color: var(--blue); font-weight: 600; margin-left: auto; }
.rt-btn.primary:disabled { opacity: .5; cursor: default; }
.rt-btn.danger { color: var(--danger); margin-left: auto; }
.rt-note { margin: 8px 0 0; font-size: 12px; color: var(--blue-muted); }

/* ---------- Q-trein (Midtown) ---------- */
#trainBar { position: fixed; z-index: 13; left: 50%; transform: translateX(-50%); bottom: 96px; display: flex; align-items: center; gap: 10px; background: #123C69; color: #fff; padding: 8px 10px 8px 10px; font-family: var(--font); font-size: 13px; box-shadow: 0 8px 24px rgba(18, 60, 105, .25); }
#trainBar[hidden] { display: none; }
.tb-q { width: 24px; height: 24px; border-radius: 50%; background: #F4B942; color: #123C69; font-weight: 700; display: grid; place-items: center; font-size: 13px; }

/* ---------- Beheer (alleen beheerder) ---------- */
#adminPanel { position: fixed; z-index: 15; top: 58px; right: 16px; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: #fff; color: #1e1f22; padding: 12px 14px; box-shadow: 0 10px 30px rgba(18, 60, 105, .18); font-family: var(--font); }
#adminPanel[hidden] { display: none; }
.ad-t { margin: 0 0 6px; font-weight: 600; font-size: 15px; color: var(--blue); }
.ad-help { margin: 0 0 10px; font-size: 12px; line-height: 1.45; color: var(--blue-muted); }
.ad-sub { margin: 8px 0 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--blue-muted); }
.ad-p { margin: 4px 0; font-size: 13px; color: var(--blue-soft); }
.ad-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ad-who { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.ad-who span { font-size: 12px; color: var(--blue-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-btn { border: 1px solid var(--line); background: #fff; color: var(--blue); font: inherit; font-size: 13px; padding: 6px 10px; cursor: pointer; }
.ad-btn.danger { color: var(--danger); border-color: var(--danger); }
.bc-admin { display: flex; justify-content: flex-end; padding: 8px 12px 10px; border-top: 1px solid var(--line); }
#bannedNote { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; background: rgba(18, 60, 105, .92); color: #fff; font: 600 18px var(--font); }

/* ---------- Live kaart (links) ---------- */
#place .mapbtn { display: inline-flex; align-items: center; gap: 6px; border: none; background: var(--blue); color: #fff; font: inherit; font-size: 13px; padding: 8px 12px; cursor: pointer; }
#place .mapbtn i { color: var(--amber); font-size: 15px; }
#place .mapbtn[aria-expanded="true"] { background: #0c2a4a; }
#mapPanel { position: fixed; z-index: 12; left: 12px; top: 58px; width: min(260px, calc(100vw - 32px)); background: #fff; box-shadow: 0 10px 30px rgba(18, 60, 105, .18); font-family: var(--font); }
#mapPanel[hidden] { display: none; }
.mp-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--blue); color: #fff; font-size: 13px; }
.mp-head > i { color: var(--amber); }
.mp-sp { flex: 1; }
.mp-btn { width: 26px; height: 26px; display: grid; place-items: center; border: none; background: transparent; color: #fff; cursor: pointer; font-size: 15px; }
.mp-btn:hover { background: rgba(255, 255, 255, .12); }
.mp-cv { display: block; width: 100%; aspect-ratio: 1 / 1; cursor: crosshair; }
.mp-info { padding: 6px 8px; font-size: 12px; color: var(--blue-soft); border-top: 1px solid var(--line); min-height: 18px; }
.mp-foot { display: flex; align-items: center; gap: 10px; padding: 6px 8px 8px; font-size: 12px; color: var(--blue-muted); }
.mp-key::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.mp-key.me::before { background: #EF9F27; } .mp-key.pl::before { background: #378ADD; }
.mp-tog { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
@media (max-width: 640px) { #mapPanel { width: 180px; } }

/* ---------- TV-favorieten (Kamer) ---------- */
.rp-favs { border-top: 1px solid var(--line); margin-bottom: 8px; }
.rp-fav { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rp-fav.on .rp-ico:first-child { color: var(--blue); }
.rp-favname { flex: 1; min-width: 0; font-size: 14px; color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-favname em { font-style: normal; font-size: 12px; color: #2A9D8F; }
.rp-ico { width: 30px; height: 30px; display: grid; place-items: center; border: none; background: transparent; color: var(--blue-muted); cursor: pointer; font-size: 16px; border-radius: 6px; }
.rp-ico:hover { background: #eef2f6; color: var(--blue); }
.rp-favnone { margin: 6px 0; font-size: 12px; color: var(--blue-muted); }
.rp-auto { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; font-size: 13px; color: var(--blue-soft); cursor: pointer; }

/* liftpaneel met veel verdiepingen (Voxel Residences): raster van ronde knoppen, van laag naar hoog */
#liftPanel.lp-wide { width: 252px; }
.lp-grid.lp-many { grid-template-columns: repeat(5, 40px); gap: 6px; justify-content: center; }
.lp-grid.lp-many .lp-btn { width: 40px; height: 40px; grid-template-columns: 40px; }
.lp-grid.lp-many .lp-n { width: 40px; height: 40px; }
.lp-grid.lp-many .lp-s { display: none; }
.lp-grid.lp-many .lp-n { font-size: 14px; }

/* tweede home (hub) */
#hubHome2 { margin-left: 8px; align-self: center; margin-bottom: 4px; height: 36px; padding: 0 14px; border: 1px solid rgba(250,250,247,.45); border-radius: 18px; background: none; color: var(--ivory); font: inherit; font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
#hubHome2[hidden] { display: none; }
#hubHome2:hover { background: rgba(250,250,247,.12); }

/* spraakbediening (Kamer) */
.rp-voice { width: 100%; margin: 10px 0 4px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue); font: inherit; font-size: 14px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.rp-voice.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.rp-voicehelp { margin: 0 0 10px; font-size: 12px; color: var(--blue-muted); }

.rp-range { width: 100%; margin: 4px 0 10px; accent-color: var(--blue); }
.rp-voicehelp p { margin: 2px 0; font-size: 12px; color: var(--blue-muted); }

#rentPanel[hidden] { display: none; }

/* ---------- meubelzaak Syas Furniture: het kaartje heeft dezelfde opbouw en stijl als bij Vidal en EAGER (#shopPanel) ---------- */
#homeCard {
  position: fixed; z-index: 9; right: 14px; top: calc(max(14px, env(safe-area-inset-top)) + 54px);
  width: min(290px, calc(100vw - 28px)); background: #fff; border-radius: 14px; padding: 16px; color: var(--blue);
}
#homeCard[hidden] { display: none; }
#homeCard button { font: inherit; }
#homeCard h3 { margin: 2px 0 4px; font: 500 20px 'Space Grotesk', var(--font); }
.hc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #eef2f6; }
.hc-list li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid #eef2f6; font-size: 13px; }
.hc-dim { color: #6b7c8d; white-space: nowrap; }
@media (max-width: 600px) { #homeCard { top: auto; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px); right: 12px; left: 12px; width: auto; } }

/* Locaties: iconen bij de groepen en de plekken */
.loc-grp { display: flex; align-items: center; gap: 6px; }
.loc-grp i { font-size: 15px; }
.loc-it { display: flex; align-items: center; gap: 8px; text-align: left; }
.loc-it i { font-size: 17px; flex: none; opacity: .85; }
.loc-t h3 { display: flex; align-items: center; gap: 8px; }
.loc-t h3 i { color: var(--amber, #F4B942); }
/* Syas Furniture: kleurbolletje van een bank die je al hebt */
#homeCard .sp-var.owned { box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #2a9d8f; }
#homeCard .sp-fits { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- zelf bus rijden (Qoin Transit) ---------- */
#busHud { position: fixed; z-index: 9; left: 14px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px); width: min(330px, calc(100vw - 28px));   /* compact blok links */ background: #fff; border-radius: 14px; padding: 10px 12px; color: var(--blue); box-shadow: 0 10px 30px rgba(18, 60, 105, .18); display: flex; flex-direction: column; gap: 8px; }
#busHud[hidden] { display: none; }
#busHud .bh-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#busHud .bh-next { font-weight: 600; font-size: 14px; }
#busHud .bh-arrow { font-size: 20px; color: #0755BC; transition: transform .2s; display: inline-block; }
#busHud .bh-info { flex: 1; min-width: 180px; font-size: 13px; color: #33475b; }
#busHud .bh-btn { height: 32px; padding: 0 12px; border: none; border-radius: 16px; background: #f1f4f7; color: #33475b; font: inherit; font-size: 13px; cursor: pointer; }
#busHud .bh-btn.on { background: #2a9d8f; color: #fff; }
#busHud .bh-btn.ghost { background: transparent; border: 1px solid var(--line); }
#busHud .bh-pad { display: flex; gap: 8px; justify-content: center; }
#busHud .bh-key { width: 56px; height: 48px; border: none; border-radius: 12px; background: #123C69; color: #fff; font-size: 22px; touch-action: none; }
#busHud .bh-tip { font-size: 12px; color: #6b7c8d; }
/* busnavigator (rechtsboven tijdens je dienst) */
.bh-nav { position: fixed; z-index: 9; right: 14px; top: calc(max(14px, env(safe-area-inset-top)) + 54px); width: min(240px, 38vw); aspect-ratio: 1; border-radius: 14px; box-shadow: 0 10px 30px rgba(18, 60, 105, .25); }
.bh-nav[hidden] { display: none; }

#busHud .bh-info { flex-basis: 100%; }
#busHud .bh-btn { flex: 1 1 calc(50% - 8px); }
#busHud .bh-tip { line-height: 1.35; }
/* inspectiemodus: een gebouw van dichtbij bekijken (ui/inspect.js) */
#inspectPanel { position: fixed; z-index: 9; left: 14px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 70px); width: min(360px, calc(100vw - 28px)); background: #fff; border-radius: 14px; padding: 10px 12px; color: var(--blue); box-shadow: 0 10px 30px rgba(18, 60, 105, .18); display: flex; flex-direction: column; gap: 6px; }
#inspectPanel[hidden] { display: none; }
#inspectPanel .ip-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
#inspectPanel .ip-sub { font-size: 13px; color: #4a5b6d; }
#inspectPanel .ip-tip { font-size: 12px; color: #6b7c8d; line-height: 1.35; }
#inspectPanel .ip-row { display: flex; flex-wrap: wrap; gap: 6px; }
#inspectPanel .ip-btn { flex: 1 1 calc(33% - 6px); display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 8px; border-radius: 999px; border: 0; background: #eef2f6; color: var(--blue); font: inherit; font-size: 13px; cursor: pointer; }
#inspectPanel .ip-btn.ghost { background: transparent; border: 1px solid #d8e0e8; }
.ip-hint { position: fixed; z-index: 8; left: 50%; transform: translateX(-50%); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 74px); padding: 8px 12px; border-radius: 999px; border: 0; background: rgba(18, 60, 105, .88); color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.ip-hint[hidden] { display: none; }

/* ============================================================
   v155 – mobiel en iPad
   html.touch : touchscherm (ook iPad met toetsenbord)   html.lite : telefoon/tablet   html.phone : telefoon
   (zie assets/js/core/device.js)
   ============================================================ */
:root { --barh: 56px; --sheeth: 0px; }
@media (max-width: 600px) { :root { --barh: 48px; } html.bar-more { --barh: 97px; } }

/* ---------- Kamer-paneel: compact, drie tabs, vierkant ---------- */
#roomPanel {
  width: min(300px, calc(100vw - 28px)); padding: 0; display: flex; flex-direction: column; overflow: hidden;
  max-height: calc(100vh - max(14px, env(safe-area-inset-top)) - 54px - var(--barh) - 30px);
  max-height: calc(100dvh - max(14px, env(safe-area-inset-top)) - 54px - var(--barh) - 30px);
}
#roomPanel .rp-head { padding: 12px 14px 0; flex: none; }
#roomPanel .rp-title { font-size: 16px; }
.rp-tabbar { display: flex; flex: none; margin-top: 8px; border-bottom: 1px solid var(--line); }
.rp-tb {
  flex: 1; height: 36px; border: none; border-bottom: 3px solid transparent; margin-bottom: -1px; background: #fff;
  color: var(--blue); font: inherit; font-size: 13px; cursor: pointer;
}
.rp-tb:hover { background: #FAFAF7; }
.rp-tb[aria-selected="true"] { border-bottom-color: var(--amber); font-weight: 500; }
.rp-body { padding: 2px 14px 14px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }   /* alleen als het echt niet past (telefoon liggend) */
#roomPanel .rp-lb { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; color: #6b7c8d; margin: 12px 0 5px; }
#roomPanel .rp-lb b { color: var(--blue); font-weight: 500; }
/* gesegmenteerde keuze: de lijntjes ertussen komen van de achtergrond (1 px gap), ook als hij over twee regels loopt */
.rp-seg { display: flex; flex-wrap: wrap; gap: 1px; padding: 1px; background: var(--line); }
.rp-seg button {
  flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 8px; border: none; border-radius: 0; background: #fff; color: var(--blue);
  font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.rp-seg button:hover { background: #FAFAF7; }
.rp-seg button[aria-pressed="true"] { background: var(--blue); color: var(--ivory); }
.rp-seg.wrap3 button { flex: 1 1 calc(33.33% - 1px); }
.rp-seg.top0 { margin-top: 6px; }
.rp-seg.top8, .rp-url.top8 { margin-top: 8px; }
#roomPanel input[type="range"] { display: block; width: 100%; margin: 8px 0 0; accent-color: var(--blue); }
.rp-moodrow { display: flex; align-items: center; gap: 4px; }
.rp-moodrow .rp-sw { width: 24px; height: 24px; flex: none; border: none; border-radius: 0; box-shadow: inset 0 0 0 1px rgba(18, 60, 105, .12); }
.rp-moodrow .rp-sw[aria-pressed="true"] { box-shadow: none; outline: 2px solid var(--blue); outline-offset: 1px; }
#roomPanel .rp-moodrow input[type="range"] { flex: 1; min-width: 40px; margin: 0 0 0 8px; }
#roomPanel .rp-sync { margin-top: 14px; border-radius: 0; padding: 6px 8px; font-size: 11px; }
#roomPanel .rp-url input { border-radius: 0; height: 36px; }
#roomPanel .rp-go { border-radius: 0; width: 36px; height: 36px; }
.rp-save { height: 36px; flex: none; border: none; border-radius: 0; background: var(--blue); color: var(--ivory); padding: 0 12px; font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.rp-save:disabled { opacity: .45; cursor: default; }
#roomPanel .rp-voicehelp { margin: 8px 0 0; font-size: 11px; line-height: 1.45; }
#roomPanel .rp-voicehelp p { margin: 0 0 3px; }
#roomPanel .rp-fav { padding: 3px 0; }
#roomPanel .rp-auto { font-size: 12px; margin: 6px 0 0; }
#roomPanel .rp-objfoot .sp-fit, #roomPanel .rp-objfoot button { border-radius: 0; }

/* telefoon en iPad: het paneel wordt een onderblad boven de actiebalk */
@media (max-width: 600px) {
  #roomPanel { top: auto; left: 12px; right: 12px; width: auto; transform: none; }
}
#roomPanel { --sheet-bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--barh) + 6px); }
html.lite #roomPanel {
  top: auto; right: auto; left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 24px));
  bottom: var(--sheet-bottom); max-height: 55vh; max-height: 55dvh;
}
@media (max-width: 600px) {
  #roomPanel { bottom: var(--sheet-bottom); max-height: 55vh; max-height: 55dvh; }
}

/* ---------- Joystick en springknop: op elk touchscherm (ook iPad met toetsenbord) ---------- */
html.touch body.playing #stick { display: block; }
#stick { bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--barh) + 18px); }
#jumpBtn {
  position: fixed; right: 22px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--barh) + 48px);
  width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--ivory); background: rgba(18, 60, 105, 0.35);
  color: var(--ivory); font-size: 28px; display: none; place-items: center; touch-action: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
#jumpBtn:active { background: var(--amber); color: var(--blue); }
html.touch body.playing #jumpBtn { display: grid; }
#stick, #knob { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
/* paneel open: joystick en springknop schuiven mee omhoog, boven het onderblad */
html.lite.sheet-open #stick { bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--barh) + var(--sheeth) + 18px); }
html.lite.sheet-open #jumpBtn { bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--barh) + var(--sheeth) + 48px); }
@media (max-width: 600px) {
  html.sheet-open #stick { bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--barh) + var(--sheeth) + 18px); }
  html.sheet-open #jumpBtn { bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--barh) + var(--sheeth) + 48px); }
  #stick { width: 110px; height: 110px; left: 16px; }
  #jumpBtn { right: 16px; }
}
/* lage schermen (telefoon liggend) met het paneel open: geen ruimte, dan even weg */
@media (max-height: 520px) { html.sheet-open #stick, html.sheet-open #jumpBtn { display: none !important; } }

/* ---------- Actiebalk op de telefoon: alleen iconen, minder gebruikt achter '…' ---------- */
#moreBtn { display: none; }
@media (max-width: 600px) {
  #moreBtn { display: flex; }
  #bar { flex-wrap: wrap; }
  #bar .hb-x { display: none; }
  html.bar-more #bar .hb-x:not([hidden]) { display: flex; order: -1; flex: 1 1 18%; border-bottom: 1px solid var(--line); }
  html.bar-more #moreBtn { background: var(--teal); color: var(--ivory); }
}

/* ---------- Bovenbalk op de telefoon: compacter ---------- */
@media (max-width: 600px) {
  .lang-fl { width: 32px; }
  #place .a { display: none; }
}
html.phone #helpBtn { display: none; }   /* toetsenbord-hulp heeft op een telefoon geen zin */

/* ---------- Te weinig geheugen voor 3D: melding met herladen (core/engine.js) ---------- */
#ctxLost {
  position: fixed; inset: 0; z-index: 100; background: var(--ivory); color: var(--blue);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center;
}
#ctxLost p { max-width: 360px; margin: 0; font-size: 15px; line-height: 1.5; }
#ctxLost button { height: 44px; padding: 0 22px; border: none; background: var(--blue); color: var(--ivory); font: inherit; font-size: 15px; cursor: pointer; }
/* telefoon: nog iets compacter, zodat Licht zonder scrollen past */
@media (max-width: 600px) {
  #roomPanel { max-height: 62vh; max-height: 62dvh; }
  #roomPanel .rp-sync { display: none; }
  #roomPanel .rp-lb { margin-top: 10px; }
}
/* v320: liftrit tot in je appartement: dunne voortgangsbalk onderin de dichte deuren, jouw appartement in teal */
#transit .tr-bar { position: absolute; left: 50%; bottom: 48px; transform: translateX(-50%); width: min(260px, 60vw); height: 3px; background: rgba(13, 15, 18, .35); z-index: 2; }
#transit .tr-bar i { display: block; height: 100%; width: 4%; background: #ffb347; transition: width .3s; }
#liftPanel .lp-btn.mine { background: #e7f5f2; border-color: #2A9D8F; color: #123C69; }
#liftPanel .lp-btn.mine .lp-n { color: #2A9D8F; }
/* v342: de kaart helemaal uitgezoomd: groter, zodat de hele stad leesbaar is */
#mapPanel.mp-big { width: min(560px, calc(100vw - 32px)); }
@media (max-height: 760px) { #mapPanel.mp-big { width: min(460px, calc(100vw - 32px), calc(100vh - 160px)); } }
/* v344: futuristische cockpit: geen losse infomodule op de computer (alles staat in het dashboard), Dienst stoppen onder de navigator */
#busHud.bh-slim { display: none !important; }
.bh-stopnav { position: fixed; z-index: 9; right: 14px; top: calc(max(14px, env(safe-area-inset-top)) + 62px + min(240px, 38vw)); width: min(240px, 38vw); border: 0; border-radius: 10px; background: rgba(18, 60, 105, .92); color: #fff; font: 600 13px system-ui, sans-serif; padding: 9px 12px; cursor: pointer; }
.bh-stopnav:hover { background: #0e3256; }
.bh-stopnav:focus-visible { outline: none; box-shadow: 0 0 0 3px #2A9D8F; }
.bh-stopnav[hidden] { display: none; }

/* v382: avatar-editor: kop met voor/na, korte uitleg onder een keuze */
#hubOpts .wd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
#hubOpts .wd-head h3 { margin: 0; }
#hubOpts .wd-cmp { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; font-size: 12px; }
#hubOpts .wd-cmp[aria-pressed="true"] { background: #f2b33d; color: #1d1d1f; border-color: #f2b33d; }
#hubOpts .wd-hint { margin: 2px 0 10px; font-size: 12px; line-height: 1.45; color: #6b7280; }
