/* Exam Winners Community — mobile-first, Sinhala UI, blue accent */
:root {
  --blue: #1d6efd;
  --blue-dark: #1559c8;
  --navy: #131d27;
  --green: #31c639;
  --pink: #d40e53;
  --red: #e5484d;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #131d27;
  --muted: #6b7a8d;
  --border: #dde3ea;
  --shadow: 0 2px 10px rgba(19, 29, 39, .08);
}
html[data-theme="dark"] {
  --bg: #0f1419;
  --surface: #18222e;
  --surface-2: #212e3d;
  --text: #e8eef4;
  --muted: #93a3b5;
  --border: #2a3a4b;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, "Noto Sans Sinhala", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select {
  font-family: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: center; }
label.check input { width: auto; }
.btn {
  border: none; border-radius: 10px; padding: 11px 18px; font-size: 16px; font-weight: 600;
  background: var(--surface-2); color: var(--text);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:active { background: var(--blue-dark); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-block { width: 100%; margin-top: 12px; }
.btn-google { background: #fff; color: #131d27; border: 1px solid var(--border); width: 100%; box-shadow: var(--shadow); }
.error { color: var(--red); font-size: 14px; margin-top: 8px; }
.fine { color: var(--muted); font-size: 13px; }
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 24px;
  font-size: 15px; z-index: 99; box-shadow: var(--shadow); white-space: normal; max-width: calc(100vw - 32px); text-align: center;
}
html[data-theme="dark"] .toast { background: #e8eef4; color: #131d27; }

/* Login */
.view { min-height: 100vh; }
#view-login, #view-setup, #view-about { display: flex; align-items: center; justify-content: center; padding: 20px; }
#view-login, #view-about { flex-direction: column; }
.login-card, .setup-card {
  width: 100%; max-width: 430px; background: var(--surface); border-radius: 18px;
  padding: 28px 22px; box-shadow: var(--shadow); position: relative;
}
.theme-toggle { position: absolute; top: 14px; right: 14px; background: var(--surface-2); border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; }
.logo { background: #fdfdfd; border-radius: 16px; padding: 12px 16px 8px; display: inline-block; margin-bottom: 10px; }
.logo img { width: 150px; height: auto; display: block; }
.login-card h1 { font-size: 26px; line-height: 1.3; margin: 8px 0; }
.sub { color: var(--muted); margin: 0 0 18px; }
.setup-notice { background: #fff7e0; color: #7a5b00; border-radius: 10px; padding: 10px 12px; margin-top: 14px; font-size: 14px; }
html[data-theme="dark"] .setup-notice { background: #3a2f10; color: #ffd97a; }

/* Avatar picker */
.avatar-preview { display: flex; justify-content: center; margin: 10px 0; }
.avatar-placeholder { width: 120px; height: 120px; border-radius: 50%; border: 2px dashed var(--border); background: #e8f1ff; color: #5a6b7d; display: flex; align-items: center; justify-content: center; font-size: 56px; }
html[data-theme="dark"] .avatar-placeholder { background: #1b3355; }
.avatar-preview svg { width: 120px; height: 120px; }
.avatar-preview img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.avatar-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.avatar-opt {
  border: 2px solid var(--border); border-radius: 12px; background: var(--surface);
  padding: 8px 4px; font-size: 14px; color: var(--text);
}
.avatar-opt.selected { border-color: var(--blue); background: #e8f1ff; }
html[data-theme="dark"] .avatar-opt.selected { background: #1b3355; }
.avatar-opt .swatch { display: block; width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 4px; border: 1px solid var(--border); }
.avatar-opt.avatar-img { padding: 6px; }
.avatar-opt.avatar-img img { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; display: block; }
.step-label { font-weight: 700; margin-top: 12px; }
.step-nav { display: flex; justify-content: space-between; margin-top: 10px; }

/* App shell */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 14px;
}
.brand { font-weight: 800; font-size: 19px; color: var(--blue); cursor: pointer; display: flex; align-items: center; gap: 9px; }
.brand-mark { height: 32px; width: auto; border-radius: 8px; display: block; }
.brand span { color: var(--text); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { background: var(--surface-2); border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; position: relative; }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.avatar-btn { border: none; background: none; padding: 0; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.avatar-btn svg { width: 40px; height: 40px; display: block; }
main { max-width: 640px; margin: 0 auto; padding: 14px 14px 90px; }
.paused-banner, .escalation-banner {
  max-width: 640px; margin: 12px auto 0; padding: 10px 14px; border-radius: 10px; font-size: 14px;
}
.paused-banner { background: #fff7e0; color: #7a5b00; }
.escalation-banner { background: #fde8e8; color: #8f1d1d; }
html[data-theme="dark"] .paused-banner { background: #3a2f10; color: #ffd97a; }
html[data-theme="dark"] .escalation-banner { background: #4a1d1d; color: #ffb4b4; }

/* Feed */
.feed-tools { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.feed-tools input { flex: 1; min-width: 180px; }
.feed-tools .btn { white-space: nowrap; }
.post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); cursor: pointer;
}
.post-head { display: flex; gap: 10px; align-items: center; }
.post-head svg { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.post-meta { line-height: 1.3; }
.post-author { font-size: 13px; color: var(--muted); font-weight: 600; }
.post-time { font-size: 12px; color: var(--muted); }
.post-title { font-size: 19px; font-weight: 800; line-height: 1.35; margin: 10px 0 6px; }
.post-body { color: var(--text); font-size: 15px; margin: 0 0 10px; white-space: pre-wrap; word-break: break-word; }
.post-foot { display: flex; gap: 14px; font-size: 14px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.vote-btn { background: none; border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 14px; color: var(--text); }
.vote-btn.voted { background: var(--blue); color: #fff; border-color: var(--blue); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.badge-admin { background: var(--blue); color: #fff; }
.badge-best { background: var(--green); color: #fff; }
.badge-anon { background: var(--surface-2); color: var(--muted); }
.ext-link-note { font-size: 12px; color: #b26a00; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* Post detail + comments */
.post-detail { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.comments-title { font-size: 18px; margin: 18px 0 10px; }
.comment {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.comment.reply { margin-left: 28px; border-left: 3px solid var(--blue); }
.comment-body { white-space: pre-wrap; word-break: break-word; margin: 6px 0; }
.comment-actions { display: flex; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.comment-actions button { background: none; border: none; color: var(--muted); font-size: 13px; padding: 6px 4px; }
.comment-box { margin-top: 14px; }
.composer-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.composer-row .btn { flex: 1; }
.emoji-btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-size: 20px; width: 46px; height: 44px; }
.emoji-picker {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px; box-shadow: var(--shadow); max-width: 92vw; display: flex; flex-wrap: wrap; gap: 4px;
}
.emoji-picker button { background: none; border: none; font-size: 24px; padding: 4px; }

/* Profile */
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-align: center; margin-bottom: 16px; }
.profile-card svg { width: 96px; height: 96px; }
.profile-card h2 { margin: 8px 0 2px; }
.profile-card .joined { color: var(--muted); font-size: 13px; }

/* Admin */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }
.admin-controls { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.review-item, .audit-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; font-size: 14px;
}
.review-item .actions { display: flex; gap: 8px; margin-top: 8px; }

/* Bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding: 10px 4px calc(10px + env(safe-area-inset-bottom));
}
.nav-btn { flex: 1; background: none; border: none; font-size: 14px; color: var(--muted); padding: 10px 0; white-space: nowrap; }
.nav-btn.active { color: var(--blue); font-weight: 700; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.modal-card { background: var(--surface); border-radius: 16px; padding: 20px; width: 100%; max-width: 380px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

@media (min-width: 700px) {
  .post-title { font-size: 21px; }
}

/* Language switcher + About */
.lang-switch { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 4px; font-size: 14px; color: var(--muted); }
.lang-btns { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-btn { background: var(--surface); border: none; padding: 7px 16px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lang-btn.active { background: var(--blue); color: #fff; }
.setting-row { margin: 18px 0; }
.setting-label { font-weight: 600; margin-bottom: 8px; }
.seg-btns { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg-btn { flex: 1; background: var(--surface); border: none; padding: 9px 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg-btn.active { background: var(--blue); color: #fff; }
.feed-filter { margin: 10px 0; }
.feed-filter .seg-btn { font-size: 13px; padding: 9px 4px; }
.lang-toggle { font-size: 14px; width: auto; min-width: 40px; padding: 0 12px; border-radius: 999px; }
.link-btn { background: none; border: none; color: var(--blue); font-size: 14px; font-weight: 600; margin-top: 14px; text-decoration: underline; padding: 6px 10px; }
.about-wrap { width: 100%; max-width: 430px; }
#view-profile .about-card { max-width: 100%; }
.about-card { width: 100%; max-width: 430px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin: 16px 0; box-shadow: var(--shadow); }
.about-card h2 { margin: 0 0 8px; font-size: 19px; }
.about-card h3 { margin: 14px 0 6px; font-size: 15px; }
.about-card p { margin: 0 0 8px; font-size: 14.5px; }
.about-card ol, .about-card ul { margin: 0 0 8px; padding-left: 20px; font-size: 14.5px; }
.about-card li { margin-bottom: 4px; }

/* Type colours: question (blue), answer/comment (teal), reply (purple) — tinted dark greys */
:root {
  --q-bg: #eef4ff; --q-edge: #3b7cf5;
  --c-bg: #ebf8f3; --c-edge: #1fa874;
  --r-bg: #f3eefe; --r-edge: #8a5cf0;
}
html[data-theme="dark"] {
  --q-bg: #172334; --q-edge: #4c8dff;
  --c-bg: #15292a; --c-edge: #2fc392;
  --r-bg: #221d33; --r-edge: #a888ff;
}
.post-card, .post-detail { background: var(--q-bg); border-left: 4px solid var(--q-edge); }
.comment { background: var(--c-bg); border-left: 4px solid var(--c-edge); }
.comment.reply { background: var(--r-bg); border-left: 4px solid var(--r-edge); }

/* Bottom nav highlight (2026-11-22) */
.bottomnav {
  background: var(--surface-2); border-top: 2px solid var(--blue);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .18); gap: 8px; padding-left: 8px; padding-right: 8px;
}
html[data-theme="dark"] .bottomnav { background: #1c2836; box-shadow: 0 -4px 18px rgba(0, 0, 0, .5); }
.nav-btn {
  color: var(--text); font-weight: 600; border-radius: 12px; padding: 10px 0;
  background: var(--surface); border: 1px solid var(--border);
}
.nav-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 800; }
html[data-theme="dark"] .nav-btn:not(.active) { background: #263547; border-color: #34475c; color: #e8eef4; }

/* Brand feel (2026-11-22): logo colours blue #1d6efd, pink #d40e53, green #31c639 */
:root { --brand-grad: linear-gradient(90deg, #1d6efd 0%, #1d6efd 33%, #d40e53 33%, #d40e53 66%, #31c639 66%, #31c639 100%); }
.logo img { width: 190px; }
.login-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 18px 18px 0 0; background: var(--brand-grad); }
.topbar { border-bottom: none; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--brand-grad); }
.brand-chip { background: #fdfdfd; border-radius: 10px; padding: 4px 7px; display: inline-flex; box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.brand-mark { height: 34px; border-radius: 0; }
.brand .bx { color: #1d6efd; font-weight: 800; }
.brand .bw { color: #31c639; font-weight: 800; }
html[data-theme="dark"] .brand .bx { color: #4c8dff; }
html[data-theme="dark"] .brand .bw { color: #3fd94a; }
.bottomnav { border-top: none; }
.bottomnav::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand-grad); }
.nav-btn[data-nav="ask"].active { background: #d40e53; border-color: #d40e53; }
.nav-btn[data-nav="notif"].active { background: #24a82c; border-color: #24a82c; }
/* type colours re-tuned to brand: question blue, answer green, reply pink */
:root { --c-bg: #edf9ee; --c-edge: #31c639; --r-bg: #fdeef3; --r-edge: #d40e53; }
html[data-theme="dark"] { --c-bg: #172a1b; --c-edge: #3fd94a; --r-bg: #2c1922; --r-edge: #f0457f; }
.vote-btn.voted { background: #d40e53; border-color: #d40e53; }

/* Feed filter as separate chip buttons (2026-11-22) */
.seg-btns.feed-filter { border: none; border-radius: 0; overflow: visible; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.feed-filter .seg-btn {
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 700; padding: 10px 8px; box-shadow: var(--shadow);
}
html[data-theme="dark"] .feed-filter .seg-btn:not(.active) { background: #263547; border-color: #34475c; color: #e8eef4; }
.feed-filter .seg-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.feed-filter .seg-btn[data-filter="newest"].active { background: #24a82c; border-color: #24a82c; }
.feed-filter .seg-btn[data-filter="answered"].active { background: #d40e53; border-color: #d40e53; }
.feed-filter .seg-btn[data-filter="most"].active { background: #7a4ce0; border-color: #7a4ce0; }

/* Light animations (2026-11-22): transform/opacity only, CSS-only, no extra downloads */
@keyframes ew-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ew-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ew-pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.subview:not(.hidden), .view:not(.hidden) { animation: ew-fade .22s ease-out; }
.feed-list.anim-in .post-card { animation: ew-fade-up .32s ease-out both; }
.feed-list.anim-in .post-card:nth-child(2) { animation-delay: .04s; }
.feed-list.anim-in .post-card:nth-child(3) { animation-delay: .08s; }
.feed-list.anim-in .post-card:nth-child(4) { animation-delay: .12s; }
.feed-list.anim-in .post-card:nth-child(5) { animation-delay: .16s; }
.feed-list.anim-in .post-card:nth-child(n+6) { animation-delay: .2s; }
.post-detail, .comment { animation: ew-fade-up .28s ease-out both; }
.btn, .nav-btn, .seg-btn, .vote-btn, .icon-btn, .avatar-opt { transition: transform .12s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn:active, .nav-btn:active, .seg-btn:active, .vote-btn:active, .icon-btn:active, .avatar-opt:active, .post-card:active { transform: scale(.96); }
.post-card { transition: transform .12s ease; }
.vote-btn.pop { animation: ew-pop .35s ease-out; }
.toast { animation: ew-fade-up .25s ease-out; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* More breathing room between items (2026-11-22) */
.post-card { margin-bottom: 20px; padding: 16px; }
.comment { margin-bottom: 14px; }

/* Contact us card (2026-11-22) */
.contact-card { margin-top: 14px; }
.contact-btn { display: block; width: 100%; text-align: center; text-decoration: none; margin-top: 10px; font-weight: 700; word-break: break-all; }
.contact-email { background: var(--blue); color: #fff; }
.contact-wa { background: #25d366; color: #0b2b16; }

/* Account actions + vertical links (2026-11-22) */
.account-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.account-actions .btn { width: 100%; font-weight: 700; }
.btn-warn { background: #b26a00; color: #fff; }
.btn:disabled { opacity: .6; }
.link-col { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
.link-col .link-btn { margin-top: 4px; }

/* In-site confirm dialog (2026-11-22) */
.ew-modal-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(5,10,18,.6); display: flex; align-items: center; justify-content: center; padding: 20px; animation: ewFade .18s ease-out; }
.ew-modal { position: relative; width: 100%; max-width: 360px; background: var(--surface); color: var(--text); border-radius: 18px; padding: 24px 20px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.45); overflow: hidden; animation: ewPop .2s ease-out; }
.ew-modal::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand-grad); }
.ew-modal-msg { font-size: 16px; line-height: 1.55; margin-bottom: 20px; white-space: pre-line; }
.ew-modal-btns { display: flex; gap: 10px; }
.ew-modal-btns .btn { flex: 1; font-weight: 700; margin: 0; }
@keyframes ewFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ewPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ew-modal-wrap, .ew-modal { animation: none; } }

/* Round 5 a11y: focus rings + contrast (2026-11-22) */
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
html[data-theme="dark"] .ext-link-note { color: #f5b841; }
.btn-warn { background: #945600; }

/* Round 7: long titles wrap, feed previews and review items stay compact (2026-11-22) */
.post-title { overflow-wrap: anywhere; word-break: break-word; }
.post-card .post-body { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.review-item { overflow-wrap: anywhere; word-break: break-word; }
.review-item .post-body, .review-item .comment-body { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* Upvote button to the right edge of the post footer (2026-11-23, tester feedback) */
.post-foot .vote-btn { margin-left: auto; }

/* ===== New UI 2026-11-24: concept 20 "Luminous Study" + subtle glass (dark theme) ===== */
.brand-icon { width: 40px; height: 40px; display: block; border-radius: 11px; }
.post-foot .ans-count { display: inline-flex; align-items: center; gap: 4px; }
.vote-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
html[data-theme="dark"] {
  --bg: #0b101c; --surface: #161e30; --surface-2: #1e2840; --text: #eef2f8; --muted: #9aa6bc; --border: rgba(255,255,255,.09);
  --glass: linear-gradient(160deg, rgba(30,38,58,.86) 0%, rgba(22,29,46,.84) 100%);
  --glass-edge: inset 0 1px 0 rgba(255,255,255,.14);
  --q-bg: transparent; --c-bg: rgba(49,198,57,.07); --r-bg: rgba(212,14,83,.07);
}
html[data-theme="dark"] body {
  background: radial-gradient(120% 60% at 50% 0%, #141b2e 0%, #0b101c 65%) fixed, #0b101c;
  font-family: "Inter", system-ui, -apple-system, "Noto Sans Sinhala", "Segoe UI", sans-serif;
}
html[data-theme="dark"] body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(220px 220px at 0% 25%, rgba(29,110,253,.20), transparent 70%),
    radial-gradient(240px 240px at 100% 55%, rgba(212,14,83,.13), transparent 70%),
    radial-gradient(260px 260px at 30% 100%, rgba(49,198,57,.12), transparent 70%);
}
html[data-theme="dark"] #app { position: relative; z-index: 1; }
/* top bar */
html[data-theme="dark"] .topbar { background: rgba(11,16,28,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 12px 16px; }
html[data-theme="dark"] .topbar::after { height: 2px; opacity: .9; }
html[data-theme="dark"] .brand { font-size: 20px; letter-spacing: -.2px; }
html[data-theme="dark"] .brand .bx { color: #5b9bff; }
html[data-theme="dark"] .brand .bw { color: #5fe06a; }
html[data-theme="dark"] .icon-btn { background: var(--glass); border: 1px solid var(--border); box-shadow: var(--glass-edge); color: #fff; }
html[data-theme="dark"] .notif-dot { background: #ff3b7a; box-shadow: 0 0 8px #ff3b7a; }
html[data-theme="dark"] .avatar-btn { box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
/* search + chips */
html[data-theme="dark"] .feed-tools #btn-ask { display: none; }
html[data-theme="dark"] .feed-tools input {
  border-radius: 999px; height: 46px; padding: 0 18px; background: var(--glass); border: 1px solid var(--border);
  box-shadow: var(--glass-edge); color: var(--text);
}
html[data-theme="dark"] .feed-tools input::placeholder { color: #aeb8cb; }
html[data-theme="dark"] .seg-btns.feed-filter { display: flex; grid-template-columns: none; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
html[data-theme="dark"] .seg-btns.feed-filter::-webkit-scrollbar { display: none; }
html[data-theme="dark"] .feed-filter .seg-btn,
html[data-theme="dark"] .feed-filter .seg-btn:not(.active) {
  flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; font-size: 13.5px; font-weight: 600;
  background: var(--glass); border: 1px solid var(--border); color: #d8dfec; box-shadow: var(--glass-edge);
}
html[data-theme="dark"] .feed-filter .seg-btn.active,
html[data-theme="dark"] .feed-filter .seg-btn[data-filter].active {
  background: rgba(255,255,255,.93); color: #0b1222; border-color: rgba(255,255,255,.9);
  box-shadow: 0 0 10px rgba(255,255,255,.15), inset 0 1px 0 #fff;
}
/* cards */
html[data-theme="dark"] .post-card, html[data-theme="dark"] .post-detail {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--border); border-left: 1px solid var(--border);
  background: var(--glass); box-shadow: var(--glass-edge), 0 8px 22px rgba(0,0,0,.35);
}
html[data-theme="dark"] .post-card::before, html[data-theme="dark"] .post-detail::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: #1d6efd;
}
html[data-theme="dark"] .post-card:nth-child(3n+2)::before { background: #31c639; }
html[data-theme="dark"] .post-card:nth-child(3n)::before { background: #d40e53; }
html[data-theme="dark"] .post-title { font-size: 17px; font-weight: 700; letter-spacing: -.1px; }
html[data-theme="dark"] .post-body { color: #b6c0d2; font-size: 14.5px; }
html[data-theme="dark"] .post-author { color: var(--text); font-size: 14px; }
html[data-theme="dark"] .badge-admin { background: rgba(29,110,253,.22); color: #7fb1ff; border: 1px solid rgba(91,155,255,.4); }
html[data-theme="dark"] .badge-best { background: rgba(49,198,57,.18); color: #7dfa8a; border: 1px solid rgba(95,224,106,.45); }
html[data-theme="dark"] .badge-anon { background: rgba(255,255,255,.14); color: #dfe5f0; }
html[data-theme="dark"] .post-foot { color: #b9c3d6; }
html[data-theme="dark"] .vote-btn {
  border-radius: 999px; padding: 7px 14px; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
html[data-theme="dark"] .vote-btn.voted {
  background: linear-gradient(135deg, #1d6efd, #5b9bff); border-color: rgba(160,200,255,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 12px rgba(29,110,253,.45);
}
html[data-theme="dark"] .comment { border-radius: 16px; border: 1px solid var(--border); border-left: 3px solid var(--c-edge); }
html[data-theme="dark"] .comment.reply { border-left: 3px solid var(--r-edge); }
html[data-theme="dark"] .profile-card, html[data-theme="dark"] .about-card, html[data-theme="dark"] .stat,
html[data-theme="dark"] .review-item, html[data-theme="dark"] .audit-item, html[data-theme="dark"] .login-card,
html[data-theme="dark"] .setup-card, html[data-theme="dark"] .modal-card, html[data-theme="dark"] .ew-modal {
  background: var(--glass); border: 1px solid var(--border); box-shadow: var(--glass-edge), 0 8px 22px rgba(0,0,0,.35);
}
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
html[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, #1d6efd, #3d86ff); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
/* floating glass bottom nav */
html[data-theme="dark"] main { padding-bottom: 120px; }
html[data-theme="dark"] .bottomnav {
  left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto;
  border-radius: 999px; padding: 9px 10px; gap: 8px; align-items: center;
  background: linear-gradient(160deg, rgba(34,42,64,.72), rgba(22,29,46,.68));
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 26px rgba(0,0,0,.45);
}
html[data-theme="dark"] .bottomnav::before { display: none; }
html[data-theme="dark"] .nav-btn, html[data-theme="dark"] .nav-btn:not(.active) {
  background: transparent; border: 1px solid transparent; color: #aab4c6; border-radius: 999px; padding: 11px 0; font-weight: 600;
}
html[data-theme="dark"] .nav-btn.active { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
html[data-theme="dark"] .nav-btn[data-nav="ask"], html[data-theme="dark"] .nav-btn[data-nav="ask"].active {
  color: #fff; font-weight: 800; background: linear-gradient(135deg, #1d6efd 0%, #31c639 100%); border-color: rgba(255,255,255,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 16px rgba(49,198,57,.3), 0 6px 14px rgba(29,110,253,.35);
}
html[data-theme="dark"] .nav-btn[data-nav="notif"].active { background: rgba(49,198,57,.18); border-color: rgba(95,224,106,.4); }
html[data-theme="dark"] .toast { bottom: 100px; }
html[data-theme="dark"] .emoji-picker { bottom: 100px; }
/* cheap phones: no live blur, keep the look with solid glass colour */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-theme="dark"] .bottomnav { background: rgba(26,34,52,.97); }
  html[data-theme="dark"] .topbar { background: rgba(11,16,28,.97); }
}
@media (prefers-reduced-transparency: reduce) {
  html[data-theme="dark"] .bottomnav, html[data-theme="dark"] .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: #161e30; }
}

/* Modern line icons for bell + theme toggle (2026-11-24) */
.icon-btn, .theme-toggle { display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.icon-btn .ico, .theme-toggle .ico { width: 20px; height: 20px; display: block; }
.theme-toggle .ico { width: 19px; height: 19px; }
.icon-btn:active .ico, .theme-toggle:active .ico { transform: scale(.9); }
#theme-toggle-app .ico, .theme-toggle .ico { transition: transform .35s ease; }
html[data-theme="dark"] #theme-toggle-app .ico, html[data-theme="dark"] .theme-toggle .ico { color: #ffd66b; }
html[data-theme="dark"] .theme-toggle { background: var(--glass); border: 1px solid var(--border); box-shadow: var(--glass-edge); }
.notif-dot { top: 7px; right: 8px; width: 9px; height: 9px; border: 2px solid var(--surface-2); }
html[data-theme="dark"] .notif-dot { border-color: #1b2338; }

/* Comment side strip #4ddd55 (user, 2026-11-24) */
:root, html[data-theme="dark"] { --c-edge: #4ddd55; }
.comment:not(.reply), html[data-theme="dark"] .comment:not(.reply) { border-left: 3px solid #4ddd55; }

/* Green post-card side strip #4ddd55 (user, 2026-11-24) */
.post-card:nth-child(3n+2)::before, html[data-theme="dark"] .post-card:nth-child(3n+2)::before { background: #4ddd55 !important; }

/* Comment side strip changed to #1b91ff (user, 2026-11-24 00:47) */
:root, html[data-theme="dark"] { --c-edge: #1b91ff; }
.comment:not(.reply), html[data-theme="dark"] .comment:not(.reply) { border-left: 3px solid #1b91ff !important; }

/* Reply side strip #fff61b (user, 2026-11-24 00:48) */
:root, html[data-theme="dark"] { --r-edge: #fff61b; }
.comment.reply, html[data-theme="dark"] .comment.reply { border-left: 3px solid #fff61b !important; }

/* All question cards: pink -> green -> blue side strip like logo (user, 2026-11-24 00:54) */
.post-card::before, .post-card:nth-child(3n+2)::before, .post-card:nth-child(3n)::before, .post-detail::before,
html[data-theme="dark"] .post-card::before, html[data-theme="dark"] .post-card:nth-child(3n+2)::before,
html[data-theme="dark"] .post-card:nth-child(3n)::before, html[data-theme="dark"] .post-detail::before {
  background: linear-gradient(180deg, #d40e53 0%, #31c639 19%, #31c639 80%, #1d7efd 100%) !important;
}
html:not([data-theme="dark"]) .post-card, html:not([data-theme="dark"]) .post-detail { position: relative; border-left: 1px solid var(--border); }
html:not([data-theme="dark"]) .post-card::before, html:not([data-theme="dark"]) .post-detail::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 3px;
}

/* Upvote bubbles (2026-11-24) */
.ew-bubble {
  position: fixed; z-index: 9999; pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%) scale(.3); opacity: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.85) 0 18%, transparent 22%), var(--c);
  box-shadow: 0 0 6px var(--c); animation: ew-bubble .7s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes ew-bubble {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1); }
}

/* Top-bar line: green -> blue -> purple -> blue -> green (user, 2026-11-24 01:06); strips 2.5px */
.topbar::after, html[data-theme="dark"] .topbar::after {
  height: 2.5px; opacity: 1;
  background: linear-gradient(90deg, #31c639 0%, #1d7efd 20%, #1d7efd 32%, #4325c1 50%, #1d7efd 68%, #1d7efd 80%, #31c639 100%);
}
.post-card::before, .post-detail::before, html[data-theme="dark"] .post-card::before, html[data-theme="dark"] .post-detail::before { width: 2.5px !important; }

/* Top-bar line: grey liquid glass instead of colours (user, 2026-11-24 01:09) */
.topbar::after, html[data-theme="dark"] .topbar::after {
  height: 2.5px; opacity: 1; border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,.75) 50%, transparent 100%) -40% 0 / 40% 100% no-repeat,
    linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.12) 100%);
  box-shadow: 0 1px 0 rgba(0,0,0,.35), 0 0 6px rgba(255,255,255,.08);
  animation: ew-glass-sheen 6s ease-in-out infinite;
}
html:not([data-theme="dark"]) .topbar::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,.95) 50%, transparent 100%) -40% 0 / 40% 100% no-repeat,
    linear-gradient(180deg, rgba(120,130,150,.32) 0%, rgba(120,130,150,.16) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.8), 0 0 4px rgba(0,0,0,.05);
}
@keyframes ew-glass-sheen { 0%, 55% { background-position: -40% 0, 0 0; } 100% { background-position: 140% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .topbar::after { animation: none; } }
/* glass line x3 thicker (01:09) */
.topbar::after, html[data-theme="dark"] .topbar::after { height: 7.5px; border-radius: 4px; }
/* light theme glass line darker (01:12) */
html:not([data-theme="dark"]) .topbar::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,.7) 50%, transparent 100%) -40% 0 / 40% 100% no-repeat,
    linear-gradient(180deg, rgba(40,46,60,.55) 0%, rgba(25,30,42,.38) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.6), 0 1px 4px rgba(0,0,0,.12);
}

/* Question cards: subtle 3D liquid-glass bottom edge (user, 2026-11-24 01:15) */
.post-card { position: relative; }
.post-card::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 12px; pointer-events: none;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.045) 100%);
  box-shadow: inset 0 -1.5px 0 rgba(255,255,255,.16), inset 0 -4px 6px -4px rgba(255,255,255,.10);
}
html[data-theme="dark"] .post-card { box-shadow: var(--glass-edge, none), 0 6px 14px -8px rgba(0,0,0,.55), 0 2px 0 -1px rgba(255,255,255,.05); }
html:not([data-theme="dark"]) .post-card::after {
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.5) 100%);
  box-shadow: inset 0 -1.5px 0 rgba(255,255,255,.95), inset 0 -4px 6px -4px rgba(30,40,60,.10);
}
html:not([data-theme="dark"]) .post-card { box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 12px -8px rgba(30,40,60,.25); }
.post-card::after { left: 0; right: 0; height: 16px; border-radius: 0 0 inherit inherit; border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

/* Bigger bubbles thrown out of the upvote button + slow 30s glass sheen (01:28) */
.ew-bubble { animation: ew-bubble2 .95s cubic-bezier(.15,.75,.3,1) forwards; border: 1px solid rgba(255,255,255,.35); }
@keyframes ew-bubble2 {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(.6); }
  75% { opacity: .95; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15); }
}
.topbar::after, html[data-theme="dark"] .topbar::after { animation: ew-glass-sheen2 30s linear infinite alternate; }
@keyframes ew-glass-sheen2 { from { background-position: -40% 0, 0 0; } to { background-position: 140% 0, 0 0; } }

/* Profile avatar centred above the name (2026-11-24) */
.profile-card > img, .profile-card > svg { display:block; margin:0 auto 4px !important; }

/* In-site report reason picker (replaces native select, 2026-11-24) */
.reason-list { display:flex; flex-direction:column; gap:8px; margin:6px 0 14px; }
.reason-opt { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:48px; padding:12px 14px; border-radius:14px; border:1px solid var(--border); background:var(--surface-2, var(--surface)); color:var(--text); font:inherit; font-size:15px; text-align:left; cursor:pointer; transition:border-color .15s, background .15s; }
.reason-dot { flex:none; width:20px; height:20px; border-radius:50%; border:2px solid var(--muted); position:relative; }
.reason-opt.selected { border-color:#1d6efd; background:rgba(29,110,253,.12); }
.reason-opt.selected .reason-dot { border-color:#1d6efd; }
.reason-opt.selected .reason-dot::after { content:""; position:absolute; inset:3px; border-radius:50%; background:#1d6efd; }
.reason-opt:focus-visible { outline:2px solid #1d6efd; outline-offset:2px; }

/* Upvote button: ~20% bigger, rounded rectangle (not a circle), subtle 3D (2026-11-24 09:46) */
.post-foot .vote-btn, .vote-btn {
  font-size: 16.5px; padding: 8px 17px; border-radius: 13px; gap: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f8 100%); border: 1px solid rgba(20,30,50,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 0 rgba(20,30,50,.08), 0 2px 0 rgba(20,30,50,.10), 0 4px 10px rgba(20,30,50,.10);
}
.vote-btn.voted {
  background: linear-gradient(180deg, #ea2f6e 0%, #d40e53 60%, #b80a47 100%); border-color: #a8093f; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.18), 0 2px 0 #8d0736, 0 5px 12px rgba(212,14,83,.35);
}
html[data-theme="dark"] .post-foot .vote-btn, html[data-theme="dark"] .vote-btn {
  border-radius: 13px; padding: 8px 17px; font-size: 16.5px;
  background: linear-gradient(180deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.04) 100%); border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -2px 0 rgba(0,0,0,.25), 0 2px 0 rgba(0,0,0,.35), 0 5px 12px rgba(0,0,0,.3);
}
html[data-theme="dark"] .vote-btn.voted {
  background: linear-gradient(180deg, #5b9bff 0%, #1d6efd 60%, #1558d6 100%); border-color: rgba(160,200,255,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(0,0,0,.22), 0 2px 0 #0f45ad, 0 0 14px rgba(29,110,253,.45);
}
.vote-btn:active, html[data-theme="dark"] .vote-btn:active { transform: translateY(2px) scale(.98); }

/* Bubbles fly from the button toward screen centre: faint at start, full colour near the middle */
.ew-bubble { animation: ew-bubble3 1.25s cubic-bezier(.25,.6,.35,1) forwards; }
@keyframes ew-bubble3 {
  0%   { opacity: .12; transform: translate(-50%, -50%) scale(.35); filter: saturate(.3); }
  25%  { opacity: .3;  filter: saturate(.5); }
  60%  { opacity: .7;  filter: saturate(.85); }
  88%  { opacity: 1;   filter: saturate(1.25); transform: translate(calc(-50% + var(--dx)*.96), calc(-50% + var(--dy)*.96)) scale(1.1); }
  100% { opacity: 0;   filter: saturate(1.25); transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.35); }
}

/* Bubbles v4 (2026-11-24 09:52): slower, never stop — rise past the middle (full colour there) and fade out higher up */
.ew-bubble { animation: ew-bubble4 2.4s linear forwards; }
@keyframes ew-bubble4 {
  0%   { opacity: .12; filter: saturate(.3);  transform: translate(-50%, -50%) scale(.4); }
  30%  { opacity: .4;  filter: saturate(.6);  transform: translate(calc(-50% + var(--dx)*.3), calc(-50% + var(--dy)*.3)) scale(.75); }
  60%  { opacity: 1;   filter: saturate(1.25); transform: translate(calc(-50% + var(--dx)*.6), calc(-50% + var(--dy)*.6)) scale(1.05); }
  100% { opacity: 0;   filter: saturate(1.25); transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15); }
}
/* Bubbles v5 (09:56): ~50% faster, fanning out to both sides as they rise */
.ew-bubble { animation-duration: 1.6s; }
/* Bubbles v6 (09:59): fast from button to the middle (~0.5s), then same speed as before up to fade-out (~0.64s) */
.ew-bubble { animation: ew-bubble6 1.14s linear forwards; }
@keyframes ew-bubble6 {
  0%   { opacity: .12; filter: saturate(.3);  transform: translate(-50%, -50%) scale(.4); }
  22%  { opacity: .45; filter: saturate(.6);  transform: translate(calc(-50% + var(--dx)*.3), calc(-50% + var(--dy)*.3)) scale(.75); }
  44%  { opacity: 1;   filter: saturate(1.25); transform: translate(calc(-50% + var(--dx)*.6), calc(-50% + var(--dy)*.6)) scale(1.05); }
  100% { opacity: 0;   filter: saturate(1.25); transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15); }
}

/* Bubbles v7 (10:01): whole animation ~50% faster */
.ew-bubble { animation-duration: .76s; }

/* Install-as-app banner (2026-11-24) */
.install-banner { display:flex; align-items:center; gap:10px; padding:10px 12px; margin:0 0 12px; border-radius:16px; background:var(--surface); border:1px solid var(--border); box-shadow:0 4px 14px rgba(0,0,0,.12); }
.install-banner img { border-radius:10px; flex:none; }
.install-banner .ib-text { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.25; }
.install-banner .ib-text b { font-size:14.5px; color:var(--text); }
.install-banner .ib-text span { font-size:12.5px; color:var(--muted); }
.install-banner .ib-btn { padding:8px 14px; border-radius:12px; flex:none; }
.install-banner .ib-x { background:none; border:none; color:var(--muted); font-size:16px; padding:6px; cursor:pointer; flex:none; }
.install-banner.hidden { display:none; }
html[data-theme="dark"] .install-banner { background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border-color:rgba(255,255,255,.12); backdrop-filter:blur(12px); }
#btn-install { width:100%; }

/* ===== Desktop split view (2026-11-24): questions left, answers right ===== */
.split-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 60vh; color: var(--muted); border: 1px dashed var(--border); border-radius: 22px; padding: 30px; }
.split-empty b { color: var(--text); font-size: 20px; }
.split-empty .se-icon { font-size: 44px; opacity: .8; }
@media (min-width: 1100px) {
  body.split-on main { max-width: 1320px; display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); gap: 24px; align-items: start; padding-left: 24px; padding-right: 24px; }
  body.split-on #view-feed { grid-column: 1; grid-row: 1; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; padding: 2px 8px 110px 2px; scrollbar-width: thin; }
  body.split-on #view-post, body.split-on #split-empty { grid-column: 2; grid-row: 1; min-width: 0; }
  body.split-on #btn-back-feed { display: none; }
  body.split-on #view-feed .post-card { cursor: pointer; }
  body.split-on #view-feed .post-card.selected { outline: 2px solid var(--blue); outline-offset: 0; }
  html[data-theme="dark"] body.split-on #view-feed .post-card.selected { outline-color: rgba(120,170,255,.75); box-shadow: 0 0 0 4px rgba(29,110,253,.18); }
  body.split-on #view-post .post-detail { margin-top: 0; }
  html:not([data-theme="dark"]) .bottomnav { left: 14px; right: 14px; max-width: 520px; margin: 0 auto; bottom: 14px; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
}
/* Desktop: nav moves up into the top bar, so it never covers answers (2026-11-24) */
@media (min-width: 1100px) {
  .bottomnav, html[data-theme="dark"] .bottomnav, html:not([data-theme="dark"]) .bottomnav { top: 8px; bottom: auto !important; max-width: 420px; padding: 5px 8px; z-index: 30; box-shadow: none; }
  .bottomnav .nav-btn { padding-top: 7px; padding-bottom: 7px; }
  main, html[data-theme="dark"] main { padding-bottom: 40px; }
  body.split-on #view-feed { padding-bottom: 24px; }
  html:not([data-theme="dark"]) .bottomnav::before { display: none; }
}
