/* ── Fonts ────────────────────────────────────────────────────────────── */
/* Loaded via <link> in <head> — Noto Serif JP (headings) + Noto Sans JP (body) */

/* ── Design Tokens ────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:         #4F46E5;
  --primary-light:   #818CF8;
  --primary-dark:    #3730A3;
  --accent:          #EA580C;
  --accent-hover:    #C2410C;

  /* Surface */
  --bg:              #EEF2FF;
  --surface:         #FFFFFF;
  --surface-muted:   #F8FAFF;
  --border:          #C7D2FE;

  /* Text */
  --text:            #1E1B4B;
  --text-muted:      #6B7280;
  --text-light:      #9CA3AF;

  /* Verdicts */
  --polite:          #16a34a;
  --polite-light:    #22c55e;
  --polite-bg:       #f0fdf4;
  --polite-border:   #86efac;
  --caution:         #b45309;
  --caution-light:   #f59e0b;
  --caution-bg:      #fffbeb;
  --caution-border:  #fcd34d;
  --rude:            #b91c1c;
  --rude-light:      #ef4444;
  --rude-bg:         #fef2f2;
  --rude-border:     #fca5a5;

  /* Claymorphism */
  --clay-radius:     20px;
  --clay-radius-sm:  14px;
  --clay-radius-xs:  10px;
  --clay-border:     3px solid var(--border);
  --clay-shadow:     5px 5px 14px rgba(79,70,229,0.13),
                     inset -2px -2px 8px rgba(255,255,255,0.75),
                     inset 2px 2px 6px rgba(79,70,229,0.06);
  --clay-shadow-sm:  3px 3px 8px rgba(79,70,229,0.1),
                     inset -1px -1px 4px rgba(255,255,255,0.7);

  /* Typography */
  --font-serif: 'Noto Serif JP', 'Georgia', serif;
  --font-sans:  'Noto Sans JP', 'Segoe UI', system-ui, sans-serif;

  /* Motion */
  --ease-out:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-std:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:   150ms;
  --dur-std:    220ms;
  --dur-slow:   350ms;

  /* Layout */
  --max-w:      740px;
  --header-h:   60px;
}

/* ── Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }

img, svg { display: block; }

/* ── Reduced Motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .blob { display: none; }
}

/* ── Privacy Modal ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 1.25rem;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius);
  box-shadow: var(--clay-shadow);
  padding: 2.25rem 2rem 2rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  animation: popIn var(--dur-slow) var(--ease-out);
}

.modal-globe {
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.modal-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.modal-box p:last-of-type { margin-bottom: 1.5rem; }
.modal-box p strong { color: var(--text); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border: 3px solid rgba(255,255,255,0.25);
  border-radius: var(--clay-radius-sm);
  cursor: pointer;
  box-shadow: 3px 3px 10px rgba(234,88,12,0.35),
              inset -1px -1px 4px rgba(0,0,0,0.12);
  transition: background var(--dur-std) var(--ease-std),
              transform var(--dur-fast) var(--ease-std),
              box-shadow var(--dur-fast) var(--ease-std);
  user-select: none;
  text-decoration: none;
}
.btn-cta:hover {
  background: var(--accent-hover);
  text-decoration: none;
  box-shadow: 4px 5px 14px rgba(194,65,12,0.4),
              inset -1px -1px 4px rgba(0,0,0,0.15);
}
.btn-cta:active {
  transform: translateY(2px) scale(0.97);
  box-shadow: 1px 2px 6px rgba(234,88,12,0.25),
              inset 2px 2px 5px rgba(0,0,0,0.1);
}
.btn-cta:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn-check {
  width: 100%;
  padding: 0.85rem;
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.btn-donate {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  border: 2px solid #fde68a;
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
  box-shadow: var(--clay-shadow-sm);
  text-decoration: none;
}
.btn-donate:hover {
  background: #fde68a;
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-donate:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-donate-lg { font-size: 0.88rem; padding: 0.55rem 1.2rem; }

/* ── Site Header ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1.5px solid var(--border);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1.1rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  cursor: pointer;
  flex: 0 0 auto;
  margin-right: auto;
}
.logo:hover { text-decoration: none; }
.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79,70,229,0.35);
}
.logo-globe {
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.55s var(--ease-std);
}
.logo:hover .logo-globe { transform: rotate(180deg); }
.logo-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo-dot { color: var(--primary); }

/* ── Main Content ─────────────────────────────────────────────────────── */
main { flex: 1; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 1.25rem 2.5rem;
  text-align: center;
}
/* Dissolve the clipped blob background into the page colour so the bottom
   edge of the hero has no visible seam. */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(to bottom, rgba(238,242,255,0) 0%, var(--bg) 100%);
  z-index: 0;
  pointer-events: none;
}

