/* Google Fonts loaded via HTML head for performance */

:root {
  --outer-bg: var(--palster-surface-wash, #F5F5F7);
  --outer-ink: var(--palster-text-primary, #1D1D1F);
  --outer-mute: var(--palster-text-secondary, #6E6E73);
  --outer-line: var(--palster-border-subtle, rgba(0, 0, 0, 0.08));
  --outer-fill: var(--palster-surface-card, rgba(255, 255, 255, 0.88));
  --outer-input: #FFFFFF;
  --outer-teal: #047C80;
  --outer-teal-press: #005257;
  --outer-teal-gradient: linear-gradient(180deg, #058184 0%, #04666A 100%);
  --outer-teal-gradient-hover: linear-gradient(180deg, #047C80 0%, #045E62 100%);
  --outer-teal-gradient-active: linear-gradient(180deg, #04666A 0%, #045356 100%);
  --outer-error: var(--palster-status-alert, #EF4444);
  --outer-error-bg: rgba(239, 68, 68, 0.08);
  --outer-success: var(--palster-status-online, #10B981);
  --outer-success-bg: rgba(16, 185, 129, 0.08);
  /* Cards and windows: the app's one card hairline and soft shadow (these pages load no tokens.css). */
  --outer-card-edge: var(--palster-card-edge, rgba(15, 23, 42, 0.08));
  --outer-card-shadow: var(--palster-card-shadow, 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 10px rgba(15, 23, 42, 0.03));
  
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-body: "Inter", var(--palster-font-sans, sans-serif);
}

[data-theme="dark"] {
  --outer-bg: #071018; /* Obsidian base from 10 Invariants */
  --outer-ink: var(--palster-text-primary, #F5F5F7);
  --outer-mute: var(--palster-text-secondary, #A1A1A6);
  --outer-line: var(--palster-border-subtle, rgba(255, 255, 255, 0.12));
  --outer-fill: rgba(26, 28, 34, 0.82);
  --outer-input: rgba(255, 255, 255, 0.045);
  --outer-teal: #06A6A3;
  --outer-teal-press: #005257;
  --outer-teal-gradient: linear-gradient(180deg, #058184 0%, #04666A 100%);
  --outer-teal-gradient-hover: linear-gradient(180deg, #047C80 0%, #045E62 100%);
  --outer-teal-gradient-active: linear-gradient(180deg, #04666A 0%, #045356 100%);
  --outer-error: var(--palster-status-alert, #EF4444);
  --outer-error-bg: rgba(239, 68, 68, 0.12);
  --outer-success: var(--palster-status-online, #10B981);
  --outer-success-bg: rgba(16, 185, 129, 0.12);
  --outer-card-edge: var(--palster-card-edge, rgba(255, 255, 255, 0.08));
  --outer-card-shadow: var(--palster-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.32));
}

html {
  box-sizing: border-box;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--outer-ink);
  background: var(--outer-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

.outer-page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#palsterParticles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.theme-toggle-floating {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 50;
}

/* Drawn 32px (2026-10-17 control scale); the ::after below is the 44px a
   finger gets. Floating, it is already the containing block for it. */
.theme-toggle-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--outer-line);
  border-radius: 8px;
  background: var(--outer-fill);
  color: var(--outer-mute);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle-btn:not(.theme-toggle-floating) { position: relative; }
.theme-toggle-btn::after { content: ''; position: absolute; inset: -7px; }
.theme-toggle-btn svg { width: 16px; height: 16px; }
.theme-toggle-btn:hover { color: var(--outer-ink); border-color: rgba(127, 127, 127, 0.25); }

/* Instant CSS-driven theme icon display without FOUC */
[data-theme="dark"] .theme-icon-sun { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

.outer-nav { display: none; }

.canvas-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto 24px;
  text-decoration: none;
  z-index: 10;
  transition: opacity 0.15s ease;
}

.canvas-brand-logo:hover { opacity: 0.85; }

@keyframes palster-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.canvas-brand-logo .brand-logo-img {
  height: 56px;
  width: auto;
  display: block;
  animation: palster-logo-float 4.2s ease-in-out infinite;
  will-change: transform;
}

.canvas-brand-logo .light-only { display: none; }
.canvas-brand-logo .dark-only { display: block; }
[data-theme="light"] .canvas-brand-logo .light-only { display: block; }
[data-theme="light"] .canvas-brand-logo .dark-only { display: none; }


.auth-page-container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  padding: 0;
  position: relative;
  z-index: 10;
}

.auth-stack {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  width: 100%;
  padding: 56px 16px 24px;
}

.palster-card,
.auth-card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 24px;
  background: var(--outer-fill);
  border: 1px solid var(--outer-card-edge);
  border-radius: 12px;
  box-shadow: var(--outer-card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.palster-card.wide,
.auth-card.wide { max-width: 440px; }

.palster-card:hover,
.auth-card:hover {
  transform: none;
  box-shadow: none;
}

.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header-mark { display: none; }

.auth-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--outer-ink);
}

.auth-subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--outer-mute);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--outer-mute);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--outer-teal);
  text-decoration: none;
}

.form-label-link:hover { text-decoration: underline; }

.form-input-wrapper { position: relative; display: flex; align-items: center; }

.form-input {
  width: 100%;
  height: 44px; /* Hit target */
  padding: 0 12px;
  border: 1px solid var(--outer-line);
  border-radius: 8px;
  background: var(--outer-input);
  color: var(--outer-ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-input::placeholder { color: #9A9AA3; }
.form-input:focus {
  outline: none;
  border-color: var(--palster-border-strong);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.form-input[autocomplete="one-time-code"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.15em;
  text-align: center;
}

.input-handle-prefix {
  position: absolute;
  inset-inline-start: 12px;
  color: var(--outer-mute);
  pointer-events: none;
  font-size: 15px;
}

.form-input.has-prefix { padding-inline-start: 26px; }

.input-reveal-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--outer-mute);
  padding: 10px; /* Hit target */
  cursor: pointer;
  display: flex;
}
/* 36px drawn; a finger gets 44 (the field around it takes the rest). */
.input-reveal-toggle::after { content: ''; position: absolute; inset: -4px; }

.input-reveal-toggle svg { width: 16px; height: 16px; }

.field-feedback { font-size: 12px; display: none; line-height: 1.4; margin-top: 4px; }
.field-feedback.is-visible { display: block; }
.field-feedback.is-error { color: var(--outer-error); }
.field-feedback.is-success { color: var(--outer-success); }
.field-feedback a { color: var(--outer-teal); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* A form's one action stays full width (it is the card's last line) but is
   drawn 40px, not 44 (2026-10-17 control scale); under a finger its ::after
   reaches 44. */
.palster-btn-primary,
.palster-btn-secondary {
  position: relative;
  height: 40px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.palster-btn-primary,
.auth-btn-primary,
#submitBtn,
#continueBtn,
#inviteContinue,
#dispatchBtn,
#proceedResetBtn,
#waitlistBtn,
.btn-auth-primary {
  background: linear-gradient(180deg, #058184 0%, #04666A 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(4,124,128, 0.45) !important;
  box-shadow: 0 4px 14px rgba(4,124,128, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease;
}

.palster-btn-primary:hover,
.auth-btn-primary:hover,
#submitBtn:hover,
#continueBtn:hover,
#inviteContinue:hover,
#dispatchBtn:hover,
#proceedResetBtn:hover,
#waitlistBtn:hover,
.btn-auth-primary:hover {
  background: linear-gradient(180deg, #047C80 0%, #045E62 100%) !important;
  box-shadow: 0 6px 18px rgba(4,124,128, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1px) !important;
}

.palster-btn-primary:active,
.auth-btn-primary:active,
#submitBtn:active,
#continueBtn:active,
#inviteContinue:active,
#dispatchBtn:active,
#proceedResetBtn:active,
#waitlistBtn:active,
.btn-auth-primary:active {
  background: linear-gradient(135deg, #047C80 0%, #047C80 100%) !important;
  box-shadow: 0 2px 8px rgba(4,124,128, 0.3), inset 0 1px 0 rgba(0, 0, 0, 0.1) !important;
  transform: translateY(0) !important;
}

.palster-btn-primary:disabled,
.auth-btn-primary:disabled,
#submitBtn:disabled,
#continueBtn:disabled,
#inviteContinue:disabled,
#dispatchBtn:disabled,
#proceedResetBtn:disabled,
#waitlistBtn:disabled,
.btn-auth-primary:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.palster-btn-primary:focus-visible,
.auth-btn-primary:focus-visible,
#submitBtn:focus-visible,
#continueBtn:focus-visible,
#inviteContinue:focus-visible,
#dispatchBtn:focus-visible,
#proceedResetBtn:focus-visible,
#waitlistBtn:focus-visible,
.btn-auth-primary:focus-visible,
.palster-btn-secondary:focus-visible,
.theme-toggle-btn:focus-visible,
.text-btn:focus-visible,
.otp-resend-btn:focus-visible {
  outline: 2px solid #06A6A3 !important;
  outline-offset: 2px !important;
}

.palster-btn-secondary {
  background: transparent;
  color: var(--outer-ink);
  border: 1px solid var(--outer-line);
}

.palster-btn-secondary:hover { background: rgba(127, 127, 127, 0.08); }

.palster-btn-primary.full-width,
.palster-btn-secondary.full-width { width: 100%; }
@media (pointer: coarse) {
  .palster-btn-primary::after,
  .palster-btn-secondary::after { content: ''; position: absolute; inset-inline-start: -1px; inset-inline-end: -1px; top: min(-1px, calc((100% - 44px) / 2 - 1px)); bottom: min(-1px, calc((100% - 44px) / 2 - 1px)); }
}

kbd, .kbd-keycap { display: none; }

.btn-passkey { display: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: var(--outer-mute);
  font-size: 12px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--outer-line);
}

.apple-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--outer-mute);
  cursor: pointer;
  min-height: 44px; /* Hit target */
}

.apple-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.apple-toggle input { opacity: 0; width: 0; height: 0; }

.apple-toggle span {
  position: absolute;
  inset: 0;
  background: rgba(127, 127, 127, 0.28);
  border-radius: 24px;
  transition: 0.16s ease;
}

.apple-toggle span::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  inset-inline-start: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.16s ease;
}

.apple-toggle input:checked + span { background: var(--outer-teal); }
.apple-toggle input:checked + span::before { transform: translateX(20px); }
.apple-toggle input:focus-visible + span {
  outline: 2px solid var(--outer-teal);
  outline-offset: 2px;
}

.compliance-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0;
}







.entropy-container { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.entropy-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 4px; }
.entropy-bar { background: var(--outer-line); border-radius: 2px; transition: background 0.2s ease; }
.entropy-label { font-size: 12px; color: var(--outer-mute); text-align: end; }
.entropy-track[data-level="1"] .entropy-bar:nth-child(1) { background: var(--outer-error); }
.entropy-track[data-level="2"] .entropy-bar:nth-child(-n+2) { background: #D97706; }
.entropy-track[data-level="3"] .entropy-bar:nth-child(-n+3) { background: var(--outer-teal); }
.entropy-track[data-level="4"] .entropy-bar { background: var(--outer-success); }

.otp-container {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
}

.otp-digit-input {
  width: 44px;
  height: 44px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border: 1px solid var(--outer-line);
  border-radius: 8px;
  background: var(--outer-input);
  color: var(--outer-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.otp-digit-input:focus {
  outline: none;
  border-color: var(--palster-border-strong);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.otp-timer-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--outer-mute);
}

.otp-resend-btn {
  border: 0;
  background: none;
  color: var(--outer-teal);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px; /* Hit target */
  margin: -8px -12px;
}

.otp-resend-btn:disabled { color: var(--outer-mute); cursor: not-allowed; }

.palster-alert-banner {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  border: 1px solid var(--outer-line);
}

.palster-alert-banner.error {
  color: var(--outer-error);
  background: var(--outer-error-bg);
  border-color: rgba(239, 68, 68, 0.2);
}

.palster-alert-banner.success {
  color: var(--outer-success);
  background: var(--outer-success-bg);
  border-color: rgba(16, 185, 129, 0.25);
}

.palster-alert-banner.info {
  color: var(--outer-ink);
  background: rgba(127, 127, 127, 0.08);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--outer-mute);
}

.auth-footer a {
  color: var(--outer-teal);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* Landing — a doorway, not a brochure */
.landing-hero {
  text-align: center;
  max-width: 500px;
  margin: 16px auto 0;
  padding: 32px 24px 16px;
  z-index: 10;
  position: relative;
}


.hero-headline {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0 0 16px;
  font-size: clamp(28px, 3.6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--outer-ink);
  text-wrap: balance;
}

.hero-headline span.gradient-text { color: inherit; }

.hero-subheadline {
  margin: 0 auto 32px;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--outer-mute);
  font-weight: 400;
}

.hero-action-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}

.hero-meta {
  margin-top: 24px;
  font-size: 14px;
  color: var(--outer-mute);
}

.hero-meta a { color: var(--outer-teal); font-weight: 600; text-decoration: none; }
.hero-meta a:hover { text-decoration: underline; }

.waitlist-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 16, 24, 0.55);
  z-index: 55;
}
.waitlist-backdrop.is-open { display: block; }

.waitlist-panel {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 32px;
  display: none;
  position: relative;
  animation: fadeInPanel 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.waitlist-panel.is-open {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  margin: 0;
  width: calc(100% - 32px);
  max-width: 400px;
}

.waitlist-close-btn {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  background: none;
  border: 0;
  color: var(--outer-mute);
  font-size: 20px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.waitlist-close-btn:hover {
  color: var(--outer-ink);
  background: rgba(127, 127, 127, 0.12);
}

.outer-footer,
.outer-policies-footer {
  margin-top: auto;
  padding: 32px 24px 40px;
  text-align: center;
  z-index: 10;
  position: relative;
  background: none;
  border: 0;
  backdrop-filter: none;
}

.footer-content { max-width: 720px; margin: 0 auto; }

.policy-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.policy-link,
.footer-link {
  font-size: 14px;
  color: var(--outer-mute);
  text-decoration: none;
  padding: 8px; /* Hit target helper */
  margin: -8px;
}

.policy-link:hover,
.footer-link:hover { color: var(--outer-ink); text-decoration: underline; }

.policy-dot { color: var(--outer-line); font-size: 10px; padding: 0 4px; }

.policy-legal,
.footer-bottom {
  margin-top: 16px;
  font-size: 13px;
  color: var(--outer-mute);
  border: 0;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  #palsterParticles { display: none; }
  html { scroll-behavior: auto; }
  .canvas-brand-logo .brand-logo-img { animation: none; }
}

@media (max-width: 480px) {
  .palster-card, .auth-card { padding: 24px 20px 20px; }
  .otp-digit-input { width: 42px; height: 44px; }
  .auth-stack { padding: 52px 16px 16px; }
}

.text-btn {
  border: 0;
  background: none;
  color: var(--outer-teal);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  text-decoration: none;
}
.text-btn:hover { text-decoration: underline; }
/* Text actions are drawn their own size; a finger gets 44 (2026-10-17). */
@media (pointer: coarse) {
  .text-btn { position: relative; }
  .text-btn::after { content: ''; position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: min(0px, calc((100% - 44px) / 2)); bottom: min(0px, calc((100% - 44px) / 2)); }
}

.form-input.is-readonly {
  background: transparent;
  border-style: dashed;
  color: var(--outer-mute);
}

/* Facebook-style remembered account */
.continue-as {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding-top: 4px;
}
.continue-as[hidden] { display: none !important; }
.continue-as-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--outer-line);
  background: var(--outer-input);
}
.continue-as-name {
  margin: 4px 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--outer-ink);
}
.continue-as-handle {
  margin: 0;
  font-size: 14px;
  color: var(--outer-mute);
}

/* Clubhouse-style invite-first register */
.register-step[hidden] { display: none !important; }
.invite-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -8px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--outer-line);
  border-radius: 8px;
  background: var(--outer-input);
  font-size: 13px;
  color: var(--outer-mute);
}
.invite-chip code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--outer-ink);
}
#inviteCode {
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

/* Instagram / Facebook landing: product on the left, doorway on the right */
.landing-stage {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 28px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 24px;
  position: relative;
  z-index: 10;
}

.landing-copy {
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.landing-copy .hero-headline,
.landing-copy .hero-subheadline,
.landing-copy .hero-meta {
  text-shadow: 0 0 16px var(--outer-bg), 0 0 28px var(--outer-bg);
}

.landing-copy .canvas-brand-logo {
  margin: 0 auto 20px;
}
.landing-copy .canvas-brand-logo .brand-logo-img {
  height: 72px;
}

.landing-copy .landing-hero {
  padding: 0;
  margin: 0;
  max-width: none;
}

@media (min-width: 960px) {
  .landing-stage {
    grid-template-columns: 1.2fr 0.8fr;
    min-height: calc(100vh - 140px);
    padding-top: 48px;
    gap: 48px;
  }
  .landing-copy,
  .landing-copy .landing-hero {
    text-align: start;
    margin: 0;
    max-width: 440px;
  }
  .landing-copy .canvas-brand-logo {
    margin: 0 0 20px;
    justify-content: flex-start;
  }
  .landing-copy .canvas-brand-logo .brand-logo-img {
    height: 80px;
  }
  .landing-copy .hero-subheadline {
    margin: 0 0 28px;
    max-width: 420px;
  }
  .landing-copy .hero-action-group { margin: 0; }
}

@media (max-width: 959px) {
  .landing-copy { order: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist-panel { animation: none; }
  .palster-btn-primary:active { transform: none; }
  .canvas-brand-logo .brand-logo-img { animation: none; }
}

/* Facebook-style remembered account */
.continue-as {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding-top: 4px;
}
.continue-as[hidden] { display: none !important; }
.continue-as-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--outer-line);
  background: var(--outer-input);
}
.continue-as-name {
  margin: 4px 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--outer-ink);
}
.continue-as-handle {
  margin: 0;
  font-size: 14px;
  color: var(--outer-mute);
}

/* Clubhouse-style invite-first register */
.register-step[hidden] { display: none !important; }
.invite-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -8px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--outer-line);
  border-radius: 8px;
  background: var(--outer-input);
  font-size: 13px;
  color: var(--outer-mute);
}
.invite-chip code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--outer-ink);
}
#inviteCode {
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

