/* GCS View — styled after global-usa.com (Global Computer Systems brand system). */

@font-face { font-family: 'Outfit'; font-weight: 400; font-display: swap; src: url('/assets/fonts/outfit-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 500; font-display: swap; src: url('/assets/fonts/outfit-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 600; font-display: swap; src: url('/assets/fonts/outfit-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 700; font-display: swap; src: url('/assets/fonts/outfit-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 800; font-display: swap; src: url('/assets/fonts/outfit-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('/assets/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  /* Brand palette: Navy #050A30 · Slate #24344D · Electric #1488D4 · Tint #F4F6FC */
  --navy: #050a30;
  --navy-deep: #030620;
  --navy-2: #0a1242;
  --slate: #24344d;
  --blue: #1488d4;
  --blue-ink: #0f6aa8;
  --blue-btn: #0f74b8;
  --blue-glow: #3aa8f0;
  --tint: #f4f6fc;
  --white: #ffffff;
  --ink: #0b1233;
  --muted: #5a6782;
  --muted-dark: #a9b4cc;
  --line: #e2e7f2;
  --line-input: #cdd5e5;
  --line-dark: rgba(255, 255, 255, 0.09);
  --ok: #2bc48a;
  --warn: #f2b544;
  --danger: #d1453b;
  --danger-bg: #fdecea;
  --danger-ink: #8a1f17;

  --font-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(5, 10, 48, 0.04), 0 12px 32px -12px rgba(5, 10, 48, 0.14);
  --shadow-lg: 0 24px 60px -18px rgba(5, 10, 48, 0.45), 0 0 0 1px rgba(5, 10, 48, 0.06);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 17px/1.6 var(--font-body);
  color: var(--ink);
  background: var(--tint);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue-glow); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.accent { color: var(--blue); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-ink);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }
.on-dark .eyebrow { color: var(--blue-glow); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 600 16px/1 var(--font-body);
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s, color 0.25s, border-color 0.25s;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2; transition: transform 0.25s var(--ease); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--blue-btn); color: #fff; box-shadow: 0 8px 28px -8px rgba(20, 136, 212, 0.6); }
.btn-primary:hover:not(:disabled) { background: var(--blue-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost:hover { border-color: var(--blue-glow); background: rgba(58, 168, 240, 0.08); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue-ink); }
.btn-text { background: none; color: var(--muted); padding: 10px 6px; }
.btn-text:hover { color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b83a31; }
.btn-sm { padding: 10px 18px; font-size: 14.5px; }
.btn-block { width: 100%; }
.danger-text { color: var(--danger) !important; }

/* ---- Cards, forms, messages ---- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
}
.card h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.03em; margin: 12px 0 10px; }
.card .lead { color: var(--muted); font-size: 16.5px; margin-bottom: 26px; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, .field-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted); }
input {
  width: 100%;
  font: 400 16px/1.3 var(--font-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-input);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(20, 136, 212, 0.14); }
input::placeholder { color: #8391b0; }
input[readonly] { background: var(--tint); color: var(--muted); }
.notice {
  background: rgba(20, 136, 212, 0.08);
  border: 1px solid rgba(20, 136, 212, 0.25);
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 15px;
  margin-bottom: 16px;
}
.error-box { background: var(--danger-bg); color: var(--danger-ink); border-radius: var(--r-sm); padding: 11px 14px; font-size: 15px; }
.inline-form { display: flex; gap: 8px; }
.sms-form { display: grid; gap: 10px; }
.consent-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent-check input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; padding: 0; accent-color: var(--blue-btn); box-shadow: none; }
.inline-form input { flex: 1; min-width: 0; }
.inline-form .btn { padding: 0 22px; }

/* ---- Brand header bars ---- */
.brandbar, .appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(5, 10, 48, 0.94);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-dark);
  color: #dce3f2;
}
.brand-logo { height: 28px; width: auto; }
.product { display: flex; align-items: center; gap: 14px; }
.product-name { font-weight: 700; color: #fff; font-size: 16px; line-height: 1.15; letter-spacing: -0.01em; }
.product-name small { display: block; font: 500 10px/1.4 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-glow); }
.vrule { width: 1px; height: 26px; background: var(--line-dark); }
.brandbar-tag { display: inline-flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dark); }
.brandbar-tag svg { width: 15px; height: 15px; color: var(--ok); }
.appbar-right { display: flex; align-items: center; gap: 14px; }
.me { font: 400 13px/1 var(--font-mono); color: var(--muted-dark); }

