/**
 * Atopos — Base44-style theme
 * Soft hues, muted gradients, modern messenger feel.
 */

:root {
  /* Backgrounds */
  --bg: #1f232a;
  --bg-gradient: linear-gradient(165deg, #232934 0%, #1f232a 52%, #1b1f26 100%);
  --surface: #262c35;
  --surface-elevated: #2d3440;
  --surface-hover: #323a46;

  /* Borders */
  --border: rgba(255, 255, 255, 0.055);
  --border-soft: rgba(255, 255, 255, 0.045);

  /* Text */
  --text: #e8eaed;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;

  /* Accent */
  --accent: #68a8e3;
  --accent-hover: #7ab4ea;
  --accent-muted: rgba(104, 168, 227, 0.22);
  --accent-rooms: #68a8e3;
  --accent-secret: #9a7af8;
  --accent-tokens: #8f9baa;

  /* Semantic */
  --success: #4ade80;
  --success-muted: rgba(74, 222, 128, 0.2);
  --trust-green: #2d9d6e;
  --trust-green-glow: rgba(45, 157, 110, 0.35);
  --warning: #fbbf24;
  --warning-muted: rgba(251, 191, 36, 0.2);
  --danger: #f87171;
  --danger-muted: rgba(248, 113, 113, 0.2);

  /* Chat bubbles */
  --bubble-me: #2d5a87;
  --bubble-them: #2a2f38;
  --bubble-system: rgba(107, 114, 128, 0.3);

  /* Spacing */
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow: 0 10px 26px rgba(5, 8, 14, 0.2);
  --shadow-lg: 0 16px 36px rgba(5, 8, 14, 0.28);
  --surface-2: #2a2f38;
  --muted: #9ca3af;
  --accent-glow: rgba(91, 155, 213, 0.2);
  --shadow-soft: 0 1px 6px rgba(0, 0, 0, 0.15);
  --chat-bubble-radius: 1rem;
  --chat-bubble-max-width: 75%;
  --panel-section-bg: #23272f;
  --panel-section-border: rgba(255, 255, 255, 0.06);
  --spacing-unit: 0.75rem;
  --step-card-radius: 18px;
  --step-card-padding: 32px;
  --step-card-padding-mobile: 22px;
  --step-card-fallback-bg: rgba(255, 255, 255, 0.02);
  --step-card-fallback-border: rgba(255, 255, 255, 0.06);
  --step-card-fallback-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  --step-blue-rgb: 59, 130, 246;
  --step-orange-rgb: 255, 149, 0;
  --step-purple-rgb: 139, 92, 246;
  --step-cyan-rgb: 20, 184, 166;
  --step-green-rgb: 34, 197, 94;
  --final-accent-bg: rgba(20, 184, 166, 0.08);
  --final-accent-border: rgba(20, 184, 166, 0.35);
  --final-accent-glow: rgba(20, 184, 166, 0.18);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.room-setup-page {
  --accent: var(--accent-rooms);
  --accent-hover: #7ab4ea;
  --accent-muted: rgba(104, 168, 227, 0.2);
}

body.secret-page {
  --accent: var(--accent-secret);
  --accent-hover: #ad92ff;
  --accent-muted: rgba(154, 122, 248, 0.24);
}

body.tokens-page,
body.redeem-page {
  --accent: var(--accent-tokens);
  --accent-hover: #a3aebb;
  --accent-muted: rgba(143, 155, 170, 0.24);
}

/* Nav — ensure above overlays, always clickable */
.nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 100;
}

.nav-brand {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.nav-links a.nav-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-soft);
  color: var(--text);
}

.nav-links a.nav-btn-active,
.nav-links a.nav-btn.nav-btn-active:hover {
  background: var(--accent-muted);
  border-color: rgba(var(--step-blue-rgb, 59, 130, 246), 0.5);
  color: var(--text);
  font-weight: 600;
}

/* ─── Responsive nav: hamburger + drawer (< 1024px) ─── */
.nav-top {
  padding-left: clamp(0.75rem, 4vw, 1.5rem);
  padding-right: clamp(0.75rem, 4vw, 1.5rem);
  max-width: 100%;
  flex-wrap: nowrap;
  min-height: 3.25rem;
}

.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.nav-hamburger:hover {
  background: var(--surface-hover);
  border-color: var(--border-soft);
  color: var(--text);
}
.nav-hamburger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}
.nav-hamburger[aria-expanded="true"] {
  background: var(--surface-hover);
}

.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.nav-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 100vw);
  max-width: 100%;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.3);
}
.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-drawer__close {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.nav-drawer__close:hover {
  background: var(--surface-hover);
  border-color: var(--border-soft);
}

.nav-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-drawer__primary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.nav-drawer__primary .pill,
.nav-drawer__primary a.pill {
  width: 100%;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
}
.nav-drawer__secondary {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.nav-drawer__secondary a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.nav-drawer__secondary a:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.nav-drawer__secondary a.nav-btn-active {
  background: var(--accent-muted);
  color: var(--text);
  font-weight: 600;
}

body.nav-drawer-open {
  overflow: hidden;
}

@media (max-width: 1023px) {
  .nav-hamburger {
    display: inline-flex;
  }
  .nav-links {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .nav-drawer-backdrop,
  .nav-drawer {
    display: none !important;
  }
}

/* ─── Create Room FAB — all screen sizes, bottom-right, blue glow ─── */
.mobile-quick-actions {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 250;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0;
  pointer-events: none;
}
.mobile-quick-actions.is-visible {
  display: flex;
  pointer-events: auto;
}
@media (min-width: 1024px) {
  .mobile-quick-actions {
    bottom: 2rem;
    right: 2rem;
  }
}

.mobile-fab {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: rgba(38, 44, 53, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.25);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s;
  flex-shrink: 0;
  pointer-events: auto;
}
@media (prefers-reduced-motion: no-preference) {
  .mobile-fab {
    animation: create-room-fab-glow 2.5s ease-in-out infinite;
  }
}
@keyframes create-room-fab-glow {
  0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.25); }
  50% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(59, 130, 246, 0.4); }
}
.mobile-fab:hover {
  background: var(--surface-hover);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 24px rgba(59, 130, 246, 0.45);
  border-color: rgba(59, 130, 246, 0.6);
}
.mobile-fab:active {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), 0 0 18px rgba(59, 130, 246, 0.35);
}
.mobile-fab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent), 0 0 20px rgba(59, 130, 246, 0.3);
}
.mobile-fab svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* In-room drawer: Create new room CTA — same blue-glow accent as FAB */
.drawer-section-create-room {
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem;
}
.drawer-create-room-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
  transition: box-shadow 0.2s, transform 0.15s;
}
@media (prefers-reduced-motion: no-preference) {
  .drawer-create-room-cta {
    animation: create-room-fab-glow 2.5s ease-in-out infinite;
  }
}
.drawer-create-room-cta:hover {
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.45);
}

.mobile-fab-sheet {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
  min-width: 12rem;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  background: rgba(38, 44, 53, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}
.mobile-quick-actions.is-open .mobile-fab-sheet {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-fab-sheet a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
  white-space: normal;
  word-break: break-word;
  min-height: 2.5rem;
}
.mobile-fab-sheet a:hover {
  background: var(--surface-hover);
  border-color: var(--border-soft);
  color: var(--text);
}
.mobile-fab-sheet a.pill-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: transparent;
}
.mobile-fab-sheet a.pill-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

body.mobile-fab-open {
  overflow: hidden;
}

/* Container — stacking context so content stays above any overlays */
.container-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
}

.container-narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.container-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .container-main,
  .container-narrow,
  .container-wide {
    padding-left: clamp(0.75rem, 4vw, 1.5rem);
    padding-right: clamp(0.75rem, 4vw, 1.5rem);
  }
}

.redeem-page-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Two-card redeem layout: tokens left, room keys right */
.redeem-two-card-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .redeem-page-layout,
  .redeem-two-card-layout {
    grid-template-columns: 1fr;
  }
}

.redeem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.redeem-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.redeem-card-subtitle {
  font-size: 0.9rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* Brighter muted text for visibility (fix invisible subtitle) */
.text-slate-300 {
  color: #cbd5e1;
}

/* Room Keys section removed from redeem page — hide if present (cached/legacy) */
.room-key-section {
  display: none !important;
}

.redeem-tabs {
  display: flex;
  gap: 0.5rem;
}

.redeem-tab {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.redeem-tab:hover {
  color: var(--text);
}

.redeem-tab.active {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--text);
}

.session-readout {
  padding: 0.75rem 1rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.session-readout .session-credits {
  margin: 0 0 0.25rem;
  color: var(--text);
}

.session-readout .session-copy {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.4;
}

.import-feedback .import-success {
  margin: 0;
  font-size: 0.9rem;
}

.form-helper {
  font-size: 0.85rem;
}

.opsec-checklist {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.opsec-checklist h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.opsec-checklist .opsec-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.opsec-checklist ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.opsec-checklist .opsec-note {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin: 0;
  line-height: 1.5;
}

/* CTA links styled as primary buttons — no hyperlink styling */
.pill-cta {
  margin-top: 0.75rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.pill-cta:hover {
  color: inherit;
}
.pill-cta.pill-primary {
  color: var(--bg);
}
.pill-cta.pill-primary:hover {
  color: var(--bg);
}

.room-options-column h3,
.room-options-column h4,
.trust-anonymity-panel h3,
.trust-anonymity-panel h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.trust-anonymity-panel ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.trust-panel-footer {
  font-size: 0.8rem;
  color: #b8bcc4;
  margin: 0;
  line-height: 1.5;
}

.tier-card-disabled .pill-primary {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

.tier-card-disabled .tier-helper {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-top: 0.5rem;
}

.token-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Buy Tokens — pricing cards (single row on desktop) */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (max-width: 900px) {
  .pricing-cards {
    grid-template-columns: 1fr;
  }
}

.pricing-card {
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  /* Default: Blue Accent Theme */
  border: 1px solid rgba(80, 150, 255, 0.45);
  background: linear-gradient(
    135deg,
    rgba(80, 150, 255, 0.08) 0%,
    rgba(80, 150, 255, 0.03) 60%,
    transparent 100%
  );
  box-shadow:
    0 0 0 1px rgba(80, 150, 255, 0.15),
    0 0 24px rgba(80, 150, 255, 0.08);
}

.pricing-card:hover {
  border-color: rgba(80, 150, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(80, 150, 255, 0.2),
    0 0 28px rgba(80, 150, 255, 0.12);
}

.pricing-card.popular {
  /* Purple Accent Theme for Most Popular */
  border: 1px solid rgba(170, 120, 255, 0.5);
  background: linear-gradient(
    135deg,
    rgba(170, 120, 255, 0.1) 0%,
    rgba(170, 120, 255, 0.04) 60%,
    transparent 100%
  );
  box-shadow:
    0 0 0 1px rgba(170, 120, 255, 0.2),
    0 0 28px rgba(170, 120, 255, 0.12);
}

.pricing-card.popular:hover {
  border-color: rgba(170, 120, 255, 0.6);
  box-shadow:
    0 0 0 1px rgba(170, 120, 255, 0.25),
    0 0 32px rgba(170, 120, 255, 0.15);
}

.pricing-card.promo-activated {
  /* Keep subtle green for promo, but maintain card structure */
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.08) 0%,
    rgba(34, 197, 94, 0.03) 60%,
    transparent 100%
  );
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.15),
    0 0 24px rgba(34, 197, 94, 0.08);
}

.pricing-card.promo-activated:hover {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.2),
    0 0 28px rgba(34, 197, 94, 0.12);
}

.pricing-card.promo-activated .btn-purchase:not(:disabled) {
  background: #22c55e;
}
.pricing-card.promo-activated .btn-purchase:not(:disabled):hover {
  background: #16a34a;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Purchase button matches card/bundle color (blue default, purple popular, green promo) */
.pricing-card .btn-purchase:not(:disabled) {
  background: rgba(80, 150, 255, 0.95);
  color: var(--bg);
}
.pricing-card .btn-purchase:not(:disabled):hover {
  background: rgba(80, 150, 255, 1);
  box-shadow: 0 4px 12px rgba(80, 150, 255, 0.35);
}
.pricing-card.popular .btn-purchase:not(:disabled) {
  background: rgba(170, 120, 255, 0.95);
  color: #fff;
}
.pricing-card.popular .btn-purchase:not(:disabled):hover {
  background: rgba(165, 108, 255, 1);
  box-shadow: 0 4px 12px rgba(170, 120, 255, 0.35);
}

.pricing-card .popular-badge,
.pricing-card .promo-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: -0.25rem;
}

.pricing-card .popular-badge {
  color: rgba(170, 120, 255, 0.95);
}

.pricing-card .promo-badge {
  color: rgba(34, 197, 94, 0.95);
}

/* Promo applied banner — green hue + glowing border, same style as bearer-warning-callout */
.promo-applied-banner {
  padding: 0.5rem 1rem;
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid rgba(34, 197, 94, 0.5);
  border-radius: var(--radius);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-size: 0.9rem;
  font-weight: 500;
}

.pricing-card .pricing-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.pricing-card .pricing-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.pricing-card .pricing-tokens {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing-card .pricing-example {
  font-size: 0.85rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

.pricing-card .pricing-bullets {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pricing-card .pricing-bullets li {
  margin-bottom: 0.25rem;
}

.pricing-card .pricing-fine-print {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

.pricing-card .pricing-helper {
  font-size: 0.8rem;
  color: #b8bcc4;
  margin: 0;
  line-height: 1.4;
}

/* Purchase buttons — enabled when checkout configured, disabled otherwise */
.pricing-card .btn-purchase {
  cursor: pointer;
  pointer-events: auto;
}
.pricing-card .btn-purchase:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.what-tokens-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.what-tokens-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.what-tokens-tile h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.what-tokens-tile p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.trust-notes {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.trust-notes p {
  margin: 0 0 0.5rem;
}

/* All rooms secure section (Buy Tokens) */
.rooms-secure-section {
  margin: 1.5rem 0 2rem;
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 22px rgba(143, 155, 170, 0.1);
}

.rooms-secure-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.rooms-secure-section p, .rooms-secure-section .tiers-as-enhancements {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.rooms-secure-section ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.rooms-secure-section .tiers-tagline {
  font-weight: 500;
  color: var(--text);
  margin-top: 0.5rem;
}

/* Terms Agreement Card — Orange Accent */
#terms-consent-card.terms-agreement-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 170, 70, 0.52);
  background: linear-gradient(
    135deg,
    rgba(255, 170, 70, 0.14) 0%,
    rgba(255, 170, 70, 0.07) 60%,
    transparent 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 170, 70, 0.18),
    0 0 24px rgba(255, 170, 70, 0.1);
}

.terms-agreement-check {
  display: flex;
  align-items: flex-start;
  min-height: 44px;
  padding: 0.75rem 1rem;
  gap: 0.85rem;
}
.terms-agreement-check .terms-agreement-label {
  flex: 1;
  min-width: 0;
}

.terms-agreement-checkbox {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  margin-top: 2px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 170, 70, 0.9);
  background: rgba(32, 24, 14, 0.78);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.terms-agreement-checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.22);
}

.terms-agreement-checkbox:checked {
  border-color: rgba(255, 167, 77, 0.98);
  background: linear-gradient(165deg, rgba(255, 182, 112, 0.98) 0%, rgba(255, 149, 0, 0.95) 100%);
  box-shadow: 0 0 8px rgba(255, 149, 0, 0.24) inset;
}

.terms-agreement-checkbox:checked::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M11.8 3.2a.75.75 0 0 1 0 1.06L6.3 9.8a.75.75 0 0 1-1.06 0L2.2 6.76a.75.75 0 1 1 1.06-1.06l2.52 2.52 4.96-4.96a.75.75 0 0 1 1.06 0z' fill='%230b2530'/%3E%3C/svg%3E");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.terms-agreement-label {
  display: block;
  color: #fff;
  font-size: 0.94rem;
  line-height: 1.45;
  padding-top: 4px;
  cursor: pointer;
}

.terms-agreement-label a {
  color: rgba(255, 191, 120, 0.98);
  text-decoration: underline;
  margin-left: 0.28rem;
}

/* Terms consent — red glow when required (user tried to purchase without agreeing) */
#terms-consent-card.terms-required-glow {
  background: rgba(248, 113, 113, 0.2) !important;
  border: 2px solid rgba(248, 113, 113, 0.5) !important;
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.2) !important;
}

/* Promo Code Card — Green Accent Theme */
#promo-section.promo-code-card {
  border-radius: 18px;
  border: 1px solid rgba(74, 222, 128, 0.5);
  background: linear-gradient(
    135deg,
    rgba(74, 222, 128, 0.14) 0%,
    rgba(74, 222, 128, 0.07) 60%,
    transparent 100%
  );
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.18),
    0 0 24px rgba(74, 222, 128, 0.1);
}

