/* =========================================================
   HEREDITA — Chalkboard Theme
   Shared across all pages.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;700&family=Patrick+Hand&family=Architects+Daughter&family=Kalam:wght@300;400;700&family=Special+Elite&display=swap');

:root {
  /* Chalkboard greens */
  --board-1: #1e3a2a;
  --board-2: #16291f;
  --board-3: #0f2018;
  --board-edge: #0a160f;

  /* Chalk */
  --chalk: #f4f1e6;
  --chalk-soft: #e8e3d2;
  --chalk-faded: rgba(244, 241, 230, 0.55);
  --chalk-dust: rgba(244, 241, 230, 0.10);

  /* Accent (from logo) */
  --accent: #d97a3d;
  --accent-soft: #e89968;
  --accent-deep: #b35d28;

  /* Tier colors */
  --tier-guest-fg:    #c9d1c2;
  --tier-guest-bg:    rgba(180, 192, 170, 0.18);
  --tier-guest-bd:    rgba(201, 209, 194, 0.55);

  --tier-regular-fg:  #f4f1e6;
  --tier-regular-bg:  rgba(244, 241, 230, 0.14);
  --tier-regular-bd:  rgba(244, 241, 230, 0.65);

  --tier-emperor-fg:  #fff0c6;
  --tier-emperor-bg:  linear-gradient(135deg, rgba(255,210,80,0.30), rgba(217,122,61,0.30));
  --tier-emperor-bd:  #f4c95d;

  /* Wood / frame */
  --wood-1: #5b3a1f;
  --wood-2: #3a2510;

  /* Sizing */
  --radius: 14px;
  --maxw: 1180px;
  --shadow-chalk: 0 0 0 2px rgba(244,241,230,0.06),
                  0 12px 32px rgba(0,0,0,0.45);

  /* Z scale */
  --z-nav: 30;
  --z-overlay: 80;
  --z-toast: 90;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Architects Daughter', 'Kalam', 'Patrick Hand', system-ui, sans-serif;
  color: var(--chalk);
  background-color: var(--board-2);
  font-size: 19px;
  line-height: 1.6;
  letter-spacing: 0.15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Chalkboard background — layered greens + SVG noise */
body {
  background-image:
    radial-gradient(ellipse 120% 80% at 20% 10%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(ellipse 90% 60% at 80% 90%, rgba(0,0,0,0.45), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 50%, var(--board-1), var(--board-2) 60%, var(--board-3) 100%);
  position: relative;
  overflow-x: hidden;
}

/* Chalk-dust grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
}

/* Subtle chalk smudges */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 12% 22%, rgba(244,241,230,0.05) 0, transparent 18%),
    radial-gradient(circle at 78% 12%, rgba(244,241,230,0.04) 0, transparent 14%),
    radial-gradient(circle at 30% 88%, rgba(244,241,230,0.05) 0, transparent 22%),
    radial-gradient(circle at 90% 78%, rgba(244,241,230,0.04) 0, transparent 18%);
}

main, header, footer, section, .container {
  position: relative;
  z-index: 2;
}

/* ============= Typography ============= */
h1, h2, h3, h4 {
  font-family: 'Caveat', 'Patrick Hand', cursive;
  color: var(--chalk);
  text-shadow:
    0 1px 0 rgba(0,0,0,0.25),
    0 0 14px rgba(244,241,230,0.10);
  margin: 0 0 .4em;
  letter-spacing: 0.5px;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

h1.tilt-l, h2.tilt-l, h3.tilt-l { transform: rotate(-1.2deg); }
h1.tilt-r, h2.tilt-r, h3.tilt-r { transform: rotate(1deg); }

p, li, label, input, span, div, td, th {
  font-family: 'Architects Daughter', 'Kalam', cursive;
}

p { color: var(--chalk-soft); max-width: 70ch; }
/* When a paragraph sits inside a centered block, also center the
   paragraph element itself so the 70ch max-width doesn't pin it left. */
.text-center > p,
.text-center p {
  margin-left: auto;
  margin-right: auto;
}
li  { color: var(--chalk-soft); }

/* Buttons + tags keep the playful Caveat for chunky chalk feel */
button, .btn, .tag, .version, .coin-chip, .user-chip, .auth-tabs button, .brand-name {
  font-family: 'Caveat', 'Architects Daughter', cursive;
}

/* Labels: Patrick Hand reads slightly chunkier — good for form labels */
.field label { font-family: 'Patrick Hand', 'Caveat', cursive; }

a {
  color: var(--chalk);
  text-decoration: none;
  border-bottom: 1.5px dashed var(--chalk-faded);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
a:hover { color: var(--accent-soft); border-bottom-color: var(--accent); }
a:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ============= Layout helpers ============= */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.spacer { flex: 1; }
.center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.muted { color: var(--chalk-faded); }
.accent { color: var(--accent-soft); }

/* ============= Chalk cards ============= */
.chalk-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.32)),
    radial-gradient(ellipse at top, rgba(244,241,230,0.04), transparent 60%);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-chalk);
}

.chalk-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed rgba(244,241,230,0.55);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
  opacity: .85;
}

.chalk-card.tight { padding: 18px; }
.chalk-card.flat::before { border-style: solid; opacity: .35; }

/* ============= Chalk buttons ============= */
.btn {
  --bg: transparent;
  --fg: var(--chalk);
  --bd: var(--chalk);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  color: var(--fg);
  background: var(--bg);
  border: 2.5px dashed var(--bd);
  border-radius: 12px;
  padding: 12px 26px;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease, border-style .18s ease;
  text-shadow: 0 1px 0 rgba(0,0,0,0.18);
  position: relative;
  user-select: none;
}

.btn:hover:not(:disabled) {
  background: var(--chalk);
  color: var(--board-2);
  border-style: solid;
  transform: rotate(-0.5deg);
  text-shadow: none;
}

.btn:active:not(:disabled) { transform: rotate(0.4deg) scale(0.98); }

.btn:focus-visible { outline: 3px dashed var(--accent); outline-offset: 4px; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.btn-primary {
  --bg: var(--accent);
  --fg: var(--board-3);
  --bd: var(--chalk);
  border-style: solid;
  box-shadow: 0 4px 0 var(--accent-deep), 0 8px 18px rgba(0,0,0,0.35);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--board-3);
  transform: translateY(-2px) rotate(-0.4deg);
  box-shadow: 0 6px 0 var(--accent-deep), 0 12px 22px rgba(0,0,0,0.45);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--accent-deep), 0 4px 10px rgba(0,0,0,0.35);
}

