/* office3d — toàn bộ kiểu dáng nằm dưới .o3d và mọi class đều có tiền tố o3d- để không đụng CSS của trang chứa.
   Đổi màu bằng cách ghi đè các biến --o3d-* trên .o3d hoặc trên phần tử chứa. */

.o3d {
  --o3d-bg: #0a0f1c;
  --o3d-panel: rgba(16, 23, 40, 0.9);
  --o3d-line: rgba(255, 255, 255, 0.1);
  --o3d-text: #e8edf7;
  --o3d-muted: #8d98b3;
  --o3d-accent: #5eead4;
  --o3d-work: #86efac;
  --o3d-talk: #7dd3fc;
  --o3d-rest: #fbbf24;
  --o3d-remote: #94a3b8;
  --o3d-me: #ffc83d;

  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  background: var(--o3d-bg);
  color: var(--o3d-text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}
.o3d *, .o3d *::before, .o3d *::after { box-sizing: border-box; }
.o3d button, .o3d select { font: inherit; color: inherit; margin: 0; }
.o3d [hidden] { display: none !important; }

.o3d-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.o3d-canvas.is-dragging { cursor: grabbing; }

/* ---------- trạng thái: chấm màu dùng chung cho nhãn, cây tổ chức, bảng chi tiết ---------- */
.o3d-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; flex: none; }
.o3d .is-work > .o3d-dot, .o3d [data-state="work"] .o3d-now .o3d-dot { background: var(--o3d-work); box-shadow: 0 0 6px var(--o3d-work); }
.o3d .is-talk > .o3d-dot, .o3d [data-state="talk"] .o3d-now .o3d-dot { background: var(--o3d-talk); box-shadow: 0 0 6px var(--o3d-talk); }
.o3d .is-rest > .o3d-dot, .o3d [data-state="rest"] .o3d-now .o3d-dot { background: var(--o3d-rest); }
.o3d .is-remote > .o3d-dot, .o3d [data-state="remote"] .o3d-now .o3d-dot { background: var(--o3d-remote); }

