/* Handlr UI: shared by the user dashboard (/app) and the admin console (/admin). */
:root {
  --display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  /* Monochrome, with one accent used sparingly */
  --brand: #6A00FF; --brand-2: #7F1FE5; --lavender: #C77DFF; --navy: #0F0F1E; --mist: #F4F2FA;
  --bg: #FFFFFF; --side: #FFFFFF; --panel: rgba(0,0,0,.022); --panel2: rgba(0,0,0,.018); --panel3: rgba(0,0,0,.05);
  --line: rgba(0,0,0,.1); --line2: rgba(0,0,0,.065); --line-h: rgba(0,0,0,.22);
  --card-line: rgba(0,0,0,.08); --card-line-h: rgba(0,0,0,.18);
  --ink: #0A0A0B; --muted: #3B3B42; --dim: #6E6E78;
  --acc: #6A00FF; --acc-ink: #FFFFFF; --acc-soft: rgba(106,0,255,.07); --acc-line: rgba(106,0,255,.3);
  --btn: #0A0A0B; --btn-ink: #FFFFFF; --link: #6A00FF; --stripe: #6A00FF;
  --coral: #D42A4C; --coral-soft: rgba(212,42,76,.1);
  --ok: #00865D; --ok-soft: rgba(0,134,93,.1);
  --warn: #8F5E00; --warn-soft: rgba(255,176,32,.16);
  --pattern: transparent;
  --gshadow: none;
  --scrim: rgba(255,255,255,.55);
  --glass: rgba(255,255,255,.68); --glass-line: rgba(0,0,0,.09); --glass-shadow: 0 30px 80px -30px rgba(0,0,0,.25);
  --input: rgba(255,255,255,.7);
  --r-lg: 18px; --r: 14px; --r-sm: 10px;
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #000000; --side: #000000; --panel: rgba(255,255,255,.035); --panel2: rgba(255,255,255,.025); --panel3: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.11); --line2: rgba(255,255,255,.07); --line-h: rgba(255,255,255,.24);
  --card-line: rgba(255,255,255,.09); --card-line-h: rgba(255,255,255,.2);
  --ink: #F4F4F6; --muted: #B6B6C0; --dim: #7D7D88;
  --acc: #C77DFF; --acc-ink: #000000; --acc-soft: rgba(199,125,255,.1); --acc-line: rgba(199,125,255,.4);
  --btn: #F4F4F6; --btn-ink: #000000; --link: #C77DFF; --stripe: #C77DFF;
  --coral: #FF4D6D; --coral-soft: rgba(255,77,109,.14);
  --ok: #00E5A0; --ok-soft: rgba(0,229,160,.12);
  --warn: #FFB020; --warn-soft: rgba(255,176,32,.13);
  --pattern: transparent;
  --gshadow: none;
  --scrim: rgba(0,0,0,.6);
  --glass: rgba(12,12,14,.58); --glass-line: rgba(255,255,255,.1); --glass-shadow: 0 30px 90px -30px rgba(0,0,0,.9);
  --input: rgba(255,255,255,.04);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { margin: 0; }
body {
  font: 15px/1.55 var(--sans); color: var(--ink); background: var(--bg); min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before { /* faint "typing dots" pattern */
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-color: var(--pattern);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='%23000'%3E%3Ccircle cx='6' cy='8' r='1.3'/%3E%3Ccircle cx='11' cy='8' r='1.3'/%3E%3Ccircle cx='16' cy='8' r='1.3'/%3E%3Ccircle cx='34' cy='36' r='1.3'/%3E%3Ccircle cx='39' cy='36' r='1.3'/%3E%3Ccircle cx='44' cy='36' r='1.3'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 56px 56px repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='%23000'%3E%3Ccircle cx='6' cy='8' r='1.3'/%3E%3Ccircle cx='11' cy='8' r='1.3'/%3E%3Ccircle cx='16' cy='8' r='1.3'/%3E%3Ccircle cx='34' cy='36' r='1.3'/%3E%3Ccircle cx='39' cy='36' r='1.3'/%3E%3Ccircle cx='44' cy='36' r='1.3'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 56px 56px repeat;
}
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.02em; margin: 0; line-height: 1.2; }
h1 { font-size: 28px; font-weight: 750; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 16px; }
.stack.tight { gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--line); background: var(--side);
}
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 16px; font: 750 19px/1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.logo { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 800 17px/1 var(--display); letter-spacing: -.04em; user-select: none; }
.brand small { font: 600 11px var(--sans); color: var(--dim); letter-spacing: 0; padding: 3px 7px; border-radius: 99px; background: var(--panel3); }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 550;
  text-decoration: none; transition: background .15s, color .15s;
}
.nav { display: grid; gap: 1px; }
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav a:hover { background: var(--panel3); color: var(--ink); }
.nav a.on { background: var(--panel); color: var(--acc); box-shadow: inset 0 0 0 1px var(--card-line); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--coral); color: #fff; font: 700 11px/20px var(--sans); text-align: center; }
.side .foot { margin-top: auto; display: grid; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--card-line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 14px var(--display); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.main { padding: 28px clamp(16px, 4vw, 44px) 90px; max-width: 1120px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head p { margin-top: 6px; }
.topbar { display: none; }

.menu-btn, .menu-scrim { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 45; width: min(280px, 84vw); height: 100%; overflow-y: auto; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(14,12,28,.25); }
  .menu-open .side { transform: none; }
  .menu-open .menu-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: var(--scrim); animation: fade .15s; }
  .topbar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; position: sticky; top: 0; z-index: 20; background: var(--side); border-bottom: 1px solid var(--line); }
  .topbar .brand { padding: 0; font-size: 18px; flex: 1; }
  .menu-btn { display: inline-flex; }
  .main { padding: 18px 16px 96px; }
  h1 { font-size: 24px; }
}

