:root {
  --pc: #B4306E; --on-pc: #ffffff; --pc-cont: #FFD8E6; --on-pc-cont: #3E001D;
  --sec: #B4306E; --tert: #1E9E6A;
  --bg: #FFF7FA; --surf: #FFFFFF;
  --surf-1: #FBEEF3; --surf-2: #F6E4EC; --surf-3: #F1DBE5;
  --on-surf: #201A1C; --on-surf-var: #6B5B62;
  --outline: #E4CBD5; --error: #B3261E;
  --font: 'Roboto Flex', sans-serif; --display: 'Bricolage Grotesque', sans-serif;
  /* dynamic gradient accents (Android 16/17 Material You) */
  --grad-a: #B4306E; --grad-b: #7C4DFF; --grad-c: #1E9E6A;
  /* panel controls (overridden by glass mode) */
  --panel-blur: 0px; --panel-alpha: 1; --panel-border: transparent; --panel-sheen: transparent;
}
body[data-theme="dark"] {
  --pc: #FFB0CB; --on-pc: #5E1136; --pc-cont: #7C294E; --on-pc-cont: #FFD8E6;
  --bg: #191113; --surf: #201A1C;
  --surf-1: #271F22; --surf-2: #2C2327; --surf-3: #34292E;
  --on-surf: #ECE0E4; --on-surf-var: #C6A9B3;
  --outline: #4A3A40;
}

/* ---------- THEME MODE: iOS LIQUID GLASS ---------- */
body[data-mode="glass"] {
  --font: 'Roboto Flex', -apple-system, 'SF Pro Display', system-ui, sans-serif;
  --display: 'Roboto Flex', -apple-system, 'SF Pro Display', system-ui, sans-serif;
  --bg: #dfe6ee;
  --surf-1: rgba(255,255,255,0.55);
  --surf-2: rgba(255,255,255,0.42);
  --surf-3: rgba(255,255,255,0.35);
  --on-surf: #10141a; --on-surf-var: #4a5560;
  --outline: rgba(255,255,255,0.5);
  --panel-blur: 22px; --panel-border: rgba(255,255,255,0.6); --panel-sheen: rgba(255,255,255,0.25);
}
body[data-mode="glass"][data-theme="dark"] {
  --bg: #0c1016;
  --surf-1: rgba(40,48,60,0.5);
  --surf-2: rgba(40,48,60,0.4);
  --surf-3: rgba(50,58,72,0.4);
  --on-surf: #eef2f7; --on-surf-var: #a8b4c2;
  --outline: rgba(255,255,255,0.14);
  --panel-border: rgba(255,255,255,0.16); --panel-sheen: rgba(255,255,255,0.08);
}
/* animated background for glass depth */
body[data-mode="glass"] {
  background:
    radial-gradient(circle at 15% 20%, var(--grad-a)55, transparent 45%),
    radial-gradient(circle at 85% 15%, var(--grad-b)55, transparent 45%),
    radial-gradient(circle at 50% 90%, var(--grad-c)55, transparent 50%),
    var(--bg);
  background-attachment: fixed;
}
body[data-mode="glass"] .glass-panel {
  background: var(--surf-1);
  backdrop-filter: blur(var(--panel-blur)) saturate(1.7);
  -webkit-backdrop-filter: blur(var(--panel-blur)) saturate(1.7);
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 1px 0 var(--panel-sheen), 0 8px 30px rgba(0,0,0,.12);
}
/* Material mode: give subtle Android 16/17 gradient depth to bg */
body[data-mode="material"] {
  background:
    radial-gradient(circle at 12% -5%, var(--pc-cont)66, transparent 40%),
    var(--bg);
  background-attachment: fixed;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--on-surf);
  overscroll-behavior: none; transition: background .4s, color .3s;
}
a { color: var(--pc); }

