/* ShieldReplay — adaptive light/dark design system (system fonts — no external CDN) */

:root {
  color-scheme: light;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', 'Segoe UI Mono', Consolas, monospace;

  --bg: #f7f7f5;
  --bg-subtle: #efefec;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-dim: #e9e9e5;
  --surface-inset: #fafaf8;

  --text: #20211f;
  --text-secondary: #454743;
  --muted: #73766f;
  --line: #e4e5df;
  --line-strong: #cccec5;

  --accent: #006fff;
  --accent-hover: #0056cc;
  --accent-soft: #edf5ff;
  --accent-muted: #b9d8ff;

  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;

  --warn: #d97706;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;

  --success: #059669;
  --success-soft: #ecfdf5;
  --success-border: #a7f3d0;

  --purple: #66705a;
  --purple-soft: #f0f2eb;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  --sidebar-width: 252px;

  --sidebar-surface: #12141c;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(226, 232, 240, 0.85);

  --focus-ring: 0 0 0 3px var(--accent-soft);

  /* Player-matched shell aliases (used across admin, WAF, automations, replay) */
  --shell-bg: var(--bg);
  --shell-elevated: var(--surface-inset);
  --shell-panel: var(--surface);
  --shell-border: var(--line);
  --shell-border-strong: var(--line-strong);
  --shell-text: var(--text);
  --shell-text-secondary: var(--text-secondary);
  --shell-muted: var(--muted);
  --shell-hover: var(--bg-subtle);
  --shell-active: var(--accent-soft);
  --shell-accent: var(--accent);
  --header-height: 48px;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0c1017;
  --bg-subtle: #171c25;
  --surface: #141922;
  --surface-raised: #1a202b;
  --surface-dim: #222a36;
  --surface-inset: #10151d;
  --text: #f3f5f7;
  --text-secondary: #c4cad3;
  --muted: #929cab;
  --line: #29313d;
  --line-strong: #3b4655;
  --accent: #5aa2ff;
  --accent-hover: #84b9ff;
  --accent-soft: #132946;
  --accent-muted: #285987;
  --danger: #ff7474;
  --danger-soft: #35191d;
  --danger-border: #653039;
  --warn: #f7b955;
  --warn-soft: #332614;
  --warn-border: #685126;
  --success: #45d39f;
  --success-soft: #123026;
  --success-border: #245b48;
  --purple: #b5a6ff;
  --purple-soft: #24213b;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.42);
  --glass-bg: rgba(20, 25, 34, 0.82);
  --glass-border: rgba(59, 70, 85, 0.86);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23aeb7c5' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --select-chevron-accent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235aa2ff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--shell-bg);
  color: var(--shell-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
  letter-spacing: -0.011em;
}

body::before {
  display: none;
}

.theme-toggle {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  font: 600 0.74rem/1 var(--font-sans);
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.theme-toggle:hover { color: var(--text); background: var(--surface-inset); border-color: var(--line-strong); }
.theme-toggle:active { transform: scale(0.96); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--accent); }
.theme-toggle-icon, .theme-toggle-icon svg { width: 17px; height: 17px; display: block; }
.theme-toggle-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle--header { width: 34px; min-width: 34px; height: 34px; padding: 0; }
.theme-toggle--header .theme-toggle-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.theme-toggle--floating { position: fixed; z-index: 1200; top: 18px; right: 18px; }

html[data-theme='dark'] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder { color: #758092; }

html[data-theme='dark'] input[type='date']::-webkit-calendar-picker-indicator,
html[data-theme='dark'] input[type='datetime-local']::-webkit-calendar-picker-indicator { filter: invert(0.85); }

html[data-theme='dark'] .modal-content,
html[data-theme='dark'] .modal-card,
html[data-theme='dark'] .dropdown-menu,
html[data-theme='dark'] .account-menu-panel,
html[data-theme='dark'] .workspace-menu nav,
html[data-theme='dark'] .auto-node,
html[data-theme='dark'] .auto-drawer,
html[data-theme='dark'] .auto-modal,
html[data-theme='dark'] .studio-panel,
html[data-theme='dark'] .builder-panel,
html[data-theme='dark'] .integration-card,
html[data-theme='dark'] .site-settings-card,
html[data-theme='dark'] .replay-shell,
html[data-theme='dark'] .viewer-panel {
  background-color: var(--surface) !important;
  color: var(--text);
  border-color: var(--line) !important;
}

html[data-theme='dark'] .evt-tag--warn,
html[data-theme='dark'] .probe-chip.is-script { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }

html[data-theme='dark'] .auto-studio {
  --studio-accent: #7daaff;
  --studio-accent-soft: rgba(90, 162, 255, 0.14);
  --studio-cyan: #4cc9e8;
  --studio-surface: var(--bg);
  --studio-canvas: #0f151e;
  --studio-grid: rgba(121, 143, 170, 0.18);
}
html[data-theme='dark'] .auto-studio-header { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-inset) 100%); box-shadow: none; }
html[data-theme='dark'] .auto-studio-rail,
html[data-theme='dark'] .auto-studio-inspector,
html[data-theme='dark'] .auto-studio-activity,
html[data-theme='dark'] .auto-studio-tools,
html[data-theme='dark'] .auto-canvas-toolbar,
html[data-theme='dark'] .auto-var-suggest { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-md); }
html[data-theme='dark'] .auto-studio-canvas { background: linear-gradient(180deg, #121924 0%, var(--studio-canvas) 100%) !important; box-shadow: none !important; }
html[data-theme='dark'] .auto-canvas-node .auto-step,
html[data-theme='dark'] .auto-template-card,
html[data-theme='dark'] .auto-step-library button,
html[data-theme='dark'] .auto-run-row,
html[data-theme='dark'] .auto-draft-card { background: var(--surface) !important; border-color: var(--line) !important; color: var(--text); }
html[data-theme='dark'] .auto-flow-name-input,
html[data-theme='dark'] .auto-flow-desc-input { background: transparent; color: var(--text); }
html[data-theme='dark'] .auto-flow-name-input:focus,
html[data-theme='dark'] .auto-flow-desc-input:focus { background: var(--surface); }

html[data-theme='dark'] .settings-workspace {
  --ss-card-bg: rgba(20, 25, 34, 0.94);
  --ss-card-border: rgba(59, 70, 85, 0.9);
}
html[data-theme='dark'] .ss-stat-card,
html[data-theme='dark'] .ss-step-card,
html[data-theme='dark'] .ss-config-card { background: var(--surface); border-color: var(--line); }

html[data-theme='dark'] .waf-hero,
html[data-theme='dark'] .waf-posture-card { background: linear-gradient(160deg, var(--surface) 55%, var(--accent-soft) 160%); }
html[data-theme='dark'] .waf-method,
html[data-theme='dark'] .waf-example { background: rgba(255, 255, 255, 0.05); }

html[data-theme='dark'] .attention-card.probe,
html[data-theme='dark'] .evt-tag--probe { background: var(--purple-soft); border-color: #4d466f; color: var(--purple); }
html[data-theme='dark'] .evt-tag--rage { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
html[data-theme='dark'] .evt-tag--dead { background: var(--surface-dim); border-color: var(--line-strong); color: var(--text-secondary); }
html[data-theme='dark'] .player-frame-shell { background: linear-gradient(180deg, #1c2430 0%, #111720 100%); }
html[data-theme='dark'] .player-stage { --stage-bg: #080c12; }
html[data-theme='dark'] .player-fidelity-warning { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }
html[data-theme='dark'] .replay-cursor-label { background: rgba(20, 25, 34, 0.94); color: var(--text); }

html[data-theme='dark'] .auth-tabs button:hover:not(.is-active) { background: var(--surface-raised); }
html[data-theme='dark'] .billing-banner { background: var(--accent-soft); border-color: var(--accent-muted); }
html[data-theme='dark'] .billing-banner.is-success { background: var(--success-soft); border-color: var(--success-border); }
html[data-theme='dark'] .billing-banner.is-muted { background: var(--surface-inset); }
html[data-theme='dark'] .billing-meter-track { background: var(--surface-dim); }

html[data-theme='dark'] dialog { color: var(--text); background: var(--surface); border-color: var(--line); }

@media (max-width: 720px) {
  .theme-toggle--floating { top: 10px; right: 10px; }
  .theme-toggle--landing .theme-toggle-label { display: none; }
  .theme-toggle--landing { width: 36px; min-width: 36px; padding: 0; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-inset);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ── Buttons ── */
.btn, button.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--shell-accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: background 0.12s, opacity 0.12s;
}
.btn:hover, button.primary-btn:hover {
  background: var(--accent-hover);
}
.btn:active { transform: scale(0.98); }

.btn.secondary, button.secondary {
  background: var(--shell-panel);
  color: var(--shell-text-secondary);
  border: 1px solid var(--shell-border);
  box-shadow: none;
}
.btn.secondary:hover, button.secondary:hover {
  background: var(--shell-hover);
  border-color: var(--shell-border-strong);
  color: var(--shell-text);
}

.btn.ghost {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--muted);
}
.btn.ghost:hover { background: var(--bg-subtle); color: var(--text); }

.btn.sm {
  padding: 6px 11px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn.ghost.sm {
  padding: 6px 11px;
  font-size: 0.78rem;
}

.watch-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface-inset);
  color: var(--text-secondary);
  margin-right: 4px;
  white-space: nowrap;
}
.badge.replay { color: var(--success); background: var(--success-soft); border-color: var(--success-border); }
.badge.no-replay { color: var(--muted); }
.badge.incident { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.badge.rage { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-border); }
.badge.dead { color: var(--purple); background: var(--purple-soft); border-color: #ddd6fe; }
.badge.probe { color: var(--purple); background: var(--purple-soft); border-color: #ddd6fe; }
.badge.friction-high { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.badge.friction-mid { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-border); }
.badge.friction-low { color: var(--success); background: var(--success-soft); border-color: var(--success-border); }
.badge.status-open { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.badge.status-acknowledged { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-border); }
.badge.status-resolved { color: var(--success); background: var(--success-soft); border-color: var(--success-border); }
.badge.trend-worse { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.badge.trend-better { color: var(--success); background: var(--success-soft); border-color: var(--success-border); }
.badge.trend-stable { color: var(--muted); }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Cards & panels (player-style flat surfaces) ── */
.card, .panel {
  background: var(--shell-panel);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.panel { padding: 14px; margin-bottom: 12px; }
.panel h2 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--shell-text);
}
.panel p { margin: 0; color: var(--shell-muted); font-size: 0.72rem; line-height: 1.45; }

/* Shared page patterns */
.sr-panel {
  background: var(--shell-panel);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: none;
}

.sr-panel-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--shell-border);
}

.sr-panel-head h2,
.sr-panel-head h3 {
  margin: 0 0 3px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--shell-text);
}

.sr-panel-head p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--shell-muted);
  line-height: 1.45;
}

.sr-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--shell-border);
  background: var(--shell-panel);
  box-shadow: none;
}

