/* =============================================================
   POPAKA — Design System (พอร์ตจาก design_handoff index.html)
   สี Pond Theme v2: ขาว/แดง#ff0202/น้ำเงิน#1400ff/เหลือง#ffe500
   ฟอนต์: JS Synjai (หัวข้อ/ชื่อ) · Sarabun (เนื้อหา/คอมเมนต์) · Poppins/EN
   ============================================================= */

/* JS Synjai — JSSynjai.ttf = หนัก(ชื่อ/หัวข้อ), JSSynjaiBold.ttf = เบากว่า(body) */
@font-face {
  font-family: 'JS Synjai';
  src: url('fonts/JSSynjaiBold.ttf') format('truetype');
  font-weight: 300 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JS Synjai';
  src: url('fonts/JSSynjai.ttf') format('truetype');
  font-weight: 600 800; font-style: normal; font-display: swap;
}
/* Sarabun — ฟอนต์เนื้อหายาว (โพสต์/คอมเมนต์/bio) */
@font-face {
  font-family: 'Sarabun';
  src: url('fonts/Sarabun-Light.ttf') format('truetype');
  font-weight: 300 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Sarabun';
  src: url('fonts/Sarabun-Thin.ttf') format('truetype');
  font-weight: 100 200; font-style: normal; font-display: swap;
}

:root {
  --white: #ffffff;
  --red: #ff0202;
  --blue: #1400ff;
  --yellow: #ffe500;
  --ink: #15131a;
  --ink-soft: #6b6772;
  --line: rgba(20, 19, 26, 0.055);
  --line-strong: rgba(20, 19, 26, 0.10);
  --card: #ffffff;
  --bg: #ffffff;
  --border: #15131a;
  --accent: var(--red);
  --radius: 18px;
  --shadow: 0 1px 0 rgba(20,19,26,0.04), 0 6px 22px rgba(20,19,26,0.07);
  --shadow-lg: 0 18px 60px rgba(20,19,26,0.18);
  --font-head: 'JS Synjai', 'Mali', 'Noto Sans Thai', sans-serif;
  --font-body: 'JS Synjai', 'Noto Sans Thai', 'Poppins', sans-serif;
  --font-read: 'Sarabun', 'Noto Sans Thai', sans-serif;
  --font-en: 'JS Synjai', 'Poppins', sans-serif;
  --maxw: 620px;
  --shell: 1080px;
  /* aliases ให้สไตล์เดิม (feed/profile) ไม่พัง */
  --muted: var(--ink-soft);
  --grid: var(--line);
}

/* ---------- Dark mode ---------- */
body.dark {
  --white: #16151c;
  --ink: #f3f1f7;
  --ink-soft: #9d99a8;
  --line: rgba(255,255,255,0.05);
  --line-strong: rgba(255,255,255,0.09);
  --card: #1f1e27;
  --bg: #121119;
  --border: #2e2c39;
  --shadow: 0 1px 0 rgba(0,0,0,0.2), 0 6px 22px rgba(0,0,0,0.35);
  --shadow-lg: 0 18px 60px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, .brand, button, .btn { font-family: var(--font-head); }

::selection { background: var(--yellow); color: var(--ink); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); background-clip: padding-box; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(0.85); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes shake { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-4px)} 40%,60%{transform:translateX(4px)} }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* ---------- TopNav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: var(--shell); margin: 0 auto; padding: 11px 20px;
  display: flex; align-items: center; gap: 12px;
}
.brand-logo { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand-logo:hover { text-decoration: none; }
.brand-mark { width: 60px; height: 60px; display: block; flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgb(255, 255, 255)); }
.brand-word { height: 25px; width: auto; display: block; flex-shrink: 0; }
.topnav-menu { display: flex; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 11px;
  color: var(--ink-soft); font-family: var(--font-body); font-weight: 600; font-size: 15px;
  transition: all .15s;
}
.nav-item:hover { background: var(--bg); text-decoration: none; }
.nav-item.active { background: var(--bg); color: var(--accent); }
.topnav-right {
  display: flex; align-items: center; gap: 18px;
  padding-left: 18px; margin-left: 6px; border-left: 1px solid var(--line);
}
.nav-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px; border: none; background: transparent;
  color: var(--ink-soft); transition: all .15s;
}
.nav-bell:hover { background: var(--bg); color: var(--accent); }
.nav-logout { display: flex; color: var(--ink-soft); padding: 7px; border-radius: 9px; }
.nav-logout:hover { background: var(--bg); text-decoration: none; }

@media (max-width: 540px) { .nav-label { display: none; } }