.app-root { display: flex; flex-direction: column; height: 100vh; max-width: 620px; margin: 0 auto; position: relative; }
.yt-hidden { position: fixed; width: 0; height: 0; overflow: hidden; left: -9999px; }

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--surf-1); position: sticky; top: 0; z-index: 20;
  border-radius: 0 0 28px 28px;
}
.topbar-title-wrap { display: flex; align-items: center; gap: 6px; flex: 1; }
.topbar-title { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.6px; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border: none; background: transparent; color: var(--on-surf);
  border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .18s cubic-bezier(.34,1.56,.64,1);
}
.icon-btn:active { background: var(--surf-3); transform: scale(.85); }
.theme-btn { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #fff; }
.theme-btn:active { transform: scale(.85) rotate(45deg); }

.main-scroll { flex: 1; overflow-y: auto; padding: 12px 12px 160px; }

/* M3 buttons */
.m3-btn {
  position: relative; overflow: hidden; border: none; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: 14px;
  padding: 11px 22px; border-radius: 100px; display: inline-flex; align-items: center; gap: 8px;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s;
}
.m3-btn:active { transform: scale(.92); border-radius: 16px; }
.m3-filled { background: var(--pc); color: var(--on-pc); }
.m3-tonal { background: var(--pc-cont); color: var(--on-pc-cont); }
.m3-outlined { background: transparent; color: var(--pc); border: 1.5px solid var(--outline); }
.m3-text { background: transparent; color: var(--pc); padding: 10px 14px; }
.m3-disabled { opacity: .4; cursor: not-allowed; }
body[data-mode="glass"] .m3-filled { background: linear-gradient(135deg, var(--pc), var(--grad-b)); box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.ripple {
  position: absolute; width: 12px; height: 12px; background: rgba(255,255,255,.5);
  border-radius: 50%; transform: translate(-50%,-50%); animation: rip .6s ease-out; pointer-events: none;
}
.m3-tonal .ripple, .m3-text .ripple, .m3-outlined .ripple { background: rgba(180,48,110,.3); }
@keyframes rip { to { width: 220px; height: 220px; opacity: 0; } }

/* Avatars */
.avatar { width: 40px; height: 40px; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; display: grid; place-items: center; color: #fff; font-weight: 800; text-transform: uppercase; font-family: var(--display); flex-shrink: 0; overflow: hidden; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.big { width: 68px; height: 68px; font-size: 30px; }
.avatar.huge { width: 100px; height: 100px; font-size: 46px; margin: 0 auto; }
.avatar.clickable { border: none; cursor: pointer; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
body[data-mode="glass"] .avatar { border-radius: 32%; }

.author-link { cursor: pointer; transition: color .15s; }
.author-link:hover { color: var(--pc); text-decoration: underline; }

/* Profile page */
.profile-page { position: relative; }
.profile-back { align-self: flex-start; }
.profile-banner { height: 130px; width: 100%; border-radius: 28px; background: linear-gradient(135deg, var(--grad-a), var(--grad-b), var(--grad-c)); background-size: cover; background-position: center; margin-bottom: -54px; }
.profile-avatar { border: 4px solid var(--bg); position: relative; z-index: 2; }
.profile-name { display: inline-flex; align-items: center; gap: 8px; }
.profile-bio { color: var(--on-surf-var); font-size: 14px; max-width: 340px; text-align: center; line-height: 1.5; }
.profile-stats { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--on-surf-var); }
.profile-stats b { color: var(--on-surf); }
.profile-posts-label { align-self: stretch; margin-top: 16px; display: flex; align-items: center; gap: 6px; }
.page-title { display: inline-flex; align-items: center; gap: 8px; }

/* Edit profile / sub */
.edit-avatar-preview { display: flex; justify-content: center; margin: 8px 0 16px; }
.edit-avatar-img { width: 96px; height: 96px; border-radius: 28px; object-fit: cover; }
.edit-banner-img { width: 100%; height: 100px; border-radius: 16px; object-fit: cover; }
.field-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--on-surf-var); margin-top: 6px; }
.gen-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gen-row .m3-input { flex: 1; }
.code-input { font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.5; }

.auth-err { color: var(--error); font-size: 13px; text-align: center; margin-top: 10px; font-weight: 700; }

/* Admin FAB */
.admin-fab { position: fixed; left: max(16px, calc(50% - 310px + 16px)); bottom: 150px; z-index: 30; width: 56px; height: 56px; border-radius: 20px; border: none; background: var(--error); cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(179,38,30,.4); transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.admin-fab:active { transform: scale(.9) rotate(8deg); }

/* Music */
.music-view { display: flex; flex-direction: column; gap: 14px; animation: fadeUp .5s cubic-bezier(.2,.8,.2,1); }
.music-hero { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 28px; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #fff; }
.music-hero h2 { font-family: var(--display); font-size: 24px; }
.music-hero p { opacity: .9; font-size: 13px; }
.music-search .m3-input { flex: 1; }
.now-playing { display: flex; gap: 16px; padding: 16px; border-radius: 24px; background: var(--surf-1); }
.np-art { width: 100px; height: 100px; border-radius: 20px; object-fit: cover; }
.np-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.np-title { font-weight: 800; font-size: 18px; font-family: var(--display); }
.np-artist { color: var(--on-surf-var); font-size: 14px; }
.np-ctrls { display: flex; align-items: center; gap: 10px; margin-top: auto; }

.music-mini { position: fixed; left: 50%; transform: translateX(-50%); bottom: 92px; z-index: 40; width: min(600px, calc(100% - 24px)); background: var(--surf-3); border-radius: 22px; padding: 8px 10px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: snackIn .35s cubic-bezier(.34,1.56,.64,1); }
.music-mini-thumb { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; }
.music-mini-info { flex: 1; min-width: 0; }
.music-mini-title { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-mini-artist { font-size: 11px; color: var(--on-surf-var); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-ctrl { border: none; background: transparent; color: var(--on-surf); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .2s; }
.music-ctrl:active { transform: scale(.82); background: var(--surf-1); }
.music-ctrl.big { background: var(--pc); color: var(--on-pc); }
.music-list { display: flex; flex-direction: column; gap: 8px; }
.music-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 18px; cursor: pointer; transition: background .2s, transform .15s; background: var(--surf-1); }
.music-item:active { transform: scale(.98); }
.music-item-on { outline: 2px solid var(--pc); }
.music-thumb { width: 50px; height: 50px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.music-thumb.ph { display: grid; place-items: center; background: var(--surf-2); color: var(--on-surf-var); }
.music-item-info { flex: 1; min-width: 0; }
.music-item-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-item-artist { font-size: 12px; color: var(--on-surf-var); }

/* Feed */
.feed, .sub-view, .explore-view, .profile-view, .detail-page { display: flex; flex-direction: column; gap: 14px; animation: fadeUp .5s cubic-bezier(.2,.8,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
.welcome-card { background: linear-gradient(135deg, var(--grad-a), var(--grad-b), var(--grad-c)); color: #fff; padding: 24px; border-radius: 30px; }
.welcome-card h2 { font-family: var(--display); font-size: 28px; margin-bottom: 4px; font-weight: 800; }
.welcome-card p { opacity: .94; font-size: 14px; }

.post-card { background: var(--surf-1); border-radius: 28px; padding: 16px; cursor: pointer; transition: transform .2s cubic-bezier(.34,1.4,.64,1), background .2s; animation: fadeUp .5s cubic-bezier(.2,.8,.2,1); }
.post-card:active { transform: scale(.98); }
.post-card.static { cursor: default; }
.post-card.static:active { transform: none; }
.post-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--on-surf-var); flex-wrap: wrap; }
.post-sub { font-weight: 800; color: var(--on-surf); }
.post-dot { opacity: .5; }
.pin-chip { margin-left: auto; background: var(--tert); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 100px; }
.post-title { font-family: var(--display); font-size: 19px; font-weight: 800; margin: 10px 0 8px; line-height: 1.2; }
.post-title.big { font-size: 25px; }
.flair-chip { display: inline-block; background: var(--pc-cont); color: var(--on-pc-cont); font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 100px; }
.post-body { color: var(--on-surf-var); font-size: 14px; margin-top: 10px; line-height: 1.5; }
.post-body.full { color: var(--on-surf); }
.essay-teaser { margin-top: 12px; background: var(--surf-3); padding: 12px 14px; border-radius: 16px; font-size: 13px; color: var(--on-surf-var); }
.post-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }

/* Vote */
.vote-widget { display: flex; align-items: center; gap: 4px; background: var(--surf-3); border-radius: 100px; padding: 3px; }
.vote-btn { border: none; background: transparent; color: var(--on-surf-var); width: 34px; height: 30px; border-radius: 100px; cursor: pointer; display: grid; place-items: center; transition: transform .15s cubic-bezier(.34,1.56,.64,1), background .2s, color .2s; }
.vote-btn:active { transform: scale(1.3); }
.vote-up-on { background: var(--tert); color: #fff; }
.vote-down-on { background: var(--error); color: #fff; }
.vote-count { font-weight: 800; font-size: 14px; min-width: 22px; text-align: center; }
.action-chip { display: flex; align-items: center; gap: 6px; background: var(--surf-3); border-radius: 100px; padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--on-surf-var); }

/* Sub view */
.sub-name-row { display: flex; align-items: center; gap: 8px; }
.sub-hero { position: relative; border-radius: 30px; overflow: hidden; min-height: 180px; display: flex; }
.sub-hero-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.sub-hero-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 14px; padding: 18px 22px; }
.sub-hero-overlay .avatar.big { border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.sub-hero-overlay h1 { font-family: var(--display); font-size: 30px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); font-weight: 800; }
.sub-about-card { background: var(--surf-1); border-radius: 26px; padding: 18px 20px; }
.sub-about-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.sub-about-label { font-family: var(--display); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--on-surf-var); }
.sub-about-desc { font-size: 15px; line-height: 1.5; color: var(--on-surf); }
.sub-stats { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--on-surf-var); }
.sub-stats b { color: var(--on-surf); }
.sub-stats-dot { opacity: .5; }

.sort-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.sort-chip { flex-shrink: 0; border: 1.5px solid var(--outline); background: transparent; color: var(--on-surf-var); font-family: var(--font); font-weight: 700; font-size: 13px; padding: 8px 18px; border-radius: 100px; cursor: pointer; transition: transform .18s cubic-bezier(.34,1.56,.64,1), background .2s, color .2s, border-color .2s; }
.sort-chip:active { transform: scale(.9); }
.sort-on { background: var(--pc); color: var(--on-pc); border-color: var(--pc); }

.page-title { font-family: var(--display); font-size: 30px; margin-bottom: 6px; font-weight: 800; }
.sub-tile { display: flex; align-items: center; gap: 14px; background: var(--surf-1); border-radius: 24px; padding: 14px; cursor: pointer; transition: transform .2s cubic-bezier(.34,1.4,.64,1), background .2s; }
.sub-tile:active { transform: scale(.98); }
.sub-tile-name { font-weight: 800; display: flex; align-items: center; gap: 6px; }
.sub-tile-desc { font-size: 13px; color: var(--on-surf-var); margin-top: 2px; }
.banned-tag { background: var(--error); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 100px; }
.banned-tag.big { display: inline-block; margin: 8px auto; padding: 5px 14px; font-size: 12px; }

.profile-view { align-items: center; text-align: center; padding-top: 14px; gap: 12px; }
.admin-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--error); color: #fff; font-weight: 800; font-size: 12px; padding: 5px 14px; border-radius: 100px; }
.guest-note { color: var(--on-surf-var); font-size: 14px; max-width: 320px; }

.section-label { font-family: var(--display); font-size: 19px; margin: 8px 0; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.comment-box { display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; background: var(--surf-1); border-radius: 22px; padding: 12px; }
.comment-author { font-weight: 800; font-size: 13px; }
.comment-body { font-size: 14px; color: var(--on-surf-var); margin-top: 2px; }
.empty-mini { text-align: center; color: var(--on-surf-var); padding: 20px; }

.m3-input { width: 100%; font-family: var(--font); font-size: 15px; padding: 14px 16px; border: 1.5px solid var(--outline); border-radius: 16px; background: var(--surf); color: var(--on-surf); resize: vertical; }
body[data-mode="glass"] .m3-input { background: var(--surf-2); backdrop-filter: blur(8px); }
.m3-input:focus { outline: none; border-color: var(--pc); border-width: 2px; }

/* FAB */
.fab { position: fixed; right: max(16px, calc(50% - 310px + 16px)); bottom: 150px; z-index: 30; background: var(--pc-cont); color: var(--on-pc-cont); border: none; cursor: pointer; height: 60px; padding: 0 22px; border-radius: 24px; display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px rgba(180,48,110,.35); font-weight: 800; font-size: 15px; transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.fab:active { transform: scale(.9) rotate(-8deg); border-radius: 32px; }
.fab-label { color: var(--on-pc-cont); }
body[data-mode="glass"] .fab { background: linear-gradient(135deg, var(--pc), var(--grad-b)); color: #fff; }
body[data-mode="glass"] .fab-label { color: #fff; }

/* Bottom nav */
.bottom-nav { position: sticky; bottom: 0; display: flex; justify-content: space-around; background: var(--surf-2); padding: 10px 8px 14px; z-index: 20; border-radius: 28px 28px 0 0; }
.nav-item { border: none; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--on-surf-var); flex: 1; }
.nav-pill { width: 64px; height: 34px; display: grid; place-items: center; border-radius: 100px; transition: background .3s cubic-bezier(.34,1.4,.64,1), transform .2s; }
.nav-item:active .nav-pill { transform: scale(.85); }
.nav-label { font-size: 11px; font-weight: 700; }
.nav-on { color: var(--pc); }
.nav-on .nav-pill { background: var(--pc-cont); color: var(--on-pc-cont); }

/* Dialogs */
.dialog-scrim, .sheet-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.dialog { background: var(--surf-1); border-radius: 30px; padding: 24px; width: 100%; max-width: 400px; animation: pop .4s cubic-bezier(.34,1.56,.64,1); max-height: 90vh; overflow-y: auto; }
.dialog.wide { max-width: 480px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.dialog-icon { width: 56px; height: 56px; background: var(--pc-cont); border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; display: grid; place-items: center; margin: 0 auto 16px; color: var(--on-pc-cont); }
.dialog-icon svg { fill: var(--on-pc-cont); }
.dialog-title { font-family: var(--display); font-size: 23px; text-align: center; margin-bottom: 8px; font-weight: 800; }
.dialog-text { color: var(--on-surf-var); font-size: 14px; text-align: center; margin-bottom: 16px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.form-col { display: flex; flex-direction: column; gap: 12px; }
.tabs { display: flex; background: var(--surf-3); border-radius: 100px; padding: 4px; margin-bottom: 16px; }
.tab { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 100px; font-family: var(--font); font-weight: 700; cursor: pointer; color: var(--on-surf-var); transition: all .2s; }
.tab-on { background: var(--pc); color: var(--on-pc); }
.color-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.color-dot { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; transition: transform .2s; }
.color-dot:active { transform: scale(.85); }
.color-on { border-color: var(--on-surf); transform: scale(1.15); }

.sheet-scrim { align-items: flex-end; padding: 0; }
.sheet { background: var(--surf-1); width: 100%; max-width: 620px; border-radius: 30px 30px 0 0; padding: 12px 20px 32px; max-height: 88vh; overflow-y: auto; animation: slideUp .4s cubic-bezier(.2,.8,.2,1); }
@keyframes slideUp { from { transform: translateY(100%); } }
.sheet-handle { width: 40px; height: 4px; background: var(--outline); border-radius: 4px; margin: 4px auto 18px; }
.admin-head { display: flex; align-items: center; gap: 10px; }
.admin-head h2 { font-family: var(--display); font-size: 22px; font-weight: 800; }
.admin-sub { color: var(--on-surf-var); font-size: 13px; margin: 4px 0 18px; }
.admin-block { background: var(--surf); border-radius: 22px; padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
body[data-mode="glass"] .admin-block { background: var(--surf-2); }
.admin-block h4 { font-size: 15px; }

/* Banned page */
.banned-page { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 20px; gap: 12px; animation: fadeUp .5s; }
.banned-icon { width: 120px; height: 120px; background: var(--surf-2); border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; display: grid; place-items: center; margin-bottom: 8px; }
.banned-page h1 { font-family: var(--display); font-size: 44px; color: var(--error); font-weight: 800; }
.banned-msg { font-size: 17px; color: var(--on-surf); max-width: 340px; line-height: 1.5; }
.banned-sub { font-weight: 800; color: var(--on-surf-var); margin-bottom: 12px; }

/* Essay */
.essay-page { max-width: 640px; margin: 0 auto; padding: 20px 22px 80px; min-height: 100vh; position: relative; animation: fadeUp .5s; border-radius: 0; }
.essay-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.essay-flair { background: var(--tert); color: #fff; font-size: 11px; font-weight: 800; padding: 5px 14px; border-radius: 100px; }
.essay-title { font-family: var(--display); font-size: clamp(28px, 6vw, 42px); line-height: 1.08; margin-bottom: 16px; letter-spacing: -1px; font-weight: 800; }
.essay-byline { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; color: var(--on-surf-var); font-size: 14px; }
.essay-body { font-size: 17px; line-height: 1.75; }
.essay-p { margin-bottom: 20px; }
.essay-word { cursor: pointer; border-radius: 3px; transition: background .15s; padding: 0 1px; }
.essay-word:hover { background: var(--pc-cont); }
.essay-word.defined { text-decoration: underline; text-decoration-color: var(--tert); text-decoration-thickness: 3px; text-underline-offset: 3px; background: rgba(30,158,106,.12); }
.def-pop { position: fixed; z-index: 100; background: var(--surf); border: 1.5px solid var(--tert); border-radius: 18px; padding: 14px 16px; max-width: 280px; box-shadow: 0 8px 28px rgba(0,0,0,.25); animation: pop .25s cubic-bezier(.34,1.56,.64,1); }
.def-word { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--tert); margin-bottom: 4px; text-transform: capitalize; }
.def-text { font-size: 14px; line-height: 1.5; color: var(--on-surf); }

/* Snackbar */
.snackbar { position: fixed; bottom: 220px; left: 50%; transform: translateX(-50%); background: var(--on-surf); color: var(--surf); padding: 14px 22px; border-radius: 18px; font-size: 14px; font-weight: 600; z-index: 200; max-width: 90%; text-align: center; animation: snackIn .35s cubic-bezier(.34,1.56,.64,1); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
@keyframes snackIn { from { transform: translate(-50%, 30px); opacity: 0; } }

.foot { text-align: center; padding: 24px 0 8px; font-size: 13px; color: var(--on-surf-var); }
.foot a { font-weight: 700; }