.btn-ghost { font-size: 1.1rem; padding: 8px 16px; border-width: 2px; }

.btn-huge {
  font-size: 2.6rem;
  padding: 28px 72px;
  border-radius: 18px;
}

/* ============= Inputs ============= */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: var(--chalk);
}
.field input, .field select {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  color: var(--chalk);
  background: rgba(0,0,0,0.28);
  border: 2px dashed rgba(244,241,230,0.55);
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.field input::placeholder { color: var(--chalk-faded); }
.field input:focus, .field select:focus {
  border-color: var(--accent);
  border-style: solid;
  background: rgba(0,0,0,0.40);
}
.field input:invalid:not(:placeholder-shown) {
  border-color: #e07a7a;
}

/* Checkbox */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 1rem;
}
.checkbox input { appearance: none; -webkit-appearance: none; margin: 0; }
.checkbox .box {
  width: 22px; height: 22px; flex: 0 0 22px;
  border: 2.5px dashed var(--chalk);
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px;
  transition: background .15s, border-color .15s;
}
.checkbox input:checked + .box {
  background: var(--accent);
  border-color: var(--chalk);
  border-style: solid;
}
.checkbox input:checked + .box::after {
  content: "✓";
  font-family: 'Caveat', cursive;
  color: var(--board-3);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}
.checkbox input:focus-visible + .box { outline: 2px dashed var(--accent); outline-offset: 2px; }

/* ============= Top Navigation ============= */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background:
    linear-gradient(180deg, rgba(10,22,15,0.92), rgba(10,22,15,0.78));
  backdrop-filter: blur(6px);
  border-bottom: 2px dashed rgba(244,241,230,0.25);
}
.topbar .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  border: none;
}
.topbar .brand img { width: 38px; height: 38px; object-fit: contain; }
.topbar .brand .brand-name {
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.5rem; color: var(--chalk);
}
.topbar nav { display: flex; gap: 14px; }
.topbar nav a {
  border: none;
  font-size: 1.05rem;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--chalk-soft);
}
.topbar nav a:hover { background: rgba(244,241,230,0.08); color: var(--chalk); }
.topbar nav a.active { color: var(--accent-soft); }

.coin-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: var(--board-3);
  font-family: 'Caveat', cursive; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
  border: 2px solid rgba(244,241,230,0.85);
  font-size: 1.05rem;
  box-shadow: 0 4px 0 rgba(0,0,0,0.35);
}
.coin-chip .coin {
  display: inline-block; width: 18px; height: 18px;
  background: radial-gradient(circle at 35% 35%, #fff2b3, var(--accent) 60%, var(--accent-deep));
  border-radius: 50%;
  border: 1.5px solid var(--board-3);
}
.coin-chip .soon {
  font-size: .75rem; color: rgba(15,32,24,0.7); margin-left: 6px;
  font-family: 'Patrick Hand', cursive;
}

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border: 2px dashed rgba(244,241,230,0.55);
  border-radius: 999px;
  color: var(--chalk);
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
}
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border: 1.5px solid var(--chalk);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--board-3); font-weight: 700; font-size: .9rem;
}

/* ============= Footer ============= */
.site-footer {
  margin-top: 60px;
  padding: 26px 24px 40px;
  border-top: 2px dashed rgba(244,241,230,0.25);
  background: rgba(10,22,15,0.6);
  color: var(--chalk-faded);
  font-size: 0.95rem;
}
.site-footer .footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
}
.site-footer a { color: var(--chalk-soft); font-size: 0.95rem; }
.site-footer .footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer .footer-meta { margin-left: auto; opacity: 0.7; }

/* ============= Chalk dust floating particles ============= */
.chalk-dust {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
}
.chalk-dust span {
  position: absolute;
  bottom: -20px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--chalk);
  opacity: 0.25;
  animation: drift linear infinite;
  filter: blur(0.5px);
}
@keyframes drift {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 0.35; }
  100% { transform: translate(var(--dx, 40px), -110vh); opacity: 0; }
}

/* ============= Loading overlay ============= */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(10,22,15,0.92);
  z-index: var(--z-overlay);
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
  text-align: center;
}
.loading-overlay.show { display: flex; }
.loading-overlay .spinner {
  width: 64px; height: 64px;
  border: 4px dashed var(--chalk);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay h2 {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem;
}

/* ============= Auth specific ============= */
.auth-wrap {
  min-height: calc(100vh - 100px);
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px;
}
.auth-logo {
  width: clamp(220px, 30vw, 360px);
  margin: 12px auto 18px;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
  user-select: none;
}
.auth-tagline {
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--chalk-soft);
  margin: 0 0 22px;
  transform: rotate(-0.6deg);
}
.auth-card {
  width: 100%;
  max-width: 460px;
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 2px dashed rgba(244,241,230,0.35);
  padding-bottom: 6px;
}
.auth-tabs button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--chalk-faded);
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 8px;
}
.auth-tabs button.active {
  color: var(--chalk);
  background: rgba(244,241,230,0.08);
}

.form-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.form-actions .row-or {
  text-align: center;
  font-family: 'Caveat', cursive;
  color: var(--chalk-faded);
  position: relative;
  margin: 4px 0;
}
.form-actions .row-or::before,
.form-actions .row-or::after {
  content: ""; position: absolute; top: 50%; width: 38%; height: 1px;
  border-top: 2px dashed rgba(244,241,230,0.30);
}
.form-actions .row-or::before { left: 0; }
.form-actions .row-or::after { right: 0; }

/* ============= Hero on home / play ============= */
.hero-card {
  position: relative;
  overflow: hidden;
  padding: 36px;
  display: flex; gap: 28px; align-items: center;
  background:
    linear-gradient(120deg, rgba(217,122,61,0.18), rgba(0,0,0,0.35)),
    radial-gradient(ellipse at left, rgba(244,241,230,0.06), transparent 60%);
}
.hero-card .hero-text { flex: 1; min-width: 0; }
.hero-card .hero-text h1 { margin-bottom: 8px; }
.hero-card .hero-art {
  flex: 0 0 280px;
  height: 180px;
  border-radius: 12px;
  background: url('../assets/screenshot-1945.png') center/cover no-repeat;
  border: 2px dashed rgba(244,241,230,0.55);
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
}

/* Mode cards */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.mode-card {
  padding: 22px;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s;
}
.mode-card:hover { transform: translateY(-3px) rotate(-0.4deg); }
.mode-card h3 { margin: 0 0 6px; }
.mode-card .tag {
  display: inline-block;
  font-size: .85rem;
  padding: 2px 10px;
  border: 1.5px dashed var(--chalk-faded);
  border-radius: 999px;
  color: var(--chalk-soft);
  margin-bottom: 8px;
}
.mode-card.disabled { opacity: 0.65; cursor: not-allowed; }