#promo-section.promo-code-card .form-label {
  color: #fff;
}
#promo-section.promo-code-card .form-control,
#promo-section #promo-input {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
#promo-section #promo-input:focus {
  outline: none;
  border-color: rgba(74, 222, 128, 0.6);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}
#promo-section.promo-code-card .d-flex.gap-2 {
  gap: 0.75rem !important;
  margin-top: 0.5rem;
}

/* Promo Apply button — stronger visual prominence */
#promo-apply-btn.pill {
  min-width: 108px;
  font-weight: 600;
  border: 1px solid rgba(134, 239, 172, 0.62);
  background: linear-gradient(165deg, #63d786 0%, #4fc975 56%, #3fb566 100%);
  color: #102016;
  box-shadow:
    0 8px 18px rgba(34, 120, 72, 0.26),
    0 0 0 1px rgba(134, 239, 172, 0.22);
}

#promo-apply-btn.pill:hover:not(:disabled) {
  background: linear-gradient(165deg, #72de92 0%, #5ad07e 56%, #49bc6d 100%);
  color: #0f1d14;
  box-shadow:
    0 10px 20px rgba(34, 120, 72, 0.32),
    0 0 0 1px rgba(134, 239, 172, 0.28);
}

#promo-apply-btn.pill:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(74, 222, 128, 0.24),
    0 10px 20px rgba(34, 120, 72, 0.3);
}

#promo-apply-btn.pill:disabled {
  background: linear-gradient(165deg, #698173 0%, #5d7468 100%);
  color: rgba(16, 32, 22, 0.82);
  border-color: rgba(170, 198, 178, 0.28);
  box-shadow: none;
}

/* Bearer warning — high-visibility callout */
.bearer-warning-callout {
  margin-top: 2rem;
  padding: 1.5rem 1.5rem;
  background: rgba(143, 155, 170, 0.14);
  border: 1px solid rgba(143, 155, 170, 0.36);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 20px rgba(143, 155, 170, 0.14);
}

.bearer-warning-callout h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #c8d2df;
}

.bearer-warning-callout p {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

.bearer-warning-callout p:last-child {
  margin-bottom: 0;
}

/* Shared section/card typography */
.dr-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.dr-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.dr-muted {
  color: rgba(255, 255, 255, 0.62);
}

/* Subscription tier cards (Buy + Manage pages) */
.dr-tier-card {
  position: relative;
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)) border-box;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.dr-tier-card--blue {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15), 0 0 20px rgba(59, 130, 246, 0.08);
}
.dr-tier-card--purple {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.15), 0 0 20px rgba(139, 92, 246, 0.08);
}
.dr-tier-card--green {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15), 0 0 20px rgba(34, 197, 94, 0.08);
}
.dr-tier-card--gray {
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.1);
}
.dr-tier-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.dr-tier-badge--blue { background: rgba(59, 130, 246, 0.2); color: rgba(147, 197, 253, 0.95); }
.dr-tier-badge--purple { background: rgba(139, 92, 246, 0.2); color: rgba(196, 181, 253, 0.95); }
.dr-tier-badge--green { background: rgba(34, 197, 94, 0.2); color: rgba(134, 239, 172, 0.95); }
.dr-tier-badge--gray { background: rgba(148, 163, 184, 0.2); color: rgba(203, 213, 225, 0.95); }
.dr-tier-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.dr-tier-example {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}
.dr-tier-bullets {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}
.dr-tier-bullets li {
  margin-bottom: 0.25rem;
}

.dr-tier-lite {
  background:
    linear-gradient(160deg, rgba(60, 130, 246, 0.14) 0%, rgba(30, 58, 138, 0.08) 60%, rgba(38, 44, 53, 0.95) 100%) padding-box,
    linear-gradient(145deg, rgba(96, 165, 250, 0.78), rgba(59, 130, 246, 0.16)) border-box;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.22), 0 0 22px rgba(59, 130, 246, 0.13);
}

.dr-tier-social {
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.16) 0%, rgba(91, 33, 182, 0.08) 60%, rgba(38, 44, 53, 0.95) 100%) padding-box,
    linear-gradient(145deg, rgba(167, 139, 250, 0.82), rgba(139, 92, 246, 0.16)) border-box;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.22), 0 0 22px rgba(139, 92, 246, 0.14);
}

.dr-status-pill {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 88px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.85rem 0.9rem;
}

.dr-status-pill strong {
  color: var(--text);
  font-size: 0.98rem;
  word-break: break-word;
}

.accordion-button {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.accordion-button:not(.collapsed) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(104, 168, 227, 0.22);
}

.accordion-item {
  border-color: rgba(255, 255, 255, 0.08);
}

.accordion-body {
  background: rgba(255, 255, 255, 0.01);
}

