:root {
  --ink: #18212b;
  --muted: #6a7682;
  --line: rgba(24, 33, 43, 0.1);
  --card: rgba(255, 255, 255, 0.88);
  --accent: #f2a33a;
  --brand: #17191b;
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --app-h: 100dvh;
  --tab-h: 58px;
  --bar: #f4f5f7; /* warna bar menu bawah (HP) */
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --gap: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #cfdde8; color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.hero { position: fixed; inset: 0; height: var(--app-h); overflow: hidden; }
/* mode aplikasi iOS: halaman setinggi layar fisik (lihat skrip di index.html); latar disamakan dengan bar menu supaya tidak belang */
html.ios-app, html.ios-app body { height: var(--app-h, 100%); background: var(--bar); }
html.ios-app .hero { position: absolute; top: 0; left: 0; right: 0; bottom: auto; }
#scene, #labels { position: absolute; inset: 0; }
#scene canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
#labels { pointer-events: none; overflow: hidden; }

/* ---------- label di dalam 3D */
.tag { font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 999px; background: rgba(23, 25, 27, 0.78); color: #fff; white-space: nowrap; letter-spacing: 0.01em; transform: translateY(-4px); }
.tag i { font-style: normal; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.bubble { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px); max-width: 210px; width: max-content; padding: 6px 10px; border-radius: 12px 12px 12px 3px; background: #fff; color: var(--ink); font-size: 12px; line-height: 1.3; font-weight: 500; box-shadow: 0 6px 18px rgba(10, 20, 30, 0.22); opacity: 0; transition: opacity 0.25s; }
.bubble.on { opacity: 1; }
.who { position: relative; display: flex; flex-direction: column; align-items: center; }
.room-tag { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: rgba(15, 30, 40, 0.62); padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
.no-labels .tag, .no-labels .room-tag { display: none; }

/* ---------- HUD */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud > *, .col > * { pointer-events: auto; }
.card { background: var(--card); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(12, 24, 36, 0.14); }
.muted { color: var(--muted); font-weight: 500; }
.x { font-size: 22px; line-height: 1; color: var(--muted); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.x:hover { background: rgba(24, 33, 43, 0.07); }

.brand { position: absolute; top: calc(max(10px, var(--st)) + 0px); left: max(var(--gap), var(--sl)); display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); background: var(--card); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 15px; padding: 4px 14px 4px 4px; box-shadow: 0 8px 28px rgba(12, 24, 36, 0.14); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: var(--accent); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 23px; height: 23px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; letter-spacing: 0.01em; font-weight: 800; }
.brand-text b { white-space: nowrap; }
.brand-text i { font-style: normal; font-size: 11.5px; color: #3a4652; font-weight: 550; }

.hud-tools { position: absolute; top: max(10px, var(--st)); right: max(var(--gap), var(--sr)); display: flex; gap: 8px; align-items: center; }
.tool-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; }
.tool-btn svg { width: 19px; height: 19px; }
.tool-btn[aria-pressed="true"] { background: var(--brand); color: var(--accent); border-color: transparent; }
.cta { height: 40px; padding: 0 16px; border-radius: 12px; background: var(--accent); color: #1b1407; font-weight: 750; font-size: 14px; box-shadow: 0 8px 22px rgba(160, 100, 10, 0.3); }
.cta:hover { filter: brightness(1.05); }
.cta[aria-expanded="true"] { background: var(--brand); color: #fff; box-shadow: none; }

.status-pill { display: none; }

.col { position: absolute; top: calc(max(10px, var(--st)) + 58px); display: flex; flex-direction: column; gap: 10px; width: 268px; max-height: calc(var(--app-h) - 150px - var(--st)); pointer-events: none; }
.col-left { left: max(var(--gap), var(--sl)); }
.col-right { right: max(var(--gap), var(--sr)); }
.sheet-head { display: none; }
.sheet-note { display: none; font-size: 11.5px; color: var(--muted); margin-top: 9px; line-height: 1.35; }

.hud-status { padding: 12px 13px 11px; }
.status-row { display: flex; align-items: center; gap: 8px; }
.chip { font-size: 11px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: #dff3e8; color: #17694a; white-space: nowrap; }
.chip.rest { background: #fff0d6; color: #8a5a0b; }
.chip.off { background: #e4e8ee; color: #4b5866; }
.chip.meet { background: #dfe9fb; color: #244f9c; }
.clock { font-size: 12.5px; font-weight: 600; color: #33404d; font-variant-numeric: tabular-nums; }
.status-title { margin-top: 7px; font-size: 15px; font-weight: 750; }
.times { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.times button { font-size: 11.5px; font-weight: 650; padding: 5px 10px; border-radius: 999px; background: rgba(24, 33, 43, 0.07); color: #33404d; }
.times button:hover { background: rgba(24, 33, 43, 0.13); }
.times button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.times button[data-time="live"][aria-pressed="true"]::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3ddc84; margin-right: 5px; vertical-align: 1px; }

.fold { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.fold-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 13px; font-size: 12px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: #33404d; text-align: left; flex: none; }
.fold-head .caret { margin-left: auto; transition: transform 0.2s; color: var(--muted); }
.fold-head .count { font-size: 11px; background: rgba(24, 33, 43, 0.08); padding: 1px 7px; border-radius: 999px; letter-spacing: 0; }
.fold[data-open="false"] .caret { transform: rotate(-90deg); }
.fold[data-open="false"] > ul, .fold[data-open="false"] > ol { display: none; }
.fold > ul, .fold > ol { overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }

.rooms { padding: 5px; }
.rooms .floor { font-size: 10.5px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 7px 8px 3px; }
.rooms button { display: flex; align-items: center; width: 100%; gap: 8px; padding: 6px 8px; border-radius: 9px; font-size: 13px; font-weight: 600; text-align: left; }
.rooms button:hover, .rooms button[aria-pressed="true"] { background: rgba(24, 33, 43, 0.07); }
.rooms button[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--accent); }
.rooms .n { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 999px; background: rgba(24, 33, 43, 0.07); color: var(--muted); }
.rooms .n.has { background: #dff3e8; color: #17694a; }

.team { padding: 5px; }
.team button { display: grid; grid-template-columns: 10px 1fr; column-gap: 9px; width: 100%; padding: 6px 8px; border-radius: 9px; text-align: left; align-items: baseline; }
.team button:hover { background: rgba(24, 33, 43, 0.07); }
.team .d { width: 9px; height: 9px; border-radius: 50%; align-self: center; grid-row: span 2; }
.team .nm { font-size: 13px; font-weight: 700; }
.team .nm small { font-weight: 550; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.team .do { font-size: 11.5px; color: #4b5866; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team .away .nm, .team .away .do { opacity: 0.5; }

.dot.live { width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 0 rgba(47, 191, 113, 0.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { to { box-shadow: 0 0 0 9px rgba(47, 191, 113, 0); } }
.chat-list { max-height: 250px; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 7px; }
.chat-list li { font-size: 12.5px; line-height: 1.35; animation: rise 0.3s ease-out; }
.chat-list li b { font-weight: 700; }
.chat-list li time { color: var(--muted); font-size: 10.5px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.chat-list .empty { color: var(--muted); font-style: italic; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }

/* ---------- panel layanan */
.services { position: absolute; top: calc(max(10px, var(--st)) + 58px); right: max(var(--gap), var(--sr)); width: min(410px, calc(100vw - 28px)); max-height: calc(var(--app-h) - 150px - var(--st)); display: none; flex-direction: column; overflow: hidden; z-index: 4; background: rgba(255, 255, 255, 0.94); }
.services.open { display: flex; animation: drop 0.22s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.sv-open .col-right { display: none; }
.sv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 12px 10px 18px; flex: none; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase; color: #a8660b; }
.sv-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; margin-top: 3px; }
.sv-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 18px; -webkit-overflow-scrolling: touch; }
.sv-lead { font-size: 15px; line-height: 1.5; color: #27333f; }
.sv-body h2 { font-size: 11.5px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.sv-list { display: flex; flex-direction: column; gap: 8px; }
.sv-list li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(24, 33, 43, 0.045); }
.sv-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: var(--accent); display: grid; place-items: center; }
.sv-ic svg { width: 23px; height: 23px; }
.sv-list h3 { font-size: 15px; font-weight: 750; }
.sv-list p { font-size: 13.5px; line-height: 1.45; color: #3a4652; margin-top: 3px; }
.sv-more { font-size: 13.5px; line-height: 1.45; color: #3a4652; margin-top: 12px; }
.sv-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sv-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.btn.accent { background: var(--accent); color: #1b1407; }
.btn.ghost { background: rgba(24, 33, 43, 0.07); color: var(--ink); }
.sv-ios { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.4; }

/* ---------- chat dengan CEO */
.popup { display: none; }
.popup.open { display: flex; }
.chat { position: absolute; right: max(var(--gap), var(--sr)); bottom: 78px; width: min(370px, calc(100vw - 28px)); height: min(560px, calc(var(--app-h) - 160px)); flex-direction: column; overflow: hidden; z-index: 6; background: rgba(255, 255, 255, 0.97); }
.chat.open { animation: rise 0.2s ease-out; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--line); flex: none; }
.chat-ava { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; display: grid; place-items: center; flex: none; }
.chat-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.chat-title b { font-size: 15px; }
.chat-title span { font-size: 12px; color: var(--muted); }
.chat-thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.chat-thread[hidden] { display: none; }
.chat-day { align-self: center; font-size: 11px; font-weight: 650; color: var(--muted); background: rgba(24, 33, 43, 0.06); padding: 2px 9px; border-radius: 999px; margin: 4px 0; }
.msg { max-width: 84%; display: flex; flex-direction: column; }
.msg p { padding: 8px 11px; border-radius: 14px; font-size: 14.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { font-size: 10.5px; color: var(--muted); margin: 2px 4px 0; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.me p { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.ceo { align-self: flex-start; }
.msg.ceo p { background: rgba(24, 33, 43, 0.07); border-bottom-left-radius: 4px; }
.chat-form { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-form[hidden], .chat-compose[hidden] { display: none; }
.chat-intro { font-size: 14px; line-height: 1.45; color: #33404d; }
.chat-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #33404d; }
.chat-form label i { font-style: normal; font-weight: 500; color: var(--muted); }
.chat input, .chat textarea { font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid rgba(24, 33, 43, 0.18); border-radius: 10px; padding: 9px 11px; width: 100%; resize: none; outline: none; }
.chat input:focus, .chat textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242, 163, 58, 0.3); }
.chat .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); flex: none; }
.chat-compose textarea { max-height: 120px; border-radius: 18px; }
.chat-go { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #1b1407; display: grid; place-items: center; flex: none; }
.chat-go svg { width: 21px; height: 21px; }
.chat-err { margin: 0 12px 6px; font-size: 13px; font-weight: 600; color: #a3261b; background: #fdecea; border-radius: 9px; padding: 7px 10px; flex: none; }
.chat-note { font-size: 11px; color: var(--muted); text-align: center; padding: 0 12px 8px; flex: none; }
.chat-fab { position: absolute; right: max(var(--gap), var(--sr)); bottom: max(var(--gap), var(--sb)); width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #1b1407; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(160, 100, 10, 0.38); z-index: 5; }
.chat-fab svg { width: 26px; height: 26px; }
.chat-fab:hover { filter: brightness(1.05); }
.fab-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #d93025; color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.pc-actions .btn-small { margin-top: 0; }
.btn-small.accent { background: var(--accent); color: #1b1407; }
.pc-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.hud-hidden .chat-fab { display: none !important; }

/* ---------- bawah */
.hud-bottom { position: absolute; left: 0; right: 0; bottom: max(var(--gap), var(--sb)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 10px; }
.hud-views { pointer-events: auto; display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--card); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 8px 28px rgba(12, 24, 36, 0.16); max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hud-views::-webkit-scrollbar { display: none; }
.hud-views button { font-size: 13px; font-weight: 650; padding: 8px 14px; border-radius: 999px; white-space: nowrap; color: #33404d; flex: none; }
.hud-views button:hover { background: rgba(24, 33, 43, 0.07); }
.hud-views button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.hud-hint { font-size: 12px; font-weight: 550; color: #2a3642; background: rgba(255, 255, 255, 0.78); padding: 5px 12px; border-radius: 999px; transition: opacity 0.6s; text-align: center; }
.hud-hint.gone { opacity: 0; }
.tabbar { display: none; }

.person-card { position: absolute; right: max(var(--gap), var(--sr)); bottom: 78px; width: 268px; padding: 13px 14px 14px; z-index: 5; }
.person-card .x { position: absolute; top: 4px; right: 4px; }
.pc-name { display: flex; align-items: center; gap: 8px; font-size: 15.5px; padding-right: 30px; }
.pc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pc-role { font-size: 12px; color: var(--muted); margin: 2px 0 9px 18px; font-weight: 550; }
.pc-label { font-size: 10.5px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-top: 7px; }
.pc-doing { font-size: 13.5px; font-weight: 600; margin-top: 1px; }
.pc-said { font-size: 13px; font-style: italic; color: #33404d; margin-top: 1px; }
.btn-small { margin-top: 11px; font-size: 13px; font-weight: 700; min-height: 38px; padding: 0 15px; border-radius: 999px; background: var(--brand); color: #fff; }

.toast { position: absolute; left: 50%; top: calc(max(10px, var(--st)) + 58px); transform: translateX(-50%); padding: 9px 15px; font-size: 13px; font-weight: 600; width: max-content; max-width: min(92vw, 440px); text-align: center; z-index: 8; }

.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: linear-gradient(#9fc0dc, #e9eef0); font-size: 14px; font-weight: 600; color: #2a3642; transition: opacity 0.6s; z-index: 20; padding: 24px; text-align: center; }
.loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(24, 33, 43, 0.15); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hud-hidden .col, .hud-hidden .hud-bottom, .hud-hidden .person-card, .hud-hidden .brand, .hud-hidden .panel, .hud-hidden .tabbar, .hud-hidden .status-pill, .hud-hidden .cta { display: none !important; }

@media (max-width: 1000px) and (min-width: 761px) and (min-height: 521px) {
  .col-right { display: none; }
}

/* ================= HP (potret & lanskap): menu jadi tab bawah, panel jadi lembar geser ================= */
@media (max-width: 760px), (max-height: 520px) {
  :root { --gap: 10px; }
  .brand { padding: 3px 12px 3px 3px; border-radius: 14px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text i { display: none; }
  .brand-text b { font-size: 15.5px; }
  .cta { display: none; }
  .hud-tools { gap: 6px; }

  .status-pill { display: flex; align-items: center; gap: 7px; position: absolute; top: calc(max(10px, var(--st)) + 50px); left: max(var(--gap), var(--sl)); padding: 6px 11px 6px 7px; border-radius: 999px; font-size: 12.5px; max-width: calc(100vw - 20px); }
  .status-pill .clock { font-size: 12.5px; }

  .col { display: contents; }
  .panel { position: absolute; top: auto; left: max(8px, var(--sl)); right: max(8px, var(--sr)); bottom: calc(var(--tab-h) + var(--sb) + 8px); width: auto; max-height: min(72vh, calc(var(--app-h) - var(--tab-h) - var(--sb) - var(--st) - 70px)); display: none; flex-direction: column; overflow: hidden; z-index: 6; border-radius: 18px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 -4px 36px rgba(12, 24, 36, 0.28); }
  .panel.open { display: flex; animation: sheet 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
  @keyframes sheet { from { opacity: 0; transform: translateY(26px); } }
  .services, .services.open { top: auto; right: max(8px, var(--sr)); width: auto; max-height: calc(var(--app-h) - var(--tab-h) - var(--sb) - var(--st) - 64px); }
  .sv-open .col-right { display: contents; }

  .sheet-head { display: flex; align-items: center; justify-content: space-between; margin: -4px -6px 6px 0; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #33404d; }
  .hud-status { padding: 12px 14px 14px; overflow-y: auto; }
  .status-title { font-size: 16px; }
  .times { gap: 7px; margin-top: 12px; }
  .times button { font-size: 14px; padding: 10px 15px; }
  .sheet-note { display: block; font-size: 12.5px; }

  /* di HP daftar selalu terbuka; kepala panel jadi judul lembar + tombol tutup */
  .fold[data-open] > ul, .fold[data-open] > ol { display: block; flex: 1; min-height: 0; }
  .fold[data-open] > .chat-list { display: flex; max-height: none; }
  .fold-head { padding: 13px 10px 11px 16px; font-size: 12.5px; }
  .fold-head .caret, .fold[data-open="false"] .caret { transform: none; font-size: 0; width: 32px; height: 32px; display: grid; place-items: center; }
  .fold-head .caret::before { content: "×"; font-size: 22px; line-height: 1; }
  .rooms { padding: 6px; }
  .rooms button { padding: 12px 12px; font-size: 15px; border-radius: 11px; }
  .rooms .floor { padding: 10px 12px 4px; font-size: 11px; }
  .rooms .n { font-size: 12px; padding: 2px 8px; }
  .team { padding: 6px; }
  .team button { padding: 10px 12px; border-radius: 11px; }
  .team .nm { font-size: 15px; }
  .team .nm small { font-size: 12.5px; }
  .team .do { font-size: 13px; margin-top: 1px; }
  .chat-list { padding: 12px 16px 14px; gap: 9px; min-height: 90px; }
  .chat-list li { font-size: 14px; }
  .chat-list li time { font-size: 11.5px; }

  .sv-head { padding: 16px 10px 8px 18px; }
  .sv-head h1 { font-size: 25px; }
  .sv-body { padding: 0 16px 18px; }
  .sv-foot .btn, .sv-cta .btn { flex: 1 1 auto; }

  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--sb)); padding: 0 max(4px, var(--sr)) var(--sb) max(4px, var(--sl)); background: var(--bar); border-top: 1px solid rgba(24, 33, 43, 0.1); z-index: 7; }
  .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 650; color: #52606d; min-width: 0; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar button[aria-pressed="true"] { color: var(--brand); }
  .tabbar button[aria-pressed="true"] svg { stroke-width: 2.5; }
  .tabbar .tab-main { color: #a8660b; }
  .tabbar .tab-main svg { fill: rgba(242, 163, 58, 0.25); }

  .hud-bottom { bottom: calc(var(--tab-h) + var(--sb) + 8px); gap: 6px; padding: 0 max(8px, var(--sr)) 0 max(8px, var(--sl)); }
  .hud-views { border-radius: 16px; justify-content: flex-start; width: 100%; }
  .hud-views button { padding: 9px 13px; font-size: 13.5px; }
  .hud-hint { font-size: 11.5px; padding: 5px 11px; }

  .person-card { left: max(8px, var(--sl)); right: max(8px, var(--sr)); width: auto; bottom: calc(var(--tab-h) + var(--sb) + 62px); }
  .chat, .chat.open { right: max(8px, var(--sr)); width: auto; height: auto; top: calc(max(10px, var(--st)) + 52px); max-height: none; }
  .chat-fab { right: max(10px, var(--sr)); bottom: calc(var(--tab-h) + var(--sb) + 62px); width: 50px; height: 50px; }
  .panel-open .chat-fab, #person-card:not([hidden]) ~ .chat-fab { display: none; }
  /* papan ketik terbuka: lembar chat menempel di atas papan ketik, menu bawah disembunyikan */
  .kb-open .chat.open { bottom: calc(var(--kb, 0px) + 6px); top: calc(max(10px, var(--st)) + 6px); z-index: 9; }
  .toast { top: calc(max(10px, var(--st)) + 88px); }
  .tag { font-size: 10px; }
  .room-tag { font-size: 10.5px; padding: 3px 7px; }
  .bubble { font-size: 11.5px; max-width: 170px; }
}
/* HP lanskap: ruang vertikal sempit */
@media (max-height: 520px) {
  .chat, .chat.open { top: calc(max(10px, var(--st)) + 4px); }
  .hud-hint { display: none; }
  .status-pill { top: max(10px, var(--st)); left: auto; right: calc(max(var(--gap), var(--sr)) + 144px); height: 40px; }
  .panel, .services, .services.open { left: auto; width: min(420px, calc(100vw - 16px)); max-height: calc(var(--app-h) - var(--tab-h) - var(--sb) - var(--st) - 16px); }
  .person-card { left: auto; width: 280px; }
  .toast { top: calc(max(10px, var(--st)) + 50px); }
}
@media (max-width: 360px) {
  .tool-btn { width: 36px; height: 36px; }
  .brand-text b { font-size: 14.5px; }
  .tabbar button { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