/* Section heading */
.section-title {
  display: flex; align-items: baseline; gap: 14px; margin: 36px 0 6px;
}
.section-title h2 { margin: 0; }
.section-title .see-all { font-size: 1rem; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.gallery .shot {
  position: relative;
  height: 160px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 2px dashed rgba(244,241,230,0.5);
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
  transition: transform .2s;
  cursor: zoom-in;
}
.gallery .shot:hover { transform: rotate(-0.6deg) scale(1.02); }
.gallery .shot.tall { height: 220px; }

/* Updates strip */
.updates-strip {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  margin-top: 12px;
}
.updates-strip .label {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: var(--accent-soft);
}

/* Updates timeline */
.timeline { display: flex; flex-direction: column; gap: 22px; margin-top: 18px; }
.update-entry { padding: 24px; }
.update-entry .meta {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.update-entry .version {
  font-family: 'Caveat', cursive; font-size: 1.5rem;
  color: var(--chalk); padding: 2px 12px;
  background: rgba(217,122,61,0.25);
  border: 2px dashed var(--accent);
  border-radius: 8px;
}
.update-entry .date { color: var(--chalk-faded); font-size: 1rem; }
.update-entry ul { padding-left: 22px; margin: 8px 0 0; }
.update-entry li { margin-bottom: 4px; }

/* Terms */
.tos-doc { max-width: 800px; margin: 0 auto; }
.tos-doc h2 { margin-top: 28px; }
.tos-doc .placeholder { font-style: italic; color: var(--chalk-faded); }

/* About page */
.about-hero {
  text-align: center; padding: 40px 24px 28px;
}
.about-hero h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px; margin-top: 20px;
}

/* Play page */
.play-screen {
  min-height: calc(100vh - 100px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 24px;
  padding: 40px 24px;
}
.play-screen h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 0; }
.play-screen .subtitle { font-size: 1.25rem; color: var(--chalk-faded); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: var(--chalk);
  font-family: 'Patrick Hand', cursive;
  font-size: 1.05rem;
  padding: 12px 22px;
  border: 2px dashed var(--chalk);
  border-radius: 10px;
  z-index: var(--z-toast);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* ============= Responsive ============= */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .topbar .inner { padding: 8px 12px; gap: 6px; }
  .topbar nav { display: none; }
  .topbar.mobile-open nav {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 12px 16px;
    background: rgba(10,22,15,0.97);
    border-bottom: 2px dashed rgba(244,241,230,0.25);
  }
  .nav-toggle { display: inline-flex !important; }

  /* Tighten the right cluster — much smaller chips + icon button */
  .topbar .topbar-left  { gap: 8px; }
  .topbar .topbar-right { gap: 6px; }
  .topbar .topbar-right::before { display: none; }

  .topbar .brand img { width: 32px; height: 32px; }
  .topbar .brand .brand-name { font-size: 1.2rem; }

  .coin-chip {
    padding: 3px 8px;
    font-size: 0.85rem;
    border-width: 1.5px;
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
  }
  .coin-chip .coin { width: 14px; height: 14px; }
  .coin-chip .soon { display: none; }

  .user-chip {
    padding: 3px 8px;
    gap: 6px;
    border-width: 1.5px;
  }
  .user-chip .avatar {
    width: 22px; height: 22px;
    font-size: 0.75rem;
  }
  .user-chip .avatar.countryball { width: 24px; height: 24px; }
  .user-block .name { font-size: 0.95rem; }
  .tier-badge { font-size: 0.75rem; padding: 0 6px; }

  /* The settings gear was 38×38 on desktop — way too much on mobile. */
  .btn-icon {
    width: 30px; height: 30px;
    border-width: 1.5px;
  }
  .btn-icon svg { width: 14px; height: 14px; }

  .hero-card { flex-direction: column; padding: 24px; }
  .hero-card .hero-art { width: 100%; flex: none; }
  .auth-card { padding: 20px; }
  .btn-huge { font-size: 2rem; padding: 22px 48px; }
  .site-footer .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-footer .footer-meta { margin-left: 0; }
}

/* Even tighter for very narrow screens */
@media (max-width: 420px) {
  .topbar .inner { padding: 6px 10px; gap: 4px; }
  .topbar .brand .brand-name { display: none; }
  .coin-chip { padding: 2px 7px; }
  .user-block .name { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--chalk);
  border: 2px dashed var(--chalk);
  border-radius: 8px;
  padding: 4px 10px;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ============================================================
   POLISH LAYER — micro-interactions, hover states, scroll fades
   ============================================================ */

/* Cards: lift + soft glow on every chalk-card by default
   (mode-card, about-grid items, update entries all inherit this) */
.chalk-card {
  transition: transform .25s cubic-bezier(.2,.7,.2,1),
              box-shadow .25s ease,
              border-color .25s ease;
  will-change: transform;
}
.chalk-card.interactive,
a.chalk-card,
button.chalk-card {
  cursor: pointer;
}
.chalk-card.interactive:hover,
a.chalk-card:hover,
button.chalk-card:hover,
.mode-card:not(.disabled):hover,
.about-grid .chalk-card:hover,
.update-entry:hover {
  transform: translateY(-4px) rotate(-0.35deg);
  box-shadow:
    0 0 0 2px rgba(244,241,230,0.10),
    0 18px 40px rgba(0,0,0,0.55),
    0 0 24px rgba(217,122,61,0.18);
}
.chalk-card.interactive:hover::before,
a.chalk-card:hover::before,
.mode-card:not(.disabled):hover::before,
.about-grid .chalk-card:hover::before,
.update-entry:hover::before {
  border-color: var(--accent);
  animation: chalk-jitter 0.5s ease-in-out;
}
@keyframes chalk-jitter {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(0.4deg); }
  75% { transform: rotate(-0.3deg); }
}

/* Active press */
.chalk-card.interactive:active,
a.chalk-card:active,
.mode-card:not(.disabled):active {
  transform: translateY(-1px) rotate(0);
  transition-duration: .08s;
}

/* Mode card title underline animation */
.mode-card h3 {
  display: inline-block;
  position: relative;
}
.mode-card h3::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: var(--accent);
  transition: right .35s cubic-bezier(.2,.7,.2,1);
  border-radius: 2px;
}
.mode-card:not(.disabled):hover h3::after { right: 0; }