/* Instagram / Facebook landing: product on the left, doorway on the right */
.landing-stage {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 28px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 24px;
  position: relative;
  z-index: 10;
}

.landing-copy {
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.landing-copy .hero-headline,
.landing-copy .hero-subheadline,
.landing-copy .hero-meta {
  text-shadow: 0 0 16px var(--outer-bg), 0 0 28px var(--outer-bg);
}

.landing-copy .canvas-brand-logo {
  margin: 0 auto 20px;
}
.landing-copy .canvas-brand-logo .brand-logo-img {
  height: 72px;
}

.landing-copy .landing-hero {
  padding: 0;
  margin: 0;
  max-width: none;
}

@media (min-width: 960px) {
  .landing-stage {
    grid-template-columns: 1.2fr 0.8fr;
    min-height: calc(100vh - 140px);
    padding-top: 48px;
    gap: 48px;
  }
  .landing-copy,
  .landing-copy .landing-hero {
    text-align: start;
    margin: 0;
    max-width: 440px;
  }
  .landing-copy .canvas-brand-logo {
    margin: 0 0 20px;
    justify-content: flex-start;
  }
  .landing-copy .canvas-brand-logo .brand-logo-img {
    height: 80px;
  }
  .landing-copy .hero-subheadline {
    margin: 0 0 28px;
    max-width: 420px;
  }
  .landing-copy .hero-action-group { margin: 0; }
}

@media (max-width: 959px) {
  .landing-copy { order: 1; }
}

.waitlist-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 16, 24, 0.55);
  z-index: 55;
}
.waitlist-backdrop.is-open { display: block; }

