* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  font-weight: 600;
  line-height: var(--lh-body);
  background:
    radial-gradient(circle at 100% 0%, var(--room-accent-soft) 0 140px, transparent 141px),
    radial-gradient(circle at -10% 72%, var(--bg-deco) 0 150px, transparent 151px),
    radial-gradient(var(--bg-dot) 1.1px, transparent 1.6px) 0 0 / 20px 20px,
    var(--bg);
}

body:not([data-pagina])[data-start="thuis"],
body[data-pagina="thuis"] { --room-accent-soft: rgba(255, 200, 61, .30); }

[data-theme="nacht"] body:not([data-pagina])[data-start="thuis"],
[data-theme="nacht"] body[data-pagina="thuis"] { --room-accent-soft: rgba(255, 200, 61, .06); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="dag"]) body:not([data-pagina])[data-start="thuis"],
  :root:not([data-theme="dag"]) body[data-pagina="thuis"] { --room-accent-soft: rgba(255, 200, 61, .06); }
}

body[data-start="kamer"] #thuis { display: none; }
body[data-pagina="chat"] { height: 100%; overflow: hidden; }

button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; cursor: pointer; text-align: inherit; }
a { color: var(--primary-ink); }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

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

.ico { display: block; flex-shrink: 0; }
.logo .logo-ink { fill: var(--text); }
.logo .logo-ai, .logo .logo-tile { fill: var(--brand); }

.btn {
  text-decoration: none;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-s);
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition-property: scale, background-color, box-shadow, color;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}
.btn:active { scale: .96; }
.btn-primary { background: var(--primary); color: var(--primary-text); box-shadow: 0 2px 0 var(--primary-edge); }
.btn-soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn-quiet { color: var(--primary-ink); padding: 0 12px; min-height: 36px; }
.btn-block { width: 100%; }
.btn-l { min-height: 54px; font-size: 17px; }
.btn[disabled] { background: var(--surface-sunken); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }

.icon-btn {
  width: var(--hit);
  height: var(--hit);
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--text);
  flex-shrink: 0;
  text-decoration: none;
  transition-property: background-color, color, scale;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}
.icon-btn:active { scale: .96; }
#meldingen-bel { color: var(--text-muted); }
#meldingen-bel.aan { color: var(--primary-ink); }

.card {
  background: var(--surface);
  border-radius: var(--radius-l);
  padding: var(--space-4);
  box-shadow: var(--shadow-raised);
  transition: var(--theme-transition);
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-ink);
  flex-shrink: 0;
}
.card-ico.tafel { background: var(--table-bg); color: var(--table-ink); }
.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 800;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.card-help {
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.4;
  text-wrap: pretty;
  margin-bottom: var(--space-3);
}

.label { display: block; font-size: var(--fs-small); font-weight: 800; color: var(--text-muted); margin: 0 0 6px 2px; }
.field {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--surface-sunken);
  box-shadow: var(--shadow-inset);
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--text);
  outline: 0;
  transition-property: box-shadow, background-color;
  transition-duration: var(--dur-fast);
}
.field::placeholder { color: var(--text-muted); font-weight: 600; }
.field:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--focus-ring); }
textarea.field { padding: 12px 14px; min-height: 96px; line-height: 1.45; resize: vertical; }
.field:disabled { opacity: .55; }
.hint { font-size: 12.5px; color: var(--text-muted); margin: 6px 2px 0; text-wrap: pretty; font-weight: 700; }
.ok-text { font-size: var(--fs-small); color: var(--success); font-weight: 800; display: flex; gap: 6px; align-items: center; min-height: 1.2em; }
.ok-text:empty, #fout:empty { display: none; }
.err-text { font-size: var(--fs-small); color: var(--danger); font-weight: 800; }

.segment {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 18px;
  background: var(--surface-sunken);
  box-shadow: var(--shadow-inset);
}
.seg {
  position: relative;
  flex: 1 1 auto;
  padding: 0 8px;
  min-height: 44px;
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  color: var(--text-muted);
  transition-property: background-color, color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}
.seg[aria-checked="true"] { background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-bubble); }

