/* ================= Cafe ala WorkAdventure: bilah suara & musik ================= */
.yt-host { position: relative; flex: none; width: 96px; height: 54px; border-radius: 6px; overflow: hidden; background: #000; }
.yt-host iframe, .yt-host #yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.yt-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; background: #163a2d; }
.cb-npi { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.cb-npi small { font-size: 11.5px; color: #bfe3d4; font-weight: 700; }
.cb-npi b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.cbb { flex: none; min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, 0.25); color: #fff; font: 800 15px var(--font); cursor: pointer; }
.cbb:hover:not(:disabled) { background: rgba(0, 0, 0, 0.42); }
.cbb:disabled { opacity: 0.4; cursor: default; }
.cbb.wide { font-size: 13px; }
.cbb.ok { background: #3fa79a; }
.cbb.bad { background: #b8392f; }
.yt-tap { justify-self: center; padding: 8px 14px; border: 0; border-radius: 9px; background: #c4302b; color: #fff; font: 800 14px var(--font); cursor: pointer; }
.vc-note { margin: 0; font-size: 12.5px; line-height: 1.4; color: #ffe08a; font-weight: 600; }
.vc-note a { color: #9fe0ff; word-break: break-all; }

/* ================= Jukebox (antrian & playlist) ================= */
.juke { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 14px 18px 16px; position: relative; }
.jk-head { display: flex; align-items: center; gap: 12px; }
.jk-head h2 { margin: 0; font-size: 21px; font-weight: 800; }
.jk-sub { margin: 0; font-size: 13.5px; color: var(--muted); }
.jk-head .close-x { margin-left: auto; }
.jk-ico { width: 44px; height: 44px; display: grid; place-items: center; font-size: 24px; background: #c04a3e; border: 3px solid var(--ink); border-radius: 10px; box-shadow: inset 0 -3px 0 #8a2b24; }
.jk-now { display: flex; gap: 12px; margin: 12px 0; padding: 10px; background: #fff; border: 2px solid var(--paper-2); border-radius: 10px; }
.jk-now img { flex: none; width: 128px; height: 72px; object-fit: cover; border-radius: 7px; background: #000; }
.jk-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.jk-info b { font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jk-info small { color: var(--muted); font-size: 12.5px; }
.np-seek { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.np-seek input { flex: 1; accent-color: var(--accent); }
.np-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vol { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.vol input { width: 90px; accent-color: var(--accent); }
.mu-add { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.mu-add input { flex: 1; min-width: 140px; padding: 8px 10px; font: inherit; border: 2px solid var(--wood-lo); border-radius: 8px; background: #fff; color: var(--text); }
.mu-tabs { display: flex; gap: 4px; border-bottom: 3px solid var(--paper-2); margin-bottom: 8px; }
.mu-tabs button { padding: 7px 12px; border: 0; background: none; color: var(--muted); font: 800 15px var(--font); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.mu-tabs button.on { color: var(--text); border-color: var(--accent); }
.mu-pane { display: grid; gap: 8px; align-content: start; }
.q-tools { display: flex; gap: 6px; justify-content: flex-end; }
.q-list, .pl-list, .pl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.q-list li, .pl-items li { display: flex; align-items: center; gap: 8px; padding: 5px; border-radius: 8px; background: #fff; border: 1px solid var(--paper-2); }
.q-list li.none, .pl-list li.none, .pl-items li.none { display: block; padding: 10px; color: var(--muted); font-size: 13.5px; background: none; border: 0; }
.q-list img, .pl-items img { flex: none; width: 52px; height: 39px; object-fit: cover; border-radius: 5px; background: #000; }
.qi { min-width: 0; flex: 1; display: grid; line-height: 1.2; }
.qi b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-act { display: flex; gap: 1px; }
.q-act button, .pl-items button { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-weight: 800; }
.q-act button:hover:not(:disabled), .pl-items button:hover { background: var(--paper-2); color: var(--text); }
.q-act button:disabled { opacity: 0.3; }
.q-act button.arm { background: #b8392f; color: #fff; }
.pl { padding: 8px; border-radius: 9px; background: #fff; border: 1px solid var(--paper-2); display: grid; gap: 6px; }
.pl-h { display: flex; align-items: baseline; gap: 8px; }
.pl-name { border: 0; background: none; padding: 0; font: 800 15px var(--font); cursor: pointer; text-align: left; color: var(--text); }
.pl-h small { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.pl-act { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-items span { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-menu { position: fixed; z-index: 80; width: 210px; display: grid; gap: 2px; padding: 6px; background: var(--paper); color: var(--text); border: 3px solid var(--ink); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); font: 14px var(--font); }
.pl-menu b { padding: 4px 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.pl-menu button { border: 0; background: none; color: inherit; text-align: left; padding: 7px 8px; border-radius: 7px; cursor: pointer; font: inherit; }
.pl-menu button:hover { background: var(--paper-2); }
.jk-toast { position: sticky; bottom: 0; margin-top: 10px; padding: 9px 14px; border-radius: 10px; background: #1f4a3a; color: #fff; font-weight: 800; text-align: center; }
.jk-toast.bad { background: #b8392f; }

/* ================= Bilah ketik & perintah "/" ================= */
.chatbar { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 45; width: min(560px, calc(100vw - 24px)); }
.chatbar[hidden] { display: none; }
.cb-row { display: flex; gap: 6px; padding: 6px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 rgba(20, 12, 6, 0.45); }
.cb-row input { flex: 1; min-width: 0; padding: 9px 10px; font: 600 16px var(--font); border: 2px solid var(--wood-lo); border-radius: 8px; background: #fff; color: var(--text); outline: 0; }
.cb-row input:focus { border-color: var(--accent); }
.cb-send, .cb-x { flex: none; width: 42px; border: 2px solid var(--ink); border-radius: 8px; background: var(--accent); color: #fff; font: 800 18px var(--font); cursor: pointer; }
.cb-x { background: var(--paper-2); color: var(--text); }
.cb-sug { list-style: none; margin: 0 0 6px; padding: 4px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 rgba(20, 12, 6, 0.45); display: grid; gap: 2px; max-height: 50vh; overflow: auto; }
.cb-sug[hidden] { display: none; }
.cb-sug li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.cb-sug li.on, .cb-sug li:hover { background: var(--wood); color: var(--paper); }
.cb-sug li.locked { opacity: 0.6; }
.cb-sug .cb-i { width: 22px; text-align: center; }
.cb-sug b { font-weight: 800; }
.cb-sug small { margin-left: auto; font-size: 12px; opacity: 0.8; }
.chatfeed { position: fixed; left: 12px; bottom: 96px; z-index: 25; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; max-width: min(380px, calc(100vw - 24px)); pointer-events: none; }
.chatfeed > * { pointer-events: auto; }
.cf-toggle { position: relative; width: 42px; height: 42px; border: 3px solid var(--ink); border-radius: 10px; background: var(--paper); font-size: 20px; cursor: pointer; box-shadow: 0 3px 0 rgba(20, 12, 6, 0.45); }
.cf-toggle i { position: absolute; right: -8px; top: -8px; min-width: 20px; padding: 0 5px; border-radius: 10px; background: #d9534f; color: #fff; font: 800 12px/20px var(--font); font-style: normal; }
#cf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
#cf-list li { padding: 5px 9px; border-radius: 8px; background: rgba(20, 14, 10, 0.72); color: #fff; font-size: 14px; line-height: 1.3; transition: opacity 0.6s; overflow-wrap: anywhere; }
#cf-list li b { color: #ffd34d; }
#cf-list li small { color: #b9d8cf; font-size: 11px; }
#cf-list li.old { opacity: 0.35; }
.chatfeed.expanded #cf-list { max-height: 50vh; overflow: auto; padding: 6px; border-radius: 12px; background: rgba(20, 14, 10, 0.55); }

/* ================= Hias Kebun ================= */
#build-btn { position: fixed; right: 16px; bottom: 96px; z-index: 26; font-weight: 800; }
#build-btn.on { background: var(--accent); color: #fff; }
#build-btn .key-hint { margin-left: 4px; }
.build { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 27; width: min(860px, calc(100vw - 24px)); padding: 8px 10px 6px; }
.build[hidden] { display: none; }
.bd-head { display: flex; align-items: center; gap: 10px; }
.bd-head > b { font-size: 16px; font-weight: 800; }
.bd-tabs { display: flex; gap: 4px; }
.bd-tabs button { padding: 4px 10px; border: 2px solid var(--wood-lo); border-radius: 7px; background: var(--paper-2); font: 700 14px var(--font); cursor: pointer; color: var(--text); }
.bd-tabs button.on { background: var(--wood); color: var(--paper); border-color: var(--ink); }
.bd-coins { margin-left: auto; display: flex; align-items: center; gap: 4px; font-weight: 800; }
.bd-tools { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 4px; scrollbar-width: thin; }
.bd-tool { flex: none; display: grid; justify-items: center; gap: 1px; min-width: 72px; padding: 5px 6px; border: 2px solid var(--paper-2); border-radius: 9px; background: #fff; cursor: pointer; font: 700 12.5px var(--font); color: var(--text); }
.bd-tool .bd-i { font-size: 22px; line-height: 1.1; }
.bd-tool small { font-size: 11px; color: var(--muted); }
.bd-tool i { font-style: normal; color: var(--accent-lo); }
.bd-tool.on { border-color: var(--ink); background: #fff1b8; box-shadow: inset 0 -3px 0 #e8c45c; }
.bd-hint { margin: 2px 2px 0; font-size: 12.5px; color: var(--muted); }
body.building .hotbar { display: none !important; }
body.building #build-btn { bottom: 150px; }

/* Hotbar benih hanya di kebun sendiri */
body:not(.in-field) .hotbar { display: none !important; }

@media (max-width: 640px) {
  .yt-host { width: 64px; height: 36px; }
  .jk-now { flex-direction: column; }
  .jk-now img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .chatbar { bottom: auto; top: calc(110px + env(safe-area-inset-top)); }
  .chatfeed { bottom: auto; top: calc(112px + env(safe-area-inset-top)); flex-direction: column; }
  #build-btn { right: 12px; bottom: auto; top: calc(112px + env(safe-area-inset-top)); }
  body.building #build-btn { bottom: auto; }
  .build { bottom: auto; top: calc(160px + env(safe-area-inset-top)); }
  .bd-tool { min-width: 64px; }
}

/* ================= Kotak video (kamera) ================= */
.vc-tiles { position: fixed; right: 12px; top: 92px; z-index: 29; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 200px); overflow-y: auto; }
.vc-tiles[hidden] { display: none; }
.vc-tile { position: relative; margin: 0; width: 180px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #111; border: 3px solid var(--ink); box-shadow: 0 4px 0 rgba(20, 12, 6, 0.45); transition: border-color 0.15s, box-shadow 0.15s; }
.vc-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vc-tile.self video { transform: scaleX(-1); }
.vc-tile.talk { border-color: #43d17a; box-shadow: 0 0 0 3px rgba(67, 209, 122, 0.55), 0 4px 0 rgba(20, 12, 6, 0.45); }
.vc-tile figcaption { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 2px 8px; border-radius: 7px; background: rgba(20, 14, 10, 0.7); color: #fff; font: 800 12.5px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .vc-tiles { left: 12px; right: 12px; top: calc(232px + env(safe-area-inset-top)); flex-direction: row; overflow-x: auto; max-height: none; }
  .vc-tile { flex: none; width: 118px; }
}

/* ================= Catatan Cafe (tombol N) ================= */
.notes { position: fixed; left: 12px; top: 92px; z-index: 31; width: min(340px, calc(100vw - 24px)); height: min(440px, calc(100vh - 300px)); min-height: 220px;
  display: flex; flex-direction: column; border-radius: 12px; background: #fff8e8; color: var(--text); border: 3px solid var(--ink);
  box-shadow: inset 0 -3px 0 #e6d6b0, 0 4px 0 rgba(20, 12, 6, 0.45); font: 600 14px var(--font); overflow: hidden; }
.notes[hidden] { display: none; }
.nt-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; background: #f0c75e; border-bottom: 3px solid var(--ink); }
.nt-head > b { font-weight: 800; white-space: nowrap; }
.nt-tabs { display: flex; gap: 3px; min-width: 0; margin-left: auto; }
.nt-tabs button { min-width: 0; max-width: 130px; padding: 4px 8px; border: 2px solid transparent; border-radius: 7px; background: rgba(0, 0, 0, 0.1); color: var(--text);
  font: 800 12.5px var(--font); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-tabs button.on { background: #fff8e8; border-color: var(--ink); }
.nt-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 7px; background: rgba(0, 0, 0, 0.12); color: var(--text); font: 800 18px var(--font); cursor: pointer; line-height: 1; }
.nt-x:hover, .nt-b:hover { background: rgba(0, 0, 0, 0.22); }
.nt-hint { margin: 0; padding: 5px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px dashed #e0cfa6; }
.notes textarea { flex: 1; min-height: 0; width: 100%; resize: none; border: 0; outline: 0; padding: 8px 10px; box-sizing: border-box;
  background: repeating-linear-gradient(#fff8e8 0 21px, #efe2c2 21px 22px); background-attachment: local; color: var(--text);
  font: 500 14px/22px var(--font); }
.notes textarea:focus { background-color: #fffcf3; }
.nt-foot { display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 10px; border-top: 2px solid #e6d6b0; background: #f7ecd2; }
.nt-status { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-b { flex: none; width: 30px; height: 28px; border: 0; border-radius: 7px; background: rgba(0, 0, 0, 0.08); font-size: 14px; cursor: pointer; }
@media (max-width: 640px) {
  .notes { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: min(46vh, 380px); border-radius: 14px 14px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); z-index: 47; }
  body.notes-open #touch, body.notes-open .chatfeed { visibility: hidden; }
}

/* ================= Berbagi layar ================= */
.vc-tile.screen { width: 320px; aspect-ratio: 16 / 9; cursor: zoom-in; background: #000; }
.vc-tile.screen video { object-fit: contain; }
.vt-zoom { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 7px; background: rgba(20, 14, 10, 0.7); color: #fff; font: 800 15px var(--font); cursor: pointer; }
.vc-tile.screen.big { position: fixed; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, calc(84vh * 16 / 9)); max-height: 84vh; cursor: zoom-out; box-shadow: 0 0 0 100vmax rgba(10, 8, 6, 0.72), 0 6px 0 rgba(20, 12, 6, 0.5); }
body.vc-big .vc-tiles { overflow: visible; }
@media (max-width: 640px) {
  .vc-tile.screen { width: 210px; }
  .vc-tile.screen.big { width: 96vw; }
}
body.vc-big .vc-tiles { z-index: 60; }

/* ================= Panel volume (🎚️) ================= */
.vp-row { display: flex; align-items: center; gap: 8px; min-height: 34px; font: 700 13.5px var(--font); }
.vp-row > span { flex: 0 1 110px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-row input { flex: 1; min-width: 80px; accent-color: var(--accent); }
.vp-row b { flex: none; width: 40px; text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vp-row.far { opacity: 0.6; }
.vp-music { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 2px dashed #e0cfa6; }
.vp-mute { flex: none; width: 30px; height: 28px; border: 0; border-radius: 7px; background: rgba(0, 0, 0, 0.08); cursor: pointer; font-size: 14px; }
.vp-none { margin: 4px 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* =====================================================================
   Tata letak berzona (UI/UX nomor 5)
   atas = info (HUD) · kanan = media (musik & video) · kiri = alat pribadi (catatan, chat) · bawah = kontrol (dock)
   ===================================================================== */
:root { --zone-top: 92px; --mini-h: 58px; --dock-h: 66px; }

.cafe-ui { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.cafe-ui > * { pointer-events: auto; }

/* ---------- Mini player (kanan atas) ---------- */
.cafe-mini { position: fixed; right: 12px; top: var(--zone-top); width: 340px; height: var(--mini-h); display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 6px;
  border-radius: 12px; background: #1f4a3a; color: #fff; border: 3px solid var(--ink); box-shadow: inset 0 -3px 0 #163a2d, 0 4px 0 rgba(20, 12, 6, 0.45); font: 700 14px var(--font); }
.cafe-mini .yt-host { width: 72px; height: 40px; }
.cafe-mini .yt-empty { color: #bfe3d4; }
.cafe-mini .cbb { min-width: 32px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; }
.cafe-mini.empty .cb-npi b { font-weight: 600; color: #bfe3d4; font-size: 13px; }
.yt-tap { position: fixed; right: 12px; top: calc(var(--zone-top) + var(--mini-h) + 6px); padding: 8px 14px; border: 3px solid var(--ink); border-radius: 9px; background: #c4302b; color: #fff; font: 800 14px var(--font); cursor: pointer; }

/* ---------- Dock obrolan (bawah tengah) ---------- */
.cafe-dock { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 4px;
  max-width: calc(100vw - 24px); padding: 6px 8px; border-radius: 16px; background: #1f4a3a; color: #fff; border: 3px solid var(--ink);
  box-shadow: inset 0 -3px 0 #163a2d, 0 4px 0 rgba(20, 12, 6, 0.45); font: 700 14px var(--font); }
.dk-sep { width: 2px; align-self: stretch; margin: 4px 4px; background: rgba(255, 255, 255, 0.14); border-radius: 2px; }
.dkb { position: relative; flex: none; min-width: 58px; height: 52px; padding: 4px 6px 3px; display: grid; justify-items: center; align-content: center; gap: 1px; border: 0; border-radius: 12px;
  background: rgba(0, 0, 0, 0.25); color: #fff; cursor: pointer; font: 800 11.5px var(--font); }
.dkb:hover { background: rgba(0, 0, 0, 0.42); }
.dkb .dk-l { line-height: 1.1; white-space: nowrap; }
.dkb.ok { background: #3fa79a; }
.dkb.bad { background: #b8392f; }
.dkb.idle { background: rgba(255, 255, 255, 0.1); }
.dkb.sm { min-width: 44px; width: 44px; height: 44px; padding: 0; }
.dkb.sm.on { background: #f0c75e; color: var(--ink); }
#vc-mic.ok { box-shadow: 0 0 0 calc(var(--lvl, 0) * 6px) rgba(67, 209, 122, 0.55); transition: box-shadow 0.12s linear; }
body.notes-open #cb-notes { background: #f0c75e; color: var(--ink); }
.dk-people { display: flex; align-items: center; gap: 6px; height: 44px; max-width: 190px; padding: 0 10px 0 6px; border: 0; border-radius: 12px; background: rgba(0, 0, 0, 0.18); color: #dff1ea; cursor: pointer; font: 700 13px var(--font); }
.dk-people:hover { background: rgba(0, 0, 0, 0.35); }
.dk-people.on { color: #fff; }
.dk-st { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-av { display: flex; }
.dk-av:empty::before { content: ''; width: 26px; height: 26px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.4); }
.dk-a { position: relative; width: 28px; height: 28px; margin-left: -8px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; color: #fff; font: 900 13px var(--font); font-style: normal; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); transition: box-shadow 0.15s; }
.dk-a:first-child { margin-left: 0; }
.dk-a.talk { box-shadow: 0 0 0 3px #43d17a; }
.dk-a.more { background: #163a2d; font-size: 11px; }
.dk-a s { position: absolute; right: -4px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: #b8392f; border: 2px solid var(--ink); }
.vc-note { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); margin: 0; padding: 8px 12px; border-radius: 10px;
  background: #2b1d14; color: #ffe08a; font-size: 13px; line-height: 1.4; font-weight: 600; border: 2px solid var(--ink); }
.vc-note a { color: #9fe0ff; word-break: break-all; }

/* pop-up dari dock (volume, lainnya) */
.dk-pop { position: absolute; right: 0; bottom: calc(100% + 8px); border-radius: 12px; background: #fff8e8; color: var(--text); border: 3px solid var(--ink); box-shadow: 0 4px 0 rgba(20, 12, 6, 0.45); }
.vol-pop { width: min(340px, calc(100vw - 32px)); max-height: 50vh; overflow: auto; padding: 8px 10px; display: grid; gap: 4px; }
.vp-row { display: flex; align-items: center; gap: 8px; min-height: 36px; font: 700 13.5px var(--font); }
.vp-row > span { flex: 0 1 110px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-row input { flex: 1; min-width: 80px; accent-color: var(--accent-lo); }
.vp-row b { flex: none; width: 40px; text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vp-row.far { opacity: 0.7; }
.vp-music { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 2px dashed #e0cfa6; }
.vp-mute { flex: none; width: 32px; height: 30px; border: 0; border-radius: 7px; background: rgba(0, 0, 0, 0.08); cursor: pointer; font-size: 14px; }
.more-pop { width: 260px; padding: 6px; display: grid; gap: 2px; }
.more-pop button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 700 14px var(--font); text-align: left; cursor: pointer; }
.more-pop button:hover { background: rgba(0, 0, 0, 0.07); }

/* zona kiri & kanan menyesuaikan */
.vc-tiles { top: calc(var(--zone-top) + var(--mini-h) + 12px); max-height: calc(100vh - var(--zone-top) - var(--mini-h) - var(--dock-h) - 48px); }
.notes { top: var(--zone-top); height: min(460px, calc(100vh - var(--zone-top) - 200px)); }
body.in-cafe .chatfeed { bottom: calc(var(--dock-h) + 30px); }

/* layar sedang: dock tanpa label teks agar tidak menabrak chat */
@media (max-width: 900px) {
  .dkb { min-width: 48px; height: 46px; }
  .dkb .dk-l { display: none; }
  .dk-people { max-width: 130px; }
  .cafe-mini { width: 300px; }
}

/* ---------- HP: dua baris tipis di bawah HUD, panel = lembar bawah bergantian ---------- */
@media (max-width: 640px) {
  :root { --zone-top: calc(112px + env(safe-area-inset-top)); --mini-h: 46px; }
  .cafe-mini { left: 8px; right: 8px; width: auto; padding: 4px; }
  .cafe-mini .yt-host { width: 56px; height: 32px; }
  .cafe-mini .cb-npi small { display: none; }
  .cafe-dock { left: 8px; right: 8px; transform: none; bottom: auto; top: calc(var(--zone-top) + var(--mini-h) + 6px); justify-content: space-between; padding: 4px; border-radius: 12px; }
  .dkb, .dkb.sm { min-width: 0; flex: 1 1 0; width: auto; height: 42px; }
  .dk-people { flex: 1.4 1 0; max-width: none; padding: 0 6px; height: 42px; }
  .dk-st { display: none; }
  .dk-sep { display: none; }
  .yt-tap { left: 50%; right: auto; transform: translateX(-50%); top: calc(var(--zone-top) + var(--mini-h) + 60px); }
  .vc-tiles { top: calc(var(--zone-top) + var(--mini-h) + 60px); max-height: none; }
  .vc-note { position: fixed; left: 8px; right: 8px; bottom: auto; top: calc(var(--zone-top) + var(--mini-h) + 60px); transform: none; width: auto; }
  .dk-pop { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 55vh; border-radius: 14px 14px 0 0; border-bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 48; }
  .more-pop { width: auto; }
  body.in-cafe .chatfeed { top: calc(var(--zone-top) + var(--mini-h) + 60px); bottom: auto; }
  body.in-cafe.vc-has .chatfeed { top: calc(var(--zone-top) + var(--mini-h) + 160px); }
}

/* ================= Sambutan (nomor 1) ================= */
.onboard { width: min(440px, 100%); padding: 22px 22px 16px; text-align: center; }
.ob-art { font-size: 46px; line-height: 1; margin-bottom: 6px; }
.onboard h2 { margin: 0 0 6px; font-size: 23px; color: var(--wood-lo); }
.onboard p { margin: 0 auto 12px; max-width: 360px; }
.ob-text kbd { margin: 0 1px; }
.ob-name { width: 100%; padding: 10px 12px; font: 700 18px var(--font); text-align: center; border: 3px solid var(--ink); border-radius: 10px; background: #fff; color: var(--text); }
.ob-looks { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 2px; }
.ob-msg { min-height: 20px; margin: 6px 0 0 !important; color: #a8322a; font-weight: 700; font-size: 14px; }
.ob-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.ob-dots { display: flex; gap: 6px; margin-right: auto; }
.ob-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--wood-lo); }
.ob-dots i.on { background: var(--accent); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--muted); }

/* ================= Petunjuk kontekstual (nomor 3) ================= */
.hint { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 40px); transform: translateX(-50%); z-index: 26; width: min(420px, calc(100vw - 32px)); padding: 12px 40px 12px 16px; cursor: pointer; animation: hint-in 0.25s ease-out; }
body:not(.in-cafe) .hint { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 120px); }
.hint b { display: block; margin-bottom: 4px; color: var(--wood-lo); }
.hint ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 15px; }
.hint kbd { font-size: 12px; }
.hint-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 6px; background: rgba(0, 0, 0, 0.08); cursor: pointer; font-weight: 800; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (max-width: 640px) { body.touch .hint { bottom: calc(170px + env(safe-area-inset-bottom)); } body.in-cafe .hint { bottom: calc(24px + env(safe-area-inset-bottom)); } }

/* ================= Umpan balik (nomor 7) ================= */
.spin { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.busy { opacity: 0.85; cursor: progress; }
.net-banner { position: fixed; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 70; padding: 8px 16px; border-radius: 10px; background: #b8392f; color: #fff; border: 3px solid var(--ink); font: 800 14px var(--font); box-shadow: 0 4px 0 rgba(20, 12, 6, 0.45); }

/* ================= Keadaan kosong (nomor 9) ================= */
li.empty-state, p.empty-state { display: grid !important; justify-items: center; gap: 4px; padding: 18px 12px !important; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.empty-state b { color: var(--text); font-size: 15px; }
.es-ico { font-size: 28px; line-height: 1; }
.empty-state .btn { margin-top: 6px; }

/* ================= Pemilik (nomor 4) ================= */
.me-btn.owner { box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px #e0a92a, 0 4px 0 0 rgba(20, 12, 6, 0.45); }
.owner-badge { margin-left: 4px; }
body.guest .owner-only { display: none !important; }
.st-acc { display: grid; gap: 8px; padding: 10px 12px; background: #fff; border: 2px solid var(--paper-2); border-radius: 10px; }
.st-acc p { margin: 0; font-size: 14.5px; }
.st-acc .btn { justify-self: start; text-decoration: none; color: var(--text); }

/* ================= Bantuan ringkas (nomor 11) ================= */
.help-h { margin: 10px 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.help-places { gap: 4px !important; }
.help-places li { display: block !important; font-size: 15.5px; }
.help-note { font-size: 14px; color: var(--muted); }

/* ================= Aksesibilitas (nomor 10) ================= */
:root { --muted: #6a5442; } /* kontras ≥ 5,5:1 di atas kertas krem */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #ffb000; outline-offset: 2px; }
.notes textarea:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ================= Kotak Saran (alun-alun) ================= */
.fb-panel { width: min(600px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 14px 18px 16px; }
.fb-ico { width: 44px; height: 44px; display: grid; place-items: center; font-size: 24px; background: #b8392f; border: 3px solid var(--ink); border-radius: 10px; box-shadow: inset 0 -3px 0 #7d241d; flex: none; }
.fb-form { display: grid; gap: 8px; margin-top: 8px; }
.fb-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-cat, .fb-chip { padding: 7px 12px; border: 2px solid var(--wood-lo); border-radius: 999px; background: #fff; color: var(--text); font: 700 14px var(--font); cursor: pointer; }
.fb-cat.on, .fb-chip.on { background: var(--accent); border-color: var(--ink); color: #fff; }
.fb-l { font-weight: 800; font-size: 14px; }
.fb-form textarea { width: 100%; resize: vertical; min-height: 120px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; color: var(--text); font: 500 15px/1.45 var(--font); }
.fb-foot { display: flex; align-items: center; gap: 10px; }
.fb-foot small { flex: 1; color: var(--muted); font-size: 12.5px; }
.fb-msg { margin: 0; min-height: 20px; font-weight: 800; font-size: 14px; }
.fb-msg.ok { color: #23735f; }
.fb-msg.bad { color: #a8322a; }
.fb-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0 10px; }
.fb-tools .btn { margin-left: auto; }
.fb-chip { padding: 5px 10px; font-size: 13px; }
.fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fb-item { padding: 10px 12px; background: #fff; border: 2px solid var(--paper-2); border-radius: 10px; cursor: pointer; }
.fb-item.unread { border-color: #e0a92a; background: #fffbea; }
.fb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.fb-meta small { color: var(--muted); margin-left: auto; font-size: 12.5px; }
.fb-tag { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #e8f4ef; color: #23735f; }
.fb-tag.bug { background: #fbe7e4; color: #a8322a; }
.fb-tag.lainnya { background: #efe9f8; color: #5b3d8c; }
.fb-dot { width: 9px; height: 9px; border-radius: 50%; background: #e0a92a; border: 2px solid var(--ink); }
.fb-text { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; user-select: text; -webkit-user-select: text; }
.fb-item.expanded .fb-text { -webkit-line-clamp: unset; display: block; }
.fb-act { display: none; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.fb-item.expanded .fb-act { display: flex; }
.btn.bad { background: #b8392f; color: #fff; }
.fb-loading { color: var(--muted); padding: 16px 0; }

/* Toko versi truk pengepul (hanya tab jual) */
#shop.truck .shop-keeper { background: none !important; display: grid; place-items: center; font-size: 30px; }
#shop.truck .shop-keeper::after { content: '🚚'; }
