/* =====================================================================
   ZEMPAX — UI Stylesheet
   Mobile-first • app-like on phones • elegant 3-column on desktop
   ===================================================================== */
:root {
  --violet: #6C5CE7;
  --violet-2: #8B7CF6;
  --pink: #FF4D8D;
  --orange: #FF9F43;
  --teal: #00C9A7;
  --blue: #2E9BFF;
  --amber: #FFB020;
  --red: #FF4757;
  --green: #20BF6B;

  --grad: linear-gradient(135deg, #6C5CE7 0%, #A55EEA 38%, #FF4D8D 72%, #FF9F43 100%);
  --grad-soft: linear-gradient(135deg, rgba(108,92,231,.14), rgba(255,77,141,.12) 60%, rgba(255,159,67,.12));
  --grad-cool: linear-gradient(135deg, #2E9BFF, #00C9A7);

  --bg: #F5F4FB;
  --bg-2: #EEEDF7;
  --surface: #FFFFFF;
  --surface-2: #F8F7FD;
  --glass: rgba(255,255,255,.78);
  --text: #17142E;
  --text-2: #4A4666;
  --muted: #7C7899;
  --border: #E7E5F2;
  --border-2: #D9D6EA;
  --hover: rgba(108,92,231,.06);
  --shadow-sm: 0 1px 2px rgba(23,20,46,.06);
  --shadow: 0 6px 24px -8px rgba(23,20,46,.14);
  --shadow-lg: 0 24px 60px -16px rgba(44,30,110,.30);
  --ring: 0 0 0 4px rgba(108,92,231,.18);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --nav-h: 64px;
  --top-h: 56px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0D0A1C;
  --bg-2: #120E26;
  --surface: #161230;
  --surface-2: #1C1739;
  --glass: rgba(22,18,48,.80);
  --text: #F2F0FF;
  --text-2: #C9C4E8;
  --muted: #8E88B4;
  --border: #272148;
  --border-2: #342D5C;
  --hover: rgba(139,124,246,.09);
  --shadow: 0 8px 28px -10px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 70px -18px rgba(0,0,0,.75);
  --ring: 0 0 0 4px rgba(139,124,246,.25);
  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: 15px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100vh; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: -20vh -20vw auto auto; width: 70vw; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(108,92,231,.13), transparent 70%), radial-gradient(closest-side at 30% 70%, rgba(255,77,141,.10), transparent 70%);
  filter: blur(10px);
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 18px; height: 18px; }
.ic.xs { width: 15px; height: 15px; }
.ic.lg { width: 28px; height: 28px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 8px 20px -6px rgba(165,94,234,.6);
  transition: transform .4s var(--ease);
}
.brand-mark .ic { width: 22px; height: 22px; stroke-width: 2.8; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-name { font-size: 22px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), background .2s, opacity .2s; white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { color: #fff; background: var(--grad); background-size: 160% 160%; box-shadow: 0 10px 24px -10px rgba(165,94,234,.75); }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 14px 30px -10px rgba(255,77,141,.7); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { opacity: .88; }
.btn-ghost { border: 1.5px solid var(--border-2); background: var(--surface); }
.btn-ghost:hover { background: var(--hover); border-color: var(--violet-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-soft { background: var(--hover); color: var(--violet); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--text-2);
  transition: background .2s, color .2s, transform .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--violet); }
.icon-btn:active { transform: scale(.92); }

/* Follow button states */
.btn-follow.on { background: transparent; color: var(--text); border: 1.5px solid var(--border-2); box-shadow: none; }
.btn-follow.on .t-on { display: inline; } .btn-follow.on .t-off { display: none; }
.btn-follow .t-on { display: none; }
.btn-follow.on:hover { color: var(--red); border-color: rgba(255,71,87,.5); background: rgba(255,71,87,.06); }
.btn-follow.on:hover .t-on { display: none; } .btn-follow.on:hover .t-hover { display: inline; }
.btn-follow .t-hover { display: none; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin: 0 0 6px 4px; }
.input, .textarea, .select {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--surface-2); transition: border-color .2s, box-shadow .2s, background .2s; outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--violet); box-shadow: var(--ring); background: var(--surface); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-wrap .icon-btn { position: absolute; right: 5px; top: 5px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); margin-top: 2px; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-img { height: 50px; border-radius: 14px; border: 1.5px solid var(--border); background: #fff; flex: none; width: 160px; object-fit: cover; }
.captcha-row .icon-btn { height: 50px; width: 46px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--border); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 46px; height: 26px; border-radius: 99px; background: var(--border-2); position: relative; transition: background .25s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.switch input:checked { background: var(--violet); }
.switch input:checked::after { transform: translateX(20px); }

/* ---------- Alerts / toasts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 14px; border: 1px solid; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-error { background: rgba(255,71,87,.08); border-color: rgba(255,71,87,.25); color: #D63041; }
.alert-success { background: rgba(32,191,107,.08); border-color: rgba(32,191,107,.25); color: #169653; }
.alert-info { background: rgba(46,155,255,.08); border-color: rgba(46,155,255,.25); color: #1C7ED6; }
:root[data-theme="dark"] .alert-error { color: #FF8A95; }
:root[data-theme="dark"] .alert-success { color: #5BE39A; }
:root[data-theme="dark"] .alert-info { color: #7CC0FF; }
.toasts { position: fixed; z-index: 200; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toastIn .35s var(--ease);
}
.toast.err { background: var(--red); color: #fff; }
.toast.ok .ic { color: var(--teal); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }

/* =====================================================================
   APP SHELL
   ===================================================================== */
.shell { max-width: 1280px; margin: 0 auto; display: flex; justify-content: center; }
.main { width: 100%; max-width: 640px; min-height: 100vh; background: var(--surface); border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding-bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); }
.sidebar, .aside { display: none; }

/* Top bar (mobile) */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 12px; padding-top: env(safe-area-inset-top); background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border); transition: transform .3s var(--ease);
}
.topbar.hide { transform: translateY(-100%); }
.topbar .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
.topbar .brand-mark .ic { width: 18px; height: 18px; }
.topbar-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }

/* Page header (sticky title) */
.page-head {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 16px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--border);
}
.page-head h1 { font-size: 19px; margin: 0; font-weight: 800; line-height: 1.2; }
.page-head small { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.topbar + .page-head, .topbar ~ * .page-head { top: var(--top-h); }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); position: sticky; top: var(--top-h); z-index: 29; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1; min-width: max-content; text-align: center; padding: 15px 16px; font-weight: 600; color: var(--muted); position: relative; transition: background .2s, color .2s; }
.tabs a:hover { background: var(--hover); color: var(--text); }
.tabs a.on { color: var(--text); font-weight: 800; }
.tabs a.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; max-width: 70%; height: 4px; border-radius: 4px; transform: translateX(-50%); background: var(--grad); animation: grow .35s var(--ease); }
@keyframes grow { from { width: 0; } }

/* Bottom nav (mobile app style) */
.bottomnav {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: space-around; align-items: center; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.bottomnav a { position: relative; display: grid; place-items: center; gap: 2px; width: 64px; height: 52px; border-radius: 16px; color: var(--muted); font-size: 10.5px; font-weight: 700; transition: color .2s; }
.bottomnav a .ic { width: 25px; height: 25px; transition: transform .25s var(--ease); }
.bottomnav a.on { color: var(--violet); }
.bottomnav a.on .ic { transform: translateY(-1px) scale(1.08); stroke-width: 2.4; }
.bottomnav a.on::before { content: ""; position: absolute; top: -7px; width: 22px; height: 4px; border-radius: 0 0 6px 6px; background: var(--grad); }
.badge {
  position: absolute; top: 2px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  background: var(--pink); color: #fff; box-shadow: 0 0 0 2px var(--surface); animation: pop .4s var(--ease);
}
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } }

.fab {
  position: fixed; z-index: 45; right: 18px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 20px;
  display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 16px 30px -10px rgba(165,94,234,.8); transition: transform .25s var(--ease), border-radius .3s;
}
.fab:hover { transform: rotate(-6deg) scale(1.05); border-radius: 50%; }
.fab .ic { width: 26px; height: 26px; }

/* Drawer (mobile) */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(13,10,28,.45); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer { position: fixed; z-index: 91; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); background: var(--surface); transform: translateX(-102%); transition: transform .35s var(--ease); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); padding: 20px 14px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; }
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-user { padding: 4px 8px 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.drawer-user .avatar { width: 52px; height: 52px; margin-bottom: 10px; }
.drawer-user b { font-size: 17px; display: flex; align-items: center; gap: 4px; }
.drawer-user .stats { display: flex; gap: 16px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.drawer-user .stats b { display: inline; color: var(--text); font-size: 14px; }

/* Nav list (sidebar + drawer) */
.nav { display: grid; gap: 2px; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 16px; font-size: 17px; font-weight: 600; color: var(--text-2);
  transition: background .2s, color .2s, transform .15s; position: relative; width: 100%; text-align: left;
}
.nav a:hover, .nav button:hover { background: var(--hover); color: var(--text); }
.nav a.on { color: var(--text); font-weight: 800; }
.nav a.on .ic { stroke-width: 2.5; color: var(--violet); }
.nav .badge { position: static; margin-left: auto; box-shadow: none; }
.nav .nav-ico { position: relative; display: inline-flex; }
.nav .dot { position: absolute; top: -2px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--surface); }
.nav .sep { height: 1px; background: var(--border); margin: 8px 6px; }

/* Avatars */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-2); }
.avatar.sm { width: 36px; height: 36px; }
.avatar.xs { width: 26px; height: 26px; }
.avatar.lg { width: 56px; height: 56px; }
.ring-grad { padding: 2px; border-radius: 50%; background: var(--grad); display: inline-flex; flex: none; }
.ring-grad .avatar { border: 2px solid var(--surface); }

