/* day.my — app styles (landing, auth, dashboard) */
:root {
  --ink: #14213D;
  --ink-soft: #4A5672;
  --sky: #2F6BFF;
  --sun: #FFC83D;
  --sun-deep: #F2B200;
  --mist: #F3F6FC;
  --paper: #FFFFFF;
  --line: #D6DFEE;
  --danger: #C62E2E;
  --ok: #17803D;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
  --on-ink: #FFFFFF;
  --sun-shadow: #14213D;
  --tint-warn: #FFFBEA; --tint-gold: #FFF1C7; --tint-orange: #FFF4E0; --tint-orange-line: #F2CD8E; --tint-orange-text: #7A4B00;
  --tint-bad: #FDE8E8; --tint-bad-line: #F3B6B6; --tint-bad-text: #8A1C1C;
  --tint-ok: #E3F5E8; --tint-ok-line: #A6DAB5; --tint-ok-text: #0F5129;
  --tint-info: #E8F0FF; --tint-info-line: #B9CCFA; --tint-info-text: #1F3F99;
  --tint-mine: #EAF1FF; --tint-mine-line: #C9DAFF;
  --shadow: var(--shadow);
  color-scheme: light;
}
/* dark mode: follows the device, or the visitor's choice from the toggle in the top bar */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --ink: #E8EDF7; --ink-soft: #A3AEC6; --sky: #86ABFF; --mist: #0D1322; --paper: #161E33; --line: #2B3653;
  --danger: #FF7676; --ok: #5ACB86; --on-ink: #0D1322; --sun-shadow: #000000;
  --tint-warn: #2A2510; --tint-gold: #3A2F0B; --tint-orange: #33240E; --tint-orange-line: #6B4E1C; --tint-orange-text: #FFD28A;
  --tint-bad: #3A1A1E; --tint-bad-line: #6E2F36; --tint-bad-text: #FFB3B3;
  --tint-ok: #13301F; --tint-ok-line: #2C6B45; --tint-ok-text: #9BE3B3;
  --tint-info: #17244A; --tint-info-line: #33508F; --tint-info-text: #B5C9FF;
  --tint-mine: #1B2A50; --tint-mine-line: #2E4580;
  --shadow: rgba(0, 0, 0, .45);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E8EDF7; --ink-soft: #A3AEC6; --sky: #86ABFF; --mist: #0D1322; --paper: #161E33; --line: #2B3653;
  --danger: #FF7676; --ok: #5ACB86; --on-ink: #0D1322; --sun-shadow: #000000;
  --tint-warn: #2A2510; --tint-gold: #3A2F0B; --tint-orange: #33240E; --tint-orange-line: #6B4E1C; --tint-orange-text: #FFD28A;
  --tint-bad: #3A1A1E; --tint-bad-line: #6E2F36; --tint-bad-text: #FFB3B3;
  --tint-ok: #13301F; --tint-ok-line: #2C6B45; --tint-ok-text: #9BE3B3;
  --tint-info: #17244A; --tint-info-line: #33508F; --tint-info-text: #B5C9FF;
  --tint-mine: #1B2A50; --tint-mine-line: #2E4580;
  --shadow: rgba(0, 0, 0, .45);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--mist);
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--sky); }
h1, h2 { line-height: 1.15; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ---------- top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 40px);
}
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo-sun { width: 18px; height: 18px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(255, 200, 61, .3); }
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav a, .topnav .linklike { white-space: nowrap; }
.topnav a:not(.btn), .linklike { color: var(--ink); text-decoration: none; font-weight: 600; }
.topnav a:not(.btn):hover, .linklike:hover { text-decoration: underline; }
.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.linklike.danger { color: var(--danger); font-weight: 500; font-size: .9rem; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink); color: var(--on-ink);
  text-decoration: none; cursor: pointer;
  transition: background-color .12s, transform .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-busy { opacity: .6; cursor: progress; transform: none; }