/* ---------- surfaces ---------- */
.card {
  background: var(--panel); border: 1px solid var(--card-line); border-radius: var(--r-lg); box-shadow: var(--gshadow); padding: 20px;
}
.card.flat { background: var(--panel); }
.card h2 + p, .card h3 + p { margin-top: 4px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 2px 12px; }
.divider { height: 1px; background: var(--line2); margin: 14px 0; border: 0; }
.hero-card { border-left: 4px solid var(--stripe); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 14px var(--sans); cursor: pointer;
  transition: transform .08s, background .15s, border-color .15s, opacity .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--line-h); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--btn); border-color: transparent; color: var(--btn-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.aura { background: var(--btn); border: 0; color: var(--btn-ink); }
.btn.aura:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel3); color: var(--ink); }
.btn.danger { color: var(--coral); }
.btn.danger:hover { border-color: var(--coral); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn svg { width: 16px; height: 16px; }

label.field { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
label.field .hint { font-weight: 400; color: var(--dim); font-size: 12.5px; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--input);
  color: var(--ink); font: 15px var(--sans); transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.input.code { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }

.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--panel3); border: 1px solid var(--line); transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.switch input:checked + span { background: var(--btn); border-color: var(--btn); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--panel3); gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 13px var(--sans); padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(20,10,60,.12); }

.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days button { width: 42px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 13px var(--sans); cursor: pointer; }
.days button.on { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc); }

/* ---------- data ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font: 600 12px var(--sans); background: var(--panel3); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--coral-soft); color: var(--coral); }
.pill.acc { background: var(--acc-soft); color: var(--acc); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.list { display: grid; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 2px; border-bottom: 1px solid var(--line2); }
.item:last-child { border-bottom: 0; }
.item .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel3); color: var(--muted); flex: none; }
.item .ico svg { width: 17px; height: 17px; }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 600; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 600 12px var(--sans); color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--acc-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: -6px -8px; }

.stat .k { font: 750 30px/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 4px; }
.meter { height: 10px; border-radius: 99px; background: var(--panel3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .4s; }
.meter.hot > i { background: var(--coral); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars i { flex: 1; min-width: 3px; border-radius: 4px 4px 2px 2px; background: var(--acc); opacity: .75; }
.bars i:hover { opacity: 1; }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--acc-soft); border: 1px solid var(--acc-line); color: var(--ink); font-size: 14px; }
.notice.warn { background: var(--warn-soft); border-color: transparent; }
.notice.bad { background: var(--coral-soft); border-color: transparent; }
.notice.ok { background: var(--ok-soft); border-color: transparent; }

/* ---------- checklist ---------- */
.check { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.check:last-child { border-bottom: 0; }
.check .box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-h); display: grid; place-items: center; flex: none; }
.check.done .box { border-color: transparent; background: var(--ok); color: #fff; }
.check.done .box svg { width: 14px; height: 14px; }
.check.done .label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-h); }