.hero-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.blob-1 { width: 380px; height: 380px; background: #a5b4fc; opacity: 0.35; top: -120px; right: -60px; animation: blobDrift1 12s ease-in-out infinite; }
.blob-2 { width: 280px; height: 280px; background: #fdba74; opacity: 0.2; bottom: -60px; left: -60px; animation: blobDrift2 15s ease-in-out infinite; }
.blob-3 { width: 220px; height: 220px; background: var(--primary); opacity: 0.12; top: 40%; left: 25%; animation: blobDrift3 10s ease-in-out infinite; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.85);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  box-shadow: var(--clay-shadow-sm);
  animation: heroFadeUp 0.55s 0.05s var(--ease-out) both;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  animation: heroFadeUp 0.6s 0.18s var(--ease-out) both;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: heroFadeUp 0.6s 0.18s var(--ease-out) both,
             gradientShift 6s 0.8s ease-in-out infinite alternate;
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto;
  animation: heroFadeUp 0.55s 0.32s var(--ease-out) both;
}
.hero-sub strong { color: var(--text); }

/* ── Form Section ─────────────────────────────────────────────────────── */
.form-section {
  padding: 0 1.25rem 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.form-card {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius);
  box-shadow: var(--clay-shadow);
  /* 'backwards' (not 'both'): don't keep transform:translateY(0) after the
     entrance animation — a lingering transform creates a stacking context that
     would trap an open dropdown panel behind later sections. */
  animation: heroFadeUp 0.6s 0.44s var(--ease-out) backwards;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-field label svg { color: var(--primary); flex-shrink: 0; }

.field-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.4;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 500px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* Inputs & Selects */
input[type="text"],
select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-muted);
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-xs);
  padding: 0.7rem 0.9rem;
  width: 100%;
  min-height: 48px;
  transition: border-color var(--dur-fast) var(--ease-std),
              box-shadow var(--dur-fast) var(--ease-std);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.18);
}
input[type="text"] { cursor: text; }

input.field-error,
select.field-error {
  border-color: var(--rude-light);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.14);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234F46E5' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
}

/* ── Result Section ───────────────────────────────────────────────────── */
.result-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

/* Loading */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Result Card — Claymorphism */
.result-card {
  margin-bottom: 2rem;
  background: var(--surface);
  border-radius: var(--clay-radius);
  border: 3px solid;
  overflow: hidden;
  animation: slideUp var(--dur-slow) var(--ease-out);
}

.result-card.verdict-polite {
  border-color: var(--polite-border);
  box-shadow: 5px 6px 18px rgba(34,197,94,0.2),
              inset -2px -2px 8px rgba(255,255,255,0.8);
}
.result-card.verdict-caution {
  border-color: var(--caution-border);
  box-shadow: 5px 6px 18px rgba(245,158,11,0.2),
              inset -2px -2px 8px rgba(255,255,255,0.8);
}
.result-card.verdict-rude {
  border-color: var(--rude-border);
  box-shadow: 5px 6px 18px rgba(239,68,68,0.2),
              inset -2px -2px 8px rgba(255,255,255,0.8);
}

/* Colored top accent line */
.result-card::before {
  content: '';
  display: block;
  height: 5px;
  width: 100%;
}
.result-card.verdict-polite::before  { background: var(--polite-light); }
.result-card.verdict-caution::before { background: var(--caution-light); }
.result-card.verdict-rude::before    { background: var(--rude-light); }

/* Verdict Badge */
.verdict-badge {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.25rem 1.5rem 0.75rem;
}

.badge-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
}
.verdict-polite  .badge-dot { background: var(--polite-light);  box-shadow: 0 0 0 4px var(--polite-border);  animation: pulseGreen  1.8s 0.3s ease-out 3; }
.verdict-caution .badge-dot { background: var(--caution-light); box-shadow: 0 0 0 4px var(--caution-border); animation: pulseAmber  1.8s 0.3s ease-out 3; }
.verdict-rude    .badge-dot { background: var(--rude-light);    box-shadow: 0 0 0 4px var(--rude-border);    animation: pulseRed    1.8s 0.3s ease-out 3; }

.badge-label {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.verdict-polite  .badge-label { color: var(--polite); }
.verdict-caution .badge-label { color: var(--caution); }
.verdict-rude    .badge-label { color: var(--rude); }

/* Card Body */
.card-body {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-section h3 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.45rem;
}

.card-section p {
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.75;
}

.local-tip-text {
  background: var(--surface-muted);
  border-left: 3.5px solid var(--primary-light);
  border-radius: 0 var(--clay-radius-xs) var(--clay-radius-xs) 0;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}

/* Also Check Grid */
.also-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.75rem;
}

.also-card {
  background: var(--bg);
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-xs);
  padding: 0.85rem 1rem;
  box-shadow: var(--clay-shadow-sm);
  animation: alsoCardIn 0.4s var(--ease-out) both;
}
.also-card:nth-child(1) { animation-delay: 0.35s; }
.also-card:nth-child(2) { animation-delay: 0.48s; }
.also-card:nth-child(3) { animation-delay: 0.61s; }

.also-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.mini-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mini-dot.polite  { background: var(--polite-light); }
.mini-dot.caution { background: var(--caution-light); }
.mini-dot.rude    { background: var(--rude-light); }

.also-country {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
}
.also-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Error Card */
.error-card {
  margin-bottom: 2rem;
  background: var(--surface);
  border: 2.5px solid var(--rude-border);
  border-radius: var(--clay-radius);
  padding: 2.25rem 1.5rem;
  text-align: center;
  animation: slideUp var(--dur-slow) var(--ease-out);
  box-shadow: 3px 4px 12px rgba(239,68,68,0.12);
}
.error-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.error-message {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-xs);
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
  box-shadow: var(--clay-shadow-sm);
}
.retry-btn:hover { background: var(--bg); transform: translateY(-1px); }

