/* selfhelp.gg Universe Design Tokens & Base Shell Components
 * Zero external tracker requests (no third-party font CSS imports).
 * Enforces >= 1rem (16px) body text floor, 44px interactive targets,
 * 5 E-Reader eye-comfort themes, and zero horizontal overflow.
 */

:root {
  color-scheme: dark;

  /* Core Cosmic Void & Surfaces */
  --sh-void: #050508;
  --sh-deep: #000000;
  --sh-ink-panel: #0a0a10;
  --sh-surface: rgba(12, 13, 20, 0.84);
  --sh-surface-raised: rgba(20, 22, 34, 0.92);
  --sh-surface-strong: rgba(8, 12, 24, 0.96);
  --sh-border: rgba(201, 169, 110, 0.24);
  --sh-border-subtle: rgba(255, 255, 255, 0.09);
  --sh-border-hi: rgba(201, 169, 110, 0.55);
  --sh-text: #e8edf2;
  --sh-text-muted: #9da4ae;
  --sh-whisper: #8090a8;

  /* Resonance Scale & Five-Organ Accents */
  --sh-rp-red: #e74c3c;
  --sh-rp-red-deep: #cc3333;
  --sh-rp-purple: #9b59b6;
  --sh-rp-purple-deep: #7b6aaa;
  --sh-rp-blue: #3498db;
  --sh-rp-blue-deep: #5a90a0;
  --sh-gold: #c9a96e;
  --sh-gold-rgb: 201, 169, 110;
  --sh-gold-dim: #8b7d5a;
  --sh-gold-glow: rgba(201, 169, 110, 0.16);
  --sh-cream: #f0e6d2;
  --sh-garden-sage: #7aaa88;
  --sh-garden-sage-dim: #5a8a68;
  --sh-jade: #34d399;

  /* Typography (System-Fallback Stack, Zero Network Trackers) */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-quote: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Accessibility Scale Floor (>= 16px body) */
  --min-body: 1rem;
  --min-label: 1rem;
  --min-button: 0.95rem;
  --min-meta: 1rem;
  --min-stat: 1.1rem;

  /* Radii, Targets & Motion */
  --radius-lg: 20px;
  --radius-md: 12px;
  --target-size: 44px;
  --hover-transform: translateY(-2px);
  --hover-shadow: 0 8px 25px rgba(201, 169, 110, 0.2);
  --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* E-Reader Surface Bridge */
  --bg: var(--sh-void);
  --panel: var(--sh-surface);
  --raised: var(--sh-surface-raised);
  --card-surface: var(--sh-surface-raised);
  --input-bg: #0c0e16;
  --line: var(--sh-border);
  --line-hi: var(--sh-border-hi);
  --ink: var(--sh-text);
  --bright: var(--sh-cream);
  --dim: var(--sh-text-muted);
  --muted: var(--sh-whisper);
  --gold: var(--sh-gold);
  --gold-dim: var(--sh-gold-dim);
  --sage: var(--sh-garden-sage);
  --red: var(--sh-rp-red);
  --blue: var(--sh-rp-blue);
  --violet: var(--sh-rp-purple);
  --topbar-bg: rgba(5, 5, 8, 0.94);
  --bottomnav-bg: rgba(5, 5, 8, 0.96);
  --sh-skip-ink: #090b12;
  --sh-gold-text: var(--sh-gold);
  --sh-nav-active-bg: rgba(201, 169, 110, 0.12);
  --sh-badge-ink: var(--sh-gold);
  --sh-badge-bg: rgba(201, 169, 110, 0.14);
  --sh-badge-border: var(--sh-border);
  --sh-badge-active-ink: var(--sh-cream);
  --sh-badge-active-bg: rgba(8, 10, 16, 0.68);
}