.waitlist-panel.is-open {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  margin: 0;
  width: calc(100% - 32px);
  max-width: 400px;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ─────────────────────────────────────────────────────────────────────────
   Landing collage — the product shown as the people in it.
   A drift of real photo cards with Noto emoji popping out from behind them.
   Every length is in cqw, so the whole scene scales as one piece from a
   560px desktop column down to a 320px phone without a single breakpoint.
   ───────────────────────────────────────────────────────────────────────── */
.palster-collage {
  position: relative;
  container-type: inline-size;
  width: min(100%, 560px);
  margin: 0 auto;
  aspect-ratio: 1 / 0.94;
  isolation: isolate;
}

.collage-glow {
  position: absolute;
  inset: 4% -2% 10% -2%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(58% 54% at 50% 46%, rgba(6,166,163, 0.3), rgba(6,166,163, 0) 72%);
  animation: collageBreathe 12s ease-in-out infinite;
}
[data-theme="light"] .collage-glow {
  background: radial-gradient(58% 54% at 50% 46%, rgba(6,166,163, 0.22), rgba(6,166,163, 0) 72%);
}

.collage-card,
.collage-story {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border-radius: 3.4cqw;
  background: var(--outer-fill);
  border: 1px solid var(--outer-card-edge);
  box-shadow: 0 3cqw 6cqw rgba(0, 0, 0, 0.38);
  transform: rotate(var(--tilt, 0deg));
  animation:
    collageIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s) both,
    collageFloat var(--float, 9s) ease-in-out var(--delay, 0s) infinite;
}
[data-theme="light"] .collage-card,
[data-theme="light"] .collage-story {
  box-shadow: 0 2.4cqw 5cqw rgba(15, 23, 42, 0.18);
}