/* ── Section Commons ──────────────────────────────────────────────────── */
.section-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.75rem;
}

/* ── Popular Examples ─────────────────────────────────────────────────── */
.examples-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.examples-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.example-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: 50px;
  padding: 0.45rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-std),
              border-color var(--dur-fast) var(--ease-std),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-std);
  box-shadow: var(--clay-shadow-sm);
  user-select: none;
}
.example-chip:hover {
  background: var(--bg);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 3px 4px 10px rgba(79,70,229,0.18);
}
.example-chip:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 1px 1px 4px rgba(79,70,229,0.1);
}
.example-chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.chip-country {
  color: var(--primary);
  font-weight: 600;
}

/* ── How It Works ─────────────────────────────────────────────────────── */
.how-section {
  background: var(--surface);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  padding: 2.75rem 1.25rem;
}

.steps-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 600px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }

.step-card {
  background: var(--bg);
  border: var(--clay-border);
  border-radius: var(--clay-radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  position: relative;
  box-shadow: var(--clay-shadow);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-std);
  cursor: default;
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 7px 12px 26px rgba(79,70,229,0.2),
              inset -2px -2px 8px rgba(255,255,255,0.75);
}

.step-num {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(79,70,229,0.35);
}

.step-icon {
  color: var(--primary);
  display: flex;
  justify-content: center;
  margin: 0.6rem 0 0.85rem;
}

.step-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.step-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── FAQ Section ──────────────────────────────────────────────────────── */
.faq-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.75rem 1.25rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  /* size each item to its own content so opening one doesn't stretch its
     row-neighbour; combined with single-open accordion (JS), no scroll needed */
  align-items: start;
}
@media (min-width: 600px) { .faq-grid { grid-template-columns: 1fr 1fr; } }

.faq-item {
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-sm);
  overflow: hidden;
  box-shadow: var(--clay-shadow-sm);
  transition: border-color var(--dur-fast);
}
.faq-item:hover { border-color: var(--primary-light); }

.faq-item summary {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.4;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--primary-light);
  flex-shrink: 0;
  line-height: 1;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item[open] summary { color: var(--primary); }

.faq-item p {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.75;
  border-top: 1.5px solid var(--border);
  padding-top: 0.85rem;
}
.faq-item p strong { color: var(--text); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--border);
  padding: 2.25rem 1.25rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand { max-width: 380px; }
.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.footer-support { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-support p { font-size: 0.82rem; color: var(--text-muted); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 1.4rem;
  margin: 0.15rem 0;
}
.footer-links a,
.footer-links .link-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1.4;
}
.footer-links a:hover,
.footer-links .link-btn:hover { text-decoration: underline; }

.privacy-notice { font-size: 0.78rem; color: var(--text-light); line-height: 1.5; max-width: 540px; }
.privacy-notice a { color: var(--primary); }
.copyright { font-size: 0.75rem; color: var(--text-light); }

/* ── Chip entrance (applied via JS with animation-delay) ──────────────── */
.chip-enter {
  animation: chipPop 0.35s var(--ease-out) both;
}

/* ── Animations ───────────────────────────────────────────────────────── */

/* Result / Error card entrance */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal entrance */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Hero elements staggered entrance */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Gradient text shimmer */
@keyframes gradientShift {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

/* Blob slow drift — each blob gets its own path */
@keyframes blobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(28px, -22px) scale(1.06); }
  66%       { transform: translate(-14px, 16px) scale(0.96); }
}
@keyframes blobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-22px, 18px) scale(1.04); }
  75%       { transform: translate(18px, -12px) scale(0.97); }
}
@keyframes blobDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(14px, 22px) scale(1.05); }
}

/* Verdict badge dot — 3 pulses after result loads */
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 4px var(--polite-border); }
  50%       { box-shadow: 0 0 0 9px rgba(34,197,94,0.18), 0 0 0 4px var(--polite-border); }
}
@keyframes pulseAmber {
  0%, 100% { box-shadow: 0 0 0 4px var(--caution-border); }
  50%       { box-shadow: 0 0 0 9px rgba(245,158,11,0.18), 0 0 0 4px var(--caution-border); }
}
@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 4px var(--rude-border); }
  50%       { box-shadow: 0 0 0 9px rgba(239,68,68,0.18), 0 0 0 4px var(--rude-border); }
}

/* Also-check card pop-in */
@keyframes alsoCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Example chip pop-in */
@keyframes chipPop {
  from { opacity: 0; transform: scale(0.82) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Responsive Tweaks ────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .hero { padding: 4.5rem 1.25rem 3rem; }
  .form-card { padding: 2.25rem; }
  .card-body { padding: 0 2rem 2rem; }
  .verdict-badge { padding: 1.5rem 2rem 1rem; }
}

.hide-mobile { display: none; }
@media (min-width: 600px) { .hide-mobile { display: inline; } }

/* ═══════════════════════════════════════════════════════════════════════
   NEW FEATURE STYLES
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Offline / Cached Banners ─────────────────────────────────────────── */
.offline-banner,
.cached-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  text-align: center;
}
.offline-banner {
  background: #fef3c7;
  color: #92400e;
  border-bottom: 2px solid #fde68a;
}
.cached-banner {
  background: #ede9fe;
  color: #5b21b6;
  border-bottom: 2px solid #ddd6fe;
}
.offline-banner.hidden,
.cached-banner.hidden { display: none; }