/* Five E-Reader Eye-Comfort Themes (studio/coach.html parity) */
[data-theme="voix-vive"] {
  color-scheme: dark;
  --bg: #050508;
  --panel: rgba(18, 18, 22, 0.9);
  --raised: rgba(26, 26, 34, 0.94);
  --card-surface: rgba(18, 18, 24, 0.94);
  --input-bg: #0c0c12;
  --line: rgba(201, 169, 110, 0.24);
  --line-hi: rgba(201, 169, 110, 0.52);
  --ink: #e4dfd4;
  --bright: #f2ede2;
  --dim: #a9b0ba;
  --muted: #88909c;
  --gold: #c9a96e;
  --gold-dim: #8b7348;
  --sage: #7aaa88;
  --violet: #7b6aaa;
  --blue: #3498db;
  --red: #cc3333;
  --topbar-bg: rgba(5, 5, 8, 0.94);
  --bottomnav-bg: rgba(5, 5, 8, 0.96);
  --sh-surface: var(--panel);
  --sh-surface-raised: var(--raised);
  --sh-surface-strong: rgba(8, 10, 18, 0.97);
  --sh-border: var(--line);
  --sh-border-hi: var(--line-hi);
  --sh-text: var(--ink);
  --sh-text-muted: var(--dim);
  --sh-cream: var(--bright);
  --sh-gold: var(--gold);
}

[data-theme="slate"] {
  color-scheme: dark;
  --bg: #23262a;
  --panel: #2b2f35;
  --raised: #32373e;
  --card-surface: #2e333a;
  --input-bg: #25292e;
  --line: #3d434c;
  --line-hi: #4e5662;
  --ink: #d5d0c5;
  --bright: #e4dfd4;
  --dim: #9da4ae;
  --muted: #767d87;
  --gold: #cfa36e;
  --gold-dim: #9e7a4f;
  --sage: #7eb392;
  --red: #cc6b6b;
  --blue: #7ca4c4;
  --violet: #9e8ec4;
  --topbar-bg: rgba(35, 38, 42, 0.96);
  --bottomnav-bg: rgba(32, 35, 39, 0.97);
  --sh-surface: var(--panel);
  --sh-surface-raised: var(--card-surface);
  --sh-surface-strong: var(--raised);
  --sh-ink-panel: var(--card-surface);
  --sh-border: var(--line);
  --sh-border-hi: var(--line-hi);
  --sh-text: var(--ink);
  --sh-text-muted: var(--dim);
  --sh-cream: var(--bright);
  --sh-gold: var(--gold);
  --sh-gold-text: #dfc08e;
}

[data-theme="pewter"],
[data-theme="paper"] {
  color-scheme: light;
  --bg: #c8c4bc;
  --panel: #d2cec6;
  --raised: #c0bcb4;
  --card-surface: #dad6ce;
  --input-bg: #dfdcd4;
  --line: #aba69c;
  --line-hi: #948f85;
  --ink: #22201d;
  --bright: #141311;
  --dim: #4b4740;
  --muted: #6e6960;
  --gold: #7d4818;
  --gold-dim: #633812;
  --sage: #23593c;
  --red: #992929;
  --blue: #224d73;
  --violet: #4b3870;
  --topbar-bg: rgba(200, 196, 188, 0.96);
  --bottomnav-bg: rgba(194, 190, 182, 0.97);
  --sh-surface: var(--panel);
  --sh-surface-raised: var(--card-surface);
  --sh-surface-strong: var(--card-surface);
  --sh-ink-panel: var(--card-surface);
  --sh-border: var(--line);
  --sh-border-hi: var(--line-hi);
  --sh-text: var(--ink);
  --sh-text-muted: var(--dim);
  --sh-cream: var(--bright);
  --sh-gold: var(--gold);
  --sh-skip-ink: #faf6ee;
  --sh-gold-text: #4a2708;
  --sh-nav-active-bg: rgba(125, 72, 24, 0.12);
  --sh-badge-ink: #5a310b;
  --sh-badge-bg: rgba(125, 72, 24, 0.12);
  --sh-badge-border: rgba(125, 72, 24, 0.42);
  --sh-badge-active-ink: #4a2708;
  --sh-badge-active-bg: rgba(250, 246, 238, 0.72);
}