.btn-sun { background: var(--sun); border-color: #14213D; color: #14213D; box-shadow: 3px 3px 0 var(--sun-shadow); }
.btn-sun:hover { background: var(--sun-deep); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost.is-done { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-small { padding: 7px 14px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- flash + toast */
.flash { max-width: 1180px; margin: 0 auto 8px; width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--r); background: var(--tint-ok); color: var(--tint-ok-text); font-weight: 600; }
.flash-error { background: var(--tint-bad); color: var(--tint-bad-text); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--on-ink); padding: 10px 18px; border-radius: 999px;
  font-weight: 600; z-index: 50; max-width: calc(100vw - 32px); text-align: center;
  box-shadow: 0 8px 24px var(--shadow);
}
.toast-error { background: var(--danger); }

/* ---------- landing */
.hero {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) clamp(16px, 4vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 6vw, 80px); align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 18px; max-width: 13ch; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; margin: 0 0 36px; }

.claim { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.claim-field {
  display: flex; align-items: baseline; width: 100%;
  border-bottom: 4px solid var(--ink);
  font-size: clamp(1.8rem, 4.6vw, 3.2rem); font-weight: 800; letter-spacing: -.02em;
}
.claim-field input {
  flex: 1 1 auto; min-width: 0; width: 100%;
  font: inherit; letter-spacing: inherit; color: var(--sky);
  border: 0; background: transparent; padding: 4px 0; text-align: left;
}
.claim-prefix { color: var(--ink); white-space: nowrap; }
.claim-field-sm .claim-prefix { color: var(--ink-soft); font-weight: 600; }
.claim-field input::placeholder { color: #A9B6CF; }
.claim-field input:focus { outline: none; }
.claim-field:focus-within { border-bottom-color: var(--sky); }
.claim-suffix { color: var(--ink); white-space: nowrap; }
.claim .btn { font-size: 1.05rem; padding: 14px 26px; }
.hint { font-size: .9rem; color: var(--ink-soft); margin-top: 14px; }

.phone {
  --ink: #14213D; --ink-soft: #4A5672; --on-ink: #FFFFFF; --sky: #2F6BFF;
  width: 100%; max-width: 320px; margin: 0 auto;
  border: 10px solid var(--ink); border-radius: 40px;
  background: var(--ink);
  box-shadow: 14px 14px 0 var(--sun);
  overflow: hidden;
}
.phone-screen {
  background: linear-gradient(170deg, #EAF2FF, #FFF4D6);
  border-radius: 30px; padding: 30px 20px 20px; min-height: 520px;
  display: flex; flex-direction: column; align-items: stretch; text-align: center;
}
.mini-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 8px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }
.mini-name { font-weight: 800; font-size: 1.15rem; margin: 0; }
.mini-bio { font-size: .85rem; color: var(--ink-soft); margin: 2px 0 16px; }
.mini-updates { text-align: left; border-left: 2px solid rgba(20, 33, 61, .2); padding-left: 12px; margin: 0 0 16px 6px; }
.mini-updates p { font-size: .82rem; margin: 0 0 10px; line-height: 1.4; }
.mini-updates span { display: block; font-size: .7rem; color: var(--ink-soft); }
.mini-link { display: block; background: var(--ink); color: var(--on-ink); border-radius: 999px; padding: 10px; font-weight: 700; font-size: .88rem; margin-bottom: 9px; }
.mini-url { margin: auto 0 0; padding-top: 10px; font-size: .75rem; font-weight: 700; color: var(--sky); }

.explain p { margin: 0; color: var(--ink-soft); max-width: 36ch; }

/* ---------- forms */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
label small { font-weight: 400; color: var(--ink-soft); }
:where(input:not([type=checkbox], [type=radio], [type=color]), textarea, select) {
  /* low specificity so component styles below can override */
  font: inherit; font-weight: 400; color: var(--ink);
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--line); border-radius: 12px;
  background: var(--paper);
}
:where(input, textarea, select):focus { outline: none; border-color: var(--sky); }
textarea { resize: vertical; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.narrow { max-width: 420px; }

.auth-wrap { width: 100%; max-width: 440px; margin: 0 auto; padding: 32px 20px 64px; }
.auth-wrap h1 { font-size: 2.2rem; letter-spacing: -.02em; margin: 0 0 20px; }
.claim-field-sm { font-size: 1.15rem; font-weight: 700; border: 2px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--paper); align-items: center; }
.claim-field-sm:focus-within { border-color: var(--sky); }
.claim-field-sm input { border: 0; padding: 10px 0; text-align: left; background: transparent; color: var(--sky); }
.claim-field-sm .claim-suffix { color: var(--ink-soft); font-weight: 600; }
.avail { min-height: 1.2em; }
.avail.is-ok { color: var(--ok); }
.avail.is-bad { color: var(--danger); }
.errors { background: var(--tint-bad); color: var(--tint-bad-text); border-radius: var(--r); padding: 10px 16px; margin-bottom: 18px; }
.errors p { margin: 4px 0; }
.notice { background: var(--tint-info); border-radius: var(--r); padding: 12px 16px; }
.notice p { margin: 6px 0; }
.auth-alt { margin-top: 22px; color: var(--ink-soft); }

/* ---------- dashboard */
.dash-grid {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 40px) 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start;
}
.dash-main { min-width: 0; }
.sharebar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 18px;
  padding: 14px 18px; margin-bottom: 22px;
}
.sharebar-url { display: flex; flex-direction: column; min-width: 0; }
.sharebar-label { font-size: .82rem; color: var(--ink-soft); }
.sharebar-url a { font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.sharebar-url a:hover { color: var(--sky); }
.sharebar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.only-mobile { display: none; }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 18px; border-bottom: 2px solid var(--line); scrollbar-width: none; }
.tabs button {
  font: inherit; font-weight: 700; color: var(--ink-soft);
  background: none; border: 0; padding: 10px 14px; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sun-deep); }
.tabs button:hover { color: var(--ink); }

.panel { animation: none; }
.panel h2 { font-size: 1.15rem; margin: 0; }

/* updates */
.composer { background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 6px; }
.composer:focus-within { border-color: var(--sky); }
.composer textarea { border: 0; padding: 12px 12px 4px; font-size: 1.05rem; min-height: 90px; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 12px; }
.counter { font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--danger); font-weight: 700; }
.update-list { list-style: none; margin: 8px 0 0; padding: 0; }
.update-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.update-item p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.update-item:not(.is-public) p { color: var(--ink-soft); }
.update-meta { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--ink-soft); }
.empty { list-style: none; padding: 22px; text-align: center; color: var(--ink-soft); border: 2px dashed var(--line); border-radius: 18px; margin-top: 8px; }

/* links */