.collage-card img,
.collage-story img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage-card--park    { --tilt: -5deg; --float: 9.5s;  --delay: 0.05s; inset-inline-start: 0;     top: 20cqw; width: 35cqw; aspect-ratio: 4 / 3; z-index: 2; }
.collage-card--pets    { --tilt: 6deg;  --float: 11s;   --delay: 0.18s; inset-inline-start: 69cqw; top: 12cqw; width: 29cqw; aspect-ratio: 4 / 3; z-index: 2; }
.collage-card--nature  { --tilt: 4deg;  --float: 10.5s; --delay: 0.3s;  inset-inline-start: 7cqw;  top: 52cqw; width: 32cqw; aspect-ratio: 4 / 3; z-index: 3; }
.collage-card--skydive { --tilt: -5deg; --float: 8.5s;  --delay: 0.24s; inset-inline-start: 62cqw; top: 46cqw; width: 30cqw; aspect-ratio: 4 / 3; z-index: 3; }

.collage-story {
  --tilt: 0deg;
  --float: 7.5s;
  --delay: 0.12s;
  inset-inline-start: 32cqw;
  top: 4cqw;
  width: 33cqw;
  aspect-ratio: 2 / 3;
  z-index: 5;
  border-radius: 4.2cqw;
}

/* Three story rails that fill one after another, then start over. */
.story-rails {
  position: absolute;
  top: 2cqw;
  inset-inline-start: 2cqw;
  inset-inline-end: 2cqw;
  display: flex;
  gap: 1cqw;
  z-index: 2;
}
.story-rails i {
  position: relative;
  flex: 1;
  height: 0.75cqw;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.34);
}
.story-rails i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
  animation: storyFill 6s linear infinite;
}
.story-rails i:nth-child(2)::after { animation-delay: 2s; }
.story-rails i:nth-child(3)::after { animation-delay: 4s; }