/* Navy band with the site's radial glow and faint grid. */
.on-dark {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 480px at 85% 0%, rgba(20, 136, 212, 0.28), transparent 60%),
    radial-gradient(700px 420px at 0% 120%, rgba(36, 52, 77, 0.9), transparent 60%),
    var(--navy);
}
.on-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.on-dark > * { position: relative; }
.on-dark em { font-style: normal; background: linear-gradient(100deg, #6cc4ff, var(--blue) 60%, #6cc4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-mark { position: absolute !important; right: -50px; top: -40px; width: 260px; height: 260px; opacity: 0.07; pointer-events: none; }

/* ================================================================ Customer pages */

.customer .screen.flow { min-height: calc(100% - 64px); display: flex; flex-direction: column; }
.hero-band { padding: 40px var(--gutter) 100px; }
.hero-inner { width: min(460px, 100%); margin: 0 auto; }
.hero-band h1 { font-size: clamp(32px, 8vw, 46px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; margin: 16px 0 12px; }
.hero-band .lead { color: #c9d3e8; font-size: 17px; }
.flow-card { width: min(460px, calc(100% - 2 * var(--gutter))); margin: -64px auto 0; position: relative; z-index: 1; }
.code-input {
  font: 500 34px/1 var(--font-mono);
  text-align: center;
  letter-spacing: 0.32em;
  padding: 18px 10px 18px calc(10px + 0.32em);
  border-radius: var(--r-md);
}
.turnstile { display: flex; justify-content: center; min-height: 65px; }
.turnstile:empty { display: none; }
.trust { list-style: none; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px dashed #c4cde0; display: grid; gap: 10px; font-size: 15px; color: var(--muted); }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust svg { width: 18px; height: 18px; color: var(--blue-ink); }
.site-foot { margin-top: auto; padding: 32px var(--gutter) 28px; text-align: center; font-size: 14px; color: var(--muted); }
.site-foot a { color: var(--blue-ink); font-weight: 600; }
.site-foot .sep { margin: 0 8px; color: #c4cde0; }

.tech-chip { display: flex; align-items: center; gap: 14px; margin: 4px 0 20px; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--navy);
  color: var(--blue-glow);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
}
.tech-chip strong { display: block; font-size: 18px; line-height: 1.3; }
.tech-chip span { color: var(--muted); font-size: 15px; }
.checks { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: #28304f; }
.checks svg { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(43, 196, 138, 0.14); color: #1d9a6c; stroke-width: 2.4; margin-top: 1px; }
.stack { display: grid; gap: 10px; }
.done-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--tint); color: var(--blue-ink); }
.done-icon svg { width: 28px; height: 28px; }
.browser-warning p { margin-bottom: 10px; }

/* Live camera (phone) */
.screen.live { position: fixed; inset: 0; z-index: 30; background: var(--navy-deep); overflow: clip; color: #fff; }
.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.preview.mirror { transform: scaleX(-1); }
.live-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 14px;
  background: linear-gradient(rgba(3, 6, 32, 0.85), rgba(3, 6, 32, 0));
}
.live-top .mark { width: 30px; height: 30px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: rgba(5, 10, 48, 0.7);
  border: 1px solid var(--line-dark);
  backdrop-filter: blur(10px);
}
.status-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.status-pill.on .dot, .live-dot { background: var(--ok); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(43, 196, 138, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(43, 196, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 196, 138, 0); } }
.timer { margin-left: auto; font: 500 14px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: #dce3f2; }
.live-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(5, 10, 48, 0.78);
  border: 1px solid var(--line-dark);
  backdrop-filter: blur(14px);
}
.ctl {
  position: relative;
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 9px 4px 8px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #dce3f2;
  font: 500 12px/1 var(--font-body);
  cursor: pointer;
}
.ctl svg { width: 24px; height: 24px; }
.ctl:hover { background: rgba(255, 255, 255, 0.06); }
.ctl.active { background: #fff; color: var(--navy); }
.ctl.danger { background: var(--danger); color: #fff; }
.ctl .badge { position: absolute; top: 4px; right: calc(50% - 22px); }
.audio-unlock { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font: 600 11px/18px var(--font-body); text-align: center; }
.chat-sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  max-height: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.chat-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.toast {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--blue);
}

/* ---- Chat (shared) ---- */
.chat-list { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 85%; padding: 8px 13px; border-radius: 16px; background: var(--tint); color: var(--ink); font-size: 15px; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; }
.chat-msg.me { align-self: flex-end; background: var(--blue-btn); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg.them { align-self: flex-start; border-bottom-left-radius: 5px; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { border-radius: var(--r-pill); padding: 11px 16px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(127, 139, 166, 0.14); }
.icon-btn.accent { background: var(--blue-btn); color: #fff; border-radius: 50%; }
.icon-btn.accent:hover { background: var(--blue-ink); }

/* ================================================================ Technician console */

.tech .page { min-height: calc(100% - 64px); padding: clamp(28px, 5vw, 64px) var(--gutter); }
.page-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 40px); align-items: start; }
.steps { border-radius: var(--r-lg); padding: clamp(24px, 4vw, 36px); }
.steps h2 { font-size: 24px; margin: 14px 0 24px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.steps li { display: flex; gap: 16px; }
.step-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-dark); color: var(--blue-glow); }
.steps h3 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 4px; }
.steps p { color: var(--muted-dark); font-size: 15px; line-height: 1.5; }

.invite-card { max-width: 560px; margin: 0 auto; }
.invite-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.waiting { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.waiting .dot { animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.code-block { border-radius: var(--r-md); padding: 22px 24px 18px; margin-bottom: 20px; text-align: center; }
.code-label { font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue-glow); }
.code {
  font: 500 clamp(44px, 9vw, 62px)/1.1 var(--font-mono);
  letter-spacing: 0.06em;
  color: #fff;
  margin: 10px 0 14px;
  font-variant-numeric: tabular-nums;
}
.code.expired { color: var(--muted-dark); text-decoration: line-through; text-decoration-thickness: 2px; }
.expiry-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.expiry-bar span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-glow)); transform-origin: left; transition: transform 1s linear; }
.code-block .small { color: var(--muted-dark); margin-top: 8px; font-size: 13.5px; }
.go-to { font-size: 15.5px; color: var(--muted); margin-bottom: 14px; }
.go-to strong { color: var(--ink); font-weight: 600; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--tint); border: 1px solid var(--line); margin-bottom: 14px; }
.seg button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font: 600 14px/1 var(--font-body);
  padding: 9px 16px;
  cursor: pointer;
}
.seg button svg { width: 17px; height: 17px; }
.seg button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(5, 10, 48, 0.12); }
#invite-feedback { min-height: 1.5em; margin-top: 10px; font-size: 14px; color: var(--blue-ink); }
.invite-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.message-card { max-width: 480px; margin: 0 auto; display: grid; gap: 14px; justify-items: start; }
.message-card h1 { margin: 0; }