/* About-grid icons */
.about-grid .chalk-card {
  position: relative;
  overflow: hidden;
}
.about-grid .chalk-card::after {
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle at center, rgba(217,122,61,0.18), transparent 65%);
  opacity: 0;
  transition: opacity .35s ease, transform .5s ease;
  pointer-events: none;
}
.about-grid .chalk-card:hover::after {
  opacity: 1;
  transform: scale(1.15) rotate(15deg);
}
.about-grid h3 {
  display: flex; align-items: center; gap: 10px;
}
.about-grid h3 .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  color: var(--accent-soft);
  font-size: 1.2rem;
  transition: transform .3s ease, background .3s ease;
}
.about-grid .chalk-card:hover h3 .ico {
  transform: rotate(-8deg) scale(1.1);
  background: rgba(217,122,61,0.15);
}

/* Buttons — subtle hover wobble + glow */
.btn-primary {
  position: relative;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(217,122,61,0.35), transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
  z-index: -1;
  pointer-events: none;
}
.btn-primary:hover:not(:disabled)::after { opacity: 1; }

/* Footer link hover — chalk underline grow */
.site-footer a,
.topbar nav a {
  position: relative;
  border-bottom: none;
}
.site-footer a::after,
.topbar nav a::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  bottom: 0;
  height: 2px;
  background-image: linear-gradient(to right, var(--chalk) 60%, transparent 60%);
  background-size: 8px 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.site-footer a:hover::after,
.topbar nav a:hover::after,
.topbar nav a.active::after { transform: scaleX(1); }
.topbar nav a.active::after { background-image: linear-gradient(to right, var(--accent) 60%, transparent 60%); }

/* Logo subtle float in topbar */
.topbar .brand img {
  transition: transform .35s ease;
}
.topbar .brand:hover img {
  transform: rotate(-6deg) scale(1.08);
}

/* Auth logo gentle breathing */
.auth-logo {
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-4px) rotate(-0.4deg); }
}

/* Input focus shimmer */
.field input:focus, .field select:focus {
  box-shadow: 0 0 0 3px rgba(217,122,61,0.25);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
.reveal.delay-4 { transition-delay: .32s; }

/* ============================================================
   PREVIEW FOOTAGE SHOWCASE
   ============================================================ */
.preview-showcase {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  padding: 22px;
  margin-top: 18px;
}
.preview-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 2px dashed rgba(244,241,230,0.55);
  box-shadow: 0 14px 36px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(0,0,0,0.5);
}
.preview-stage .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .6s ease, transform 6s ease-out;
}
.preview-stage .slide.active {
  opacity: 1;
  transform: scale(1.0);
}
.preview-stage .stage-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  color: var(--chalk);
  pointer-events: none;
}
.preview-stage .stage-overlay .caption {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  line-height: 1.1;
  margin: 0 0 4px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
.preview-stage .stage-overlay .sub {
  font-size: 1rem;
  color: var(--chalk-soft);
  opacity: 0.9;
}
.preview-stage .tag-live {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent);
  color: var(--board-3);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--chalk);
  pointer-events: none;
}
.preview-stage .stage-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  background: rgba(15,32,24,0.7);
  border: 2px dashed var(--chalk);
  color: var(--chalk);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity .25s ease, background .2s, transform .2s;
  z-index: 3;
}
.preview-stage:hover .stage-nav { opacity: 1; }
.preview-stage .stage-nav:hover { background: var(--accent); color: var(--board-3); transform: translateY(-50%) scale(1.08); }
.preview-stage .stage-nav.prev { left: 12px; }
.preview-stage .stage-nav.next { right: 12px; }

.preview-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}
.preview-thumbs .thumb {
  position: relative;
  flex: 0 0 auto;
  height: 70px;
  border-radius: 8px;
  border: 2px dashed rgba(244,241,230,0.35);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.preview-thumbs .thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.35);
  transition: background .2s ease;
}
.preview-thumbs .thumb:hover { transform: translateX(-4px); border-color: var(--chalk); }
.preview-thumbs .thumb:hover::after { background: rgba(0,0,0,0.1); }
.preview-thumbs .thumb.active {
  border-color: var(--accent);
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(217,122,61,0.35), 0 8px 18px rgba(0,0,0,0.5);
  transform: translateX(-6px);
}
.preview-thumbs .thumb.active::after { background: transparent; }
.preview-thumbs .thumb .label {
  position: absolute; left: 8px; bottom: 6px; right: 8px;
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  color: var(--chalk);
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  z-index: 2;
}

.preview-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(0,0,0,0.4);
  z-index: 2;
}
.preview-progress .bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 80ms linear;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,22,15,0.94);
  z-index: var(--z-overlay);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: fade-in .25s ease;
}
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border: 2px dashed var(--chalk);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.lightbox .close {
  position: absolute;
  top: 18px; right: 22px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px dashed var(--chalk);
  border-radius: 50%;
  background: transparent;
  color: var(--chalk);
  cursor: pointer;
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
}
.lightbox .close:hover { background: var(--chalk); color: var(--board-3); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Make hero art look photo-framed and clickable */
.hero-card .hero-art {
  cursor: pointer;
  transition: transform .35s ease, box-shadow .35s ease;
}
.hero-card .hero-art:hover {
  transform: rotate(-1.2deg) scale(1.02);
  box-shadow: 0 16px 38px rgba(0,0,0,0.6);
}

/* Preview responsive */
@media (max-width: 860px) {
  .preview-showcase {
    grid-template-columns: 1fr;
  }
  .preview-thumbs {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
  }
  .preview-thumbs .thumb {
    flex: 0 0 140px;
    height: 80px;
  }
  .preview-thumbs .thumb:hover,
  .preview-thumbs .thumb.active {
    transform: translateY(-4px);
  }
}

/* ============================================================
   STORE / MARKETPLACE
   ============================================================ */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.store-item {
  position: relative;
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.store-item .thumb {
  position: relative;
  height: 130px;
  border-radius: 10px;
  border: 2px dashed rgba(244,241,230,0.45);
  background: linear-gradient(160deg, rgba(217,122,61,0.18), rgba(0,0,0,0.35));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.store-item .thumb svg { width: 78%; height: 78%; }
.store-item h3 {
  font-family: 'Caveat', cursive;
  margin: 0;
  font-size: 1.5rem;
}
.store-item p {
  font-size: 1rem;
  margin: 0;
  color: var(--chalk-soft);
  min-height: 2.6em;
}
.store-item .row-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto;
}
.lock-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.45);
  border: 1.5px dashed var(--chalk-faded);
  color: var(--chalk-soft);
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  padding: 3px 10px;
  border-radius: 999px;
}
.lock-badge::before {
  content: "";
  width: 12px; height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17 9V7a5 5 0 0 0-10 0v2H5v13h14V9h-2zM9 7a3 3 0 0 1 6 0v2H9V7z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17 9V7a5 5 0 0 0-10 0v2H5v13h14V9h-2zM9 7a3 3 0 0 1 6 0v2H9V7z'/></svg>") center/contain no-repeat;
  display: inline-block;
}
.price-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: var(--chalk-faded);
  padding: 4px 10px;
  border: 1.5px dashed var(--chalk-faded);
  border-radius: 999px;
}
.price-pill .coin {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff2b3, var(--accent) 60%, var(--accent-deep));
  border: 1.5px solid var(--board-3);
}