/* Three people, two seconds each. Frame 1 is the base and never moves; 2 and
   3 fade in over it in turn and both clear at the end of the loop, so the card
   never dips to a flat grey between shots the way two cross-fading layers
   would. The rails above fill in step. */
.collage-story .story-shot {
  position: absolute;
  inset: 0;
}
.collage-story .story-shot:nth-of-type(2),
.collage-story .story-shot:nth-of-type(3) {
  opacity: 0;
  animation: 6s ease-in-out infinite;
}
.collage-story .story-shot:nth-of-type(2) { animation-name: storyShot2; }
.collage-story .story-shot:nth-of-type(3) { animation-name: storyShot3; }

/* A little weight along the bottom edge so the card reads as a card. */
.collage-story::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  bottom: 0;
  height: 26%;
  z-index: 1;
  background: linear-gradient(to top, rgba(4, 10, 14, 0.5), rgba(4, 10, 14, 0));
}

/* The pal: a portrait inside a turning presence ring. */
.collage-pal {
  position: absolute;
  inset-inline-start: 39cqw;
  top: 56cqw;
  width: 20cqw;
  height: 20cqw;
  z-index: 6;
  border-radius: 50%;
  animation:
    collageIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.42s both,
    collageFloat 8s ease-in-out 0.42s infinite;
}
.collage-pal::before {
  content: "";
  position: absolute;
  inset: -1.5cqw;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #06A6A3, #4CB6BA, #A78BFA, #FBBF24, #06A6A3);
  animation: ringSpin 7s linear infinite;
}
.collage-pal img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 0.9cqw solid var(--outer-bg);
  box-shadow: 0 2cqw 4cqw rgba(0, 0, 0, 0.35);
}
.collage-pal::after {
  content: "";
  position: absolute;
  inset-inline-end: 0.6cqw;
  bottom: 0.6cqw;
  width: 4cqw;
  height: 4cqw;
  border-radius: 50%;
  background: var(--outer-success);
  border: 0.8cqw solid var(--outer-bg);
}

