.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.chip.active { background: #6d4aff; color: #fff; border-color: #6d4aff; }
.search-bar, .newsletter { display: flex; gap: 8px; }
.search-bar input, .newsletter input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; min-width: 180px; }
.btn { border-radius: 999px; }
.btn-primary { background: #6d4aff; box-shadow: 0 10px 24px rgba(109, 74, 255, .28); }
.btn-secondary { border-radius: 999px; }

body { overflow-x: hidden; }

/* ---- Auth (register / login) ---- */
.auth {
  padding: 40px 0 80px;
  background:
    radial-gradient(ellipse 70% 55% at 85% 0%, #f5edff 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 8% 100%, #fff0f7 0%, transparent 55%),
    #faf9fc;
}
.auth-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 40px; align-items: stretch; }
.auth-panel { display: flex; }
.auth-card {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  border: 1px solid #eeedf5;
  border-radius: 28px;
  padding: 36px 36px 32px;
  box-shadow: 0 18px 50px rgba(40, 24, 90, .06);
}
.auth-card h1 { font: 800 40px/1.05 Sora, sans-serif; letter-spacing: -.04em; margin: 14px 0 8px; color: #1b1f33; }
.auth-card > p { margin: 0 0 24px; color: var(--text); font-size: 16px; }
.auth-role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid #e8e6f2;
  border-radius: 14px;
  background: #f0eef6;
  box-sizing: border-box;
}
.auth-role-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font: 700 14px/1.2 Inter, sans-serif;
  color: #6a6f85;
  text-decoration: none;
  text-align: center;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.auth-role-tab:hover {
  color: #3a3f55;
  background: rgba(255, 255, 255, .55);
}
.auth-role-tab.is-active,
.auth-role-tab[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, #6d4aff 0%, #ff4fa3 100%);
  box-shadow: 0 8px 18px rgba(109, 74, 255, .28);
}
.auth-role-tab.is-active:hover,
.auth-role-tab[aria-current="page"]:hover {
  color: #fff;
  background: linear-gradient(135deg, #6d4aff 0%, #ff4fa3 100%);
}
.auth-form { max-width: none; margin: 0; }
.auth-form .ok { margin: 0 0 16px; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input:not([type="checkbox"]) {
  width: auto;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.field { margin: 0 0 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: #3a3f55; margin: 0 0 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; background: #f7f6fb; border: 1px solid #e8e6f2; border-radius: 14px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.input:focus-within { border-color: #6d4aff; background: #fff; box-shadow: 0 0 0 4px rgba(109, 74, 255, .12); }
.input.is-invalid { border-color: #f08aa8; background: #fff8fa; }
.input.is-invalid:focus-within { box-shadow: 0 0 0 4px rgba(255, 79, 163, .12); }
.input.is-ok { border-color: #34c281; }
.input .ico { width: 18px; height: 18px; color: #9a9fb4; flex: 0 0 auto; }
.input:focus-within .ico { color: #6d4aff; }
.auth-form .input input { flex: 1; min-width: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; font: 500 15px Inter, sans-serif; color: #1b1f33; outline: none; border-radius: 0; box-shadow: none; }
.auth-form .input input::placeholder { color: #a5a9bb; }
.input.prefix .prefix-text { color: #6d4aff; font-weight: 700; font-size: 13px; white-space: nowrap; border-right: 1px solid #e4e2ee; margin-right: 4px; padding-right: 10px; }
/* Compact status pill — overrides bulky .ok alert padding from marketing-extra */
.input.prefix {
  position: relative;
  padding-right: 12px;
}
.input.prefix > input {
  padding-right: 88px;
}
.input-state {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 24px;
  max-height: 28px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #9a9fb4;
  background: transparent;
  box-sizing: border-box;
  pointer-events: none;
}
.input-state:empty { display: none; padding: 0; }
.input-state.ok {
  color: #0f8f5a;
  background: rgba(15, 143, 90, .12);
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
}
.input-state.bad {
  color: #d12b5a;
  background: rgba(209, 43, 90, .1);
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
}
.field-hint { margin: 6px 0 0 2px; font-size: 12px; color: #8b90a3; }
.field-hint.ok { color: #0f8f5a; }
.field-hint.bad { color: #d12b5a; }
.toggle-pass { display: grid; place-items: center; width: 36px; height: 36px; margin-right: -6px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #8b90a3; box-shadow: none; cursor: pointer; }
.toggle-pass svg { width: 20px; height: 20px; }
.toggle-pass .eye-shut { display: none; }
.toggle-pass.is-on .eye-open { display: none; }
.toggle-pass.is-on .eye-shut { display: inline; }
.toggle-pass:hover { background: #f4f1ff; color: #6d4aff; }
.field-inline { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 20px; }
.auth-form .check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #3a3f55; cursor: pointer; }
.auth-form .check input { width: 18px; height: 18px; margin: 0; accent-color: #6d4aff; }
.muted-link { font-size: 14px; font-weight: 600; color: #6d4aff; }
.auth-form .btn,
.auth-form .btn-lg { width: 100%; margin-top: 6px; height: 54px; font-size: 16px; border-radius: 14px; }
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin: 4px 0 10px;
  padding: 0 16px;
  border: 1px solid #dadce0;
  border-radius: 14px;
  background: #fff;
  color: #1f1f1f;
  font: 600 15px/1.2 Inter, sans-serif;
  text-decoration: none;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease;
}
.btn-google:hover {
  border-color: #c6c6c6;
  background: #fafafa;
  box-shadow: none;
  color: #1f1f1f;
  opacity: 1;
}
.btn-google:focus-visible {
  outline: 2px solid #6d4aff;
  outline-offset: 2px;
}
.btn-google .google-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block;
}
.btn-google-label {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  color: #1f1f1f;
}
.auth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 22px;
  color: #8b90a3;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: #e4e2ec;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 22px;
  color: #8b90a3;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: #e4e2ec;
}
.auth-divider span { flex: 0 0 auto; }
.input.is-locked { opacity: .85; background: #f0eef6; }
.input.is-locked input { color: #5a5f73; cursor: default; }
.auth-legal { margin: 14px 0 0; font-size: 12px; color: #8b90a3; text-align: center; }
.auth-legal a { color: #6d4aff; font-weight: 700; }
.auth-form .auth-foot { margin: 18px 0 0; text-align: center; font-size: 14px; }
.auth-form .form-error { margin: 6px 0 0 2px; }

.auth-visual {
  position: relative;
  min-height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(circle at 68% 22%, #ffd2ea 0%, #f4dcf6 46%, #ebe4ff 100%);
}
.auth-visual-img {
  position: absolute;
  inset: 36px 8px 72px;
  width: calc(100% - 16px);
  height: auto;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
}
.auth-visual-img.is-cover {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.auth-visual.is-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 12, 40, .18) 0%, transparent 36%, rgba(20, 12, 40, .42) 100%);
}
.auth-visual .scribble-note {
  position: absolute;
  top: 28px;
  left: 32px;
  z-index: 2;
  margin: 0;
  font-family: Caveat, cursive;
  font-weight: 700;
  font-size: 42px;
  line-height: .95;
  color: #7c4dff;
}
.auth-visual .scribble-note span { color: #ff4fa3; }
.auth-visual.is-photo .scribble-note { color: #fff; }
.auth-visual.is-photo .scribble-note span { color: #ffd6ea; }
.auth-points {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.auth-points li {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #1b1f33;
}
@media (max-width: 980px) {
  .auth { padding: 24px 0 56px; }
  .auth-grid { grid-template-columns: 1fr; gap: 0; }
  .auth-card { padding: 28px 22px 24px; }
  .auth-card h1 { font-size: 32px; }
  .auth-visual { display: none; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .btn-google { font-size: 14px; }
  .btn-google-label { white-space: normal; }
}

/* ---- Legal pages ---- */
.legal-meta { color: #8b90a3; font-size: 14px; margin: -6px 0 26px; }
.legal-meta a { color: #6d4aff; font-weight: 700; }
.rich-text { line-height: 1.7; }
.rich-text ul, .rich-text ol { margin: 0 0 18px; padding-left: 24px; }
.rich-text li { margin: 0 0 8px; }
.rich-text a { color: #6d4aff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(109, 74, 255, .35); text-underline-offset: 2px; }
.rich-text a:hover { text-decoration-color: #6d4aff; }
.rich-text h2 { scroll-margin-top: 90px; padding-top: 10px; border-top: 1px solid #eeedf5; }
.rich-text h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.rich-text strong { color: #1b1f33; }

/* ---- Header ---- */
.site-header {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #eeedf5;
  overflow: visible;
  z-index: 100;
}
.nav {
  position: relative;
  height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  overflow: visible;
}
.nav .brand { justify-self: start; display: inline-flex; align-items: center; flex: 0 0 auto; }
.nav .brand img { height: 36px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 4px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: #3a3f55;
}
.nav-links a { padding: 8px 12px; border-radius: 999px; line-height: 1; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.nav-links a:hover { background: #f4f2fb; color: #1b1f33; }
.nav-links a.active { background: #f1edff; color: #6d4aff; }
.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}
.nav-actions > * { flex: 0 0 auto; }
.nav-actions .btn {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-actions .btn-link { color: #3a3f55; padding: 10px 12px; }
.nav-actions .btn-link:hover { background: #f4f2fb; color: #1b1f33; }
.nav-actions .btn-primary { background: #6d4aff; box-shadow: 0 8px 20px rgba(109, 74, 255, .22); transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.nav-actions .btn-primary:hover { background: #5b39f0; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(109, 74, 255, .28); }
.nav-actions .menu { border-radius: 999px; width: 44px; height: 44px; color: #3a3f55; }

/* ---- Language switcher ---- */
.lang-switch {
  position: relative;
  flex: 0 0 auto;
  z-index: 2;
}
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  height: 40px;
  padding: 0 10px 0 12px;
  border: 1px solid #eeedf5;
  border-radius: 999px;
  background: #fff;
  color: #3a3f55;
  font: 600 12px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.lang-switch-code {
  letter-spacing: .04em;
  color: #6d4aff;
}
.lang-switch-name {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lang-switch-caret {
  width: 10px;
  height: 10px;
  opacity: .7;
  flex: 0 0 auto;
  transition: transform .15s ease;
}
.lang-switch.is-open .lang-switch-caret { transform: rotate(180deg); }
.lang-switch-btn:hover { background: #f4f2fb; color: #6d4aff; }
.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  /* Desktop default: right edges of panel + trigger align (opens downward, stays on-page for right-side headers) */
  right: 0;
  left: auto;
  z-index: 200;
  display: block;
  width: min(260px, calc(100vw - 24px));
  max-height: 70vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid #eeedf5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(40, 30, 80, .14);
  box-sizing: border-box;
}
/* Left-side dashboard switcher: open rightward so the panel stays inside the viewport */
.dash-side-theme .lang-switch-menu {
  left: 0;
  right: auto;
}
.lang-switch.is-flip-left .lang-switch-menu {
  left: auto;
  right: 0;
}
.lang-switch.is-flip-right .lang-switch-menu {
  left: 0;
  right: auto;
}
.lang-switch-menu[hidden] { display: none !important; }
.lang-switch-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #3a3f55;
  text-decoration: none;
  font: 600 13px/1.2 Inter, system-ui, sans-serif;
  box-sizing: border-box;
}
.lang-switch-menu a span {
  color: #6d4aff;
  font-size: 11px;
  letter-spacing: .04em;
}
.lang-switch-menu a b {
  font-weight: 600;
  color: inherit;
}
.lang-switch-menu a:hover,
.lang-switch-menu a[aria-current="true"] {
  background: #f4f2fb;
  color: #1b1f33;
}
html[data-theme="dark"] .lang-switch-btn {
  background: #1c1828;
  border-color: #3a3450;
  color: #f4f1fb;
}
html[data-theme="dark"] .lang-switch-code { color: #c9bfff; }
html[data-theme="dark"] .lang-switch-menu {
  background: #1b1726;
  border-color: #3a3450;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .lang-switch-menu a { color: #f4f1fb; }
html[data-theme="dark"] .lang-switch-menu a span { color: #c9bfff; }
html[data-theme="dark"] .lang-switch-menu a:hover,
html[data-theme="dark"] .lang-switch-menu a[aria-current="true"] {
  background: #2a2340;
  color: #f4f1fb;
}

@media (max-width: 1180px) {
  .nav-actions .lang-switch-name,
  .dash-tools .lang-switch-name { display: none; }
}

@media (max-width: 980px) {
  .nav { grid-template-columns: auto 1fr; height: 64px; }
  .nav .brand img { height: 30px; }
  .nav-links { display: none; }
  .nav-actions { grid-column: 2; gap: 8px; }
  /* Compact header keeps a tappable locale code; full name stays in the open menu */
  .nav-actions .lang-switch { display: block; }
  .nav-actions .lang-switch-btn {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0 12px;
    justify-content: center;
  }
  .nav-actions .lang-switch-name { display: none; }
  .nav-menu-tools .lang-switch-btn {
    width: 100%;
    min-height: 44px;
    height: 44px;
    justify-content: space-between;
  }
  .nav-menu-tools .lang-switch-name { display: inline; max-width: none; }
  .dash-tools .lang-switch-btn {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0 12px;
  }
  .dash-tools .lang-switch-name { display: none; }
}

@media (max-width: 767px) {
  .lang-switch { z-index: 130; }
  .lang-switch-menu {
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    max-height: 70vh;
    overflow-y: auto;
    box-sizing: border-box;
  }
  .lang-switch-menu a {
    min-height: 44px;
    padding: 12px 14px;
  }
  /* Header / dash triggers: pin panel to the viewport so right:0 never clips off-screen */
  .nav-actions .lang-switch.is-open .lang-switch-menu,
  .dash-tools .lang-switch.is-open .lang-switch-menu {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 70vh;
    z-index: 200;
  }
  .dash-side-theme .lang-switch {
    position: relative;
    width: 100%;
  }
  .dash-side-theme .lang-switch-btn {
    width: 100%;
    min-height: 44px;
    height: 44px;
    justify-content: space-between;
  }
  .dash-side-theme .lang-switch.is-open .lang-switch-menu {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
  }
}
.board-hero { padding: 36px 0 12px; background: #fff; }
.board-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.board-hero-copy { max-width: 520px; }
.board-hero h1 { font-family: Sora, sans-serif; font-size: clamp(48px, 5.6vw, 76px); line-height: .94; letter-spacing: -.055em; margin: 12px 0 16px; }
.ink { font-family: Caveat, cursive; font-weight: 700; font-size: 42px; line-height: .9; color: #7c4dff; transform: rotate(-7deg); display: block; width: max-content; margin: 8px 0 28px; }
.ink span { color: #ff4fa3; }
.brush { background-image: linear-gradient(transparent 62%, #ffd3ea 62%, #ffd3ea 92%, transparent 92%); }
.cta .brush { background-image: linear-gradient(transparent 64%, rgba(255, 255, 255, .32) 64%, rgba(255, 255, 255, .32) 92%, transparent 92%); }
/* CTA pill: keep label on one line; grow with translation length */
.cta > div:first-child { flex: 1 1 auto; min-width: 0; }
.cta > .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
  padding: 14px 26px;
  box-sizing: border-box;
}
@media (max-width: 360px) {
  .cta > .btn {
    white-space: normal;
    width: 100%;
  }
}
.board-hero p { color: var(--text); font-size: 17px; max-width: 460px; }
.portrait-box, .portrait-stage {
  position: relative;
  min-height: 520px;
  border-radius: 36px;
  overflow: hidden;
  background: radial-gradient(circle at 68% 30%, #ffd2ea 0%, #f4dcf6 48%, #ebe4ff 100%);
}
.portrait-box img, .portrait-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 10%;
  border-radius: 0;
}
.portrait-box .support-float { right: 20px; bottom: 20px; top: auto; }
.portrait-stage.cutout { border-radius: 36px; }
.heart-float, .support-float { position: absolute; background: #fff; box-shadow: 0 16px 40px rgba(40, 24, 80, .14); }
.heart-float { right: 36px; top: 18px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #ff4fa3; font-size: 22px; z-index: 2; }
.support-float { right: 22px; bottom: 108px; border-radius: 18px; padding: 12px 16px; min-width: 158px; z-index: 2; }
.support-float small { display: block; color: #8b90a3; font-size: 12px; font-weight: 700; }
.support-float strong { display: flex; align-items: center; gap: 8px; font: 800 22px Sora, sans-serif; }
.support-float i { width: 8px; height: 8px; border-radius: 50%; background: #18b979; display: inline-block; }

.statbar { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 28px; box-shadow: 0 18px 50px rgba(40, 24, 90, .08); margin: 18px auto 10px; position: relative; }
.statbar div { text-align: center; padding: 26px 10px; }
.statbar strong { display: block; font: 800 28px Sora, sans-serif; color: #6d4aff; }
.statbar span { color: #8b90a3; font-size: 13px; font-weight: 700; }

.kind-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 28px; }
.kind { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px 10px; text-align: center; box-shadow: 0 8px 24px rgba(40, 24, 90, .04); }
.kind b { display: block; margin-top: 8px; font-size: 13px; }
.kind .ico { width: 48px; height: 48px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: #f4efff; font-size: 22px; }

.phone-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center; }
.iphone {
  width: min(292px, 100%);
  margin: auto;
  background: linear-gradient(180deg, #2a2c34, #121318);
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 32px 70px rgba(20, 16, 50, .26), inset 0 0 0 1px rgba(255, 255, 255, .1);
  position: relative;
}
.iphone-btn { position: absolute; background: #0b0c10; border-radius: 2px; }
.iphone-btn.silent { left: -3px; top: 98px; width: 3px; height: 20px; }
.iphone-btn.vol-up { left: -3px; top: 132px; width: 3px; height: 34px; }
.iphone-btn.vol-down { left: -3px; top: 174px; width: 3px; height: 34px; }
.iphone-btn.power { right: -3px; top: 154px; width: 3px; height: 62px; }
.iphone-screen { background: #fff; border-radius: 36px; overflow: hidden; position: relative; }
.iphone-cover { height: 150px; background: url("/images/sophia-cover.png") center 42% / cover; }
.iphone-status { position: absolute; top: 0; left: 0; right: 0; z-index: 3; height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 0; color: #fff; font-size: 11px; font-weight: 700; }
.iphone-island { position: absolute; left: 50%; top: 11px; width: 88px; height: 22px; background: #0e0f16; border-radius: 99px; transform: translateX(-50%); }
.iphone-signal { display: flex; align-items: flex-end; gap: 2px; height: 10px; }
.iphone-signal i { display: block; width: 3px; background: #fff; border-radius: 1px; }
.iphone-signal i:nth-child(1) { height: 3px; }
.iphone-signal i:nth-child(2) { height: 5px; }
.iphone-signal i:nth-child(3) { height: 7px; }
.iphone-signal i:nth-child(4) { height: 9px; }
.iphone-signal em { width: 16px; height: 8px; margin-left: 4px; border: 1.4px solid #fff; border-radius: 2px; position: relative; font-style: normal; }
.iphone-signal em::after { content: ""; position: absolute; right: -3px; top: 2px; width: 1.5px; height: 3px; background: #fff; border-radius: 0 1px 1px 0; }
.iphone-signal em::before { content: ""; position: absolute; inset: 1px 4px 1px 1px; background: #fff; border-radius: 1px; }
.iphone-avatar { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; margin: -40px auto 8px; display: block; object-fit: cover; position: relative; z-index: 1; box-shadow: 0 8px 18px rgba(20, 16, 50, .14); }
.iphone-profile { text-align: center; padding: 0 16px 4px; }
.iphone-profile h4 { font: 800 16px/1.2 Sora, sans-serif; margin: 0 0 3px; }
.iphone-handle { color: #8b90a3; font-size: 11px; font-weight: 700; margin: 0 0 6px; }
.iphone-bio { color: #5c6278; font-size: 11px; line-height: 1.45; margin: 0 0 10px; }
.iphone-socials { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.iphone-socials span { width: 26px; height: 26px; border-radius: 50%; background: #f4efff; display: grid; place-items: center; }
.iphone-socials svg { width: 13px; height: 13px; display: block; }
.iphone-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.iphone-amounts span { border: 1px solid #eceaf3; border-radius: 9px; padding: 7px 0; font-size: 11px; font-weight: 800; }
.iphone-amounts span.on { background: #6d4aff; color: #fff; border-color: #6d4aff; }
.iphone-cta { background: linear-gradient(90deg, #6d4aff, #c44bff 55%, #ff4fa3); color: #fff; border-radius: 12px; padding: 10px; font-weight: 800; font-size: 13px; }
.iphone-wish { padding: 6px 12px 24px; text-align: left; }
.iphone-wish-head { font-size: 11px; font-weight: 800; color: #8b90a3; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px 2px; }
.iphone-wish-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 8px; border: 1px solid #f0eef6; border-radius: 12px; margin-bottom: 6px; }
.iphone-wish-item span { width: 28px; height: 28px; border-radius: 8px; background: #f4efff; display: grid; place-items: center; font-size: 13px; }
.iphone-wish-item b { display: block; font-size: 12px; line-height: 1.2; }
.iphone-wish-item small { display: block; color: #8b90a3; font-size: 10px; font-weight: 700; }
.iphone-wish-item em { font-style: normal; font-weight: 800; font-size: 12px; color: #6d4aff; }
.iphone-home { position: absolute; left: 50%; bottom: 7px; width: 96px; height: 4px; background: #1b1f33; border-radius: 99px; opacity: .28; transform: translateX(-50%); }
.checks { display: grid; gap: 12px; margin-top: 18px; }
.checks div { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.checks i { width: 22px; height: 22px; border-radius: 50%; background: #6d4aff; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; margin-top: 36px; }
.feature-grid article, .creator-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 10px 28px rgba(40, 24, 90, .05); }
.creator-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.creator-card { padding: 0 0 16px; overflow: hidden; text-align: center; }
.creator-card img { width: 100%; height: 180px; object-fit: cover; }
.creator-card .btn { margin-top: 10px; }
.step-board { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.step-col { background: #fff; border: 1px solid #f0eef6; border-radius: 28px; padding: 26px 22px; box-shadow: 0 12px 40px rgba(40, 24, 90, .04); position: relative; }
.step-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f2f2f6; }
.step-line:last-child { border-bottom: 0; }
.bubble { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.bubble.p { background: #6d4aff; }
.bubble.k { background: #ff4fa3; }
.price-board { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.fee-card { background: #f4efff; border-radius: 24px; padding: 28px; }
.fee-card h3 { font: 800 64px Sora, sans-serif; color: #6d4aff; margin: 0; }
.pay-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.pay-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 44px; min-width: 72px; padding: 0 14px; background: #fff; border: 1px solid #e6e4f0; border-radius: 12px; box-shadow: 0 2px 6px rgba(27, 31, 51, .04); }
.pay-chip svg { display: block; flex: 0 0 auto; }
.pay-word { font: 700 17px/1 Inter, sans-serif; color: #111; letter-spacing: -.02em; }
.pay-word.pp { font-style: italic; font-weight: 800; color: #253b80; }
.pay-word.pp b { color: #179bd7; font-weight: 800; }
.faq.faq-list { grid-template-columns: 1fr; max-width: 760px; }
.faq.faq-list summary { display: flex; justify-content: space-between; align-items: center; list-style: none; }
.faq.faq-list summary::-webkit-details-marker { display: none; }
.faq.faq-list summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid #1b1f33; border-bottom: 2px solid #1b1f33; transform: rotate(45deg); margin-left: 16px; flex: 0 0 auto; }
.faq.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: 6px; }
.comparison td:last-child { text-align: right; font-weight: 700; }
.line-ico { width: 22px; height: 22px; display: block; }
.creator-card .btn { padding: 8px 16px; font-size: 13px; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.article-grid article { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.article-grid img { width: 100%; height: 150px; object-fit: cover; }
.article-grid div { padding: 14px; }
.scribble-note, .ink { font-family: Caveat, cursive; font-weight: 700; color: #7c4dff; }
.scribble-note { transform: rotate(-8deg); font-size: 34px; line-height: .95; margin: 0; }
.scribble-note span, .ink span { color: #ff4fa3; }

/* ---- Subpage shell ---- */
.page-head { padding: 54px 0 46px; text-align: center; background: radial-gradient(ellipse 70% 100% at 50% 0%, #f5edff 0%, rgba(255, 240, 248, .6) 45%, #fff 100%); }
.page-head h1 { font-family: Sora, sans-serif; font-size: clamp(38px, 4.6vw, 60px); letter-spacing: -.05em; line-height: 1; margin: 14px 0 14px; }
.page-head .section-lead { margin: 0 auto; }
.page-head .chip-row, .page-head .search-bar { justify-content: center; margin: 22px auto 0; }
.page-head .search-bar { max-width: 520px; }
.page-head .search-bar input { background: #fff; }
.section.tail { padding-top: 0; }
.section.tight { padding-top: 56px; }
.ico { width: 22px; height: 22px; display: block; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.trust-bar { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 0 auto; }
.trust-bar span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; color: #3a3f55; box-shadow: 0 10px 28px rgba(40, 24, 90, .06); }
.trust-bar .ico { width: 16px; height: 16px; color: #6d4aff; }
.board-hero + .section .trust-bar { margin-top: -18px; }

.feature-grid article { transition: transform .2s ease, box-shadow .2s ease; }
.feature-grid article:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(40, 24, 90, .10); }
.feature-grid .icon { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #f1edff, #ffe6f3); color: #6d4aff; }
.feature-grid h3 { font: 800 18px/1.25 Sora, sans-serif; margin: 16px 0 6px; }
.feature-grid p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.55; }
.feature-grid.numbered .icon { font: 800 18px Sora, sans-serif; }

.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px 26px 24px; box-shadow: 0 12px 34px rgba(40, 24, 90, .05); display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.quote::before { content: "“"; position: absolute; top: 4px; right: 20px; font: 800 96px/1 Sora, sans-serif; color: #f1ecff; }
.quote p { margin: 0; font-size: 15px; line-height: 1.65; color: #3f4457; position: relative; }
.quote-who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote-who i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 14px Sora, sans-serif; color: #fff; font-style: normal; flex: 0 0 auto; }
.quote-who b { display: block; font-size: 14px; }
.quote-who small { color: #8b90a3; font-size: 12px; font-weight: 700; }
.quote-note { color: #8b90a3; font-size: 12px; text-align: center; margin: 18px 0 0; }
.quote .scribble-note, .faq-side .scribble-note { font-size: 30px; color: #7c4dff; line-height: .95; margin: 0; }
.faq-side .scribble-note { margin-bottom: 10px; }
.step-board .quote p:first-child { font-size: 18px; line-height: 1.6; }

.creator-card { text-align: left; transition: transform .2s ease, box-shadow .2s ease; }
.creator-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(40, 24, 90, .10); }
.creator-card img { height: 230px; object-position: center 22%; }
.creator-card .who { padding: 14px 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.creator-card strong { display: block; font: 800 15px Sora, sans-serif; }
.creator-card small { color: #8b90a3; font-size: 12px; font-weight: 700; }
.creator-card .who .btn { margin: 0; }

.comparison { display: table; }
.comparison td:first-child { color: var(--text); }
.comparison tr:last-child td { background: #f1fbf6; font-weight: 800; color: #0f8f5a; }
.fee-card p { margin: 4px 0 18px; font-weight: 800; color: #3a3f55; }
.fee-card .checks { margin-top: 0; }
.fee-note { color: #8b90a3; font-size: 13px; margin-top: 14px; }
.pay-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 18px; }
.pay-card h3 { margin: 0; font: 800 20px Sora, sans-serif; }
.pay-card .pay-row { margin-top: 0; }
.faq-split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 22px; align-items: stretch; margin-top: 48px; }
.faq-split .faq.faq-list { margin-top: 0; max-width: none; }
.faq-side { background: linear-gradient(160deg, #f4efff 0%, #ffeaf4 100%); border: 1px solid #efe9fb; border-radius: 24px; padding: 34px 28px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; overflow: hidden; }
.faq-side::before { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 79, 163, .16), transparent 70%); pointer-events: none; }
.faq-side .scribble-note { margin-bottom: 10px; }
.faq-side h3 { font: 800 24px Sora, sans-serif; margin: 6px 0 8px; color: #1b1f33; }
.faq-side p { margin: 0 0 18px; color: var(--text); font-size: 14px; }
.faq-side .side-list { list-style: none; margin: 0 0 22px; padding: 16px 18px; display: grid; gap: 10px; text-align: left; background: rgba(255, 255, 255, .7); border-radius: 16px; width: 100%; }
.faq-side .side-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #1b1f33; }
.faq-side .side-list .ico { width: 20px; height: 20px; flex: 0 0 auto; color: #fff; background: #6d4aff; border-radius: 50%; padding: 4px; }
.faq-side .btn { width: 100%; }
.faq-side small { display: block; margin-top: 12px; font-size: 12px; color: #8b90a3; }

.step-col { padding: 30px 26px; }
.step-col .eyebrow { margin-bottom: 8px; }
.step-line { gap: 14px; padding: 14px 0; }
.step-line strong { font-size: 15px; display: block; }
.step-line p { margin: 2px 0 0; color: var(--text); font-size: 14px; }
.step-board .bubble { width: 32px; height: 32px; margin-top: 2px; }
.step-board { position: relative; }
/* Fans card only: scribble under the steps, not over step 5.
   Full-width + rotate(-8deg) used to swing the box into the last step text. */
.step-col > .scribble-note {
  position: static;
  display: block;
  width: max-content;
  max-width: calc(100% - 8px);
  margin: 32px 0 8px auto;
  padding: 0;
  text-align: right;
  line-height: 1.05;
  transform: rotate(-8deg);
  transform-origin: right center;
  clear: both;
}
html[data-theme="dark"] .step-col > .scribble-note { color: #fff; }
@media (max-width: 640px) {
  .step-col > .scribble-note {
    margin: 28px auto 8px;
    text-align: center;
    transform-origin: center center;
  }
}

/* for-creators: Mira quote scribble under the card (not in a stretch void) */
.step-board > .quote-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: start;
  gap: 0;
  min-width: 0;
}
.step-board > .quote-stack > .quote {
  margin: 0;
}
.step-board > .quote-stack > .quote .quote-who {
  margin-top: 4px;
}
.step-board > .quote-stack > .scribble-note {
  position: static;
  display: block;
  width: max-content;
  max-width: calc(100% - 8px);
  margin: -6px 10px 0 auto;
  padding: 0;
  text-align: right;
  font-size: 28px;
  line-height: 1.05;
  transform: rotate(-6deg);
  transform-origin: right top;
  color: #7c4dff;
  z-index: 1;
}
html[data-theme="dark"] .step-board > .quote-stack > .scribble-note { color: #fff; }
@media (max-width: 980px) {
  .step-board > .quote-stack > .scribble-note {
    margin: 12px auto 0;
    text-align: center;
    transform: rotate(-4deg);
    transform-origin: center center;
  }
}

.logo-strip { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.logo-strip span { padding: 14px 26px; border: 1px solid var(--line); border-radius: 14px; font: 800 18px Sora, sans-serif; color: #3a3f55; background: #fff; letter-spacing: -.02em; }
.split-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.split-card h3 { margin: 0 0 6px; font: 800 22px Sora, sans-serif; }
.split-card p { margin: 0; }
.newsletter-card {
  background: linear-gradient(135deg, #f4efff, #ffeaf4);
  border: 0;
  color: #1b1f33;
}
.newsletter-card p { color: #5c5670; }

.article-grid article { transition: transform .2s ease, box-shadow .2s ease; box-shadow: 0 10px 28px rgba(40, 24, 90, .05); border-radius: 22px; }
.article-grid article:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(40, 24, 90, .10); }
.article-grid img { height: 190px; }
.article-grid div { padding: 18px; }
.article-grid h3 { font: 800 17px/1.3 Sora, sans-serif; margin: 10px 0 8px; }
.article-grid p { margin: 0; color: #8b90a3; font-size: 12px; font-weight: 700; }
.article-grid .tag { display: inline-flex; }
.article-grid article.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr .9fr; }
.article-grid article.featured img { height: 100%; min-height: 300px; }
.article-grid article.featured div { padding: 34px; align-self: center; }
.article-grid article.featured h3 { font-size: 30px; line-height: 1.1; }
.article-grid article.featured .excerpt { color: var(--text); font-size: 15px; font-weight: 500; margin: 12px 0 0; }

.legal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.legal-grid dl { margin: 0; display: grid; gap: 14px; }
.legal-grid dt { color: #8b90a3; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.legal-grid dd { margin: 2px 0 0; font-weight: 700; }

.values-grid article { text-align: left; }
.values-grid .icon { margin-bottom: 4px; }
.about-photo { border-radius: 32px; overflow: hidden; position: relative; min-height: 360px; }
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-photo .scribble-note { position: absolute; right: 22px; bottom: 22px; background: rgba(255, 255, 255, .92); padding: 10px 14px; border-radius: 14px; font-size: 26px; }
.about-story { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-story p { color: var(--text); font-size: 16px; line-height: 1.7; margin: 0 0 14px; }
.job-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid #f2f2f6; }
.job-row:last-child { border-bottom: 0; }
.job-row strong { display: block; font-size: 15px; }
.job-row small { color: #8b90a3; font-size: 12px; font-weight: 700; }
.job-row .badge { white-space: nowrap; }
.perk-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.perk-row span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.perk-row .ico { width: 16px; height: 16px; color: #6d4aff; }
.help-grid article { display: block; }
.help-grid article .icon { color: #6d4aff; }

@media (max-width: 980px) {
  .faq-split, .legal-grid, .about-story, .article-grid article.featured { grid-template-columns: 1fr; }
  .quote-grid {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .quote-grid::-webkit-scrollbar { display: none; }
  .quote-grid > .quote { flex: 0 0 84%; scroll-snap-align: start; min-width: 0; }
  .faq-side { position: relative; }
  .creator-card img { height: 200px; }
  .article-grid article.featured img { min-height: 220px; }
  .board-hero-grid, .phone-split, .step-board, .price-board { grid-template-columns: 1fr; }
  .kind-row, .feature-grid, .cols-4, .creator-row, .article-grid, .statbar { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .board-hero-copy { max-width: none; }
  .portrait-box, .portrait-stage, .portrait-stage.cutout { min-height: 400px; }
}
@media (max-width: 640px) {
  .kind-row, .statbar, .creator-row, .article-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid, .creator-row { grid-template-columns: 1fr; }
  .page-head { padding: 40px 0 34px; }
  .job-row { grid-template-columns: 44px 1fr; }
  .job-row .badge { grid-column: 2; justify-self: start; }
}

/* ---- Menu button (desktop + mobile) ---- */
.nav-menu-cta { display: none; }
.nav-actions .menu {
  display: flex;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #eeedf5;
  border-radius: 999px;
  background: #fff;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.nav-actions .menu span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #1b1f33;
  flex: 0 0 auto;
}
.site-header.open .nav-actions .menu span { transition: transform .15s ease, opacity .15s ease; }
.site-header.open .nav-actions .menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.open .nav-actions .menu span:nth-child(2) { opacity: 0; }
.site-header.open .nav-actions .menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop: tools-only flyout (lang + theme); nav links stay in the bar */
@media (min-width: 981px) {
  .site-header.open .nav-menu-cta {
    display: grid;
    gap: 0;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 120;
    width: min(280px, calc(100vw - 32px));
    margin: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #eeedf5;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(37, 31, 89, .12);
  }
  .site-header.open .nav-menu-cta > .btn { display: none; }
  .site-header.open .nav-menu-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .site-header.open .nav-menu-tools .lang-switch {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    z-index: 5;
  }
  .site-header.open .nav-menu-tools .lang-switch-btn {
    width: 100%;
    min-height: 44px;
    height: 44px;
    justify-content: space-between;
  }
  .site-header.open .nav-menu-tools .lang-switch-name {
    display: inline;
    max-width: none;
  }
}

@media (max-width: 980px) {
  .site-header { position: sticky; top: 0; z-index: 90; }
  /*
   * Let the open sheet position against the full-width header, not the
   * inset .container.nav — otherwise left/right:0 only span the container.
   */
  .nav { position: static; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .nav-links { display: none; }
  .nav-actions { display: flex; align-items: center; }
  .nav-actions .btn,
  .site-header.open .nav-actions .btn-primary,
  .site-header.open .nav-actions .btn-link { display: none; }
  .site-header.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* Base .nav-links uses justify-self:center — that shrink-wraps abspos width */
    justify-content: flex-start;
    justify-self: stretch;
    position: absolute;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    top: 100%;
    z-index: 110;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 64px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    gap: 2px;
    margin: 0;
    padding: 8px 14px 14px;
    background: #fff;
    border-bottom: 1px solid #eeedf5;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 18px 40px rgba(37, 31, 89, .1);
    box-sizing: border-box;
  }
  .site-header.open .nav-links > a {
    padding: 13px 12px;
    border-radius: 12px;
    font-size: 16px;
  }
  .site-header.open .nav-menu-cta {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
  }
  .site-header.open .nav-menu-cta .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
  /*
   * Mobile drawer tools: lang trigger + theme on one row; locale list is a
   * full-width scrolling block under that row (display:contents promotes
   * btn/menu into the tools grid). Never a second flyout over the form.
   */
  .site-header.open .nav-menu-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 8px;
    row-gap: 8px;
    width: 100%;
  }
  .site-header.open .nav-menu-tools .lang-switch {
    display: contents;
    position: static;
    z-index: 1;
  }
  .site-header.open .nav-menu-tools .lang-switch-btn {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-height: 44px;
    height: 44px;
    justify-content: space-between;
  }
  .site-header.open .nav-menu-tools .lang-switch-name {
    display: inline;
    max-width: none;
  }
  .site-header.open .nav-menu-tools .lang-switch.is-open .lang-switch-menu {
    grid-column: 1 / -1;
    grid-row: 2;
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: none;
    max-height: min(50vh, 360px);
    margin-top: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: none;
    z-index: auto;
  }
  .site-header.open .nav-menu-tools .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    flex: 0 0 auto;
  }
  .phone-split { display: flex; flex-direction: column; gap: 28px; }
  .phone-split > div:last-child { order: -1; }
  .ink { width: auto; max-width: 100%; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .board-hero { padding: 18px 0 4px; }
  .board-hero-grid { gap: 18px; }
  .board-hero h1 { font-size: 40px; }
  .board-hero p, .section-lead { font-size: 15px; }
  .hero-ctas { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-ctas .btn { width: 100%; min-height: 48px; }
  .portrait-box, .portrait-stage { min-height: 320px; border-radius: 24px; }
  .support-float { right: 12px; bottom: 12px; min-width: 0; }
  .section { padding: 48px 0; }
  .section-title { font-size: 32px; }
  .statbar { border-radius: 20px; margin-top: 8px; }
  .statbar div { padding: 16px 8px; }
  .statbar strong { font-size: 22px; }
  .kind-row { gap: 10px; }
  .kind { padding: 16px 8px; border-radius: 18px; }
  .page-head { padding: 28px 0 22px; }
  .page-head h1 { font-size: 34px; }
  .page-head .search-bar,
  .search-bar,
  .newsletter { flex-direction: column; align-items: stretch; }
  .search-bar input,
  .newsletter input { min-width: 0; width: 100%; }
  .cta { padding: 26px 20px; border-radius: 22px; align-items: stretch; }
  .cta h2 { font-size: 28px; }
  .cta .btn { width: 100%; min-height: 48px; }
  .quote-grid { gap: 12px; }
  .footer { padding: 28px 0 18px; background: #faf9fc; border-top: 0; }
  .footer .brand img,
  .footer .footer-brand-logo {
    height: 28px;
    width: auto;
    max-width: min(168px, 100%);
    object-fit: contain;
    filter: none;
  }
  .footer-note { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px 28px; align-items: start; }
  .footer-grid > div:first-child { grid-column: 1 / -1; margin: 0; }
  .footer-grid > div:nth-child(4) { grid-column: 1 / -1; }
  .footer-grid > div:not(:first-child) {
    display: block;
    padding: 0;
    border: 0;
  }
  .footer-grid > div:nth-child(5) { display: none; }
  .footer h5 { margin: 0 0 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8b84a8; }
  .footer ul { display: grid; gap: 8px; }
  .footer ul li { display: block; }
  .footer ul li::after { content: none; }
  .footer ul a { padding: 0; font-size: 14px; font-weight: 600; line-height: 1.3; color: #2c3148; }
  .footer-grid > div:nth-child(4) ul { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .footer-socials { margin-top: 16px; gap: 12px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid #eceaf3;
    line-height: 1.45;
  }
  .pay-card { align-items: flex-start; }
  .comparison { font-size: 14px; }
  .comparison td { padding: 8px 0; }
  .article-grid article.featured div { padding: 18px; }
  .article-grid article.featured h3 { font-size: 24px; }
  .auth { padding: 16px 0 40px; }
  .auth-card { padding: 22px 16px 20px; border-radius: 22px; }
  .auth-card h1 { font-size: 30px; }
  .input.prefix {
    height: 52px;
    min-height: 52px;
    flex-wrap: nowrap;
    padding-top: 0;
    padding-bottom: 0;
    padding-right: 12px;
  }
  .input.prefix .prefix-text {
    width: auto;
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    border-right: 1px solid #e4e2ee;
    margin-right: 4px;
    padding: 0 8px 0 0;
  }
  .input.prefix > input { min-width: 0; padding-right: 88px; }
  .input-state { top: 50%; bottom: auto; transform: translateY(-50%); }
  .rich-text { font-size: 15px; }
  .rich-text h2 { font-size: 24px; }
  .sheet, .support-card, .about-card { border-radius: 18px; }
  .ink { font-size: 36px; line-height: 1.05; transform: none; width: auto; margin: 14px 0 16px; }
  .article-grid, .article-grid article.featured, .split-card { grid-template-columns: 1fr; }
  .split-card .newsletter { width: 100%; }
  .quote { padding: 18px; }
  .checks { gap: 8px; }
  .pay-card { flex-direction: column; align-items: flex-start; }
  .pay-card .pay-row { margin-top: 12px; }
}