/* ---------- modal + toast ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%); border-radius: 22px; padding: 22px; box-shadow: var(--glass-shadow); border: 1px solid var(--glass-line); }
.modal.wide { width: min(860px, 100%); }
.modal .spread { margin-bottom: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 11px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 14px 40px -10px rgba(0,0,0,.4); animation: rise .2s; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--coral); color: #fff; }

@keyframes fade { from { opacity: 0 } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px) } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- sign-in ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .card { width: min(440px, 100%); padding: 34px 30px; text-align: center; }
.gate h1 { font-size: 30px; margin: 18px 0 8px; }
.gate .mark { width: 54px; height: 54px; margin: 0 auto; }
.gate .mark .logo { width: 54px; height: 54px; border-radius: 15px; font-size: 32px; }
.gbtn { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 650 15px var(--sans); display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; margin-top: 24px; text-decoration: none; }
.gbtn:hover { border-color: var(--line-h); text-decoration: none; }
.gbtn svg { width: 20px; height: 20px; }

/* ---------- plans ---------- */
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan.current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan .price { font: 750 34px/1 var(--display); letter-spacing: -.03em; }
.plan .price small { font: 500 14px var(--sans); color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 14px; }
.plan li { display: flex; gap: 8px; }
.plan li::before { content: ''; width: 16px; height: 16px; flex: none; margin-top: 3px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230B7F76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan .foot { margin-top: auto; }

/* ---------- onboarding ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.steps i { flex: 1; height: 5px; border-radius: 99px; background: var(--panel3); }
.steps i.on { background: var(--brand); }
.welcome { max-width: 560px; margin: 6vh auto 0; }
.big-input { height: 56px; font: 700 22px var(--display); text-align: center; }
.code-box { font: 700 30px var(--mono); letter-spacing: .18em; padding: 14px; border-radius: 16px; background: var(--panel2); border: 1px dashed var(--line-h); text-align: center; }

/* fixes */
.notice > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.spread.wrap { flex-wrap: wrap; }
.chan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
@media (max-width: 420px) { .chan-grid { grid-template-columns: 1fr; } }
.chead { display: flex; align-items: center; gap: 12px; }
.chead .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); flex: none; }
.chead .ico svg { width: 20px; height: 20px; }
.chead .grow p { margin-top: 2px; }

/* v2.1: character, voice, meetings */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chips button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 13px var(--sans); cursor: pointer; text-transform: capitalize; }
.chips button.on { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.swatches > button { padding: 3px; border-radius: 14px; border: 2px solid transparent; background: none; cursor: pointer; line-height: 0; }
.swatches > button.on { border-color: var(--acc); }
.swatches > button:focus-visible, .chips button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.seg { flex-wrap: wrap; }
.me-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; margin: -6px; border-radius: 12px; color: inherit; text-decoration: none; }
.me-link:hover, .me-link.on { background: var(--acc-soft); }
.me-link:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.bubble { padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); }
.bubble.admin { background: var(--acc-soft); border-color: var(--acc-line); }
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.voice { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 6px 4px 4px; background: var(--panel); }
.voice.on { border-color: var(--acc); background: var(--acc-soft); }
.voice .pick { flex: 1; text-align: left; background: none; border: 0; padding: 8px; cursor: pointer; color: inherit; font: inherit; display: grid; gap: 2px; border-radius: 9px; }
.voice .pick:focus-visible { outline: 2px solid var(--acc); }
.voice .pick span { font-size: 12.5px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.steps code, .dim code { font-size: 12.5px; padding: 1px 5px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line2); }
.empty svg { width: 32px; height: 32px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; border: 1px solid var(--acc-line); background: var(--acc-soft); color: var(--acc); font: 600 13px var(--sans); }
.chip .x { border: 0; background: transparent; color: inherit; font: 600 15px/1 var(--sans); cursor: pointer; width: 22px; height: 22px; border-radius: 50%; }
.chip .x:hover { background: var(--acc-line); }
.chip .x:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
/* chat with the Handlr team */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border-radius: 999px; border: 0; background: var(--btn); color: var(--btn-ink); font: 700 14px var(--sans); cursor: pointer; box-shadow: 0 8px 22px -10px rgba(14,12,28,.55); }
.chat-fab svg { width: 20px; height: 20px; }
.chat-fab:focus-visible { outline: 3px solid var(--acc-line); outline-offset: 3px; }
.chat-fab .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--coral); color: #fff; font: 700 11px/20px var(--sans); }
.chat-panel { position: fixed; right: 22px; bottom: 22px; z-index: 55; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 44px)); display: flex; flex-direction: column; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.45); overflow: hidden; animation: rise .18s; }
.chat-panel header { display: flex; gap: 10px; align-items: flex-start; padding: 16px 14px 12px 18px; border-bottom: 1px solid var(--line2); }
.chat-panel header p { margin-top: 2px; font-size: 13px; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--panel2); }
.chat-list .bubble { max-width: 82%; align-self: flex-start; background: var(--panel); }
.chat-list .bubble.user { align-self: flex-end; background: var(--btn); border-color: var(--btn); color: #fff; }
.chat-list .bubble.user .when { color: rgba(255,255,255,.75); }
.chat-list .bubble.pending { opacity: .7; }
.chat-list .when { font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.chat-day { align-self: center; font-size: 12px; color: var(--dim); padding: 6px 0 2px; }
.chat-empty { margin: auto 0; text-align: center; padding: 20px; }
.chat-empty p:first-child { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line2); }
.chat-input textarea { resize: none; max-height: 140px; field-sizing: content; min-height: 42px; }
@media (max-width: 860px) {
  .chat-fab { bottom: 18px; right: 14px; padding: 12px; }
  .chat-fab span:not(.count) { display: none; }
  .chat-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; }
}
.shell > .main { padding-bottom: 96px; }