/* Emoji, popping out from behind the cards on an endless stagger. */
.collage-emoji {
  position: absolute;
  z-index: 8;
  width: var(--size, 12cqw);
  height: var(--size, 12cqw);
  filter: drop-shadow(0 1.8cqw 2.6cqw rgba(0, 0, 0, 0.34));
  transform-origin: 50% 90%;
  animation: emojiPop 9s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) infinite;
}
/* Delays walk clockwise round the cluster, evenly spaced across the 9s cycle,
   so one is always on the way up and never two from the same corner at once. */
.collage-emoji--grin   { --size: 13cqw; --delay: 0.4s; inset-inline-start: 0;     top: 2cqw; }
.collage-emoji--party  { --size: 11cqw; --delay: 1.7s; inset-inline-start: 78cqw; top: 0; }
.collage-emoji--heart  { --size: 14cqw; --delay: 3.0s; inset-inline-start: 85cqw; top: 36cqw; }
.collage-emoji--clap   { --size: 12cqw; --delay: 4.2s; inset-inline-start: 70cqw; top: 70cqw; }
.collage-emoji--spark  { --size: 11cqw; --delay: 5.4s; inset-inline-start: 42cqw; top: 80cqw; }
.collage-emoji--camera { --size: 12cqw; --delay: 6.6s; inset-inline-start: 0;     top: 66cqw; }
.collage-emoji--wow    { --size: 12cqw; --delay: 7.8s; inset-inline-start: 0;     top: 46cqw; }