/* ── App Navigation (inline in header on desktop, scrollable row on mobile) ── */
.app-nav {
  order: 3;
  flex-basis: 100%;
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app-nav::-webkit-scrollbar { display: none; }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  /* vertical room so the active pill's shadow isn't clipped by the
     scroll container (overflow-x:auto also clips the y-axis) */
  padding: 0.6rem 0.15rem;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  min-height: 40px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-std),
              background var(--dur-fast) var(--ease-std);
}
.nav-tab svg { flex-shrink: 0; }
.nav-tab:hover { color: var(--primary); background: rgba(79,70,229,0.07); }
.nav-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.nav-tab.nav-active {
  color: #fff;
  background: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(79,70,229,0.3);
}
.nav-tab.nav-active:hover { color: #fff; background: var(--primary); }

.history-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 50px;
  line-height: 1;
}
.nav-active .history-badge { background: #fff; color: var(--primary); }

/* Desktop: logo + nav + support on a single row */
@media (min-width: 1000px) {
  .header-inner { flex-wrap: nowrap; gap: 1rem; }
  .app-nav { order: 0; flex-basis: auto; flex: 1 1 auto; justify-content: center; }
  .logo { margin-right: 0; }
}
.history-badge.hidden { display: none; }

/* ── View System ──────────────────────────────────────────────────────── */
.view { display: none; }
.view.view-active { display: block; }

/* ── Inner View Wrapper (Guide / Quiz / History) ──────────────────────── */
.inner-view-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.inner-view-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.view-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--bg);
  border: var(--clay-border);
  border-radius: 50%;
  color: var(--primary);
  margin: 0 auto 1rem;
  box-shadow: var(--clay-shadow-sm);
}

.inner-view-hero h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}
.inner-view-hero p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto;
}

.inner-controls { margin-bottom: 2rem; }

/* ── Share Button (injected into result card) ─────────────────────────── */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
  box-shadow: var(--clay-shadow-sm);
  margin: 0 1.5rem 1.5rem;
}
.share-btn:hover { background: var(--surface); border-color: var(--primary-light); transform: translateY(-1px); }
.share-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.share-btn.copied { color: var(--polite); border-color: var(--polite-border); background: var(--polite-bg); }

/* ── Country Guide ────────────────────────────────────────────────────── */
.guide-intro {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--clay-shadow-sm);
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  animation: slideUp var(--dur-slow) var(--ease-out) both;
}
.guide-intro strong { color: var(--text); }

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 560px) { .guide-grid { grid-template-columns: 1fr 1fr; } }

.guide-tip {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius-sm);
  padding: 1.25rem;
  box-shadow: var(--clay-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: slideUp var(--dur-slow) var(--ease-out) both;
}

.guide-tip-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.guide-tip-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(79,70,229,0.3);
}

.guide-tip-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  padding-top: 0.15rem;
}

.guide-tip-body {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: calc(28px + 0.75rem);
}

.guide-tip-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  background: var(--bg);
  color: var(--primary);
  border: 1.5px solid var(--border);
  margin-left: calc(28px + 0.75rem);
}

/* ── Quiz ─────────────────────────────────────────────────────────────── */
.quiz-card {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius);
  overflow: hidden;
  box-shadow: var(--clay-shadow);
  animation: slideUp var(--dur-slow) var(--ease-out) both;
}

.quiz-progress-wrap {
  background: var(--border);
  height: 5px;
  width: 100%;
}
.quiz-progress-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 0 3px 3px 0;
  transition: width 0.4s var(--ease-std);
}

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem 0;
}
.quiz-counter {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
}
.quiz-country-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.2rem 0.6rem;
}

.quiz-question {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  padding: 1rem 1.5rem 1.25rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 1.5rem 1.5rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-xs);
  padding: 0.8rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
  animation: slideUp 0.3s var(--ease-out) both;
}
.quiz-option:nth-child(1) { animation-delay: 0.05s; }
.quiz-option:nth-child(2) { animation-delay: 0.12s; }
.quiz-option:nth-child(3) { animation-delay: 0.19s; }
.quiz-option:nth-child(4) { animation-delay: 0.26s; }

.quiz-option:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--primary-light);
  transform: translateX(3px);
}
.quiz-option:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.quiz-option:disabled { cursor: default; transform: none; }

.quiz-option.correct {
  background: var(--polite-bg);
  border-color: var(--polite-border);
  color: var(--polite);
}
.quiz-option.wrong {
  background: var(--rude-bg);
  border-color: var(--rude-border);
  color: var(--rude);
}

.quiz-opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.quiz-option.correct .quiz-opt-letter { background: var(--polite-border); color: var(--polite); }
.quiz-option.wrong   .quiz-opt-letter { background: var(--rude-border);   color: var(--rude); }