/* Verified badges */
.vb { display: inline-flex; color: var(--blue); }
.vb .ic { width: 17px; height: 17px; }
.vb.gold { color: var(--amber); }
.pro-badge { display: inline-flex; align-items: center; margin-left: 4px; padding: 1px 6px 1px; border-radius: 6px; font-size: 9.5px; font-weight: 900; letter-spacing: .08em; line-height: 1.5; color: #fff; background: linear-gradient(135deg, #1E1B3A, #3B2F7A 45%, #8E44AD); box-shadow: inset 0 0 0 1px rgba(255,215,130,.55), 0 2px 6px -2px rgba(142,68,173,.6); position: relative; overflow: hidden; vertical-align: middle; flex: none; }
.pro-badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,230,170,.55) 50%, transparent 70%); transform: translateX(-120%); animation: proShine 4.5s ease-in-out infinite; }
@keyframes proShine { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .pro-badge::after { animation: none; } }
.prod-locked { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(13,10,28,.75); color: #fff; font-size: 11.5px; font-weight: 700; z-index: 2; }

/* =====================================================================
   COMPOSE
   ===================================================================== */
.compose { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.compose-body { flex: 1; min-width: 0; }
.compose textarea {
  width: 100%; border: 0; outline: none; resize: none; background: transparent; font-size: 19px; line-height: 1.45; padding: 8px 0; min-height: 56px; max-height: 50vh;
}
.compose textarea::placeholder { color: var(--muted); }
.compose-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 6px; }
.compose-tools .left { display: flex; gap: 2px; color: var(--violet); }
.compose-tools .left .icon-btn { color: var(--violet); width: 36px; height: 36px; }
.compose-tools .right { display: flex; align-items: center; gap: 12px; }
.counter { position: relative; width: 28px; height: 28px; }
.counter svg { width: 28px; height: 28px; transform: rotate(-90deg); }
.counter circle { fill: none; stroke-width: 3; }
.counter .bg { stroke: var(--border); }
.counter .fg { stroke: var(--violet); stroke-linecap: round; transition: stroke-dashoffset .2s, stroke .2s; }
.counter.warn .fg { stroke: var(--amber); }
.counter.over .fg { stroke: var(--red); }
.counter span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: var(--muted); }
.counter.over span { color: var(--red); }
.media-preview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; }
.media-preview:empty { display: none; }
.media-preview .mp { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16/10; background: var(--bg-2); animation: fadeUp .3s var(--ease); }
.media-preview .mp:only-child { grid-column: span 2; aspect-ratio: auto; max-height: 360px; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-preview .rm { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; background: rgba(13,10,28,.7); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.media-preview .rm .ic { width: 16px; height: 16px; }
.reply-ctx { font-size: 14px; color: var(--muted); padding: 2px 0 0; }
.reply-ctx a { color: var(--violet); }

/* =====================================================================
   POST CARD
   ===================================================================== */
.post { position: relative; display: flex; gap: 12px; padding: 14px 16px 6px; border-bottom: 1px solid var(--border); transition: background .2s; cursor: pointer; animation: fadeUp .4s var(--ease) backwards; }
.post:hover { background: var(--surface-2); }
.post.focus { cursor: default; flex-direction: column; }
.post.focus:hover { background: transparent; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.post-side { display: flex; flex-direction: column; align-items: center; }
.post-side .thread-line { flex: 1; width: 2px; background: var(--border-2); margin-top: 4px; border-radius: 2px; }
.post-main { flex: 1; min-width: 0; }
.post-ctx { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 700; margin: -4px 0 4px 32px; }
.post-ctx .ic { width: 15px; height: 15px; }
.post-ctx.rp .ic { color: var(--teal); }
.post-ctx.pin .ic { color: var(--violet); }
.post-ctx.gp { color: var(--violet); }
.post-ctx.gp .ic { color: var(--pink); }
.gpins { position: relative; border-bottom: 6px solid var(--bg-2); }
.post.gpin { background: linear-gradient(90deg, rgba(108,92,231,.07), rgba(255,77,141,.04) 55%, transparent); box-shadow: inset 3px 0 0 var(--violet); }
:root[data-theme="dark"] .post.gpin { background: linear-gradient(90deg, rgba(139,124,246,.12), rgba(255,77,141,.06) 55%, transparent); }
.post-head { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 15px; }
.post-head .name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-head .name:hover { text-decoration: underline; }
.post-head .handle, .post-head .time, .post-head .dotsep { color: var(--muted); white-space: nowrap; }
.post-head .handle { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.post-head .time:hover { text-decoration: underline; }
.post-head .menu-wrap { margin-left: auto; }
.post-head .icon-btn { width: 32px; height: 32px; margin: -4px -6px -4px 0; }
.replying { font-size: 14px; color: var(--muted); }
.replying a { color: var(--violet); }
.post-text { font-size: 15.5px; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; white-space: normal; margin: 2px 0 0; }
.post.focus .post-text { font-size: 19px; margin-top: 12px; }
.lnk { color: var(--violet); font-weight: 600; }
.lnk:hover { text-decoration: underline; }
:root[data-theme="dark"] .lnk { color: var(--violet-2); }

/* media grid */
.media { margin-top: 10px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); display: grid; gap: 2px; background: var(--border); }
.media.n1 { grid-template-columns: 1fr; }
.media.n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 16/9; }
.media.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16/9; }
.media.n3 .m:first-child { grid-row: span 2; }
.media.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16/9; }
.media .m { position: relative; overflow: hidden; background: var(--bg-2); min-height: 0; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); cursor: zoom-in; }
.media.n1 img { max-height: 520px; height: auto; }
.media .m:hover img { transform: scale(1.03); }
.media video { width: 100%; max-height: 520px; background: #000; }
.media .wm-overlay { position: absolute; z-index: 2; pointer-events: none; user-select: none; color: rgba(255,255,255,.82); font-weight: 800; font-size: clamp(10px, 2.4vw, 14px); letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.65), 0 0 6px rgba(0,0,0,.35); white-space: nowrap; }
.wm-overlay.wm-br { right: 12px; bottom: 54px; } .wm-overlay.wm-bl { left: 12px; bottom: 54px; }
.wm-overlay.wm-tr { right: 12px; top: 12px; } .wm-overlay.wm-tl { left: 12px; top: 12px; }
.wm-overlay.wm-c { left: 50%; top: 50%; transform: translate(-50%, -50%); }

/* pilihan bahasa */
.lang-list { display: flex; flex-direction: column; gap: 4px; }
.lang-list.inline { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; }
.lang-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: border-color .2s, background .2s; }
.lang-opt:hover { background: var(--hover); }
.lang-opt span { display: flex; flex-direction: column; min-width: 0; }
.lang-opt b { font-size: 15px; } .lang-opt small { color: var(--muted); font-size: 12.5px; }
.lang-opt.on { border-color: var(--violet); background: var(--grad-soft); }
.lang-opt.on .ic { color: var(--violet); }
.lang-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.lang-link:hover { color: var(--violet); }
.auth-lang { text-align: center; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
[dir="rtl"] .post-text, [dir="rtl"] .prose { text-align: right; }

/* terjemahan post */
.tr-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--violet); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.tr-link:hover { text-decoration: underline; }
.post-tr { animation: fadeUp .25s var(--ease); }
.post-tr .tr-label { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }

/* lokasi / peta */
.map-card { display: block; margin-top: 10px; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); transition: border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease); }
.map-card:hover { border-color: var(--border-2); box-shadow: 0 10px 26px -14px rgba(108,92,231,.45); }
.map-img { position: relative; display: block; aspect-ratio: 2 / 1; background: var(--bg-2); overflow: hidden; }
.map-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.map-card:hover .map-img img { transform: scale(1.04); }
.map-img.ph { background: linear-gradient(135deg, #E9E4FF, #FFE3EE 55%, #FFF0DC); }
:root[data-theme="dark"] .map-img.ph { background: linear-gradient(135deg, #262046, #3A1F35 55%, #3A2C1E); }
.map-ph-grid { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(var(--border-2) 1px, transparent 1px), linear-gradient(90deg, var(--border-2) 1px, transparent 1px); background-size: 28px 28px; }
.map-ph-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -60%); width: 52px; height: 52px; border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--grad); display: grid; place-items: center; box-shadow: 0 10px 22px -8px rgba(255,77,141,.7); }
.map-ph-pin .ic { rotate: 45deg; color: #fff; width: 22px; height: 22px; }
.map-body { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.map-ic { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #FF4D8D, #FF9F43); }
.map-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.map-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-txt small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-go { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 800; color: var(--violet); padding: 6px 10px; border-radius: 999px; background: var(--grad-soft); }
@media (max-width: 520px) { .map-go-t { display: none; } .map-go { padding: 8px; } .map-body { padding: 10px 12px; } }
.loc-line { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--violet); max-width: 100%; }
.loc-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.loc-line:hover span { text-decoration: underline; }
.loc-chip { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 5px 6px 5px 10px; border-radius: 999px; background: var(--grad-soft); border: 1px solid var(--border); color: var(--violet); font-size: 13px; font-weight: 700; max-width: 100%; animation: fadeUp .25s var(--ease); }
.loc-chip[hidden] { display: none; }
.loc-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-chip button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.loc-chip button:hover { background: var(--surface); color: var(--red); }
.loc-search { display: flex; gap: 8px; }
.loc-search .input { flex: 1; min-width: 0; }
.loc-me { margin-top: 10px; }
.loc-hint { font-size: 12.5px; margin: 10px 0 6px; }
.loc-results { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.loc-item { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; background: none; color: var(--text); font: inherit; cursor: pointer; transition: background .2s, border-color .2s; }
.loc-item:hover { background: var(--hover); border-color: var(--border); }
.loc-item .ic { color: var(--pink); flex: none; }
.loc-item span { min-width: 0; display: flex; flex-direction: column; }
.loc-item b { font-size: 14.5px; } .loc-item small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* quote embed */
.quote { margin-top: 10px; border: 1px solid var(--border-2); border-radius: 16px; padding: 10px 12px; transition: background .2s; display: block; }
.quote:hover { background: var(--hover); }
.quote .post-head { font-size: 14px; }
.quote .post-text { font-size: 14.5px; }
.quote .media { margin-top: 8px; border-radius: 12px; }
.quote .media.n1 img { max-height: 260px; }
.quote.gone { color: var(--muted); font-size: 14px; background: var(--surface-2); }

/* action bar */
.actions { display: flex; justify-content: space-between; max-width: 460px; margin: 6px -8px 0; }
.act { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; font-weight: 600; position: relative; }
.act .bubble { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: background .2s, color .2s, transform .15s; }
.act .ic { width: 19px; height: 19px; }
.act:active .bubble { transform: scale(.85); }
.act.reply:hover { color: var(--blue); } .act.reply:hover .bubble { background: rgba(46,155,255,.12); }
.act.repost:hover, .act.repost.on { color: var(--teal); } .act.repost:hover .bubble { background: rgba(0,201,167,.12); }
.act.like:hover, .act.like.on { color: var(--pink); } .act.like:hover .bubble { background: rgba(255,77,141,.12); }
.act.like.on .ic { fill: var(--pink); }
.act.like.pop .bubble { animation: heart .55s var(--ease); }
@keyframes heart { 0% { transform: scale(1); } 25% { transform: scale(.7); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.act.views:hover { color: var(--violet); } .act.views:hover .bubble { background: rgba(108,92,231,.12); }
.act.bm:hover, .act.bm.on { color: var(--amber); } .act.bm:hover .bubble { background: rgba(255,176,32,.14); }
.act.bm.on .ic { fill: var(--amber); }
.act.share:hover { color: var(--violet); } .act.share:hover .bubble { background: rgba(108,92,231,.12); }
.act-group { display: flex; }

/* focus post meta */
.post-meta { color: var(--muted); font-size: 15px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.post-meta b { color: var(--text); }
.post-stats { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; color: var(--muted); }
.post-stats b { color: var(--text); }
.post.focus .actions { max-width: none; margin: 4px -8px; padding: 2px 0; border-bottom: 1px solid var(--border); }

/* dropdown menu */
.menu-wrap { position: relative; }
.menu {
  position: absolute; z-index: 60; right: 0; top: calc(100% + 4px); min-width: 230px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top right; pointer-events: none; transition: opacity .18s, transform .22s var(--ease);
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu.up { top: auto; bottom: calc(100% + 4px); transform-origin: bottom right; }
.menu.left { right: auto; left: 0; transform-origin: top left; }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 11px; font-weight: 700; font-size: 15px; text-align: left; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--hover); }
.menu .danger { color: var(--red); }
.menu .ic { width: 19px; height: 19px; }

/* =====================================================================
   PROFILE
   ===================================================================== */
.cover { height: 150px; background: var(--grad); background-size: cover; background-position: center; position: relative; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,.18)); }
.profile-head { padding: 0 16px 14px; position: relative; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -46px; margin-bottom: 10px; position: relative; z-index: 2; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--surface); object-fit: cover; background: var(--surface); box-shadow: var(--shadow); }
.profile-actions { display: flex; gap: 8px; align-items: center; padding-bottom: 4px; }
.profile-actions .icon-btn { border: 1.5px solid var(--border-2); width: 38px; height: 38px; }
.profile-name { font-size: 21px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 5px; }
.role-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; background: var(--grad-soft); color: var(--violet); }
.role-chip .ic { width: 13px; height: 13px; }
.profile-handle { color: var(--muted); }
.follows-you { font-size: 12px; font-weight: 700; background: var(--bg-2); color: var(--muted); padding: 2px 7px; border-radius: 6px; margin-left: 6px; }
.profile-bio { margin: 10px 0; white-space: pre-line; overflow-wrap: anywhere; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14.5px; margin: 8px 0; }
.profile-meta span, .profile-meta a { display: inline-flex; align-items: center; gap: 4px; }
.profile-meta .ic { width: 17px; height: 17px; }
.profile-meta a { color: var(--violet); }
.profile-counts { display: flex; gap: 18px; font-size: 14.5px; color: var(--muted); }
.profile-counts a:hover { text-decoration: underline; }
.profile-counts b { color: var(--text); }

/* user rows */
.user-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; transition: background .2s; }
.user-row:hover { background: var(--surface-2); }
.user-row .info { flex: 1; min-width: 0; }
.user-row .nm { font-weight: 800; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row .hd { color: var(--muted); font-size: 14px; }
.user-row .bio { font-size: 14px; margin-top: 4px; color: var(--text-2); overflow-wrap: anywhere; }

/* =====================================================================
   WIDGETS (right column / explore)
   ===================================================================== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 19px; font-weight: 800; padding: 14px 16px 6px; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-more { display: block; padding: 14px 16px; color: var(--violet); font-weight: 600; font-size: 14.5px; transition: background .2s; }
.card-more:hover { background: var(--hover); }
.trend { display: block; padding: 10px 16px; transition: background .2s; }
.trend:hover { background: var(--hover); }
.trend small { display: block; color: var(--muted); font-size: 12.5px; }
.trend b { font-size: 15.5px; }
.trend .rank { float: right; font-size: 12px; font-weight: 800; color: var(--violet); background: var(--grad-soft); width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 19px; height: 19px; pointer-events: none; }
.search-box input { width: 100%; height: 46px; border-radius: 99px; border: 1.5px solid transparent; background: var(--bg-2); padding: 0 18px 0 46px; outline: none; transition: all .2s; }
.search-box input:focus { background: var(--surface); border-color: var(--violet); box-shadow: var(--ring); }
.search-box input:focus + .ic, .search-box:focus-within .ic { color: var(--violet); }
.hero-card { padding: 18px; border-radius: var(--radius); background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -50px; top: -60px; border-radius: 50%; background: rgba(255,255,255,.14); }
.hero-card h3 { margin: 0 0 6px; font-size: 18px; }
.hero-card p { margin: 0 0 12px; opacity: .92; font-size: 14px; }
.hero-card .btn { background: #fff; color: var(--violet); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 14px 6px; font-size: 13px; color: var(--muted); }
.foot-links a:hover { text-decoration: underline; }

/* Explore hero */
.explore-hero { margin: 14px 16px; padding: 22px 20px; border-radius: 22px; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.explore-hero::before, .explore-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.14); }
.explore-hero::before { width: 220px; height: 220px; right: -60px; top: -80px; }
.explore-hero::after { width: 120px; height: 120px; right: 90px; bottom: -70px; background: rgba(255,255,255,.1); }
.explore-hero h2 { margin: 0 0 4px; font-size: 22px; position: relative; z-index: 1; }
.explore-hero p { margin: 0; opacity: .9; position: relative; z-index: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 14px; transition: all .2s; }
.chip:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-1px); }
.chip:nth-child(5n+1) { color: var(--violet); } .chip:nth-child(5n+2) { color: var(--pink); } .chip:nth-child(5n+3) { color: var(--teal); } .chip:nth-child(5n+4) { color: var(--orange); } .chip:nth-child(5n+5) { color: var(--blue); }
.section-title { font-size: 19px; font-weight: 800; padding: 16px 16px 6px; margin: 0; }