/* ---------- กระดิ่งแจ้งเตือน ---------- */
.nav-bell-wrap { position: relative; }
.bell-badge { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--card); font-family: var(--font-en); }
.notif-panel { position: absolute; top: 120%; right: 0; width: 360px; max-width: 92vw; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden; animation: sheetIn .2s ease; }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.notif-panel-head span { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); }
.notif-panel-head button { background: none; border: none; color: var(--blue); font-weight: 600; font-size: 13px; cursor: pointer; font-family: var(--font-body); }
.notif-list { max-height: 70vh; overflow-y: auto; }
.notif-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-row:hover { text-decoration: none; filter: brightness(0.98); }
.notif-row.unread { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.notif-ava-wrap { position: relative; flex-shrink: 0; }
.notif-type { position: absolute; bottom: -2px; right: -2px; font-size: 14px; background: var(--card); border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.notif-msg { flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink); line-height: 1.45; }
.notif-msg b { font-family: var(--font-head); }
.notif-time { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.notif-empty { padding: 44px 20px; text-align: center; color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }

/* ---------- Layout shells ---------- */
.shell { max-width: var(--shell); margin: 0 auto; padding: 24px 20px 80px; }
.container { max-width: 720px; margin: 0 auto; padding: 28px 16px 60px; }
.col-feed { max-width: var(--maxw); margin: 0 auto; }

/* ---------- Avatar (base) ---------- */
.avatar {
  border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #888; color: #fff; overflow: hidden;
  font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em;
  user-select: none; width: 44px; height: 44px; font-size: 17px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.22);
}
a.avatar:hover { text-decoration: none; filter: brightness(1.06); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.has-img { background: var(--bg) !important; }
.avatar.ring {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.22),
              0 0 0 2px var(--card),
              0 0 0 4px color-mix(in srgb, var(--ring, #c97b3a) 65%, var(--line-strong));
}
.nav-avatar { width: 34px; height: 34px; font-size: 13px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.22),
              0 0 0 2px var(--card),
              0 0 0 3px color-mix(in srgb, var(--ring, #c97b3a) 65%, var(--line-strong)); }

/* ---------- Card ---------- */
.card {
  background: var(--white);
  border: 1px solid #ececec;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer;
  border: none; border-radius: 999px;
  padding: 12px 26px; font-size: 1rem; font-weight: 600;
  transition: transform .06s ease, filter .15s ease;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 34px; font-size: 1.1rem; }
.btn-red  { background: var(--red);  color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }

/* ---------- Flash (toast ลอยกลางบน ใช้ได้ทุกหน้า) ---------- */
.flash-zone {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 200; width: 92%; max-width: 480px;
}
.flash {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 10px; font-weight: 500;
  box-shadow: var(--shadow);
}
.flash-error   { background: #fff0f0; color: var(--red); border: 1px solid var(--red); }
.flash-success { background: #fffbe0; color: #8a7400; border: 1px solid var(--yellow); }

/* main เปล่า (หน้า landing คุมขนาดเองภายใน) */
.bare { max-width: none; margin: 0; padding: 0; }

/* ---------- Landing (ตาม Landing.jsx — centered, read panel กรอบแดง) ---------- */
.landing-screen { min-height: 100vh; display: flex; flex-direction: column; animation: fadeIn .4s ease; }
.landing-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 36px 22px; }
.landing-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: stretch;
  width: 100%; max-width: 1380px;
}

/* ซ้าย: read panel */
.read-panel {
  border: 3px solid var(--red); border-radius: 24px; padding: 46px 52px 42px;
  background: var(--card); box-shadow: var(--shadow); min-width: 0;
}
.read-title {
  font-family: var(--font-head); font-weight: 700; margin: 0 0 0 0%;
  font-size: clamp(40px, 4.6vw, 62px); line-height: 1.1; color: var(--ink);
  display: inline-block; border-bottom: 5px solid var(--ink); padding-bottom: 10px;
}
.c-red { color: var(--red); }
.read-list { list-style: none; margin: 70px 0 0; padding: 0; display: flex; flex-direction: column; gap: 26px; }
.read-item { display: flex; gap: 17px; align-items: flex-start; }
.read-emoji { font-size: 30px; line-height: 1.3; flex-shrink: 0; }
.read-h { font-weight: 600; font-size: 25px; line-height: 1.45; color: var(--ink); }
.read-b { font-size: 20px; line-height: 1.55; color: var(--ink-soft); margin-top: 4px; }

/* ขวา: welcome panel */
.welcome-wrap { display: flex; align-items: center; justify-content: center; }
.welcome-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 8px; text-align: center; width: 100%;
}
.welcome-logo { display: flex; align-items: center; gap: 0px; margin-bottom: 20px; }
.wl-mark { width: 140px; height: 140px; display: block; filter: drop-shadow(0 3px 8px rgba(255,2,2,0.28)); }
.wl-word { height: 90px; width: auto; display: block; }
.welcome-sub { color: var(--ink-soft); font-size: 19px; margin: 22px 0 34px; max-width: 400px; line-height: 1.5; }

.btn-getkey3d {
  width: 100%; max-width: 440px; padding: 22px 26px; margin-bottom: 18px;
  border: 2px solid var(--border); border-radius: 16px; background: var(--card);
  font-family: var(--font-head); font-weight: 600; font-size: 24px; color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 3px 0 var(--border); transition: transform .12s, box-shadow .12s;
}
.btn-getkey3d svg { width: 26px; height: 26px; }
.btn-getkey3d:active { transform: translateY(3px); box-shadow: 0 0 0 var(--border); }
.welcome-loginform { display: contents; }
.key-input2 {
  width: 100%; max-width: 440px; padding: 21px 24px; margin-bottom: 18px;
  border: 2px solid var(--border); border-radius: 16px; font-size: 20px;
  font-family: var(--font-en); color: var(--ink); background: var(--card);
  outline: none; text-align: center;
}
.key-input2:focus { border-color: var(--red); }
.btn-login2 {
  width: 100%; max-width: 440px; padding: 21px 26px; border: none; border-radius: 16px;
  background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 23px;
  box-shadow: 0 8px 22px rgba(255,2,2,0.32); transition: transform .12s;
}
.btn-login2:active { transform: scale(0.97); }
.brand-credit {
  margin-top: 115px; color: var(--blue); font-family: var(--font-en);
  font-weight: 500; font-size: 15px; letter-spacing: 0.04em;
}

/* แถบภาษา */
.lang-bar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 22px 16px 30px; }
.lang {
  background: none; border: none; cursor: pointer; padding: 8px 16px; border-radius: 8px;
  font-size: 17px; font-family: var(--font-body); color: var(--ink-soft); font-weight: 400;
}
.lang:hover { color: var(--ink); }
.lang.active { color: var(--ink); font-weight: 700; }
.lang.shake { animation: shake .4s; color: var(--red); }

@media (max-width: 760px) { .landing-grid { grid-template-columns: 1fr; } }

/* ---------- Key created (match KeyCreatedModal) ---------- */
.keypage { display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px 48px; }
.key-card {
  width: min(720px, 100%); background: var(--card); border-radius: 28px;
  border: 3px solid var(--red); box-shadow: var(--shadow-lg); padding: 48px 52px 44px;
  animation: sheetIn .3s cubic-bezier(.2,.8,.2,1);
}
.key-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.key-emoji { font-size: 36px; }
.key-title { font-family: var(--font-head); font-weight: 700; font-size: 36px; margin: 0; color: var(--ink); }
.key-desc { color: var(--ink-soft); font-size: 20px; margin: 0 0 24px; line-height: 1.55; }
.key-value {
  background: var(--bg); border: 2px dashed var(--border); border-radius: 16px;
  padding: 22px 26px; font-family: var(--font-en); font-size: 22px; font-weight: 500;
  word-break: break-all; line-height: 1.5; color: var(--ink); user-select: all;
}
.key-copy {
  width: 100%; margin-top: 18px; padding: 19px; border-radius: 14px;
  border: 2px solid var(--border); background: var(--card); color: var(--ink);
  font-family: var(--font-head); font-weight: 600; font-size: 21px;
  display: flex; align-items: center; justify-content: center; gap: 11px; transition: all .15s;
}
.key-copy svg { width: 24px; height: 24px; }
.key-copy.copied { background: var(--ink); color: #fff; }
.key-warn { margin-top: 24px; background: var(--yellow); border-radius: 20px; padding: 24px 28px; border: 2px solid #d9b800; }
.key-warn-head { display: flex; gap: 13px; align-items: center; margin-bottom: 14px; }
.key-warn-head span { font-size: 34px; flex-shrink: 0; }
.key-warn-head div { font-family: var(--font-head); font-weight: 700; font-size: 27px; color: #3a3300; line-height: 1.2; }
.key-warn ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.key-warn li { display: flex; gap: 10px; align-items: flex-start; font-size: 21px; line-height: 1.45; color: #3a3300; font-weight: 600; }
.key-warn .dot { color: var(--red); flex-shrink: 0; }
.key-warn b { color: var(--red); font-weight: 700; }
.key-enter {
  display: block; text-align: center; width: 100%; margin-top: 26px; padding: 23px; border-radius: 16px;
  background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 25px;
  box-shadow: 0 8px 22px rgba(255,2,2,0.32); transition: transform .12s;
}
.key-enter:hover { text-decoration: none; }
.key-enter:active { transform: scale(0.98); }

/* ---------- Placeholder ---------- */
.placeholder-card { text-align: center; }
.placeholder-card h2 { color: var(--blue); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: .95rem; z-index: 400; opacity: 0; transition: all .25s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Avatar ---------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-family: "Mali", sans-serif; font-size: 1.2rem;
}
.avatar-sm { width: 32px; height: 32px; font-size: .95rem; }

/* ---------- Feed ---------- */
.feed { display: flex; flex-direction: column; gap: 20px; }
.card.composer-trigger, .card.post-card { padding: 22px 24px; }

/* แถบเปิด modal */
.composer-trigger { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.composer-trigger:hover { background: #fafaff; }
.trigger-text {
  flex: 1; color: var(--muted); font-size: 1.05rem;
  background: #f0f2f5; border-radius: 999px; padding: 12px 18px;
}
.btn-sm { padding: 8px 18px; font-size: .9rem; }
.file-name { color: var(--muted); font-size: .85rem; display: block; margin: 6px 2px; }

/* ---------- Modal สร้างโพสต์ ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20, 0, 80, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--white); border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 12px 48px rgba(0,0,0,.3);
  animation: popIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(.95); opacity: .6; } to { transform: scale(1); opacity: 1; } }

.modal-head {
  display: flex; align-items: center; justify-content: center; position: relative;
  padding: 16px 20px; border-bottom: 1px solid #eee;
}
.modal-head h3 { margin: 0; font-size: 1.3rem; }
.modal-close {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: #eceff3; color: #555; font-size: 1rem; line-height: 1;
}
.modal-close:hover { background: #e0e3e8; }

.modal form { padding: 18px 20px 22px; }
.modal-user { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-username { font-family: "Mali", sans-serif; font-weight: 600; font-size: 1.05rem; }
.privacy-badge {
  display: inline-block; margin-top: 4px;
  background: #e4e6eb; color: #333; font-size: .82rem; font-weight: 600;
  padding: 3px 12px; border-radius: 8px;
}
.modal-textarea {
  width: 100%; border: none; resize: none; font-family: inherit;
  font-size: 1.35rem; line-height: 1.5; min-height: 130px; padding: 4px 2px;
}
.modal-textarea:focus { outline: none; }
.modal-textarea::placeholder { color: #aab; }

.composer-preview {
  max-width: 100%; max-height: 320px; border-radius: 12px; margin: 8px 0;
  object-fit: cover; border: 1px solid #eee;
}

/* แถบ "เพิ่มลงในโพสต์ของคุณ" */
.add-bar {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #dcdfe4; border-radius: 12px;
  padding: 10px 14px; margin: 14px 0 18px;
}
.add-bar-label { flex: 1; font-weight: 600; color: var(--ink); font-size: .95rem; }
.add-icons { display: flex; gap: 6px; }
.add-ico {
  background: none; border: none; cursor: pointer; font-size: 1.4rem;
  width: 40px; height: 40px; border-radius: 50%; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.add-ico:hover { background: #f0f2f5; }
.modal-post-btn { font-size: 1.2rem; padding: 14px; }

/* การ์ดโพสต์ */
.post-head { display: flex; align-items: center; gap: 16px; }
.post-meta { display: flex; flex-direction: column; gap: 4px; line-height: 1.35; flex: 1; }
.post-author { font-family: "Mali", sans-serif; font-weight: 600; color: var(--ink); font-size: 1.1rem; }
.post-time { color: var(--muted); font-size: .85rem; }
.btn-del, .cmt-del {
  background: none; border: none; cursor: pointer; font-size: 1.05rem;
  color: var(--muted); padding: 4px 6px; border-radius: 6px; line-height: 1;
}
.btn-del:hover, .cmt-del:hover { background: #fff0f0; color: var(--red); }
.post-content { margin: 16px 2px 4px; font-size: 1.08rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.post-image {
  width: 100%; max-height: 520px; object-fit: cover;
  border-radius: 12px; margin: 10px 0; display: block;
}

/* แถบไลก์/คอมเมนต์ */
.post-bar {
  display: flex; gap: 8px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}
.like-btn, .cmt-toggle {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: none; border: none; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-family: inherit; font-size: .95rem; font-weight: 500;
}
.like-btn:hover, .cmt-toggle:hover { background: #f5f5f5; }
.like-ico { font-size: 1.15rem; line-height: 1; }
.like-btn.liked { color: var(--red); }
.like-btn.liked .like-ico { transform: scale(1.15); }

/* โซนคอมเมนต์ */
.comments { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.comments.open { display: block; }
.comment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-body {
  background: #f5f6ff; border-radius: 12px; padding: 8px 14px; flex: 1;
  display: flex; flex-direction: column; line-height: 1.4;
}
.comment-author { font-weight: 600; color: var(--ink); font-size: .92rem; }
.comment-text { font-size: 1rem; word-break: break-word; white-space: pre-wrap; }
.comment-time { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.comment-form { display: flex; gap: 8px; }
.comment-input {
  flex: 1; padding: 10px 16px; border: 2px solid #ececec; border-radius: 999px; font-size: .95rem;
}
.comment-input:focus { outline: none; border-color: var(--blue); }

.empty-feed { text-align: center; color: var(--ink); }
.empty-feed p { margin: 6px 0; font-size: 1.1rem; }

/* avatar เป็นลิงก์ไปโปรไฟล์ */
.avatar-link { text-decoration: none; cursor: pointer; transition: filter .12s ease; }
.avatar-link:hover { filter: brightness(1.08); text-decoration: none; }
.post-author { cursor: pointer; }
.post-author:hover { text-decoration: underline; }

/* ---------- Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; }
.avatar-lg { width: 72px; height: 72px; font-size: 2rem; }
.profile-info { flex: 1; }
.profile-name-row { display: flex; align-items: center; gap: 10px; }
.profile-name-row h2 { margin: 0; font-size: 1.5rem; }
.profile-sub { color: var(--muted); font-size: .92rem; margin-top: 4px; }

.name-form { display: flex; flex-direction: column; gap: 10px; }
.name-label { font-family: "Mali", sans-serif; font-weight: 600; color: var(--ink); }
.name-row { display: flex; gap: 10px; }
.name-input {
  flex: 1; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 1rem;
}
.name-input:focus { outline: none; border-color: var(--blue); }

.section-title {
  font-family: "Mali", sans-serif; font-size: 1.2rem; margin: 6px 2px -4px;
}
.section-title .muted { font-weight: 400; font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .landing2 { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .rules-panel {
    border-right: none; border-bottom: 1px solid #eee;
    padding: 36px 24px; justify-content: flex-start;
  }
  .action-panel { padding: 36px 24px; }
  .nav-links { gap: 10px; }
  .nav-user { display: none; }
}

/* =============================================================
   POPAKA Feed (รอบ 2 — port จาก Feed.jsx) — override ของเก่า
   ============================================================= */
.feed { display: flex; flex-direction: column; gap: 18px; }

/* composer */
.composer { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow); position: relative; }
.composer-emoji-pop { position: absolute; top: 100%; right: 12px; margin-top: 6px; z-index: 30;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 10px; width: 268px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
.composer-emoji-pop button { background: none; border: none; font-size: 23px; padding: 6px 0; border-radius: 9px; cursor: pointer; }
.composer-emoji-pop button:hover { background: var(--bg); }
.composer-top { display: flex; gap: 11px; align-items: center; }
.composer-trigger {
  flex: 1; text-align: left; border: none; background: var(--bg); border-radius: 999px;
  padding: 13px 20px; font-size: 16px; color: var(--ink-soft); font-family: var(--font-body); cursor: pointer;
}
.composer-trigger:hover { filter: brightness(0.97); }
.composer-bottom { display: flex; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.composer-quick {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: none; border: none; color: var(--ink-soft); font-weight: 600; font-size: 14.5px;
  padding: 8px; border-radius: 9px; font-family: var(--font-body); cursor: pointer;
}
.composer-quick:hover { background: var(--bg); }
.cq-green { color: #16a34a; display: flex; }
.cq-emoji { font-size: 18px; }

/* create-post modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(20,19,26,0.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px 16px; overflow-y: auto;
  animation: overlayIn .22s ease;
}
.cmodal { width: min(560px, 100%); background: var(--card); border-radius: 22px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: sheetIn .28s cubic-bezier(.2,.8,.2,1); }
.cmodal-head { position: relative; text-align: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmodal-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--ink); }
.cmodal-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--bg); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cmodal-user { display: flex; gap: 11px; align-items: center; padding: 16px 20px 6px; }
.cmodal-name { font-family: var(--font-head); font-weight: 700; font-size: 16.5px; color: var(--ink); }
.privacy-badge { display: inline-block; margin-top: 4px; background: var(--bg); color: var(--ink); font-size: 13.5px; font-weight: 600; padding: 4px 11px; border-radius: 8px; }
.cmodal-textarea { width: 100%; border: none; outline: none; resize: none; background: transparent; font-size: 20px; line-height: 1.5; color: var(--ink); font-family: var(--font-body); min-height: 150px; max-height: 32vh; padding: 8px 20px 4px; }
.cmodal-textarea.has-preview { min-height: 70px; }   /* พอแนบรูป ช่องแคปชั่นหดลง (ตามดีไซน์) */
.cmodal-preview-wrap { position: relative; margin: 6px 20px 10px; }
.cmodal-preview { display: block; width: 100%; border-radius: 14px; border: 1px solid var(--border); }
.preview-remove { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(20,19,26,0.72); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.preview-remove:hover { background: rgba(20,19,26,0.9); }
.add-bar { margin: 6px 20px 0; position: relative; border: 2px solid var(--red); border-radius: 14px; padding: 11px 16px; display: flex; align-items: center; gap: 10px; }
.add-bar-label { flex: 1; font-weight: 600; font-size: 15.5px; color: var(--ink); }
.add-icons { display: flex; gap: 4px; }
.add-ico { background: none; border: none; padding: 4px; border-radius: 9px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 23px; line-height: 1; }
.add-ico.soon { opacity: 0.5; }
.emoji-pop { position: absolute; bottom: 105%; right: 16px; z-index: 20; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px; width: 268px; display: grid; grid-template-columns: repeat(6,1fr); gap: 2px; }
.emoji-pop button { background: none; border: none; font-size: 23px; padding: 6px 0; border-radius: 9px; cursor: pointer; }
.emoji-pop button:hover { background: var(--bg); }
.cmodal-post { display: block; width: calc(100% - 40px); margin: 16px 20px 20px; padding: 15px; border-radius: 999px; border: none; background: linear-gradient(180deg,#ff4040 0%,var(--red) 60%,#d10000 100%); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 19px; box-shadow: 0 8px 22px rgba(255,2,2,0.32); cursor: pointer; }
.file-name { display: block; color: var(--ink-soft); font-size: 13px; margin: 2px 20px; }

/* post card */
.post-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); animation: fadeUp .3s ease; }
.post-head { display: flex; align-items: center; gap: 11px; }
.post-meta { flex: 1; min-width: 0; }
.post-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-name { font-family: var(--font-head); font-weight: 600; font-size: 16.5px; color: var(--ink); }
.post-name:hover { text-decoration: underline; }
.trust-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; padding: 1px 8px; border-radius: 999px; background: var(--line); }
.post-sub { font-size: 12px; color: var(--ink-soft); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.dot-sep { opacity: .5; }
.post-del-wrap { position: relative; }
.post-del { background: none; border: none; color: var(--ink-soft); padding: 7px; border-radius: 9px; cursor: pointer; display: flex; }
.post-del:hover { background: #fff0f0; color: var(--red); }
.del-confirm { position: absolute; right: 0; top: 110%; z-index: 30; width: 180px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; }
.del-confirm-text { font-size: 13.5px; color: var(--ink-soft); padding: 4px 8px 8px; }
.del-confirm-actions { display: flex; gap: 6px; }
.del-cancel { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--ink); font-weight: 600; font-size: 13.5px; font-family: var(--font-body); cursor: pointer; }
.del-cancel:hover { background: var(--bg); }
.del-ok { flex: 1; padding: 8px; border-radius: 8px; border: none; background: var(--red); color: #fff; font-weight: 600; font-size: 13.5px; font-family: var(--font-body); cursor: pointer; }
.del-ok:hover { filter: brightness(1.05); }
.post-body { font-family: var(--font-read); font-size: 17px; line-height: 1.65; color: var(--ink); margin: 13px 0 0; white-space: pre-wrap; word-break: break-word; }
.post-image { width: 100%; border-radius: 14px; margin-top: 13px; border: 1px solid var(--border); display: block; }
.post-actions { display: flex; margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); }
.pa-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 6px; border: none; background: none; border-radius: 9px; color: var(--ink-soft); font-weight: 600; font-size: 13px; font-family: var(--font-body); cursor: pointer; }
.pa-btn:hover { background: var(--bg); }
.pa-ico { display: flex; }
.pa-div { width: 1px; background: var(--line); margin: 8px 0; }
.pa-count { display: none; }
.pa-btn.has-count .pa-count { display: inline; }
.pa-btn.has-count .pa-label { display: none; }
.like-btn.liked { color: var(--red); }
.like-btn.liked .pa-ico svg { fill: var(--red); }

/* comments */
.comments { display: none; margin-top: 14px; }
.comments.open { display: block; }
.comment-list { display: flex; flex-direction: column; }
.comment { display: flex; gap: 9px; align-items: flex-start; padding-top: 12px; }
.comment:first-child { padding-top: 0; }
.comment-main { flex: 1; min-width: 0; }
.comment-author { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--ink); display: block; margin-bottom: 3px; }
.comment-author:hover { text-decoration: underline; }
.comment-bubble { background: var(--bg); border-radius: 14px; padding: 8px 13px; display: inline-block; max-width: 100%; font-family: var(--font-read); font-size: 14.5px; color: var(--ink); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.comment-foot { display: flex; gap: 12px; align-items: center; margin-top: 3px; padding-left: 4px; }
.comment-time { font-size: 12px; color: var(--ink-soft); }
.comment-del { background: none; border: none; color: var(--ink-soft); font-size: 12px; font-weight: 600; padding: 0; cursor: pointer; font-family: var(--font-body); }
.comment-del:hover { color: var(--red); }
.comment-form { display: flex; gap: 9px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.comment-input { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; font-size: 14.5px; outline: none; background: var(--bg); color: var(--ink); font-family: var(--font-body); }
.comment-send { background: none; border: none; color: var(--accent); padding: 6px; display: flex; cursor: pointer; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }

.feed-empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.fe-emoji { font-size: 40px; margin-bottom: 10px; }
.fe-title { font-family: var(--font-head); font-size: 18px; color: var(--ink); }
.fe-sub { font-size: 14.5px; margin-top: 4px; }

/* =============================================================
   POPAKA Profile (รอบ 2 — port จาก Profile.jsx)
   ============================================================= */
.profile { animation: fadeIn .3s ease; }
.prof-header { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; padding: 22px 4px 0; }
.prof-avatar-wrap { position: relative; width: 138px; height: 138px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--card), 0 0 0 6px color-mix(in srgb, var(--gem) 65%, var(--line-strong)); }
.prof-avatar { width: 138px; height: 138px; font-size: 52px; }
.prof-avatar-cam { position: absolute; right: 4px; bottom: 4px; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--card); background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow); }
.prof-avatar-del { position: absolute; left: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--card); background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow); }
.prof-id { flex: 1; min-width: 240px; }
.prof-name { font-family: var(--font-head); font-weight: 700; font-size: clamp(28px, 3.6vw, 42px); margin: 14px 0 0; color: var(--ink); line-height: 1.1; }
.prof-name-input { width: 100%; max-width: 460px; margin-top: 14px; border: 2px solid var(--accent); border-radius: 12px;
  padding: 8px 14px; font-family: var(--font-head); font-weight: 700; font-size: clamp(24px, 3vw, 38px); color: var(--ink); background: var(--card); outline: none; }
.edit-actions { display: flex; gap: 8px; }
.ps-bio-input { width: 100%; min-height: 84px; border: 2px solid var(--accent); border-radius: 12px; padding: 10px 13px;
  font-family: var(--font-body); font-size: 15.5px; color: var(--ink); background: var(--card); outline: none; resize: vertical; line-height: 1.5; }
.bio-count { text-align: right; font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.prof-rank { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.prof-rank-text { font-family: var(--font-head); font-weight: 600; font-size: 15.5px; color: var(--ink-soft); }
.btn-edit-prof { padding: 11px 20px; border-radius: 999px; border: none; background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 15.5px; box-shadow: 0 6px 16px rgba(255,2,2,0.28); cursor: pointer; white-space: nowrap; }
.btn-cancel { padding: 11px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--ink-soft); font-weight: 600; font-size: 15px; cursor: pointer; font-family: var(--font-body); }
.btn-endorse { display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px; border-radius: 999px; border: 2px solid var(--blue); background: transparent; color: var(--blue); font-family: var(--font-head); font-weight: 700; font-size: 15.5px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.btn-endorse.endorsed { background: var(--blue); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--blue) 32%, transparent); }

.prof-tabs { display: flex; align-items: center; gap: 6px; margin-top: 22px; border-bottom: 1px solid var(--border); }
.prof-tab { background: none; border: none; padding: 12px 20px; font-family: var(--font-head); font-weight: 500; font-size: 17px; color: var(--ink-soft); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.prof-tab.active { font-weight: 700; color: var(--ink); border-bottom-color: var(--accent); }
.prof-tab-spacer { flex: 1; }
.prof-warn { color: var(--red); font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 5px; padding-right: 6px; }

.prof-grid { display: grid; grid-template-columns: 360px 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.prof-side { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; position: sticky; top: 104px; }
.ps-title { text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 12px; }
.ps-bio { font-family: var(--font-read); text-align: center; font-size: 16.5px; line-height: 1.65; color: var(--ink); min-height: 30px; word-break: break-word; white-space: pre-wrap; }
.ps-bio.empty { color: var(--ink-soft); }
.ps-divider { height: 1px; background: var(--line); margin: 18px 0; }
.ps-stats { display: flex; flex-direction: column; gap: 12px; }
.ps-stat { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-soft); }
.ps-stat span:first-child { font-size: 19px; }
.ps-stat strong { color: var(--ink); font-weight: 700; }

.prof-main { min-width: 0; }
.prof-posts-head { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 20px; margin-bottom: 16px; }
.pph-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--ink); }
.pph-spacer { flex: 1; }
.pph-manage { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; color: var(--ink-soft); font-weight: 600; font-size: 15px; padding: 7px 12px; border-radius: 9px; font-family: var(--font-body); cursor: pointer; }
.pph-manage:hover, .pph-manage.active { background: var(--bg); color: var(--accent); }
.manage-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 10px; }
.manage-thumb { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.manage-info { flex: 1; min-width: 0; }
.manage-text { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-time { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.manage-del-wrap { position: relative; flex-shrink: 0; }
.manage-del { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--red); background: var(--card); color: var(--red); font-weight: 600; font-size: 13.5px; padding: 8px 13px; border-radius: 9px; font-family: var(--font-body); cursor: pointer; white-space: nowrap; }
.manage-del:hover { background: #fff0f0; }
.prof-main .composer { margin-bottom: 16px; }
#postsNormal { display: flex; flex-direction: column; gap: 18px; }   /* ระยะห่างการ์ดโพสต์ในโปรไฟล์ ให้เท่าฟีด */
/* composer ในโปรไฟล์: ปุ่มเกาะกลุ่มชิดซ้าย (ไม่สเปรดเต็มความกว้างแบบฟีด) ตามดีไซน์ */
.composer-prof .composer-bottom { justify-content: flex-start; flex-wrap: wrap; gap: 4px; }
.composer-prof .composer-quick { flex: 0 0 auto; gap: 9px; padding: 9px 12px; font-size: 15px; }

/* trust progress */
.trust-prog .tp-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; color: var(--ink-soft); }
.trust-prog .tp-top strong { color: var(--ink); }
.tp-bar { height: 9px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gem), color-mix(in srgb, var(--gem) 55%, var(--blue))); }

/* rank emblem */
.rank-emblem { position: relative; width: calc(var(--s) * 1.7); height: var(--s); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.re-wing { position: absolute; top: 50%; width: calc(var(--s) * 0.62); height: calc(var(--s) * 0.42); background: linear-gradient(90deg,#ffd24a,#f5a623); clip-path: polygon(0 50%,60% 0,100% 18%,78% 50%,100% 82%,60% 100%); opacity: .92; }
.re-wing-l { left: 50%; transform: translate(-50%,-50%) translateX(calc(var(--s) * -0.5)) scaleX(-1); }
.re-wing-r { left: 50%; transform: translate(-50%,-50%) translateX(calc(var(--s) * 0.5)); }
.re-gem { position: relative; width: calc(var(--s) * 0.82); height: calc(var(--s) * 0.82); border-radius: 11px; transform: rotate(45deg);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--gem) 35%, #fff), var(--gem) 55%, color-mix(in srgb, var(--gem) 60%, #000));
  box-shadow: 0 0 18px color-mix(in srgb, var(--gem) 70%, transparent), inset 0 0 0 2px rgba(255,255,255,0.45); z-index: 1; }
.re-lv { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-45deg); font-family: var(--font-head); font-weight: 700; font-size: calc(var(--s) * 0.34); color: #fff; }

@media (max-width: 820px) { .prof-grid { grid-template-columns: 1fr; } .prof-side { position: static; } }

/* =============================================================
   POPAKA Leaderboard (รอบ 3 — port จาก Leaderboard.jsx)
   ============================================================= */
.leaderboard { animation: fadeIn .3s; }
.lb-head { text-align: center; padding: 8px 0 18px; }
.lb-trophy { font-size: 30px; }
.lb-title { font-family: var(--font-head); font-weight: 700; font-size: 26px; margin: 6px 0 4px; color: var(--ink); }
.lb-sub { color: var(--ink-soft); font-size: 14.5px; margin: 0; line-height: 1.5; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin-bottom: 22px; }
.podium-col { flex: 1; max-width: 150px; display: flex; flex-direction: column; align-items: center; }
.podium-ava-wrap { position: relative; margin-bottom: 8px; padding: 3px; border-radius: 50%; background: linear-gradient(135deg, var(--gem), color-mix(in srgb, var(--gem) 50%, #fff)); }
.podium-ava { width: 58px; height: 58px; font-size: 22px; border: 3px solid var(--card); }
.podium-ava.first { width: 72px; height: 72px; font-size: 27px; }
.podium-crown { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font-size: 26px; }
.podium-name { font-family: var(--font-head); font-weight: 700; font-size: 14.5px; color: var(--ink); text-align: center; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-rank-lbl { font-size: 12px; font-weight: 700; margin-top: 2px; }
.podium-bar { margin-top: 8px; width: 100%; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--gem) 22%, var(--card)), var(--card)); border: 1px solid var(--border); border-bottom: none; display: flex; flex-direction: column; align-items: center; padding-top: 12px; }
.podium-num { font-size: 24px; font-weight: 800; font-family: var(--font-head); }
.podium-score { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.lb-mine { display: flex; align-items: center; gap: 13px; background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 13px 18px; margin-bottom: 16px; }
.lb-mine-rank { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--accent); width: 40px; text-align: center; }
.lb-mine-info { flex: 1; min-width: 0; }
.lb-mine-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); }
.lb-mine-lvl { font-size: 13px; color: var(--ink-soft); }
.lb-mine-score { text-align: right; }
.lb-mine-score strong { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); display: block; }
.lb-mine-score span { font-size: 12px; color: var(--ink-soft); }
.lb-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lb-row { display: flex; align-items: center; gap: 13px; padding: 12px 18px; border-top: 1px solid var(--line); }
.lb-row:first-child { border-top: none; }
.lb-row.me { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.lb-row-rank { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink-soft); width: 32px; text-align: center; }
.lb-row-main { flex: 1; min-width: 0; }
.lb-row-name { font-family: var(--font-head); font-weight: 600; font-size: 15.5px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.lb-row-lvl { font-size: 12.5px; font-weight: 600; }
.lb-row-score { text-align: right; }
.lb-row-score strong { font-family: var(--font-head); font-weight: 700; font-size: 15.5px; color: var(--ink); display: block; }
.lb-row-score span { font-size: 11.5px; color: var(--ink-soft); }
.lb-empty { padding: 40px; text-align: center; color: var(--ink-soft); }
.lb-how { margin-top: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.lb-how-title { font-family: var(--font-head); font-weight: 700; font-size: 15.5px; color: var(--ink); margin-bottom: 8px; }
.lb-how ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.lb-how ul strong { color: var(--ink); }
.lb-how-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