.quiz-explanation {
  margin: 0 1.5rem 0;
  padding: 1rem;
  border-radius: var(--clay-radius-xs);
  font-size: 0.85rem;
  line-height: 1.7;
  animation: slideUp 0.3s var(--ease-out) both;
}
.quiz-explanation.correct { background: var(--polite-bg); border: 2px solid var(--polite-border); color: var(--polite); }
.quiz-explanation.wrong   { background: var(--rude-bg);   border: 2px solid var(--rude-border);   color: var(--rude); }
.quiz-exp-verdict { font-weight: 800; margin-bottom: 0.35rem; }
.quiz-explanation p:last-child { color: var(--text-muted); font-weight: 400; margin-top: 0.25rem; }

.quiz-next-btn {
  display: block;
  width: calc(100% - 3rem);
  margin: 1rem 1.5rem 1.5rem;
}

/* Score card */
.quiz-score-card {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: var(--clay-shadow);
  animation: popIn var(--dur-slow) var(--ease-out) both;
}

.score-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 6px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  background: var(--bg);
  box-shadow: var(--clay-shadow);
}
.score-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.score-msg {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.score-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; }
.score-breakdown { margin-bottom: 1.5rem; }
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
}
.score-row:last-child { border-bottom: none; }
.score-row-q { color: var(--text-muted); text-align: left; max-width: 75%; }
.score-row-r { font-weight: 700; flex-shrink: 0; }
.score-row-r.win { color: var(--polite); }
.score-row-r.loss { color: var(--rude); }

/* ── History ──────────────────────────────────────────────────────────── */
.history-view-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  flex-wrap: wrap;
}
.history-hero-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.history-hero-left .view-icon-wrap { margin: 0; flex-shrink: 0; }
.history-hero-left h2 { text-align: left; margin-bottom: 0.1rem; }
.history-hero-left p { text-align: left; }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  color: var(--rude);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid var(--rude-border);
  border-radius: var(--clay-radius-xs);
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
  flex-shrink: 0;
}
.btn-danger:hover { background: var(--rude-bg); transform: translateY(-1px); }

.history-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.history-empty-icon { color: var(--border); margin-bottom: 0.75rem; display: flex; justify-content: center; }

.history-group { margin-bottom: 1.75rem; }
.history-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid var(--border);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
  box-shadow: var(--clay-shadow-sm);
  animation: slideUp 0.3s var(--ease-out) both;
}
.history-item:hover {
  border-color: var(--primary-light);
  transform: translateX(3px);
  box-shadow: 3px 4px 10px rgba(79,70,229,0.12);
}

.history-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.history-dot.polite  { background: var(--polite-light); }
.history-dot.caution { background: var(--caution-light); }
.history-dot.rude    { background: var(--rude-light); }

.history-item-body { flex: 1; min-width: 0; }
.history-gesture {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
  flex-wrap: wrap;
}
.history-country { font-size: 0.78rem; color: var(--primary); font-weight: 600; }
.history-ctx {
  font-size: 0.7rem;
  color: var(--text-light);
  background: var(--bg);
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
  border: 1px solid var(--border);
}
.history-time { font-size: 0.72rem; color: var(--text-light); margin-left: auto; flex-shrink: 0; }

.history-replay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--primary);
  flex-shrink: 0;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.history-item:hover .history-replay { background: var(--surface); border-color: var(--primary-light); }

/* ═══════════════════════════════════════════════════════════════════════
   TRUST LAYER · COMPARE · TRIP · OFFLINE PACKS
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Confidence badge (Check result) ──────────────────────────────────── */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-light);
  white-space: nowrap;
}
.conf-pips { display: inline-flex; gap: 2px; }
.conf-pip { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.confidence-badge.conf-high   { color: var(--polite);  border-color: var(--polite-border); background: var(--polite-bg); }
.confidence-badge.conf-medium { color: var(--caution); border-color: var(--caution-border); background: var(--caution-bg); }
.confidence-badge.conf-low    { color: var(--rude);    border-color: var(--rude-border); background: var(--rude-bg); }
.conf-high   .conf-pip.on { background: var(--polite); }
.conf-medium .conf-pip.on { background: var(--caution); }
.conf-low    .conf-pip.on { background: var(--rude); }

/* ── Regional caveat note ─────────────────────────────────────────────── */
.caveat-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--caution-bg);
  border: 1.5px solid var(--caution-border);
  border-radius: var(--clay-radius-xs);
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}
.caveat-note svg { color: var(--caution); flex-shrink: 0; margin-top: 0.15rem; }
.caveat-note strong { color: var(--caution); }

/* ── Result footnote (trust disclaimer) ───────────────────────────────── */
.result-footnote {
  padding: 0.85rem 1.5rem;
  border-top: 1.5px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.55;
  background: var(--surface-muted);
}

/* ── Form helpers ─────────────────────────────────────────────────────── */
.form-row-3 { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
@media (min-width: 560px) { .form-row-3 { grid-template-columns: 1fr 1fr 1fr; } }
.label-opt { color: var(--text-light); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ── Offline packs strip (Guide) ──────────────────────────────────────── */
.offline-packs {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--clay-shadow-sm);
}
.offline-packs.hidden { display: none; }
.packs-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 0.55rem;
}
.packs-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 0.4rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.pack-chip:hover { background: var(--surface); border-color: var(--primary-light); transform: translateY(-1px); }
.pack-chip svg { color: var(--primary); }