@keyframes collageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes collageFloat {
  0%, 100% { transform: rotate(var(--tilt, 0deg)) translate3d(0, 0, 0); }
  50%      { transform: rotate(var(--tilt, 0deg)) translate3d(0, -1.6cqw, 0); }
}
@keyframes collageBreathe {
  0%, 100% { opacity: 0.75; transform: scale(0.97); }
  50%      { opacity: 1;    transform: scale(1.03); }
}
@keyframes storyShot2 {
  0%, 33.3%   { opacity: 0; }
  37.8%, 97%  { opacity: 1; }
  100%        { opacity: 0; }
}
@keyframes storyShot3 {
  0%, 66.6%   { opacity: 0; }
  71.1%, 97%  { opacity: 1; }
  100%        { opacity: 0; }
}
@keyframes storyFill {
  0%   { transform: scaleX(0); }
  33%  { transform: scaleX(1); }
  100% { transform: scaleX(1); }
}
@keyframes ringSpin {
  to { transform: rotate(1turn); }
}
@keyframes emojiPop {
  0%   { opacity: 0; transform: translate3d(0, 24%, 0) scale(0.3) rotate(-10deg); }
  10%  { opacity: 1; transform: translate3d(0, -8%, 0) scale(1.1) rotate(4deg); }
  18%  { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  68%  { opacity: 1; transform: translate3d(0, -12%, 0) scale(1) rotate(-3deg); }
  84%  { opacity: 0; transform: translate3d(0, -30%, 0) scale(0.7) rotate(2deg); }
  100% { opacity: 0; transform: translate3d(0, 24%, 0) scale(0.3) rotate(-10deg); }
}

@media (min-width: 960px) {
  .palster-collage {
    /* Capped, not column-width: left to fill 1.2fr it ran ~620px and swallowed
       the fold. The emoji and cards are all cqw, so one number shrinks the
       whole scene in proportion. */
    width: min(100%, 440px);
    margin: 0 auto;
  }
}

@media (max-width: 959px) {
  .palster-collage {
    order: 2;
    width: min(100%, 330px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .collage-card,
  .collage-story,
  .collage-pal,
  .collage-pal::before,
  .collage-glow,
  .collage-emoji,
  .story-shot,
  .story-rails i::after {
    animation: none;
    opacity: 1;
  }
  .story-shot:not(:first-of-type) { opacity: 0; }
  .story-rails i:first-child::after { transform: scaleX(1); }
}

/* Sign-up: a field people never see (bots fill it), the emailed code, and the passkey offer. */
.hp-field {
  position: absolute;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.signup-code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.4em;
  text-align: center;
  min-height: 52px;
}
.register-step-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  margin-top: 10px;
}
.register-step-actions { row-gap: 12px; }
.register-step-actions .text-btn { height: 32px; padding: 0 8px; }
.register-step .palster-btn-secondary { margin-top: 8px; }
#registerStepCode .palster-btn-primary { margin-top: 12px; }

/* Continue with Google: Google's own button colours (its branding rules), our size. */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #747775;
  border-radius: 8px;
  background: #FFFFFF;
  color: #1F1F1F;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.google-btn:hover { background: #F2F2F2; }
@media (pointer: coarse) { .google-btn::after { content: ''; position: absolute; inset-inline-start: -1px; inset-inline-end: -1px; top: min(-1px, calc((100% - 44px) / 2 - 1px)); bottom: min(-1px, calc((100% - 44px) / 2 - 1px)); } }
.google-btn:focus-visible { outline: 2px solid var(--outer-teal); outline-offset: 2px; }
.google-btn .google-g { width: 20px; height: 20px; flex: none; }
[data-theme="dark"] .google-btn { background: #131314; border-color: #8E918F; color: #E3E3E3; }
[data-theme="dark"] .google-btn:hover { background: #1F1F21; }
#passkeySignIn:not([hidden]) + #googleSignIn .auth-divider { display: none; }
#passkeySignIn:not([hidden]) + #googleSignIn .google-btn { margin-top: 8px; }

/* reCAPTCHA v3 (recaptcha.py): Google's corner badge is hidden and its notice
   sits under the form instead, which Google allows. */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; text-align: center; color: var(--outer-mute); }
.recaptcha-note a { color: inherit; text-decoration: underline; }
.recaptcha-note[hidden] { display: none; }

/* What you can do on Palster: below the doorway, for people (and search
   engines) who want to know what is inside before they join. */
.landing-features {
  position: relative;
  z-index: 10;
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 48px 0 8px;
  border-top: 1px solid var(--outer-line);
}
.landing-features h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--outer-ink);
}
.landing-features h2,
.landing-features .lf-lede,
.landing-features h3,
.landing-features p { text-shadow: 0 0 16px var(--outer-bg), 0 0 28px var(--outer-bg); }
.lf-lede { margin: 0 0 32px; max-width: 520px; color: var(--outer-mute); }
.lf-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.lf-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: start; align-content: start; }
/* One family, the Palsenger app icon's: a tile in a two-stop vertical gradient, one solid
   mark with a cut-out in it. Each stop holds 3:1 under white; the same in both themes. */