.seat-grok { --seat: var(--seat-grok); --seat-on: var(--seat-grok-on); --seat-soft: var(--seat-grok-soft); --seat-ink: var(--seat-grok-ink); }
.seat-gpt { --seat: var(--seat-gpt); --seat-on: var(--seat-gpt-on); --seat-soft: var(--seat-gpt-soft); --seat-ink: var(--seat-gpt-ink); }
.seat-claude { --seat: var(--seat-claude); --seat-on: var(--seat-claude-on); --seat-soft: var(--seat-claude-soft); --seat-ink: var(--seat-claude-ink); }
.seat-av {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  background: var(--seat, var(--text-muted));
  color: var(--seat-on, #fff);
}
.seat-av.grok { border-radius: 9px; background: var(--seat-grok); color: var(--seat-grok-on); }
.seat-av.gpt { border-radius: 50%; background: var(--seat-gpt); color: var(--seat-gpt-on); }
.seat-av.claude { border-radius: 50% 9px 50% 9px; background: var(--seat-claude); color: var(--seat-claude-on); }
.seat-av.s { width: 22px; height: 22px; font-size: 11px; }
.seat-av.s.grok { border-radius: 6px; }
.seat-av.s.claude { border-radius: 50% 6px 50% 6px; }
.seat-av.l { width: 40px; height: 40px; font-size: 18px; }
.seat-av.l.grok { border-radius: 12px; }
.seat-av.l.claude { border-radius: 50% 12px 50% 12px; }
.brand {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 800;
  background: var(--seat-soft);
  color: var(--seat-ink);
  white-space: nowrap;
}
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--text-muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--online); }
.status.wacht::before { background: transparent; box-shadow: inset 0 0 0 2px var(--text-faint); }
.status.live::before { background: var(--online); }