/* Purchase success — code display */
.purchase-warnings {
  background: var(--warning-muted);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.purchase-warning-item {
  margin: 0 0 0.35rem;
  color: var(--warning);
  font-size: 0.85rem;
}

.purchase-warning-item:last-child {
  margin-bottom: 0;
}

.purchase-code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.purchase-code-pre {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  color: var(--text);
}

.tokens-issued-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.purchase-codes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.purchase-code-pill {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  word-break: break-all;
  color: var(--text);
}

.purchase-legal {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.purchase-legal-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.purchase-legal p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Redeem page visual refinements */
.redeem-page .redeem-deniability-card {
  border: 1px solid rgba(91, 155, 213, 0.35);
  background: linear-gradient(
    165deg,
    rgba(91, 155, 213, 0.14) 0%,
    rgba(91, 155, 213, 0.07) 45%,
    rgba(16, 26, 41, 0.35) 100%
  );
  box-shadow: 0 0 0 1px rgba(91, 155, 213, 0.12), 0 8px 28px rgba(91, 155, 213, 0.09);
}
.redeem-page .redeem-card-tokens {
  background: color-mix(in oklab, var(--surface) 88%, #1b222d 12%);
  border-color: rgba(255, 255, 255, 0.045);
}
.redeem-page .redeem-add-credits-btn {
  min-width: 180px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(160deg, #8fb9e0 0%, #79a8d5 55%, #6b9cca 100%);
  color: #101822;
  border: 1px solid rgba(173, 210, 242, 0.72);
  box-shadow: 0 6px 16px rgba(74, 126, 176, 0.34), 0 0 0 1px rgba(150, 197, 236, 0.2);
}
.redeem-page .redeem-add-credits-btn:hover:not(:disabled) {
  background: linear-gradient(160deg, #9bc3e8 0%, #86b2dc 55%, #77a6d2 100%);
  color: #0d1721;
  box-shadow: 0 8px 20px rgba(74, 126, 176, 0.4), 0 0 0 1px rgba(150, 197, 236, 0.3);
}
.redeem-page .redeem-add-credits-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(143, 186, 226, 0.34), 0 8px 20px rgba(74, 126, 176, 0.4);
}
.redeem-page .redeem-add-credits-btn:disabled {
  background: linear-gradient(160deg, #7f8b98 0%, #6f7b88 100%);
  color: rgba(16, 24, 34, 0.82);
  border-color: rgba(170, 184, 198, 0.3);
  box-shadow: none;
}
.redeem-page .container-wide {
  padding-top: 1.9rem;
  padding-bottom: 2.1rem;
}
.redeem-page .stepper {
  margin-bottom: 2.4rem;
}
.redeem-page .redeem-two-card-layout {
  gap: 2.4rem;
}
.redeem-page .redeem-deniability-content {
  margin-top: 0.65rem;
}
.redeem-page .redeem-deniability-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.7rem;
  color: var(--text);
}
.redeem-page .redeem-deniability-content ul {
  margin: 0 0 0.9rem;
  padding-left: 1.25rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.redeem-page .redeem-deniability-content .trust-panel-footer {
  font-size: 0.8rem;
  color: #c1d1e3;
  margin: 0;
  line-height: 1.5;
}
.redeem-page .redeem-deniability-buy {
  background: #6faee6;
  color: #17202c;
  border: 1px solid rgba(159, 207, 249, 0.72);
  box-shadow: 0 6px 16px rgba(91, 155, 213, 0.28);
}
.redeem-page .redeem-deniability-buy:hover {
  background: #80bced;
  color: #17202c;
  box-shadow: 0 8px 20px rgba(91, 155, 213, 0.34);
}

.redeem-page .redeem-import-success {
  background: linear-gradient(
    160deg,
    rgba(74, 222, 128, 0.24) 0%,
    rgba(74, 222, 128, 0.14) 44%,
    rgba(26, 48, 36, 0.82) 100%
  );
  border: 1px solid rgba(74, 222, 128, 0.34);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.1), 0 7px 18px rgba(34, 120, 72, 0.12);
}
.redeem-page .redeem-import-success-title {
  color: #d8fbe6;
  font-size: 1.04rem;
}
.redeem-page .redeem-import-success p {
  color: rgba(226, 247, 234, 0.9);
}
.redeem-page .redeem-import-success .pill-primary {
  background: #e8f6ee;
  color: #174227;
  border: 1px solid rgba(160, 224, 184, 0.75);
}
.redeem-page .redeem-import-success .pill-primary:hover {
  background: #f0faf4;
  color: #133a22;
  box-shadow: 0 6px 14px rgba(18, 58, 34, 0.22);
}
.redeem-page .redeem-import-success .pill-secondary {
  background: rgba(16, 29, 22, 0.5);
  border: 1px solid rgba(198, 235, 213, 0.28);
  color: #def4e8;
}
.redeem-page .redeem-import-success .pill-secondary:hover {
  background: rgba(16, 29, 22, 0.68);
  border-color: rgba(198, 235, 213, 0.38);
  color: #ecfaf2;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stepper-item.active {
  color: var(--accent);
  font-weight: 500;
}

.stepper-item.done {
  color: var(--success);
}

.stepper-link {
  color: inherit;
  text-decoration: none;
}

.stepper-link:hover {
  text-decoration: underline;
  color: var(--accent);
}

.stepper-sep {
  color: var(--border);
  font-size: 0.7rem;
}

/* Room tier options — entire card clickable, no radio circles */
.tier-options {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.tier-option {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.05rem;
  border: 1px solid color-mix(in oklab, var(--border-soft) 74%, white 26%);
  border-radius: calc(var(--radius) + 2px);
  cursor: pointer;
  background: rgba(13, 19, 31, 0.62);
  transition: border-color 0.24s, box-shadow 0.24s, background 0.24s, transform 0.24s;
  min-width: 0;
}
.tier-option:hover {
  border-color: rgba(104, 168, 227, 0.5);
  box-shadow: 0 0 0 1px rgba(104, 168, 227, 0.16), 0 0 18px rgba(104, 168, 227, 0.1);
  transform: translateY(-1px);
}
.tier-option:has(input:checked) {
  border-color: rgba(128, 186, 240, 0.62);
  background:
    linear-gradient(160deg, rgba(108, 178, 245, 0.18) 0%, rgba(73, 131, 201, 0.11) 48%, rgba(14, 25, 41, 0.58) 100%);
  box-shadow: 0 0 0 1px rgba(128, 186, 240, 0.28), 0 6px 16px rgba(70, 130, 197, 0.11);
  animation: tier-select-calm 220ms ease;
}
@keyframes tier-select-calm {
  0% { transform: scale(0.992); opacity: 0.93; }
  100% { transform: scale(1); opacity: 1; }
}
.tier-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.tier-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.tier-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.credits-display-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.credits-icon {
  font-size: 1.25rem;
}

.credits-value {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.backend-health-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.backend-health-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.backend-health-indicator.connected .backend-health-dot {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}
.backend-health-indicator.unreachable .backend-health-dot {
  background: #ef4444;
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast-item {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  animation: toast-in 0.2s ease;
}
.toast-item.success { border-color: rgba(34, 197, 94, 0.4); }
.toast-item.error { border-color: rgba(239, 68, 68, 0.4); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.rooms-private-details {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rooms-private-details summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.rooms-private-details .rooms-private-content {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.rooms-private-details .rooms-private-content ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Room Setup: two-column layout — main content (8 parts) + preview (4 parts), like checkout
   minmax(0, …) allows columns to shrink below content min-size (fixes overflow on smaller laptops) */
.room-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(3rem, 5vw, 4rem);
  align-items: start;
}
.room-setup-left-top {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow-wrap: break-word;
}
.room-preview-panel {
  grid-column: 2;
  grid-row: 1 / 3;
  position: sticky;
  top: 16px;
  min-width: 0;
}
.room-setup-left-bottom {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  overflow-wrap: break-word;
}
@media (max-width: 640px) {
  .room-setup-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .room-setup-left-top {
    grid-column: 1;
    grid-row: 1;
  }
  .room-preview-panel {
    grid-column: 1;
    grid-row: 2;
  }
  .room-setup-left-bottom {
    grid-column: 1;
    grid-row: 3;
  }
}

/* Setup cards (left column) */
.setup-card {
  padding: 2.2rem;
  border: 1px solid color-mix(in oklab, var(--border-soft) 88%, white 12%);
  border-radius: 20px;
  margin-bottom: clamp(3rem, 5vw, 4rem);
  background: color-mix(in oklab, var(--surface) 94%, #192434 6%);
  box-shadow: 0 8px 24px rgba(8, 14, 24, 0.12);
}
.step-panel {
  position: relative;
  overflow: hidden;
}
body.view-simple .step-panel-2,
body.view-simple .step-panel-3 {
  display: none !important;
}
.room-setup-left-top .setup-card,
.room-setup-left-bottom .setup-card {
  min-width: 0;
  overflow-wrap: break-word;
}
.setup-card:last-child {
  margin-bottom: 0;
}
.setup-card-title {
  font-size: 1rem;
  font-weight: 560;
  margin: 0 0 1rem 0;
  color: var(--text);
}
.stepCard {
  border-radius: var(--step-card-radius);
  padding: var(--step-card-padding);
  background: var(--step-card-fallback-bg);
  border: 1px solid var(--step-card-fallback-border);
  box-shadow: var(--step-card-fallback-shadow);
  position: relative;
  isolation: isolate;
}
.stepCard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(var(--step-accent-rgb, 255, 255, 255), 0.18) 0%, rgba(0, 0, 0, 0) 55%);
  opacity: 0.8;
  z-index: 0;
}
.stepCard > * {
  position: relative;
  z-index: 1;
}
.stepCard--blue {
  --step-accent-rgb: var(--step-blue-rgb);
  border: 1px solid rgba(var(--step-blue-rgb), 0.4);
  background: linear-gradient(
    160deg,
    rgba(var(--step-blue-rgb), 0.2) 0%,
    rgba(var(--step-blue-rgb), 0.12) 44%,
    rgba(14, 25, 41, 0.6) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--step-blue-rgb), 0.18), 0 10px 28px rgba(var(--step-blue-rgb), 0.12);
}
.stepCard--orange {
  --step-accent-rgb: var(--step-orange-rgb);
  border: 1px solid rgba(var(--step-orange-rgb), 0.45);
  background: linear-gradient(
    135deg,
    rgba(var(--step-orange-rgb), 0.08) 0%,
    rgba(var(--step-orange-rgb), 0.03) 60%,
    transparent 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--step-orange-rgb), 0.15), 0 0 24px rgba(var(--step-orange-rgb), 0.08);
}
/* Ceremony card: first-class (non-collapsible, prominent) on page 2 */
.ceremony-card-prominent {
  border-width: 2px !important;
  border-color: rgba(var(--step-orange-rgb), 0.6) !important;
  box-shadow: 0 0 0 2px rgba(var(--step-orange-rgb), 0.2), 0 4px 24px rgba(var(--step-orange-rgb), 0.12) !important;
}
.ceremony-card-prominent .setup-step-title {
  color: rgba(var(--step-orange-rgb), 1);
}

/* Offline ceremony package CTA */
.btn-offline-commit {
  border: 2px solid rgba(var(--step-orange-rgb), 0.5) !important;
  color: rgba(var(--step-orange-rgb), 1) !important;
}
.btn-offline-commit:hover {
  background: rgba(var(--step-orange-rgb), 0.1) !important;
}

.stepCard--purple {
  --step-accent-rgb: var(--step-purple-rgb);
  border: 1px solid rgba(var(--step-purple-rgb), 0.4);
  background: linear-gradient(
    160deg,
    rgba(var(--step-purple-rgb), 0.2) 0%,
    rgba(var(--step-purple-rgb), 0.12) 44%,
    rgba(14, 25, 41, 0.6) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--step-purple-rgb), 0.18), 0 10px 28px rgba(var(--step-purple-rgb), 0.12);
}
.stepCard--cyan {
  --step-accent-rgb: var(--step-cyan-rgb);
  border: 1px solid rgba(var(--step-cyan-rgb), 0.42);
  background: linear-gradient(
    160deg,
    rgba(var(--step-cyan-rgb), 0.18) 0%,
    rgba(var(--step-cyan-rgb), 0.1) 44%,
    rgba(14, 25, 41, 0.6) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--step-cyan-rgb), 0.18), 0 10px 28px rgba(var(--step-cyan-rgb), 0.12);
}
.stepCard--green {
  --step-accent-rgb: var(--step-green-rgb);
  border: 1px solid rgba(var(--step-green-rgb), 0.4);
  background: linear-gradient(
    160deg,
    rgba(var(--step-green-rgb), 0.18) 0%,
    rgba(var(--step-green-rgb), 0.1) 44%,
    rgba(14, 25, 41, 0.6) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--step-green-rgb), 0.18), 0 10px 28px rgba(var(--step-green-rgb), 0.12);
}
.step-header,
.stepHeader {
  position: relative;
  margin-bottom: 1.85rem;
  padding-left: 0;
}
.stepTitleWrap {
  position: relative;
  z-index: 1;
}
.stepLabel {
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(182, 201, 224, 0.72);
}
.step-number,
.stepNumber {
  display: none !important;
}
.setup-step-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.42rem, 2.2vw, 1.58rem);
  font-weight: 600;
  margin: 0;
  color: rgba(236, 243, 250, 0.95);
  letter-spacing: -0.01em;
}
.setup-step-title-optional {
  font-size: clamp(1.4rem, 2.05vw, 1.54rem);
  font-weight: 600;
  color: rgba(226, 236, 247, 0.93);
}
.setup-card-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.55rem 0 0 0;
  line-height: 1.5;
}
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 28px;
  line-height: 1;
  margin-right: 0;
  opacity: 0.78;
}
.icon-step-2 {
  font-variation-settings: 'FILL' 0, 'wght' 400;
  font-size: 28px;
  color: rgba(255, 170, 70, 0.95);
  text-shadow: 0 0 8px rgba(255, 149, 0, 0.4), 0 0 18px rgba(255, 149, 0, 0.2);
}
.mode-toggle-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem 1.35rem;
  border-radius: calc(var(--radius-lg) + 2px);
}
.room-setup-heading {
  font-size: 2.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.room-setup-subheading {
  font-size: 1.02rem;
  color: #c9d7e8;
  margin-bottom: 1.35rem;
}
.setup-section-heading {
  font-size: 1.45rem;
  font-weight: 650;
  margin: 0 0 0.55rem 0;
  letter-spacing: -0.01em;
}
.setup-section-subtext {
  margin: 0.95rem 0 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.selection-panel {
  border: 1px solid color-mix(in oklab, var(--border-soft) 76%, white 24%);
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 1.1rem;
  background: rgba(13, 19, 31, 0.26);
}
.guarantees-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.guarantees-list li {
  font-size: 0.89rem;
  color: var(--text);
  line-height: 1.5;
  position: relative;
  padding-left: 1.2rem;
}
.guarantees-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: color-mix(in oklab, var(--accent) 76%, white 24%);
}
.reassurance-line {
  font-size: 0.9rem;
  color: color-mix(in oklab, var(--text) 88%, white 12%);
  line-height: 1.55;
}
.section-optional .advanced-section-caption,
.section-optional .setup-card-hint {
  color: color-mix(in oklab, var(--text-muted) 90%, #a4b7cb 10%);
}
.advanced-section-details {
  margin: -0.2rem 0 0 0;
}
.advanced-section-summary {
  display: grid;
  gap: 0.7rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 0;
}
.advanced-section-summary::-webkit-details-marker {
  display: none;
}
.advanced-section-caption {
  font-size: 0.83rem;
  color: var(--text-muted);
  padding-left: 0;
}
.advanced-section-body {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid color-mix(in oklab, var(--border-soft) 85%, white 15%);
}
.mode-toggle-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}
.mode-toggle-header .room-setup-card-heading {
  font-size: clamp(1.42rem, 2.2vw, 1.58rem);
  font-weight: 600;
  margin: 0;
}
.room-setup-card-heading {
  font-size: clamp(1.42rem, 2.2vw, 1.58rem);
  font-weight: 600;
  color: rgba(236, 243, 250, 0.95);
  letter-spacing: -0.01em;
  margin: 0;
}
.mode-toggle-buttons {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.mode-btn {
  min-width: 100px;
}
.mode-btn.is-active {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 18px rgba(104, 168, 227, 0.2);
}
.advanced-only {
  display: none;
}
.room-setup-grid.mode-advanced .advanced-only {
  display: block;
}
.room-setup-grid.mode-advanced p.advanced-only {
  display: block;
}
.room-setup-left-top .setup-card:last-child,
.room-setup-left-bottom .setup-card:last-child {
  margin-bottom: 0;
}

.room-name-hint {
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.9;
  line-height: 1.45;
  margin: 0;
}

/* ─── Hide FAB on create-room page (user is already here) ─── */
body.room-setup-page .mobile-quick-actions {
  display: none !important;
}

/* ─── Mobile layout fixes for create-room step navigation ─── */
@media (max-width: 768px) {
  body.room-setup-page .room-setup-heading {
    font-size: 1.5rem;
  }
  body.room-setup-page .room-setup-subheading {
    font-size: 0.92rem;
  }
  /* Step nav (Back / Continue) — fixed bottom bar on mobile */
  body.room-setup-page #step-setup > .d-flex.justify-content-between,
  body.room-setup-page #step-ceremony > .d-flex.flex-wrap {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: var(--bg);
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
  }
  /* Full-width buttons on mobile */
  body.room-setup-page #step-setup > .d-flex.justify-content-between {
    flex-direction: row;
    gap: 0.75rem;
  }
  body.room-setup-page #step-setup > .d-flex.justify-content-between .pill {
    flex: 1;
    text-align: center;
    min-height: 3rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* Ensure pill buttons have good touch targets */
  body.room-setup-page .pill {
    min-height: 2.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* Prevent any absolute/fixed element from covering Continue */
  body.room-setup-page #step-setup {
    padding-bottom: 4.5rem;
  }
}