.store-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.store-featured .featured-card {
  position: relative;
  padding: 24px;
  min-height: 220px;
  display: flex; flex-direction: column; gap: 10px;
  background:
    linear-gradient(135deg, rgba(217,122,61,0.28), rgba(0,0,0,0.45)),
    radial-gradient(ellipse at top right, rgba(244,241,230,0.08), transparent 60%);
  overflow: hidden;
}
.store-featured .featured-card .glyph {
  position: absolute;
  right: -20px; bottom: -20px;
  width: 180px; height: 180px;
  opacity: .18;
  pointer-events: none;
}
.store-featured .featured-card h3 {
  font-family: 'Caveat', cursive; font-size: 1.9rem; margin: 0;
}
.store-featured .featured-card .badge {
  display: inline-block;
  background: var(--accent);
  color: var(--board-3);
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: .9rem;
  padding: 2px 10px;
  border-radius: 6px;
  border: 2px solid var(--chalk);
  width: max-content;
}

/* ============================================================
   MEMBERSHIP
   ============================================================ */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 18px;
  align-items: stretch;
}
.tier-card {
  position: relative;
  padding: 28px 26px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}
.tier-card .tier-name {
  font-family: 'Caveat', cursive;
  font-size: 2.6rem;
  margin: 0;
  line-height: 1;
}
.tier-card .tier-tagline {
  color: var(--chalk-faded);
  font-size: 1.05rem;
  margin: 0;
}
.tier-card .tier-price {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem;
  color: var(--chalk);
  margin: 6px 0 2px;
  line-height: 1;
}
.tier-card .tier-price small {
  display: block;
  font-size: 1rem;
  color: var(--chalk-faded);
  margin-top: 4px;
  font-family: 'Architects Daughter', cursive;
}
.tier-card ul {
  list-style: none;
  padding: 0; margin: 6px 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.tier-card ul li {
  position: relative;
  padding-left: 28px;
  color: var(--chalk-soft);
  font-size: 1rem;
}
.tier-card ul li::before {
  content: "";
  position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px dashed var(--chalk);
  box-sizing: border-box;
}
.tier-card ul li::after {
  content: "✓";
  position: absolute; left: 3px; top: 1px;
  font-family: 'Caveat', cursive;
  color: var(--board-3);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.tier-card ul li.muted-perk { color: var(--chalk-faded); opacity: .7; }
.tier-card ul li.muted-perk::before { background: transparent; border-style: solid; }
.tier-card ul li.muted-perk::after { content: ""; }

.tier-card .tier-cta { margin-top: auto; }

.tier-card.featured {
  border: none;
  background:
    linear-gradient(160deg, rgba(217,122,61,0.30), rgba(0,0,0,0.40)),
    radial-gradient(ellipse at top, rgba(244,241,230,0.10), transparent 60%);
  transform: translateY(-6px);
}
.tier-card.featured::before { border-color: var(--accent); }
.tier-card .ribbon {
  position: absolute;
  top: 14px; right: -38px;
  background: var(--accent);
  color: var(--board-3);
  font-family: 'Caveat', cursive;
  font-weight: 700;
  padding: 4px 44px;
  transform: rotate(35deg);
  border-top: 2px solid var(--chalk);
  border-bottom: 2px solid var(--chalk);
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.faq-grid .chalk-card h3 {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  margin: 0 0 6px;
  color: var(--accent-soft);
}

/* ============================================================
   AVATAR CUSTOMIZER
   ============================================================ */
.avatar-layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.avatar-col { padding: 18px; }
.avatar-col h3 {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  margin: 0 0 10px;
}

.country-search {
  width: 100%;
  font-family: 'Architects Daughter', cursive;
  color: var(--chalk);
  background: rgba(0,0,0,0.30);
  border: 2px dashed rgba(244,241,230,0.45);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 1rem;
}
.country-search:focus {
  outline: none; border-color: var(--accent); border-style: solid;
  box-shadow: 0 0 0 3px rgba(217,122,61,0.25);
}
.country-tabs {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.country-tabs button {
  flex: 1;
  background: transparent;
  border: 2px dashed rgba(244,241,230,0.40);
  color: var(--chalk-soft);
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}
.country-tabs button.active {
  border-color: var(--accent);
  border-style: solid;
  color: var(--chalk);
  background: rgba(217,122,61,0.18);
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 560px;
  overflow-y: auto;
  padding: 4px 8px 4px 2px;
}
.country-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px 8px;
  border-radius: 12px;
  border: 2px dashed transparent;
  background: rgba(0,0,0,0.22);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  min-height: 96px;
}
.country-chip:hover {
  background: rgba(244,241,230,0.08);
  transform: translateY(-2px);
  border-color: rgba(244,241,230,0.35);
}
.country-chip.active {
  border-color: var(--accent);
  border-style: solid;
  background: rgba(217,122,61,0.20);
  box-shadow: 0 0 0 2px rgba(217,122,61,0.30), 0 6px 14px rgba(0,0,0,0.4);
}
.country-chip.locked {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
.country-chip.locked:hover {
  transform: none;
  background: rgba(0,0,0,0.22);
  border-color: transparent;
}
.country-chip.locked svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)) grayscale(0.5);
}
.country-chip.locked .name {
  color: var(--chalk-faded);
}
.country-chip svg {
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.country-chip .name {
  font-family: 'Architects Daughter', 'Kalam', cursive;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 1.15;
  letter-spacing: 0.2px;
  /* keep names crisp regardless of background — chalkboard-flavored stroke */
  text-shadow:
    0 0 1px rgba(0,0,0,0.95),
    0 1px 2px rgba(0,0,0,0.85),
    0 0 6px rgba(0,0,0,0.55);
  word-break: break-word;
  hyphens: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.country-chip.active .name { color: #fff8e0; }
.country-grid::-webkit-scrollbar { width: 8px; }
.country-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 8px; }
.country-grid::-webkit-scrollbar-thumb {
  background: rgba(244,241,230,0.25); border-radius: 8px;
}

/* preview pane */
.avatar-preview {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.avatar-preview .country-name {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem;
  margin: 0;
}
.avatar-stage {
  width: min(360px, 75vw);
  aspect-ratio: 1 / 1;
  position: relative;
}
.avatar-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.avatar-saved-pulse { animation: saved-pulse .8s ease; }
@keyframes saved-pulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.05) rotate(-3deg); }
  100% { transform: scale(1); }
}

/* accessory tile grid */
.acc-section { margin-bottom: 16px; }
.acc-section h4 {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  margin: 0 0 6px;
  color: var(--accent-soft);
}
.acc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.acc-tile {
  aspect-ratio: 1 / 1;
  border: 2px dashed rgba(244,241,230,0.40);
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  position: relative;
}
.acc-tile:hover { transform: translateY(-2px); background: rgba(244,241,230,0.06); }
.acc-tile.active {
  border-color: var(--accent);
  background: rgba(217,122,61,0.18);
}
.acc-tile.locked {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
  position: relative;
}
.acc-tile.locked:hover {
  transform: none;
  background: rgba(0,0,0,0.25);
  border-color: rgba(244,241,230,0.40);
}
.acc-tile .acc-lock {
  position: absolute;
  right: 4px; top: 4px;
  font-size: 0.75rem;
  line-height: 1;
  filter: none;
}
.acc-tile svg { width: 60%; height: 60%; }
.acc-tile .none-x {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: var(--chalk-faded);
}
.acc-tile.active .none-x { color: var(--chalk); }

/* mini countryball in user-chip */
.user-chip .avatar.countryball {
  background: none;
  border: none;
  padding: 0;
  width: 30px; height: 30px;
  overflow: visible;
}
.user-chip .avatar.countryball svg {
  width: 100%; height: 100%;
  display: block;
}

@media (max-width: 980px) {
  .avatar-layout {
    grid-template-columns: 1fr;
  }
  .avatar-stage { width: min(280px, 70vw); }
  .country-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    max-height: 360px;
  }
}