.av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.p1 { background: #C42F68; }
.p2 { background: #0B7468; }
.p3 { background: #2A62C9; }
.p4 { background: #8A5A00; }
.p5 { background: #7B3FA0; }
.name-p1 { color: var(--person-1); }
.name-p2 { color: var(--person-2); }
.name-p3 { color: var(--person-3); }
.name-p4 { color: var(--person-4); }
.name-p5 { color: var(--person-5); }

.room-tile {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--room-accent);
  color: var(--room-accent-text);
  flex-shrink: 0;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .18);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .02em;
}

.idea {
  position: relative;
  background: var(--table-card);
  border-radius: 18px;
  padding: 12px 14px 11px 36px;
  box-shadow: var(--shadow-bubble);
}
.idea::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--table-pin);
  box-shadow: 0 0 0 3px rgba(255, 200, 61, .28);
}
.idea-text { font-size: 15.5px; font-weight: 700; line-height: 1.38; text-wrap: pretty; }
.idea-meta { font-size: 12px; color: var(--text-muted); font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.ideas { display: flex; flex-direction: column; gap: 8px; }

/* start */
.page { min-height: 100dvh; display: flex; flex-direction: column; }
.start-top { padding: max(10px, env(safe-area-inset-top)) 20px 0; display: flex; align-items: center; }
.start-main { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 18px 16px max(24px, env(safe-area-inset-bottom)); }
.hero h1 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
  margin: 0 4px;
}
.hero h1 em { font-style: normal; color: var(--primary-ink); }
.lead { font-size: 17px; line-height: 1.4; color: var(--text-muted); font-weight: 700; margin: 10px 4px 0; text-wrap: pretty; }
.preview { position: relative; padding: 4px 6px 0; display: flex; flex-direction: column; gap: 7px; }
.pv-row { display: flex; gap: 7px; align-items: flex-start; max-width: 88%; }
.pv-row.r { align-self: flex-end; }
.pv-b {
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  background: var(--surface);
  box-shadow: var(--shadow-bubble);
  text-wrap: pretty;
}
.pv-row.l .pv-b { border-top-left-radius: 7px; }
.pv-row.r .pv-b { background: var(--own); color: var(--own-text); border-top-right-radius: 7px; box-shadow: 0 2px 0 var(--own-edge); }
.pv-row.ai .seat-av { margin-top: 4px; }
.pv-row.ai .pv-b { background: var(--seat-soft); border-top-left-radius: 7px; }
.pv-who { display: block; font-family: var(--font-display); font-size: 11.5px; font-weight: 800; margin-bottom: 1px; }
.pv-idea {
  align-self: center;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 13px 7px 10px;
  border-radius: 14px;
  background: var(--table-bg);
  color: var(--table-ink);
  font-size: 13px;
  font-weight: 800;
  rotate: -1.5deg;
}
.pv-desk, .pv-head { display: none; }
.actions { display: flex; flex-direction: column; gap: 12px; }
.or { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 800; color: var(--text-muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--input-ring); }
.code-row { display: flex; gap: 8px; }
.code-field {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.code-field::placeholder { letter-spacing: .04em; font-family: var(--font-body); font-size: 16px; text-transform: none; }
.code-row .btn { min-width: 96px; }
.promise {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 6px;
  text-wrap: pretty;
}
.promise .ico { margin-top: 1px; }

@media (min-width: 960px) {
  #thuis.page { max-width: 1200px; margin: 0 auto; padding: 0 48px; width: 100%; }
  .start-top { padding: 32px 0 0; }
  .start-main {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 72px;
    row-gap: 24px;
    align-content: center;
    padding: 40px 0 56px;
  }
  .hero { grid-column: 1; grid-row: 1; }
  .hero h1 { font-size: var(--fs-hero); line-height: 1.02; margin: 0; }
  .lead { font-size: 20px; margin: 16px 0 0; }
  .actions { grid-column: 1; grid-row: 2; max-width: 460px; }
  .promise { grid-column: 1; grid-row: 3; max-width: 440px; margin: 0 4px; align-self: start; }
  .preview {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    padding: 28px;
    gap: 10px;
    border-radius: 36px;
    background: var(--surface);
    box-shadow: var(--shadow-pop);
    rotate: 1.5deg;
  }
  .pv-b { font-size: 15.5px; padding: 10px 14px; }
  .pv-desk { display: flex; }
  .pv-idea { font-size: 14px; padding: 9px 15px 9px 12px; }
  .pv-head { display: flex; }
}

.pv-head { align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 2px; box-shadow: 0 1px 0 var(--input-ring); }
.pv-head .room-tile { width: 38px; height: 38px; border-radius: 13px; font-size: 14px; }
.pv-head b { font-family: var(--font-display); font-size: 16px; letter-spacing: .08em; }
.pv-head small { display: block; font-size: 12.5px; color: var(--text-muted); font-weight: 700; }

/* instellingen */
#invul.page { max-width: 560px; margin: 0 auto; width: 100%; }
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) 14px 10px 18px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.instel-titel { display: flex; align-items: center; gap: 12px; padding: 6px 18px 14px; }
.instel-titel small { display: block; font-size: 13px; font-weight: 800; color: var(--text-muted); }
.instel-titel h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.cards { display: flex; flex-direction: column; gap: 12px; padding: 0 10px max(32px, env(safe-area-inset-bottom)); }
.code-box {
  border-radius: var(--radius-s);
  background: var(--surface-sunken);
  box-shadow: var(--shadow-inset);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.code-big {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.link-line { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-muted); font-weight: 700; min-width: 0; margin-top: 4px; }
.link-line a { color: var(--text-muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-weight: 700; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me-line { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; margin: 8px 0 14px; }
.me-line .av { width: 36px; height: 36px; font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.sub-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 2px 6px; }
.sub-label .label, .sub-label .hint { margin: 0; }
.my-seat { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 18px; background: var(--surface-sunken); }
.my-seat .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.my-seat .meta b { font-family: var(--font-display); font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.my-seat .aanspreeknaam { min-height: 40px; margin-top: 4px; }
.pending {
  margin-top: -4px;
  padding: 10px 12px 12px;
  border-radius: 0 0 18px 18px;
  background: var(--surface-sunken);
  box-shadow: inset 0 1px 0 var(--input-ring);
}
.pending-code { font-family: var(--font-mono); font-size: 20px; font-weight: 700; letter-spacing: .12em; color: var(--text); }
.pending p { font-size: 13px; color: var(--text-muted); font-weight: 700; line-height: 1.4; text-wrap: pretty; }
.my-seat.has-pending,
.my-seat.has-wekker { border-radius: 18px 18px 0 0; }
.wekker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: -4px;
  padding: 8px 12px 14px;
  border-radius: 0 0 18px 18px;
  background: var(--surface-sunken);
  box-shadow: inset 0 1px 0 var(--input-ring);
}
.wekker .sub-label { margin-top: 4px; }
.wekker .label { margin-bottom: 0; }
.wekker .hint { margin-top: 0; }
.wekker .segment { margin: 2px 0; }
.brands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.brand-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border-radius: 18px;
  background: var(--surface-sunken);
  box-shadow: var(--shadow-inset);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  min-height: 88px;
  transition-property: background-color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}
.brand-opt small { font-size: 11.5px; color: var(--text-muted); font-weight: 700; min-height: 1em; }
.brand-opt[aria-checked="true"] { background: var(--surface-raised); box-shadow: inset 0 0 0 2px var(--primary), var(--shadow-bubble); }
.brand-opt[aria-checked="true"]::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.brand-opt[aria-disabled="true"] { opacity: .55; }
fieldset { border: 0; min-width: 0; padding: 0; }
fieldset[disabled] .brand-opt,
fieldset[disabled] .field,
fieldset[disabled] .btn { opacity: .55; }
.locked {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 13.5px;
  font-weight: 800;
}
.people { display: flex; flex-direction: column; }
.person { display: flex; gap: 12px; padding: 10px 2px; box-shadow: 0 1px 0 var(--input-ring); }
.person:last-child { box-shadow: none; }
.person .info { flex: 1; min-width: 0; }
.person .pname { font-size: 16px; font-weight: 800; display: flex; gap: 6px; align-items: center; min-height: 30px; flex-wrap: wrap; }
.tag-jij { font-size: 11.5px; font-weight: 800; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--primary-ink); }
.seat-chips { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.seat-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; flex-wrap: wrap; }
.seat-chip .status { margin-left: auto; }
.rules { counter-reset: r; display: flex; flex-direction: column; gap: 10px; }
.rules li { counter-increment: r; display: flex; gap: 10px; font-size: 15px; line-height: 1.4; font-weight: 700; text-wrap: pretty; }
.rules li::before {
  content: counter(r);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: -1px;
}
#geen-kamer { padding: 24px 16px; font-weight: 800; }

/* chat */
#chat.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.top {
  padding: max(8px, env(safe-area-inset-top)) 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 3;
}
.desk-logo { display: none; }
.head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 8px 8px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  transition: var(--theme-transition);
}
.head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.code {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.who-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.seats { display: flex; gap: 3px; }
.who-names { font-size: 13px; color: var(--text-muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-only { display: none; }
.strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 4px 6px 6px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  text-align: left;
  width: 100%;
  color: var(--text);
  transition-property: scale, background-color, box-shadow;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}
.strip:active { scale: .98; }
.strip-ico { width: 40px; height: 40px; border-radius: 16px; display: grid; place-items: center; background: var(--table-bg); color: var(--table-ink); flex-shrink: 0; }
.strip-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.strip-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 800; display: flex; gap: 6px; align-items: baseline; }
.strip-title small { font-family: var(--font-body); font-size: 12.5px; color: var(--text-muted); font-weight: 800; }
.strip-last { font-size: 13.5px; color: var(--text-muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-chev { width: 44px; height: 40px; display: grid; place-items: center; color: var(--text-muted); }
.chat-kolom { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#berichten {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 6px;
  overscroll-behavior: contain;
}
#berichten::before { content: ""; margin-top: auto; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.msg .who { font-family: var(--font-display); font-size: 12.5px; font-weight: 800; margin: 0 0 2px 14px; }
.bubble {
  padding: 9px 14px 8px;
  border-radius: var(--radius-bubble);
  font-size: 15.5px;
  line-height: 1.36;
  text-wrap: pretty;
  overflow-wrap: anywhere;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-bubble);
  transition: var(--theme-transition);
}
.ander .bubble { border-top-left-radius: var(--radius-tail); }
.time { font-size: 11.5px; color: var(--text-muted); margin-left: 8px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eigen { align-self: flex-end; align-items: flex-end; }
.eigen .bubble { background: var(--own); color: var(--own-text); border-top-right-radius: var(--radius-tail); box-shadow: 0 2px 0 var(--own-edge), var(--shadow-bubble); }
.eigen .time { color: var(--own-text); }
.stoel { flex-direction: row; align-items: flex-start; gap: 8px; max-width: 92%; }
.stoel .seat-av { margin-top: 21px; }
.ai-label { display: flex; align-items: center; gap: 6px; margin: 0 0 3px 4px; flex-wrap: wrap; }
.ai-label b { font-family: var(--font-display); font-size: 13.5px; font-weight: 800; color: var(--seat-ink); }
.ai-label .of { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.stoel .bubble { background: var(--seat-soft); border-top-left-radius: var(--radius-tail); }
.notice {
  align-self: center;
  max-width: 90%;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--notice-bg);
  color: var(--notice-text);
  text-wrap: balance;
  margin: 2px 0;
}
.notice-tafel { padding: 0; background: transparent; }
.notice-knop {
  display: flex;
  gap: 8px;
  align-items: center;
  text-align: left;
  background: var(--table-bg);
  color: var(--table-ink);
  padding: 7px 14px 7px 10px;
  border-radius: 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-wrap: pretty;
  position: relative;
}
.notice-knop::before { content: ""; position: absolute; inset: -4px 0; }
.composer-wrap { padding: 4px 10px max(22px, env(safe-area-inset-bottom)); }
.chips { display: flex; gap: 8px; margin: 0 0 8px; overflow-x: auto; }
.chip {
  position: relative;
  flex-shrink: 0;
  height: 36px;
  padding: 0 11px 0 7px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
  background: var(--chip-bg);
  color: var(--chip-text);
  box-shadow: var(--shadow-bubble);
  transition-property: scale, background-color;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}
.chip::before { content: ""; position: absolute; inset: -4px 0; }
.chip:active { scale: .96; }
.chip.tafel-chip { padding-left: 11px; background: var(--table-bg); color: var(--table-ink); box-shadow: none; }
.composer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 18px;
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  transition-property: box-shadow, background-color;
  transition-duration: var(--dur-fast);
}
.composer:focus-within { box-shadow: var(--shadow-raised), inset 0 0 0 2px var(--focus-ring); }
.composer input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
}
.composer input::placeholder { color: var(--text-muted); font-weight: 600; }
.send {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-m);
  background: var(--own);
  color: var(--own-text);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 0 var(--own-edge);
  transition-property: scale, background-color, opacity;
  transition-duration: var(--dur-fast);
  transition-timing-function: ease-out;
}
.send:active { scale: .96; }
.send:disabled { opacity: .55; }

