:root {
  --bg: #f1f5f9;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #0f766e;
  --primary-2: #14b8a6;
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #16a34a;
  --purple: #7c3aed;
  --blue: #2563eb;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.pre { white-space: pre-wrap; }

/* layout */
.shell { display: grid; grid-template-columns: 230px 1fr; grid-template-rows: 56px 1fr; height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: #0f172a; color: #e2e8f0; }
.topbar .brand { font-weight: 700; font-size: 16px; color: #5eead4; white-space: nowrap; }
.topbar .clock { background: #1e293b; padding: 5px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topbar .user { display: flex; align-items: center; gap: 10px; }
.topbar button { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; }
.topbar button:hover { background: #334155; }
.bell { position: relative; cursor: pointer; font-size: 18px; }
.bell .count { position: absolute; top: -6px; right: -10px; background: var(--danger); color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 5px; }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 14px 10px; overflow-y: auto; }
.sidebar a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; color: var(--text); margin-bottom: 2px; }
.sidebar a:hover { background: #f1f5f9; text-decoration: none; }
.sidebar a.active { background: #ccfbf1; color: var(--primary); font-weight: 600; }
.main { overflow-y: auto; padding: 22px; }
.main.full { padding: 0; overflow: hidden; position: relative; }

/* components */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.grid.k { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
button, .btn { font: inherit; cursor: pointer; border-radius: 8px; padding: 7px 13px; border: 1px solid var(--border); background: #fff; color: var(--text); }
button:hover { background: #f8fafc; }
button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover { background: #115e59; }
button.danger { background: #fff; color: var(--danger); border-color: #fecaca; }
button.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
button.sm { padding: 4px 9px; font-size: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:hover td { background: #f8fafc; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e2e8f0; color: #334155; white-space: nowrap; }
.badge.new, .badge.todo { background: #e0f2fe; color: #0369a1; }
.badge.assigned, .badge.contacted { background: #ede9fe; color: #6d28d9; }
.badge.in_progress, .badge.negotiation { background: #fef3c7; color: #b45309; }
.badge.review, .badge.submitted { background: #f3e8ff; color: #7e22ce; }
.badge.delivered { background: #dbeafe; color: #1d4ed8; }
.badge.completed, .badge.approved, .badge.won { background: #dcfce7; color: #15803d; }
.badge.changes_requested, .badge.rework, .badge.lost, .badge.overdue { background: #fee2e2; color: #b91c1c; }
.badge.critical { background: #fee2e2; color: #b91c1c; }
.badge.high { background: #ffedd5; color: #c2410c; }
.badge.virtual { background: #ccfbf1; color: #0f766e; }
.badge.manual { background: #fef9c3; color: #a16207; }
.progress { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--primary-2), var(--primary)); }
.empty { text-align: center; padding: 30px; color: var(--muted); }
.alert { padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #92400e; margin-bottom: 12px; }
.alert.info { background: #e0f2fe; color: #075985; }
.alert.ok { background: #dcfce7; color: #166534; }

/* workflow stepper */
.stepper { display: flex; gap: 0; margin: 8px 0 16px; overflow-x: auto; }
.step { flex: 1; min-width: 110px; text-align: center; position: relative; padding-top: 30px; font-size: 12px; color: var(--muted); }
.step::before { content: attr(data-n); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; color: #475569; line-height: 24px; font-weight: 700; z-index: 1; }
.step::after { content: ''; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: #e2e8f0; }
.step:first-child::after { display: none; }
.step.done::before { background: var(--primary); color: #fff; content: '✓'; }
.step.done::after, .step.current::after { background: var(--primary); }
.step.current::before { background: #f59e0b; color: #fff; }
.step.current { color: var(--text); font-weight: 700; }

/* timeline & feed */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--border); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-2); }
.comment { padding: 10px 12px; background: #f8fafc; border-radius: 10px; margin-bottom: 8px; }

/* forms & modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
.form-error { color: var(--danger); margin-top: 10px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 3px; }

#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 10px; max-width: 360px; box-shadow: var(--shadow); animation: slide .25s ease-out; }
.toast.error { background: var(--danger); }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .hero { background: radial-gradient(circle at 30% 20%, #14b8a6, #0f172a 70%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.login .hero h1 { font-size: 36px; }
.login .hero ul { line-height: 2; padding-left: 18px; }
.login .box { display: flex; align-items: center; justify-content: center; padding: 30px; }
.login form { width: min(420px, 100%); }
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.demo button { text-align: left; font-size: 12px; }
.demo b { display: block; font-size: 13px; }

/* 3D office HUD */
#office3d { position: absolute; inset: 0; }
.hud { position: absolute; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { top: 12px; left: 12px; right: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.glass { background: rgba(15, 23, 42, .78); color: #e2e8f0; border-radius: 12px; padding: 8px 12px; backdrop-filter: blur(6px); box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.glass button { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); padding: 5px 10px; }
.glass button:hover { background: rgba(255,255,255,.2); }
.glass button.on { background: var(--primary-2); border-color: var(--primary-2); color: #042f2e; font-weight: 700; }
.hud-kpis { display: flex; gap: 16px; }
.hud-kpis div { text-align: center; }
.hud-kpis b { display: block; font-size: 16px; color: #fff; }
.hud-kpis span { font-size: 11px; color: #94a3b8; text-transform: uppercase; }
.hud-feed { top: 80px; right: 12px; width: 330px; max-height: calc(100% - 170px); overflow-y: auto; }
.hud-feed .item { padding: 7px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.hud-feed .item .who { font-weight: 700; }
.hud-feed .item.warning .who { color: #fca5a5; }
.hud-feed .item.celebrate .who { color: #86efac; }
.hud-feed .item.delivery .who { color: #93c5fd; }
.hud-bottom { bottom: 12px; left: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.legend { display: flex; gap: 12px; font-size: 12px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.person-panel { top: 80px; left: 12px; width: 300px; }
.person-panel h3 { color: #fff; margin-bottom: 2px; }
.person-panel .stat { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.speed { width: 110px; vertical-align: middle; }

/* landing: walk-in entry */
.enter { display: flex; gap: 8px; margin: 18px 0 8px; max-width: 460px; }
.enter input { flex: 1; padding: 12px 14px; border-radius: 10px; border: 0; font-size: 15px; }
.enter button { padding: 12px 16px; font-size: 15px; white-space: nowrap; }

/* walk-in visit: 3D office + chat */
.visit-page { position: fixed; inset: 0; background: #dbeafe; }
.visit-page #office3d { position: absolute; inset: 0; right: 400px; }
.vstep { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 12.5px; color: #cbd5e1; }
.vstep.done { background: rgba(20,184,166,.35); color: #fff; }
.vstep.current { background: #f59e0b; color: #1c1917; font-weight: 700; }
.chat { position: absolute; top: 0; right: 0; bottom: 0; width: 400px; border-radius: 0; display: flex; flex-direction: column; padding: 0; background: #0f172a; }
.chat-head { padding: 14px 16px; border-bottom: 1px solid #1e293b; }
.chat-body, .staff-chat { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.staff-chat { max-height: 520px; background: #f8fafc; border-radius: 10px; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.msg .who { font-size: 11px; font-weight: 700; opacity: .7; margin-bottom: 2px; }
.chat .msg.them { background: #1e293b; color: #e2e8f0; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat .msg.me { background: #14b8a6; color: #042f2e; align-self: flex-end; border-bottom-right-radius: 4px; }
.staff-chat .msg.them { background: #fff; border: 1px solid var(--border); align-self: flex-start; }
.staff-chat .msg.me { background: #ccfbf1; align-self: flex-end; }
.msg.system { align-self: center; background: transparent; color: #94a3b8; font-size: 12px; font-style: italic; }
.msg.typing { opacity: .8; }
.msg .dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.msg .dots span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .35; animation: dot 1s infinite ease-in-out; }
.msg .dots span:nth-child(2) { animation-delay: .15s; }
.msg .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.msg .caret { display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px; background: currentColor; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat-options { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.chat-options button { background: rgba(20,184,166,.15); color: #5eead4; border: 1px solid rgba(20,184,166,.5); border-radius: 999px; font-size: 13px; padding: 6px 12px; }
.chat-options button:hover { background: rgba(20,184,166,.3); }
.chat-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid #1e293b; }
.chat .chat-input input { background: #1e293b; color: #fff; border-color: #334155; }
.quote-card { background: #fff; color: #0f172a; border-radius: 12px; padding: 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.quote-card table td { padding: 4px 2px; font-size: 13px; }
.quote-card tr.total td { font-weight: 800; font-size: 15px; border-top: 2px solid #0f172a; }
.upload-btn { display: block; text-align: center; border: 2px dashed #0f766e; color: #0f766e; font-weight: 700; padding: 12px; border-radius: 10px; cursor: pointer; }
.up-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.up-thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.quote-card input { color: #0f172a; }

/* chat hidden: the office uses the whole screen, a floating button brings the chat back */
.chat-show { display: none; position: absolute; right: 16px; bottom: 16px; z-index: 30; background: #14b8a6; color: #042f2e; font-weight: 800; border: 0; border-radius: 999px; padding: 12px 18px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); cursor: pointer; }
.chat-badge:not(:empty) { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 12px; }
.visit-page.chat-hidden .chat { display: none; }
.visit-page.chat-hidden .chat-show { display: block; }
.visit-page.chat-hidden #office3d { right: 0; bottom: 0; }
.visit-page.chat-hidden .hud-bottom { right: 12px; }
.visit-page.chat-hidden .walk-pad { right: 12px; bottom: 80px; }
.visit-page.chat-hidden .credit3d { right: 150px; } /* keep the maker credit clear of the floating Chat button */

@media (max-width: 900px) {
  .visit-page #office3d { right: 0; bottom: 55%; }
  .chat { width: 100%; top: 45%; }
  .visit-page .hud-bottom { display: none; }
  .shell { grid-template-columns: 1fr; grid-template-rows: 56px auto 1fr; }
  .sidebar { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 6px; }
  .sidebar a { white-space: nowrap; }
  .login { grid-template-columns: 1fr; }
  .login .hero { padding: 28px; }
  .grid.two { grid-template-columns: 1fr; }
  .hud-feed { display: none; }
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar .clock, .topbar .user > span { display: none; }
  .topbar .brand { overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
  .topbar button { padding: 5px 8px; font-size: 12px; white-space: nowrap; }
  .hud-kpis { overflow-x: auto; max-width: 100%; }
  .person-panel { width: auto; right: 12px; }
  .main { padding: 14px; }
}

/* admin panel */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.ok { background: #16a34a; }
.dot.warn { background: #f59e0b; }
.dot.bad { background: #dc2626; }
.sys-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; }
.logs { max-height: 320px; overflow-y: auto; font: 12px/1.5 ui-monospace, Menlo, monospace; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 10px; }
.log.error b { color: #f87171; }
.log.warn b { color: #fbbf24; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* 3D walk mode pad */
.walk-pad { position: absolute; right: 16px; bottom: 90px; z-index: 6; padding: 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; max-width: 230px; text-align: center; }
.walk-pad .pad { display: grid; grid-template-columns: repeat(3, 46px); gap: 6px; }
.walk-pad .pad button { height: 46px; font-size: 20px; padding: 0; touch-action: none; user-select: none; }
[data-view].active { outline: 2px solid #14b8a6; }
.visit-page .walk-pad { right: 416px; }
@media (max-width: 900px) { .visit-page .walk-pad { right: 12px; bottom: calc(55% + 70px); } }
/* visitor page: camera buttons stay left of the chat panel; quick replies never cover the conversation */
.visit-page .hud-bottom { right: 412px; }
.visit-page .hud-bottom .row { flex-wrap: wrap; gap: 6px; }
.visit-page .hud-bottom button { font-size: 13px; padding: 6px 10px; }
.chat-options { max-height: 92px; overflow-y: auto; flex-shrink: 0; }
.chat-options:empty { display: none; }

.credit3d { position: absolute; right: 8px; bottom: 4px; z-index: 5; font-size: 12px; color: rgba(15,23,42,.75); background: rgba(255,255,255,.7); padding: 2px 8px; border-radius: 6px; pointer-events: auto; }
.credit3d a { color: inherit; font-weight: 600; }

a.btn { text-decoration: none; display: inline-block; }

/* 3D office loading screen (same look as the first "Virtual Office khul raha hai" page) */
.office-loading { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; color: #e2e8f0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 600px at 20% 10%, #1e3a8a55, transparent), linear-gradient(135deg, #0f172a, #134e4a); overflow: hidden; transition: opacity .5s; }
.office-loading.done { opacity: 0; pointer-events: none; }
.office-loading .ol-wrap { width: min(440px, calc(100% - 32px)); text-align: center; }
.office-loading .ol-building { position: relative; width: 220px; height: 170px; margin: 0 auto 26px; }
.office-loading .ol-tower { position: absolute; bottom: 0; left: 40px; width: 140px; height: 150px; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, #1e293b, #0f172a);
  box-shadow: 0 20px 50px #0008, inset 0 0 0 2px #334155; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 16px 14px 34px; }
.office-loading .ol-win { border-radius: 3px; background: #1e293b; animation: ol-light 2.4s infinite; }
.office-loading .ol-door { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 34px; height: 26px; border-radius: 4px 4px 0 0; background: #2dd4bf;
  box-shadow: 0 0 24px #2dd4bf; animation: ol-glow 1.6s infinite alternate; }
.office-loading .ol-ground { position: absolute; bottom: -2px; left: 0; right: 0; height: 3px; border-radius: 3px; background: #334155; }
.office-loading .ol-person { position: absolute; bottom: 2px; width: 10px; height: 20px; border-radius: 5px 5px 2px 2px; background: #f59e0b; animation: ol-walk 3s linear infinite; }
.office-loading .ol-person::before { content: ""; position: absolute; top: -9px; left: 1px; width: 8px; height: 8px; border-radius: 50%; background: #fcd9b6; }
.office-loading .ol-person.p2 { background: #60a5fa; animation-delay: 1s; }
.office-loading .ol-person.p3 { background: #f472b6; animation-delay: 2s; }
.office-loading h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: .3px; color: #e2e8f0; }
.office-loading p { margin: 0; color: #94a3b8; font-size: 14px; }
.office-loading .ol-bar { height: 6px; border-radius: 6px; background: #ffffff14; margin: 22px 0 14px; overflow: hidden; }
.office-loading .ol-bar i { display: block; height: 100%; width: 40%; border-radius: 6px; background: linear-gradient(90deg, transparent, #2dd4bf, transparent); animation: ol-slide 1.3s infinite ease-in-out; }
.office-loading .ol-steps { list-style: none; padding: 0; margin: 0; font-size: 13px; color: #94a3b8; text-align: left; display: inline-block; }
.office-loading .ol-steps li { margin: 5px 0; opacity: 0; animation: ol-show .4s forwards; }
.office-loading .ol-steps li:nth-child(2) { animation-delay: .6s; } .office-loading .ol-steps li:nth-child(3) { animation-delay: 1.2s; } .office-loading .ol-steps li:nth-child(4) { animation-delay: 1.8s; }
@keyframes ol-light { 0%, 100% { background: #1e293b; } 50% { background: #fde68a; box-shadow: 0 0 10px #fde68a88; } }
@keyframes ol-glow { to { box-shadow: 0 0 6px #2dd4bf; opacity: .75; } }
@keyframes ol-walk { 0% { left: -20px; opacity: 0; } 10% { opacity: 1; } 55% { left: 105px; opacity: 1; } 60% { left: 105px; opacity: 0; } 100% { left: 105px; opacity: 0; } }
@keyframes ol-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes ol-show { to { opacity: 1; } }

/* ---------- visitor page on phones ---------- */
@media (max-width: 900px) {
  /* steps: one small pill with the current step instead of a big box */
  .visit-page .hud-top { top: 8px; left: 8px; right: 8px; }
  .visit-page #visit-steps { padding: 6px 10px; gap: 6px; flex-wrap: nowrap; max-width: 100%; }
  .visit-page #visit-steps > b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
  .visit-page #visit-steps .vstep:not(.current) { display: none; }
  .visit-page #visit-steps .vstep.current { font-size: 12px; padding: 3px 9px; white-space: nowrap; }
  /* views + sound: one swipeable row at the bottom of the 3D view */
  .visit-page .hud-bottom { display: block; left: 8px; right: 8px; bottom: calc(55% + 8px); }
  .visit-page .hud-bottom .row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 6px; gap: 6px; }
  .visit-page .hud-bottom .row::-webkit-scrollbar { display: none; }
  .visit-page .hud-bottom button { font-size: 12px; padding: 6px 9px; white-space: nowrap; flex: none; }
  .visit-page.chat-hidden .hud-bottom { bottom: 76px; right: 8px; }
  .visit-page.chat-hidden .chat-show { right: 12px; bottom: 14px; }
  /* maker credit on the left so the Chat button never covers it */
  .visit-page .credit3d { left: 8px; right: auto; top: 54px; bottom: auto; font-size: 10px; }
  .visit-page.chat-hidden .credit3d { top: auto; bottom: 28px; right: auto; }
  .visit-page .hud-bottom .sound-toggle { order: -1; } /* sound on/off first, no scrolling needed */
  .visit-page .walk-pad { bottom: calc(55% + 64px); }
  .visit-page.chat-hidden .walk-pad { bottom: 130px; }
}
.log-filter select, .log-filter input { width: auto; min-width: 160px; }