/* ── Save-for-offline button (in guide result) ───────────────────────── */
.guide-intro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.guide-intro-top strong { font-size: 1.05rem; color: var(--text); }
.guide-intro-text { margin-top: 0.5rem; }
.guide-cached-tag { display: block; margin-top: 0.3rem; font-size: 0.72rem; color: var(--text-light); }
.pack-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
  flex-shrink: 0;
}
.pack-save-btn:hover { background: var(--surface); border-color: var(--primary-light); transform: translateY(-1px); }
.pack-save-btn.saved { color: var(--polite); border-color: var(--polite-border); background: var(--polite-bg); }

/* ── Compare ──────────────────────────────────────────────────────────── */
.cmp-gesture-banner {
  text-align: center;
  margin-bottom: 0.75rem;
}
.cmp-gesture-banner span {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--surface);
  border: var(--clay-border);
  border-radius: 50px;
  padding: 0.4rem 1.1rem;
  box-shadow: var(--clay-shadow-sm);
}
.cmp-summary {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}
.cmp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 560px) { .cmp-grid { grid-template-columns: 1fr 1fr; } }
.cmp-card {
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-left-width: 6px;
  border-radius: var(--clay-radius-sm);
  padding: 1rem 1.1rem;
  box-shadow: var(--clay-shadow-sm);
  animation: slideUp 0.4s var(--ease-out) both;
}
.cmp-card.verdict-polite  { border-left-color: var(--polite-light); }
.cmp-card.verdict-caution { border-left-color: var(--caution-light); }
.cmp-card.verdict-rude    { border-left-color: var(--rude-light); }
.cmp-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}
.cmp-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.cmp-dot.polite { background: var(--polite-light); }
.cmp-dot.caution { background: var(--caution-light); }
.cmp-dot.rude { background: var(--rude-light); }
.cmp-country { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.cmp-verdict-tag {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
}
.cmp-verdict-tag.polite  { background: var(--polite-bg);  color: var(--polite); }
.cmp-verdict-tag.caution { background: var(--caution-bg); color: var(--caution); }
.cmp-verdict-tag.rude    { background: var(--rude-bg);    color: var(--rude); }
.cmp-note { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }

/* ── Trip ─────────────────────────────────────────────────────────────── */
.trip-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 0.6rem;
}
.trip-arrow { display: flex; align-items: center; justify-content: center; color: var(--primary); padding-bottom: 0.7rem; }
@media (max-width: 480px) {
  .trip-row { grid-template-columns: 1fr; }
  .trip-arrow { transform: rotate(90deg); padding: 0.2rem 0; }
}
.trip-route-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}
.trip-route-from, .trip-route-to {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: var(--clay-border);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  box-shadow: var(--clay-shadow-sm);
}
.trip-summary {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 580px;
  margin: 0 auto 1.5rem;
}
.trip-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.trip-card {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius-sm);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--clay-shadow-sm);
  animation: slideUp 0.4s var(--ease-out) both;
}
.trip-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.75rem;
}
.trip-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.trip-side {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--clay-radius-xs);
  padding: 0.7rem 0.8rem;
}
.trip-from-side { border-color: var(--border); }
.trip-to-side { border-color: var(--primary-light); background: var(--surface-muted); }
.trip-side-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}
.trip-to-side .trip-side-label { color: var(--primary); }
.trip-side p { font-size: 0.83rem; color: var(--text); line-height: 1.55; }
.trip-side-arrow { display: flex; align-items: center; justify-content: center; color: var(--primary); }
@media (max-width: 480px) {
  .trip-compare { grid-template-columns: 1fr; }
  .trip-side-arrow { transform: rotate(90deg); }
}
.trip-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  background: var(--polite-bg);
  border-left: 3px solid var(--polite-border);
  border-radius: 0 var(--clay-radius-xs) var(--clay-radius-xs) 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text);
}
.trip-tip svg { color: var(--polite); flex-shrink: 0; margin-top: 0.15rem; }

/* ═══════════════════════════════════════════════════════════════════════
   PROGRAMMATIC SEO PAGES (/etiquette/**)
   ═══════════════════════════════════════════════════════════════════════ */
.seo-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.seo-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}
.seo-breadcrumbs a { color: var(--primary); }
.seo-breadcrumbs a:hover { text-decoration: underline; }
.seo-breadcrumbs .bc-sep { color: var(--border); }
.seo-breadcrumbs [aria-current="page"] { color: var(--text-muted); font-weight: 600; }

.seo-hero { margin-bottom: 1.75rem; }
.seo-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.seo-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}
.seo-hero-sub {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* On SEO pages the card sections use <h2> instead of <h3> */
.seo-page .card-section h2 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.45rem;
}

.seo-cta {
  text-align: center;
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius);
  padding: 1.75rem 1.25rem;
  margin: 2rem 0;
  box-shadow: var(--clay-shadow-sm);
}
.seo-cta p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 1rem; }
.seo-cta .btn-cta { display: inline-flex; width: auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.seo-related { margin-top: 2.5rem; }
.seo-related-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 0 0.85rem;
}
.seo-rel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
@media (min-width: 560px) { .seo-rel-grid { grid-template-columns: 1fr 1fr; } }
.seo-rel-link {
  display: block;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--clay-radius-xs);
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--dur-fast), transform var(--dur-fast), background var(--dur-fast);
}
.seo-rel-link:hover { border-color: var(--primary-light); background: var(--bg); transform: translateX(3px); color: var(--primary); }
.seo-hub-link { margin-top: 1.25rem; font-size: 0.9rem; }
.seo-hub-link a { color: var(--primary); font-weight: 600; }
.seo-hub-link a:hover { text-decoration: underline; }