.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 10; display: none; }
html[data-sheet="open"] #chat .scrim { display: block; }
.tafel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  max-height: 82%;
  overflow: auto;
  padding: 8px 14px max(26px, env(safe-area-inset-bottom));
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sheet);
  display: none;
}
html[data-sheet="open"] #chat .tafel { display: block; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--text-faint); opacity: .6; margin: 0 auto 12px; }
.tafel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tafel-head h2 { flex: 1; font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.02em; }
.tafel-help { font-size: 13.5px; color: var(--text-muted); line-height: 1.4; margin: 0 2px 14px; text-wrap: pretty; font-weight: 700; }
.sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  margin: 0 2px 8px;
}
.sec-title small { font-family: var(--font-body); font-size: 12.5px; color: var(--text-muted); font-weight: 800; }
.dossier {
  background: var(--surface-sunken);
  box-shadow: var(--shadow-inset);
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
  text-wrap: pretty;
  white-space: pre-line;
  min-height: 48px;
}
.dossier:empty::before { content: "nog leeg"; color: var(--text-muted); }
.tafel-sec { margin-bottom: 18px; }
.tafel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 0 6px 0 14px;
  border-radius: 16px;
  background: var(--surface-sunken);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}
.wie-mini { display: flex; flex-direction: column; gap: 8px; }
.wie-mini li { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.wie-mini .seat-tag { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); font-weight: 700; }
.desk-only-sec { display: none; }