/* Room Preview panel (checkout-style right column) */
.room-preview-panel {
  padding: clamp(1.75rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--step-card-radius);
  background: rgba(255, 255, 255, 0.015);
  box-shadow: 0 10px 34px rgba(8, 14, 24, 0.16);
  transition: border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, transform 0.28s ease;
}
.room-preview-panel-tier-standard {
  border-color: rgba(104, 168, 227, 0.21);
  background: linear-gradient(180deg, rgba(91, 155, 213, 0.05) 0%, rgba(91, 155, 213, 0.015) 100%);
  box-shadow: 0 8px 26px rgba(8, 14, 24, 0.14);
}
.room-preview-panel-tier-shielded {
  border-color: rgba(74, 222, 128, 0.2);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.05) 0%, rgba(74, 222, 128, 0.015) 100%);
  box-shadow: 0 8px 26px rgba(8, 14, 24, 0.14);
}
.room-preview-panel-tier-veiled {
  border-color: rgba(251, 191, 36, 0.2);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.05) 0%, rgba(251, 191, 36, 0.015) 100%);
  box-shadow: 0 8px 26px rgba(8, 14, 24, 0.14);
}
.room-preview-panel.tier-transitioning {
  animation: tier-soft-shift 0.34s ease;
}
@keyframes tier-soft-shift {
  0% { transform: translateY(2px); opacity: 0.92; }
  100% { transform: translateY(0); opacity: 1; }
}
.room-preview-title {
  font-size: 1.12rem;
  font-weight: 520;
  margin: 0 0 1.3rem 0;
  color: color-mix(in oklab, var(--text) 88%, #c2d3e8 12%);
}
.create-action-card {
  padding-top: 2rem;
}
.final-step-card {
  border: 1px solid rgba(var(--step-cyan-rgb), 0.42);
  background: linear-gradient(
    160deg,
    rgba(var(--step-cyan-rgb), 0.2) 0%,
    rgba(var(--step-cyan-rgb), 0.1) 44%,
    rgba(14, 25, 41, 0.6) 100%
  );
  box-shadow: 0 0 0 1px var(--final-accent-bg), 0 10px 28px rgba(var(--step-cyan-rgb), 0.16);
}
.final-step-card.create-action-card {
  padding-top: var(--step-card-padding);
}
.final-step-header {
  margin-bottom: 1.5rem;
}
.final-step-card .final-step-title {
  font-size: clamp(1.42rem, 2.2vw, 1.58rem);
  font-weight: 600;
}
.icon-final-step {
  font-variation-settings: 'FILL' 0, 'wght' 400;
  color: rgba(126, 232, 216, 0.96);
  text-shadow: 0 0 9px rgba(20, 184, 166, 0.38), 0 0 20px rgba(20, 184, 166, 0.22);
}
.final-step-subtitle {
  margin-top: 0.9rem;
}
.final-action-label {
  margin: 0 0 0.65rem 0;
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--text-muted) 88%, #b8cbdf 12%);
}
.final-step-terms-group {
  margin-bottom: 1rem;
}
.final-terms-check {
  align-items: flex-start;
  min-height: 40px;
  padding: 0.45rem 0.25rem 0.35rem;
  gap: 0.85rem;
}
.final-terms-checkbox {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  margin-top: 2px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(148, 163, 184, 0.85);
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.final-terms-checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}
.final-terms-checkbox:checked {
  border-color: rgba(45, 212, 191, 0.9);
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.98) 0%, rgba(20, 184, 166, 0.95) 100%);
}
.final-terms-checkbox:checked::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M11.8 3.2a.75.75 0 0 1 0 1.06L6.3 9.8a.75.75 0 0 1-1.06 0L2.2 6.76a.75.75 0 1 1 1.06-1.06l2.52 2.52 4.96-4.96a.75.75 0 0 1 1.06 0z' fill='%230b2530'/%3E%3C/svg%3E");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.final-terms-label {
  display: block;
  color: #d7e4ee;
  font-size: 0.94rem;
  line-height: 1.45;
  padding-top: 4px;
  cursor: pointer;
}
.final-terms-label a {
  color: color-mix(in oklab, var(--accent) 72%, #7dd3fc 28%);
  text-decoration: underline;
  margin-left: 0.28rem;
}
.final-step-cta {
  width: 100%;
  min-height: 46px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  border: 1px solid rgba(206, 241, 223, 0.95);
  background: linear-gradient(160deg, #f5fff9 0%, #e9f9f1 55%, #dcf3e6 100%);
  color: #0f2f1f;
  box-shadow: 0 10px 22px rgba(32, 92, 62, 0.24), 0 0 0 1px rgba(191, 236, 211, 0.28);
}
.final-step-cta:hover:not(:disabled) {
  background: linear-gradient(160deg, #fbfffd 0%, #effcf6 55%, #e3f7eb 100%);
  color: #0d281b;
  box-shadow: 0 12px 24px rgba(32, 92, 62, 0.3), 0 0 0 1px rgba(191, 236, 211, 0.34);
}
.final-step-cta:disabled,
.final-step-cta[disabled] {
  opacity: 0.86;
  border: 1px solid rgba(177, 206, 191, 0.54);
  background: linear-gradient(160deg, #cde2d6 0%, #bad4c6 55%, #a9c5b5 100%);
  color: rgba(12, 35, 24, 0.72);
  box-shadow: 0 6px 16px rgba(24, 66, 44, 0.18), 0 0 0 1px rgba(166, 224, 192, 0.14);
  cursor: not-allowed;
}
.notification-error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2rem 0 0 0;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 99, 99, 0.4);
  background: rgba(255, 99, 99, 0.06);
  color: rgba(255, 196, 196, 0.96);
  font-size: 0.88rem;
  line-height: 1.4;
}
.notification-error .icon {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  margin-left: 2px;
  color: rgba(255, 99, 99, 0.9);
  font-variation-settings: 'FILL' 0, 'wght' 400;
}
.notification-error .notification-error-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.room-preview-section {
  padding-top: 1.1rem;
  margin-top: 1.1rem;
  border-top: 1px solid var(--border);
}
.room-preview-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}
.room-preview-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: color-mix(in oklab, var(--text-muted) 90%, #afc2d9 10%);
  margin: 0 0 0.55rem 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.room-preview-text {
  font-size: 0.92rem;
  color: var(--text);
  margin: 0;
  line-height: 1.55;
}
.room-preview-list {
  margin: 0.2rem 0 0 0;
  padding-left: 1rem;
  font-size: 0.88rem;
  color: color-mix(in oklab, var(--text) 90%, #b5c7db 10%);
  line-height: 1.65;
}
.room-preview-list-check {
  list-style: none;
  padding-left: 0;
  margin-top: 0.1rem;
}
.room-preview-list-check li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.35rem;
}
.room-preview-list-check li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: color-mix(in oklab, var(--accent) 66%, white 34%);
  font-weight: 500;
  opacity: 0.82;
}
.room-preview-tier-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0 0;
  font-style: italic;
}
.room-preview-transport-line {
  font-size: 0.9rem;
  color: var(--text);
}
.room-preview-transport-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.tier-options {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.tier-option {
  border: 1px solid color-mix(in oklab, var(--border-soft) 78%, white 22%);
  background: rgba(13, 19, 31, 0.52);
}
.tier-option:hover {
  border-color: rgba(104, 168, 227, 0.42);
  box-shadow: 0 0 0 1px rgba(104, 168, 227, 0.14), 0 0 14px rgba(104, 168, 227, 0.08);
}
.tier-option:has(input:checked) {
  border-color: rgba(128, 186, 240, 0.52);
  box-shadow: 0 0 0 1px rgba(128, 186, 240, 0.22), 0 5px 14px rgba(70, 130, 197, 0.1);
}
@media (max-width: 640px) {
  .stepCard {
    padding: var(--step-card-padding-mobile);
  }
  .step-header,
  .stepHeader {
    margin-bottom: 1.4rem;
    padding-left: 0;
  }
  .stepLabel {
    font-size: 0.7rem;
  }
  .setup-step-title {
    font-size: clamp(1.28rem, 5.5vw, 1.48rem);
  }
  .room-rules-card-title,
  .room-setup-card-heading {
    font-size: clamp(1.28rem, 5.5vw, 1.48rem);
  }
  .setup-step-title-optional {
    font-size: clamp(1.22rem, 5.1vw, 1.4rem);
  }
  .advanced-section-caption {
    padding-left: 0;
  }
  .room-preview-panel {
    padding: 1.75rem;
  }
}
.room-preview-tor-warning {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding: 0.55rem 0.7rem;
  background: color-mix(in oklab, var(--surface) 92%, #0f2238 8%);
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid color-mix(in oklab, var(--border-soft) 82%, white 18%);
}
.room-preview-link {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.5rem;
  display: inline-block;
}
.room-preview-accordion {
  font-size: 0.9rem;
}
.room-preview-accordion summary {
  cursor: pointer;
  color: var(--text-muted);
}
.room-preview-accordion ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Transport status (server-wide, read-only) */
.transport-status-display {
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.transport-mode-badge {
  font-weight: 600;
  margin-right: 0.5rem;
}
.transport-mode-direct { color: var(--text); }
.transport-mode-tor { color: var(--accent); }
.transport-mode-mixnet { color: var(--accent); }
.maximum-privacy-callout {
  padding: 0.55rem 0.78rem;
  background: color-mix(in oklab, var(--surface) 92%, #10253e 8%);
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid color-mix(in oklab, var(--border-soft) 82%, white 18%);
  color: var(--text-muted);
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}

/* Privacy readiness checklist */
.privacy-checklist-details {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.privacy-checklist-details summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.privacy-checklist-list {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Cards */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.7rem;
  box-shadow: 0 6px 16px rgba(6, 10, 18, 0.11);
}

/* Blue-themed surface card — same gradient tone as Privacy Level (stepCard--blue) */
.surface-card--blue {
  --step-blue-rgb: 59, 130, 246;
  border: 1px solid rgba(var(--step-blue-rgb), 0.4) !important;
  background: linear-gradient(
    160deg,
    rgba(var(--step-blue-rgb), 0.2) 0%,
    rgba(var(--step-blue-rgb), 0.12) 44%,
    rgba(14, 25, 41, 0.6) 100%
  ) !important;
  box-shadow: 0 0 0 1px rgba(var(--step-blue-rgb), 0.18), 0 10px 28px rgba(var(--step-blue-rgb), 0.12) !important;
}
.surface-card--blue .pill-primary {
  background: rgba(59, 130, 246, 0.75);
  color: #fff;
  border: 1px solid rgba(59, 130, 246, 0.5);
}
.surface-card--blue .pill-primary:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.9);
}

/* Room Rules card (minted / pre-entry screen) — same gradient tone as Privacy Level (stepCard--blue) */
.room-rules-card {
  --step-blue-rgb: 59, 130, 246;
  border: 1px solid rgba(var(--step-blue-rgb), 0.4);
  background: linear-gradient(
    160deg,
    rgba(var(--step-blue-rgb), 0.2) 0%,
    rgba(var(--step-blue-rgb), 0.12) 44%,
    rgba(14, 25, 41, 0.6) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--step-blue-rgb), 0.18), 0 10px 28px rgba(var(--step-blue-rgb), 0.12);
  border-radius: var(--radius-lg);
}
.room-rules-card-title {
  font-size: clamp(1.42rem, 2.2vw, 1.58rem);
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: rgba(236, 243, 250, 0.95);
  letter-spacing: -0.01em;
}
.room-rules-details {
  display: block;
}
.room-rules-summary {
  cursor: pointer;
  list-style: none;
  padding: 0;
  margin: 0;
}
.room-rules-summary::-webkit-details-marker {
  display: none;
}
.room-rules-details[open] .room-rules-summary {
  margin-bottom: 1rem;
}

/* Room Minted card (minted / pre-entry screen) — green gradient + border glow, light green Enter Room */
.room-minted-card {
  --minted-green-rgb: 34, 197, 94;
  border: 1px solid rgba(var(--minted-green-rgb), 0.4);
  background: linear-gradient(
    160deg,
    rgba(var(--minted-green-rgb), 0.2) 0%,
    rgba(var(--minted-green-rgb), 0.12) 44%,
    rgba(14, 25, 41, 0.6) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--minted-green-rgb), 0.18), 0 10px 28px rgba(var(--minted-green-rgb), 0.12);
  border-radius: var(--radius-lg);
}
.room-minted-card-title {
  color: rgba(134, 239, 172, 0.95);
}
.room-minted-card #btn-enter-room.pill-primary {
  background: #bbf7d0;
  color: #14532d;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.room-minted-card #btn-enter-room.pill-primary:hover {
  background: #dcfce7;
  color: #14532d;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}
.room-minted-card #display-effective-routing,
.room-minted-card #display-second-lock-status {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 500;
}

.room-rules-card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  line-height: 1.4;
}
.room-rules-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.room-rules-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  align-items: flex-start;
}
.room-rules-item:last-child {
  margin-bottom: 0;
}
.room-rules-icon {
  flex-shrink: 0;
  font-size: 1.35rem;
  color: var(--accent);
  margin-top: 0.15rem;
  filter: drop-shadow(0 0 6px var(--accent-glow)) drop-shadow(0 0 12px rgba(104, 168, 227, 0.35));
}
.room-rules-content {
  min-width: 0;
}
.room-rules-heading {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: var(--text);
}
.room-rules-body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}
.room-rules-confirm-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}
.room-rules-confirm-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}
.room-rules-confirm-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}
.room-rules-confirm-hint {
  font-size: 0.85rem;
  margin: 0.4rem 0 0 0;
}

@media (max-width: 576px) {
  .room-rules-item {
    gap: 0.6rem;
    margin-bottom: 1rem;
  }
  .room-rules-icon {
    font-size: 1.2rem;
  }
  .room-rules-heading {
    font-size: 0.9rem;
  }
  .room-rules-body {
    font-size: 0.8125rem;
  }
}

/* Secret create page — two-column layout, form card, info cards */
.secret-create-main.container-wide {
  padding-top: 1.9rem;
  padding-bottom: 2.1rem;
}
.secret-two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
  align-items: start;
}
@media (max-width: 991px) {
  .secret-two-column-layout {
    grid-template-columns: 1fr;
  }
}
.secret-primary-col {
  min-width: 0;
}
.secret-secondary-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Form card — same visual language as Create Room / Redeem */
.secret-form-card {
  --secret-rgb: 154, 122, 248;
  border: 1px solid rgba(var(--secret-rgb), 0.4);
  background: linear-gradient(
    165deg,
    rgba(var(--secret-rgb), 0.14) 0%,
    rgba(var(--secret-rgb), 0.07) 45%,
    rgba(16, 26, 41, 0.35) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--secret-rgb), 0.18), 0 8px 28px rgba(var(--secret-rgb), 0.12);
  padding: 1.5rem 1.6rem;
}
.secret-form-card-title {
  font-size: clamp(1.28rem, 2vw, 1.42rem);
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text);
  letter-spacing: -0.01em;
}
.secret-form-card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  line-height: 1.4;
}
.secret-form-error {
  color: var(--danger);
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  background: var(--danger-muted);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius);
}
/* Override .pill-primary so our light purple wins */
.secret-page .secret-form-card .secret-cta-btn.pill-primary {
  min-width: 180px;
  font-weight: 600;
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}
.secret-page .secret-form-card .secret-cta-btn.pill-primary:hover:not(:disabled) {
  background: #e0d4ff;
  color: #4c1d95;
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.28);
}
.secret-page .secret-form-card .secret-cta-btn.pill-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.4);
}
.secret-page .secret-form-card .secret-cta-btn.pill-primary:disabled {
  background: rgba(237, 233, 254, 0.7);
  color: rgba(91, 33, 182, 0.65);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: none;
}
@media (max-width: 991px) {
  .secret-form-card .secret-cta-btn {
    width: 100%;
  }
}