.gate.consent .card { width: min(560px, 100%); text-align: left; }
.gate.consent .mark { margin: 0; }
.gate.consent h1 { margin: 6px 0 6px; font-size: 26px; }
.access { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.access li { display: flex; gap: 12px; align-items: flex-start; }
.access .ico { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); }
.access .ico svg { width: 19px; height: 19px; }
.access .title { font-weight: 650; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--acc); flex: none; }
.days button { width: auto; min-width: 42px; padding: 0 10px; }
.err { color: var(--coral); font-size: 13px; }
.routines { align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.routine .chead .ico, .card .chead .ico { flex: none; }
.item.digest { align-items: flex-start; gap: 14px; }
.item.digest .body { min-width: 0; }
@media (max-width: 640px) { .item.digest { flex-direction: column; } }
.grid2 > .span2 { grid-column: 1 / -1; }
.routine details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.routine ol { margin: 6px 0 0; padding-left: 20px; line-height: 1.55; }

/* ---------- sign-in / sign-up ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; }
.auth-side { position: relative; overflow: hidden; background: #000; color: #F4F4F6; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-side > :not(canvas) { position: relative; }
.auth-figure { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .42; }
.auth-side .brand { color: #fff; } .auth-side .logo { background: #fff; color: #000; }
.auth-pitch h2 { font: 750 34px/1.15 var(--display); letter-spacing: -.02em; margin: 0 0 30px; max-width: 14ch; }
.auth-pitch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.auth-pitch li { display: flex; gap: 14px; align-items: flex-start; }
.auth-pitch .ico { flex: none; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #C77DFF; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: center; }
.auth-pitch .ico svg { width: 19px; height: 19px; }
.auth-pitch strong { display: block; font-weight: 650; }
.auth-pitch span { color: #A9A7C4; font-size: 14px; }
.auth-by { color: #8A8AA8; font-size: 13px; margin: 0; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: min(400px, 100%); }
.auth-form h1 { font: 750 28px var(--display); margin: 0 0 6px; letter-spacing: -.01em; }
.auth-mobile-brand { display: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pw { display: flex; gap: 6px; } .pw .input { flex: 1; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); font: inherit; font-weight: 600; cursor: pointer; }
.linkish:hover { text-decoration: underline; } .linkish:disabled { opacity: .5; cursor: default; }
.code-input { font: 700 24px var(--mono); letter-spacing: .4em; text-align: center; height: 56px; }
.auth-switch { text-align: center; margin: 4px 0 0; color: var(--muted); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { place-items: start center; padding-top: 32px; }
  .auth-mobile-brand { display: flex; margin-bottom: 8px; }
}

/* ---------- onboarding ---------- */
.onb { max-width: 880px; margin: 0 auto; padding: 24px 20px 60px; }
.onb-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.onb-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.onb-steps li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--dim); padding-top: 10px; border-top: 3px solid var(--panel3); }
.onb-steps li span { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--panel3); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.onb-steps li span svg { width: 13px; height: 13px; }
.onb-steps li.on { color: var(--ink); font-weight: 650; border-color: var(--brand); }
.onb-steps li.on span { background: var(--brand); color: #fff; }
.onb-steps li.done { border-color: var(--lavender); }
.onb-steps li.done span { background: var(--acc-soft); color: var(--acc); }
.onb-card { max-width: 620px; margin: 0 auto; width: 100%; }
.onb-body > .stack > .card.onb-card { max-width: none; }
.onb-card h1 { font: 750 26px var(--display); margin: 0 0 6px; }
.onb-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.onb-agent { display: flex; gap: 18px; align-items: center; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-pick button { padding: 3px; border-radius: 20px; border: 2px solid transparent; background: none; cursor: pointer; line-height: 0; }
.avatar-pick button img { border-radius: 16px; }
.avatar-pick button.on { border-color: var(--brand); }
.avatar-pick button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.meet { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.qr { background: #fff; border-radius: 18px; padding: 12px; border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
.meet-steps { margin: 0; padding-left: 22px; display: grid; gap: 16px; }
.meet-steps li::marker { color: var(--brand); font-weight: 700; }
.meet-steps strong { display: block; } .meet-steps span { color: var(--dim); font-size: 14px; }
.waiting { display: flex; align-items: center; gap: 10px; margin: 0; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } }
@media (max-width: 640px) {
  .onb-steps { grid-template-columns: repeat(4, 1fr); } .onb-steps li { font-size: 0; gap: 0; justify-content: center; }
  .meet { grid-template-columns: 1fr; } .qr { max-width: 220px; margin: auto; }
}

/* ---------- guided tour ---------- */
.tour-scrim { position: fixed; inset: 0; z-index: 80; background: var(--scrim); }
.tour-card { position: fixed; width: min(360px, calc(100vw - 32px)); left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 90; display: grid; gap: 10px; box-shadow: 0 12px 40px rgba(15,15,30,.25); }
.tour-card.anchored { transform: none; }
.tour-card h3 { margin: 0; font: 700 19px var(--display); }
.tour-card p { margin: 0; line-height: 1.5; }
.tour-on { position: relative; outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 10px; background: var(--panel) !important; color: var(--acc) !important; }
.chat-fab.tour-on { position: fixed; z-index: 85; color: #fff !important; background: var(--brand) !important; outline-color: var(--lavender); }
@media (max-width: 900px) {
  .tour-card { top: auto; bottom: 16px; transform: translateX(-50%); }
  .menu-open .side { z-index: 81; }
}

/* ---------- guide page ---------- */
.guide-how { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.guide-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); }
.guide-try { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.guide-try .dim { width: 100%; font-size: 12.5px; }
.ico.ok { color: var(--ok); }
.guide-try .chip { padding: 5px 12px; }
body.touring .side { z-index: 81; }

.guide-card { align-content: start; }
.guide-list { align-content: start; }
.tour-card .guide-list { font-size: 14px; }
.onb .grid2 { align-items: start; }

/* =================== stage: the assistant in the middle, sections around it =================== */
.stage-shell { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.stage { position: absolute; inset: 0; transition: filter .4s ease, transform .5s cubic-bezier(.2,.8,.2,1), opacity .4s; }
.stage.dim { filter: blur(2px); transform: scale(.985); opacity: .75; }
.figure { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: manipulation; }
.halo { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.halo .ring { fill: none; stroke: var(--line2); stroke-width: 1; }
.halo .ring.ticks { stroke: var(--line); stroke-dasharray: 1 11; transform-box: fill-box; transform-origin: center; animation: spin 90s linear infinite; }
.halo .beam { stroke: var(--acc); stroke-width: 1; stroke-dasharray: 2 5; opacity: .7; animation: beam 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes beam { to { stroke-dashoffset: -14; } }
.stage-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; pointer-events: none; }
.stage-top > * { pointer-events: auto; }
.stage-top .brand { padding: 0; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .2s; }
.icon-btn:hover { border-color: var(--line-h); transform: scale(1.06); }
.icon-btn svg { width: 18px; height: 18px; }

/* orbit icons */
.orb { position: absolute; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); text-decoration: none !important;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--glass-line);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .3s, color .2s; animation: orb-in .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d); }
.orb-ico svg { width: 21px; height: 21px; }
.orb::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid transparent; transition: border-color .3s, inset .3s; }
.orb:hover, .orb:focus-visible { transform: translate(-50%, -50%) scale(1.12); border-color: var(--acc-line); color: var(--acc); box-shadow: 0 0 0 1px var(--acc-line), 0 0 28px -4px var(--acc-line); outline: none; }
.orb:hover::after, .orb:focus-visible::after { border-color: var(--line); inset: -11px; }
.orb.on { color: var(--acc); border-color: var(--acc-line); }
.orb-label { position: absolute; white-space: nowrap; font: 600 13px var(--sans); color: var(--ink); padding: 5px 11px; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s; top: 50%; }
.orb.left .orb-label { right: calc(100% + 14px); transform: translate(6px, -50%); }
.orb.right .orb-label { left: calc(100% + 14px); transform: translate(-6px, -50%); }
.orb:hover .orb-label, .orb:focus-visible .orb-label { opacity: 1; transform: translate(0, -50%); }
.orb-count { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--acc); color: var(--acc-ink); font: 700 11px/19px var(--sans); text-align: center; }
@keyframes orb-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }

/* speech bubble and status */
.say { position: absolute; max-width: 270px; padding: 14px 16px; border-radius: 18px 18px 18px 4px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: var(--glass-shadow); font-size: 14px; display: grid; gap: 4px; animation: say-in .5s cubic-bezier(.2,.8,.2,1); pointer-events: auto; }
.say p:first-child { font: 700 16px var(--display); }
.say p { color: var(--muted); } .say p:first-child { color: var(--ink); }
.say-link { font-weight: 650; margin-top: 4px; }
@keyframes say-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.stage-status { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: 14px; white-space: nowrap; }
a.stage-status { color: inherit; text-decoration: none; cursor: pointer; transition: border-color .25s, transform .25s; }
a.stage-status:hover, a.stage-status:focus-visible { border-color: var(--acc-line); transform: translateX(-50%) translateY(-1px); outline: none; }
.stage-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.stage-status .dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: pulse 2.4s ease-in-out infinite; }
.stage-status .dot.wait { background: var(--warn); }
.acct-btn { position: absolute; left: 22px; bottom: 22px; display: grid; place-items: center; border-radius: 50%; padding: 3px; border: 1px solid var(--glass-line); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .25s, border-color .25s; text-decoration: none !important; }
.acct-btn .avatar { width: 42px; height: 42px; background: var(--ink); color: var(--bg); }
.acct-btn .orb-label { left: calc(100% + 12px); transform: translate(-6px, -50%); }
.acct-btn:hover, .acct-btn:focus-visible { transform: scale(1.06); border-color: var(--acc-line); outline: none; }
.acct-btn:hover .orb-label, .acct-btn:focus-visible .orb-label { opacity: 1; transform: translate(0, -50%); }