/* Country hub — gesture grid */
.seo-gesture-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
@media (min-width: 560px) { .seo-gesture-grid { grid-template-columns: 1fr 1fr; } }
.seo-gesture-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-sm);
  padding: 0.9rem 1rem;
  box-shadow: var(--clay-shadow-sm);
  transition: border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.seo-gesture-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: 3px 4px 10px rgba(79,70,229,0.12); }
.seo-gc-head { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.seo-gc-title { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.seo-gc-verdict {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  flex-shrink: 0;
}
.seo-gc-verdict.polite  { background: var(--polite-bg);  color: var(--polite); }
.seo-gc-verdict.caution { background: var(--caution-bg); color: var(--caution); }
.seo-gc-verdict.rude    { background: var(--rude-bg);    color: var(--rude); }

/* SEO index — country grid */
.seo-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
}
.seo-country-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-sm);
  padding: 1rem;
  box-shadow: var(--clay-shadow-sm);
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}
.seo-country-card:hover { border-color: var(--primary-light); transform: translateY(-2px); }
.seo-cc-name { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; color: var(--text); }
.seo-cc-count { font-size: 0.74rem; color: var(--text-light); }

/* ═══════════════════════════════════════════════════════════════════════
   CUSTOM COMBOBOX (modern dropdown — enhances native <select>)
   ═══════════════════════════════════════════════════════════════════════ */
.cbx { position: relative; }
.cbx.cbx-open { z-index: 50; } /* lift the open dropdown above sibling content */

/* Native <select> kept in DOM for value/form, visually hidden */
.cbx-native {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Trigger — matches the clay input look */
.cbx-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  text-align: left;
  background: var(--surface-muted);
  border: 2.5px solid var(--border);
  border-radius: var(--clay-radius-xs);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-std),
              box-shadow var(--dur-fast) var(--ease-std),
              background var(--dur-fast) var(--ease-std);
}
.cbx-trigger:hover { border-color: var(--primary-light); }
.cbx-trigger:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.18);
}
.cbx-open .cbx-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.18);
  background: var(--surface);
}
/* Error state mirrored from the hidden native select */
.cbx-native.field-error ~ .cbx-trigger {
  border-color: var(--rude-light);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.14);
}

.cbx-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbx-value.cbx-placeholder { color: var(--text-light); }

.cbx-chevron {
  flex-shrink: 0;
  color: var(--primary);
  transition: transform var(--dur-fast) var(--ease-out);
}
.cbx-open .cbx-chevron { transform: rotate(180deg); }

/* Floating panel */
.cbx-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 70;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--clay-radius-sm);
  box-shadow: 0 14px 34px rgba(30,27,75,0.16), inset 0 1px 0 rgba(255,255,255,0.7);
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.985);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity 0.16s var(--ease-std),
              transform 0.18s var(--ease-out),
              visibility 0s linear 0.18s;
}
.cbx-panel--up {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateY(6px) scale(0.985);
  transform-origin: bottom center;
}
.cbx-open .cbx-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.16s var(--ease-std), transform 0.18s var(--ease-out);
}

/* Search field inside panel */
.cbx-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.35rem;
}
.cbx-search-wrap svg {
  position: absolute;
  left: 0.75rem;
  color: var(--text-light);
  pointer-events: none;
}
.cbx-search {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.8rem 0.55rem 2.2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--clay-radius-xs);
}
.cbx-search:focus { outline: none; border-color: var(--primary-light); }

/* Options list */
.cbx-list {
  max-height: 244px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.cbx-list::-webkit-scrollbar { width: 8px; }
.cbx-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 50px; }

.cbx-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  color: var(--text);
  border-radius: var(--clay-radius-xs);
  cursor: pointer;
}
.cbx-option.cbx-hidden { display: none; }
.cbx-option.cbx-active { background: var(--bg); }
.cbx-option[aria-selected="true"] { color: var(--primary); font-weight: 700; }
.cbx-option[aria-selected="true"].cbx-active { background: var(--primary-bg, #eef2ff); }
.cbx-check {
  display: flex;
  align-items: center;
  color: var(--primary);
  opacity: 0;
  flex-shrink: 0;
}
.cbx-option[aria-selected="true"] .cbx-check { opacity: 1; }

.cbx-empty {
  padding: 1rem 0.7rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}
.cbx-empty.hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
  .cbx-panel { transition: opacity 0.001ms; transform: none; }
  .cbx-panel--up { transform: none; }
  .cbx-chevron { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   COMMUNITY ACCURACY · REPORTING · FEEDBACK
   ═══════════════════════════════════════════════════════════════════════ */
.accuracy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem 1.25rem;
  border-top: 1.5px solid var(--border);
}
.acc-left { min-width: 0; }
.acc-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  white-space: nowrap;
}
.acc-chip.acc-high { color: var(--polite); background: var(--polite-bg); border-color: var(--polite-border); }
.acc-chip.acc-mid  { color: var(--caution); background: var(--caution-bg); border-color: var(--caution-border); }
.acc-chip.acc-low  { color: var(--rude); background: var(--rude-bg); border-color: var(--rude-border); }
.acc-chip.acc-loading { color: var(--text-light); }

.acc-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.acc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.acc-btn:hover { transform: translateY(-1px); }
.acc-confirm:hover { border-color: var(--polite-border); color: var(--polite); background: var(--polite-bg); }
.acc-report:hover  { border-color: var(--caution-border); color: var(--caution); background: var(--caution-bg); }
.acc-btn svg { flex-shrink: 0; }
.acc-voted { font-size: 0.78rem; font-weight: 700; color: var(--polite); }

/* Report form */
.report-form {
  flex-basis: 100%;
  margin-top: 0.5rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--clay-radius-xs);
  padding: 0.9rem;
}
.report-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 0.45rem; }
.report-label span { font-weight: 400; color: var(--text-light); font-size: 0.76rem; }
.report-text {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--clay-radius-xs);
  padding: 0.6rem 0.7rem;
  resize: vertical;
}
.report-text:focus { outline: none; border-color: var(--primary-light); }
.report-fineprint { font-size: 0.72rem; color: var(--text-light); margin: 0.45rem 0; }
.report-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.report-actions .btn-cta { width: auto; padding: 0.5rem 1.1rem; }
.report-msg { font-size: 0.78rem; color: var(--rude); margin-top: 0.5rem; }