/* Single-view by design card */
.secret-single-view-card {
  --secret-rgb: 154, 122, 248;
  border: 1px solid rgba(var(--secret-rgb), 0.35);
  background: linear-gradient(
    165deg,
    rgba(var(--secret-rgb), 0.12) 0%,
    rgba(var(--secret-rgb), 0.06) 45%,
    rgba(14, 25, 41, 0.5) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--secret-rgb), 0.15), 0 8px 24px rgba(var(--secret-rgb), 0.08);
  padding: 1.25rem 1.4rem;
}
.secret-info-card-title {
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
  letter-spacing: -0.01em;
}
.secret-single-view-body {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 1rem 0;
}
.secret-at-a-glance {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.secret-at-a-glance li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.secret-check-icon {
  font-size: 1rem;
  color: var(--success);
  flex-shrink: 0;
}

/* Rules for sharing card — Room Rules vibe, more compact */
.secret-rules-card {
  --step-blue-rgb: 59, 130, 246;
  border: 1px solid rgba(var(--step-blue-rgb), 0.4);
  background: linear-gradient(
    160deg,
    rgba(var(--step-blue-rgb), 0.2) 0%,
    rgba(var(--step-blue-rgb), 0.12) 44%,
    rgba(14, 25, 41, 0.6) 100%
  );
  box-shadow: 0 0 0 1px rgba(var(--step-blue-rgb), 0.18), 0 10px 28px rgba(var(--step-blue-rgb), 0.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}
.secret-rules-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
  line-height: 1.4;
}
.secret-rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.secret-rules-item {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  align-items: flex-start;
}
.secret-rules-item:last-child {
  margin-bottom: 0;
}
.secret-rules-icon {
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--accent);
  margin-top: 0.1rem;
}
.secret-rules-content {
  min-width: 0;
}
.secret-rules-heading {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 0.2rem 0;
  color: var(--text);
}
.secret-rules-body {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Credits and deniability card */
.secret-deniability-card {
  border: 1px solid var(--border-soft);
  background: color-mix(in oklab, var(--surface) 92%, #1b222d 8%);
  padding: 1.25rem 1.4rem;
}
.secret-deniability-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Secret page terms checkbox — same size as Create Room, purple accent */
.secret-page .secret-form-card .secret-terms-checkbox.final-terms-checkbox {
  border-color: rgba(154, 122, 248, 0.6);
  background: var(--surface-elevated);
}
.secret-page .secret-form-card .secret-terms-checkbox.final-terms-checkbox:checked {
  border-color: rgba(154, 122, 248, 0.9);
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.95) 0%, rgba(154, 122, 248, 0.9) 100%);
}
.secret-page .secret-form-card .secret-terms-checkbox.final-terms-checkbox:focus-visible {
  box-shadow: 0 0 0 3px rgba(154, 122, 248, 0.35);
}
.secret-page .secret-form-card .final-terms-label a {
  color: var(--accent);
  text-decoration: underline;
}

/* Alert cards (no-token, store-unreachable) */
.secret-alert-card {
  margin-bottom: 1rem;
}

.pill.pill-disabled,
a.pill.pill-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.soft-border {
  border: 1px solid var(--border);
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1rem 1.25rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

/* Hero two-column cards */
.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto 1.25rem;
  text-align: left;
}

@media (max-width: 767px) {
  .hero-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.hero-card {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: rgba(91, 155, 213, 0.12);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.hero-card-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.hero-card-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-card-list li {
  margin-bottom: 0.25rem;
}

.hero-card-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-card-body p {
  margin: 0 0 0.75rem;
}

.hero-card-body p:last-child {
  margin-bottom: 0;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Product cards section divider */
.product-cards-divider {
  text-align: center;
  padding: 1rem 1rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.product-cards-divider h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.product-cards-divider .subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Purpose label on product cards */
.product-purpose-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

/* This is not for — honesty section */
.not-for-section {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.not-for-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.not-for-list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.not-for-closing {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* Get tokens — marketing section below product cards */
.get-tokens-section {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.get-tokens-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.get-tokens-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  max-width: 480px;
}

.get-tokens-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.get-tokens-link {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.get-tokens-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* Use cases — safe, legitimate examples */
.use-cases-section {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.use-cases-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.use-cases-list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.use-cases-note {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin: 0;
  line-height: 1.5;
}

/* Why Deniable — foundational section (not a product card) */
.why-deniable-section {
  margin-top: 3rem;
  padding: 2.5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
}

.why-deniable-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  color: var(--text);
}

.principle-block {
  margin-bottom: 1.25rem;
}

.principle-block:last-of-type {
  margin-bottom: 1.5rem;
}

.principle-block h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.principle-block p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.why-deniable-footer {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Proof point callout — standout takeaway */
.proof-point-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface-elevated);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.proof-point-callout .proof-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
}

.proof-point-callout .proof-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  line-height: 1.45;
}

/* Buttons — ensure clickable, above overlays */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.pill:hover {
  transform: translateY(-1px);
}

.pill-primary {
  background: var(--accent);
  color: var(--bg);
}

.pill-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.pill-secondary {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.pill-secondary:hover {
  background: var(--surface-hover);
}

.pill:disabled,
.pill[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pill:disabled:hover,
.pill[disabled]:hover {
  transform: none;
  box-shadow: none;
}

/* Form elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-input::placeholder {
  color: var(--text-subtle);
}

.form-input.mono {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-check input {
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.form-check label {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.second-lock-check {
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 40px;
}

.second-lock-check input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  margin-top: 2px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 176, 94, 0.9);
  background: rgba(32, 24, 14, 0.78);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.second-lock-check input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.22);
}

.second-lock-check input[type="checkbox"]:checked {
  border-color: rgba(255, 167, 77, 0.98);
  background: linear-gradient(165deg, rgba(255, 182, 112, 0.98) 0%, rgba(255, 149, 0, 0.95) 100%);
}

.second-lock-check input[type="checkbox"]:checked::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M11.8 3.2a.75.75 0 0 1 0 1.06L6.3 9.8a.75.75 0 0 1-1.06 0L2.2 6.76a.75.75 0 1 1 1.06-1.06l2.52 2.52 4.96-4.96a.75.75 0 0 1 1.06 0z' fill='%23301d0a'/%3E%3C/svg%3E");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.second-lock-check label {
  color: #e9d8c2;
  font-size: 0.95rem;
  line-height: 1.45;
  padding-top: 3px;
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Product cards (homepage) — 2 equal columns on desktop */
.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 0 0 2rem;
  align-items: stretch;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-card-rooms {
  background: linear-gradient(165deg, rgba(139, 92, 246, 0.12) 0%, #2a2535 50%, #23272f 100%);
}

.product-card-secret {
  background: linear-gradient(165deg, rgba(74, 222, 128, 0.1) 0%, #252f35 50%, #23272f 100%);
}

.product-card .capability-strip {
  flex: 1;
}

.product-card:hover {
  border-color: var(--border-soft);
  box-shadow: var(--shadow);
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.product-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.capability-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.capability-strip li {
  padding-left: 1.25rem;
  position: relative;
}

.capability-strip li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.principle-tiles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.principle-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.principle-tile-title {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* Principle cards (legacy) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.principle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.principle-card:hover {
  border-color: var(--border-soft);
  box-shadow: var(--shadow);
}

.principle-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.principle-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* How it works */
.steps-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
  padding: 2rem 1rem;
  margin: 2rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.step-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Safety callout */
.safety-callout {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.safety-callout a {
  color: var(--accent);
  text-decoration: none;
}

.safety-callout a:hover {
  text-decoration: underline;
}

/* Success panel */
.success-panel {
  background: var(--success-muted);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.45);
  margin-right: 0.35rem;
}
.secret-success-fade {
  animation: secret-fade-in 0.45s ease;
}
.redeem-success-pop {
  animation: redeem-success-pop 0.42s ease;
}
@keyframes secret-fade-in {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes redeem-success-pop {
  0% { opacity: 0; transform: scale(0.985); }
  65% { opacity: 1; transform: scale(1.01); }
  100% { opacity: 1; transform: scale(1); }
}

.success-panel h3 {
  color: var(--success);
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.success-panel p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

/* Copy block */
.copy-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.copy-block .value {
  flex: 1;
  color: var(--text-muted);
}

.copy-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Chat shell — ensure high contrast (fix blank/faint room page) */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100dvh;
  background: var(--bg-gradient);
  color: #e8eaed;
  color: var(--text);
  color-scheme: dark;
}

/* Force visible text on chat page — override any Bootstrap/fallback that reduces contrast */
.chat-shell .chat-header-title,
.chat-shell .chat-messages,
.chat-shell .chat-composer,
.chat-shell .chat-input,
.chat-shell .msg-bubble,
.chat-shell .msg-system {
  color: #e8eaed !important;
}
.chat-shell .chat-header-subtitle,
.chat-shell .presence-label,
.chat-shell .stepper-item,
.chat-shell .deniability-banner {
  color: #9ca3af !important;
}
.chat-shell .stepper-item.active {
  color: #5b9bd5 !important;
}
.chat-shell .stepper-item.done {
  color: #4ade80 !important;
}
.chat-shell .pill-secondary {
  color: #e8eaed !important;
}
.chat-shell .chat-input::placeholder {
  color: #6b7280 !important;
}
.chat-shell .drawer,
.chat-shell .drawer-title,
.chat-shell .drawer-section h4,
.chat-shell .drawer-section ul,
.chat-shell .drawer-body {
  color: #e8eaed !important;
}
.chat-shell .drawer-section h4 {
  color: #9ca3af !important;
}
.chat-shell .left-trust-panel .trust-label,
.chat-shell .left-trust-panel .trust-value {
  color: #2d9d6e !important;
}

.chat-shell .stepper {
  flex-shrink: 0;
}

/* Room chat: 3-region layout — header, messages, composer. Composer pinned to bottom. */
.chat-shell {
  --banner-h: 0;
  --kb: 0px;
  --composer-h: 72px;
}
/* When on room chat page, shell fills viewport so composer always sticks to bottom (even with no messages) */
html.room-chat-page {
  height: 100%;
  min-height: 100dvh;
  min-height: 100vh;
}
html.room-chat-page body.chat-shell {
  height: 100%;
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
html.room-chat-page body.chat-shell .chat-main.room-chat {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-main.room-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.chat-main.room-chat .room-chat__header,
.chat-main.room-chat .chat-header {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 10;
}
.chat-main.room-chat .room-chat__notice-slot {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}
.chat-main.room-chat .room-chat__messages,
.chat-main.room-chat .chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--composer-h, 72px) + env(safe-area-inset-bottom));
}
.chat-main.room-chat .room-chat__composer,
.chat-main.room-chat .chat-composer {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
}

/* Banner inside room-chat notice-slot: own row below header, no overlap with header content */
.chat-main.room-chat .room-chat__notice-slot {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.1));
}
.chat-main.room-chat .room-deniability-banner {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
  font-size: 0.8rem;
  background: var(--accent-muted);
  border-bottom: 1px solid rgba(91, 155, 213, 0.2);
}

/* Scroll lock on chat route so only message list scrolls (iOS) */
html.chat-scroll-lock,
body.chat-scroll-lock {
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: manipulation;
}

/* Mobile only: when keyboard is open, lock chat to visual viewport so header stays top, composer stays above keyboard, only messages scroll */
@media (max-width: 768px) {
  .chat-main.room-chat.keyboard-open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--vv-height, 100dvh) !important;
    max-height: var(--vv-height, 100dvh) !important;
    z-index: 10;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    background: var(--surface, #1a1d24);
  }
  .chat-main.room-chat.keyboard-open .room-chat__header,
  .chat-main.room-chat.keyboard-open .chat-header {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }
  .chat-main.room-chat.keyboard-open .room-chat__notice-slot {
    flex-shrink: 0;
  }
  .chat-main.room-chat.keyboard-open .room-chat__messages,
  .chat-main.room-chat.keyboard-open .chat-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--composer-h, 72px) + env(safe-area-inset-bottom)) !important;
  }
  .chat-main.room-chat.keyboard-open .room-chat__composer,
  .chat-main.room-chat.keyboard-open .chat-composer {
    flex-shrink: 0 !important;
    position: relative;
    transform: none;
    will-change: auto;
  }
}

.chat-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-unit) 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: var(--spacing-unit);
  flex-wrap: wrap;
}

/* Room header: stacked rows, full-width rows for clean wrap */
.chat-header-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
  flex-basis: 100%;
}
.chat-header-row-1 {
  flex: 0 0 auto;
  min-width: 0;
}
.chat-header-row-2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chat-header-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.5rem;
  margin: -0.5rem 0 -0.5rem -0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: var(--radius);
}
.chat-header-hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
}
.chat-header-title-wrap {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chat-header-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.chat-header-id-pill {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: var(--surface-elevated, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  max-width: 8ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-header-id-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.25rem;
  cursor: pointer;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-header-id-copy:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.chat-header-id-copy .material-icons {
  font-size: 1rem;
}
.chat-header-timer-chip {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.chat-header-chips-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  width: 100%;
}
.chat-header-chip {
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill, 999px);
  color: var(--text-muted);
  font-weight: 500;
}
.chat-header-presence {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.chat-header-presence .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success, #4ade80);
  flex-shrink: 0;
}
.chat-header-status-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.chat-header-security-wrap {
  flex-shrink: 0;
}
.chat-header-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* Room chat: Room Info = blue gradient + border glow (match room type selection); Leave = same in red */
.chat-main.room-chat #btn-room-info {
  border: 1px solid rgba(128, 186, 240, 0.62) !important;
  background: linear-gradient(160deg, rgba(108, 178, 245, 0.18) 0%, rgba(73, 131, 201, 0.11) 48%, rgba(14, 25, 41, 0.58) 100%) !important;
  box-shadow: 0 0 0 1px rgba(128, 186, 240, 0.28), 0 6px 16px rgba(70, 130, 197, 0.11) !important;
  color: #e0e3e8 !important;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.chat-main.room-chat #btn-room-info:hover {
  border-color: rgba(128, 186, 240, 0.85) !important;
  box-shadow: 0 0 0 1px rgba(128, 186, 240, 0.4), 0 8px 20px rgba(70, 130, 197, 0.18) !important;
  background: linear-gradient(160deg, rgba(108, 178, 245, 0.24) 0%, rgba(73, 131, 201, 0.16) 48%, rgba(14, 25, 41, 0.65) 100%) !important;
}
.chat-main.room-chat #btn-leave {
  border: 1px solid rgba(248, 113, 113, 0.55) !important;
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.16) 0%, rgba(220, 38, 38, 0.1) 48%, rgba(41, 14, 14, 0.58) 100%) !important;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.26), 0 6px 16px rgba(239, 68, 68, 0.11) !important;
  color: #f0e0e0 !important;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.chat-main.room-chat #btn-leave:hover {
  border-color: rgba(248, 113, 113, 0.8) !important;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.38), 0 8px 20px rgba(239, 68, 68, 0.18) !important;
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.22) 0%, rgba(220, 38, 38, 0.14) 48%, rgba(41, 14, 14, 0.65) 100%) !important;
}

.chat-header-i18n {
  display: inline-flex;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-unit);
  min-width: 0;
}