/* ---- Viewer ---- */
.screen.viewer {
  height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  background: var(--navy-deep);
  color: #fff;
  overflow: clip;
}
.viewer:fullscreen { height: 100vh; }
.viewer-main { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.viewer-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(5, 10, 48, 0.6);
}
.session-meta { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; font-weight: 600; font-size: 15px; }
.session-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-dark); }
.tool {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 72px;
  padding: 7px 10px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dce3f2;
  font: 500 11.5px/1 var(--font-body);
  cursor: pointer;
}
.tool:hover { background: rgba(255, 255, 255, 0.07); }
.tool.active { background: rgba(58, 168, 240, 0.16); color: var(--blue-glow); }
.viewer-meta { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: 1; }
.viewer-meta .timer { margin-left: 0; }
.conn-badge { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.12em; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--muted-dark); }
.stage {
  position: relative;
  min-height: 0;
  cursor: crosshair;
  background:
    radial-gradient(900px 500px at 80% 10%, rgba(20, 136, 212, 0.14), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(36, 52, 77, 0.7), transparent 60%),
    var(--navy-deep);
}
.remote-video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pointer-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pointer-ring {
  position: absolute;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border: 4px solid var(--blue-glow);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(3, 6, 32, 0.55), 0 0 22px var(--blue-glow);
  animation: ping 2.6s ease-out forwards;
}
.pointer-ring::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--blue-glow); }
@keyframes ping {
  0% { transform: scale(0.4); opacity: 1; }
  15% { transform: scale(1.1); }
  25%, 75% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: rgba(3, 6, 32, 0.72);
  cursor: default;
}
.overlay p { max-width: 46ch; font-size: 17px; color: #dce3f2; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--blue-glow); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.paused-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.16em;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  background: var(--warn);
  color: var(--navy);
}
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash 0.35s ease-out; }
@keyframes flash { from { opacity: 0.7; } to { opacity: 0; } }
.dock { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-dark); background: rgba(5, 10, 48, 0.6); }
.dock .btn { padding: 11px 20px; font-size: 14.5px; }
.dock .hint { position: absolute; left: 16px; font-size: 12.5px; color: var(--muted-dark); display: flex; align-items: center; gap: 6px; }
.dock .hint svg { width: 16px; height: 16px; }
.menu-wrap { position: relative; }
.menu {
  position: absolute;
  top: 48px;
  left: 0;
  z-index: 10;
  min-width: 240px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
.menu button { display: block; width: 100%; text-align: left; font: 500 15px/1.3 var(--font-body); color: var(--ink); background: none; border: 0; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.menu button:hover { background: var(--tint); color: var(--blue-ink); }

/* Side panel: chat + snapshots (always open on wide screens) */
.side-panel { display: flex; flex-direction: column; min-height: 0; background: #fff; color: var(--ink); border-left: 1px solid var(--line); }
.viewer .side-panel[hidden] { display: flex !important; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.side-head .seg { margin: 0; }
.side-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.side-body[hidden] { display: none !important; }
#side-close, .side-tab { display: none !important; }
.snaps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow-y: auto; }
.snap { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--navy-deep); border: 1px solid var(--line); }
.snap img { width: 100%; height: 100%; object-fit: contain; }
.snap::after { content: 'Download'; position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 4px; border-radius: 8px; text-align: center; font: 600 12px/1.2 var(--font-body); background: rgba(15, 116, 184, 0.92); color: #fff; }
.snap.saved::after { content: 'Downloaded'; background: rgba(43, 196, 138, 0.92); }
#snaps-after { margin: 4px 0 8px; max-height: 50vh; width: 100%; }

@media (max-width: 1080px) {
  .page-grid { grid-template-columns: 1fr; }
  .screen.viewer { grid-template-columns: 1fr; }
  .viewer .side-panel[hidden] { display: none !important; }
  .side-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); z-index: 15; box-shadow: var(--shadow-lg); }
  #side-close { display: grid !important; }
  .side-tab {
    display: flex !important;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 4px;
    padding: 10px 6px;
    border: 1px solid var(--line-dark);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: rgba(5, 10, 48, 0.9);
    color: #fff;
    cursor: pointer;
  }
  .side-tab[hidden] { display: none !important; }
  .side-tab .badge { position: absolute; top: -8px; left: -8px; }
  .dock .hint { display: none; }
}
@media (max-width: 720px) {
  .viewer-top { flex-wrap: wrap; }
  .toolbar { order: 3; width: 100%; justify-content: space-between; }
  .tool { min-width: 0; flex: 1; }
  .me, .brandbar-tag span { display: none; }
}