.badge { align-self: flex-start; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin: 0 0 2px 8px; color: #fff; }
.badge-youtube { background: #D41C1C; }
.badge-soundcloud { background: #E85A00; }
.badge-vimeo { background: #0E7FA6; }
.badge-tiktok { background: #111; }
.badge-instagram { background: #C13584; }
.badge-spotify { background: #128A3E; }

.link-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.link-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px 10px 6px;
}
.link-item.is-hidden { background: transparent; border-style: dashed; }

.link-item.is-ghost { opacity: .4; border-color: var(--sky); }
.drag { cursor: grab; font-size: 1.3rem; color: var(--ink-soft); padding: 8px 6px; user-select: none; touch-action: none; }
.drag:active { cursor: grabbing; }
.link-fields { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.link-fields input { border-color: transparent; padding: 4px 8px; background: transparent; }
.link-fields input:hover { border-color: var(--line); }
.link-fields input:focus { border-color: var(--sky); background: var(--paper); }

.link-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.switch { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; font-size: .88rem; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--ink); }

/* profile */
.avatar-row { display: flex; gap: 18px; align-items: flex-start; }
.avatar-lg { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--ink); }
.avatar-empty { display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-size: 1.8rem; font-weight: 800; }
.grow { flex: 1; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.photo { gap: 16px; }
.avatar-stack { flex: none; }
.avatar-status { margin: 0; color: var(--ink-soft); min-height: 1.3em; }
.avatar-status.is-ok { color: var(--ok); }
.avatar-status.is-bad { color: var(--danger); }

/* theme */
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
legend { font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; padding: 0; }
.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: 22px;
  border: 2px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer;
  font-size: 1rem; font-weight: 700; text-align: left;
}
.preset:hover { border-color: var(--ink); }
.preset-chip { width: 100%; height: 14px; display: block; }
.color-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.color { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.color input { width: 44px; height: 44px; border: 2px solid var(--line); border-radius: 12px; padding: 2px; background: var(--paper); cursor: pointer; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { flex-direction: row; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; background: var(--paper); }
.seg input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
select { max-width: 320px; }

/* account */
.danger-zone { margin-top: 36px; padding-top: 24px; border-top: 2px solid var(--line); }
.danger-zone h2 { color: var(--danger); }

/* preview */
.dash-preview { position: sticky; top: 20px; }
.phone-live { max-width: 360px; box-shadow: 10px 10px 0 var(--sun); }
.phone-live iframe { display: block; width: 100%; height: min(720px, calc(100vh - 80px)); border: 0; border-radius: 30px; background: #fff; }

/* QR dialog */
.qr-dialog { border: 2px solid var(--ink); border-radius: 22px; padding: 24px; width: min(92vw, 360px); color: var(--ink); }
.qr-dialog::backdrop { background: rgba(20, 33, 61, .5); }
.qr-dialog h2 { font-size: 1.2rem; margin: 0 0 12px; }
.qr-box canvas { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto; image-rendering: pixelated; }
.qr-caption { text-align: center; font-weight: 700; margin: 8px 0 16px; overflow-wrap: anywhere; }
.qr-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- footer */
.sitefoot {
  margin-top: auto;
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 40px;
  padding: 28px clamp(16px, 4vw, 40px);
  font-size: .88rem; color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.sitefoot-brand { display: flex; flex-direction: column; gap: 2px; max-width: 32ch; }
.sitefoot-name { font-weight: 800; color: var(--ink); font-size: 1rem; }
.sitefoot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; flex: 1; justify-content: center; }
.sitefoot-links a { color: var(--ink-soft); text-decoration: none; }
.sitefoot-links a:hover { color: var(--ink); text-decoration: underline; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- shared bits */
.notice { background: var(--tint-info); border-radius: var(--r); padding: 12px 16px; margin: 0 0 16px; }
.announce { display: block; background: var(--sun); color: #14213D; border: 2px solid #14213D; border-radius: var(--r); padding: 10px 16px; margin: 0 0 16px; font-weight: 600; text-decoration: none; }
.announce a { color: #14213D; }
a.announce-link:hover { background: var(--sun-deep); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tick { color: var(--sky); font-weight: 800; }
.role-pill, .chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--mist); color: var(--ink); border: 1px solid var(--line); margin: 0 4px 2px 0; white-space: nowrap; vertical-align: 1px; }
.chip-role-bronze, .role-bronze { background: linear-gradient(135deg, #F3D3B5, #D9965E); color: #4A2508; border-color: #C47E45; }
.chip-role-silver, .role-silver { background: linear-gradient(135deg, #F2F4F7, #C3CAD5); color: #2B3442; border-color: #A9B2BF; }
.role-vip, .chip-role-vip { background: linear-gradient(135deg, #2A1452, #6A2FB8); color: #FFE08A; border-color: #6A2FB8; }
.role-moderator, .chip-role-moderator { background: var(--tint-info); border-color: var(--tint-info-line); }
.role-gold, .chip-role-gold { background: linear-gradient(135deg, #F7D774, #D4A017); color: #3B2A00; border-color: #B8860B; }
.role-admin, .chip-role-admin { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip-bad { background: var(--tint-bad); color: var(--tint-bad-text); border-color: var(--tint-bad-line); }
.chip-warn { background: var(--tint-orange); color: var(--tint-orange-text); border-color: var(--tint-orange-line); }
.chip-ok { background: var(--tint-ok); color: var(--tint-ok-text); border-color: var(--tint-ok-line); }
.chip-info { background: var(--tint-info); color: var(--tint-info-text); border-color: var(--tint-info-line); }
.bad { color: var(--danger); }
.h-sub { font-size: 1.05rem; margin: 26px 0 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 180px; }
.inline-label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.w-num { width: 90px !important; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9rem; }
.nowrap { white-space: nowrap; }
.clip { display: block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-size: .8rem; color: var(--ink-soft); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cb { width: 32px; }
.table tr.is-muted td { color: var(--ink-soft); }
.table .badge { margin: 0 4px 0 0; }

/* ---------- stats */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
.kpis > div { background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-num { font-size: 1.8rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: .82rem; color: var(--ink-soft); }
.bars { margin: 0; }
.bars-row { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 8px 0 0; border-bottom: 2px solid var(--ink); }
.bar { flex: 1; height: var(--h); min-height: 0; background: var(--sky); border-radius: 3px 3px 0 0; }
.bar:hover { background: var(--ink); }
.bars figcaption { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-soft); margin-top: 4px; }

/* ---------- sign-up */
.signup { width: 100%; max-width: 1000px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.signup h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -.02em; margin: 0 0 4px; }
.signup-side { background: var(--paper); border: 2px solid var(--ink); border-radius: 22px; padding: 26px; box-shadow: 8px 8px 0 var(--sun); position: sticky; top: 20px; }
.signup-url { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; margin: 0 0 18px; overflow-wrap: anywhere; letter-spacing: -.01em; }
.signup-url span { color: var(--sky); }
.signup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.signup-list li { padding-left: 26px; position: relative; color: var(--ink-soft); }
.signup-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px rgba(255, 200, 61, .3); }
.signup-list strong { color: var(--ink); }
.terms { font-weight: 400; }
.terms a { font-weight: 600; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .88rem; color: var(--sky) !important; }
#pw-hint.is-ok { color: var(--ok); }

/* ---------- homepage */
.home-section { width: calc(100% - 2 * clamp(16px, 4vw, 40px)); max-width: 1100px; margin: 0 auto; padding: 40px 0; }
.home-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; margin: 0 0 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head a { font-weight: 700; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.feed-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }
.steps h3 { margin: 0 0 4px; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--ink-soft); }
.home-section.explain { border-top: 2px solid var(--ink); grid-template-columns: repeat(3, minmax(0, 1fr)); display: grid; gap: 8px 32px; width: calc(100% - 2 * clamp(16px, 4vw, 40px)); padding: 24px 0 40px; }
.explain h3 { font-size: 1.1rem; margin: 18px 0 4px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 70ch; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 1.05rem; }
.faq details p { margin: 8px 0 0; color: var(--ink-soft); }
.home-cta { text-align: center; padding: 56px 20px 72px; }
.home-cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.02em; margin: 0 0 20px; }
.mini-player { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; font-size: .78rem; font-weight: 600; margin-bottom: 10px; text-align: left; }
.mini-play { width: 26px; height: 26px; border-radius: 50%; background: #FF5500; color: #fff; display: grid; place-items: center; font-size: .7rem; flex: none; }

/* ---------- people cards (Explore, featured) */
.explore-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 40px) 56px; }
.explore-head h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 0 0 4px; letter-spacing: -.02em; }
.search { display: flex; gap: 10px; margin: 18px 0 24px; max-width: 520px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.person-link { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 16px; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; color: var(--ink); text-decoration: none; }
.person-link:hover { border-color: var(--ink); }
.person.is-featured .person-link { border-color: var(--ink); box-shadow: 5px 5px 0 var(--sun); }
.person-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.person-av { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }

.person-av-empty { display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-weight: 800; }
.person-av-empty[hidden], .person-av[hidden] { display: none; }
.person-id { display: flex; flex-direction: column; min-width: 0; }
.person-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-url { font-size: .82rem; color: var(--sky); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-bio { color: var(--ink-soft); font-size: .92rem; overflow-wrap: anywhere; }
.person-update { font-size: .9rem; border-left: 3px solid var(--sun); padding-left: 10px; overflow-wrap: anywhere; }
.person-when { display: block; font-size: .75rem; color: var(--ink-soft); }

/* ---------- content pages */
.doc { width: 100%; max-width: 760px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 40px) 64px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -.02em; margin: 8px 0 18px; }
.prose { font-size: 1.05rem; line-height: 1.7; }
.prose h2 { font-size: 1.35rem; margin: 30px 0 8px; }
.prose h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 1.3em; }
.doc-form { margin-top: 28px; padding-top: 24px; border-top: 2px solid var(--line); }
.radio-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.doc-updated { margin-top: 40px; }

/* ---------- theme toggle */
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; padding: 0; }
.theme-toggle:hover { background: var(--paper); }
.theme-toggle .ti { display: none; }
.theme-toggle[data-mode="auto"] .ti-auto, .theme-toggle:not([data-mode]) .ti-auto,
.theme-toggle[data-mode="light"] .ti-light, .theme-toggle[data-mode="dark"] .ti-dark { display: block; }

/* ---------- reactions (feed, homepage) */
.rx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.rx-btn { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: .88rem; line-height: 1; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: transform .1s ease; }
.rx-btn:hover { border-color: var(--ink-soft); }
.rx-btn:active { transform: scale(.94); }
.rx-btn.is-on { background: var(--tint-gold); border-color: var(--sun-deep); font-weight: 700; }
.rx-btn.is-zero .rx-n:empty { display: none; }
.rx-btn.is-static { cursor: default; }
.rx-e { font-size: 1rem; }
.rx-n { font-variant-numeric: tabular-nums; }
.rx-reply { margin-left: auto; font-size: .88rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.rx-reply:hover { color: var(--ink); text-decoration: underline; }
.s-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 60; max-width: calc(100vw - 32px); }

/* ---------- feed */
.feed-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 56px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.feed-flash { margin: 0 0 12px; width: 100%; }
.prompt-chip { display: block; width: 100%; text-align: left; font: inherit; font-size: .9rem; color: var(--ink); background: var(--tint-gold); border: 0; border-radius: 12px; padding: 8px 12px; margin: 6px 6px 0; width: calc(100% - 12px); cursor: pointer; }
.prompt-chip:hover { filter: brightness(.97); }
.streak-hint { flex: 1; text-align: right; font-size: .85rem; color: var(--ink-soft); padding: 0 10px; }
.feed-tabs { margin-top: 22px; }
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.post-card { display: flex; gap: 14px; margin: 0; padding: 16px 18px; }
.pc-av img, .pc-ini { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-weight: 800; }
.pc-av { flex: none; text-decoration: none; }
.pc-ini-sm { width: 36px; height: 36px; font-size: .8rem; }
.pc-main { flex: 1; min-width: 0; }
.pc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; }
.pc-name { font-weight: 800; color: var(--ink); text-decoration: none; }
.pc-name:hover { text-decoration: underline; }
.pc-streak { font-size: .82rem; font-weight: 700; }
.pc-time { margin-left: auto; text-decoration: none; }
.pc-time:hover { text-decoration: underline; }
.pc-body { margin: 6px 0 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.pc-body a, .live-body a { color: var(--sky); }
.feed-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.side-card { margin: 0; }
.side-card h2 { font-size: 1rem; margin: 0 0 10px; }
.me-streak { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 1.05rem; }
.big-flame { font-size: 2rem; line-height: 1; }
.suggest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.suggest li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.suggest-who { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; font-size: .92rem; line-height: 1.25; }
.suggest-who img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.js-follow.is-on, .p-follow.is-on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.leader { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.leader li { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.leader a { color: var(--ink); text-decoration: none; display: flex; gap: 10px; align-items: center; }
.leader a:hover { text-decoration: underline; }
.rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sun); color: #14213D; font-size: .8rem; font-weight: 800; }

/* ---------- dashboard additions */
.streak-line { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.update-item.is-pinned { background: var(--tint-warn); border-radius: 12px; padding-left: 12px; padding-right: 12px; }
.update-acts { display: flex; gap: 14px; flex-wrap: wrap; }
.perks { border-top: 2px solid var(--line); padding-top: 18px; }
.lock { font-size: .8rem; font-weight: 700; color: var(--ink-soft); background: var(--mist); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.perk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.perk-label { font-weight: 600; }
:disabled + span, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
.needs { color: var(--ink); font-weight: 600; }

/* ---------- homepage v7 */
.landing #main { overflow-x: clip; }
.hero-v7 { padding-bottom: 24px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin: 0 0 18px; }
.sun-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(255, 200, 61, .3); }
/* The three phones are drawn at a fixed size (580px tall) and scaled as one piece, so the page can reserve
   exactly the right space and nothing below is ever covered. Sizes come from Admin → Homepage → Design. */
.phones { --mock-scale: var(--mock-d, 1); position: relative; height: calc(580px * var(--mock-scale)); color: var(--ink);
  --ink: #14213D; --ink-soft: #4A5672; --on-ink: #FFFFFF; --sky: #2F6BFF; }
.phones-inner { position: absolute; top: 0; left: 0; right: 0; height: 580px; transform: scale(var(--mock-scale)); transform-origin: top center; }
.phones .phone { position: absolute; width: 230px; color: var(--ink); top: 20px; left: 50%; border-width: 8px; border-radius: 34px; }
.phones .phone-screen { border-radius: 26px; height: 480px; min-height: 0; overflow: hidden; padding: 22px 16px 16px; }
.phone-b { transform: translateX(-50%); z-index: 3; box-shadow: 12px 12px 0 var(--sun); }
.phone-a { transform: translateX(-108%) rotate(-8deg) translateY(30px); z-index: 2; box-shadow: none; }
.phone-c { transform: translateX(8%) rotate(8deg) translateY(30px); z-index: 1; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .phone-a, .phone-c { animation: fan-in .9s cubic-bezier(.2, .8, .2, 1) both .15s; }
  .phone-c { animation-delay: .25s; }
  @keyframes fan-in { from { opacity: 0; transform: translateX(-50%) rotate(0) translateY(40px); } }
}
.sc-night { background: linear-gradient(170deg, #0F1B33, #33204F); color: #F2F5FF; }
.sc-night .mini-name { color: #F2F5FF; }
.sc-night .mini-link { background: #FFC83D; color: #0F1B33; }
.sc-pink { background: linear-gradient(170deg, #FFD3E6, #FFF1C7); }
.sc-pink .mini-link { background: #fff; color: #5A1440; border: 2px solid #5A1440; box-shadow: 3px 3px 0 #5A1440; }
.mini-cover { height: 70px; margin: -22px -16px -34px; border-radius: 26px 26px 0 0; background: linear-gradient(120deg, #FFC83D, #E0245E 60%, #33204F); }
.mini-av-gold { box-shadow: 0 0 0 3px #D4A017; background: #33204F !important; position: relative; }
.mini-av-pink { background: #5A1440 !important; }
.mini-tags { display: flex; gap: 6px; justify-content: center; margin: 4px 0 10px; }
.mini-tag { font-size: .65rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #14213D; color: #fff; }
.mini-gold { background: linear-gradient(135deg, #F7D774, #D4A017); color: #3B2A00; }
.mini-flame { font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .6); color: #14213D; }
.mini-rx { font-size: .72rem !important; margin-top: 4px !important; }
.mini-spot { box-shadow: 0 0 0 3px rgba(255, 200, 61, .45), 0 0 18px rgba(255, 200, 61, .6); }
.prompt-band { background: var(--sun); color: #14213D; margin: 24px 0; border-top: 2px solid #14213D; border-bottom: 2px solid #14213D; }
.prompt-inner { max-width: 1100px; margin: 0 auto; padding: 34px clamp(16px, 4vw, 40px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 28px; align-items: center; }
.prompt-label { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.prompt-text { margin: 0; font-size: clamp(1.4rem, 3.2vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.prompt-band .btn { background: #14213D; color: #fff; border-color: #14213D; }
.live { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.live-card { background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.live-card:hover { border-color: var(--ink-soft); }
.live-who { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; line-height: 1.25; }
.live-who .person-av { width: 40px; height: 40px; }
.live-who .muted { display: block; }
.live-body { color: var(--ink); text-decoration: none; font-size: 1.02rem; overflow-wrap: anywhere; flex: 1; }
.live-body:hover { text-decoration: underline; }
.live .rx { margin-top: 0; }
.streak-section { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: center; }
.streak-copy p { color: var(--ink-soft); max-width: 52ch; }
.week { display: flex; gap: 8px; margin: 20px 0 14px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.day-flame { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--paper); border: 2px solid var(--line); }
.day.is-on .day-flame { background: var(--tint-gold); border-color: var(--sun-deep); }
.day.is-today .day-flame { border-style: dashed; color: var(--ink-soft); font-weight: 800; }
.day-l { font-size: .75rem; color: var(--ink-soft); font-weight: 700; }
.streak-board { margin: 0; }
.streak-board h3 { margin: 0 0 12px; }
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile { background: var(--paper); border: 2px solid var(--line); border-radius: 20px; padding: 20px; }
.tile h3 { margin: 0 0 6px; font-size: 1.15rem; }
.tile p { margin: 0; color: var(--ink-soft); }
.tile-big { grid-column: span 2; background: var(--tint-gold); border-color: var(--sun-deep); }
.tile-big p { color: var(--ink); max-width: 56ch; }
.tile-rx { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tile-rx span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .9rem; }
.tile-media { background: var(--ink); border-color: var(--ink); }
.tile-media h3 { color: var(--on-ink); }
.tile-media p { color: var(--on-ink); opacity: .8; }
.swatches { display: flex; gap: 6px; margin-top: 14px; }
.swatches span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); }
.tile-qr { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; background: var(--sun); border-color: #14213D; }
.tile-qr h3 { color: #14213D; font-size: clamp(1.3rem, 3vw, 1.8rem); letter-spacing: -.02em; }
.tile-qr p { color: #14213D; }
.ladder { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ladder .rung:nth-child(1) { margin-top: 56px; }
.ladder .rung:nth-child(2) { margin-top: 28px; }
.rung { background: var(--paper); border: 2px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.rung h3 { margin: 0; font-size: 1.4rem; }
.rung > p { margin: 2px 0 10px; font-weight: 700; color: var(--ink-soft); }
.rung ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.rung-vip { border-color: var(--ink); }
.rung-gold { border-color: #D4A017; background: var(--paper); box-shadow: 8px 8px 0 #D4A017; }
.cta-name { color: var(--sky); }
.notif-follow { color: var(--sky); }
.notif-react { background: var(--tint-gold); }

/* ---------- notifications bell */
.bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink) !important; }
.bell:hover { background: var(--paper); }
.bell-count { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.notifs { list-style: none; margin: 0; padding: 0; }
.notif { display: flex; gap: 14px; align-items: flex-start; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.notif.is-new { background: var(--tint-warn); border-radius: 10px; padding-left: 10px; }
.notif-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--mist); }
.notif-like { color: #E0245E; }
.notif-upgrade { background: var(--tint-gold); }
.notif-main { display: flex; flex-direction: column; gap: 2px; }
.notif-main a { color: var(--ink); font-weight: 600; text-decoration: none; }
.notif-main a:hover { text-decoration: underline; }

/* ---------- forum */
.forum-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 12px clamp(16px, 4vw, 40px) 56px; }
.forum-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
.forum-side { position: sticky; top: 16px; }
.forum-side h1, .topic-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); letter-spacing: -.02em; margin: 0 0 6px; }
.forum-cats { display: flex; flex-direction: column; gap: 2px; margin: 16px 0; }
.forum-cats a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.forum-cats a:hover { background: var(--paper); }
.forum-cats a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.forum-cats a[aria-current="page"] .muted { color: var(--ink-soft); }
.forum-tools .search { margin: 0 0 16px; max-width: none; }
.new-topic { padding: 0; }
.new-topic summary { cursor: pointer; font-weight: 800; padding: 14px 18px; list-style: none; }
.new-topic summary::before { content: "+ "; color: var(--sky); }
.new-topic[open] summary { border-bottom: 1px solid var(--line); }
.new-topic form { padding: 16px 18px 18px; }
.new-topic .inline-form select { flex: 0 1 200px; }
.topics { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; overflow: hidden; }
.topic { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; }
.topic.is-pinned { background: var(--tint-warn); }
.topic.is-hidden { opacity: .6; }
.topic-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; color: var(--ink); text-decoration: none; }
.topic-link:hover .topic-title { text-decoration: underline; }
.topic-title { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.topic-meta .chip { margin-right: 6px; }
.topic-count { flex: none; padding-right: 18px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.topic-head { border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.mod-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.mod-bar .inline-form select { flex: 0 1 180px; }
.thread { display: flex; flex-direction: column; gap: 4px; }
.fpost { display: flex; gap: 12px; padding: 12px; border-radius: 16px; scroll-margin-top: 80px; }
.fpost:target, .fpost.is-new { animation: fpost-flash 2s ease-out; }
@keyframes fpost-flash { from { background: var(--tint-gold); } to { background: transparent; } }
.fpost.is-hidden { opacity: .55; background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(198, 46, 46, .05) 8px 16px); }
.fpost-av img, .fpost-ini { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-weight: 800; font-size: .9rem; }
.fpost-av { flex: none; text-decoration: none; }
.fpost-main { flex: 1; min-width: 0; }
.fpost-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.fpost-name { font-weight: 800; color: var(--ink); text-decoration: none; }
.fpost-name:hover { text-decoration: underline; }
.fpost-body { margin-top: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 10px 14px; overflow-wrap: anywhere; display: inline-block; max-width: 100%; }
.fpost.is-mine .fpost-body { background: var(--tint-mine); border-color: var(--tint-mine-line); }
.fpost-body a { color: var(--sky); }
.mention { font-weight: 700; text-decoration: none; }
.fpost-actions { display: flex; gap: 14px; margin-top: 4px; opacity: .8; }
.fpost:hover .fpost-actions, .fpost:focus-within .fpost-actions { opacity: 1; }
.fpost-edit { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.older { text-align: center; margin: 10px 0; }
.reply-box { position: sticky; bottom: 10px; margin-top: 18px; box-shadow: 0 10px 30px var(--shadow); }
.reply-box textarea { min-height: 56px; }
.form-msg { color: var(--danger); margin: 0 12px 6px; }
.form-msg:empty { display: none; }
.topics-home { margin-top: 4px; }

/* ---------- admin */
.admin { width: 100%; max-width: 1320px; margin: 0 auto; padding: 8px clamp(16px, 3vw, 32px) 56px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; align-items: start; }
.admin-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.admin-who { font-weight: 700; margin: 0 0 12px; font-size: .95rem; }
.admin-nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.admin-nav a:hover { background: var(--paper); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.admin-nav .count { background: var(--danger); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 8px; }
.admin-back { margin-top: 14px; border-top: 1px solid var(--line); border-radius: 0 !important; padding-top: 14px !important; color: var(--ink-soft) !important; font-weight: 500 !important; }
.admin-main h1 { font-size: 1.9rem; letter-spacing: -.02em; margin: 0 0 18px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-head h1 { margin: 0; }
.card { background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 0 0 18px; }
.card h2 { font-size: 1.1rem; margin: 0 0 12px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two-col > .card { margin: 0 0 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.filters input, .filters select { width: auto; flex: 1 1 160px; }
.filters input[type=search] { flex: 3 1 240px; }
.glance { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.glance dt { color: var(--ink-soft); }
.glance dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ucell { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; line-height: 1.3; }
.ucell:hover strong { text-decoration: underline; }
.ucell .muted { font-size: .82rem; }
.crumbs { font-size: .9rem; color: var(--ink-soft); margin: 0 0 10px; }
.user-head { display: flex; gap: 20px; align-items: flex-start; }
.user-head h1 { margin: 0 0 4px; }
.user-head p { margin: 4px 0; }
.mod-list { list-style: none; margin: 0 0 12px; padding: 0; }
.mod-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.mod-list .check { align-items: flex-start; font-weight: 400; }
.mod-list .check input { margin-top: 4px; flex: none; }
.mod-list span { overflow-wrap: anywhere; }
.reports { list-style: none; margin: 0; padding: 0; }
.report.is-open { border-color: var(--ink); }
.report-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.report-body { background: var(--mist); border-radius: 12px; padding: 10px 14px; margin: 10px 0; overflow-wrap: anywhere; }
.tabs a { font-weight: 700; color: var(--ink-soft); text-decoration: none; padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sun-deep); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.help pre { background: var(--mist); padding: 12px; border-radius: 10px; white-space: pre-wrap; margin: 0 0 16px; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 700; }
.kinds { margin-bottom: 18px; }
.kinds dt .chip { margin-right: 6px; }
.check-result { margin-top: 12px; }
.verify-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; background: var(--tint-orange); border: 2px solid var(--tint-orange-line); border-radius: var(--r); padding: 10px 16px; margin: 0 0 16px; }
.verify-bar p { margin: 0; }
.likers { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.person-likes { font-size: .78rem; color: #C2185B; font-weight: 700; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 8px; }
.tier { background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tier h3 { margin: 0 0 6px; font-size: 1.1rem; }
.tier ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.tier.is-current { border-color: var(--ink); }
.tier-gold { background: var(--paper); border-color: #D4A017; border-width: 3px; color: var(--ink); }
.tier-gold.is-current { border-color: #B8860B; }
.progress-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.progress-list li { padding-left: 28px; position: relative; }
.progress-list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); }
.progress-list li.is-done::before { content: "✓"; display: grid; place-items: center; color: #fff; font-size: .7rem; font-weight: 800; background: var(--ok); border-color: var(--ok); }
.meter { display: block; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; max-width: 420px; }
.meter span { display: block; height: 100%; background: var(--sky); border-radius: 999px; }
.is-done .meter span { background: var(--ok); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; margin: 12px 0 4px; }
.facts dt { font-size: .78rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 700; }
.tier-boxes { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.tier-boxes legend { font-size: .9rem; font-weight: 600; margin: 0 0 4px; width: 100%; }
.ad-slot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.limits td, .limits th { vertical-align: middle; }
.limits th[scope=row] { font-weight: 600; color: var(--ink); font-size: .92rem; white-space: normal; }
.sec-block { margin-top: 36px; padding-top: 24px; border-top: 2px solid var(--line); }
.sec-block h2 { display: flex; align-items: center; gap: 8px; }
.tfa-qr canvas { width: 200px; height: 200px; border-radius: 12px; border: 8px solid #fff; box-shadow: 0 0 0 1px var(--line); image-rendering: pixelated; }
.tfa-secret { font-size: .95rem; letter-spacing: .05em; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; word-break: break-all; }
.code-input { font-size: 1.3rem !important; letter-spacing: .25em; font-variant-numeric: tabular-nums; max-width: 220px; }
.recovery { background: var(--tint-warn); border: 2px solid var(--sun-deep); border-radius: 14px; padding: 14px 16px; }
.codes { columns: 2; margin: 8px 0 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1rem; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.ck { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.check-ok .ck { background: var(--tint-ok); color: var(--tint-ok-text); }
.check-warn .ck { background: var(--tint-orange); color: var(--tint-orange-text); }
.check-bad .ck { background: var(--danger); color: #fff; }
.check-info .ck { background: var(--tint-info); color: var(--tint-info-text); }
.check-ok-line { color: var(--ok); font-weight: 700; }
.filelist { margin: 0 0 14px; padding-left: 1.1em; }
.filelist code { overflow-wrap: anywhere; }
.export-form { margin-top: 36px; padding-top: 24px; border-top: 2px solid var(--line); }

/* ---------- responsive */
@media (max-width: 1100px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .admin-who { width: 100%; margin-bottom: 4px; }
  .admin-back { margin-top: 0; border-top: 0; padding-top: 9px !important; }
}
@media (max-width: 960px) {
  .feed-wrap { grid-template-columns: minmax(0, 1fr); }
  .feed-side { position: static; }
  .phones { --mock-scale: var(--mock-m, .6); margin-top: 8px; }
  .phones[data-hide-mobile] { display: none; }
  .live, .bento, .ladder { grid-template-columns: minmax(0, 1fr); }
  .tile-big { grid-column: auto; }
  .streak-section { grid-template-columns: minmax(0, 1fr); }
  .prompt-inner { grid-template-columns: minmax(0, 1fr); }
  .ladder .rung:nth-child(n) { margin-top: 0; }
  .forum-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .forum-side { position: static; }
  .forum-cats { flex-direction: row; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
  .forum-cats a { border: 1px solid var(--line); background: var(--paper); padding: 6px 12px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .signup { grid-template-columns: minmax(0, 1fr); }
  .signup-side { position: static; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .hero-phone { order: 2; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-preview { display: none; }
  .only-mobile { display: inline-flex; }
}
@media (max-width: 640px) {
  /* top bar: logo on the first row, the menu on its own row that scrolls sideways if needed */
  .topbar { flex-wrap: wrap; row-gap: 8px; padding: 12px 16px 8px; }
  .topnav { width: 100%; overflow-x: auto; gap: 16px; padding: 2px 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav .btn-small { padding: 6px 12px; }
  .topnav { gap: 14px; }
  .is-member .nav-explore, .is-member .nav-logout { display: none; } /* Explore is in the feed; Log out is in Dashboard → Account */
  .theme-toggle, .bell { flex: none; }
  .streak-hint { display: none; }
  .day-flame { width: 36px; height: 36px; }
  .explain, .home-section.explain { grid-template-columns: 1fr; gap: 0; }
  .feed, .people, .steps, .radio-list { grid-template-columns: minmax(0, 1fr); }
  .sitefoot-links { justify-content: flex-start; }
  .user-head { flex-direction: column; }

  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avatar-row { flex-direction: column; }
  .claim .btn { width: 100%; }
  .topnav { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .fpost:target, .fpost.is-new { animation: none; }
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}

/* ================================================================ v9 */
/* photo shapes (also used by the dashboard's shape picker) */
.shape-demo { display: inline-block; width: 18px; height: 18px; background: currentColor; border-radius: 50%; margin-right: 6px; vertical-align: -3px; opacity: .8; }
[data-avatar="rounded"].shape-demo { border-radius: 18%; }
[data-avatar="squircle"].shape-demo { border-radius: 34%; }
[data-avatar="square"].shape-demo { border-radius: 2px; }
[data-avatar="hexagon"].shape-demo { border-radius: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
[data-avatar="diamond"].shape-demo { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
[data-avatar="octagon"].shape-demo { border-radius: 0; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
[data-avatar="leaf"].shape-demo { border-radius: 0 50%; }
[data-avatar="arch"].shape-demo { border-radius: 50% 50% 10% 10% / 40% 40% 10% 10%; }
[data-avatar="star"].shape-demo { border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.shape-seg { flex-wrap: wrap; }

/* rich-text editor */
.ed { border: 2px solid var(--line); border-radius: 12px; background: var(--paper); overflow: visible; }
.ed:focus-within { border-color: var(--sky); }
.ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--mist); border-radius: 10px 10px 0 0; }
.ed-btn { font: inherit; font-size: .9rem; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.ed-btn:hover { background: var(--paper); border-color: var(--line); }
.ed-btn:focus-visible { outline: 2px solid var(--sky); }
.ed-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.ed-a { font-weight: 800; border-bottom: 3px solid #E0245E; line-height: 1; }
.ed-hl { background: #FFF1A8; color: #14213D; padding: 0 3px; border-radius: 3px; }
.ed-size { font: inherit; font-size: .85rem; height: 32px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); width: auto; }
.ed-pal-wrap { position: relative; }
.ed-pal { position: absolute; z-index: 30; top: 36px; left: 0; display: grid; grid-template-columns: repeat(4, 26px); gap: 6px; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 20px var(--shadow); }
.ed-pal[hidden] { display: none; }
.ed-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.ed-sw-none { background: linear-gradient(135deg, transparent 45%, #E0245E 45%, #E0245E 55%, transparent 55%), var(--paper); }
.ed-area { font-weight: 400; min-height: 90px; max-height: 360px; overflow-y: auto; padding: 10px 12px; outline: none; line-height: 1.55; overflow-wrap: anywhere; }
.ed-admin .ed-area { min-height: 160px; }
.ed-area.is-empty::before { content: attr(data-placeholder); color: var(--ink-soft); opacity: .7; pointer-events: none; }
.ed-area h2 { font-size: 1.35rem; margin: .4em 0; } .ed-area h3 { font-size: 1.1rem; margin: .4em 0; }
.ed-area blockquote { border-left: 4px solid var(--sun); margin: .4em 0; padding-left: 12px; color: var(--ink-soft); }
.ed-area img { max-width: 100%; height: auto; }
.ed-count { padding: 4px 12px 8px; text-align: right; }
.ed-count.is-over { color: var(--danger); font-weight: 700; }

/* Links & media: add cards, list, edit window */
.add-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.add-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.add-card:hover { border-color: var(--ink); box-shadow: 3px 3px 0 var(--sun); }
.add-card:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.add-ico { font-size: 1.3rem; }
.link-item .link-fields { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.link-title-text { font-weight: 700; }
.link-item .link-fields { flex: 1 1 auto; }
.link-sum { flex-basis: 100%; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-social { background: #7B3FE4; } .badge-link { background: var(--ink); color: var(--on-ink); }
.link-actions .danger { color: var(--danger); }
.item-dialog { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 50px var(--shadow); }
.item-dialog::backdrop { background: rgba(8, 12, 24, .55); }
.item-dialog h2 { margin: 0 0 4px; font-size: 1.2rem; }
.item-dialog .field[hidden] { display: none; }
.item-dialog label, .item-dialog .field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }

/* five ranks */
.tiers-5 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tier-bronze { border-color: #C47E45; } .tier-silver { border-color: #A9B2BF; } .tier-vip { border-color: #6A2FB8; }
.ladder-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ladder-5 .rung:nth-child(1) { margin-top: 64px; } .ladder-5 .rung:nth-child(2) { margin-top: 48px; }
.ladder-5 .rung:nth-child(3) { margin-top: 32px; } .ladder-5 .rung:nth-child(4) { margin-top: 16px; } .ladder-5 .rung:nth-child(5) { margin-top: 0; }
.rung-bronze { border-color: #C47E45; } .rung-silver { border-color: #A9B2BF; }
.rung-gold { border-color: #D4A017; border-width: 3px; background: var(--paper); box-shadow: none; }
.rung-vip { border-color: #6A2FB8; background: linear-gradient(170deg, #2A1452, #4B2386); color: #fff; box-shadow: 8px 8px 0 var(--sun); }
.rung-vip h3, .rung-vip p, .rung-vip ul { color: #fff !important; }
.mini-silver { background: linear-gradient(135deg, #F2F4F7, #C3CAD5); color: #2B3442; }
.mini-bronze { background: linear-gradient(135deg, #F3D3B5, #D9965E); color: #4A2508; }
.mini-icons { display: flex; justify-content: center; gap: 8px; margin: 0 0 8px; }
.mini-icons i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: #14213D; color: #fff; font-size: .6rem; display: grid; place-items: center; }

/* homepage: layout options and custom sections */
.btn-sun, .landing .btn-sun { color: var(--accent-ink, #14213D); }
.hero-center { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
.hero-center .hero-copy { max-width: 760px; }
.hero-center h1 { margin-left: auto; margin-right: auto; }
.hero-center .lede { margin-left: auto; margin-right: auto; }
.hero-center .claim { margin-left: auto; margin-right: auto; justify-content: center; }
.hero-center .phones { width: 100%; max-width: 640px; }
.hero-solo { grid-template-columns: minmax(0, 1fr); }
.hero-solo .hero-copy { max-width: 760px; }
.home-block-card .home-block-inner { background: var(--paper); border: 2px solid var(--line); border-radius: 20px; padding: clamp(18px, 3vw, 32px); }
.home-block-band .home-block-inner { background: var(--sun); color: var(--accent-ink, #14213D); border: 2px solid #14213D; border-radius: 22px; padding: clamp(20px, 4vw, 40px); box-shadow: 8px 8px 0 #14213D; }
.home-block-band .prose, .home-block-band h2, .home-block-band a { color: var(--accent-ink, #14213D); }
.home-block .prose img { max-width: 100%; height: auto; border-radius: 12px; }
.faq-a { padding: 0 0 12px; }
.faq-a p { margin: .4em 0; }

/* admin: ranks and homepage editor */
.ranks-table th[scope="col"] { text-align: center; vertical-align: bottom; }
.ranks-table td { text-align: center; }
.ranks-table td input[type="checkbox"] { width: 20px; height: 20px; }
.rank-notes { padding-left: 1.1em; }
.home-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 24px; align-items: start; }
.home-editor > form, .home-editor > form + form { grid-column: 1; }
.home-preview { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 16px; }
.home-preview iframe { width: 100%; height: 78vh; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); }
.home-sections { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.home-sec details { background: var(--paper); border: 2px solid var(--line); border-radius: 12px; }
.home-sec summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.home-sec summary::-webkit-details-marker { display: none; }
.home-sec summary::after { content: "Edit"; margin-left: auto; font-size: .85rem; color: var(--sky); font-weight: 600; }
.home-sec details[open] summary::after { content: "Close"; }
.home-sec .drag { cursor: grab; color: var(--ink-soft); }
.sec-fields { padding: 0 14px 14px; }
.sec-fields label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.pair { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; }
.faq-item { margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.faq-item > .linklike { align-self: flex-start; }
.sticky-save { position: sticky; bottom: 0; background: var(--mist); padding: 10px 0; z-index: 5; }
.chip-info { background: var(--tint-info); color: var(--tint-info-text); }
@media (max-width: 1100px) {
  .home-editor { grid-template-columns: minmax(0, 1fr); }
  .home-preview { grid-column: 1; grid-row: auto; position: static; }
}
@media (max-width: 960px) {
  .ladder-5 { grid-template-columns: minmax(0, 1fr); }
  .ladder-5 .rung:nth-child(n) { margin-top: 0; }
}
@media (max-width: 640px) {
  .add-row { grid-template-columns: minmax(0, 1fr); }
  .pair { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================ v10 */
/* username field in Dashboard → Account */
.un-field { display: flex; align-items: stretch; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.un-field:focus-within { border-color: var(--sky); }
.un-prefix { display: flex; align-items: center; padding: 0 4px 0 12px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.un-field input { border: 0; outline: none; background: transparent; min-width: 0; flex: 1; padding-left: 0; }
.past-apps { padding-left: 1.1em; margin: 6px 0 0; }

/* Admin → Settings → Reactions */
.rx-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.rx-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); }
.rx-slot.is-empty { border-style: dashed; }
.rx-emoji { width: 64px; height: 52px; text-align: center; font-size: 1.8rem !important; padding: 0 !important; border-radius: 12px; }
.rx-slot .check { justify-content: center; }
kbd { font: .8rem ui-monospace, Menlo, Consolas, monospace; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--paper); }

.blockers { margin: 6px 0; padding-left: 1.1em; }
.blockers li { margin: 4px 0; }

/* page editor (Admin → Pages) */
.page-editor .ed-area { min-height: 380px; max-height: 70vh; }
.page-editor .ed-area h2 { font-size: 1.35rem; } .page-editor .ed-area h3 { font-size: 1.1rem; }
.page-editor .ed-area ul, .page-editor .ed-area ol { padding-left: 1.3em; }

.mock-sizes { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); }
.mock-sizes[hidden] { display: none; }
.mock-sizes label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.mock-sizes output { font-weight: 800; color: var(--sky); margin-left: 6px; }
.mock-sizes input[type=range] { width: 100%; accent-color: var(--sky); }

/* Admin → Settings → Email sending */
.smtp-fields { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); }
.smtp-fields > label, #mail .pair > label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.smtp-fields select { width: 100%; max-width: 420px; }
.smtp-fields .check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-top: 6px; }
.smtp-fields .check label { font-weight: 400; }
#mail:has(input[name="mail_method"][value="server"]:checked) .smtp-fields { display: none; }
.help-steps summary { cursor: pointer; font-weight: 700; color: var(--sky); }
.help-steps ol { margin: 8px 0 0; padding-left: 1.2em; }
.help-steps li { margin: 6px 0; }