.sr-hero-text h2 {
  margin: 0 0 4px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--shell-text);
}

.sr-hero-text p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--shell-muted);
  line-height: 1.45;
  max-width: 560px;
}

.sr-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.sr-stat-card {
  padding: 10px 12px;
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-sm);
  background: var(--shell-panel);
  min-width: 0;
}

.sr-stat-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shell-muted);
  margin-bottom: 4px;
}

.sr-stat-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--shell-text);
}

.sr-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--shell-border);
  background: var(--shell-panel);
  font-size: 0.76rem;
  color: var(--shell-text-secondary);
  line-height: 1.45;
}

.sr-status-banner::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--shell-muted);
}

.sr-status-banner.is-on::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.sr-status-banner.is-off::before { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.sr-status-banner.is-saved::before { background: var(--shell-accent); box-shadow: 0 0 0 3px var(--shell-active); }
.sr-status-banner.is-error::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* Global form fields */
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']),
textarea {
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--shell-text);
  background: var(--shell-panel);
  border: 1px solid var(--shell-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.12s, box-shadow 0.12s;
}

input:not([type='checkbox']):not([type='radio']):not([type='range']):focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-muted);
  box-shadow: var(--focus-ring);
}

textarea {
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

/* Scrollbars (webkit) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--radius-full);
}
*::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Skeleton ── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-dim);
  border-radius: var(--radius-sm);
  min-height: 18px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.empty, .loading, .error-box {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.error-box { color: var(--danger); }

/* ── Select / dropdown ── */
:root {
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --select-chevron-accent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

select.sr-select,
select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: inline-block;
  min-height: 38px;
  padding: 8px 36px 8px 12px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  background-color: var(--surface);
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

select.sr-select:hover:not(:disabled),
select:not([multiple]):not([size]):hover:not(:disabled) {
  border-color: var(--line-strong);
  background-color: var(--surface-inset);
}

select.sr-select:focus,
select:not([multiple]):not([size]):focus {
  outline: none;
  border-color: var(--accent-muted);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background-image: var(--select-chevron-accent);
}

select.sr-select:disabled,
select:not([multiple]):not([size]):disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--surface-inset);
}