.security-status-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.35rem 0.65rem;
  background: rgba(45, 157, 110, 0.08);
  border: 1px solid rgba(45, 157, 110, 0.22);
  border-radius: var(--radius);
  color: var(--trust-green);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.security-status-pill:hover {
  background: rgba(45, 157, 110, 0.12);
  border-color: rgba(45, 157, 110, 0.35);
}
.security-status-pill:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-muted);
}
.security-status-pill-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.security-status-pill-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.security-status-pill-title {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.security-status-pill-subtitle {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
  display: block;
  margin-top: 0.1rem;
}
.security-status-secure { background: var(--success); }
.security-status-attention { background: var(--warning); }
.security-status-risk { background: var(--danger); }

.security-pill-wrap {
  position: relative;
  display: inline-flex;
}

.security-details-popover {
  position: fixed;
  z-index: 102;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 2rem));
  max-height: min(360px, calc(100vh - 120px));
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: var(--spacing-unit);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
}
.security-details-popover.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.security-details-popover-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.security-details-popover-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.security-details-popover-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  flex-wrap: wrap;
}
.security-details-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  opacity: 0.8;
}
.security-details-label {
  flex: 1;
  min-width: 0;
}
.security-details-value {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
  font-weight: 500;
}

/* Security details — status-level colors */
.security-details-value.sec-good { color: var(--success); }
.security-details-value.sec-degraded { color: var(--warning); }
.security-details-value.sec-unavailable { color: var(--text-subtle); }
.security-details-value.sec-severe { color: var(--danger); }

/* Security details — status icon (replaces the plain dot) */
.security-details-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}
.security-details-icon.sec-icon-good {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.security-details-icon.sec-icon-degraded {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid var(--warning);
  border-radius: 0;
  background: none;
}
.security-details-icon.sec-icon-unavailable {
  width: 10px; height: 2px;
  border-radius: 1px;
  background: var(--text-subtle);
}
.security-details-icon.sec-icon-severe {
  color: var(--danger);
  font-family: 'Material Icons';
  font-size: 14px;
  width: auto; height: auto;
  background: none;
}
.security-details-icon.sec-icon-severe::after {
  content: 'error';
}

/* Room security status banner — overlay in chat body, no layout shift */
.room-security-banner {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 0 0 8px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  max-width: min(640px, calc(100vw - 2rem));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}
.room-security-banner.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.room-security-banner.sec-banner-amber {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-top: none;
  color: var(--warning);
}
.room-security-banner.sec-banner-red {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-top: none;
  color: var(--danger);
}
.room-security-banner .sec-banner-icon {
  font-size: 1rem;
  flex-shrink: 0;
}
.room-security-banner .sec-banner-text {
  flex: 1;
  min-width: 0;
}

/* Push messages below banner when visible (no layout shift on composer) */
.chat-body.has-top-banner .chat-messages {
  padding-top: 2.75rem !important;
}
.chat-body.has-bottom-banner .chat-messages {
  padding-bottom: 5rem !important;
}

/* Banner action buttons (shared by room-security-banner + integrity-banner) */
.sec-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  flex-shrink: 0;
}
.sec-banner-btn {
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: opacity 0.15s, background 0.15s;
  line-height: 1.3;
}
.sec-banner-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sec-banner-btn-primary {
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
}
.sec-banner-btn-primary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.25);
}
.sec-banner-btn-more {
  background: transparent;
  color: inherit;
  opacity: 0.75;
}
.sec-banner-btn-more:hover:not(:disabled) {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}
.sec-banner-more-wrap {
  position: relative;
}
.sec-banner-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 165px;
  background: var(--surface-elevated, #1a1a2e);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 20;
  padding: 0.25rem 0;
}
.sec-banner-dropdown-item {
  display: block;
  width: 100%;
  border: none;
  background: none;
  color: var(--text, #f0f2f5);
  font-size: 0.72rem;
  padding: 0.4rem 0.75rem;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.sec-banner-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.sec-banner-dropdown-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sec-banner-btn-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: sec-banner-spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes sec-banner-spin {
  to { transform: rotate(360deg); }
}

/* System event chip (timeline transition marker) */
.msg-security-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 500;
  margin: 0.25rem auto;
}
.msg-security-chip.chip-amber {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
}
.msg-security-chip.chip-red {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
}
.msg-security-chip.chip-green {
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
}

/* Dev Security Smoke Controller panel */
.dev-security-panel {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 150;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.8rem;
  overflow: hidden;
}
.dev-security-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.dev-security-panel-header .dev-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.dev-security-panel-body {
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dev-security-panel-body label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.dev-security-panel-body select,
.dev-security-panel-body input[type="number"] {
  padding: 0.2rem 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.75rem;
  width: 100px;
}
.dev-security-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
}
.dev-security-panel-actions button {
  font-size: 0.7rem !important;
  padding: 0.25rem 0.5rem !important;
}
.dev-security-panel-status {
  padding: 0.25rem 0.75rem 0.5rem;
  font-size: 0.7rem;
  color: var(--text-subtle);
}
.dev-security-toggle-btn {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 149;
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-subtle);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.dev-security-toggle-btn:hover {
  opacity: 1;
}

.security-details-open-room-info {
  width: 100%;
  margin-top: 0.25rem;
}

.chat-header-title-wrap {
  min-width: 0;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chat-header-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.chat-header-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.status-dot.warning {
  background: var(--warning);
}

.status-dot.danger {
  background: var(--danger);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  color: var(--text);
}

/* LeftTrustPanel — live trust indicators (state-based, no implementation detail) */
.left-trust-panel {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 10;
  width: 180px;
}

.trust-panel-indicator {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: rgba(45, 157, 110, 0.06);
  border: 1px solid rgba(45, 157, 110, 0.18);
  color: var(--trust-green);
  transition: opacity 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.trust-panel-indicator .trust-icon {
  font-size: 18px;
  line-height: 1;
  opacity: 0.9;
}

.trust-panel-indicator .trust-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--trust-green);
}

.trust-panel-indicator .trust-value {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(45, 157, 110, 0.9);
  opacity: 0.9;
}

.trust-panel-indicator .trust-subtext {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.trust-panel-indicator .trust-hint {
  font-size: 0.6rem;
  color: var(--text-subtle);
}

.trust-value {
  transition: opacity 0.2s ease;
}

.trust-value.trust-value-updated {
  opacity: 1;
}

/* Trust panel status states */
.trust-panel-indicator.trust-ok {
  background: rgba(45, 157, 110, 0.08);
  border-color: rgba(45, 157, 110, 0.25);
  color: var(--trust-green);
}

.trust-panel-indicator.trust-warn {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.25);
  color: var(--warning);
}

.trust-panel-indicator.trust-warn .trust-label,
.trust-panel-indicator.trust-warn .trust-value {
  color: var(--warning);
}

.trust-panel-indicator.trust-pending {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.24);
  color: #b8c4d6;
}
.trust-panel-indicator.trust-pending .trust-label,
.trust-panel-indicator.trust-pending .trust-value {
  color: #c2cdde;
}

.trust-panel-indicator.trust-bad {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
  color: var(--danger);
}

.trust-panel-indicator.trust-bad .trust-label,
.trust-panel-indicator.trust-bad .trust-value {
  color: var(--danger);
}

/* Confidence gating: verified = full state; awaiting = subtle, no pulse */
.trust-panel-indicator.trust-awaiting .trust-subtext {
  color: var(--text-subtle);
  font-style: italic;
}

/* Diagnostics panel (dev only) */
.trust-diagnostics {
  position: absolute;
  left: 0.75rem;
  bottom: 1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 180px;
}

.trust-diagnostics-header {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.trust-diagnostics-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.trust-diagnostic-btn {
  font-size: 0.65rem !important;
  padding: 0.25rem 0.5rem !important;
}

/* Integrity banner — shown when integrity indicator is bad */
.integrity-banner {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 4rem;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 500;
}

.integrity-banner .material-icons {
  font-size: 1.2rem;
}

/* Secure Session — soft green pulse every ~3s when room active */
.trust-panel-indicator.trust-pulse {
  box-shadow: 0 0 12px var(--trust-green-glow);
  border-color: rgba(45, 157, 110, 0.4);
  opacity: 1;
}

/* Integrity — brief verify animation every ~5s */
.trust-panel-indicator.trust-verify {
  animation: trust-verify-flash 0.4s ease;
}

@keyframes trust-verify-flash {
  0%, 100% { opacity: 1; }
  50% {
    box-shadow: 0 0 8px var(--trust-green-glow);
    opacity: 0.95;
  }
}

/* Ephemeral Retention — subtle hourglass motion */
#trust-retention .trust-icon {
  animation: trust-hourglass 3s ease-in-out infinite;
}

@keyframes trust-hourglass {
  0%, 100% { transform: scaleY(1); opacity: 0.9; }
  50% { transform: scaleY(1.05); opacity: 1; }
}

.presence-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.subtitle-sep {
  color: var(--border);
  margin: 0 0.25rem;
}

.chat-messages {
  width: 100%;
  max-width: 680px;
}

.chat-composer {
  flex-shrink: 0;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--text);
}

.chat-composer-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.chat-input-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  min-height: 44px;
}

.chat-shell .chat-composer-inner .pill-primary {
  min-height: 44px;
  min-width: 44px;
  padding: 0.625rem 1.25rem;
}

.chat-input {
  flex: 1;
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.95rem;
  resize: none;
  min-height: 24px;
  max-height: 120px;
}

.chat-input:focus {
  outline: none;
}

.chat-input::placeholder {
  color: var(--text-subtle);
}

/* Message bubbles */
.msg-group {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: var(--chat-bubble-max-width);
  gap: 0.35rem;
}

.msg-row.them .msg-group {
  align-items: flex-start;
}

.msg-bubble {
  display: inline-block;
  width: fit-content;
  max-width: var(--chat-bubble-max-width);
  min-width: 60px;
  padding: 0.5rem 1rem;
  border-radius: var(--chat-bubble-radius);
  font-size: 0.95rem;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.msg-me {
  background: var(--bubble-me);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.msg-them {
  background: var(--bubble-them);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg-system {
  background: var(--surface);
  color: var(--text);
  text-align: center;
  margin: 0 auto;
  font-size: 0.9rem;
}

.msg-meta {
  font-size: 0.7rem;
  color: var(--text-subtle);
  margin-top: 0.2rem;
}

.msg-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.msg-row.them {
  justify-content: flex-start;
}

.msg-row.system {
  justify-content: center;
}

/* Room deniability banner — overlay, does not affect layout; dismissible, per-room */
.room-deniability-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  padding-top: max(0.5rem, env(safe-area-inset-top));
  background: var(--accent-muted);
  border-bottom: 1px solid rgba(91, 155, 213, 0.25);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Prevent banner/header overlap: use JS-set --banner-h so header sits below banner. */
.room-deniability-banner + .chat-main {
  box-sizing: border-box;
  padding-top: var(--banner-h, 2.25rem);
}
.room-deniability-banner.dismissed {
  display: none !important;
}
.room-deniability-banner.dismissed + .chat-main {
  padding-top: 0;
}
.room-deniability-banner-text {
  flex: 1;
  min-width: 0;
}
.room-deniability-banner-learn {
  color: var(--accent);
  text-decoration: underline;
  font-size: 0.8rem;
  white-space: nowrap;
}
.room-deniability-banner-learn:hover {
  color: var(--accent-hover);
}
.room-deniability-banner-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.room-deniability-banner-dismiss:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.room-deniability-banner-dismiss:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-muted);
}

/* Maximum Privacy badge (non-sticky, minimal) */
.maximum-privacy-badge {
  font-size: 0.75rem;
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  background: var(--accent-muted);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  display: inline-block;
}

/* Offline warning */
.offline-warning {
  background: var(--warning-muted);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--warning);
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.offline-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 200px;
}

.offline-hint code {
  font-size: 0.75rem;
  background: var(--bg);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

/* Room info drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 360px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  font-weight: 600;
  font-size: 1rem;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
}

.drawer-body {
  padding: var(--spacing-unit);
}

.drawer-section-card {
  background: var(--panel-section-bg);
  border: 1px solid var(--panel-section-border);
  border-radius: var(--radius);
  padding: var(--spacing-unit, 0.75rem);
  margin-bottom: 1rem;
}
.drawer-section-card + .drawer-section-card {
  margin-top: 0.25rem;
}
.drawer-section-card:last-child {
  margin-bottom: 0;
}

.drawer-section {
  margin-bottom: 0;
}
.drawer-section-card .drawer-section {
  margin-bottom: 0;
}

.drawer-section h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
}

.drawer-section ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.drawer-helper {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
  line-height: 1.45;
}

.drawer-accordion-details {
  margin: 0;
}
.drawer-accordion-details summary {
  list-style: none;
  cursor: pointer;
}
.drawer-accordion-details summary::-webkit-details-marker {
  display: none;
}
.drawer-accordion-summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.drawer-accordion-summary::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid var(--text-subtle);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.2s;
}
.drawer-accordion-details[open] .drawer-accordion-summary::before {
  transform: rotate(90deg);
}
.drawer-accordion-summary h4 {
  margin: 0;
}
.drawer-accordion-details[open] .drawer-accordion-summary {
  margin-bottom: 0.5rem;
}
.drawer-advanced-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
/* Safety note — muted footer, no card; optional heading */
.drawer-safety-note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: none;
  background: none;
  border: none;
}
.drawer-safety-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.35rem;
}
.drawer-safety-text {
  font-size: 0.8rem !important;
  color: var(--text-subtle) !important;
  margin: 0 !important;
}

/* Room Security — threat model button: green border/glow, green text, opens in new tab */
.drawer-threat-model-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--trust-green);
  background: rgba(45, 157, 110, 0.12);
  border: 2px solid rgba(45, 157, 110, 0.4);
  border-radius: var(--radius);
  box-shadow: 0 0 16px var(--trust-green-glow);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.drawer-threat-model-btn:hover {
  background: rgba(45, 157, 110, 0.18);
  border-color: rgba(45, 157, 110, 0.55);
  box-shadow: 0 0 20px var(--trust-green-glow);
  color: var(--trust-green);
}
.drawer-threat-model-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 157, 110, 0.3);
}