[data-theme="sepia"] {
  color-scheme: light;
  --bg: #cfc4ae;
  --panel: #d7ccb8;
  --raised: #c4b9a3;
  --card-surface: #dfd5c2;
  --input-bg: #e4dbc9;
  --line: #b0a48c;
  --line-hi: #968a72;
  --ink: #262017;
  --bright: #17120a;
  --dim: #514533;
  --muted: #73654f;
  --gold: #7a4214;
  --gold-dim: #5e320e;
  --sage: #225439;
  --red: #942626;
  --blue: #21496b;
  --violet: #49356e;
  --topbar-bg: rgba(207, 196, 174, 0.96);
  --bottomnav-bg: rgba(198, 187, 165, 0.97);
  --sh-surface: var(--panel);
  --sh-surface-raised: var(--card-surface);
  --sh-surface-strong: var(--card-surface);
  --sh-ink-panel: var(--card-surface);
  --sh-border: var(--line);
  --sh-border-hi: var(--line-hi);
  --sh-text: var(--ink);
  --sh-text-muted: var(--dim);
  --sh-cream: var(--bright);
  --sh-gold: var(--gold);
  --sh-skip-ink: #faf6ee;
  --sh-gold-text: #4a2708;
  --sh-nav-active-bg: rgba(122, 66, 20, 0.12);
  --sh-badge-ink: #5a310b;
  --sh-badge-bg: rgba(122, 66, 20, 0.12);
  --sh-badge-border: rgba(122, 66, 20, 0.42);
  --sh-badge-active-ink: #4a2708;
  --sh-badge-active-bg: rgba(250, 246, 238, 0.72);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16181c;
  --panel: #1e2127;
  --raised: #252931;
  --card-surface: #21252c;
  --input-bg: #191c21;
  --line: #313742;
  --line-hi: #414958;
  --ink: #c7ccd4;
  --bright: #dce0e6;
  --dim: #8891a0;
  --muted: #626b7a;
  --gold: #c4a268;
  --gold-dim: #8b7348;
  --sage: #74a685;
  --red: #c25959;
  --blue: #6b96b5;
  --violet: #8c7cb8;
  --topbar-bg: rgba(22, 24, 28, 0.96);
  --bottomnav-bg: rgba(20, 22, 26, 0.97);
  --sh-surface: var(--panel);
  --sh-surface-raised: var(--card-surface);
  --sh-surface-strong: var(--raised);
  --sh-ink-panel: var(--card-surface);
  --sh-border: var(--line);
  --sh-border-hi: var(--line-hi);
  --sh-text: var(--ink);
  --sh-text-muted: var(--dim);
  --sh-cream: var(--bright);
  --sh-gold: var(--gold);
}

@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
}

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

html {
  font-size: 100%;
  overflow-x: clip;
  max-width: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--min-body);
  line-height: 1.68;
  overflow-x: clip;
  max-width: 100%;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

[data-theme="voix-vive"] body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(155, 89, 182, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(201, 169, 110, 0.08) 0%, transparent 45%),
    #050508;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sh-gold);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--sh-cream);
}

:focus-visible {
  outline: 3px solid var(--sh-gold);
  outline-offset: 3px;
}

section, [id] {
  scroll-margin-top: 88px;
}

[hidden],
[data-sh-egregore="off"] [data-egregore-only] {
  display: none !important;
}

.sh-skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--sh-gold);
  color: var(--sh-skip-ink);
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.sh-skip-link:focus {
  left: 12px;
}

/* Top Shared Portal Header */
.sh-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--sh-border);
}

.sh-header-inner {
  width: min(1340px, calc(100% - 16px));
  margin: 0 auto;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.sh-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  color: var(--sh-cream);
  min-height: var(--target-size);
  justify-content: center;
  flex-shrink: 0;
}

.sh-brand strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: var(--sh-cream);
  white-space: nowrap;
}