/* Community view */
.comm-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .comm-stats { grid-template-columns: repeat(4, 1fr); } }
.comm-stat {
  background: var(--surface);
  border: var(--clay-border);
  border-radius: var(--clay-radius-sm);
  box-shadow: var(--clay-shadow-sm);
  padding: 1.1rem 1rem;
  text-align: center;
}
.comm-ring {
  width: 72px; height: 72px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  border: 5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 900;
  background: var(--bg);
}
.comm-ring.acc-high { border-color: var(--polite-border); color: var(--polite); }
.comm-ring.acc-mid  { border-color: var(--caution-border); color: var(--caution); }
.comm-ring.acc-low  { border-color: var(--rude-border); color: var(--rude); }
.comm-num { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 900; color: var(--primary); line-height: 1.1; margin-bottom: 0.3rem; }
.comm-stat-label { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }

.comm-cols { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .comm-cols { grid-template-columns: 1fr 1fr; } }
.comm-col-title {
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--border);
}
.comm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--clay-radius-xs);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.5rem;
}
.comm-row-main { min-width: 0; }
.comm-gesture { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comm-meta { font-size: 0.74rem; color: var(--text-light); }
.comm-acc { font-size: 0.8rem; font-weight: 800; flex-shrink: 0; padding: 0.2rem 0.5rem; border-radius: 50px; }
.comm-acc.acc-high { color: var(--polite); background: var(--polite-bg); }
.comm-acc.acc-mid  { color: var(--caution); background: var(--caution-bg); }
.comm-acc.acc-low  { color: var(--rude); background: var(--rude-bg); }
.comm-none { font-size: 0.82rem; color: var(--text-light); }
.comm-note { margin-top: 1.75rem; font-size: 0.78rem; color: var(--text-light); text-align: center; line-height: 1.6; }
.comm-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.comm-empty-icon { color: var(--border); margin-bottom: 0.75rem; display: flex; justify-content: center; }

/* Consent modal points + feedback modal */
.modal-points { list-style: none; text-align: left; margin: 0.5rem 0 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.modal-points li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.modal-points li svg { color: var(--polite); flex-shrink: 0; margin-top: 0.15rem; }
.modal-points a { color: var(--primary); font-weight: 600; }

.modal-close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 2px solid var(--border); border-radius: 50%;
  color: var(--text-muted); cursor: pointer;
}
.modal-close:hover { border-color: var(--primary-light); color: var(--primary); }
.modal-fineprint { font-size: 0.74rem; color: var(--text-light); margin: 0.5rem 0; }
#feedback-text {
  width: 100%;
  font-family: var(--font-sans); font-size: 0.9rem; color: var(--text);
  background: var(--bg); border: 2px solid var(--border); border-radius: var(--clay-radius-xs);
  padding: 0.7rem 0.8rem; resize: vertical; margin-top: 0.5rem;
}
#feedback-text:focus { outline: none; border-color: var(--primary-light); }
#feedback-result { min-height: 1.2rem; font-size: 0.8rem; color: var(--rude); margin-bottom: 0.5rem; }

/* Footer privacy badge + link button */
.privacy-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.74rem; font-weight: 700; color: var(--polite);
  background: var(--polite-bg); border: 1.5px solid var(--polite-border);
  border-radius: 50px; padding: 0.3rem 0.8rem; margin-bottom: 0.6rem;
}
.link-btn {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--primary); cursor: pointer; text-decoration: underline;
}

/* Legal / privacy page */
.legal-page { max-width: 760px; }
.legal-section { margin-bottom: 1.75rem; }
.legal-section h2 {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.6rem;
}
.legal-section p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 0.6rem; }
.legal-section ul { margin: 0.4rem 0 0.6rem 1.1rem; }
.legal-section li { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 0.3rem; }
.legal-section strong { color: var(--text); }
.legal-section a { color: var(--primary); font-weight: 600; }

/* PII guard inline warning */
.pii-msg { font-size: 0.78rem; color: var(--rude); margin-top: 0.35rem; line-height: 1.45; }