/* ============================================================
   TOPBAR — split into left (brand + nav) and right (account)
   ============================================================ */
.topbar .inner {
  display: flex;
  align-items: center;
  /* hard split: left cluster pushes right, right cluster pinned to far right */
  justify-content: space-between;
  gap: 24px;
}
.topbar .topbar-left,
.topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.topbar .topbar-left  { flex: 1 1 auto; min-width: 0; }
.topbar .topbar-right { flex: 0 0 auto; }

/* visual divider chalk dash between the halves on wide screens */
.topbar .topbar-right::before {
  content: "";
  display: inline-block;
  width: 2px; height: 28px;
  border-left: 2px dashed rgba(244,241,230,0.25);
  margin-right: 4px;
}

/* TIER BADGE — sits inside user-chip, replaces direct membership link */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1.5px dashed var(--tier-guest-bd);
  background: var(--tier-guest-bg);
  color: var(--tier-guest-fg);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  line-height: 1.1;
  cursor: pointer;
}
.tier-badge:hover { transform: translateY(-1px); }
.tier-badge[data-tier="regular"] {
  border-color: var(--tier-regular-bd);
  background: var(--tier-regular-bg);
  color: var(--tier-regular-fg);
}
.tier-badge[data-tier="emperor"] {
  border-color: var(--tier-emperor-bd);
  border-style: solid;
  background: var(--tier-emperor-bg);
  color: var(--tier-emperor-fg);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  box-shadow: 0 0 0 1px rgba(244,201,93,0.45), 0 0 16px rgba(255,210,80,0.30);
}
.tier-badge[data-tier="emperor"]:hover {
  box-shadow: 0 0 0 1px rgba(244,201,93,0.6), 0 0 22px rgba(255,210,80,0.5);
}
.tier-badge .crown {
  display: inline-block;
  width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 19 5 8l5 4 2-7 2 7 5-4 2 11H3zm0 2h18v2H3z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 19 5 8l5 4 2-7 2 7 5-4 2 11H3zm0 2h18v2H3z'/></svg>") center/contain no-repeat;
}

/* Username inside user-chip — make name + tier badge sit nicely */
.user-chip {
  gap: 8px;
}
.user-chip .name { line-height: 1.1; }
.user-chip a.tier-badge { border-bottom: none; }

/* The username chip itself becomes a wrapper for name+tier on the right side */
.user-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.1;
}
.user-block .name {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: var(--chalk);
}

/* Settings icon button */
.btn-icon {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px dashed rgba(244,241,230,0.55);
  border-radius: 50%;
  background: transparent;
  color: var(--chalk);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  padding: 0;
}
.btn-icon:hover {
  background: rgba(244,241,230,0.10);
  transform: rotate(35deg);
  border-color: var(--accent);
}
.btn-icon svg { width: 18px; height: 18px; }
.btn-icon:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.settings-card h3 {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  margin: 0 0 4px;
}
.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed rgba(244,241,230,0.20);
}
.settings-row:first-of-type { border-top: none; }
.settings-row .label {
  flex: 1; min-width: 0;
}
.settings-row .label .key {
  display: block;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  color: var(--chalk);
}
.settings-row .label .desc {
  display: block;
  font-size: 0.92rem;
  color: var(--chalk-faded);
}
.settings-row select,
.settings-row input[type="text"] {
  font-family: 'Architects Daughter', cursive;
  color: var(--chalk);
  background: rgba(0,0,0,0.30);
  border: 2px dashed rgba(244,241,230,0.45);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1rem;
  min-width: 140px;
}
.settings-row select:focus,
.settings-row input:focus {
  outline: none; border-color: var(--accent); border-style: solid;
}