/* glass pop-up panels */
.panel-back { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 28px; animation: fade .25s; }
.panel { width: min(1000px, 100%); height: min(860px, calc(100vh - 56px)); display: flex; flex-direction: column; border-radius: 28px; overflow: hidden;
  background: var(--glass); -webkit-backdrop-filter: blur(34px) saturate(160%); backdrop-filter: blur(34px) saturate(160%); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow);
  animation: panel-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.panel-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line2); }
.panel-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--acc); }
.panel-ico svg { width: 15px; height: 15px; }
.panel-name { flex: 1; font: 650 14px var(--sans); color: var(--muted); }
.panel-bar .icon-btn { width: 34px; height: 34px; background: transparent; }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.panel-inner { padding: 24px clamp(18px, 3vw, 36px) 48px; }
.panel .head { margin-bottom: 20px; }
.panel .card { background: var(--panel); border-color: var(--card-line); }
.acct-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.acct-head .avatar { width: 52px; height: 52px; font-size: 20px; background: var(--ink); color: var(--bg); }
.acct-head h1 { font-size: 24px; }
.acct-tabs { margin-bottom: 20px; overflow-x: auto; }
.acct-body .head h1 { font-size: 20px; }
.tour-scrim.clear { background: transparent; }

@media (max-width: 640px) {
  .stage-top { padding: 14px 16px; }
  .orb { width: 48px; height: 48px; }
  .orb .orb-label { opacity: 1; font-size: 11px; padding: 2px 7px; left: 50% !important; right: auto !important; top: calc(100% + 6px); transform: translateX(-50%) !important; }
  .say { left: 16px; right: 16px; top: 66px; max-width: none; border-radius: 16px; }
  .stage-status { bottom: 18px; font-size: 13px; max-width: calc(100vw - 150px); overflow: hidden; }
  .stage-status .dim { overflow: hidden; text-overflow: ellipsis; }
  .acct-btn { left: 14px; bottom: 14px; }
  .acct-btn .orb-label { display: none; }
  .panel-back { padding: 0; align-items: end; }
  .panel { height: calc(100dvh - 24px); border-radius: 24px 24px 0 0; animation: sheet-in .4s cubic-bezier(.2,.8,.2,1); }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .orb, .say, .panel, .panel-back { animation: none; }
  .halo .ring.ticks, .halo .beam, .stage-status .dot.on { animation: none; }
  .stage { transition: none; }
}
.tour-card { background: var(--glass) !important; -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%); border-color: var(--glass-line) !important; }

/* HUD-style orbit buttons */
.orb { width: 58px; height: 58px; background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.07), rgba(255,255,255,.015) 70%); }
[data-theme='light'] .orb { background: radial-gradient(circle at 50% 35%, rgba(0,0,0,.03), rgba(255,255,255,.7) 70%); }
.orb-ico { position: relative; z-index: 1; display: grid; place-items: center; }
.orb-ico svg { width: 23px; height: 23px; }
.orb-arcs { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); overflow: visible; pointer-events: none; animation: spin 24s linear infinite; }
.orb-arcs circle { fill: none; stroke: var(--line-h); stroke-width: 1; stroke-dasharray: 22 18 4 18 30 96; stroke-linecap: round; transition: stroke .3s, stroke-width .3s; }
.orb:nth-of-type(even) .orb-arcs { animation-direction: reverse; animation-duration: 31s; }
.orb:hover .orb-arcs, .orb:focus-visible .orb-arcs { animation-duration: 3.5s; }
.orb:hover .orb-arcs circle, .orb:focus-visible .orb-arcs circle, .orb.on .orb-arcs circle { stroke: var(--acc); stroke-width: 1.4; filter: drop-shadow(0 0 3px var(--acc)); }
.orb::after { display: none; }
.orb:hover, .orb:focus-visible { box-shadow: 0 0 22px -6px var(--acc), inset 0 0 14px -6px var(--acc); }
.orb-label { font: 600 12.5px var(--sans); letter-spacing: .02em; }
.icon-btn svg { width: 19px; height: 19px; }
@media (max-width: 640px) { .orb { width: 50px; height: 50px; } .orb-ico svg { width: 21px; height: 21px; } .orb-arcs { inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); } }
@media (prefers-reduced-motion: reduce) { .orb-arcs { animation: none; } }