.sh-brand span {
  font-size: 0.73rem;
  color: var(--sh-text-muted);
  white-space: nowrap;
}

.sh-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px;
}

.sh-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--target-size);
  min-width: var(--target-size);
  padding: 6px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--sh-text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: var(--transition-base);
}

.sh-portal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid var(--sh-badge-border);
  background: var(--sh-badge-bg);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--sh-badge-ink);
  flex-shrink: 0;
}

.sh-nav a.is-active .sh-portal-badge,
.sh-nav a[aria-current="page"] .sh-portal-badge {
  border-color: var(--sh-border-hi);
  background: var(--sh-badge-active-bg);
  color: var(--sh-badge-active-ink);
}

.sh-nav a:hover {
  border-color: var(--sh-border);
  background: var(--sh-gold-glow);
  color: var(--sh-cream);
}

.sh-nav a.is-active,
.sh-nav a[aria-current="page"] {
  border-color: var(--sh-border-hi);
  background: var(--sh-nav-active-bg);
  color: var(--sh-gold-text);
}

.sh-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
}

/* Buttons */
.sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--target-size);
  min-width: var(--target-size);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--sh-border);
  background: var(--sh-surface-raised);
  color: var(--sh-cream);
  font-family: var(--font-body);
  font-size: var(--min-button);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-base);
}

.sh-btn:hover {
  border-color: var(--sh-border-hi);
  transform: var(--hover-transform);
  box-shadow: var(--hover-shadow);
}

.sh-btn-sm {
  padding: 6px 9px;
  font-size: 0.81rem;
  white-space: nowrap;
}

.sh-btn-gold {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.28), rgba(201, 169, 110, 0.12));
  border-color: var(--sh-border-hi);
  color: var(--sh-cream);
}

[data-sh-auth-btn] {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 30px;
  text-align: left;
}

/* Portal Cards (VoixVive LandingScreen parity with >= 1rem desc floor) */
.portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.portal-card {
  position: relative;
  min-width: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sh-border-subtle);
  background: var(--sh-ink-panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--sh-text);
  transition: var(--transition-base);
}

.portal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--portal-color, var(--sh-gold));
  z-index: 2;
}

.portal-card:hover {
  border-color: var(--sh-border-hi);
  transform: var(--hover-transform);
  box-shadow: var(--hover-shadow);
}

.portal-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--sh-void);
}

.portal-info {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--sh-cream);
}

.portal-desc {
  margin: 0;
  font-size: var(--min-body);
  line-height: 1.6;
  color: var(--sh-text-muted);
}

/* Legal Document Shell */
.sh-legal-shell {
  width: min(880px, calc(100% - 32px));
  margin: 32px auto 52px;
  flex: 1 0 auto;
}

.sh-legal-card {
  background: var(--sh-surface-raised);
  border: 1px solid var(--sh-border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.4vw, 42px);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}

.sh-legal-eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--min-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sh-gold);
}

.sh-legal-card h1 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: var(--sh-cream);
  text-wrap: balance;
}

.sh-legal-meta {
  margin: 0 0 24px;
  font-size: var(--min-meta);
  color: var(--sh-text-muted);
}

.sh-legal-overview {
  margin: 0 0 28px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sh-border);
  border-left: 4px solid var(--sh-gold);
  background: rgba(201, 169, 110, 0.08);
}

.sh-legal-overview h2 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--sh-cream);
}

.sh-legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.sh-legal-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  color: var(--sh-cream);
  font-size: 0.92rem;
  text-decoration: none;
}

.sh-legal-toc a:hover {
  border-color: var(--sh-border-hi);
  background: var(--sh-gold-glow);
}

.sh-legal-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--sh-border-subtle);
}

.sh-legal-card h2 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.25;
  color: var(--sh-cream);
  text-wrap: balance;
}

.sh-legal-card h3 {
  margin: 18px 0 8px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--sh-gold);
}