/* Safety Note heading */
.drawer-section#drawer-safety-section h4 {
  color: var(--text-subtle);
}

.drawer-section-text {
  color: var(--text);
}

/* Debug accordion (dev only) */
.debug-accordion summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.debug-accordion .content {
  font-size: 0.8rem;
  color: var(--text-subtle);
  padding: 0.5rem 0;
}

/* Utilities */
.text-error {
  color: var(--danger);
  font-size: 0.9rem;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Light soft grey for import-credits notice text (burn-after-read, room create) */
.import-credits-helper {
  color: #b8c5d6 !important;
  font-size: 0.9rem;
}

/* Redeem page — helper text must be readable (avoid invisible on dark bg) */
.redeem-helper-text {
  color: #b8bcc4;
  font-size: 0.9rem;
  line-height: 1.5;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* Modal overrides for dark theme */
.modal-content {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}

.modal-header .modal-title {
  color: var(--text);
}

.modal-body {
  color: var(--text);
}

.extra-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
.extra-lock-modal {
  max-width: 420px;
  padding: 1.5rem;
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Ensure Bootstrap modal backdrop does not block when modal is hidden */
.modal-backdrop.fade:not(.show) {
  pointer-events: none;
}

/* Leave modal (custom, not Bootstrap) */
#leave-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

#leave-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

#transport-modal-backdrop,
#load-subscription-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}

#transport-modal-backdrop.open,
#load-subscription-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Rotate key modal (manage subscription): hidden until .open; Bootstrap's .modal-backdrop would otherwise cover the page */
#rotate-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.2s, visibility 0.2s;
}

#rotate-modal-backdrop.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#rotate-modal {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}

#rotate-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#transport-modal {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}

#transport-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.transport-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  max-width: 440px;
  width: calc(100vw - 2rem);
  box-sizing: border-box;
}

#transport-modal .modal-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--text);
}

#transport-modal .modal-text {
  margin: 0 0 1.25rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#transport-modal .modal-close {
  margin: 0;
}

.transport-modal-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.transport-modal-footer a {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: underline;
}

#leave-modal {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}

#leave-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#leave-modal .modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 360px;
  width: 100%;
}

#leave-modal .modal-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

#leave-modal .modal-text {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 0.9rem;
}

#leave-modal .modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#leave-modal .modal-close {
  margin-top: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

#leave-modal .modal-close:hover {
  color: var(--text);
}

.text-warning {
  color: var(--warning);
  font-size: 0.85rem;
}

/* Leave Room modal — destroy warning inline alert block */
.destroy-warning-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.destroy-warning-alert .destroy-warning-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  color: #f59e0b;
  margin-top: 0.05rem;
}

.destroy-warning-alert .destroy-warning-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.destroy-warning-alert .destroy-warning-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f59e0b;
}

.destroy-warning-alert .destroy-warning-message {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
}

.destroy-warning-alert .destroy-warning-actions {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
}

/* Destroy room button: red, inside warning box — same gradient/glow pattern as header Leave but red */
#leave-modal #btn-destroy,
.destroy-warning-alert #btn-destroy,
.pill-destroy {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(248, 113, 113, 0.55) !important;
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.2) 0%, rgba(220, 38, 38, 0.12) 48%, rgba(60, 20, 20, 0.7) 100%) !important;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.26), 0 4px 12px rgba(239, 68, 68, 0.12) !important;
  color: #fce8e8 !important;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

#leave-modal #btn-destroy:hover,
.destroy-warning-alert #btn-destroy:hover {
  border-color: rgba(248, 113, 113, 0.85) !important;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.4), 0 6px 16px rgba(239, 68, 68, 0.2) !important;
  background: linear-gradient(160deg, rgba(248, 113, 113, 0.28) 0%, rgba(220, 38, 38, 0.18) 48%, rgba(60, 20, 20, 0.75) 100%) !important;
  color: #fff !important;
}

.destruction-emphasis {
  background: var(--danger-muted);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--danger);
}

.recovery-page-title {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.recovery-page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 0 2rem;
}

.recovery-info-card,
.recovery-status-card {
  border-radius: var(--radius-lg);
  padding: 1.9rem;
  box-shadow: 0 8px 22px rgba(10, 16, 28, 0.12);
}

.recovery-info-card {
  margin-bottom: 2.25rem;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.recovery-status-card {
  min-height: 120px;
  margin-bottom: 2.25rem;
}

.recovery-status-content {
  color: var(--text);
}

.recovery-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.recovery-card-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.recovery-card-list li {
  margin-bottom: 0.35rem;
}

.recovery-card-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.recovery-status-content .recovery-status-text,
.recovery-status-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.recovery-status-text.recovery-visible {
  color: var(--text);
}

.recovery-results-alert {
  border: 1px solid var(--border-soft);
}

.recovery-results-info {
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.recovery-results-success {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.25);
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.09);
}

.recovery-pill-danger {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(248, 113, 113, 0.06);
}

.recovery-pill-danger:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.85);
  background: rgba(248, 113, 113, 0.12);
}

.recovery-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.recovery-modal {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(3, 7, 18, 0.5);
  padding: 1.4rem;
}

.recovery-modal-title {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
}

.recovery-modal-body {
  color: var(--text-muted);
  line-height: 1.5;
}

.recovery-modal-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.recovery-status-error {
  color: var(--danger);
}

@media (max-width: 767px) {
  .recovery-page-subtitle {
    margin-bottom: 1.5rem;
  }

  .recovery-info-card,
  .recovery-status-card {
    padding: 1.45rem;
    margin-bottom: 1.7rem;
  }
}

.tier-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tier-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.tier-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.toast-banner {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-banner.toast-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}
  box-shadow: var(--shadow-lg);
}

.btn-close {
  filter: invert(1);
}

/* Responsive */
@media (max-width: 640px) {
  .stepper {
    font-size: 0.75rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

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

  .drawer {
    max-width: 100%;
  }

  .msg-bubble {
    max-width: 85%;
  }
}

/* Desktop (room chat): 1) Timer no pill, white, top right. 2) Room name no pill. 3) Room Secured under Room. 4) Deniable•Ephemeral•… under timer, no pills, dots. 5) You're alone left, EN Room info Leave right. No html.room-chat-page — apply whenever .chat-main.room-chat exists. */
@media (min-width: 769px) {
  .chat-main.room-chat .chat-header {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas: "room timer" "secured chips" "actions actions" !important;
    align-items: start;
    gap: 0.35rem 0.75rem;
  }
  .chat-main.room-chat .chat-header-row-1 {
    display: contents !important;
  }
  .chat-main.room-chat .chat-header-title-wrap {
    grid-area: room !important;
    justify-self: start;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .chat-main.room-chat .chat-header-title-wrap .chat-header-id-pill {
    display: none !important;
  }
  .chat-main.room-chat .chat-header-timer-chip {
    grid-area: timer !important;
    justify-self: end;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 500;
  }
  .chat-main.room-chat .chat-header-security-wrap {
    grid-area: secured !important;
    justify-self: start;
  }
  .chat-main.room-chat .chat-header-chips-row {
    grid-area: chips !important;
    justify-self: end;
    width: auto;
    gap: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
  }
  .chat-main.room-chat .chat-header-chips-row .chat-header-chip {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-size: inherit;
    color: inherit;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .chat-main.room-chat .chat-header-chips-row .chat-header-chip:not(:last-child)::after {
    content: " \u2022 ";
    margin-left: 0.2rem;
  }
  .chat-main.room-chat .chat-header-row-2 {
    grid-area: actions !important;
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
  }
  .chat-main.room-chat .chat-header-row-2 .chat-header-presence {
    margin-right: auto !important;
  }
}

/* Room header mobile: re-arranged layout — room name (left) + timer (right), Room Secured (left) + Deniable… (right), then actions. Scoped to .chat-main.room-chat so no html class required. */
@media (max-width: 768px) {
  /* Mobile: lock viewport so only messages scroll; header and composer stay sticky. No html class — use :has(). */
  html:has(.chat-main.room-chat) {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }
  body.chat-shell:has(.chat-main.room-chat) {
    height: 100% !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .chat-main.room-chat {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .chat-main.room-chat .room-chat__header,
  .chat-main.room-chat .chat-header {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
  }
  .chat-main.room-chat .room-chat__notice-slot {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
  }
  .chat-main.room-chat .room-chat__messages,
  .chat-main.room-chat .chat-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .chat-main.room-chat .room-chat__composer,
  .chat-main.room-chat .chat-composer {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
  }
  /* Notification banner: in-flow below header (never fixed/overlap on mobile). */
  .chat-main.room-chat .room-chat__notice-slot .room-deniability-banner,
  .chat-main.room-chat .room-deniability-banner {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 0 !important;
  }

  /* All header rules scoped to room chat so they win and only apply here */
  .chat-main.room-chat .chat-header {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas: "room timer" "secured chips" "actions actions" !important;
    align-items: start;
    gap: 0.35rem 0.5rem;
    padding: 0.5rem max(0.75rem, env(safe-area-inset-right)) 0.5rem max(0.75rem, env(safe-area-inset-left));
  }
  .chat-main.room-chat .chat-header-row-1 {
    display: contents !important;
  }
  .chat-main.room-chat .chat-header-title-wrap {
    grid-area: room !important;
    justify-self: start;
    min-width: 0;
  }
  .chat-main.room-chat .chat-header-timer-chip {
    grid-area: timer !important;
    justify-self: end;
    font-size: 0.4375rem !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-weight: 500;
  }
  .chat-main.room-chat .chat-header-security-wrap {
    grid-area: secured !important;
    justify-self: start;
    display: block !important;
    visibility: visible !important;
  }
  .chat-main.room-chat .chat-header-security-wrap .security-status-pill {
    display: inline-flex !important;
    visibility: visible !important;
    font-size: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    cursor: pointer !important;
    pointer-events: auto !important;
    min-height: 32px;
    -webkit-tap-highlight-color: transparent;
  }
  .chat-main.room-chat .chat-header-chips-row {
    grid-area: chips !important;
    justify-self: end;
    width: auto;
    max-width: 100%;
    gap: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    text-align: right;
  }
  .chat-main.room-chat .chat-header-chips-row .chat-header-chip,
  .chat-main.room-chat .chat-header-chips-row .chat-header-status-chip {
    font-size: 0.4375rem !important;
    padding: 0 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #b0b5bc !important;
  }
  .chat-main.room-chat .chat-header-chips-row .chat-header-chip:not(:last-child)::after {
    content: " \u2022 ";
    margin-left: 0.15rem;
    color: #b0b5bc;
  }
  .chat-main.room-chat .chat-header-row-2 {
    grid-area: actions !important;
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-start;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
  }
  .chat-main.room-chat .chat-header-row-2 .chat-header-presence {
    margin-right: auto !important;
  }
  .chat-main.room-chat .chat-header-row-2 .chat-header-i18n {
    margin-left: auto !important;
  }
  .chat-main.room-chat .chat-header-title-wrap .chat-header-label,
  .chat-main.room-chat .chat-header-title-wrap .chat-header-id-pill {
    font-size: 0.4375rem !important;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chat-main.room-chat .chat-header-id-pill {
    padding: 0.1rem 0.25rem;
    max-width: 10ch;
  }
  .chat-main.room-chat .chat-header-presence,
  .chat-main.room-chat .presence-label {
    font-size: 0.5625rem;
  }
  .chat-main.room-chat .chat-header-security-wrap .security-status-pill-subtitle {
    display: none;
  }
  .chat-main.room-chat .chat-header-security-wrap .security-status-pill-title-row {
    gap: 0.2rem;
  }
  .chat-main.room-chat .chat-header-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.625rem;
    min-height: 44px;
  }
  .chat-main.room-chat .chat-header-i18n {
    font-size: 0.5625rem;
  }
}

/* In-room info modal: desktop centered, mobile bottom sheet. Hidden when closed so it never appears below composer. */
.info-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}
.info-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.info-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  z-index: 201;
  display: none;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}
.info-modal.open {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.info-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.info-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}
.info-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 4px;
}
.info-modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
.info-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  color: var(--text);
}
.info-modal-body .nav-top {
  display: none;
}
.info-modal-body h1,
.info-modal-body .hero {
  margin-top: 0;
}
.drawer-info-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
}
.drawer-info-links li {
  margin: 0.35rem 0;
}
.drawer-info-links a {
  color: var(--trust-green);
  text-decoration: none;
}
.drawer-info-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .info-modal {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 80vh;
    transform: translateY(100%);
    border-radius: 12px 12px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .info-modal.open {
    transform: translateY(0);
  }
}

/* Guide page: Tor Browser */
.guide-page {
  padding: 0.5rem 0;
}
.guide-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--text);
}
.guide-intro {
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}
.guide-section {
  margin-bottom: 1.5rem;
}
.guide-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}
.guide-list {
  margin: 0.25rem 0 0 0;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}
.guide-list-ordered {
  list-style-type: decimal;
}
.guide-closing {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.guide-nav {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.guide-nav .pill {
  display: inline-flex;
}

/* ===== Subscription wizard (Manage Subscription + Subscription Active) ===== */
.subscription-page {
  --subscription-step-blue: 59, 130, 246;
  --subscription-step-orange: 255, 149, 0;
  --subscription-step-purple: 139, 92, 246;
  --subscription-step-teal: 20, 184, 166;
}

.subscription-hero-card {
  border-radius: var(--step-card-radius);
  padding: var(--step-card-padding);
  background: linear-gradient(160deg, rgba(var(--subscription-step-blue, 59, 130, 246), 0.12) 0%, rgba(var(--subscription-step-blue, 59, 130, 246), 0.05) 50%, rgba(14, 25, 41, 0.6) 100%);
  border: 1px solid rgba(var(--subscription-step-blue, 59, 130, 246), 0.35);
  box-shadow: 0 0 0 1px rgba(var(--subscription-step-blue, 59, 130, 246), 0.12), 0 8px 24px rgba(59, 130, 246, 0.08);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.subscription-hero-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.subscription-hero-copy {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 0.35rem;
  line-height: 1.5;
}

.subscription-hero-helper {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.45;
}

#loaded-pill-wrap {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.subscription-loaded-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
}

.subscription-loaded-pill .unload-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  text-decoration: underline;
  font-weight: 400;
}

.subscription-loaded-pill .unload-link:hover {
  color: var(--danger);
}

.subscription-step-card {
  border-radius: var(--step-card-radius);
  padding: var(--step-card-padding);
  background: var(--step-card-fallback-bg);
  border: 1px solid var(--step-card-fallback-border);
  box-shadow: var(--step-card-fallback-shadow);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
}

.subscription-step-card.subscription-step-blue {
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.06) 50%, rgba(14, 25, 41, 0.65) 100%);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12), 0 8px 24px rgba(59, 130, 246, 0.08);
}