.lf-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--lf-top), var(--lf-foot));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 1px 2px rgba(0, 0, 0, 0.16), 0 10px 18px -10px var(--lf-foot);
  overflow: hidden;
  forced-color-adjust: none;
}
.lf-icon svg { display: block; width: 100%; height: 100%; }
.lf-pulse { --lf-top: #F43F5E; --lf-foot: #BE123C; }
.lf-palsenger { --lf-top: #06A6A3; --lf-foot: #047C80; }
.lf-spaces { --lf-top: #A855F7; --lf-foot: #7E22CE; }
.lf-campfire { --lf-top: #818CF8; --lf-foot: #4F46E5; }
.lf-mart { --lf-top: #EA580C; --lf-foot: #C2410C; }
.lf-pages { --lf-top: #16A34A; --lf-foot: #15803D; }
.lf-item h3 { margin: 2px 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--outer-ink); }
.lf-item p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--outer-mute); }
.lf-link {
  display: inline-block;
  padding: 10px 0;
  margin: -4px 0 -10px;
  color: var(--outer-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lf-link:hover { text-decoration-thickness: 2px; }
.lf-link:focus-visible { outline: 2px solid var(--outer-teal); outline-offset: 2px; border-radius: 4px; }
.lf-more { margin: 32px 0 0; }
@media (min-width: 600px) {
  .lf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .lf-item { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .lf-icon { width: 72px; height: 72px; border-radius: 20px; }
  .lf-item h3 { margin-top: 0; }
}
@media (min-width: 960px) { .lf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 48px; } }

/* Language picker in the footer (js/i18n.js mountPickers): one centred pill that hugs the
   language in use and opens Palster's own list in the page's theme (a phone's native list follows
   the phone, not the page): a sheet from the bottom on phones, a menu beside the pill above that. */
:root { --outer-menu: #FFFFFF; --outer-hl: rgba(0, 0, 0, 0.06); --outer-hl-hover: rgba(0, 0, 0, 0.09); }
[data-theme="dark"] { --outer-menu: #16171C; --outer-hl: rgba(255, 255, 255, 0.10); --outer-hl-hover: rgba(255, 255, 255, 0.15); }
.policy-lang { display: flex; justify-content: center; margin: 20px 0 4px; }
.policy-lang-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin: 0;
  padding-inline: 12px 10px;
  border: 1px solid var(--outer-line);
  border-radius: 999px;
  background: var(--outer-fill);
  color: var(--outer-mute);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.policy-lang-pill svg { flex: none; }
.policy-lang-name { color: var(--outer-ink); font-weight: 500; }
.policy-lang-pill:hover, .policy-lang-pill[aria-expanded="true"] { color: var(--outer-ink); border-color: var(--outer-mute); }
.policy-lang-pill:focus-visible { outline: 2px solid var(--outer-teal); outline-offset: 2px; }
/* 44px under a finger without drawing it bigger (insets count inside the border). */
@media (pointer: coarse) {
  .policy-lang-pill::after { content: ""; position: absolute; inset-inline: -1px; top: -7px; bottom: -7px; }
}

.policy-lang-menu {
  position: fixed;
  z-index: 100600;
  width: 272px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--outer-menu);
  color: var(--outer-ink);
  border: 1px solid var(--outer-card-edge);
  border-radius: 16px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.08);
  font-family: var(--font-body);
  animation: policy-lang-in .14s ease-out;
}
.policy-lang-menu-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--outer-mute);
}
.policy-lang-list { overflow-y: auto; overscroll-behavior: contain; padding: 0 6px 6px; }
.policy-lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding-inline: 10px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}
.policy-lang-opt:hover, .policy-lang-opt:focus-visible { background: var(--outer-hl-hover); }
.policy-lang-opt[aria-selected="true"] { background: var(--outer-hl); font-weight: 600; }
.policy-lang-opt-name { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.policy-lang-opt-en { flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 400; color: var(--outer-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.policy-lang-check { flex: none; margin-inline-start: auto; visibility: hidden; color: var(--outer-ink); }
.policy-lang-opt[aria-selected="true"] .policy-lang-check { visibility: visible; }

/* Phones: a solid sheet from the bottom, full width, over a scrim; the page holds still under it. */
.policy-lang-scrim { position: fixed; inset: 0; z-index: 100590; background: rgba(0, 0, 0, 0.4); animation: policy-lang-fade .18s ease-out; }
html.policy-lang-locked, html.policy-lang-locked body { overflow: hidden; }
.policy-lang-menu.is-sheet {
  inset-inline: 0;
  bottom: 0;
  width: auto;
  max-height: min(72vh, 600px);
  border-radius: 20px 20px 0 0;
  border-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: policy-lang-up .22s cubic-bezier(.2, .8, .2, 1);
}
.policy-lang-menu.is-sheet::before { content: ""; flex: none; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--outer-line); }
.policy-lang-menu.is-sheet .policy-lang-menu-title { padding: 10px 20px 8px; font-size: 15px; color: var(--outer-ink); }
.policy-lang-menu.is-sheet .policy-lang-list { padding: 0 8px 12px; }
.policy-lang-menu.is-sheet .policy-lang-opt { min-height: 48px; padding-inline: 12px; font-size: 15px; }
@keyframes policy-lang-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes policy-lang-up { from { transform: translateY(100%); } }
@keyframes policy-lang-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .policy-lang-menu, .policy-lang-scrim { animation: none; } }

/* After a language change (js/i18n.js offerWayBack): the way back, in the language just left. The
   app draws it with css/translate.css, which these pages don't load; here it floats near the top,
   clear of the theme switch, in the page's own colours. */
.lang-switched {
  position: fixed;
  top: calc(60px + env(safe-area-inset-top, 0px));
  inset-inline: 16px;
  margin-inline: auto;
  max-width: 560px;
  z-index: 100600;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border: 1px solid var(--outer-card-edge);
  border-radius: 14px;
  background: var(--outer-menu);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.08);
  color: var(--outer-ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.35;
  animation: policy-lang-in .18s ease-out;
}
.lang-switched > svg { flex-shrink: 0; color: var(--outer-mute); }
.lang-switched-text { flex: 1 1 180px; min-width: 0; unicode-bidi: plaintext; }
.lang-switched button {
  position: relative;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  unicode-bidi: isolate;
}
.lang-switched-back { border: 0; background: #047C80; color: #FFFFFF; }
.lang-switched-back:hover { background: #04666A; }
.lang-switched-keep { border: 1px solid var(--outer-line); background: transparent; color: var(--outer-ink); }
.lang-switched-keep:hover { background: var(--outer-hl); }
.lang-switched button:focus-visible { outline: 2px solid var(--outer-ink); outline-offset: 2px; }
@media (pointer: coarse) { .lang-switched button::after { content: ""; position: absolute; inset-inline: 0; top: -6px; bottom: -6px; } }
@media (prefers-reduced-motion: reduce) { .lang-switched { animation: none; } }