@media (min-width: 960px) {
  #chat.app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100dvh;
  }
  #chat .top { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 20px; padding: 16px 24px 8px; }
  .desk-logo { display: block; flex-shrink: 0; padding: 0 4px; }
  #chat .head { flex: 1; }
  #chat .desk-only { display: inline-flex; }
  #chat .strip { display: none; }
  #chat .chat-kolom { grid-column: 1; padding: 0 24px; align-items: center; }
  #chat #berichten, #chat .composer-wrap { width: 100%; max-width: 760px; }
  #chat #berichten { padding: 16px 8px 8px; gap: 9px; }
  #chat .msg { max-width: 72%; }
  #chat .stoel { max-width: 78%; }
  #chat .composer-wrap { padding: 6px 0 24px; }
  #chat .chips { overflow: visible; }
  #chat .scrim { display: none !important; }
  #chat .tafel {
    display: block;
    position: static;
    grid-column: 2;
    grid-row: 2;
    max-height: none;
    margin: 8px 24px 24px 0;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-raised);
    background: var(--surface);
    padding: 18px;
    overflow: auto;
  }
  #chat .grabber, #chat .tafel-close { display: none; }
  #chat .desk-only-sec { display: block; }
}

@media (max-width: 380px) {
  .seg { font-size: 13px; padding: 0 4px; gap: 3px; }
  .code-big { font-size: 28px; letter-spacing: .12em; }
}