.subscription-step-card.subscription-step-orange {
  border: 1px solid rgba(255, 149, 0, 0.4);
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.08) 0%, rgba(255, 149, 0, 0.03) 60%, rgba(14, 25, 41, 0.65) 100%);
  box-shadow: 0 0 0 1px rgba(255, 149, 0, 0.12), 0 8px 24px rgba(255, 149, 0, 0.06);
}

.subscription-step-card.subscription-step-purple {
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.12) 0%, rgba(139, 92, 246, 0.05) 50%, rgba(14, 25, 41, 0.65) 100%);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.12), 0 8px 24px rgba(139, 92, 246, 0.08);
}

.subscription-step-card.subscription-step-teal {
  border: 1px solid rgba(20, 184, 166, 0.42);
  background: linear-gradient(160deg, rgba(20, 184, 166, 0.12) 0%, rgba(20, 184, 166, 0.05) 50%, rgba(14, 25, 41, 0.65) 100%);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.12), 0 8px 24px rgba(20, 184, 166, 0.08);
}

.subscription-step-label {
  font-size: 0.75rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 0.5rem;
}

.subscription-step-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.subscription-step-subtext {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.subscription-segment-controls {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.subscription-segment-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.subscription-segment-btn:hover {
  color: var(--text);
}

.subscription-segment-btn.is-active {
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border);
}

.subscription-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 1.5rem;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.subscription-dropzone:hover,
.subscription-dropzone.subscription-dropzone-hover {
  border-color: var(--accent);
  background: rgba(104, 168, 227, 0.04);
}

.subscription-dropzone.has-file {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.06);
}

.subscription-dropzone-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

.subscription-dropzone input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.subscription-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.subscription-status-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.subscription-status-item .label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.subscription-status-item .value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.pill-danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.pill-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.15);
}

.subscription-accordion .accordion-item {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.subscription-accordion .accordion-item:last-child {
  margin-bottom: 0;
}

.subscription-accordion .accordion-button {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
}

.subscription-accordion .accordion-button:not(.collapsed) {
  background: rgba(255, 255, 255, 0.06);
}

.subscription-accordion .accordion-body {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.55;
}

.subscription-active-card {
  border-radius: var(--step-card-radius);
  padding: var(--step-card-padding);
  background: linear-gradient(160deg, rgba(74, 222, 128, 0.1) 0%, rgba(74, 222, 128, 0.04) 50%, rgba(14, 25, 41, 0.65) 100%);
  border: 1px solid rgba(74, 222, 128, 0.35);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.1), 0 8px 24px rgba(74, 222, 128, 0.06);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.subscription-active-warning {
  padding: 1rem 1.25rem;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--warning);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.subscription-code-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0.5rem 0 1rem;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.9rem;
  word-break: break-all;
  color: var(--text);
}

.subscription-code-block .code-value {
  flex: 1;
  min-width: 0;
}

/* ===== Manage subscription page: higher contrast so content is readable ===== */
.page-manage-subscription {
  background: var(--bg-gradient);
}

.page-manage-subscription .container-main {
  /* No wrapper card — content sits directly on page background */
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
  --manage-surface: #2a3038;
  --manage-text: #e8eaed;
  --manage-text-muted: #b8c5d6;
  --manage-border: rgba(255, 255, 255, 0.1);
}

.page-manage-subscription .dr-section-title {
  color: var(--text);
}

.page-manage-subscription .dr-muted {
  color: #b8c5d6 !important;
  opacity: 1;
}

.page-manage-subscription .dr-card-title {
  color: var(--text);
}

.page-manage-subscription .subscription-hero-card {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.08) 50%, rgba(42, 48, 56, 0.95) 100%);
  border-color: rgba(59, 130, 246, 0.45);
}

.page-manage-subscription .subscription-step-label {
  color: rgba(255, 255, 255, 0.82);
}

.page-manage-subscription .subscription-step-title {
  color: var(--text);
}

.page-manage-subscription .subscription-step-subtext {
  color: #b8c5d6;
}

.page-manage-subscription .subscription-segment-controls {
  background: rgba(255, 255, 255, 0.08);
}

.page-manage-subscription .subscription-segment-btn {
  color: #b8c5d6;
}

.page-manage-subscription .subscription-segment-btn:hover {
  color: var(--text);
}

.page-manage-subscription .subscription-segment-btn.is-active {
  background: var(--surface-elevated);
  color: var(--text);
}

.page-manage-subscription .subscription-dropzone {
  background: rgba(42, 48, 56, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}

.page-manage-subscription .subscription-dropzone:hover,
.page-manage-subscription .subscription-dropzone.subscription-dropzone-hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.page-manage-subscription .subscription-dropzone-label {
  color: #b8c5d6;
}

.page-manage-subscription .subscription-step-card.subscription-step-blue {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(42, 48, 56, 0.92) 100%);
  border-color: rgba(59, 130, 246, 0.5);
}

.page-manage-subscription .subscription-step-card.subscription-step-orange {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.14) 0%, rgba(255, 149, 0, 0.06) 60%, rgba(42, 48, 56, 0.92) 100%);
  border-color: rgba(255, 149, 0, 0.5);
}

.page-manage-subscription .subscription-step-card.subscription-step-purple {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.18) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(42, 48, 56, 0.92) 100%);
  border-color: rgba(139, 92, 246, 0.5);
}

.page-manage-subscription .subscription-step-card.subscription-step-teal {
  background: linear-gradient(160deg, rgba(20, 184, 166, 0.18) 0%, rgba(20, 184, 166, 0.08) 50%, rgba(42, 48, 56, 0.92) 100%);
  border-color: rgba(20, 184, 166, 0.5);
}

.page-manage-subscription .subscription-status-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.page-manage-subscription .subscription-status-item .label {
  color: #b8c5d6;
}

.page-manage-subscription .surface-card {
  background: rgba(42, 48, 56, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

.page-manage-subscription .form-label {
  color: #b8c5d6;
}

.page-manage-subscription .form-input,
.page-manage-subscription .form-input::placeholder {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.page-manage-subscription .form-input.mono {
  color: var(--text);
}

/* Room chat desktop: force layout (ID selector so it wins over any other rule) */
@media (min-width: 769px) {
  #room-chat-root.chat-main.room-chat .chat-header {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas: "room timer" "secured chips" "actions actions" !important;
  }
  #room-chat-root.chat-main.room-chat .chat-header-row-1 { display: contents !important; }
  #room-chat-root.chat-main.room-chat .chat-header-title-wrap { grid-area: room !important; }
  #room-chat-root.chat-main.room-chat .chat-header-title-wrap .chat-header-id-pill { display: none !important; }
  #room-chat-root.chat-main.room-chat .chat-header-timer-chip { grid-area: timer !important; background: none !important; border: none !important; padding: 0 !important; color: #fff !important; }
  #room-chat-root.chat-main.room-chat .chat-header-security-wrap { grid-area: secured !important; }
  #room-chat-root.chat-main.room-chat .chat-header-chips-row { grid-area: chips !important; }
  #room-chat-root.chat-main.room-chat .chat-header-chips-row .chat-header-chip { background: none !important; border: none !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  #room-chat-root.chat-main.room-chat .chat-header-row-2 { grid-area: actions !important; grid-column: 1 / -1 !important; display: flex !important; }
  #room-chat-root.chat-main.room-chat .chat-header-row-2 .chat-header-presence { margin-right: auto !important; }
}

/* Room chat mobile: force layout and styles (ID selector so it wins) */
@media (max-width: 768px) {
  #room-chat-root.chat-main.room-chat .chat-header {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas: "room timer" "secured chips" "actions actions" !important;
  }
  #room-chat-root.chat-main.room-chat .chat-header-row-1 { display: contents !important; }
  #room-chat-root.chat-main.room-chat .chat-header-title-wrap { grid-area: room !important; }
  #room-chat-root.chat-main.room-chat .chat-header-timer-chip { grid-area: timer !important; background: none !important; border: none !important; padding: 0 !important; color: #fff !important; font-size: 0.4375rem !important; }
  #room-chat-root.chat-main.room-chat .chat-header-security-wrap { grid-area: secured !important; display: block !important; visibility: visible !important; }
  #room-chat-root.chat-main.room-chat .chat-header-chips-row { grid-area: chips !important; justify-self: end !important; }
  #room-chat-root.chat-main.room-chat .chat-header-chips-row .chat-header-chip,
  #room-chat-root.chat-main.room-chat .chat-header-chips-row .chat-header-status-chip {
    background: none !important; background-color: transparent !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; color: #b0b5bc !important; font-size: 0.4375rem !important;
  }
  #room-chat-root.chat-main.room-chat .chat-header-row-2 { grid-area: actions !important; grid-column: 1 / -1 !important; display: flex !important; }
  #room-chat-root.chat-main.room-chat .chat-header-row-2 .chat-header-presence { margin-right: auto !important; }
  #room-chat-root.chat-main.room-chat .chat-header-row-2 .chat-header-i18n { margin-left: auto !important; }
}

/* ─── Creation Method Cards ─── */
.creation-method-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .creation-method-cards { grid-template-columns: 1fr; }
}
.creation-method-card {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.creation-method-card:hover {
  background: var(--surface-hover);
  border-color: rgba(255,255,255,0.12);
}
.creation-method-card--active {
  border-color: var(--accent);
  background: var(--accent-muted);
  box-shadow: 0 0 0 1px var(--accent);
}
.creation-method-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}
.creation-method-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* ─── Ceremony Collapsible ─── */
.ceremony-collapsible {
  border: none;
  margin: 0;
}
.ceremony-collapsible__summary {
  cursor: pointer;
  list-style: none;
  padding: 0;
}
.ceremony-collapsible__summary::-webkit-details-marker { display: none; }
.ceremony-collapsible__summary::marker { display: none; content: ''; }
.ceremony-collapsible__body {
  padding-top: 1rem;
}

/* ─── Ceremony Tabs ─── */
.ceremony-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.ceremony-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ceremony-tab:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.ceremony-tab--active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}
.ceremony-tab-content {
  display: none;
}
.ceremony-tab-content.ceremony-tab-content--active {
  display: block;
}

/* ─── Two-step flow: step-note, summary panel, package button ─── */
.step-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0.75rem;
  background: rgba(91, 155, 213, 0.06);
  border-left: 3px solid rgba(91, 155, 213, 0.3);
  border-radius: 4px;
}
.config-card-summary {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}
.config-card-summary ul { list-style: none; padding: 0; margin: 0; }
.config-card-summary li {
  padding: 0.25rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.config-card-summary li span { color: var(--text); font-weight: 500; }
.btn-offline-commit {
  border: 1px dashed rgba(139, 92, 246, 0.5) !important;
  color: var(--text) !important;
}
.btn-offline-commit:hover {
  background: rgba(139, 92, 246, 0.12) !important;
  border-color: rgba(139, 92, 246, 0.7) !important;
}
.commit-help {
  line-height: 1.5;
}
#step-method { max-width: 640px; }

/* ─── Chat Header (refactored) ─── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.chat-header-left { flex: 1; min-width: 0; }
.chat-header-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.chat-header-subtitle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}
.chat-trust-pill {
  color: var(--trust-green);
  font-weight: 500;
}
.chat-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

/* ─── Chat Body ─── */
.chat-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg);
  color: var(--text);
  min-height: 200px;
}
.chat-loading-fallback {
  color: var(--text-muted);
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* ─── Chat Composer ─── */
.chat-composer {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.chat-composer-inner {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  max-width: 680px;
  margin: 0 auto;
}
.chat-input-wrap {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.5rem 1rem;
}
.chat-input {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  resize: none;
  outline: none;
  font-size: 0.9rem;
  line-height: 1.4;
}
.chat-input::placeholder { color: var(--text-subtle); }

/* ─── Chat Messages ─── */
.chat-messages {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem;
  color: var(--text);
}

/* ─── Deniability Banner ─── */
.deniability-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--accent-muted);
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  border: 1px solid rgba(91, 155, 213, 0.2);
  border-radius: 8px;
  margin: 0.5rem;
  font-size: 0.85rem;
}
.banner-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  line-height: 1;
}

/* ─── Drawer Section Tinting ─── */
.drawer-section--trust {
  border-left: 3px solid var(--trust-green);
  padding-left: 0.75rem;
  background: rgba(45, 157, 110, 0.06);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}
.drawer-section--limits {
  border-left: 3px solid var(--warning);
  padding-left: 0.75rem;
  background: rgba(251, 191, 36, 0.06);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}
.drawer-section--details {
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
  background: rgba(104, 168, 227, 0.06);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}
.drawer-section--access {
  border-left: 3px solid var(--accent-secret);
  padding-left: 0.75rem;
  background: rgba(154, 122, 248, 0.06);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

/* ─── Drawer Trust List ─── */
.drawer-trust-list,
.drawer-limits-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.drawer-trust-list li,
.drawer-limits-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  color: var(--text);
}
.drawer-trust-icon {
  font-size: 1rem;
  color: var(--trust-green);
  flex-shrink: 0;
}

/* ─── Left Trust Panel (chat) ─── */
.left-trust-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.trust-panel-indicator {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0;
}
.trust-panel-indicator .trust-icon {
  font-size: 1rem;
  color: var(--trust-green);
}
.trust-panel-indicator .trust-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--trust-green);
}
.trust-panel-indicator .trust-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── Token Consumption Notice ─── */
.token-consumption-notice {
  padding: 0.5rem 0.75rem;
  background: var(--warning-muted);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 6px;
}