.o3d-lg { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.o3d-lg.is-work { background: var(--o3d-work); } .o3d-lg.is-talk { background: var(--o3d-talk); }
.o3d-lg.is-rest { background: var(--o3d-rest); } .o3d-lg.is-remote { background: var(--o3d-remote); } .o3d-lg.is-me { background: var(--o3d-me); }

/* ---------- nhãn tên trên đầu nhân vật ---------- */
.o3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.o3d-tag {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border: 1px solid var(--o3d-line); border-radius: 999px;
  background: var(--o3d-panel);
  font-size: 12px; white-space: nowrap;
  pointer-events: auto; cursor: pointer;
  will-change: transform;
}
.o3d-tag:hover { border-color: var(--o3d-accent); z-index: 2; }
.o3d-tag b { font-weight: 600; }
.o3d-tag.is-key {
  height: 38px; padding: 0 11px 0 9px;
  border-radius: 10px;
  border-left: 3px solid var(--o3d-unit);
  background: rgba(12, 18, 32, 0.95);
}
.o3d-col { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.o3d-tag small { color: var(--o3d-muted); font-size: 10.5px; }
.o3d-far .o3d-tag.is-key { height: 24px; border-radius: 6px; }
.o3d-far .o3d-tag.is-key small { display: none; }
.o3d-tag.is-me { border-color: var(--o3d-me); color: var(--o3d-me); cursor: default; pointer-events: none; }
.o3d-tag.is-vacant {
  height: 20px; padding: 0 7px;
  border-style: dashed; background: rgba(16, 23, 40, 0.6);
  color: var(--o3d-muted); font-size: 11px; font-style: italic;
  cursor: default; pointer-events: none;
}
.o3d-tag.is-vacant b { font-weight: 400; }

/* bong bóng thoại + biểu tượng cảm xúc bay lên (vị trí do engine đặt bằng transform) */
.o3d-bubble {
  position: absolute; left: 0; top: 0; z-index: 3;
  max-width: 220px; padding: 6px 11px;
  border-radius: 14px 14px 14px 4px;
  background: #fff; color: #111827;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none; will-change: transform, opacity;
}
.o3d-emoji { position: absolute; left: 0; top: 0; z-index: 3; font-size: 22px; pointer-events: none; will-change: transform, opacity; }

/* ---------- thanh trên ---------- */
.o3d-topbar {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: stretch; gap: 10px;
  pointer-events: none; z-index: 5;
}
.o3d-topbar > * {
  pointer-events: auto;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 12px;
  backdrop-filter: blur(8px);
}
.o3d-stats { flex: 1; display: flex; padding: 8px 6px; min-width: 0; }
.o3d-stat { flex: 1; padding: 0 12px; border-left: 1px solid var(--o3d-line); min-width: 0; }
.o3d-stat:first-child { border-left: 0; }
.o3d-stat span { display: block; color: var(--o3d-muted); font-size: 11px; white-space: nowrap; }
.o3d-stat b { font-size: 17px; font-variant-numeric: tabular-nums; }
.o3d-actions { display: flex; align-items: center; gap: 6px; padding: 6px; }
.o3d-actions button, .o3d-actions select {
  height: 34px; padding: 0 12px;
  border: 1px solid var(--o3d-line); border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}
.o3d-actions button { background: var(--o3d-accent); color: #06231f; border-color: transparent; font-weight: 600; }
.o3d-actions select { max-width: 200px; }
.o3d-actions option { background: #101728; color: var(--o3d-text); }

.o3d-chip {
  position: absolute; top: 76px; left: 10px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--o3d-panel); border: 1px solid var(--o3d-line);
  font-size: 12px; color: var(--o3d-muted);
}
.o3d-chip span { color: var(--o3d-text); }

/* ---------- khung chung ---------- */
.o3d-box-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 6px; }
.o3d-box-head button { background: none; border: 0; font-size: 18px; cursor: pointer; line-height: 1; padding: 0 4px; }
.o3d-muted { color: var(--o3d-muted); }

/* ---------- sơ đồ tổ chức ---------- */
.o3d-tree {
  position: absolute; top: 76px; left: 10px;
  width: 320px; max-height: max(220px, calc(100% - 390px));   /* chừa chỗ cho bản đồ bên dưới */
  display: flex; flex-direction: column;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 14px;
  padding: 12px 6px 8px 14px;
  backdrop-filter: blur(8px);
  z-index: 4;
}
.o3d-tree .o3d-box-head { padding-right: 6px; }
.o3d-tree-body { overflow-y: auto; padding-right: 8px; }
.o3d-tree h3 { margin: 12px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--o3d-accent); }
.o3d-tree h3:first-child { margin-top: 2px; }
.o3d-group-note { display: block; color: var(--o3d-muted); font-size: 11px; margin-bottom: 6px; }
.o3d-unit { margin: 0 0 8px; padding-left: 8px; border-left: 1px solid var(--o3d-line); }
.o3d-unit .o3d-unit { margin: 6px 0 4px 8px; }
.o3d-unit-name { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.o3d-unit-name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.o3d-unit > small { display: block; color: var(--o3d-muted); font-size: 11px; margin: 1px 0 3px 16px; }
.o3d-row {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 4px 6px;
  border: 0; border-radius: 6px; background: none;
  text-align: left; font-size: 12.5px; cursor: pointer;
}
.o3d button.o3d-row:hover, .o3d-row.is-on { background: rgba(255, 255, 255, 0.08); }
.o3d-row b { font-weight: 400; white-space: nowrap; }
.o3d-row.is-key b { font-weight: 600; }
.o3d-row span { color: var(--o3d-muted); font-size: 11px; margin-left: auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o3d-row.is-vacant { cursor: default; opacity: 0.55; font-style: italic; }
.o3d-row.is-vacant .o3d-dot { background: none; border: 1px dashed var(--o3d-muted); }

/* ---------- bản đồ ---------- */
.o3d-minimap-box {
  position: absolute; left: 10px; bottom: 16px;
  width: 300px;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 12px;
  padding: 8px 10px 10px;
  backdrop-filter: blur(8px);
}
.o3d-minimap { width: 100%; display: block; border-radius: 6px; cursor: pointer; }
.o3d-legend { margin-top: 6px; font-size: 11px; color: var(--o3d-muted); }
.o3d-minimap-box.is-collapsed .o3d-minimap, .o3d-minimap-box.is-collapsed .o3d-legend { display: none; }
.o3d-minimap-box.is-collapsed { width: auto; }
.o3d-minimap-box.is-collapsed .o3d-box-head { margin: 0; gap: 14px; }

/* ---------- bảng chi tiết nhân sự ---------- */
.o3d-detail {
  position: absolute; right: 10px; top: 76px;
  width: 340px; max-height: calc(100% - 150px);
  overflow-y: auto;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 14px;
  padding: 14px 14px 0;
  backdrop-filter: blur(8px);
  z-index: 4;
  -webkit-user-select: text; user-select: text;
}
.o3d-detail-close { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: var(--o3d-muted) !important; font-size: 20px; cursor: pointer; }
.o3d-detail-head { display: flex; gap: 11px; align-items: center; padding-right: 18px; }
.o3d-avatar {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  color: #0a0f1c; font-weight: 700; font-size: 14px;
}
.o3d-detail-head strong { display: block; font-size: 16px; }
.o3d-detail-head small { color: var(--o3d-muted); font-size: 12px; display: block; }
.o3d-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0; }
.o3d-chipx { padding: 2px 8px; border: 1px solid var(--o3d-line); border-radius: 999px; font-size: 11px; color: var(--o3d-muted); }
.o3d-chipx.is-gold { border-color: #ffd24a; color: #ffd24a; }
.o3d-now { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.o3d-now b { display: block; font-size: 13px; }
.o3d-now small { color: var(--o3d-muted); font-size: 11.5px; }
.o3d-detail h4 { margin: 16px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--o3d-accent); }
.o3d-detail h4 em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--o3d-muted); border: 1px solid var(--o3d-line); border-radius: 4px; padding: 0 4px; margin-left: 4px; font-size: 10px; font-weight: 400; }
.o3d-detail a { color: var(--o3d-text); text-decoration: underline; text-decoration-color: var(--o3d-muted); text-underline-offset: 2px; cursor: pointer; }
.o3d-detail a:hover { color: var(--o3d-accent); }
.o3d-detail p { margin: 0; }
.o3d-line { display: flex; gap: 10px; margin: 4px 0 !important; font-size: 13px; }
.o3d-line > span:first-child { color: var(--o3d-muted); width: 104px; flex: none; }
.o3d-links { line-height: 1.55; }
.o3d-jd { margin: 0; padding-left: 17px; font-size: 13px; line-height: 1.5; }
.o3d-jd li { margin-bottom: 3px; }
.o3d-task { display: grid; grid-template-columns: 1fr 34px; gap: 2px 8px; align-items: center; margin-bottom: 9px; }
.o3d-task > div:first-child { grid-column: 1 / 3; }
.o3d-task b { display: block; font-size: 13px; font-weight: 500; }
.o3d-task small { font-size: 11px; }
.o3d-task > span { font-size: 11px; color: var(--o3d-muted); text-align: right; font-variant-numeric: tabular-nums; }
.o3d-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.o3d-bar i { display: block; height: 100%; border-radius: 3px; }
.o3d-stream { margin-bottom: 10px; }
.o3d-stream-name { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.o3d-stream-name i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.o3d-stream ul { list-style: none; margin: 0; padding: 0 0 0 16px; font-size: 12.5px; }
.o3d-stream li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.o3d-stream li a { white-space: nowrap; }
.o3d-stream li span { color: var(--o3d-muted); text-align: right; font-size: 11.5px; }
.o3d-stream summary { margin-left: 16px; font-size: 11.5px; color: var(--o3d-muted); cursor: pointer; }
.o3d-note { font-size: 11px; margin-top: 14px !important; }
.o3d-detail-actions {
  position: sticky; bottom: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 12px -14px 0; padding: 10px 14px 12px;
  background: linear-gradient(transparent, rgba(16, 23, 40, 0.98) 30%);
}
.o3d-detail-actions button {
  flex: 1 1 40%; padding: 9px; border: 0; border-radius: 9px;
  background: var(--o3d-accent); color: #06231f; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.o3d-detail-actions button.is-ghost { background: rgba(255, 255, 255, 0.1); color: var(--o3d-text); }

/* nút tương tác vui */
.o3d-fun { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.o3d-fun button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px; border: 1px solid var(--o3d-line); border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); color: var(--o3d-text);
  font-size: 11px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.o3d-fun button span { font-size: 19px; line-height: 1.1; }
.o3d-fun button:hover { border-color: var(--o3d-accent); background: rgba(94, 234, 212, 0.1); }
.o3d-fun button:active { transform: scale(0.95); }

/* ---------- điều khiển ---------- */
.o3d-controls {
  position: absolute; left: 50%; bottom: 16px;
  transform: translateX(-50%);
  display: flex; gap: 4px; padding: 5px;
  background: var(--o3d-panel);
  border: 1px solid var(--o3d-line); border-radius: 12px;
  backdrop-filter: blur(8px);
}
.o3d-controls button {
  min-width: 38px; height: 34px; padding: 0 12px;
  border: 0; border-radius: 8px;
  background: transparent;
  font-weight: 600; cursor: pointer;
}
.o3d-controls button:hover { background: rgba(255, 255, 255, 0.08); }
.o3d-controls button.is-active { background: var(--o3d-accent); color: #06231f; }
.o3d-controls [data-act="lights"].is-off { filter: grayscale(1) brightness(0.6); }

.o3d-hint {
  position: absolute; left: 50%; bottom: 66px;
  transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px;
  background: rgba(10, 15, 28, 0.7);
  color: var(--o3d-muted); font-size: 12px; white-space: nowrap;
  transition: opacity 0.6s;
  pointer-events: none;
}
.o3d-hint.is-gone { opacity: 0; }

.o3d-toasts { position: absolute; right: 10px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; }
.o3d-toast {
  padding: 7px 12px; border-radius: 10px;
  background: var(--o3d-panel); border: 1px solid var(--o3d-line);
  font-size: 12px;
  animation: o3d-toast 4s forwards;
}
@keyframes o3d-toast {
  0% { opacity: 0; transform: translateY(8px); }
  8%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

.o3d-joystick {
  display: none;
  position: absolute; left: 22px; bottom: 76px;
  width: 104px; height: 104px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--o3d-line);
  touch-action: none;
}
.o3d-joy-knob {
  position: absolute; left: 50%; top: 50%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: var(--o3d-me);
  pointer-events: none;
}

/* ---------- đồng hồ (life.js) ---------- */
.o3d-clock {
  position: absolute; top: 76px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px; border-radius: 999px;
  background: var(--o3d-panel); border: 1px solid var(--o3d-line);
  font-size: 13px; pointer-events: none; white-space: nowrap;
}
.o3d-clock b { font-variant-numeric: tabular-nums; font-size: 15px; }
.o3d-clock small { color: var(--o3d-me); font-weight: 700; margin-left: 4px; }
.o3d-badge { margin-right: -2px; font-size: 13px; }
.o3d-bday { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: rgba(246, 195, 68, 0.12); color: #fcd34d; font-size: 12.5px; font-weight: 600; }
.o3d-bday em { font-style: normal; font-weight: 400; color: var(--o3d-muted); font-size: 10.5px; border: 1px solid var(--o3d-line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }

/* ---------- menu ✨ ---------- */
.o3d-menu {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 7;
  width: min(440px, calc(100% - 20px)); max-height: min(70%, 520px); overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px;
  background: rgba(16, 23, 40, 0.97); border: 1px solid var(--o3d-line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.o3d-menu h5 { grid-column: 1 / -1; margin: 8px 2px 2px; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--o3d-accent); }
.o3d-menu h5:first-child { margin-top: 0; }
.o3d-menu button {
  display: flex; align-items: center; gap: 8px; text-align: left;
  padding: 7px 9px; border: 1px solid transparent; border-radius: 9px;
  background: rgba(255, 255, 255, 0.04); color: var(--o3d-text); font-size: 12.5px; cursor: pointer;
}
.o3d-menu button span { font-size: 16px; width: 20px; text-align: center; flex: none; }
.o3d-menu button:hover { border-color: var(--o3d-line); background: rgba(255, 255, 255, 0.08); }
.o3d-menu button.is-on { border-color: var(--o3d-accent); background: rgba(94, 234, 212, 0.12); }

/* ---------- pickleball ---------- */
.o3d-pb {
  position: absolute; left: 50%; top: 118px; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 8px 12px; border-radius: 12px;
  background: var(--o3d-panel); border: 1px solid var(--o3d-line);
}
.o3d-pb-score { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.o3d-pb small { width: 100%; text-align: center; color: var(--o3d-muted); font-size: 11px; }
.o3d-pb-hit { padding: 7px 14px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.12); color: var(--o3d-text); font-weight: 700; cursor: pointer; }
.o3d-pb.is-ready .o3d-pb-hit { background: #d9f99d; color: #1a2e05; box-shadow: 0 0 0 3px rgba(217, 249, 157, 0.35); }

/* ---------- tham quan + thẻ lịch họp ---------- */
.o3d-caption {
  position: absolute; left: 50%; top: 118px; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 22px; border-radius: 14px; text-align: center;
  background: rgba(10, 15, 28, 0.85); border: 1px solid var(--o3d-line);
  pointer-events: none; animation: o3d-cap 0.5s;
}
.o3d-caption b { font-size: 18px; }
.o3d-caption span { color: var(--o3d-text); font-size: 13px; }
.o3d-caption small { color: var(--o3d-muted); font-size: 11px; margin-top: 4px; }
@keyframes o3d-cap { from { opacity: 0; transform: translate(-50%, -6px); } }
.o3d-card {
  position: absolute; left: 50%; top: 118px; transform: translateX(-50%); z-index: 7;
  width: min(380px, calc(100% - 20px)); max-height: 60%; overflow-y: auto;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(16, 23, 40, 0.97); border: 1px solid var(--o3d-line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.o3d-card h4 { margin: 0 0 8px; font-size: 14px; }
.o3d-card h4 em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--o3d-muted); border: 1px solid var(--o3d-line); border-radius: 4px; padding: 0 4px; }
.o3d-card-close { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: var(--o3d-muted); font-size: 20px; cursor: pointer; }
.o3d-mt { padding: 7px 9px; margin-bottom: 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); font-size: 13px; }
.o3d-mt small { display: block; margin-top: 3px; color: var(--o3d-muted); font-size: 11.5px; }
.o3d-mt a { color: var(--o3d-text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--o3d-muted); }
.o3d-mt.is-now { background: rgba(239, 68, 68, 0.15); border-left: 3px solid #ef4444; }
.o3d-mt.is-past { opacity: 0.5; }

/* ---------- tắt từng phần giao diện qua options.ui ---------- */
.o3d-no-toolbar .o3d-topbar, .o3d-no-minimap .o3d-minimap-box, .o3d-no-controls .o3d-controls,
.o3d-no-detail .o3d-detail, .o3d-no-hint .o3d-hint, .o3d-no-chip .o3d-chip,
.o3d-no-tree .o3d-tree, .o3d-no-tree .o3d-btn-tree { display: none !important; }
.o3d-no-toolbar .o3d-chip, .o3d-no-toolbar .o3d-tree, .o3d-no-toolbar .o3d-detail { top: 10px; }

/* ---------- khung hẹp / màn cảm ứng (theo bề rộng của khung 3D, không theo cửa sổ) ---------- */
.o3d-narrow .o3d-stat:nth-child(n+5) { display: none; }
.o3d-narrow .o3d-joystick, .o3d-touch .o3d-joystick { display: block; }
.o3d-narrow .o3d-hint, .o3d-touch .o3d-hint { display: none; }
.o3d-narrow .o3d-stat b { font-size: 15px; }
.o3d-narrow .o3d-stat { padding: 0 8px; }
.o3d-narrow .o3d-unit-select { display: none; }
.o3d-narrow .o3d-minimap-box { left: auto; right: 10px; top: 76px; bottom: auto; width: 210px; }
.o3d-narrow .o3d-tree { left: 10px; right: 10px; width: auto; max-height: 55%; }
.o3d-narrow .o3d-detail { top: auto; bottom: 66px; right: 10px; left: 10px; width: auto; max-height: 55%; }
.o3d-narrow .o3d-controls { left: auto; right: 10px; transform: none; }
.o3d-narrow .o3d-controls [data-act^="rot"] { display: none; }
.o3d-narrow .o3d-toasts { bottom: 70px; }
.o3d-narrow .o3d-clock { left: auto; right: 10px; transform: none; top: 76px; }
.o3d-narrow .o3d-minimap-box { top: 114px; }
.o3d-narrow .o3d-menu { left: 10px; right: 10px; width: auto; transform: none; }
.o3d-tiny .o3d-stat:nth-child(n+4) { display: none; }
/* pickleball trên màn cảm ứng: nút đánh to ở góc phải dưới, đối diện cần điều khiển, vừa tầm ngón cái */
.o3d-touch .o3d-pb, .o3d-narrow .o3d-pb { top: auto; bottom: 76px; left: auto; right: 14px; transform: none; flex-direction: column; gap: 8px; }
.o3d-touch .o3d-pb small, .o3d-narrow .o3d-pb small { display: none; }
.o3d-touch .o3d-pb-hit, .o3d-narrow .o3d-pb-hit { width: 96px; height: 96px; border-radius: 50%; font-size: 17px; touch-action: manipulation; }
