/* ==========================================================================
   Baptist Connect â€” public site & member area
   Pure CSS. Mobile-first. Breakpoints 480 / 768 / 1024 / 1280. Light + dark.
   ========================================================================== */
:root {
  --brand: #1e2a78;
  --brand-2: #2f3fb0;
  --brand-ink: #131a52;
  --accent: #d61f2c;
  --gold: #f5c400;
  --green: #1f9d55;
  --bg: #f6f7fb;
  --bg-2: #eef0f8;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e3e7f0;
  --ring: rgba(47, 63, 176, .35);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -8px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -20px rgba(19, 26, 82, .35);
  --radius: 14px;
  --radius-lg: 22px;
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Lexend", var(--font);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1020; --bg-2: #111832; --card: #121a33; --ink: #e8ecf8; --ink-2: #c4cbe0; --muted: #8a94b3; --line: #222c4d;
  --brand-2: #6d7cf0; --ring: rgba(109, 124, 240, .45);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --bg-2: #111832; --card: #121a33; --ink: #e8ecf8; --ink-2: #c4cbe0; --muted: #8a94b3; --line: #222c4d;
    --brand-2: #6d7cf0; --ring: rgba(109, 124, 240, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ic { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb { margin-bottom: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.container { width: 100%; max-width: 1550px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .75rem; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 560px; margin: 0; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; font: 600 .95rem/1 var(--font); cursor: pointer; text-decoration: none !important; transition: transform .15s ease, box-shadow .15s ease, background .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 8px 20px -8px rgba(30, 42, 120, .6); }
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(30, 42, 120, .7); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(214, 31, 44, .6); }
.btn-gold { background: var(--gold); color: #1b1b1b; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-white { background: #fff; color: var(--brand); }
.btn-outline-white { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.link-btn:hover { color: var(--brand-2); }
.link-btn.on { color: var(--accent); }

/* ---- Header ---- */
.topbar { background: var(--brand-ink); color: #cbd2f5; font-size: .8rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; align-items: center; }
.topbar a { color: #fff; }
.topbar .tb-links { display: none; gap: 16px; }
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; font-family: var(--display); }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand b { display: block; font-size: 1.05rem; line-height: 1.1; letter-spacing: -.01em; }
.brand small { display: block; font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.nav { display: none; margin-left: auto; gap: 2px; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.nav a:hover, .nav a.on { background: var(--bg-2); color: var(--brand-2); text-decoration: none; }
.head-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn:hover { color: var(--brand-2); border-color: var(--brand-2); }
.badge-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.head-actions .btn { display: none; }
.mobile-nav { position: fixed; inset: 0; z-index: 80; background: rgba(8, 12, 35, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav .panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(86vw, 340px); background: var(--card); padding: 20px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav.open .panel { transform: none; }
.mobile-nav .panel a { padding: 12px 14px; border-radius: 12px; color: var(--ink); font-weight: 600; }
.mobile-nav .panel a:hover { background: var(--bg-2); text-decoration: none; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 500px at 85% -10%, rgba(245, 196, 0, .25), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(214, 31, 44, .35), transparent 60%), linear-gradient(135deg, #10175a 0%, #1e2a78 45%, #2a3cb5 100%); }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; display: grid; gap: 40px; padding-top: 56px; padding-bottom: 72px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--gold), #ffe27a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.12rem; color: #d7dcfa; max-width: 560px; }
.hero .pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .82rem; margin-bottom: 18px; color: #fff; }
.hero .pill b { background: var(--gold); color: #1b1b1b; border-radius: 999px; padding: 2px 8px; font-size: .72rem; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-visual { position: relative; min-height: 300px; display: grid; place-items: center; }
.orbit { position: relative; width: min(380px, 84vw); aspect-ratio: 1; }
.orbit .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255,255,255,.25); animation: spin 60s linear infinite; }
.orbit .ring.r2 { inset: 14%; animation-duration: 40s; animation-direction: reverse; border-style: solid; border-color: rgba(255,255,255,.12); }
.orbit .logo-main { position: absolute; inset: 24%; border-radius: 50%; background: #fff; padding: 8px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), 0 0 0 10px rgba(255,255,255,.08); }
.orbit .logo-main img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.orbit .sat { position: absolute; width: 26%; aspect-ratio: 1; border-radius: 50%; background: #fff; padding: 4px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); animation: float 6s ease-in-out infinite; }
.orbit .sat img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.orbit .s1 { top: -2%; right: 4%; } .orbit .s2 { bottom: 0; left: 0; animation-delay: -3s; }
.float-card { position: absolute; background: rgba(255,255,255,.96); color: #0f172a; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: .8rem; display: flex; gap: 10px; align-items: center; animation: float 7s ease-in-out infinite; }
.float-card b { display: block; font-size: .95rem; }
.float-card .ic { color: var(--accent); }
.fc1 { left: -4%; top: 18%; } .fc2 { right: -2%; bottom: 14%; animation-delay: -2s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.page-hero { background: linear-gradient(135deg, #10175a, #1e2a78 60%, #2a3cb5); color: #fff; padding: 44px 0 40px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(245,196,0,.28), transparent 70%); }
.page-hero h1 { color: #fff; margin-bottom: .3em; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.page-hero p { color: #d2d8fb; max-width: 680px; margin: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; font-size: .82rem; }
.crumbs li + li::before { content: "â€º"; margin-right: 6px; opacity: .6; }
.page-hero .crumbs a { color: #c4cbf6; }
.page-hero .crumbs span { color: #fff; }

/* ---- Cards & grids ---- */
.grid { display: grid; gap: 20px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; grid-template-columns: 1fr; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand-2) 30%, var(--line)); }
.card a.stretch::after { content: ""; position: absolute; inset: 0; }
.card.rel { position: relative; }
.card-media { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--bg-2), var(--line)); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; }
.card-body h3 { margin-bottom: .35em; }
.card-body h3 a { color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--bg-2); color: var(--ink-2); }
.chip-brand { background: color-mix(in srgb, var(--brand-2) 14%, transparent); color: var(--brand-2); }
.chip-accent { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.chip-green { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.chip-gold { background: color-mix(in srgb, var(--gold) 26%, transparent); color: #8a6d00; }
.date-badge { width: 58px; border-radius: 12px; overflow: hidden; text-align: center; background: var(--card); border: 1px solid var(--line); flex-shrink: 0; }
.date-badge b { display: block; background: var(--accent); color: #fff; font-size: .7rem; letter-spacing: .1em; padding: 3px 0; text-transform: uppercase; }
.date-badge span { display: block; font-family: var(--display); font-size: 1.45rem; font-weight: 800; padding: 4px 0; color: var(--ink); }
.feature-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand-2) 12%, transparent); color: var(--brand-2); margin-bottom: 14px; }
.feature-ic.red { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.feature-ic.gold { background: color-mix(in srgb, var(--gold) 22%, transparent); color: #a07f00; }
.feature-ic.green { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); margin-top: -40px; position: relative; z-index: 2; box-shadow: var(--shadow); }
.stats div { background: var(--card); padding: 22px; text-align: center; }
.stats b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 800; color: var(--brand); }
:root[data-theme="dark"] .stats b { color: #aeb8ff; }
.stats span { color: var(--muted); font-size: .85rem; }

.ministry-card { text-align: center; padding: 26px 18px; position: relative; }
.ministry-card img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; box-shadow: 0 0 0 4px var(--bg-2); }
.ministry-card h3 a { color: var(--ink); }

.devo-band { border-radius: var(--radius-lg); padding: 32px; background: linear-gradient(120deg, #fff8db, #fff 60%); border: 1px solid #f3e3a1; display: grid; gap: 20px; align-items: center; }
:root[data-theme="dark"] .devo-band { background: linear-gradient(120deg, #2a2510, var(--card) 60%); border-color: #4a4120; }
.fc-band { border-radius: var(--radius-lg); padding: 36px 28px; color: #fff; background: radial-gradient(600px 300px at 100% 0, rgba(245,196,0,.35), transparent 60%), linear-gradient(135deg, #7a0f17, #d61f2c 55%, #ef4444); display: grid; gap: 20px; align-items: center; position: relative; overflow: hidden; }
.fc-band h2 { color: #fff; }
.fc-band p { color: #ffe0e2; margin: 0; }
.globe-anim { width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); display: grid; place-items: center; position: relative; }
.globe-anim::before, .globe-anim::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }
.globe-anim::after { inset: 0 30%; }
.app-band { border-radius: var(--radius-lg); background: linear-gradient(135deg, #10175a, #1e2a78); color: #fff; padding: 36px 28px; display: grid; gap: 24px; align-items: center; }
.app-band h2 { color: #fff; }
.app-band p { color: #cdd3fa; }
.store-btn { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; border-radius: 12px; padding: 10px 16px; border: 1px solid rgba(255,255,255,.25); text-decoration: none !important; }
.store-btn small { display: block; font-size: .65rem; opacity: .8; }
.store-btn b { display: block; font-size: 1rem; line-height: 1.1; }
.phone-mock { width: 230px; height: 440px; border-radius: 36px; background: #0b1020; border: 8px solid #1a1f3a; margin: 0 auto; box-shadow: var(--shadow-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.phone-mock .pm-bar { height: 32px; border-radius: 10px; background: linear-gradient(90deg, var(--brand-2), var(--accent)); }
.phone-mock .pm-card { border-radius: 12px; background: #182045; flex: 1; }
.phone-mock .pm-card.s { flex: .6; background: #22295a; }

/* ---- Forms ---- */
.form label { display: block; font-weight: 600; font-size: .88rem; color: var(--ink-2); margin-bottom: 14px; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], input:not([type]), select, textarea {
  display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 400 .95rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--ring); }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand-2); }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-size: .92rem; border: 1px solid; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
:root[data-theme="dark"] .alert-error { background: #3b1111; color: #fecaca; border-color: #7f1d1d; }
:root[data-theme="dark"] .alert-success { background: #0f2e1b; color: #bbf7d0; border-color: #166534; }
:root[data-theme="dark"] .alert-info { background: #0f1e3d; color: #bfdbfe; border-color: #1e40af; }

/* ---- Auth ---- */
.auth-body { min-height: 100vh; background: radial-gradient(900px 500px at 100% 0, rgba(245,196,0,.18), transparent 60%), radial-gradient(800px 500px at 0 100%, rgba(214,31,44,.15), transparent 60%), var(--bg); }
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 40px 16px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 24px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .2em; }
.auth-logos { display: flex; gap: 10px; margin-bottom: 18px; }
.auth-logos img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.checklist { list-style: none; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.checklist .ok { color: var(--green); } .checklist .bad { color: var(--accent); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

/* ---- Prose ---- */
.prose { font-size: 1.04rem; color: var(--ink-2); }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--gold); background: var(--bg-2); border-radius: 0 12px 12px 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px; }
.lyrics { white-space: pre-line; font-size: 1.08rem; line-height: 1.9; }

/* ---- Footer ---- */
.site-footer { background: #0a0f2e; color: #aab3dc; padding: 56px 0 24px; margin-top: 40px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer a { color: #cfd6ff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.footer-grid { display: grid; gap: 32px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .82rem; }
.footer-logos { display: flex; gap: 10px; margin: 14px 0; }
.footer-logos img { width: 44px; height: 44px; border-radius: 50%; background: #fff; object-fit: cover; }
.socials { display: flex; gap: 8px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }

/* ---- Member area / community ---- */
.app-shell { display: grid; gap: 24px; padding: 24px 0 40px; }
.side-nav { display: none; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: .93rem; }
.side-nav a:hover, .side-nav a.on { background: var(--card); color: var(--brand-2); text-decoration: none; box-shadow: var(--shadow-sm); }
.side-nav hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--muted); font-weight: 600; padding: 4px; text-decoration: none; }
.bottom-nav a.on { color: var(--brand-2); }
body.has-bottom-nav { padding-bottom: 72px; }
.avatar { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: .8rem; flex-shrink: 0; width: 40px; height: 40px; }
.composer textarea { border: 0; padding: 4px 0; min-height: 70px; box-shadow: none !important; background: transparent; font-size: 1.02rem; }
.composer .tools { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; flex-wrap: wrap; }
.composer select { width: auto; min-height: 36px; padding: 4px 10px; margin: 0; font-size: .85rem; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; scrollbar-width: none; }
.tabs a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.tabs a.on { background: var(--brand); color: #fff; text-decoration: none; }
.tabs a:hover { text-decoration: none; }
.post { padding: 18px 20px; }
.post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.post-head b { display: block; font-size: .95rem; }
.post-head small { color: var(--muted); font-size: .78rem; }
.post-body { white-space: normal; word-wrap: break-word; color: var(--ink); }
.post-images { display: grid; gap: 6px; grid-template-columns: repeat(2, 1fr); margin-top: 12px; border-radius: 12px; overflow: hidden; }
.post-images img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.post-images.one { grid-template-columns: 1fr; }
.post-images.one img { aspect-ratio: auto; max-height: 520px; }
.post-actions { display: flex; gap: 18px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; flex-wrap: wrap; }
.tag { font-weight: 600; } .mention { color: var(--brand-2); font-weight: 600; }
.pinned-flag { font-size: .72rem; color: var(--accent); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
.comment .bubble { background: var(--bg-2); border-radius: 14px; padding: 8px 12px; font-size: .92rem; flex: 1; }
.ad-slot { border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; align-items: center; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 12%, var(--card)), var(--card)); }
.ad-slot small { font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* Chat */
.chat-wrap { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - 200px); min-height: 460px; overflow: hidden; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.chat-stream { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: .93rem; align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--brand-2); color: #fff; border-color: transparent; border-bottom-right-radius: 4px; }
.msg:not(.me) { border-bottom-left-radius: 4px; }
.msg small { display: block; font-size: .68rem; opacity: .7; margin-top: 2px; }
.msg .who { font-size: .72rem; font-weight: 700; color: var(--brand-2); }
.msg img { border-radius: 10px; margin-top: 4px; max-height: 260px; }
.msg audio { max-width: 220px; margin-top: 4px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: center; }
.chat-input input[type=text] { margin: 0; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-item:hover { background: var(--bg-2); text-decoration: none; }
.list-item:last-child { border-bottom: 0; }

/* Quiz */
.quiz-opt { display: block; width: 100%; text-align: left; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: 600 1rem var(--font); cursor: pointer; margin-bottom: 10px; transition: border-color .15s, background .15s; }
.quiz-opt:hover { border-color: var(--brand-2); }
.quiz-opt.right { border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--card)); }
.quiz-opt.wrong { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.progress { height: 8px; border-radius: 8px; background: var(--bg-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--accent)); transition: width .3s; }
.timer { font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--accent); }
.leader { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.leader .rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--bg-2); font-size: .85rem; }
.leader:nth-child(1) .rank { background: var(--gold); color: #000; }
.leader:nth-child(2) .rank { background: #cbd5e1; color: #000; }
.leader:nth-child(3) .rank { background: #e8a76b; color: #000; }

/* Table (public) */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Shop */
.price { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--brand); }
:root[data-theme="dark"] .price { color: #aeb8ff; }
.price del { color: var(--muted); font-weight: 500; font-size: .9rem; margin-left: 6px; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.summary-line.total { font-weight: 800; font-size: 1.15rem; border-bottom: 0; color: var(--ink); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty input { width: 56px; border: 0; margin: 0; text-align: center; border-radius: 0; min-height: 38px; }
.ticket { border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 420px; margin: 0 auto; }
.ticket-top { background: linear-gradient(135deg, #10175a, #2a3cb5); color: #fff; padding: 22px; }
.ticket-top h2 { color: #fff; font-size: 1.3rem; }
.ticket-qr { padding: 24px; display: grid; place-items: center; border-top: 2px dashed var(--line); }
.ticket-qr #qr { background: #fff; padding: 10px; border-radius: 10px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { margin: 0 auto 12px; color: var(--line); width: 56px; height: 56px; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 28px 0 0; flex-wrap: wrap; }
.pager a, .pager .gap { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-weight: 600; }
.pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.toast-host { position: fixed; z-index: 200; bottom: 84px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: #111832; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; animation: toastIn .25s ease; display: flex; gap: 10px; align-items: center; }
.toast.error { background: #991b1b; } .toast.success { background: #166534; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }
.modal { position: fixed; inset: 0; z-index: 150; background: rgba(8, 12, 35, .6); display: none; place-items: center; padding: 16px; }
.modal.open { display: grid; }
.modal .box, .modal .modal-card { background: var(--card); border-radius: var(--radius-lg); padding: 24px; width: min(520px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.kc-card { overflow: hidden; }
.kc-card .photo { aspect-ratio: 4/5; background: linear-gradient(135deg, #f2d4dc, #d9def8); display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: #fff; }
.kc-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.notice-safety { background: color-mix(in srgb, var(--gold) 18%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line)); border-radius: 12px; padding: 12px 16px; font-size: .9rem; display: flex; gap: 10px; }
.map-frame { border: 0; width: 100%; height: 260px; border-radius: var(--radius); }
.tree-list { list-style: none; padding-left: 18px; border-left: 2px solid var(--line); margin: 6px 0 6px 8px; }
.tree-list li { margin: 6px 0; }

/* ---- Breakpoints ---- */
@media (min-width: 480px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .topbar .tb-links { display: flex; }
  .hero .container { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 80px; padding-bottom: 100px; }
  .devo-band, .fc-band, .app-band { grid-template-columns: 1fr auto; padding: 40px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .auth-card { padding: 36px; }
  .section { padding: 80px 0; }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .nav { display: flex; }
  .head-actions { margin-left: 8px; }
  .head-actions .btn { display: inline-flex; }
  .menu-toggle { display: none !important; }
  .app-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .app-shell.with-aside { grid-template-columns: 230px minmax(0, 1fr) 300px; }
  .side-nav { display: block; position: sticky; top: 88px; align-self: start; }
  .bottom-nav { display: none; }
  body.has-bottom-nav { padding-bottom: 0; }
}
@media (max-width: 1023px) { .app-shell aside.aside { display: none; } }
@media print { .site-header, .site-footer, .topbar, .bottom-nav, .no-print { display: none !important; } body { background: #fff; } }

/* ---- Contrast safety: dark sections always use light text, in both themes ---- */
.hero, .page-hero, .app-band, .fc-band, .ticket-top, .site-footer, .topbar, .on-dark { --ink: #ffffff; --ink-2: #e3e7fb; --muted: #c4cbf0; color: #fff; }
.hero :is(h1,h2,h3,h4,b,strong), .page-hero :is(h1,h2,h3,h4,b,strong), .app-band :is(h1,h2,h3,b), .fc-band :is(h1,h2,h3,b), .ticket-top :is(h1,h2,h3,b), .on-dark :is(h1,h2,h3,b) { color: #fff; }
.hero .float-card, .hero .float-card b { --ink: #0f172a; color: #0f172a; }
.site-footer .brand b { color: #fff; }
/* Logos with transparent backgrounds stay legible on dark cards */
.ministry-card img, .logo-chip { background: #fff; object-fit: contain !important; padding: 6px; }
:root[data-theme="dark"] .chip-gold, :root[data-theme="dark"] .feature-ic.gold { color: #ffd84d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip-gold, :root:not([data-theme="light"]) .feature-ic.gold { color: #ffd84d; } :root:not([data-theme="light"]) .stats b, :root:not([data-theme="light"]) .price { color: #aeb8ff; } :root:not([data-theme="light"]) .devo-band { background: linear-gradient(120deg, #2a2510, var(--card) 60%); border-color: #4a4120; } :root:not([data-theme="light"]) .alert-error { background: #3b1111; color: #fecaca; border-color: #7f1d1d; } :root:not([data-theme="light"]) .alert-success { background: #0f2e1b; color: #bbf7d0; border-color: #166534; } :root:not([data-theme="light"]) .alert-info { background: #0f1e3d; color: #bfdbfe; border-color: #1e40af; } }
::placeholder { color: var(--muted); opacity: 1; }

/* ---- Kingdom Connections (dating) ---- */
.kc-hero { border-radius: var(--radius-lg); padding: 24px; display: flex; justify-content: space-between; gap: 16px; align-items: center; background: radial-gradient(500px 220px at 100% 0, rgba(245,196,0,.35), transparent 60%), linear-gradient(135deg, #5b0a1a, #c2185b 50%, #e64a6b); box-shadow: var(--shadow); }
.kc-hero h2 { margin: 8px 0 4px; } .kc-hero p { margin: 0; color: #ffe1ea; }
.kc-tag { display: inline-flex; gap: 6px; align-items: center; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.16); }
.kc-ring { --p: 50; width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; text-align: center; background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255,255,255,.2) 0); position: relative; }
.kc-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #9c1747; }
.kc-ring b, .kc-ring small { position: relative; display: block; line-height: 1.1; } .kc-ring small { font-size: .65rem; opacity: .85; }
.kc-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; }
.kc-stage { max-width: 420px; width: 100%; margin: 0 auto; }
.kc-deck { position: relative; height: min(640px, 72vh); }
.kc-card2 { position: absolute; inset: 0; border-radius: 24px; overflow: hidden auto; background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 60px -24px rgba(15,23,42,.45); touch-action: pan-y; user-select: none; scrollbar-width: none; }
.kc-card2:not(:last-child) { transform: scale(.96) translateY(14px); filter: brightness(.95); }
.kc-photo { position: relative; height: 78%; min-height: 380px; background: linear-gradient(135deg, #f2c4d3, #c7cdf6); cursor: grab; touch-action: none; }
.kc-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.kc-ini { position: absolute; inset: 0; display: grid; place-items: center; font: 800 6rem var(--display); color: #fff; }
.kc-dots { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; }
.kc-dots i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.45); } .kc-dots i.on { background: #fff; }
.kc-over { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.kc-over h3 { color: #fff; font-size: 1.6rem; margin: 0; }
.kc-ver { width: 22px; height: 22px; border-radius: 50%; background: #3b82f6; color: #fff; display: inline-grid; place-items: center; font-size: .75rem; }
.kc-on { font-size: .72rem; color: #4ade80; font-weight: 600; }
.kc-score { background: linear-gradient(90deg, var(--gold), #ffe27a); color: #1b1b1b; font-weight: 700; font-size: .75rem; border-radius: 999px; padding: 3px 10px; }
.kc-pill { background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px 10px; font-size: .75rem; } .kc-pill.gold { background: var(--gold); color: #1b1b1b; }
.kc-info { padding: 16px 18px 22px; display: grid; gap: 12px; color: var(--ink); }
.kc-info p { margin: 0; }
.kc-pr { background: var(--bg-2); border-radius: 14px; padding: 12px 14px; } .kc-pr small { display: block; color: var(--muted); font-size: .75rem; } .kc-pr b { font-family: var(--display); font-size: 1.05rem; color: var(--ink); }
.kc-tags, .kc-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-tags span, .kc-facts span { font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.kc-tags span.sh { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent); font-weight: 600; }
.kc-stamp { position: absolute; top: 40px; padding: 4px 14px; border: 4px solid; border-radius: 10px; font: 800 1.6rem var(--display); opacity: 0; transition: opacity .1s; transform: rotate(-14deg); }
.kc-stamp.like { left: 22px; color: #22c55e; } .kc-stamp.nope { right: 22px; color: #ef4444; transform: rotate(14deg); } .kc-stamp.sup { left: 50%; top: auto; bottom: 140px; transform: translateX(-50%); color: #3b82f6; }
.kc-card2.l .like, .kc-card2.n .nope, .kc-card2.s .sup { opacity: 1; }
.kc-actions { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 18px 0 8px; }
.kc-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; transition: transform .15s; font-size: 1.3rem; color: var(--ink-2); }
.kc-btn:hover { transform: scale(1.08); } .kc-btn.sm { width: 46px; height: 46px; }
.kc-btn.pass { color: #ef4444; } .kc-btn.like { color: #fff; background: linear-gradient(135deg, #e64a6b, #c2185b); } .kc-btn.super { color: #3b82f6; width: 52px; height: 52px; }
.kc-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.kc-match .kc-burst { font-size: 64px; animation: float 2s ease-in-out infinite; }
.kc-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.kc-mini { border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.kc-mini .ph { aspect-ratio: 3/4; position: relative; background: linear-gradient(135deg, #f2c4d3, #c7cdf6); display: grid; place-items: center; font: 800 2.4rem var(--display); color: #fff; }
.kc-mini .ph img { width: 100%; height: 100%; object-fit: cover; }
.kc-mini.blurred .ph img { filter: blur(14px); transform: scale(1.1); }
.kc-mini .sl { position: absolute; bottom: 8px; left: 8px; background: var(--gold); color: #1b1b1b; font-style: normal; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.kc-av { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; position: relative; display: grid; place-items: center; background: #c2185b; color: #fff; font-weight: 700; flex-shrink: 0; }
.kc-av img { width: 100%; height: 100%; object-fit: cover; } .kc-av i { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid var(--card); }
.kc-photos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.kc-ph { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 2px dashed var(--line); margin: 0 !important; }
.kc-ph img { width: 100%; height: 100%; object-fit: cover; } .kc-ph .check { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff; border-radius: 8px; padding: 2px 6px; }
.kc-ph i { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-style: normal; font-size: .65rem; padding: 2px 8px; border-radius: 999px; }
.kc-ph.add { display: grid; place-items: center; align-content: center; gap: 6px; cursor: pointer; color: var(--muted); }
.kc-prompt { display: grid; gap: 8px; grid-template-columns: 1fr; margin-bottom: 10px; } .kc-prompt select, .kc-prompt input { margin: 0; }
@media (min-width: 640px) { .kc-prompt { grid-template-columns: 1fr 1.4fr; } }
.kc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kc-chips label { margin: 0; } .kc-chips input { display: none; }
.kc-chips span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-weight: 500; font-size: .85rem; color: var(--ink-2); background: var(--card); }
.kc-chips input:checked + span { background: linear-gradient(135deg, #e64a6b, #c2185b); color: #fff; border-color: transparent; }
.bottom-nav a, .side-nav a { position: relative; } .side-nav .badge-dot { position: static; margin-left: auto; }
.brand span { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) { .brand small { display: none; } .nav a { padding: 8px 9px; font-size: .86rem; } .head-actions .btn-ghost { display: none; } }
.rv { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.rv.rv-in { opacity: 1; transform: none; }
.brand { flex-shrink: 0; }
.nav { min-width: 0; }
[hidden] { display: none !important; }

/* ---- Emoji reactions ---- */
.react { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.react-main .react-em { font-size: 1.15rem; line-height: 1; display: inline-flex; }
.react-main.on { color: var(--accent); font-weight: 600; }
.react-main.pop .react-em { animation: reactPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes reactPop { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.react-pop { position: absolute; bottom: calc(100% + 6px); left: -6px; display: flex; gap: 2px; padding: 6px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); opacity: 0; transform: translateY(8px) scale(.9); transform-origin: bottom left; pointer-events: none; transition: .18s ease; z-index: 20; }
.react:hover .react-pop, .react.open .react-pop, .react:focus-within .react-pop { opacity: 1; transform: none; pointer-events: auto; }
.react-pop button { background: none; border: 0; font-size: 1.5rem; line-height: 1; padding: 4px; cursor: pointer; border-radius: 50%; transition: transform .15s; }
.react-pop button:hover, .react-pop button:focus-visible { transform: translateY(-4px) scale(1.3); }
.react-sum { display: inline-flex; align-items: center; color: var(--muted); font-size: .85rem; }
.react-sum i { font-style: normal; margin-right: -4px; background: var(--card); border-radius: 50%; padding: 1px; font-size: .9rem; }
.react-sum b { margin-left: 8px; font-weight: 600; }
@media (hover: none) { .react:hover .react-pop { opacity: 0; pointer-events: none; } .react.open .react-pop { opacity: 1; pointer-events: auto; } }

/* ---- Password show / hide ---- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px !important; width: 100%; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pw-wrap:has(input:not(:only-child)) .pw-eye { margin-top: 0; }
.pw-eye:hover, .pw-eye[aria-pressed=true] { color: var(--brand-2); }
label .pw-wrap { margin-top: 6px; }
label .pw-wrap input { margin-top: 0 !important; }

/* ---- Reels ---- */
.reels-top { margin-bottom: 14px; }
.reels { height: calc(100vh - 190px); min-height: 520px; overflow-y: auto; scroll-snap-type: y mandatory; border-radius: 22px; background: #05060f; scrollbar-width: none; display: flex; flex-direction: column; }
.reels::-webkit-scrollbar { display: none; }
.reel { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden; color: #fff; }
.reel video { width: 100%; height: 100%; object-fit: contain; background: #000; cursor: pointer; }
.reel::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); pointer-events: none; }
.reel-mark { position: absolute; top: 16px; left: 16px; width: 40px; height: 40px; opacity: .9; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); z-index: 2; }
.reel-mark-t { position: absolute; top: 26px; left: 62px; font: 600 .78rem var(--display); letter-spacing: .02em; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); opacity: .9; z-index: 2; }
.reel-sound { position: absolute; top: 16px; right: 16px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(8px); opacity: .6; }
.reel.sound .reel-sound { opacity: 1; background: var(--accent); }
.reel-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .2); z-index: 3; }
.reel-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold, #f5b301), var(--accent)); transition: width .25s linear; }
.reel-info { position: absolute; left: 18px; right: 90px; bottom: 22px; z-index: 2; }
.reel-info p { margin: 10px 0 4px; font-size: .95rem; line-height: 1.45; max-height: 4.4em; overflow: hidden; }
.reel-info small { opacity: .75; }
.reel-info .avatar { border: 2px solid #fff; }
.reel-follow { margin-top: 8px; border: 1.5px solid #fff; background: transparent; color: #fff; border-radius: 999px; padding: 4px 14px; font: 600 .8rem var(--body); cursor: pointer; }
.reel-follow.on { background: #fff; color: #111; }
.reel-rail { position: absolute; right: 12px; bottom: 26px; z-index: 3; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.reel-btn { display: grid; justify-items: center; gap: 2px; background: none; border: 0; color: #fff; cursor: pointer; text-decoration: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); min-width: 48px; }
.reel-btn small { font-size: .72rem; font-weight: 600; }
.reel-btn.on { color: var(--gold, #f5b301); }
.reel-btn .react-em { font-size: 1.9rem; }
.react-v { flex-direction: column; gap: 0; }
.react-v .react-sum { color: #fff; } .react-v .react-sum b { margin: 0; font-size: .75rem; }
.react-v .react-pop { left: auto; right: calc(100% + 8px); bottom: 0; flex-direction: row; transform-origin: right center; }
.reel.paused::before { content: "â–¶"; position: absolute; z-index: 2; font-size: 3.4rem; opacity: .85; pointer-events: none; }
.reel.burst::before { content: "ðŸ’›"; position: absolute; z-index: 4; font-size: 6rem; animation: burst .8s ease forwards; pointer-events: none; }
@keyframes burst { 0% { transform: scale(.2); opacity: 0; } 30% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1) translateY(-40px); opacity: 0; } }
.reel-drop { position: relative; display: grid; place-items: center; aspect-ratio: 9 / 12; max-height: 340px; border: 2px dashed var(--line); border-radius: 18px; cursor: pointer; overflow: hidden; background: var(--bg-2, rgba(99, 102, 241, .05)); margin-bottom: 8px; }
.reel-drop span { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); padding: 20px; }
.reel-drop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.reel-drop.has video { display: block; } .reel-drop.has span { display: none; }
.reel-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.reel-bar i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .2s; }
@media (max-width: 760px) { .reels { height: calc(100vh - 210px); border-radius: 16px; } }

/* ---- Receipts ---- */
.receipt { position: relative; overflow: hidden; padding-top: 30px !important; }
.receipt-band { position: absolute; inset: 0 0 auto; height: 8px; background: linear-gradient(90deg, var(--brand, #1e2a78), var(--brand-2, #4f46e5) 55%, var(--gold, #f5b301)); }
.receipt-stamp { position: absolute; right: 26px; top: 90px; transform: rotate(-14deg); border: 4px solid #16a34a; color: #16a34a; font: 800 2rem/1 var(--display); letter-spacing: .14em; padding: 8px 16px; border-radius: 12px; opacity: .2; pointer-events: none; }
.receipt-foot { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.receipt-foot #rqr { background: #fff; padding: 6px; border-radius: 10px; flex: none; }
.receipt-foot #rqr img, .receipt-foot #rqr canvas { display: block; }
.receipt-actions { flex-wrap: wrap; }
.exporting { box-shadow: none !important; }
.btn.loading { opacity: .6; pointer-events: none; }
.reel-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.reel-strip::-webkit-scrollbar { display: none; }
.reel-chip { position: relative; flex: 0 0 104px; height: 168px; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, var(--brand, #1e2a78), var(--brand-2, #4f46e5)) center / cover; color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; box-shadow: 0 8px 22px rgba(15, 23, 42, .18); transition: transform .2s; }
.reel-chip:hover { transform: translateY(-3px); }
.reel-chip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .7)); }
.reel-chip > * { position: relative; z-index: 1; }
.reel-chip .avatar { border: 2px solid var(--gold, #f5b301); }
.reel-chip b { font-size: .8rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.reel-chip i { position: absolute; top: 10px; right: 10px; opacity: .9; }
.reel-chip.add { background: var(--card); color: var(--ink, inherit); border: 1.5px dashed var(--line); box-shadow: none; align-items: center; justify-content: center; gap: 8px; }
.reel-chip.add::after { display: none; }
.reel-chip.add span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-2, #4f46e5); color: #fff; }

/* ---- Trivia player ---- */
.quiz-shell { display: grid; gap: 16px; }
.quiz-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px; border-radius: 22px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #3b4fd8 0%, #10175a 55%, #0a0f3d 100%); box-shadow: 0 18px 40px rgba(16, 23, 90, .35); }
.quiz-hero h1 { color: #fff; margin: 10px 0 4px; font-size: clamp(1.4rem, 3vw, 2rem); }
.quiz-hero p { margin: 0; color: #cfd6ff; }
.quiz-ring { position: relative; width: 86px; height: 86px; flex: none; }
.quiz-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.quiz-ring circle { fill: none; stroke-width: 4; stroke: rgba(255, 255, 255, .15); }
.quiz-ring #ringArc { stroke: #f5b301; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke .3s; }
.quiz-ring.low #ringArc { stroke: #ef4444; }
.quiz-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 1.6rem var(--display); }
.quiz-steps { display: flex; gap: 4px; }
.quiz-steps i { flex: 1; height: 6px; border-radius: 4px; background: var(--line); transition: background .3s; }
.quiz-steps i.done { background: var(--brand-2); } .quiz-steps i.bad { background: var(--accent); } .quiz-steps i.now { background: linear-gradient(90deg, #f5b301, var(--brand-2)); }
.quiz-q { font-size: clamp(1.2rem, 2.6vw, 1.6rem); margin: 10px 0 4px; line-height: 1.35; }
.quiz-ref { margin: 12px 0 0; color: var(--brand-2); font-weight: 600; font-size: .9rem; }
.quiz-opts { display: grid; gap: 10px; margin-top: 12px; }
.quiz-opts.t-tf { grid-template-columns: 1fr 1fr; }
.quiz-opt { display: flex !important; align-items: center; gap: 12px; margin: 0 !important; }
.quiz-opt .key { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--line); font: 700 .9rem var(--display); }
.quiz-opt.picked { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 10%, var(--card)); }
.quiz-opt.picked .key { background: var(--brand-2); color: #fff; }
.quiz-opt.right .key { background: var(--green); color: #fff; } .quiz-opt.wrong .key { background: var(--accent); color: #fff; }
.t-tf .quiz-opt { justify-content: center; padding: 22px 16px; font-size: 1.15rem; }
.quiz-input { width: 100%; font-size: 1.2rem; padding: 16px 18px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); }
.quiz-input:focus { border-color: var(--brand-2); outline: none; }
.quiz-fb { margin-top: 14px; padding: 14px 16px; border-radius: 14px; animation: reactPop .35s ease; }
.quiz-fb.ok { background: color-mix(in srgb, var(--green) 14%, var(--card)); } .quiz-fb.bad { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.quiz-fb p { margin: 6px 0 2px; } .quiz-fb small { color: var(--muted); }
.quiz-result { text-align: center; padding: 10px 0; }
.quiz-result .big { font-size: 4rem; line-height: 1; animation: reactPop .6s ease; }
.quiz-rev { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.reading .reading-text { font-family: Georgia, 'Times New Roman', serif; font-size: 1.12rem; line-height: 1.85; padding: 18px 20px; margin: 16px 0; border-left: 4px solid #f5b301; background: color-mix(in srgb, #f5b301 7%, var(--card)); border-radius: 0 14px 14px 0; max-height: 60vh; overflow: auto; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand-2); animation: spin .8s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .quiz-hero { padding: 18px; } .quiz-ring { width: 64px; height: 64px; } .quiz-ring b { font-size: 1.2rem; } }
.practice-cta { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 20px; color: #fff; text-decoration: none; background: linear-gradient(135deg, #f59e0b, #ef4444 60%, #be185d); box-shadow: 0 14px 30px rgba(239, 68, 68, .28); transition: transform .2s; }
.practice-cta:hover { transform: translateY(-2px); }
.practice-cta > span { font-size: 2rem; } .practice-cta b { display: block; font: 700 1.1rem var(--display); } .practice-cta small { opacity: .9; }
.quiz-card { display: flex; align-items: center; gap: 14px; }
.quiz-ic { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: color-mix(in srgb, var(--brand-2) 12%, var(--card)); }
.k-reading .quiz-ic { background: color-mix(in srgb, #f5b301 18%, var(--card)); }
.lang-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; padding: 4px; border-radius: 14px; background: var(--line); width: fit-content; }
.lang-tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font: 600 .9rem var(--body); color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.lang-tabs button[aria-selected=true] { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }
.crop-stage { margin: 14px 0; height: min(60vh, 420px); background: #0b0f2a; border-radius: 14px; overflow: hidden; }
.crop-stage img { display: block; max-width: 100%; }
.crop-tools { flex-wrap: wrap; gap: 6px; }
.crop-modal .cropper-view-box { outline: 2px solid #fff; border-radius: 50%; }
.crop-modal .cropper-face { border-radius: 50%; }
.avatar-edit { position: relative; display: inline-block; }
.avatar-edit #photoPrev { position: absolute; inset: 0; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--brand-2); }

/* ---- Profile ---- */
.prof { overflow: hidden; }
.prof-cover { height: 130px; background: radial-gradient(120% 160% at 0 0, #3b4fd8, #10175a 60%, #be185d); }
.prof-body { padding: 0 22px 20px; }
.prof-top { display: flex; align-items: flex-end; gap: 18px; margin-top: -56px; flex-wrap: wrap; }
.prof-av { border: 4px solid var(--card); border-radius: 50%; background: var(--card); box-shadow: 0 8px 22px rgba(15, 23, 42, .2); }
.prof-stats { display: flex; gap: 6px; flex: 1; justify-content: space-around; min-width: 220px; padding-bottom: 6px; }
.prof-stats a { text-align: center; text-decoration: none; color: inherit; padding: 6px 10px; border-radius: 12px; }
.prof-stats a:hover { background: var(--line); }
.prof-stats b { display: block; font: 800 1.25rem var(--display); } .prof-stats span { font-size: .78rem; color: var(--muted); }
.prof-name { margin: 12px 0 2px; font-size: 1.5rem; }
.prof-actions .btn { min-width: 0; }
.reel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.reel-grid a { aspect-ratio: 9 / 14; background: linear-gradient(160deg, var(--brand), var(--brand-2)) center / cover; border-radius: 10px; color: #fff; padding: 8px; }
.tag-hero { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 12px; }
.tag-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font: 800 2rem var(--display); color: #fff; background: linear-gradient(135deg, var(--brand-2), #be185d); }
a.tag, a.mention { color: var(--brand-2); font-weight: 600; text-decoration: none; } a.tag:hover, a.mention:hover { text-decoration: underline; }

/* ---- Comments (Instagram-style) ---- */
.cm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; background: var(--line); border-radius: 99px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 14px; border-radius: 99px; font: 600 .8rem var(--body); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.cm { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; animation: reactPop .3s ease; }
.cm-r { padding-left: 0; margin-top: 4px; }
.cm-rl { margin-top: 4px; }
.cm-av { width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--brand-2), #be185d); color: #fff; display: grid; place-items: center; font-weight: 700; }
.cm-av img { width: 100%; height: 100%; object-fit: cover; } .cm-r .cm-av { width: 28px; height: 28px; font-size: .75rem; }
.cm-main { flex: 1; min-width: 0; font-size: .93rem; line-height: 1.45; word-break: break-word; }
.cm-name { font-weight: 700; color: inherit; text-decoration: none; margin-right: 4px; }
.cm-meta { display: flex; gap: 14px; font-size: .76rem; color: var(--muted); margin-top: 2px; flex-wrap: wrap; }
.cm-meta button, .cm-more { background: none; border: 0; padding: 0; font: 600 .76rem var(--body); color: var(--muted); cursor: pointer; }
.cm-meta button:hover, .cm-more:hover { color: var(--ink); } .cm-more { margin-top: 6px; }
.cm-heart { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; transition: transform .15s; } .cm-heart.on { color: #ef4444; animation: reactPop .35s ease; } .cm-heart:active { transform: scale(.8); }
.cm-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); position: sticky; bottom: 70px; background: var(--card); }
.cm-form textarea { flex: 1; resize: none; border-radius: 22px; padding: 10px 16px; min-height: 42px; margin: 0; }
.cm-replying { background: var(--line); border-radius: 10px; padding: 6px 12px; font-size: .8rem; margin-top: 10px; display: flex; justify-content: space-between; } .cm-replying button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.mention-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(15, 23, 42, .25); overflow: hidden; }
.mention-box button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 9px 12px; cursor: pointer; text-align: left; color: var(--ink); font: inherit; } .mention-box button:hover { background: var(--line); } .mention-box small { color: var(--muted); }

/* ---- Modals are bottom sheets everywhere ---- */
.modal { place-items: end center !important; padding: 0 !important; }
.modal .box, .modal .modal-card { width: min(560px, 100%) !important; max-height: 88dvh; border-radius: 24px 24px 0 0 !important; padding: 10px 22px calc(22px + env(safe-area-inset-bottom)) !important; animation: sheetUp .28s cubic-bezier(.2, .9, .3, 1); }
.modal .grab, .modal .box::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 14px; }
.modal .grab ~ .grab { display: none; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-list { display: grid; gap: 4px; margin: 8px 0; }
.sheet-list button { text-align: left; background: none; border: 0; padding: 14px 6px; font: 600 1rem var(--body); color: var(--ink); border-bottom: 1px solid var(--line); cursor: pointer; } .sheet-list .danger { color: var(--accent); }

/* ---- Reels fit the device screen ---- */
.reels { height: calc(100dvh - 200px); border-radius: 18px; overscroll-behavior: contain; touch-action: pan-y; }
.reel video { object-fit: contain; } .reel video.cover { object-fit: cover; }
@media (max-width: 760px) {
  .reels { border-radius: 0; margin: 0 -16px; width: calc(100% + 32px); }
  .reels-top { padding: 0 4px; }
  .reel-rail { bottom: 20px; } .reel-info { bottom: 18px; right: 84px; }
}
.prof-av { flex: none; line-height: 0; } .prof-av .avatar { display: block; }
@media (max-width: 640px) { .prof-top { flex-direction: column; align-items: flex-start; gap: 6px; } .prof-stats { width: 100%; justify-content: space-between; padding: 0; } }

/* ---- Chat message actions ---- */
.msg { position: relative; }
.msg-more { position: absolute; top: 4px; right: 6px; opacity: 0; border: 0; background: rgba(0,0,0,.18); color: inherit; border-radius: 99px; width: 24px; height: 24px; cursor: pointer; line-height: 1; transition: opacity .15s; }
.msg:hover .msg-more, .msg-more:focus { opacity: 1; } @media (hover: none) { .msg-more { opacity: .55; } }
.msg.gone { opacity: .75; } .msg .fwd { font-size: .75rem; font-style: italic; opacity: .75; margin-bottom: 2px; }
.msg .rep { border-left: 3px solid var(--brand-2); background: rgba(127,127,127,.14); border-radius: 8px; padding: 4px 8px; margin-bottom: 6px; font-size: .82rem; } .msg .rep div { opacity: .85; max-height: 2.6em; overflow: hidden; }
.msg .rx { display: flex; gap: 4px; margin-top: 4px; } .msg .rx span { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; font-size: .82rem; cursor: pointer; } .msg .rx span.on { border-color: var(--brand-2); }
.chat-reply { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; background: var(--line); border-left: 4px solid var(--brand-2); } .chat-reply button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.rx-pick { display: flex; justify-content: space-between; padding: 6px 0 12px; border-bottom: 1px solid var(--line); } .rx-pick button { border: 0; background: none; font-size: 1.8rem; cursor: pointer; border-radius: 50%; padding: 6px; transition: transform .15s; } .rx-pick button:hover { transform: scale(1.25); } .rx-pick button.on { background: var(--line); }
.msg.gone .muted { color: inherit !important; opacity: .85; }

/* ---- Mobile Menu sheet ---- */
.bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 .68rem var(--body); color: var(--muted); background: none; border: 0; padding: 4px; cursor: pointer; }
.menu-sheet .menu-me { display: flex; gap: 12px; align-items: center; padding: 6px 4px 14px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 0; }
.menu-grid a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--line); color: var(--ink); font: 600 .78rem/1.2 var(--body); text-decoration: none; }
.menu-grid a span { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--card); color: var(--brand-2); }
.menu-grid a.on { outline: 2px solid var(--brand-2); }
.menu-extra { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; }
.menu-extra a { display: flex; gap: 12px; align-items: center; padding: 12px 6px; color: var(--ink); font-weight: 600; text-decoration: none; }
.modal { align-content: end !important; }

/* ---- Phone header: everything must fit, the menu button is always visible ---- */
@media (max-width: 640px) {
  .site-header .container { gap: 8px; height: 60px; }
  .brand small { display: none; } .brand b { font-size: .98rem; } .brand img { width: 36px; height: 36px; }
  .head-actions { gap: 6px; margin-left: auto; flex-shrink: 0; }
  .head-actions .btn-ghost, .head-actions [href="/search"] { display: none; }
  .head-actions .btn-primary { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 10px; padding-right: 10px; }
  .head-actions .icon-btn { width: 38px; height: 38px; }
  .topbar .container > span { font-size: .72rem; line-height: 1.25; }
}
@media (max-width: 380px) { .head-actions [data-theme-toggle] { display: none; } .head-actions .btn-primary { max-width: 72px; } }
html, body { overflow-x: clip; }