/* tier switcher chips on settings */
.tier-switch {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.tier-switch button {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px dashed rgba(244,241,230,0.40);
  background: rgba(0,0,0,0.25);
  color: var(--chalk-soft);
  cursor: pointer;
  transition: all .15s ease;
}
.tier-switch button[data-tier="guest"].active   { background: var(--tier-guest-bg);   color: var(--tier-guest-fg);   border-color: var(--tier-guest-bd);   border-style: solid; }
.tier-switch button[data-tier="regular"].active { background: var(--tier-regular-bg); color: var(--tier-regular-fg); border-color: var(--tier-regular-bd); border-style: solid; }
.tier-switch button[data-tier="emperor"].active { background: var(--tier-emperor-bg); color: var(--tier-emperor-fg); border-color: var(--tier-emperor-bd); border-style: solid; box-shadow: 0 0 12px rgba(255,210,80,0.3); }

/* Toggle switch */
.toggle {
  position: relative; width: 50px; height: 26px;
  display: inline-block;
  flex: 0 0 auto;
}
.toggle input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle .track {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  border: 2px dashed rgba(244,241,230,0.40);
  border-radius: 999px;
  transition: background .2s, border-color .2s;
}
.toggle .thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: var(--chalk);
  border-radius: 50%;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .2s;
}
.toggle input:checked + .track { background: rgba(217,122,61,0.35); border-color: var(--accent); border-style: solid; }
.toggle input:checked + .track + .thumb { transform: translateX(24px); background: var(--accent-soft); }
.toggle input:focus-visible + .track { outline: 2px dashed var(--accent); outline-offset: 3px; }

/* ============================================================
   COMING-SOON AVATARS GRID
   ============================================================ */
.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.coming-soon-tile {
  aspect-ratio: 1 / 1.15;
  border: 2px dashed rgba(244,241,230,0.30);
  border-radius: 12px;
  background:
    repeating-linear-gradient(45deg, rgba(244,241,230,0.04) 0 8px, transparent 8px 16px),
    rgba(0,0,0,0.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 10px 6px;
  position: relative;
  overflow: hidden;
}
.coming-soon-tile .silhouette {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(244,241,230,0.15);
  border: 2px dashed rgba(244,241,230,0.45);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  color: rgba(244,241,230,0.5);
}
.coming-soon-tile .cs-label {
  font-family: 'Architects Daughter', cursive;
  font-size: 0.9rem;
  color: var(--chalk-soft);
  line-height: 1.15;
}
.coming-soon-tile .cs-eta {
  font-family: 'Caveat', cursive;
  font-size: 0.95rem;
  color: var(--accent-soft);
}

/* Tier label INSIDE the tier card */
.tier-card .tier-name .badge-inline {
  display: inline-block;
  vertical-align: middle;
  font-family: 'Patrick Hand', cursive;
  font-size: 0.85rem;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1.5px dashed currentColor;
  color: var(--chalk-faded);
  letter-spacing: 0.3px;
}

/* Responsive nav: hide secondary nav text in cramped widths */
@media (max-width: 880px) {
  .topbar .topbar-right::before { display: none; }
  .user-block .name { font-size: 1.05rem; }
  .tier-badge { font-size: 0.85rem; padding: 1px 8px; }
}

/* ============================================================
   CHAT PAGE
   ============================================================ */
.chat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.chat-sidebar {
  padding: 16px 14px;
  position: sticky;
  top: 84px;
}
.chat-room-list {
  list-style: none;
  padding: 0; margin: 0 0 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.chat-room-btn {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  text-align: left;
  background: transparent;
  border: 2px dashed transparent;
  color: var(--chalk-soft);
  font-family: 'Architects Daughter', cursive;
  font-size: 1rem;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.chat-room-btn:hover {
  background: rgba(244,241,230,0.06);
  color: var(--chalk);
}
.chat-room-btn.active {
  background: rgba(217,122,61,0.18);
  border-color: var(--accent);
  border-style: solid;
  color: var(--chalk);
}
.chat-room-btn .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--chalk-faded);
  flex: 0 0 auto;
}
.chat-room-btn.active .dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.chat-new-dm {
  display: flex; gap: 6px; margin-top: 8px;
}
.chat-new-dm input {
  flex: 1; min-width: 0;
  font-family: 'Architects Daughter', cursive;
  background: rgba(0,0,0,0.30);
  color: var(--chalk);
  border: 2px dashed rgba(244,241,230,0.45);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: .95rem;
}
.chat-new-dm input:focus { outline: none; border-color: var(--accent); border-style: solid; }
.chat-new-dm button { padding: 4px 12px; font-size: 1.2rem; }

.chat-main {
  display: flex; flex-direction: column;
  height: calc(100vh - 140px);
  min-height: 520px;
  padding: 14px;
}
.chat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 2px dashed rgba(244,241,230,0.25);
  padding-bottom: 10px; margin-bottom: 10px;
}
.chat-header .chat-me { font-size: .95rem; }
.chat-messages {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 6px 4px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-messages::-webkit-scrollbar { width: 8px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(244,241,230,0.25); border-radius: 8px; }
.chat-msg {
  display: flex; flex-direction: column;
  max-width: 78%;
  align-self: flex-start;
}
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-from {
  font-family: 'Caveat', cursive;
  font-size: .95rem;
  color: var(--accent-soft);
  padding: 0 6px 2px;
}
.chat-bubble {
  background: rgba(244,241,230,0.10);
  border: 2px dashed rgba(244,241,230,0.30);
  border-radius: 12px;
  padding: 8px 12px;
  font-family: 'Architects Daughter', cursive;
  color: var(--chalk);
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg.me .chat-bubble {
  background: rgba(217,122,61,0.22);
  border-color: var(--accent);
  border-style: solid;
}
.chat-time {
  font-size: .75rem;
  color: var(--chalk-faded);
  padding: 2px 6px 0;
}
.chat-composer {
  display: flex; gap: 8px;
  padding-top: 10px;
  border-top: 2px dashed rgba(244,241,230,0.25);
  margin-top: 8px;
}
.chat-composer input {
  flex: 1; min-width: 0;
  font-family: 'Architects Daughter', cursive;
  font-size: 1.05rem;
  background: rgba(0,0,0,0.30);
  color: var(--chalk);
  border: 2px dashed rgba(244,241,230,0.45);
  border-radius: 10px;
  padding: 10px 14px;
}
.chat-composer input:focus { outline: none; border-color: var(--accent); border-style: solid; }
.chat-composer input:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 760px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { position: static; }
  .chat-main { height: auto; min-height: 420px; }
}

/* ============================================================
   SOCIAL POPOVER — body-attached chalkboard panel
   Toggle lives in the topbar nav; the menu itself is appended to
   <body> by JS (position: fixed) so it escapes the topbar's flex
   cascade and can never collide with surrounding link styles.
   ============================================================ */

/* Toggle button inside the nav — styled to match sibling links */
.topbar nav .social-toggle {
  background: transparent;
  border: none;
  color: var(--chalk-soft);
  font-family: 'Architects Daughter', cursive;
  font-size: 1.05rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.2px;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: background .15s ease, color .15s ease;
}
.topbar nav .social-toggle:hover,
.topbar nav .social-toggle[aria-expanded="true"],
.topbar nav .social-toggle.has-active {
  background: rgba(244,241,230,0.10);
  color: var(--chalk);
}
.topbar nav .social-toggle .caret {
  width: 10px; height: 10px;
  flex: 0 0 10px;
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
.topbar nav .social-toggle[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}
/* Hide the chalk-underline ::after that .topbar nav a uses */
.topbar nav .social-toggle::after,
.topbar nav .social-toggle::before {
  content: none !important;
  display: none !important;
}

/* The popover panel — lives directly under <body> */
.social-popover {
  position: fixed;
  top: 0; left: 0;
  min-width: 220px;
  background: linear-gradient(180deg, rgba(15,32,24,0.985), rgba(10,22,15,0.985));
  border: 2.5px dashed rgba(244,241,230,0.55);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  box-shadow:
    0 0 0 1px rgba(244,241,230,0.08),
    0 18px 38px rgba(0,0,0,0.65),
    0 0 24px rgba(217,122,61,0.10);
  /* enter animation */
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2,.7,.2,1);
}
.social-popover.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Little chalk-arrow notch pointing back at the toggle */
.social-popover::before {
  content: "";
  position: absolute;
  top: -8px;
  left: var(--arrow-x, 50%);
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: rgba(15,32,24,0.99);
  border-left: 2.5px dashed rgba(244,241,230,0.55);
  border-top: 2.5px dashed rgba(244,241,230,0.55);
  border-top-left-radius: 3px;
}

/* Items */
.social-popover a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-family: 'Architects Daughter', cursive;
  font-size: 1.05rem;
  color: var(--chalk-soft);
  text-decoration: none;
  border: 1.5px dashed transparent;
  border-radius: 10px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.social-popover a:hover,
.social-popover a:focus-visible {
  background: rgba(244,241,230,0.08);
  color: var(--chalk);
  border-color: rgba(244,241,230,0.30);
  outline: none;
  transform: translateX(2px);
}
.social-popover a.active {
  color: var(--accent-soft);
  background: rgba(217,122,61,0.16);
  border-color: var(--accent);
  border-style: solid;
}
.social-popover .sp-icon {
  width: 20px; height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.9;
}
.social-popover .sp-icon svg { width: 20px; height: 20px; display: block; }
.social-popover .sp-label { flex: 1; min-width: 0; }
.social-popover .sp-sub {
  display: block;
  font-size: .8rem;
  color: var(--chalk-faded);
  font-family: 'Architects Daughter', cursive;
  margin-top: 1px;
  line-height: 1.1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .social-popover { transition: opacity .1s ease; transform: none; }
  .social-popover.open { transform: none; }
}

/* ============================================================
   LOCK PILL — small inline 🔒 badge for section titles
   ============================================================ */
.lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 2px 12px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(217,122,61,0.18);
  border: 1.5px dashed var(--accent);
  color: var(--accent-soft);
  letter-spacing: 0.3px;
  line-height: 1.3;
  text-shadow: none;
  white-space: nowrap;
}