/* ===== glass orbit buttons ===== */
.orb { --mx: 50%; --my: 30%; --rx: 0deg; --ry: 0deg;
  width: 62px; height: 62px; border: 0; overflow: visible; isolation: isolate;
  background:
    radial-gradient(120% 120% at var(--mx) var(--my), rgba(255,255,255,.16), rgba(255,255,255,.035) 46%, rgba(255,255,255,.015) 70%),
    radial-gradient(90% 60% at 50% 110%, rgba(155,90,255,.35), transparent 70%);
  -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -10px 18px -10px rgba(160,100,255,.55), inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 30px -12px rgba(0,0,0,.9);
  transform: translate(-50%, -50%) perspective(260px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s, color .2s; }
.orb::before { content: ''; position: absolute; inset: 0; border-radius: 50%; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(255,255,255,.7), rgba(255,255,255,.08) 38%, rgba(160,100,255,.25) 70%, rgba(255,255,255,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.orb::after { display: block !important; content: ''; position: absolute; left: 16%; right: 16%; top: 6%; height: 38%; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0)); opacity: .55; inset: auto; border: 0; transition: opacity .3s; }
.orb-ico { color: #fff; filter: drop-shadow(0 0 6px rgba(199,125,255,.55)); }
.orb-ico svg { width: 24px; height: 24px; stroke-width: 1.5; }
.orb:hover, .orb:focus-visible { transform: translate(-50%, -50%) perspective(260px) rotateX(var(--rx)) rotateY(var(--ry)) scale(1.12); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -12px 22px -10px rgba(180,120,255,.9), inset 0 0 0 1px rgba(199,125,255,.45), 0 0 34px -6px rgba(140,70,255,.75), 0 12px 30px -12px rgba(0,0,0,.9); }
.orb:hover::after { opacity: .85; }
.orb:hover .orb-ico { filter: drop-shadow(0 0 10px rgba(199,125,255,.95)); }
.orb.on { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -12px 22px -10px rgba(180,120,255,.85), inset 0 0 0 1px rgba(199,125,255,.5), 0 0 26px -8px rgba(140,70,255,.7); }
.orb-arcs { inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); opacity: .7; }
.orb-count { z-index: 2; box-shadow: 0 0 12px rgba(140,70,255,.8); }
[data-theme='light'] .orb { background: radial-gradient(120% 120% at var(--mx) var(--my), rgba(255,255,255,.95), rgba(255,255,255,.55) 50%, rgba(235,230,250,.5) 75%), radial-gradient(90% 60% at 50% 110%, rgba(140,80,255,.22), transparent 70%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -10px 18px -10px rgba(120,60,255,.35), inset 0 0 0 1px rgba(0,0,0,.06), 0 12px 28px -14px rgba(40,20,90,.45); }
[data-theme='light'] .orb::before { background: linear-gradient(150deg, rgba(255,255,255,1), rgba(0,0,0,.06) 45%, rgba(120,60,255,.25) 75%, rgba(255,255,255,.9)); }
[data-theme='light'] .orb-ico { color: #14141a; filter: drop-shadow(0 1px 0 rgba(255,255,255,.9)); }
[data-theme='light'] .orb:hover .orb-ico { color: #6A00FF; filter: drop-shadow(0 0 8px rgba(106,0,255,.35)); }
/* matching glass for the other round buttons on the stage */
.stage .icon-btn, .acct-btn { background: radial-gradient(120% 120% at 50% 25%, rgba(255,255,255,.14), rgba(255,255,255,.03) 55%); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px rgba(255,255,255,.1), 0 8px 24px -12px rgba(0,0,0,.9); border-color: transparent; }
[data-theme='light'] .stage .icon-btn, [data-theme='light'] .acct-btn { background: radial-gradient(120% 120% at 50% 25%, #fff, rgba(240,238,248,.7)); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(0,0,0,.07), 0 10px 24px -14px rgba(40,20,90,.4); }
@media (max-width: 640px) { .orb { width: 46px; height: 46px; } .orb-ico svg { width: 19px; height: 19px; } .stage .orb-label { font-size: 10.5px; padding: 3px 7px; } }
.orb:hover::after, .orb:focus-visible::after { inset: auto; top: 6%; left: 16%; right: 16%; height: 38%; border: 0; }
.say { padding-right: 38px; }
.say-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--dim); display: grid; place-items: center; cursor: pointer; }
.say-x:hover { background: var(--panel3); color: var(--ink); }
.say-x svg { width: 14px; height: 14px; }

/* ===== wordmark ===== */
.wordmark { display: inline-flex; align-items: baseline; gap: .08em; font: 600 22px/1 'Unbounded', var(--display); letter-spacing: -.035em; color: var(--ink); user-select: none; }
.wm-dots { display: inline-flex; gap: .14em; margin-left: .06em; }
.wm-dots i { width: .2em; height: .2em; border-radius: 50%; background: var(--acc); display: block; animation: wm-dot 1.8s ease-in-out infinite; }
.wm-dots i:nth-child(2) { animation-delay: .2s; } .wm-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes wm-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-.12em); } }
@media (prefers-reduced-motion: reduce) { .wm-dots i { animation: none; opacity: .8; } }
.brand { gap: 0; }
.auth-side .wordmark { color: #fff; }
.gate .mark { width: auto; height: auto; }

/* ===== icons drift gently ===== */
.orb { animation: orb-in .7s cubic-bezier(.2,.8,.2,1) both var(--d); }
.orb:nth-of-type(3n) { animation-duration: .7s, 7.6s; }
.orb:nth-of-type(3n+1) { animation-duration: .7s, 5.8s; }
.orb-ico { animation: glyph-glow 4.8s ease-in-out infinite calc(var(--d) * 3); }
@keyframes glyph-glow { 0%, 100% { filter: drop-shadow(0 0 4px rgba(199,125,255,.35)); } 50% { filter: drop-shadow(0 0 10px rgba(199,125,255,.85)); } }
.orb:hover .orb-ico { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .orb, .orb-ico { animation: none; } }

/* ===== account: glass initial ===== */
.acct-btn.glass { width: 54px; height: 54px; padding: 0; isolation: isolate;
  background: radial-gradient(120% 120% at 50% 28%, rgba(255,255,255,.18), rgba(255,255,255,.035) 48%, rgba(255,255,255,.015) 72%), radial-gradient(90% 60% at 50% 110%, rgba(155,90,255,.4), transparent 70%);
  -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -10px 18px -10px rgba(160,100,255,.6), inset 0 0 0 1px rgba(255,255,255,.14), 0 10px 30px -12px rgba(0,0,0,.9); }
.acct-btn.glass::after { content: ''; position: absolute; left: 18%; right: 18%; top: 7%; height: 36%; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0)); opacity: .6; pointer-events: none; }
.acct-initial { font: 600 19px/1 'Unbounded', var(--display); color: #fff; text-shadow: 0 0 12px rgba(199,125,255,.8); position: relative; z-index: 1; }
[data-theme='light'] .acct-btn.glass { background: radial-gradient(120% 120% at 50% 28%, #fff, rgba(240,236,250,.7) 60%), radial-gradient(90% 60% at 50% 110%, rgba(140,80,255,.25), transparent 70%); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(0,0,0,.07), 0 10px 24px -14px rgba(40,20,90,.45); }
[data-theme='light'] .acct-initial { color: #14141a; text-shadow: none; }
@media (max-width: 640px) { .acct-btn.glass { width: 48px; height: 48px; } }

/* Character picker (Assistant settings) */
.cast-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.cast-pick button { padding: 0; border: 2px solid transparent; border-radius: 16px; background: #000; overflow: hidden; cursor: pointer; aspect-ratio: 1; transition: border-color .2s, transform .2s; }
.cast-pick button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cast-pick button:hover { transform: translateY(-2px); }
.cast-pick button.on { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-line); }
.cast-pick button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (max-width: 640px) { .cast-pick { grid-template-columns: repeat(4, 1fr); } }

/* Onboarding step 1: choose the avatar */
.onb-card.wide { max-width: 860px; }
.onb-avatar { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.onb-avatar-big { aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: #000; display: grid; place-items: center; border: 1px solid var(--line); }
.onb-avatar-big img { width: 100%; height: 100%; object-fit: cover; display: block; animation: av-in .5s ease both; }
@keyframes av-in { from { opacity: 0; transform: scale(1.03); } }
.onb-avatar .cast-pick { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .onb-avatar { grid-template-columns: 1fr; } .onb-avatar-big { max-width: 220px; margin: 0 auto; } }
.stage-top .guide-btn.on { border-color: var(--acc-line); }
/* top-right Guide button: its name shows on hover, like the ring icons */
.stage-top .guide-btn { position: relative; }
.corner-tip { position: absolute; top: calc(100% + 8px); right: 0; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--text); background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .2s, transform .2s; }
.guide-btn:hover .corner-tip, .guide-btn:focus-visible .corner-tip { opacity: 1; transform: none; }