.sr-select-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sr-select-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.sr-select-field--toolbar select,
.site-select-wrap select {
  min-width: 148px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding-left: 14px;
  padding-right: 34px;
  background-color: var(--surface-inset);
}

.sr-select-field--toolbar select:focus,
.site-select-wrap select:focus {
  background-color: var(--surface);
}

.sr-select-compact {
  min-height: 32px !important;
  padding: 5px 30px 5px 10px !important;
  font-size: 0.8rem !important;
  background-position: right 8px center !important;
}

/* Shared button tooltips: quiet, light-theme native guidance for unfamiliar controls. */
.sr-tooltip {
  position: fixed;
  z-index: 4000;
  max-width: min(240px, calc(100vw - 16px));
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 140ms ease, transform 140ms ease;
}
.sr-tooltip.is-visible { opacity: 1; transform: translateY(0); }
.sr-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  background: var(--text);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transform: translateX(-50%) rotate(45deg);
}
.sr-tooltip[data-placement='bottom'] { transform: translateY(-3px); }
.sr-tooltip[data-placement='bottom'].is-visible { transform: translateY(0); }
.sr-tooltip[data-placement='bottom']::after { top: -5px; bottom: auto; border: 0; border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); }
@media (prefers-reduced-motion: reduce) { .sr-tooltip { transition: none; } }