/* ============================================================
   LOCK OVERLAY — placeholder paywall / coming-soon gate
   Wrap any block in <div class="lock-wrap"> + add a child
   <div class="lock-overlay">…</div> as a sibling AFTER the content.
   ============================================================ */
.lock-wrap {
  position: relative;
  /* keep underlying content visible but unreachable */
}
.lock-wrap > .lock-target {
  filter: blur(3px) saturate(0.85);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  /* prevent keyboard focus reaching locked content */
}
.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 32px 24px;
  background:
    radial-gradient(ellipse at center, rgba(15,32,24,0.55), rgba(15,32,24,0.85));
  border-radius: var(--radius);
  pointer-events: auto;
  backdrop-filter: blur(2px);
}
.lock-overlay::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 3px dashed rgba(244,241,230,0.55);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
  animation: lock-pulse 3s ease-in-out infinite;
}
@keyframes lock-pulse {
  0%, 100% { opacity: 0.55; transform: rotate(-0.3deg); }
  50%      { opacity: 0.85; transform: rotate(0.3deg); }
}

.lock-overlay .lock-icon {
  width: clamp(96px, 14vw, 160px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.5));
}
.lock-overlay .lock-icon .body {
  fill: rgba(244,241,230,0.92);
  stroke: var(--board-3);
  stroke-width: 4;
}
.lock-overlay .lock-icon .shackle {
  fill: none;
  stroke: rgba(244,241,230,0.92);
  stroke-width: 14;
  stroke-linecap: round;
  /* slight chalk wobble using dasharray */
  stroke-dasharray: 220;
  stroke-dashoffset: 0;
}
.lock-overlay .lock-icon .keyhole {
  fill: var(--board-3);
}
.lock-overlay .lock-icon .accent {
  fill: var(--accent);
  opacity: 0.85;
}
.lock-overlay h2 {
  font-family: 'Caveat', cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
  color: var(--chalk);
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.lock-overlay p {
  font-family: 'Architects Daughter', cursive;
  color: var(--chalk-soft);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0;
}
.lock-overlay .lock-actions {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 6px;
}
.lock-overlay .lock-stamp {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--accent);
  color: var(--board-3);
  font-family: 'Caveat', cursive;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  border: 2px solid var(--chalk);
  font-size: 0.95rem;
  transform: rotate(8deg);
  letter-spacing: 0.4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Locked tier chip / button — universal lock affordance */
.tier-switch button.locked,
.tier-card .btn.locked,
.tier-card .btn.emperor-locked {
  position: relative;
  cursor: not-allowed;
  opacity: 0.6;
  filter: grayscale(0.4);
}
.tier-switch button.locked::after,
.tier-card .btn.locked::after,
.tier-card .btn.emperor-locked::after {
  content: "🔒";
  margin-left: 6px;
  font-size: 0.9em;
  filter: none;
}
.tier-switch button.locked:hover,
.tier-card .btn.locked:hover,
.tier-card .btn.emperor-locked:hover {
  transform: none;
  background: transparent;
  color: var(--chalk-soft);
}

/* Current tier badge (on Membership CTA) */
.tier-card .btn.current-tier {
  background: rgba(217,122,61,0.15);
  border-color: var(--accent);
  border-style: solid;
  color: var(--accent-soft);
  cursor: default;
  pointer-events: none;
}
.tier-card .btn.current-tier:hover {
  transform: none;
  background: rgba(217,122,61,0.15);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .chalk-dust { display: none; }
  .reveal { opacity: 1; transform: none; }
}
