/* HERMITZ HUMANOID — design system
   Midnight black · deep navy · electric blue · cyan · violet · magenta accents · glassmorphism */
:root {
  --bg: #03050b; --bg2: #070b16; --panel: rgba(13, 20, 38, .58); --panel-2: rgba(18, 28, 52, .6);
  --line: rgba(120, 170, 255, .12); --line-2: rgba(120, 170, 255, .22);
  --text: #e6eefb; --muted: #8592ab; --dim: #5b6782;
  --cyan: #38d6ff; --blue: #2f7bff; --violet: #8b5cf6; --magenta: #e04ad8; --orange: #ff9a3c; --gold: #ffd36b;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --r: 16px; --r-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --glow: 0 0 0 1px rgba(56, 214, 255, .25), 0 8px 40px -8px rgba(47, 123, 255, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #8be7ff; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0 0 .5em; }
h2 { font-size: 18px; } h3 { font-size: 15px; }
code, .mono { font-family: var(--mono); }
code { background: rgba(56, 214, 255, .08); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
pre.code { background: #060b17; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; overflow: auto; font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12px; }
.grad { background: linear-gradient(90deg, var(--cyan), var(--violet) 60%, var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glass { background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.hud-label { font: 500 11px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); }
.hud-label.tiny { font-size: 10px; color: var(--dim); margin-top: 14px; display: block; }
.hud-label.bad { color: var(--bad); }
.bg-grid { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 70% -10%, rgba(139, 92, 246, .14), transparent 60%), radial-gradient(ellipse 70% 50% at 0% 100%, rgba(47, 123, 255, .12), transparent 60%),
    linear-gradient(rgba(120, 170, 255, .035) 1px, transparent 1px) 0 0 / 44px 44px, linear-gradient(90deg, rgba(120, 170, 255, .035) 1px, transparent 1px) 0 0 / 44px 44px; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text); font: 500 13px var(--font); cursor: pointer; transition: .2s; white-space: nowrap; }
.btn:hover { border-color: rgba(56, 214, 255, .5); background: rgba(56, 214, 255, .07); color: #fff; }
.btn-glow { background: linear-gradient(135deg, rgba(47, 123, 255, .9), rgba(139, 92, 246, .9)); border-color: transparent; box-shadow: var(--glow); color: #fff; }
.btn-glow:hover { filter: brightness(1.12); }
.btn-danger { border-color: rgba(248, 113, 113, .45); color: #fecaca; } .btn-danger:hover { background: rgba(248, 113, 113, .12); border-color: var(--bad); }
.btn-ok { border-color: rgba(52, 211, 153, .45); color: #bbf7d0; } .btn-ok:hover { background: rgba(52, 211, 153, .12); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 9px; }
.btn.block { width: 100%; justify-content: center; padding: 12px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--text); cursor: pointer; }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--magenta); color: #fff; font: 600 10px/18px var(--font); font-style: normal; }
input, select, textarea { width: 100%; background: rgba(3, 7, 16, .6); border: 1px solid var(--line-2); border-radius: 11px; color: var(--text); padding: 10px 12px; font: 14px var(--font); outline: none; transition: .2s; }
input:focus, select:focus, textarea:focus { border-color: rgba(56, 214, 255, .6); box-shadow: 0 0 0 3px rgba(56, 214, 255, .12); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: auto; accent-color: var(--cyan); }
label { display: block; font-size: 12px; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.inline { display: inline; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }

/* ---------- badges, pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font: 500 11px/1.6 var(--mono); letter-spacing: .03em; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.badge-ok { color: #6ee7b7; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.badge-warn { color: #fcd34d; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.badge-bad { color: #fca5a5; border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .08); }
.badge-info { color: #7dd3fc; border-color: rgba(56, 214, 255, .35); background: rgba(56, 214, 255, .08); }
.pill { margin-left: auto; font-style: normal; font: 600 10px/18px var(--font); min-width: 20px; text-align: center; padding: 0 6px; border-radius: 9px; background: var(--magenta); color: #fff; }

/* ---------- flash ---------- */
.flash { padding: 11px 14px; border-radius: 12px; margin: 0 0 14px; border: 1px solid var(--line-2); background: var(--panel); white-space: pre-line; }
.flash-success { border-color: rgba(52, 211, 153, .4); color: #a7f3d0; }
.flash-danger { border-color: rgba(248, 113, 113, .45); color: #fecaca; }
.flash-warning { border-color: rgba(251, 191, 36, .45); color: #fde68a; }
.content > .flash, .main > .flash { margin: 14px 24px 0; }

/* shared brand elements (restored) */
.brand-orb { width: 30px; height: 30px; border-radius: 50%; flex: none; background: radial-gradient(circle at 50% 55%, #ffd36b 0 12%, #ff8a2a 22%, rgba(47, 123, 255, .9) 48%, rgba(56, 214, 255, .25) 70%, transparent 72%); box-shadow: 0 0 18px rgba(56, 214, 255, .55), inset 0 0 0 1px rgba(56, 214, 255, .6); animation: orb 4s ease-in-out infinite; }
.brand-orb.big { width: 64px; height: 64px; margin: 0 auto 14px; }
@keyframes orb { 50% { box-shadow: 0 0 30px rgba(56, 214, 255, .8), inset 0 0 0 1px rgba(139, 92, 246, .8); } }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--violet)); font-weight: 600; color: #fff; }
.stop-flag { font: 600 11px var(--mono); letter-spacing: .12em; color: #fff; background: #b91c1c; padding: 6px 10px; border-radius: 8px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.content { padding: 24px 28px 60px; max-width: 1480px; }
body.is-stopped .tb { box-shadow: inset 0 -2px 0 #ef4444; }


/* ---------- panels & grids ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stat { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(56, 214, 255, .14), transparent 70%); }
.stat .k { font: 500 10.5px var(--mono); letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.stat .v { font: 600 30px/1.15 var(--display); margin-top: 6px; }
.stat .s { font-size: 12px; color: var(--dim); margin-top: 2px; }
.stat a { position: absolute; inset: 0; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: var(--dim); margin-bottom: 8px; }

/* health ring */
.ring { --p: 0; --c: var(--ok); width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(closest-side, #060b17 79%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, .06) 0); box-shadow: 0 0 40px -10px var(--c); }
.ring b { font: 600 38px/1 var(--display); } .ring small { display: block; font: 10px var(--mono); letter-spacing: .14em; color: var(--muted); text-align: center; }
.health-hero { display: flex; gap: 22px; align-items: center; }
.ecg { height: 46px; width: 100%; }
.ecg path { stroke: var(--ok); stroke-width: 2; fill: none; stroke-dasharray: 600; animation: ecg 3s linear infinite; filter: drop-shadow(0 0 6px var(--ok)); }
@keyframes ecg { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid rgba(120, 170, 255, .07); vertical-align: top; }
.table tr:hover td { background: rgba(56, 214, 255, .025); }
.table .r { text-align: right; }
.table .actions { white-space: nowrap; text-align: right; }

/* lists & cards */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.item .t { font-weight: 500; } .item .d { color: var(--muted); font-size: 12.5px; }
.agent-card { position: relative; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.agent-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--c, var(--cyan)); box-shadow: 0 0 18px var(--c, var(--cyan)); }
.agent-av { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font: 600 17px var(--display); color: #fff; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c, #38d6ff) 80%, #fff 20%), color-mix(in srgb, var(--c, #38d6ff) 50%, #000 50%)); box-shadow: 0 0 20px -4px var(--c, #38d6ff); flex: none; }
.agent-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.agent-top strong { display: block; font-family: var(--display); font-size: 16px; }
.agent-top span { color: var(--muted); font-size: 12px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; word-break: break-word; }
.prose { line-height: 1.65; } .prose h1, .prose h2 { font-size: 17px; margin-top: 1.2em; } .prose h3 { font-size: 15px; margin-top: 1em; } .prose ul, .prose ol { padding-left: 20px; } .prose p { margin: .5em 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.tabs a.on { color: #fff; border-color: rgba(56, 214, 255, .5); background: rgba(56, 214, 255, .08); }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: rgba(255, 255, 255, .015); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 120px; }
.kcol h4 { margin: 2px 4px 10px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.kcard { display: block; padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 8px; color: var(--text); font-size: 13px; }
.kcard:hover { border-color: rgba(56, 214, 255, .4); color: #fff; }
.score { font: 600 12px var(--mono); padding: 1px 7px; border-radius: 7px; background: rgba(56, 214, 255, .12); color: var(--cyan); }
.stop-big { width: 100%; padding: 22px; border-radius: 18px; border: 2px solid #ef4444; background: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, .35), rgba(127, 29, 29, .35)); color: #fff; font: 700 20px var(--display); letter-spacing: .12em; cursor: pointer; box-shadow: 0 0 40px -10px #ef4444; }
.stop-big.resume { border-color: var(--ok); background: radial-gradient(circle at 50% 0%, rgba(52, 211, 153, .3), rgba(6, 78, 59, .35)); box-shadow: 0 0 40px -10px var(--ok); }
details summary { cursor: pointer; color: var(--cyan); font-size: 13px; }
.mt { margin-top: 14px; } .mb0 { margin-bottom: 0; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.search { display: flex; gap: 8px; flex-wrap: wrap; } .search input, .search select { width: auto; flex: 1; min-width: 140px; }

/* ---------- auth & install ---------- */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-glow { position: fixed; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 123, 255, .22), rgba(139, 92, 246, .1) 40%, transparent 70%); filter: blur(20px); pointer-events: none; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 34px 30px; border-radius: 24px; text-align: center; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.auth-card h1 { font-size: 26px; letter-spacing: .06em; margin: 8px 0 4px; }
.auth-card label { text-align: left; margin: 14px 0; }
.auth-card .btn { margin-top: 10px; }
.install-wrap { position: relative; z-index: 1; width: 100%; max-width: 760px; padding: 30px; border-radius: 24px; }
.install-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.install-head .brand-orb.big { margin: 0; }
.install-head h1 { margin: 4px 0 0; font-size: 26px; letter-spacing: .06em; }
.steps { display: flex; gap: 6px; padding: 0; margin: 0 0 22px; list-style: none; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.steps li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--mono); background: rgba(255, 255, 255, .05); }
.steps li.cur { color: #fff; border-color: rgba(56, 214, 255, .55); background: rgba(56, 214, 255, .08); } .steps li.cur span { background: var(--cyan); color: #001018; }
.steps li.done { color: var(--ok); } .steps li.done span { background: rgba(52, 211, 153, .2); }

/* ---------- HUMANOID PAGE ---------- */
body.humanoid-page { position: fixed; inset: 0; overflow: hidden; background: #000; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.hz-bg { position: fixed; inset: 0; background: radial-gradient(ellipse 55% 60% at 50% 36%, #070b14 0%, #030407 55%, #000 85%); }
.hz-bg::after { content: ""; position: fixed; inset: -50%; opacity: .07; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: hzGrain 1.2s steps(6) infinite; }
@keyframes hzGrain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
@media (prefers-reduced-motion: reduce) { .hz-bg::after { animation: none; } }
#hzCanvas { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
.hz-hud { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 20px; padding-top: max(16px, env(safe-area-inset-top)); pointer-events: none; }
.hz-hud > * { pointer-events: auto; }
.hz-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 13px/1.1 var(--display); letter-spacing: .2em; }
.hz-brand small { font: 500 9px var(--mono); letter-spacing: .18em; color: var(--cyan); }
.hz-brand .brand-orb { width: 26px; height: 26px; }
.hz-meta { font-size: 10px; letter-spacing: .16em; color: rgba(160, 200, 255, .7); margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s infinite; }
.hz-hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hz-status { font-size: 11px; letter-spacing: .2em; color: var(--cyan); text-shadow: 0 0 12px rgba(56, 214, 255, .8); padding-top: 6px; }
.hz-status[data-state=thinking] { color: #c4b5fd; text-shadow: 0 0 12px rgba(139, 92, 246, .9); }
.hz-status[data-state=speaking] { color: var(--gold); text-shadow: 0 0 12px rgba(255, 154, 60, .9); }
.hz-status[data-state=listening] { color: #6ee7b7; text-shadow: 0 0 12px rgba(52, 211, 153, .9); }
.hz-status[data-state=error] { color: var(--bad); }
.hz-actions { display: flex; gap: 8px; }
.hz-icon, .hz-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(6, 12, 26, .55); color: var(--text); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); cursor: pointer; font: 500 18px var(--font); }
.hz-pill { color: var(--warn); border-color: rgba(251, 191, 36, .45); font: 600 13px var(--mono); }
.hz-stopbar { position: fixed; z-index: 6; top: 0; left: 0; right: 0; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); text-align: center; background: rgba(185, 28, 28, .9); font: 600 11px var(--mono); letter-spacing: .1em; }
.hz-stopbar a { color: #fff; text-decoration: underline; margin-left: 8px; }
.hz-toasts { position: fixed; z-index: 7; top: 112px; right: 20px; width: 360px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.hz-card { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-radius: 16px; background: rgba(12, 16, 28, .78); box-shadow: 0 12px 40px -10px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(-10px) scale(.97); transition: .45s cubic-bezier(.2, .8, .2, 1); }
.hz-card.in { opacity: 1; transform: none; }
.hz-card-av { --c: var(--cyan); width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 600 14px var(--display); color: #fff; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 85%, #fff 15%), color-mix(in srgb, var(--c) 45%, #000 55%)); box-shadow: 0 0 14px -2px var(--c); }
.hz-card-top { font-size: 9.5px; letter-spacing: .16em; color: var(--dim); }
.hz-card-title { font: 600 14px/1.35 var(--display); margin-top: 2px; }
.hz-card-detail { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.hz-card.tone-ok { border-color: rgba(52, 211, 153, .3); } .hz-card.tone-ok .hz-card-top { color: #6ee7b7; }
.hz-card.tone-warn { border-color: rgba(251, 191, 36, .35); } .hz-card.tone-warn .hz-card-top { color: #fcd34d; }
.hz-card.tone-bad { border-color: rgba(248, 113, 113, .4); } .hz-card.tone-bad .hz-card-top { color: #fca5a5; }
.hz-caption { position: fixed; z-index: 4; left: 50%; transform: translateX(-50%); bottom: calc(205px + env(safe-area-inset-bottom)); width: min(760px, calc(100vw - 32px)); text-align: center; pointer-events: none; }
.hz-you { font: 500 13px var(--font); color: rgba(180, 210, 255, .7); margin-bottom: 6px; min-height: 1em; }
.hz-say { font: 600 clamp(16px, 2.2vw, 21px)/1.45 var(--display); color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .95), 0 0 2px #000; max-height: 30vh; overflow-y: auto; pointer-events: auto; scrollbar-width: none; }
.hz-say::-webkit-scrollbar { display: none; }
.hz-say .li { display: block; font-weight: 500; font-size: .88em; }
.hz-say code { background: rgba(255, 255, 255, .1); }
.hz-dock { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; padding: 0 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 10px; background: linear-gradient(transparent, rgba(2, 4, 10, .85) 40%); }
.hz-chips { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 2px; scrollbar-width: none; }
.hz-chips::-webkit-scrollbar { display: none; }
.hz-chips button { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(8, 14, 30, .6); color: #cfe0ff; font: 500 12.5px var(--font); cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: .2s; }
.hz-chips button:hover { border-color: rgba(56, 214, 255, .6); color: #fff; }
.hz-input { display: flex; align-items: center; gap: 6px; width: min(640px, 100%); padding: 6px; border-radius: 18px; }
.hz-input input { border: 0; background: transparent; box-shadow: none; padding: 10px 6px; font-size: 15px; }
.hz-input input:focus { box-shadow: none; }
.hz-lang { width: auto; padding: 8px; border-radius: 12px; font-size: 11px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.hz-send { width: 42px; height: 42px; border-radius: 13px; border: 0; background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.hz-mic-row { display: flex; align-items: center; justify-content: center; gap: 22px; width: min(640px, 100%); }
.hz-mic { position: relative; width: 66px; height: 66px; border-radius: 50%; border: 1px solid rgba(56, 214, 255, .6); background: radial-gradient(circle at 50% 35%, rgba(56, 214, 255, .35), rgba(47, 123, 255, .25) 50%, rgba(8, 14, 30, .9)); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 30px -6px rgba(56, 214, 255, .8); flex: none; }
.hz-mic .ic { width: 26px; height: 26px; }
.hz-mic-ring { position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(56, 214, 255, .35); }
body.is-listening .hz-mic { background: radial-gradient(circle at 50% 35%, rgba(52, 211, 153, .5), rgba(16, 120, 90, .4) 55%, rgba(8, 14, 30, .9)); border-color: var(--ok); box-shadow: 0 0 40px -4px var(--ok); }
body.is-listening .hz-mic-ring { border-color: var(--ok); animation: ripple 1.3s infinite; }
body[data-state=speaking] .hz-mic { border-color: var(--orange); box-shadow: 0 0 36px -6px var(--orange); }
body[data-state=thinking] .hz-mic-ring { border-color: var(--violet); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes ripple { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.hz-toggle { display: flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: .14em; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 6px; width: 110px; }
.hz-toggle input { display: none; }
.hz-toggle span { width: 30px; height: 17px; border-radius: 9px; background: rgba(255, 255, 255, .12); position: relative; transition: .2s; flex: none; }
.hz-toggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: .2s; }
.hz-toggle input:checked + span { background: var(--ok); } .hz-toggle input:checked + span::after { left: 15px; }
#hzMute { justify-content: flex-end; color: var(--cyan); } #hzMute.off { color: var(--dim); }
.hz-drawer { position: fixed; z-index: 9; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); padding: 18px; padding-top: max(18px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 10px; transform: translateX(105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); background: rgba(5, 9, 19, .92); user-select: text; -webkit-user-select: text; }
.hz-drawer.open { transform: none; }
.hz-drawer-head { display: flex; justify-content: space-between; align-items: center; }
.hz-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.hz-msg { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; }
.hz-msg.user { background: rgba(47, 123, 255, .1); align-self: flex-end; max-width: 88%; }
.hz-msg.assistant { background: rgba(255, 255, 255, .025); }
.hz-msg-who { font-size: 9.5px; letter-spacing: .16em; color: var(--dim); margin-bottom: 4px; }
.hz-msg-text .li { display: block; padding-left: 10px; }
.hz-msg-ev { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
body.is-stopped .hz-hud { top: 30px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-side { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .55); }
  .main { margin-left: 0; }
  .only-mobile { display: inline-grid; }
  .hide-sm { display: none; }
  .content { padding: 16px 14px 80px; }
  .content > .flash, .main > .flash { margin: 12px 14px 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g4.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: auto; }
  .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; }
  .health-hero { flex-direction: column; align-items: flex-start; }
  .hz-caption { bottom: calc(196px + env(safe-area-inset-bottom)); }
  .hz-say { font-size: 16px; max-height: 24vh; }
  .hz-toasts { top: auto; bottom: calc(262px + env(safe-area-inset-bottom)); left: 12px; right: 12px; width: auto; }
  .hz-toasts .hz-card:nth-child(n+3) { display: none; }
  .hz-card { padding: 8px 11px; gap: 10px; border-radius: 14px; }
  .hz-card-av { width: 28px; height: 28px; font-size: 12px; }
  .hz-card-title { font-size: 13px; } .hz-card-detail { font-size: 11.5px; }
  .hz-hud-left .hz-meta span:last-child { font-size: 0; } .hz-hud-left .hz-meta span:last-child::after { content: 'ONLINE'; font-size: 10px; }
  .hz-meta { display: none; }
  .hz-hud-left .hz-meta:first-of-type { display: flex; }
  .stat .v { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   v1.1 — console shell, dashboard, motion, modals, mobile app
   ===================================================================== */
:root { --sb-w: 264px; --tabbar-h: 64px; --ease-out: cubic-bezier(.2,.8,.2,1); }
body.console { min-height: 100vh; overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }

/* sidebar */
.sb { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 40; display: flex; flex-direction: column; gap: 10px; padding: 16px 12px 14px; padding-top: max(16px, env(safe-area-inset-top)); background: rgba(7, 11, 22, .86); border-right: 1px solid var(--line); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); transition: transform .35s var(--ease-out); }
.sb-head { display: flex; align-items: center; justify-content: space-between; }
.sb-brand { display: flex; align-items: center; gap: 11px; color: var(--text); padding: 4px 6px; }
.sb-logo { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(140deg, #1a3c8f, #4b2aa8); box-shadow: 0 6px 22px -6px rgba(56, 214, 255, .6), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.sb-logo .brand-orb { width: 24px; height: 24px; }
.sb-brand strong { display: block; font: 700 16px/1.1 var(--display); letter-spacing: .02em; }
.sb-brand small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.sb-icon { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--text); font-size: 20px; cursor: pointer; }
.sb-new-wrap { position: relative; }
.sb-new { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text); font: 500 14px var(--font); cursor: pointer; transition: .2s; }
.sb-new:hover { border-color: rgba(56, 214, 255, .45); background: rgba(56, 214, 255, .06); }
.sb-new kbd, .tb-search kbd { margin-left: auto; font: 500 11px var(--mono); padding: 2px 7px; border-radius: 7px; background: rgba(255, 255, 255, .07); color: var(--muted); border: 1px solid var(--line); }
.sb-nav { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 2px; margin: 0 -2px; scrollbar-width: none; }
.sb-nav::-webkit-scrollbar { display: none; }
.sb-nav .nav-group { font: 600 10px var(--mono); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; padding: 14px 12px 6px; }
.sb-nav .nav-link { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: #aebbd3; font-size: 13.5px; transition: color .2s; }
.sb-nav .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.sb-nav .nav-link.active { color: #fff; background: none; box-shadow: none; }
.sb-nav .nav-link.active .ic { color: #fff; }
.nav-pill { position: absolute; z-index: 0; border-radius: 12px; opacity: 0; pointer-events: none; background: linear-gradient(135deg, #2f7bff 0%, #5b5cf6 60%, #8b5cf6 100%); box-shadow: 0 10px 28px -10px rgba(56, 120, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .18); transition: opacity .2s; }
.cnt { margin-left: auto; font: 600 10.5px/18px var(--mono); font-style: normal; min-width: 22px; text-align: center; padding: 0 6px; border-radius: 9px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.cnt.hot { background: var(--magenta); color: #fff; }
.nav-link.active .cnt { background: rgba(255, 255, 255, .22); color: #fff; }
.sb-today { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); color: var(--text); }
.sb-today small { display: block; font-size: 11px; color: var(--muted); }
.sb-today strong { display: block; font: 600 16px/1.2 var(--display); }
.sb-today em { display: block; font-style: normal; font-size: 11px; color: var(--dim); }
.mini-ring { --p: 0; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(closest-side, #0a1122 76%, transparent 78% 100%), conic-gradient(var(--cyan) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); }
.mini-ring b { font: 600 11px var(--mono); }
.main { position: relative; z-index: 1; margin-left: var(--sb-w); min-height: 100vh; }

/* top bar */
.tb { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 26px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(3, 5, 11, .72); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.tb-search { flex: 0 1 380px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--dim); font: 14px var(--font); cursor: text; text-align: left; }
.tb-search span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-date { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c9d5ea; padding: 0 6px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s infinite; display: inline-block; }
.live-dot.off { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.tb-me-wrap { position: relative; }
.tb-me { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text); cursor: pointer; text-align: left; }
.tb-me strong { display: block; font-size: 13px; line-height: 1.2; } .tb-me small { display: block; font-size: 11px; color: var(--dim); }
.tb-me .avatar { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }

/* menus */
.hz-menu { position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; min-width: 230px; padding: 6px; border-radius: 14px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8); background: rgba(10, 15, 30, .96); }
.hz-menu.right { left: auto; right: 0; }
.hz-menu a, .hz-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; color: #d7e2f5; font: 13.5px var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.hz-menu a:hover, .hz-menu button:hover { background: rgba(56, 214, 255, .08); color: #fff; }

/* page enter motion */
.page-enter { animation: pageIn .45s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* tabs: underline ink that stretches */
.tabs { position: relative; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.tabs a { border: 0; border-radius: 0; padding: 10px 14px; color: var(--muted); background: none; }
.tabs a.on { color: #fff; background: none; border: 0; }
.tab-ink { position: absolute; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 12px rgba(56, 214, 255, .7); }

/* dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 20px; }
.greet { color: var(--muted); font-size: 14px; }
.dash-title { font: 600 34px/1.15 var(--display); margin: 4px 0 6px; letter-spacing: -.02em; }
.dash-sub { color: var(--muted); margin: 0; font-size: 14px; }
.dash-actions { display: flex; gap: 10px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dash-main .panel, .dash-side .panel { margin-bottom: 0; }
.kpis { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 14px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); color: var(--text); overflow: hidden; transition: transform .25s var(--ease-out), border-color .25s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--line-2); color: var(--text); }
.kpi-k { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.kpi-k .ic { width: 15px; height: 15px; }
.kpi-v { font: 600 30px/1.1 var(--display); letter-spacing: -.01em; }
.kpi-v small { font-size: 16px; opacity: .8; }
.kpi-f { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.kpi-f .spark { width: 58%; height: 32px; }
.kpi.hero { background: radial-gradient(120% 140% at 0% 0%, #3b8bff 0%, #4d4bf0 45%, #7c3aed 100%); border-color: rgba(255, 255, 255, .18); box-shadow: 0 18px 44px -14px rgba(76, 93, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .25); }
.kpi.hero .kpi-k, .kpi.hero .kpi-s { color: rgba(255, 255, 255, .82); }
.kpi.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 65%); }
.kpi-s { font-size: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-bar { height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.kpi-bar i { display: block; height: 100%; border-radius: 4px; background: #fff; box-shadow: 0 0 10px #fff; }
.chip-d { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font: 600 11px/1.5 var(--mono); }
.chip-d.up { color: #6ee7b7; background: rgba(52, 211, 153, .12); } .chip-d.down { color: #fda4af; background: rgba(248, 113, 113, .12); } .chip-d.flat { color: var(--muted); background: rgba(255, 255, 255, .06); }
.chip-d.glass-chip { color: #fff; background: rgba(255, 255, 255, .18); }

.chart-card { padding: 18px 20px 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.chart-head h3 { margin: 0 0 2px; font-size: 16px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg b { font: 500 12px var(--font); padding: 5px 11px; border-radius: 8px; color: var(--muted); }
.seg b.on { background: #eef4ff; color: #0b1020; }
.chart-stats { display: flex; gap: 30px; flex-wrap: wrap; margin: 6px 0 14px; }
.chart-stats small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.chart-stats strong { font: 600 22px var(--display); } .chart-stats strong em { font: 400 12px var(--font); color: var(--muted); font-style: normal; }
.chart-stats > div:first-child strong { font-size: 32px; }
.tgt-line { display: inline-block; width: 14px; height: 2px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted); font: 500 12.5px var(--font); cursor: pointer; transition: .2s; }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip.on { background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px rgba(76, 93, 255, .8); }
.chart-empty { margin: -8px 0 6px; }
.lolli { width: 100%; height: auto; display: block; }
.lolli .grid { stroke: rgba(120, 170, 255, .07); }
.lolli .ax { fill: #5b6782; font: 10px var(--mono); }
.lolli .target { stroke: var(--cyan); stroke-dasharray: 3 4; opacity: .55; }
.lolli .target-tag { fill: rgba(56, 214, 255, .16); stroke: rgba(56, 214, 255, .5); }
.lolli .target-txt { fill: #7cf0ff; font: 600 10px var(--mono); }
.lolli .stem circle { fill: #8592ab; }
.lolli .stem.beat circle { fill: #7cf0ff; }
.lolli .stem.today circle { fill: #fff; filter: drop-shadow(0 0 6px #fff); }
.lolli .stem { transform-origin: center bottom; transform-box: fill-box; animation: stemUp .7s var(--ease-out) both; animation-delay: calc(var(--i) * 35ms); }
@keyframes stemUp { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: none; } }

.wallet h3, .gauge-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.wallet-v { font: 600 32px var(--display); margin: 2px 0 6px; }
.wallet .area { width: 100%; height: 70px; display: block; margin: 4px 0 10px; }
.wallet-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.wallet-sub small, .gauge-stats small { display: block; font-size: 11.5px; color: var(--muted); }
.wallet-sub strong, .gauge-stats strong { font: 600 16px var(--display); }
.wallet-brain { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #c9d5ea; margin: 2px 0 12px; }
.wallet .btn.block + .btn.block { margin-top: 8px; }
.warn-soft { border-color: rgba(251, 191, 36, .35); color: #fde68a; background: rgba(251, 191, 36, .07); justify-content: center; }
.gauge-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.gauge-wrap { position: relative; flex: none; }
.gauge line { stroke-width: 4.5; stroke-linecap: round; }
.gauge line.on { stroke: url(#gaG); animation: tickIn .4s both; animation-delay: calc(var(--i) * 18ms); }
.gauge line.off { stroke: rgba(255, 255, 255, .09); }
@keyframes tickIn { from { opacity: 0; } to { opacity: 1; } }
.gauge-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge-c b { font: 600 34px/1 var(--display); } .gauge-c small { font-size: 11px; color: var(--muted); }
.gauge-stats { display: flex; flex-direction: column; gap: 10px; }
.ok-t { color: #6ee7b7; }

.segbar { display: flex; gap: 5px; height: 12px; margin: 4px 0 16px; }
.segbar i { border-radius: 6px; min-width: 8px; box-shadow: 0 0 14px -4px currentColor; }
.stage-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stage-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--text); transition: .2s; }
.stage-card:hover { border-color: var(--line-2); color: var(--text); }
.stage-card.lead { border-color: rgba(56, 214, 255, .55); box-shadow: inset 0 0 0 1px rgba(56, 214, 255, .2), 0 10px 30px -16px rgba(56, 214, 255, .7); }
.stage-card small { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.stage-card small i { width: 8px; height: 8px; border-radius: 50%; }
.stage-card strong { font: 600 24px var(--display); } .stage-card strong em { font: 400 12px var(--font); color: var(--muted); font-style: normal; }
.agent-av.sm { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; }
.empty.sm { padding: 16px; }
.eco { display: flex; flex-wrap: wrap; gap: 8px; }
.eco a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: #d7e2f5; font-size: 13px; }
.eco a:hover { border-color: var(--line-2); color: #fff; }
.eco i { width: 8px; height: 8px; border-radius: 50%; background: #475569; }
.eco i.h-healthy { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .eco i.h-degraded { background: var(--warn); } .eco i.h-down { background: var(--bad); box-shadow: 0 0 8px var(--bad); }

/* kanban (tasks board) */
.kcol.k-running { box-shadow: inset 0 2px 0 var(--cyan); } .kcol.k-queued { box-shadow: inset 0 2px 0 #64748b; } .kcol.k-awaiting_approval { box-shadow: inset 0 2px 0 var(--warn); } .kcol.k-completed { box-shadow: inset 0 2px 0 var(--ok); } .kcol.k-failed { box-shadow: inset 0 2px 0 var(--bad); }
.kcard .who { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.kcard .who i { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; font: 600 10px var(--display); font-style: normal; color: #fff; background: var(--c, #64748b); }
.kcard .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* branded modal */
.hz-modal-wrap { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(2, 4, 10, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.hz-modal-wrap.in { opacity: 1; }
.hz-modal { width: min(440px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; border-radius: 22px; padding: 20px; background: rgba(11, 17, 34, .94); border: 1px solid var(--line-2); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(56, 214, 255, .08), 0 0 60px -20px rgba(76, 93, 255, .6); transform: translateY(14px) scale(.97); transition: transform .35s var(--ease-out); }
.hz-modal.wide { width: min(620px, 100%); }
.hz-modal-wrap.in .hz-modal { transform: none; }
.hz-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hz-modal-head .brand-orb { width: 34px; height: 34px; flex: none; }
.hz-modal-head h3 { flex: 1; margin: 0; font-size: 18px; }
.hz-modal-x { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.hz-modal-body { color: #c9d5ea; line-height: 1.6; }
.hz-modal-body p { margin: .4em 0; }
.hz-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.btn-danger-solid { background: linear-gradient(135deg, #ef4444, #b91c1c); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -8px rgba(239, 68, 68, .8); }
.whats-new { padding-left: 18px; margin: 4px 0; } .whats-new li { margin: 8px 0; }
.install-steps { padding-left: 20px; } .install-steps li { margin: 8px 0; }
.kbd { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); }
.hz-palette input { font-size: 16px; padding: 12px 14px; }
.hz-pal-list { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.hz-pal-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; color: #d7e2f5; }
.hz-pal-list a small { color: var(--dim); font-size: 11px; }
.hz-pal-list a.sel, .hz-pal-list a:hover { background: linear-gradient(90deg, rgba(47, 123, 255, .25), rgba(139, 92, 246, .12)); color: #fff; }
.hz-pal-list a.ask span { color: #7cf0ff; }

/* branded toasts */
.toasts { position: fixed; z-index: 150; top: calc(70px + env(safe-area-inset-top)); right: 18px; width: min(380px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 16px; background: rgba(11, 17, 34, .95); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -14px rgba(0, 0, 0, .9); transform: translateX(30px); opacity: 0; transition: .45s var(--ease-out); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.toast.in { transform: none; opacity: 1; }
.toast strong { display: block; font: 600 14px var(--display); }
.toast p { margin: 2px 0 0; font-size: 13px; color: #b9c6dd; white-space: pre-line; word-break: break-word; }
.toast > div { flex: 1; min-width: 0; }
.toast-orb { flex: none; width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 50% 55%, #ffd36b 0 14%, #ff8a2a 24%, rgba(47, 123, 255, .9) 50%, transparent 72%); box-shadow: 0 0 14px rgba(56, 214, 255, .6); }
.toast.tone-success { border-color: rgba(52, 211, 153, .35); } .toast.tone-danger { border-color: rgba(248, 113, 113, .45); } .toast.tone-warning { border-color: rgba(251, 191, 36, .4); }
.toast.tone-danger .toast-orb { background: radial-gradient(circle, #fecaca 0 14%, #ef4444 40%, transparent 72%); box-shadow: 0 0 14px rgba(239, 68, 68, .7); }
.toast-x { border: 0; background: none; color: var(--dim); font-size: 18px; cursor: pointer; line-height: 1; }

/* humanoid camera button */
.hz-icon.on { border-color: var(--ok); color: #6ee7b7; box-shadow: 0 0 18px -4px var(--ok); }
.hz-cam-label { font-size: 9.5px; letter-spacing: .18em; color: #6ee7b7; text-shadow: 0 0 10px rgba(52, 211, 153, .8); }

/* mobile tab bar */
.tabbar { display: none; }
.only-mobile { display: none; }
.scrim { display: none; }
@media (max-width: 1240px) { .kpis { grid-template-columns: 1fr 1fr; } .dash-grid { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 1024px) { .dash-grid { grid-template-columns: 1fr; } .dash-side { display: grid; grid-template-columns: 1fr 1fr; } .stage-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  :root { --sb-w: 286px; }
  .sb { transform: translateX(-105%); box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .8); }
  body.nav-open .sb { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); }
  .main { margin-left: 0; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); }
  .only-mobile { display: inline-grid; }
  .hide-sm { display: none !important; }
  .tb { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .tb-search { flex: 1; }
  .content { padding: 16px 14px 24px; }
  input, select, textarea { font-size: 16px; }
  .dash-title { font-size: 28px; }
  .dash-actions { width: 100%; } .dash-actions .btn { flex: 1; justify-content: center; }
  .dash-side { grid-template-columns: 1fr; }
  .kpis { gap: 10px; } .kpi { padding: 13px; } .kpi-v { font-size: 24px; } .kpi.hero { grid-column: span 2; }
  .chart-stats { gap: 16px; } .chart-stats > div:first-child strong { font-size: 26px; }
  .stage-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .toasts { top: auto; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); right: 12px; }
  .toast { transform: translateY(20px); }
  .hz-modal-wrap { align-items: flex-end; padding: 0; }
  .hz-modal { width: 100%; border-radius: 24px 24px 0 0; padding-bottom: max(20px, env(safe-area-inset-bottom)); transform: translateY(100%); }
  .hz-modal.wide { width: 100%; }
  .tabbar { display: flex; position: fixed; z-index: 45; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); height: var(--tabbar-h); padding: 6px; border-radius: 22px; background: rgba(9, 14, 28, .9); border: 1px solid var(--line-2); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .9); }
  .tabbar .tab { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: #8f9cb6; font: 500 10.5px var(--font); border-radius: 16px; cursor: pointer; }
  .tabbar .tab .ic { width: 21px; height: 21px; }
  .tabbar .tab.active { color: #fff; }
  .tabbar .nav-pill { border-radius: 16px; }
  .tabbar .tab .dot { position: absolute; top: 4px; right: calc(50% - 20px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--magenta); color: #fff; font: 600 9.5px/16px var(--font); font-style: normal; }
}
@media (display-mode: standalone) { .tb { padding-top: max(14px, env(safe-area-inset-top)); } }
/* keep everything inside the phone's width */
.tb-search { min-width: 0; }
.main, .content { min-width: 0; }
body.console { overflow-x: hidden; }
@media (max-width: 860px) { .tb { gap: 8px; } .tb-right { gap: 6px; flex: none; } .tb-me { padding: 3px; border: 0; background: none; } }
/* 1.2 — tap-to-hear prompt when the browser blocks speech until a tap */
.hz-wake { position: fixed; left: 50%; top: 58%; white-space: nowrap; z-index: 30; transform: translate(-50%, 8px) scale(.96); opacity: 0; display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; border-radius: 999px; border: 1px solid rgba(255, 140, 70, .45); background: rgba(10, 8, 12, .62); color: #ffe3cf; font: 500 15px var(--sans, Inter, sans-serif); letter-spacing: .01em; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 40px rgba(255, 90, 30, .22); transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1); cursor: pointer; }
.hz-wake.in { opacity: 1; transform: translate(-50%, 0) scale(1); }
.hz-wake-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff7a2f; box-shadow: 0 0 0 0 rgba(255, 122, 47, .7); animation: hzWakePulse 1.6s infinite; }
@keyframes hzWakePulse { 70% { box-shadow: 0 0 0 12px rgba(255, 122, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 122, 47, 0); } }
/* 1.3 — team link page */
.gz-intro { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 22px; background: radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, .25), rgba(0, 0, 0, .78)); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); transition: opacity .55s ease; }
.gz-intro.out { opacity: 0; pointer-events: none; }
.gz-card { width: min(420px, 100%); text-align: center; padding: 30px 26px 24px; border-radius: 26px; border: 1px solid rgba(255, 140, 70, .28); background: rgba(8, 10, 16, .72); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(255, 100, 40, .10); }
.gz-card h1 { font: 700 30px/1.15 var(--display, 'Space Grotesk', sans-serif); margin: 6px 0 10px; color: #fff; letter-spacing: -.01em; }
.gz-card p { color: #c9d3e6; font-size: 15px; line-height: 1.55; margin: 0 0 12px; }
.gz-kicker { font-size: 11px; letter-spacing: .22em; color: #7fd0ff; }
.gz-consent { font-size: 12.5px !important; color: #8a97ad !important; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); }
.gz-start { width: 100%; justify-content: center; padding: 14px 18px; font-size: 16px; margin-top: 6px; border-radius: 14px; }
.gz-skip { margin-top: 12px; background: none; border: 0; color: #8a97ad; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gz-closed { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 22px; z-index: 5; }
.gz-closed small { display: block; margin-top: 10px; font-size: 11px; letter-spacing: .2em; color: #6b7891; }
.guest-page .hz-input input { flex: 1; min-width: 0; }
.guest-page #hzEnd { font-size: 18px; font-weight: 600; }
.guest-page.is-ended .hz-chips, .guest-page.is-ended .hz-mic-row, .guest-page.is-ended .hz-input { opacity: .35; pointer-events: none; }
/* 1.3 — Team Links console page */
.tl-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.tl-top p { margin: 0; }
.tl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.tl-card { margin: 0; display: flex; flex-direction: column; gap: 12px; transition: border-color .3s, box-shadow .3s; }
.tl-card.fresh { border-color: rgba(255, 140, 70, .55); box-shadow: 0 0 0 1px rgba(255, 140, 70, .25), 0 14px 40px -14px rgba(255, 110, 40, .45); }
.tl-card-top { display: flex; align-items: center; gap: 12px; }
.tl-card-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-card-who a { color: var(--text); text-decoration: none; font-size: 16px; }
.tl-av { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; flex: none; }
.tl-av-lg { width: 72px; height: 72px; border-radius: 20px; }
.tl-av-i { display: grid; place-items: center; background: radial-gradient(circle at 40% 30%, rgba(255, 150, 80, .9), rgba(255, 90, 30, .55) 45%, rgba(47, 123, 255, .5)); color: #fff; font: 600 18px var(--display); }
.tl-av-lg.tl-av-i { font-size: 28px; }
.tl-url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-url code { font: 500 12.5px var(--mono); color: #9fd3ff; background: rgba(56, 150, 255, .08); border: 1px solid rgba(56, 150, 255, .18); padding: 5px 9px; border-radius: 9px; overflow-wrap: anywhere; }
.tl-last { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; border-left: 2px solid rgba(255, 140, 70, .5); padding-left: 10px; }
.tl-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--dim); }
.tl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.tl-inline { display: inline-flex; gap: 8px; margin: 0; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 10px; }
.tl-slug { display: flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 12px; padding-left: 10px; background: rgba(255, 255, 255, .02); overflow: hidden; }
.tl-slug .muted { font: 12px var(--mono); white-space: nowrap; }
.tl-slug input { border: 0 !important; background: transparent !important; padding-left: 2px !important; min-width: 0; }
.tl-how { margin: 12px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; font-size: 13.5px; }
.tl-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tl-head-main { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.tl-head-main h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.tl-split { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.tl-visits { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; }
.tl-visit { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.tl-visit:hover { background: rgba(255, 255, 255, .03); }
.tl-visit.on { background: rgba(76, 93, 255, .12); border-color: rgba(76, 93, 255, .35); }
.tl-visit img, .tl-visit .tl-av-i { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; flex: none; font-size: 14px; }
.tl-visit > span:not(.tl-av-i) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-visit strong { font-size: 13px; font-weight: 500; }
.tl-visit em { font-style: normal; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff7a2f; box-shadow: 0 0 10px #ff7a2f; flex: none; }
.tl-chat-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.tl-photo { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; flex: none; border: 1px solid var(--line-2); }
.tl-summary { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(56, 150, 255, .07); border: 1px solid rgba(56, 150, 255, .2); font-size: 13.5px; line-height: 1.55; }
.tl-summary.urgent { background: rgba(255, 110, 40, .09); border-color: rgba(255, 110, 40, .35); }
.tl-msgs { display: flex; flex-direction: column; gap: 10px; }
.tl-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.tl-msg.guest { align-self: flex-end; background: linear-gradient(135deg, rgba(47, 123, 255, .22), rgba(139, 92, 246, .22)); border: 1px solid rgba(110, 120, 255, .3); }
.tl-msg.prime { align-self: flex-start; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.tl-who { font-size: 10px; letter-spacing: .12em; color: var(--dim); margin-bottom: 4px; }
.tl-empty { text-align: center; padding: 40px 20px; }
.tl-empty .brand-orb { margin-bottom: 16px; }
@media (max-width: 860px) {
  .tl-split { grid-template-columns: 1fr; }
  .tl-visits { max-height: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; }
  .tl-visit { flex: none; width: 250px; }
  .tl-msg { max-width: 92%; }
  .tl-grid { grid-template-columns: 1fr; }
}
.form-grid [hidden], label[hidden] { display: none !important; }
.tl-slug input { flex: 1; width: auto; }
@media (min-width: 861px) { #tlForm .form-grid > label:nth-child(2) { grid-column: span 1; } }
/* 1.4 — phone notifications */
.push-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.push-row > div:first-child { flex: 1; min-width: 240px; }
[data-push-state][data-state="on"] { color: #6ee7b7; border-color: rgba(52, 211, 153, .4); }
[data-push-state][data-state="denied"], [data-push-state][data-state="ios-install"] { color: #fcd34d; border-color: rgba(252, 211, 77, .35); }
.push-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-color: rgba(255, 140, 70, .35); background: linear-gradient(135deg, rgba(255, 110, 40, .08), rgba(76, 93, 255, .06)); }
.push-banner[hidden] { display: none; }
.push-banner > div:nth-child(2) { flex: 1; min-width: 220px; }
.push-banner p { margin: 4px 0 0; }
.push-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 122, 47, .16); color: #ffb37f; flex: none; }
.push-ic svg { width: 20px; height: 20px; }
.hz-menu [hidden] { display: none !important; }
/* 1.7 — voice notes & live takeover (team link page) */
.gz-note-chip { display: inline-flex; align-items: center; gap: 7px; border-color: rgba(255, 122, 47, .45) !important; color: #ffd2b5 !important; background: rgba(255, 110, 40, .12) !important; }
.gz-note-chip svg { width: 15px; height: 15px; }
.gz-rec { display: flex; align-items: center; gap: 12px; margin: 0 auto 10px; width: min(560px, calc(100% - 24px)); padding: 10px 12px 10px 16px; border-radius: 18px; border: 1px solid rgba(255, 90, 60, .45); background: rgba(20, 6, 6, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.gz-rec[hidden] { display: none; }
.gz-rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #ff4d3d; box-shadow: 0 0 12px #ff4d3d; animation: pulse 1s infinite; flex: none; }
.gz-rec-time { font-size: 14px; color: #ffd9d2; min-width: 38px; }
.gz-rec-bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 28px; min-width: 0; overflow: hidden; }
.gz-rec-bars i { flex: 1; min-width: 2px; height: 100%; border-radius: 2px; background: linear-gradient(180deg, #ff9a5c, #ff4d3d); transform: scaleY(.15); transition: transform .08s linear; }
.gz-rec-cancel { background: none; border: 0; color: #c9a8a2; font-size: 13px; cursor: pointer; }
.gz-rec-send { padding: 9px 16px; border-radius: 12px; }
.guest-page.is-recording .hz-chips, .guest-page.is-recording .hz-input, .guest-page.is-recording .hz-mic-row { opacity: .3; pointer-events: none; }
.guest-page.is-live .dot-live { background: #ff7a2f; box-shadow: 0 0 10px #ff7a2f; }
.guest-page.is-live #gzLiveText { color: #ffb37f; }
/* console: live panel & voice notes */
.tl-live { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.tl-live.on { border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .06); }
.tl-live.taken { border-color: rgba(255, 122, 47, .55); background: rgba(255, 110, 40, .08); }
.tl-live-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-live-head .tl-live-sub { flex: 1; min-width: 200px; }
.tl-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #64748b; flex: none; }
.tl-live.on .tl-live-dot { background: #34d399; box-shadow: 0 0 10px #34d399; animation: pulse 1.4s infinite; }
.tl-live.taken .tl-live-dot { background: #ff7a2f; box-shadow: 0 0 10px #ff7a2f; }
.tl-say { display: flex; gap: 8px; }
.tl-say[hidden] { display: none; }
.tl-say input { flex: 1; min-width: 0; }
.tl-mic.on { color: #ff7a2f; border-color: rgba(255, 122, 47, .6); }
.tl-msg.owner { align-self: flex-start; background: rgba(255, 110, 40, .10); border: 1px solid rgba(255, 122, 47, .35); }
.tl-msg.fresh { animation: tlIn .4s ease; }
@keyframes tlIn { from { opacity: 0; transform: translateY(6px); } }
.tl-voice { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.tl-voice svg { width: 14px; height: 14px; }
.tl-msg audio { width: min(320px, 100%); height: 36px; display: block; }
.tl-transcript { margin-top: 6px; font-size: 13.5px; line-height: 1.5; }
.guest-page.is-recording .hz-caption { opacity: 0; transition: opacity .2s; }

/* 1.9 — kiosk & QR */
.qr-box { background: #fff; border-radius: 18px; padding: 14px; width: min(260px, 70vw); margin: 4px auto 0; box-shadow: 0 0 0 2px rgba(255, 138, 42, .7), 0 10px 40px rgba(255, 110, 40, .25); }
.qr-box svg { display: block; width: 100%; height: auto; }
.tl-kiosk-tag { font: 600 9.5px var(--mono); letter-spacing: .14em; color: #ffb37f; border: 1px solid rgba(255, 138, 42, .45); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 2px; }
.tl-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tl-kind-opt { display: flex !important; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); cursor: pointer; flex-direction: row !important; }
.tl-kind-opt:has(input:checked) { border-color: rgba(76, 93, 255, .6); background: rgba(76, 93, 255, .10); }
.tl-kind-opt input { margin-top: 3px; }
.tl-kind-opt span { display: flex; flex-direction: column; gap: 3px; }
.tl-kind-opt small { color: var(--muted); font-size: 12px; line-height: 1.45; font-weight: 400; }
@media (max-width: 860px) { .tl-kind { grid-template-columns: 1fr; } }
.gz-name { width: 100%; margin: 2px 0 12px; padding: 13px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: #fff; font: 500 16px var(--sans, Inter, sans-serif); text-align: center; outline: none; }
.gz-name:focus { border-color: rgba(76, 93, 255, .7); box-shadow: 0 0 0 3px rgba(76, 93, 255, .2); }
.gz-intro[hidden] { display: none; }

/* 2.0.0 — Prime links: relationship tags, camera events, spoken turns */
.tl-rel-tag { display: inline-block; vertical-align: middle; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-left: 4px; }
.tl-rels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tl-rel input { position: absolute; opacity: 0; pointer-events: none; }
.tl-rel span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.tl-rel input:checked + span { border-color: var(--accent, #5fd0ff); box-shadow: 0 0 12px -4px var(--accent, #5fd0ff); }
.tl-rel input:focus-visible + span { outline: 2px solid var(--accent, #5fd0ff); outline-offset: 2px; }
.tl-event { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.03); border: 1px dashed var(--line); }
.tl-event svg { width: 13px; height: 13px; }
.tl-event em { font-style: normal; opacity: .7; }
.tl-selfie { align-self: center; display: block; width: min(260px, 70%); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 30px -12px rgba(0,0,0,.8); }
.tl-selfie img { display: block; width: 100%; height: auto; }