.sh-legal-card p,
.sh-legal-card li {
  font-size: clamp(1rem, 1rem + 0.1vw, 1.0625rem);
  line-height: 1.72;
  max-width: 72ch;
  color: var(--sh-text);
}

.sh-legal-card ul,
.sh-legal-card ol {
  padding-left: 1.35rem;
  margin: 10px 0 14px;
}

.sh-legal-card li + li {
  margin-top: 8px;
}

.sh-legal-card code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sh-cream);
}

.sh-legal-actions {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--sh-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Global Legal Footer */
.sh-footer {
  margin-top: auto;
  background: var(--bottomnav-bg);
  border-top: 1px solid var(--sh-border);
  padding: 24px 0 max(32px, env(safe-area-inset-bottom));
}

.sh-footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  font-size: 1rem;
  color: var(--sh-text-muted);
}

.sh-footer-brand {
  margin: 0;
  font-size: 1rem;
  color: var(--sh-text-muted);
}

.sh-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.sh-footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: var(--target-size);
  padding: 8px 6px;
  color: var(--sh-cream);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid transparent;
}

.sh-footer-links a:hover,
.sh-footer-links a[aria-current="page"] {
  color: var(--sh-gold-text);
  border-bottom-color: var(--sh-gold-text);
}

/* Native Modal Dialogs */
dialog.sh-dialog {
  margin: auto;
  padding: 0;
  width: min(640px, calc(100vw - 24px));
  max-height: 88dvh;
  background: var(--sh-surface-strong);
  color: var(--sh-text);
  border: 1px solid var(--sh-border-hi);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72);
  overscroll-behavior: contain;
}

dialog.sh-dialog::backdrop {
  background: rgba(3, 6, 15, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  overscroll-behavior: contain;
}

.sh-dialog-card {
  padding: 22px 24px;
  max-height: 86dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sh-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sh-dialog-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.65rem;
  color: var(--sh-cream);
}

.sh-dialog-close {
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  border: 1px solid var(--sh-border);
  background: var(--sh-surface-raised);
  color: var(--sh-cream);
  font-size: 1.2rem;
  cursor: pointer;
}

.sh-dialog-body p {
  font-size: var(--min-body);
  line-height: 1.65;
  color: var(--sh-text);
  margin: 0 0 12px;
}

.sh-dialog-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sh-input {
  flex: 1 1 220px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sh-border);
  background: var(--input-bg);
  color: var(--sh-cream);
  font-family: var(--font-mono);
  font-size: var(--min-body);
}

.sh-dialog-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sh-border);
  background: rgba(201, 169, 110, 0.08);
  font-size: 1rem;
  color: var(--sh-cream);
}

.sh-dialog-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sh-receipt-avatar-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(231, 76, 60, 0.52);
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.14), rgba(15, 16, 28, 0.94));
}

.sh-receipt-avatar-thumb {
  width: 144px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(201, 169, 110, 0.56);
  display: block;
  flex-shrink: 0;
}

.sh-receipt-avatar-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 200px;
}

.sh-receipt-avatar-copy strong {
  color: var(--sh-gold-text, #f5d17a);
  font-size: 0.96rem;
}

.sh-receipt-avatar-copy span {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--sh-text);
  line-height: 1.45;
}

@media (min-width: 1200px) {
  [data-sh-auth-btn] {
    max-width: 170px;
  }
}

@media (max-width: 960px) {
  .sh-header {
    position: static;
  }

  section, [id] {
    scroll-margin-top: 24px;
  }

  .sh-header-inner {
    gap: 10px;
  }

  .portals-grid {
    grid-template-columns: 1fr;
  }

  .sh-legal-shell {
    width: calc(100% - 24px);
    margin: 20px auto 36px;
  }

  .sh-legal-card {
    padding: 20px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .portal-card,
  .sh-btn,
  .sh-nav a {
    transition: none;
  }

  .portal-card:hover,
  .sh-btn:hover {
    transform: none;
  }
}