/* empty state */
.empty { text-align: center; padding: 56px 28px; color: var(--muted); }
.empty .em-ic { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 24px; display: grid; place-items: center; background: var(--grad-soft); color: var(--violet); }
.empty .em-ic .ic { width: 34px; height: 34px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.empty p { margin: 0 auto; max-width: 340px; }

/* loader */
.loader { display: flex; justify-content: center; padding: 22px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--violet); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-2) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* =====================================================================
   NOTIFICATIONS
   ===================================================================== */
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); transition: background .2s; animation: fadeUp .35s var(--ease) backwards; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: linear-gradient(90deg, rgba(108,92,231,.07), transparent 70%); }
.notif .n-ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; }
.notif .n-ic .ic { width: 18px; height: 18px; }
.n-like { background: linear-gradient(135deg, #FF4D8D, #FF8FB1); }
.n-like .ic { fill: #fff; }
.n-repost { background: linear-gradient(135deg, #00C9A7, #5BE3C8); }
.n-follow { background: linear-gradient(135deg, #6C5CE7, #A29BFE); }
.n-reply, .n-mention { background: linear-gradient(135deg, #2E9BFF, #7CC0FF); }
.n-quote { background: linear-gradient(135deg, #FF9F43, #FFC48A); }
.notif .n-body { flex: 1; min-width: 0; }
.notif .n-text { margin-top: 6px; }
.notif .n-text b { font-weight: 800; }
.notif .n-snip { color: var(--muted); margin-top: 4px; font-size: 14.5px; overflow-wrap: anywhere; }

/* =====================================================================
   MESSAGES
   ===================================================================== */
.dm-wrap { display: flex; height: calc(100vh - var(--top-h) - var(--nav-h)); height: calc(100dvh - var(--top-h) - var(--nav-h) - env(safe-area-inset-bottom)); }
.dm-list { width: 100%; overflow-y: auto; }
.dm-list.has-conv { display: none; }
.dm-item { display: flex; gap: 12px; padding: 14px 16px; align-items: center; transition: background .2s; border-left: 3px solid transparent; }
.dm-item:hover { background: var(--surface-2); }
.dm-item.on { background: var(--hover); border-left-color: var(--violet); }
.dm-item .info { flex: 1; min-width: 0; }
.dm-item .top { display: flex; gap: 4px; align-items: center; }
.dm-item .top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-item .last { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-item .unr { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.dm-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(18px); }
.dm-head .who b { display: flex; gap: 4px; align-items: center; }
.dm-head .who small { color: var(--muted); }
.dm-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.dm-e2e { align-self: center; display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 99px; margin-bottom: 10px; }
.dm-e2e .ic { width: 14px; height: 14px; color: var(--teal); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; animation: fadeUp .25s var(--ease); }
.msg.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 6px 16px -8px rgba(165,94,234,.7); }
.msg-time { font-size: 11.5px; color: var(--muted); margin: 0 6px 8px; }
.msg-time.out { align-self: flex-end; }
.dm-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.dm-form textarea { flex: 1; resize: none; height: 44px; max-height: 140px; border-radius: 22px; border: 1.5px solid var(--border); background: var(--surface-2); padding: 10px 16px; outline: none; }
.dm-form textarea:focus { border-color: var(--violet); }
.dm-form .btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.dm-empty { flex: 1; display: none; place-items: center; }

/* =====================================================================
   MODAL / LIGHTBOX
   ===================================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; }
.modal.open { display: flex; }
.modal-bg { position: absolute; inset: 0; background: rgba(13,10,28,.5); backdrop-filter: blur(4px); animation: fade .25s; }
.modal-box {
  position: relative; width: 100%; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg); animation: sheet .35s var(--ease); padding-bottom: env(safe-area-inset-bottom);
}
.modal-box::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--border-2); margin: 8px auto 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-pad { padding: 4px 20px 22px; }
.modal .compose { border-bottom: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(6,4,14,.94); display: none; place-items: center; padding: 20px; animation: fade .2s; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; animation: zoomIn .3s var(--ease); }
.lightbox .icon-btn { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.12); color: #fff; }
@keyframes zoomIn { from { transform: scale(.92); opacity: 0; } }

/* =====================================================================
   AUTH / LANDING
   ===================================================================== */
.auth-page { min-height: 100vh; display: grid; }
.auth-art {
  display: none; position: relative; overflow: hidden; background: var(--grad); color: #fff; padding: 48px;
}
.auth-art .orb { position: absolute; border-radius: 50%; filter: blur(2px); animation: float 9s ease-in-out infinite; }
.auth-art .orb.a { width: 360px; height: 360px; background: rgba(255,255,255,.14); right: -120px; top: -100px; }
.auth-art .orb.b { width: 220px; height: 220px; background: rgba(255,255,255,.10); left: -60px; bottom: 80px; animation-delay: -3s; }
.auth-art .orb.c { width: 120px; height: 120px; background: rgba(255,255,255,.16); right: 30%; bottom: -30px; animation-delay: -6s; }
@keyframes float { 50% { transform: translateY(-24px) translateX(12px); } }
.auth-art-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h2 { font-size: 46px; line-height: 1.05; margin: 0 0 16px; letter-spacing: -1px; }
.auth-art p { font-size: 17px; opacity: .9; max-width: 460px; }
.auth-feats { display: grid; gap: 12px; margin-top: 26px; }
.auth-feats div { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); padding: 12px 16px; border-radius: 16px; font-weight: 600; max-width: 420px; }
.auth-feats .ic { width: 20px; height: 20px; }
.auth-art .brand-mark { background: rgba(255,255,255,.2); box-shadow: none; }
.auth-art .brand-name { color: #fff; background: none; -webkit-background-clip: initial; background-clip: initial; }
.auth-form-wrap { display: flex; flex-direction: column; justify-content: center; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); max-width: 460px; width: 100%; margin: 0 auto; }
.auth-form-wrap h1 { font-size: 30px; margin: 22px 0 6px; letter-spacing: -.5px; font-weight: 800; }
.auth-form-wrap .lead { color: var(--muted); margin: 0 0 24px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); }
.auth-switch a { color: var(--violet); font-weight: 700; }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.secure-note .ic { width: 14px; height: 14px; color: var(--teal); }

.landing { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.landing-nav { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.landing-nav .actions-r { display: flex; gap: 8px; }
.landing-hero { display: grid; gap: 30px; padding: 30px 0 50px; align-items: center; }
.landing-hero h1 { font-size: clamp(38px, 8vw, 68px); line-height: 1.02; letter-spacing: -2px; margin: 0 0 16px; font-weight: 800; }
.landing-hero p { font-size: 18px; color: var(--text-2); margin: 0 0 26px; max-width: 520px; }
.landing-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 13.5px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.pill span { background: var(--grad); color: #fff; border-radius: 99px; padding: 3px 10px; font-size: 12px; }
.phone {
  justify-self: center; width: min(360px, 100%); border-radius: 40px; padding: 12px; background: linear-gradient(160deg, #241D4A, #0D0A1C);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.06); transform: rotate(2deg); animation: phoneIn .9s var(--ease);
}
@keyframes phoneIn { from { transform: rotate(8deg) translateY(30px); opacity: 0; } }
.phone-screen { border-radius: 30px; overflow: hidden; background: var(--surface); height: 560px; overflow-y: auto; scrollbar-width: none; pointer-events: none; }
.phone-screen::-webkit-scrollbar { display: none; }
.phone .post { cursor: default; padding: 12px; }
.phone .post-text { font-size: 14px; }
.features { display: grid; gap: 14px; padding: 10px 0 60px; }
.feature { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); transition: transform .3s var(--ease), box-shadow .3s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .f-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.f1 { background: linear-gradient(135deg, #6C5CE7, #A29BFE); } .f2 { background: linear-gradient(135deg, #FF4D8D, #FF9F43); }
.f3 { background: linear-gradient(135deg, #00C9A7, #2E9BFF); } .f4 { background: linear-gradient(135deg, #FFB020, #FF6B6B); }
.landing-foot { border-top: 1px solid var(--border); padding: 24px 0 40px; display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: 14px; justify-content: space-between; }
.prose { padding: 8px 20px 30px; }
.prose h2 { font-size: 19px; margin: 22px 0 6px; }
.prose p, .prose li { color: var(--text-2); }
.prose h3 { font-size: 16.5px; margin: 18px 0 4px; } .prose h4 { font-size: 15px; margin: 14px 0 4px; }
.prose a { color: var(--violet); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote { margin: 14px 0; padding: 10px 16px; border-left: 4px solid var(--violet); background: var(--grad-soft); border-radius: 0 12px 12px 0; color: var(--text-2); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); }
.prose pre { overflow-x: auto; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.page-title { margin: 0; padding: 22px 20px 0; font-size: 26px; }
.page-updated { font-size: 13px; margin-top: 26px; }
.page-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; }

.wm-preview img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); display: block; }
.field .lbl { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.seg a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.lang-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.lang-pick .muted { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; }
.dot-warn { color: var(--orange); font-weight: 900; }
.alert form { display: inline; margin-left: auto; }

.col-progress { min-width: 170px; }
.up-track.big { height: 10px; margin: 4px 0 10px; }
.grid-2.tight { gap: 0 12px; }
.import-form { display: inline; }
.tr-list { display: flex; flex-direction: column; }
.tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: start; }
.tr-src { font-size: 14px; word-break: break-word; }
.tr-src small { display: block; margin-top: 4px; font-size: 11.5px; }
.tr-in { min-height: 42px; font-size: 14px; }
.sticky-save { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; z-index: 2; }
@media (max-width: 720px) { .tr-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Pro ---------- */
.pro-badge.xl { font-size: 15px; padding: 4px 12px; border-radius: 10px; margin: 0 0 12px; }
.pro-hero { margin: 16px; padding: 28px 22px; border-radius: 26px; text-align: center; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #3B2F7A 0%, #1E1B3A 55%, #120F25 100%); position: relative; overflow: hidden; box-shadow: 0 18px 40px -22px rgba(59,47,122,.8); }
.pro-hero::before { content: ""; position: absolute; width: 280px; height: 280px; right: -80px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(255,200,120,.35), transparent 70%); }
.pro-hero h2 { margin: 0 0 6px; font-size: 24px; position: relative; } .pro-hero p { margin: 0 auto; max-width: 460px; color: rgba(255,255,255,.78); position: relative; }
.pro-status { display: inline-flex; gap: 6px; align-items: center; margin-top: 14px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.12); font-weight: 700; font-size: 14px; position: relative; }
.pro-perks { display: grid; gap: 10px; padding: 0 16px; }
@media (min-width: 640px) { .pro-perks { grid-template-columns: 1fr 1fr; } }
.perk { display: flex; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.perk-ic { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3B2F7A, #8E44AD); }
.perk b { font-size: 15px; } .perk p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.pro-buy, .pro-history, .pro-faq { margin: 18px 16px; }
.pro-buy h3, .pro-history h3, .pro-faq h3 { margin: 0 0 10px; font-size: 18px; }
.pro-periods { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pro-period input { position: absolute; opacity: 0; pointer-events: none; }
.pp-box { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 18px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; position: relative; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); height: 100%; }
.pp-box:hover { transform: translateY(-2px); }
.pro-period input:checked + .pp-box { border-color: var(--violet); box-shadow: 0 10px 26px -14px rgba(108,92,231,.7); background: var(--grad-soft); }
.pro-period input:focus-visible + .pp-box { outline: 2px solid var(--violet); outline-offset: 2px; }
.pp-price { font-size: 20px; font-weight: 900; }
.pp-save { position: absolute; top: -9px; right: 10px; padding: 2px 8px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; }
.pro-paylabel { margin: 16px 0 8px; font-weight: 700; }
.pro-gateways { display: grid; gap: 8px; }
.pro-gw { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.pro-gw:hover { border-color: var(--violet); background: var(--hover); }
.pro-gw > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .pro-gw small { color: var(--muted); font-size: 12.5px; }
.pro-gw .gw-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2E9BFF, #00C9A7); flex: none; }
.pro-gw.gw-nowpayments .gw-ic { background: linear-gradient(135deg, #F7931A, #FFB020); }
.pro-gw.loading { opacity: .6; } .pro-gw:disabled { cursor: progress; }
.pro-note { font-size: 12.5px; margin-top: 10px; }
.pro-order { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; background: var(--surface); }
.pro-order > span { display: flex; flex-direction: column; } .pro-order small { font-size: 12px; }
.pro-faq details { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; background: var(--surface); }
.pro-faq summary { font-weight: 700; cursor: pointer; } .pro-faq p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; }
.pro-receipt { margin: 20px 16px; padding: 24px 18px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); text-align: center; }
.pr-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--muted); }
.pr-ic .ic { width: 30px; height: 30px; }
.pr-paid { background: linear-gradient(135deg, #20BF6B, #00C9A7); } .pr-pending { background: linear-gradient(135deg, #FFB020, #FF9F43); }
.pr-pending .ic { animation: spin 1.6s linear infinite; } .pr-failed, .pr-expired, .pr-canceled { background: linear-gradient(135deg, #FF4757, #FF6B6B); }
.pro-receipt h2 { font-size: 20px; margin: 0 0 6px; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.pr-detail { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; text-align: left; max-width: 380px; margin: 16px auto; font-size: 14px; }
.pr-detail dt { color: var(--muted); } .pr-detail dd { margin: 0; font-weight: 700; word-break: break-all; }
.row-actions.center { justify-content: center; }
.go-pro .ic { color: var(--amber); }

.n-ic.n-pro { background: linear-gradient(135deg, #3B2F7A, #8E44AD) !important; color: #FFD27A !important; }

/* progres upload */
.up-progress { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.up-track { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.up-track i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .25s var(--ease); }

/* rich-text editor (admin halaman) */
.rte { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--grad-soft); position: sticky; top: 0; z-index: 2; }
.rte-bar button { min-width: 36px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s; }
.rte-bar button:hover { background: var(--surface); border-color: var(--border); }
.rte-bar button.on { background: var(--violet); color: #fff; }
.rte-bar .sep { width: 1px; background: var(--border); margin: 4px 4px; }
.rte-area { min-height: 320px; max-height: 70vh; overflow-y: auto; padding: 4px 18px 18px; outline: none; }
.rte-area:focus { box-shadow: inset 0 0 0 2px var(--violet); }
.rte-code { display: none; width: 100%; min-height: 320px; border: 0; padding: 14px 16px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface); color: var(--text); resize: vertical; outline: none; }
.rte.code .rte-area { display: none; } .rte.code .rte-code { display: block; }
.ph-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ph-list button { border: 1px dashed var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 10px; font: 12.5px ui-monospace, Menlo, Consolas, monospace; cursor: pointer; }
.ph-list button:hover { border-color: var(--violet); color: var(--violet); }
.page-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.page-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); font-weight: 700; font-size: 14px; background: var(--surface); }
.page-tabs a.on { background: var(--grad); color: #fff; border-color: transparent; }

/* announcement */
.announce { display: flex; gap: 10px; align-items: center; margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--border); font-size: 14.5px; font-weight: 600; }
.announce .ic { color: var(--pink); }

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { display: none; }
.admin-main { flex: 1; min-width: 0; padding: 16px 14px calc(var(--nav-h) + 30px); }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-top h1 { font-size: 24px; margin: 0; font-weight: 800; letter-spacing: -.3px; }
.admin-top p { margin: 2px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { position: relative; overflow: hidden; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); transition: transform .25s var(--ease), box-shadow .25s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat .s-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; margin-bottom: 12px; }
.stat .s-ic .ic { width: 20px; height: 20px; }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat small { color: var(--muted); font-weight: 600; }
.stat .delta { position: absolute; top: 16px; right: 14px; font-size: 12px; font-weight: 800; color: var(--green); background: rgba(32,191,107,.1); padding: 3px 8px; border-radius: 99px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; margin-bottom: 16px; overflow: hidden; }
.panel-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); gap: 10px; flex-wrap: wrap; }
.panel-h h2 { margin: 0; font-size: 16.5px; font-weight: 800; }
.panel-b { padding: 16px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: 10px 4px 0; }
.bars .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 100%; }
.bars .bar { width: 100%; max-width: 22px; border-radius: 6px 6px 3px 3px; background: var(--grad); min-height: 3px; transform-origin: bottom; animation: barUp .8s var(--ease) both; }
.bars .bar.u { background: var(--grad-cool); }
.bars .col small { font-size: 10px; color: var(--muted); }
@keyframes barUp { from { transform: scaleY(0); } }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; background: var(--grad); }
.legend i.u { background: var(--grad-cool); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 10px 14px; background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: var(--surface-2); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tag.green { background: rgba(32,191,107,.12); color: var(--green); }
.tag.red { background: rgba(255,71,87,.12); color: var(--red); }
.tag.violet { background: rgba(108,92,231,.12); color: var(--violet); }
.tag.amber { background: rgba(255,176,32,.15); color: #D98E00; }
.tag.blue { background: rgba(46,155,255,.12); color: var(--blue); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { display: inline; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters .input, .filters .select { height: 40px; width: auto; min-width: 180px; border-radius: 12px; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 14px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.pager .on { background: var(--grad); color: #fff; border-color: transparent; }
.mini-user { display: flex; gap: 10px; align-items: center; min-width: 0; }
.mini-user b { display: flex; gap: 4px; align-items: center; }
.mini-user small { color: var(--muted); display: block; }
.thumbs { display: flex; gap: 4px; margin-top: 6px; }
.thumbs img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (min-width: 560px) {
  .modal { align-items: flex-start; padding-top: 6vh; }
  .modal-box { width: 600px; border-radius: 24px; animation: zoomIn .3s var(--ease); max-height: 86vh; }
  .modal-box::before { display: none; }
  .modal-head { padding: 10px 12px 0; }
  .cover { height: 200px; }
  .profile-avatar { width: 134px; height: 134px; }
  .profile-top { margin-top: -70px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .msg { max-width: 65%; }
}

/* Tablet: icon rail */
@media (min-width: 700px) {
  .topbar, .bottomnav, .fab { display: none; }
  .tabs { top: 0; }
  .topbar + .page-head, .topbar ~ * .page-head { top: 0; }
  .toasts { bottom: 24px; }
  .main { padding-bottom: 40px; }
  .shell { padding-left: 0; }
  .dm-wrap { height: 100vh; }
  .dm-list { width: 340px; border-right: 1px solid var(--border); flex: none; }
  .dm-list.has-conv { display: block; }
  .dm-empty { display: grid; }
  .main.wide { max-width: 980px; }
  .landing-hero { grid-template-columns: 1.1fr .9fr; padding: 50px 0 70px; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .auth-page { grid-template-columns: 1fr 1fr; }
  .auth-art { display: block; }
  .auth-form-wrap .brand.mobile-only { display: none; }
}

/* Desktop: full sidebar + right column */
@media (min-width: 1100px) {
  .aside { display: block; width: 360px; flex: none; padding: 10px 24px 30px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; }
  .aside::-webkit-scrollbar { display: none; }
  .aside .search-box { position: sticky; top: 0; padding: 4px 0 12px; background: var(--bg); z-index: 2; }
  .aside .search-box .ic { top: calc(50% - 4px); }
  .admin-side { display: flex; flex-direction: column; width: 260px; flex: none; position: sticky; top: 0; height: 100vh; padding: 18px 14px; border-right: 1px solid var(--border); background: var(--surface); gap: 6px; }
  .admin-main { padding: 26px 32px 40px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .admin-bottom { display: none !important; }
}

@media (min-width: 700px) and (max-width: 1099px) {
  .admin-main { padding-bottom: calc(var(--nav-h) + 30px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .bottomnav.admin-bottom { display: flex; }
}
.mt { margin-top: 16px; }
.chips.flush { padding: 22px 0 0; flex-wrap: wrap; }
.focus-wrap .post { padding-top: 12px; } .focus-wrap .post-head .avatar { margin-right: 6px; } .desktop-compose { display: none; } @media (min-width: 700px) { .desktop-compose { display: block; } }
.cover-edit, .avatar-edit { position: relative; display: block; cursor: pointer; }
.avatar-edit { display: inline-block; border-radius: 50%; }
.cover-btn { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(13,10,28,.55); color: #fff; backdrop-filter: blur(4px); transition: background .2s; }
.cover-edit:hover .cover-btn, .avatar-edit:hover .cover-btn { background: rgba(13,10,28,.75); }
.explore-search { padding: 10px 16px; position: sticky; top: var(--top-h); z-index: 31; background: var(--glass); backdrop-filter: blur(18px); } .explore-search .ic { left: 32px; } @media (min-width:700px){ .explore-search { top: 0; } } .explore-search + .tabs { top: calc(var(--top-h) + 66px); } @media (min-width:700px){ .explore-search + .tabs { top: 66px; } }
.settings { padding: 12px 16px 20px; display: grid; gap: 14px; }
.set-card { padding: 18px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface-2); }
.set-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 6px; }
.set-card h2 .ic { color: var(--violet); }
.set-card p { margin: 0 0 14px; }
.danger-zone { border-color: rgba(255,71,87,.3); background: rgba(255,71,87,.04); }
.danger-zone h2 .ic { color: var(--red); }
.sec-log { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; font-size: 13.5px; }
.sec-log li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.err-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 20px; gap: 6px; }
.err-page h1 { margin: 6px 0; font-size: 26px; }
.err-page p { max-width: 420px; margin: 0 0 20px; }
.err-code { font-size: clamp(90px, 22vw, 160px); font-weight: 800; line-height: 1; letter-spacing: -6px; animation: fadeUp .6s var(--ease); }
.brand-mark.big { width: 84px; height: 84px; border-radius: 26px; margin-bottom: 16px; }
.brand-mark.big .ic { width: 40px; height: 40px; animation: spin 6s linear infinite; }
.landing .card { margin-bottom: 40px; }
.admin-sub { display: block; font-size: 12px; font-weight: 700; letter-spacing: .4px; margin-top: -4px; }
.admin-side .brand { padding: 4px 8px 18px; }
.admin-nav a, .admin-nav button { font-size: 15.5px; padding: 11px 14px; }
.admin-nav a.on { background: var(--grad-soft); }
.admin-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.admin-me div { flex: 1; min-width: 0; line-height: 1.2; }
.admin-me b, .admin-me small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin .bottomnav a { width: auto; flex: 1; font-size: 10px; }
.admin-mobile-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
@media (min-width: 1100px) { .admin-mobile-head { display: none; } }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 1000px) { .grid-2 { grid-template-columns: 1.6fr 1fr; } }

.bars .bar.h0 { height: 0%; }
.bars .bar.h1 { height: 5%; }
.bars .bar.h2 { height: 10%; }
.bars .bar.h3 { height: 15%; }
.bars .bar.h4 { height: 20%; }
.bars .bar.h5 { height: 25%; }
.bars .bar.h6 { height: 30%; }
.bars .bar.h7 { height: 35%; }
.bars .bar.h8 { height: 40%; }
.bars .bar.h9 { height: 45%; }
.bars .bar.h10 { height: 50%; }
.bars .bar.h11 { height: 55%; }
.bars .bar.h12 { height: 60%; }
.bars .bar.h13 { height: 65%; }
.bars .bar.h14 { height: 70%; }
.bars .bar.h15 { height: 75%; }
.bars .bar.h16 { height: 80%; }
.bars .bar.h17 { height: 85%; }
.bars .bar.h18 { height: 90%; }
.bars .bar.h19 { height: 95%; }
.bars .bar.h20 { height: 100%; }
.bars .col { display: grid; grid-template-rows: 1fr auto; gap: 4px; }
.bars .pair { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; width: 100%; }
.bars .pair .bar { max-width: 12px; }
.admin-tabs { position: static; background: transparent; margin-bottom: 12px; } .admin-post-cell { max-width: 380px; overflow-wrap: anywhere; }
.post:has(.menu.open), .menu-wrap:has(.menu.open), .notif:has(.menu.open) { z-index: 25; }
.post.menu-on { z-index: 25; }
@media (max-width: 420px) {
  .captcha-row { flex-wrap: wrap; }
  .captcha-row .captcha-img { flex: 1; width: auto; }
  .captcha-row .input { flex: 1 1 100%; }
}
@media (min-width: 1100px) { .main.wide { max-width: 1000px; } }

/* =====================================================================
   PASAR (MARKETPLACE)
   ===================================================================== */
.market-hero { background: linear-gradient(135deg, #FF9F43 0%, #FF4D8D 50%, #6C5CE7 100%); }
.prod-quota-bar { padding: 0 16px 14px; }
.quota { padding: 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); display: grid; gap: 10px; }
.quota-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14.5px; }
.quota-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.quota-bar span { display: block; height: 100%; border-radius: 99px; background: var(--grad-cool); transition: width .6s var(--ease); }
.quota-bar span.full { background: linear-gradient(90deg, #FF9F43, #FF4757); }
.prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 4px 16px 16px; }
.prod-grid > .loader, .prod-grid > .empty { grid-column: 1 / -1; }
.prod-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: transform .3s var(--ease), box-shadow .3s; animation: fadeUp .4s var(--ease) backwards; }
.prod-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.prod-img { position: relative; aspect-ratio: 1; background: var(--grad-soft); overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.prod-card:hover .prod-img img { transform: scale(1.06); }
.prod-count { position: absolute; right: 8px; top: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 99px; background: rgba(13,10,28,.6); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(4px); }
.prod-body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.prod-title { font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-price { font-weight: 800; color: var(--pink); font-size: 15px; }
.prod-price.muted { color: var(--muted); font-weight: 600; font-size: 13px; }
.prod-price.big { font-size: 24px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prod-seller { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.prod-seller span:not(.vb) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-seller .vb .ic { width: 14px; height: 14px; }
.prod-detail { padding: 14px 16px; }
.prod-gallery { display: grid; gap: 8px; border-radius: 20px; overflow: hidden; }
.prod-gallery.n2 { grid-template-columns: 1fr 1fr; }
.prod-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; background: var(--bg-2); }
.prod-gallery.n1 img { aspect-ratio: 4/3; }
.prod-name { font-size: 22px; margin: 16px 0 4px; line-height: 1.25; }
.prod-meta { display: flex; align-items: center; gap: 4px; font-size: 13px; margin-top: 4px; }
.prod-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.prod-actions form { display: inline; }
.prod-sub { font-size: 16px; margin: 22px 0 8px; }
.prod-desc { white-space: normal; overflow-wrap: anywhere; color: var(--text-2); line-height: 1.6; }
.user-row.seller { border: 1px solid var(--border); border-radius: 16px; align-items: center; }
.prod-edit-imgs { display: flex; gap: 10px; margin-bottom: 12px; }
.prod-edit-img { display: grid; gap: 6px; width: 120px; }
.prod-edit-img img { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; }
.upload-drop { display: grid; place-items: center; gap: 4px; padding: 24px; border-radius: 18px; border: 2px dashed var(--border-2); background: var(--surface); cursor: pointer; text-align: center; color: var(--violet); transition: border-color .2s, background .2s; }
.upload-drop:hover { border-color: var(--violet); background: var(--hover); }
.upload-drop b { color: var(--text); }
.role-chip.gold { background: rgba(255,176,32,.16); color: #D98E00; }
:root[data-theme="dark"] .role-chip.gold { color: var(--amber); }
.upgrade-now { padding: 0 16px; color: var(--muted); }
.plans { display: grid; gap: 14px; padding: 6px 16px 10px; }
.plan { position: relative; padding: 22px 18px; border-radius: 22px; border: 1.5px solid var(--border); background: var(--surface); display: grid; gap: 6px; transition: transform .3s var(--ease), box-shadow .3s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.hot { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.plan.current { box-shadow: var(--ring); }
.plan-badge { position: absolute; top: -11px; right: 18px; padding: 3px 12px; border-radius: 99px; font-size: 12px; font-weight: 800; color: #fff; background: var(--grad); }
.plan-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; }
.p-free { background: linear-gradient(135deg, #00C9A7, #2E9BFF); } .p-pro { background: linear-gradient(135deg, #6C5CE7, #FF4D8D); } .p-unlimited { background: linear-gradient(135deg, #FF9F43, #FF4757); }
.plan h3 { margin: 6px 0 0; font-size: 20px; }
.plan-price { font-size: 22px; font-weight: 800; }
.plan-limit { color: var(--violet); font-weight: 700; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; color: var(--text-2); font-size: 14.5px; }
.plan li { display: flex; gap: 8px; align-items: center; }
.plan li .ic { color: var(--teal); }
@media (min-width: 560px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } .plans { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) and (max-width: 860px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }

/* Table action dropdown (admin) */
.menu.fixed { position: fixed; right: auto; top: auto; z-index: 300; }
.menu .menu-label { padding: 8px 12px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.menu .menu-sep { height: 1px; background: var(--border); margin: 4px 6px; }
.menu form { display: block; }
.menu .on-mark { margin-left: auto; color: var(--teal); }
.quota-bar span.q0 { width: 0%; }
.quota-bar span.q5 { width: 5%; }
.quota-bar span.q10 { width: 10%; }
.quota-bar span.q15 { width: 15%; }
.quota-bar span.q20 { width: 20%; }
.quota-bar span.q25 { width: 25%; }
.quota-bar span.q30 { width: 30%; }
.quota-bar span.q35 { width: 35%; }
.quota-bar span.q40 { width: 40%; }
.quota-bar span.q45 { width: 45%; }
.quota-bar span.q50 { width: 50%; }
.quota-bar span.q55 { width: 55%; }
.quota-bar span.q60 { width: 60%; }
.quota-bar span.q65 { width: 65%; }
.quota-bar span.q70 { width: 70%; }
.quota-bar span.q75 { width: 75%; }
.quota-bar span.q80 { width: 80%; }
.quota-bar span.q85 { width: 85%; }
.quota-bar span.q90 { width: 90%; }
.quota-bar span.q95 { width: 95%; }
.quota-bar span.q100 { width: 100%; }
.adm-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }

/* =====================================================================
   SIDEBAR KIRI v2 — kepala & kaki tetap, menu tengah bisa digulir
   ===================================================================== */
@media (min-width: 700px) {
  .sidebar {
    display: flex; flex-direction: column; flex: none; position: sticky; top: 0;
    height: 100vh; height: 100dvh; width: 88px; padding: 12px 10px 14px; gap: 6px; overflow: visible; z-index: 45;
  }
  .sb-head { flex: none; display: flex; justify-content: center; padding: 2px 0 6px; }
  .sb-nav {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 2px; padding: 2px; scrollbar-width: none;
    /* bayangan halus menandakan ada menu di atas/bawah saat digulir */
    background:
      linear-gradient(var(--bg) 30%, transparent) top / 100% 24px no-repeat local,
      linear-gradient(transparent, var(--bg) 70%) bottom / 100% 24px no-repeat local,
      radial-gradient(farthest-side at 50% 0, rgba(23,20,46,.14), transparent) top / 100% 10px no-repeat scroll,
      radial-gradient(farthest-side at 50% 100%, rgba(23,20,46,.14), transparent) bottom / 100% 10px no-repeat scroll;
  }
  .sb-nav::-webkit-scrollbar { display: none; }
  .sb-link {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%;
    padding: 12px; border-radius: 16px; color: var(--text-2); font-size: 17px; font-weight: 600; text-align: left; flex: none;
    transition: background .2s, color .2s, transform .15s;
  }
  .sb-link:hover { background: var(--hover); color: var(--text); }
  .sb-link:active { transform: scale(.97); }
  .sb-link.on { color: var(--text); font-weight: 800; background: var(--grad-soft); }
  .sb-link.on .ic { color: var(--violet); stroke-width: 2.5; }
  .sb-link.on::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 4px; border-radius: 4px; background: var(--grad); }
  .sb-ico { position: relative; display: inline-flex; flex: none; }
  .sb-ico .ic { width: 26px; height: 26px; }
  .sb-dots { width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; }
  .sb-dots .ic { width: 16px; height: 16px; }
  .sb-badge {
    position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
    background: var(--pink); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--bg); animation: pop .4s var(--ease);
  }
  .sb-label { display: none; }
  .sb-more .menu { min-width: 250px; }
  .sb-foot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
  .sb-post { width: 52px; height: 52px; padding: 0; border-radius: 50%; }
  .sb-post .ic { width: 22px; height: 22px; }
  .sb-me { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 99px; width: 100%; justify-content: center; transition: background .2s; }
  .sb-me:hover { background: var(--hover); }
  .sb-me-info { flex: 1; min-width: 0; line-height: 1.25; text-align: left; }
  .sb-me-info b { display: flex; align-items: center; gap: 3px; min-width: 0; }
  .sb-me-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .sb-me-info .vb { flex: none; }
  .sb-me-info small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sb-me-more { flex: none; color: var(--muted); }
}

@media (min-width: 1100px) {
  .sidebar { width: 268px; padding: 12px 14px 14px; }
  .sb-head { justify-content: flex-start; padding: 2px 10px 8px; }
  .sb-label { display: inline; }
  .sb-me-info { display: block; }
  .sb-me-more { display: inline-flex; }
  .sb-link { justify-content: flex-start; padding: 11px 16px; font-size: 18px; }
  .sb-foot { align-items: stretch; }
  .sb-post { width: 100%; height: 50px; border-radius: 99px; font-size: 16.5px; }
  .sb-post .ic { display: none; }
  .sb-me { justify-content: flex-start; padding: 8px 10px; }
}

/* Layar pendek (laptop 13", jendela kecil): rapatkan jarak */
@media (min-width: 700px) and (max-height: 820px) {
  .sidebar { padding-top: 8px; padding-bottom: 10px; }
  .sb-head .brand-mark { width: 36px; height: 36px; border-radius: 12px; }
  .sb-link { padding-top: 8px; padding-bottom: 8px; font-size: 16.5px; }
  .sb-ico .ic, .sb-dots { width: 23px; height: 23px; }
  .sb-post { height: 44px; }
  .sb-foot { gap: 6px; padding-top: 8px; }
}
@media (min-width: 700px) and (max-height: 680px) {
  .sb-link { padding-top: 6px; padding-bottom: 6px; font-size: 16px; }
  .sb-ico .ic { width: 22px; height: 22px; }
  .sb-post { height: 42px; }
}
@media (min-width: 700px) and (max-height: 540px) {
  .sb-me { display: none; }
}

.menu[data-fixed] { position: fixed; right: auto; }
.admin-side { overflow: hidden; } .admin-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; } @media (min-width:1100px) and (max-height:700px) { .admin-nav a, .admin-nav button { padding-top: 8px; padding-bottom: 8px; } }

/* =====================================================================
   SLOT IKLAN
   ===================================================================== */
.ad-slot { position: relative; margin: 12px 16px; padding: 28px 12px 12px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; text-align: center; }
.ad-slot::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); opacity: .7; }
.ad-label { position: absolute; top: 8px; left: 12px; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.ad-body { display: flex; justify-content: center; align-items: center; min-height: 50px; overflow: hidden; }
.ad-body img { max-width: 100%; height: auto; border-radius: 12px; }
.ad-body iframe, .ad-body ins { max-width: 100%; }
[data-feed] > .ad-slot { margin: 0; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
.aside .ad-slot { margin: 0 0 16px; }
.ad-market { margin-top: 0; }
.prod-grid > .ad-slot { grid-column: 1 / -1; margin: 0; }
.notif-note { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); padding: 14px 16px; margin: 0; }
.ad-map { display: grid; grid-template-columns: 1fr 3fr 1.6fr; gap: 6px; padding: 8px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border-2); font-size: 11px; font-weight: 700; }
.am-side { border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; color: var(--muted); min-height: 150px; }
.am-main, .am-right { display: grid; gap: 4px; align-content: start; }
.am-box { padding: 6px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); text-align: center; }
.am-ad { background: var(--grad-soft); border-color: var(--violet-2); color: var(--violet); }
.am-note { margin: 8px 0 0; font-size: 13px; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* DM v2: hapus pesan & menu percakapan */
.dm-head .who { flex: 1; min-width: 0; }
.dm-menu .menu { min-width: 240px; }
.msg-row { display: flex; flex-direction: column; max-width: 80%; align-self: flex-start; animation: fadeUp .25s var(--ease); }
.msg-row.out { align-self: flex-end; align-items: flex-end; }
.msg-row .msg { max-width: 100%; animation: none; }
.msg-row .msg-time { display: flex; align-items: center; gap: 4px; margin: 2px 6px 8px; }
.msg-del { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--muted); opacity: 0; transition: opacity .2s, background .2s, color .2s; }
.msg-row:hover .msg-del, .msg-row:focus-within .msg-del { opacity: 1; }
.msg-del:hover { background: rgba(255,71,87,.12); color: var(--red); }
@media (hover: none) { .msg-del { opacity: .6; } }
.msg-row.removing { opacity: 0; transform: scale(.95); transition: opacity .25s, transform .25s; }
.dm-form > .muted { display: flex; align-items: center; gap: 6px; padding: 8px; font-size: 14px; }

/* Link preview card */
.link-card { display: block; margin-top: 10px; border: 1px solid var(--border-2); border-radius: 18px; overflow: hidden; background: var(--surface); transition: background .2s, transform .2s var(--ease); }
.link-card:hover { background: var(--hover); }
.lc-img { display: block; aspect-ratio: 1.91 / 1; background: var(--bg-2); overflow: hidden; }
.lc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.link-card:hover .lc-img img { transform: scale(1.03); }
.lc-body { display: grid; gap: 2px; padding: 10px 14px 12px; }
.lc-site { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.lc-title { font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-desc { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-card.noimg { display: flex; align-items: center; }
.link-card.noimg::before { content: ""; flex: none; width: 74px; align-self: stretch; background: var(--grad-soft) center / 30px no-repeat; }
.chips.flush-tight { padding: 6px 0 10px; flex-wrap: wrap; } .chip.picked { background: var(--grad-soft); border-color: var(--violet); }
.bottomnav.admin-bottom { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
.bottomnav.admin-bottom::-webkit-scrollbar { display: none; }
.bottomnav.admin-bottom a { flex: none; width: 72px; }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 14px; }
.gen-user { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); text-align: center; transition: transform .2s var(--ease), box-shadow .2s; min-width: 0; }
.gen-user:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gen-user .avatar { width: 64px; height: 64px; margin-bottom: 6px; }
.gen-user b, .gen-user small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gen-user small { color: var(--muted); font-size: 12px; }
.gen-alert { margin: 14px 14px 0; }
.gen-empty { grid-column: 1 / -1; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin: 0 0 6px 4px; }
.mt-s { margin-top: 8px; }
.ai-results { display: grid; gap: 10px; padding: 14px; }
.ai-result { display: flex; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); }
.ai-result img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; }
.ai-result p { margin: 4px 0 0; white-space: pre-line; }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .8s linear infinite; }

/* Embed video/audio (YouTube, Vimeo, Dailymotion, TikTok, Spotify, SoundCloud, Instagram) */
.embed-card { margin-top: 10px; border: 1px solid var(--border-2); border-radius: 18px; overflow: hidden; background: var(--surface); }
.embed-play { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: #0d0a1c; cursor: pointer; overflow: hidden; }
.embed-tiktok .embed-play, .embed-instagram .embed-play { aspect-ratio: 9 / 13; max-height: 560px; }
.embed-spotify .embed-play, .embed-soundcloud .embed-play { aspect-ratio: 16 / 7; }
.embed-play img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: transform .5s var(--ease), opacity .3s; }
.embed-play:hover img { transform: scale(1.03); opacity: 1; }
.embed-btn { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; display: grid; place-items: center; background: rgba(13,10,28,.62); backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .25s var(--ease), background .25s; }
.embed-btn svg { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }
.embed-play:hover .embed-btn { transform: scale(1.1); background: var(--pink); }
.embed-youtube .embed-play:hover .embed-btn { background: #FF0033; }
.embed-vimeo .embed-play:hover .embed-btn { background: #17D5FF; }
.embed-spotify .embed-play:hover .embed-btn { background: #1DB954; }
.embed-prov { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(13,10,28,.65); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .3px; backdrop-filter: blur(4px); }
.embed-card iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.embed-tiktok iframe { aspect-ratio: auto; height: 740px; max-height: 80vh; }
.embed-instagram iframe { aspect-ratio: auto; height: 640px; max-height: 80vh; background: #fff; }
.embed-spotify iframe { aspect-ratio: auto; height: 352px; background: transparent; }
.embed-soundcloud iframe { aspect-ratio: auto; height: 300px; }
.embed-meta { display: grid; gap: 2px; padding: 10px 14px 12px; transition: background .2s; }
.embed-meta:hover { background: var(--hover); }
.n-system { background: linear-gradient(135deg, #FF4757, #FF9F43); } .notif-system .n-snip { color: var(--text-2); }
.d-block { display: block; margin-top: 4px; } .pt-0 { padding-top: 0; }
.seo-links ul { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }

/* Login dengan Google */
.btn-google { background: #fff; color: #1f1f1f; border: 1.5px solid var(--border-2); font-weight: 700; box-shadow: var(--shadow-sm); }
.btn-google:hover { background: #f8f9fb; border-color: #c6c9d6; box-shadow: var(--shadow); }
:root[data-theme="dark"] .btn-google { background: #131314; color: #e3e3e3; border-color: #3c3c46; }
.g-logo { width: 22px; height: 22px; flex: none; }
.or-sep { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-linked { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.google-linked .g-logo { width: 18px; height: 18px; }
.copy-box { display: block; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-2); word-break: break-all; cursor: copy; } .seo-links ol { padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); } .panel-h h2 .g-logo { width: 20px; height: 20px; vertical-align: -4px; }
.stats.stats-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.progress { height: 12px; border-radius: 99px; background: var(--border); overflow: hidden; margin: 10px 0; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .4s var(--ease); }
details summary { cursor: pointer; font-weight: 600; }

/* =====================================================================
   v1.7 — Tombol posting terintegrasi di navigasi bawah (pengganti FAB)
   ===================================================================== */
.bottomnav.has-center { justify-content: space-between; padding-left: 4px; padding-right: 4px; }
.bottomnav.has-center > a, .bottomnav.has-center > .nav-center { flex: 1; width: auto; }
.nav-center { position: relative; display: grid; place-items: center; gap: 2px; height: 52px; color: var(--text-2); font-size: 10.5px; font-weight: 800; background: none; border: 0; cursor: pointer; }
.nav-center-btn {
  width: 48px; height: 36px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 8px 18px -8px rgba(165,94,234,.85);
  transition: transform .25s var(--ease), box-shadow .25s, border-radius .3s;
}
.nav-center-btn .ic { width: 22px; height: 22px; stroke-width: 2.4; }
.nav-center:hover .nav-center-btn, .nav-center:focus-visible .nav-center-btn { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 24px -8px rgba(255,77,141,.8); border-radius: 18px; }
.nav-center:active .nav-center-btn { transform: scale(.92); }
.topbar-bell { position: relative; }
.topbar-bell.on { color: var(--violet); }
.topbar-bell .badge { top: 2px; right: 2px; }
.fab { display: none !important; }
/* ruang bawah agar konten terakhir tidak tertutup navigasi */
@media (max-width: 699px) { .main { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); } }
.ad-mobile-only:empty { display: none; }
@media (min-width: 1100px) { .ad-mobile-only { display: none; } }
.ad-body img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.ad-body img[width="100%"] { width: 100%; }
.ad-body a { display: block; max-width: 100%; }
.ad-body { display: block; text-align: center; }
@media (max-width: 699px) {
  .tabs, .explore-search { transition: top .3s var(--ease); }
  body.topbar-hidden .tabs, body.topbar-hidden .explore-search { top: 0; }
  body.topbar-hidden .explore-search + .tabs { top: 66px; }
}

/* ---------------- Blog / Artikel Pro ---------------- */
.page-head > .btn, .page-head > a.icon-btn:last-child:not(:first-child) { margin-left: auto; }
.chip.on { background: var(--grad); color: #fff !important; border-color: transparent; }
.art-cats { padding-top: 2px; }
.art-quota-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 14px; flex-wrap: wrap; font-size: 14px; }
.art-list { display: flex; flex-direction: column; }
.art-card { display: grid; grid-template-columns: 1fr 132px; gap: 16px; padding: 18px 16px; border-bottom: 1px solid var(--border); transition: background .2s; }
.art-card:hover { background: var(--hover); }
.art-card .art-cover { order: 2; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--grad-soft); display: grid; place-items: center; color: var(--violet); align-self: start; }
.art-card .art-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.art-card:hover .art-cover img { transform: scale(1.04); }
.art-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.art-body h3 { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; }
.art-body h3 a:hover { color: var(--violet); }
.art-body p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-cat { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--violet); }
.art-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 2px; }
.art-author { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; }
.art-author:hover b, .art-author:hover span { text-decoration: underline; }
.art-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--violet); font-weight: 700; }
.art-status { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: rgba(46,155,255,.12); color: var(--blue); }
.art-status.s-pending { background: rgba(255,176,32,.15); color: #D98E00; }
.art-status.s-locked, .art-status.s-hidden { background: rgba(255,71,87,.12); color: var(--red); }
@media (max-width: 520px) { .art-card { grid-template-columns: 1fr 96px; gap: 12px; } .art-body h3 { font-size: 16px; } .art-body p { -webkit-line-clamp: 2; font-size: 14px; } }

.art-page { padding-bottom: 8px; }
.art-banner { display: flex; gap: 10px; align-items: center; margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px; background: rgba(255,176,32,.12); color: #A86E00; font-size: 14px; font-weight: 600; }
.art-head { padding: 22px 20px 6px; display: flex; flex-direction: column; gap: 10px; }
.art-head h1 { margin: 0; font-size: clamp(25px, 4.4vw, 34px); line-height: 1.18; font-weight: 900; letter-spacing: -.025em; }
.art-lead { margin: 0; font-size: 17px; line-height: 1.55; color: var(--text-2); }
.art-byline { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.art-byline small { display: block; }
.art-hero { margin: 14px 0 4px; }
.art-hero img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
@media (min-width: 700px) { .art-hero { margin: 14px 20px 4px; } .art-hero img { border-radius: 18px; } }
.art-prose { font-size: 17px; line-height: 1.75; padding-top: 12px; }
.art-prose p { margin: 0 0 1.05em; }
.art-prose h2 { font-size: 23px; margin: 1.5em 0 .5em; letter-spacing: -.015em; }
.art-prose h3 { font-size: 19px; margin: 1.3em 0 .4em; }
.art-prose ul, .art-prose ol { padding-left: 1.4em; margin: 0 0 1.05em; }
.art-prose figure { margin: 1.4em 0; }
.art-prose img { max-width: 100%; height: auto; border-radius: 14px; display: block; margin: 0 auto; }
.art-prose figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.rte-area.art-prose { font-size: 16px; }
.rte-area[data-placeholder]:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rte.busy { opacity: .7; pointer-events: none; }
.art-tags { padding: 0 20px 6px; }
.art-actions { display: flex; gap: 8px; padding: 10px 20px 4px; flex-wrap: wrap; }
.art-actions form { display: inline; }
.btn.danger { color: var(--red); }
.art-authorbox { display: flex; gap: 14px; align-items: center; margin: 18px 16px 8px; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--grad-soft); }
.art-authorbox > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.art-authorbox p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.sec-title { font-size: 18px; font-weight: 800; padding: 18px 16px 4px; margin: 0; border-top: 1px solid var(--border); }
.art-more { padding: 14px 16px 24px; text-align: center; }
.art-form .art-title-in { font-size: 18px; font-weight: 700; }
.art-form [data-word-count].warn { color: #D98E00; font-weight: 700; }
.art-cover-edit { max-width: 320px; margin-bottom: 10px; }
.art-submit { display: flex; gap: 10px; justify-content: flex-end; padding: 0 16px 30px; flex-wrap: wrap; }
.art-submit .btn { flex: 1 1 160px; }
.art-form .field > small.muted { display: block; margin-top: 6px; }

/* ---------------- Halaman bisnis Pro ---------------- */
.grid-2f { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .grid-2f { grid-template-columns: 1fr 1fr; } }
.biz-logo { width: 92px; height: 92px; border-radius: 22px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 38px; font-weight: 900; overflow: hidden; flex: none; border: 4px solid var(--bg); box-shadow: var(--shadow, 0 6px 20px rgba(0,0,0,.08)); }
.biz-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.biz-logo.sm { width: 46px; height: 46px; border-radius: 13px; font-size: 19px; border-width: 0; box-shadow: none; }
.biz-cover { aspect-ratio: 3 / 1; background: var(--grad); overflow: hidden; }
.biz-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.biz-head { padding: 0 20px 18px; border-bottom: 1px solid var(--border); }
.biz-head .biz-logo { margin-top: -46px; position: relative; }
.biz-head h1 { margin: 12px 0 6px; font-size: clamp(24px, 4vw, 30px); font-weight: 900; letter-spacing: -.02em; line-height: 1.2; }
.biz-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 14px; font-weight: 600; }
.biz-sub > * { display: inline-flex; align-items: center; gap: 5px; }
.biz-sub a:hover { color: var(--violet); }
.biz-open.on { color: var(--green); } .biz-open.off { color: var(--red); }
.biz-tagline { margin: 10px 0 0; font-size: 16.5px; color: var(--text-2); line-height: 1.5; }
.biz-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.biz-grid2 { display: grid; }
@media (min-width: 1100px) { .biz-grid2 { grid-template-columns: 1fr 280px; } .biz-side { border-left: 1px solid var(--border); } .biz-side .biz-sec:first-child { border-top: 0; } }
.biz-sec { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.biz-sec.flush { padding: 18px 0 0; }
.biz-sec.flush h2 { padding: 0 20px; }
.biz-sec h2 { font-size: 17px; font-weight: 800; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; }
.biz-more { font-size: 14px; color: var(--violet); font-weight: 700; }
.biz-prose { padding: 0; }
.biz-map { display: block; border-radius: 14px; overflow: hidden; margin-bottom: 12px; border: 1px solid var(--border); }
.biz-map img { width: 100%; display: block; }
.biz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; }
.biz-list li { display: flex; gap: 10px; align-items: flex-start; word-break: break-word; }
.biz-list .ic { color: var(--violet); flex: none; margin-top: 2px; }
.biz-list a { color: var(--violet); font-weight: 600; }
.biz-socials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.biz-socials .chip { font-size: 13px; padding: 6px 12px; }
.biz-hours { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.biz-hours th, .biz-hours td { padding: 6px 0; text-align: left; font-weight: 500; }
.biz-hours td { text-align: right; }
.biz-hours tr.today { font-weight: 800; color: var(--violet); }
.biz-hours tr.today th, .biz-hours tr.today td { font-weight: 800; }
.biz-grid { display: grid; gap: 14px; padding: 4px 16px 20px; }
@media (min-width: 600px) { .biz-grid { grid-template-columns: 1fr 1fr; } }
.biz-card { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); transition: transform .2s var(--ease), box-shadow .2s; }
.biz-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(60,40,140,.12); }
.biz-card-cover { aspect-ratio: 3 / 1; background: var(--grad-soft); }
.biz-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.biz-card-body { display: flex; gap: 12px; padding: 0 14px 14px; }
.biz-card-body .biz-logo { margin-top: -22px; border: 3px solid var(--surface); }
.biz-card-body > div { padding-top: 8px; min-width: 0; }
.biz-card-body b { display: flex; align-items: center; gap: 4px; font-size: 15.5px; }
.biz-card-body small { display: block; }
.biz-card-body p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); }
.biz-strip { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--grad-soft); transition: border-color .2s; }
.biz-strip:hover { border-color: var(--violet); }
.biz-strip-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.biz-strip-t small { color: var(--muted); font-size: 13px; }
.biz-strip-go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--violet); white-space: nowrap; }
.biz-strip.add .biz-logo { background: var(--surface); color: var(--violet); border: 1.5px dashed var(--violet); }
@media (max-width: 480px) { .biz-strip-go { display: none; } }
.biz-hours-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.bh-row { display: grid; grid-template-columns: 110px 1fr auto 1fr auto; gap: 8px; align-items: center; }
.bh-row .input { padding: 8px 10px; min-width: 0; }
@media (max-width: 520px) { .bh-row { grid-template-columns: 1fr 1fr; } .bh-row > span { display: none; } }
.biz-logo-edit { max-width: 140px; }
.biz-map-prev { margin-top: 10px; border-radius: 12px; max-width: 100%; }
.biz-rte { min-height: 180px; }
.biz-del { padding: 0 16px 40px; text-align: center; }

/* ---------------- Grup Pro ---------------- */
.d-block { display: block; margin-top: 6px; }
.sec-title.flat { border-top: 0; }
.grp-list { display: flex; flex-direction: column; }
.grp-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); transition: background .2s; }
.grp-card:hover { background: var(--hover); }
.grp-av { width: 56px; height: 56px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 22px; overflow: hidden; flex: none; }
.grp-av img { width: 100%; height: 100%; object-fit: cover; }
.grp-card-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.grp-card-t small { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.grp-desc { font-size: 14px; color: var(--text-2); }
.grp-logo { border-radius: 26px; }
.grp-compose { display: block !important; border-bottom: 1px solid var(--border); }
.post-ctx.grp a { color: var(--violet); font-weight: 700; }
.grp-text { font-size: 15.5px; line-height: 1.6; color: var(--text-2); }
.grp-mem { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.grp-mem-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grp-mem-t .name { display: inline-flex; align-items: center; gap: 4px; }
.grp-role { font-weight: 800; color: var(--violet); }
.grp-role.r-admin { color: var(--pink); } .grp-role.r-moderator { color: var(--teal); }
.grp-invite { margin: 16px 16px 0; }
.grp-invite-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grp-invite-row .input { flex: 1 1 240px; font-size: 13.5px; }
.seg-radio { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 560px) { .seg-radio { grid-template-columns: 1fr 1fr; } }
.radio-card { display: flex; gap: 10px; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.radio-card:has(input:checked) { border-color: var(--violet); background: var(--grad-soft); }
.radio-card input { accent-color: var(--violet); margin-top: 3px; }
.radio-card span { display: flex; flex-direction: column; gap: 3px; }
.radio-card b { display: inline-flex; align-items: center; gap: 6px; }
.radio-card small { color: var(--muted); font-size: 13px; }
.n-ic.n-grp { background: var(--grad); color: #fff; }
