@import url('/fonts/fonts.css');

/* ============ โทนหลัก พื้นดำ ตัวอักษรใหญ่ gradient สีสด ============ */
:root {
  color-scheme: light;

  /* ชุดสี ครามเทพ (ปอนด์เลือก 27 ก.ย. 69) พื้นขาว */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f5fa;
  --line: #e2e4ee;
  --line-soft: #eceef4;

  --text: #15172b;
  --text-2: #4e5270;
  --text-3: #7a7e98;

  --g1: linear-gradient(135deg, #3b3fe0, #7c5cff);
  --g2: linear-gradient(135deg, #ff7a4d, #ffb547);
  --g3: linear-gradient(135deg, #3b3fe0, #38bdf8);
  --g4: linear-gradient(135deg, #7c5cff, #ff7a4d);
  --g5: linear-gradient(135deg, #38bdf8, #3b3fe0);
  --g6: linear-gradient(135deg, #ff7a4d, #ff5c8a);
  --g7: linear-gradient(135deg, #5b5fef, #a5a8ff);
  --g8: linear-gradient(135deg, #ffb547, #ff7a4d);

  --accent: #3b3fe0;          /* คราม ใช้กับตัวหนังสือและลิงก์ */
  --accent-solid: #3b3fe0;    /* คราม พื้นปุ่ม */
  --accent-hover: #2d31c4;
  --on-accent: #ffffff;
  --accent-2: #ff7a4d;        /* ส้ม สีรอง ใช้กับปุ่มส่งผลงานและป้ายเด่น */
  --accent-2-ink: #b8461f;    /* ส้มเข้ม สำหรับตัวหนังสือบนพื้นขาว */
  --danger: #d93a4a;

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1220px;
  --font: 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; max-width: 100%; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .6rem; font-weight: 700; }
h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 2rem); margin-top: 2.6rem; }
h3 { font-size: 1.1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 5rem; }
.wrap.narrow { max-width: 520px; }
.lead { color: var(--text-2); font-size: 1.05rem; margin: 0 0 1.5rem; }
.small { color: var(--text-3); font-size: .85rem; }
.empty { color: var(--text-3); padding: 3rem 0; text-align: center; }

/* ============ แถบบน ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .9rem 1.25rem;
  max-width: var(--max); margin: 0 auto;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { font-size: 1.35rem; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.brand span { color: var(--accent); }
.brand em { font-style: normal; color: var(--text-3); font-weight: 600; font-size: .82em; margin-left: .05em; }
.nav nav { display: flex; gap: 1.2rem; }
.nav nav a { color: var(--text-2); font-size: .95rem; }
.nav nav a.on, .nav nav a:hover { color: var(--text); }
.nav .search { margin-left: auto; flex: 0 1 260px; }
.nav .search input {
  width: 100%; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); padding: .5rem 1rem; font-size: .9rem; outline: 0;
}
.nav .search input:focus { border-color: var(--accent); }

/* ============ hero ============ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7rem) 1.25rem clamp(3rem, 6vw, 5rem);
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}
.hero h1 {
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  font-weight: 700; letter-spacing: -.04em;
  max-width: 18ch; margin: 0 auto .9rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-solid);            /* ส้ม Claude */
  -webkit-text-fill-color: var(--accent-solid);
  text-shadow: 0 0 32px rgba(59, 63, 224, .4);
}
/* จำนวนผลงาน ใช้ส้ม Claude เหมือนกัน ตัวเลขนี้ดึงจากฐานข้อมูลจริงทุกครั้งที่เปิดหน้า */
.hero .lead strong {
  color: var(--accent-solid); font-weight: 700;
  font-size: 1.55em; line-height: 1;
  letter-spacing: -.02em;
  text-shadow: 0 0 26px rgba(59, 63, 224, .45);
  vertical-align: -.06em; margin: 0 .08em;
}
.hero .lead { max-width: 60ch; margin: 0 auto 2rem; font-size: clamp(1rem, 1.7vw, 1.2rem); }
.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.shapes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.shapes i { position: absolute; display: block; border-radius: 50%; filter: blur(70px); opacity: .45; }
.shapes i:nth-child(1) { width: 340px; height: 340px; top: -100px; left: -70px; background: linear-gradient(135deg, #3b3fe0, #38bdf8); }
.shapes i:nth-child(2) { width: 300px; height: 300px; top: -50px; right: -80px; background: linear-gradient(135deg, #ff7a4d, #ffb547); }
.shapes i:nth-child(3) { width: 280px; height: 280px; bottom: -140px; left: 42%; background: linear-gradient(135deg, #7c5cff, #a5a8ff); opacity: .28; }

/* ============ ปุ่ม ============ */
.btn {
  display: inline-block; padding: .8rem 1.5rem; border: 0; border-radius: 999px;
  background: var(--accent-solid); color: var(--on-accent); font-weight: 600; font-size: .95rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(59, 63, 224, .3); }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--accent-solid); }
.btn.ghost:hover { border-color: var(--accent-hover); color: var(--accent); box-shadow: 0 8px 24px rgba(59, 63, 224, .22); }

/* ============ แถวหมวดและการเรียง ============ */
.cats, .sorts {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem;
}
.cats { gap: .65rem; }
.cats a, .sorts a {
  padding: .6rem 1.15rem; border: 2px solid transparent; border-radius: 999px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g2) border-box;
  color: var(--text); font-size: 1rem; font-weight: 500;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cats a:nth-child(8n+1) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g1) border-box; }
.cats a:nth-child(8n+2) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g2) border-box; }
.cats a:nth-child(8n+3) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g3) border-box; }
.cats a:nth-child(8n+4) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g4) border-box; }
.cats a:nth-child(8n+5) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g5) border-box; }
.cats a:nth-child(8n+6) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g6) border-box; }
.cats a:nth-child(8n+7) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g7) border-box; }
.cats a:nth-child(8n+8) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g8) border-box; }
.cats a small { color: var(--text-3); margin-left: .35rem; font-size: .85rem; }
.cats a:hover, .sorts a:hover { color: var(--text); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(21, 23, 43, .12); }
.cats a.on, .sorts a.on {
  background: linear-gradient(var(--accent-solid), var(--accent-solid)) padding-box, var(--accent-solid) border-box;
  color: var(--on-accent); font-weight: 700;
}
.cats a.on small { color: rgba(255, 255, 255, .75); }
.sorts a { font-size: .95rem; padding: .5rem 1.05rem; }

/* ============ การ์ด ============ */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 3px solid transparent; border-radius: var(--radius);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--g2) border-box;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:nth-child(8n+1) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g1) border-box; }
.card:nth-child(8n+2) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g2) border-box; }
.card:nth-child(8n+3) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g3) border-box; }
.card:nth-child(8n+4) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g4) border-box; }
.card:nth-child(8n+5) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g5) border-box; }
.card:nth-child(8n+6) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g6) border-box; }
.card:nth-child(8n+7) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g7) border-box; }
.card:nth-child(8n+8) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g8) border-box; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(21, 23, 43, .12); }
.card-main { display: block; padding: 1.4rem 1.25rem 1rem; flex: 1; }
.card-main:hover { color: var(--text); }
.card h3 { margin: .6rem 0 .4rem; font-size: 1.08rem; }
.card .tagline { color: var(--text-2); font-size: .9rem; margin: 0; }
.card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem 1.25rem; border-top: 1px solid var(--line-soft); font-size: .82rem;
}
.dom { color: var(--text-3); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stars { color: var(--accent); font-weight: 600; white-space: nowrap; }
.stars small { color: var(--text-3); font-weight: 400; }
.stars.none { color: var(--text-3); font-weight: 400; }
.tag {
  display: inline-block; padding: .22rem .7rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: .75rem;
}

/* ============ แบ่งหน้า ============ */
.pager { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2.5rem; }
.pager a {
  min-width: 40px; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text-2); font-size: .88rem; text-align: center;
}
.pager a.on { background: var(--text); color: #ffffff; border-color: var(--text); font-weight: 600; }

/* ============ หน้ารายละเอียด ============ */
.crumb { color: var(--text-3); font-size: .85rem; margin-bottom: 1.5rem; }
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--accent); }
.detail-head {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; justify-content: space-between;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--line-soft);
}
.detail-head h1 { margin: .6rem 0 .5rem; }
.detail-head .lead { margin: 0; }
.score { text-align: right; white-space: nowrap; }
.score strong { display: block; font-size: 2rem; color: var(--accent); }
.score strong.none { font-size: 1rem; color: var(--text-3); }
.score small { color: var(--text-3); font-size: .82rem; }

.visit {
  display: inline-block; margin: 1.8rem 0 .5rem; padding: 1rem 2rem; border-radius: 999px;
  background: var(--accent-solid); color: var(--on-accent); font-weight: 700; font-size: 1.02rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.visit:hover { background: var(--accent-hover); color: var(--on-accent); transform: translateY(-2px); box-shadow: 0 14px 36px rgba(59, 63, 224, .32); }

.warn {
  padding: .8rem 1.1rem; border: 1px solid rgba(255, 84, 112, .35); border-radius: var(--radius-sm);
  background: rgba(217, 58, 74, .07); color: #b42335; font-size: .92rem;
}

.quote blockquote {
  margin: 0; padding: 1.3rem 1.5rem; border-left: 3px solid var(--accent-2);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2); white-space: pre-wrap; font-size: .95rem;
}
.credit { color: var(--text-3); font-size: .86rem; margin-top: .8rem; }
.credit a { color: var(--text-2); text-decoration: underline; }

.vote-box {
  margin-top: 2.5rem; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.vote-box h2 { margin-top: 0; }
.stars-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.stars-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-pick label { cursor: pointer; }
.stars-pick span {
  display: inline-block; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--text-3); font-size: .9rem;
}
.stars-pick input:checked + span { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
.stars-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.review { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.review strong { color: var(--accent); }
.review .who { color: var(--text-3); font-size: .85rem; margin-left: .5rem; }
.review p { margin: .4rem 0 0; color: var(--text-2); }

.ours {
  margin-top: 3rem; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(59, 63, 224, .06), transparent);
}
.ours h2 { margin-top: 0; }
.takedown { margin-top: 3rem; color: var(--text-3); font-size: .85rem; }
.takedown a { color: var(--text-2); text-decoration: underline; }

/* ============ ฟอร์ม ============ */
.auth { display: grid; gap: 1rem; margin: 1.5rem 0; }
.auth label { display: grid; gap: .4rem; color: var(--text-2); font-size: .9rem; }
.auth input, .auth textarea, .vote-box textarea {
  width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); outline: 0;
}
.auth input:focus, .auth textarea:focus, .vote-box textarea:focus { border-color: var(--accent); }
.auth button, .vote-box button {
  padding: .85rem 1.6rem; border: 0; border-radius: 999px;
  background: var(--accent-solid); color: var(--on-accent); font-weight: 600;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ============ ท้ายเว็บ ============ */
.foot {
  max-width: var(--max); margin: 0 auto; padding: 2.5rem 1.25rem 3.5rem;
  border-top: 1px solid var(--line-soft); color: var(--text-3); font-size: .88rem;
}
.foot strong { color: var(--text-2); }
.foot p { margin: 0 0 .6rem; }

/* ============ หลังบ้าน ============ */
.admin-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.8rem; }
.admin-bar h1 { margin: 0; font-size: 1.7rem; }
.admin .stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); margin-bottom: 2rem; }
.admin .stat { padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-align: center; }
.admin .stat strong { display: block; font-size: 1.8rem; background: var(--g3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin .stat span { color: var(--text-3); font-size: .82rem; }
.admin .stat.hot strong { background: var(--g1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tablewrap table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tablewrap th, .tablewrap td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tablewrap th { background: var(--surface-2); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.tablewrap tr:last-child td { border-bottom: 0; }
.admin-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.admin-filter input { flex: 1 1 240px; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.admin-filter select, .admin-filter button { padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.admin-table input, .admin-table select { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); }
.admin-table input[name="name"] { margin-right: .3rem; }
.admin-table .checks { white-space: nowrap; }
.admin-table .checks label { display: block; color: var(--text-2); font-size: .82rem; }
.admin-table .checks input { width: auto; }
.admin-table button { padding: .45rem .9rem; border: 0; border-radius: 999px; background: var(--accent-solid); color: var(--on-accent); font-weight: 600; }
.bad { color: var(--danger); font-weight: 600; }

/* ============ จอเล็ก ============ */
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: .75rem; }
  .nav .search { margin-left: 0; flex: 1 1 100%; order: 3; }
  .detail-head { flex-direction: column; }
  .score { text-align: left; }
  .visit { display: block; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ============ แถบรูปทรงเรขาคณิต gradient + Live App Thumbnails ============ */
.geo {
  display: flex; flex-wrap: nowrap; gap: .65rem; overflow: visible;
  max-width: min(1560px, 96vw); margin: 0 auto; padding: 1.2rem 1rem 1.6rem;
  justify-content: space-between;
}
.geo-item {
  flex: 1 1 0; min-width: 0; max-width: 92px; aspect-ratio: 1;
  text-decoration: none; display: block; position: relative;
}
.geo-shape {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  border: 1.5px solid rgba(21, 23, 43,0.14);
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .25s ease, border-color .25s ease;
}
.geo-shape img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
  filter: brightness(0.92) contrast(1.05);
}
.geo-shape:hover {
  transform: translateY(-7px) scale(1.18);
  z-index: 10;
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(21, 23, 43, .12), 0 0 20px rgba(59, 63, 224, 0.4);
}
.geo-shape:hover img {
  transform: scale(1.12);
  filter: brightness(1.08);
}
.geo-shape.pure-gradient {
  background-size: cover;
  opacity: 0.92;
}
.geo-shape.pure-gradient::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.26) 0%, transparent 60%);
  pointer-events: none;
}
.geo-shape.pure-gradient:hover {
  opacity: 1;
  box-shadow: 0 14px 32px rgba(21, 23, 43, .12), 0 0 24px rgba(255,255,255,0.35);
}
.geo-fallback { font-size: 1.8rem; }

@media (max-width: 900px) { .geo-item:nth-child(n+11) { display: none; } }
@media (max-width: 600px) { .geo-item:nth-child(n+7) { display: none; } }

.geo-1  { background: var(--g1); border-radius: 50%; }
.geo-2  { background: var(--g2); border-radius: 50% 12px 50% 12px; }
.geo-3  { background: var(--g3); border-radius: 14px; }
.geo-4  { background: var(--g4); border-radius: 50% 50% 12px 12px; }
.geo-5  { background: var(--g5); border-radius: 50%; }
.geo-6  { background: var(--g6); border-radius: 12px 50% 12px 50%; }
.geo-7  { background: var(--g7); border-radius: 50% 12px 12px 50%; }
.geo-8  { background: var(--g8); border-radius: 50%; }
.geo-9  { background: var(--g2); border-radius: 12px 12px 50% 50%; }
.geo-10 { background: var(--g1); border-radius: 50% 50% 50% 12px; }
.geo-11 { background: var(--g3); border-radius: 50%; }
.geo-12 { background: var(--g4); border-radius: 14px; }
.geo-13 { background: var(--g6); border-radius: 50%; }
.geo-14 { background: var(--g5); border-radius: 12px 50% 50% 12px; }
.geo-15 { background: var(--g7); border-radius: 50%; }
.geo-16 { background: var(--g8); border-radius: 50% 12px 50% 12px; }

/* หัวข้อ section ใหญ่แบบโปสเตอร์ */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .3rem; }
.section-head a { color: var(--text-2); font-size: .92rem; }
.section-head a:hover { color: var(--accent); }

/* ============ ภาพหน้าเว็บในการ์ด ============ */
.card-main { padding: 0; }
.thumb {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--surface-2); border-bottom: 1px solid var(--line-soft);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.thumb-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 3rem; font-weight: 700; color: #c5c8dc;
  background: linear-gradient(135deg, #f4f5fa, #e9ebf5);
}
.card-body { padding: 1.1rem 1.25rem 1rem; }
.card-body h3 { margin: .55rem 0 .35rem; }

/* ภาพใหญ่ในหน้ารายละเอียด */
.detail-shot {
  margin: 1.8rem 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2);
}
.detail-shot img { width: 100%; height: auto; display: block; }

/* ============ ตาราง bento โชว์ของเด็ด ============ */
.bento-wrap { max-width: var(--max); margin: 0 auto; padding: 3rem 1.25rem 1rem; }
.bento-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.bento-head h2 { margin: 0; }
.live-dot { display: inline-flex; align-items: center; gap: .45rem; color: var(--text-3); font-size: .82rem; }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.bento-wrap { max-width: min(1560px, 96vw); padding-left: 1rem; padding-right: 1rem; }
.bento {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(150px, 21vh, 198px);
}
.bento-cell {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  padding: 0; color: var(--text);
  transition: transform .25s ease, border-color .25s ease, opacity .3s ease;
}
.bento-cell:hover { transform: translateY(-4px); color: var(--text); box-shadow: 0 14px 34px rgba(21, 23, 43, .12); }
.bento-cell.swap { opacity: 0; transform: scale(.97); }
.bento-cell .bento-img { position: absolute; inset: 0; }
.bento-cell .bento-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 1; transition: transform .4s ease; }
.bento-cell:hover .bento-img img { transform: scale(1.05); }
.bento-cell::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,7,12,0) 0%, rgba(7,7,12,.35) 100%);
}
.bento-txt {
  position: relative; z-index: 1; display: grid; gap: .2rem;
  padding: .95rem .8rem .5rem;
  background: linear-gradient(180deg, rgba(7, 7, 12, 0), rgba(7, 7, 12, .78) 42%, rgba(7, 7, 12, .95));
  text-shadow: 0 2px 12px rgba(0, 0, 0, .95), 0 0 26px rgba(0, 0, 0, .7);
}
.bento-cell .bento-img { inset: 0 0 auto; height: 100%; }
.bento-cat { font-size: .74rem; color: var(--text-2); }
.bento-name { font-size: 1.02rem; font-weight: 700; line-height: 1.22; }
.bento-tag { font-size: .82rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bento-score { font-size: .82rem; color: var(--accent); font-weight: 600; }

/* ผังโมเสก 6 ช่อง 6 คอลัมน์ 2 แถว ช่องใหญ่ขึ้นทุกช่อง ภาพเด่นที่สุด */
.bento-cell.c1 { grid-column: span 2; grid-row: span 2; }   /* ใหญ่สุด */
.bento-cell.c2 { grid-column: span 2; }
.bento-cell.c3 { grid-column: span 2; }
.bento-cell.c4 { grid-column: span 2; }
.bento-cell.c5 { grid-column: span 1; }
.bento-cell.c6 { grid-column: span 1; }
.bento-cell.c1 .bento-name { font-size: clamp(1.25rem, 2.4vw, 1.75rem); }
/* ช่องสูงแถวเดียว ใส่ครบทั้งหมวดและคำโปรย แต่ย่อให้เล็กที่สุดเพื่อไม่กินพื้นที่ภาพ */
.bento-cell.c2 .bento-cat, .bento-cell.c3 .bento-cat, .bento-cell.c4 .bento-cat,
.bento-cell.c5 .bento-cat, .bento-cell.c6 .bento-cat { font-size: .66rem; opacity: .85; }
.bento-cell.c2 .bento-name, .bento-cell.c3 .bento-name, .bento-cell.c4 .bento-name,
.bento-cell.c5 .bento-name, .bento-cell.c6 .bento-name { font-size: .95rem; }
.bento-cell.c2 .bento-tag, .bento-cell.c3 .bento-tag, .bento-cell.c4 .bento-tag,
.bento-cell.c5 .bento-tag, .bento-cell.c6 .bento-tag {
  font-size: .72rem; -webkit-line-clamp: 1; opacity: .9;
}
.bento-cell.c2 .bento-txt, .bento-cell.c3 .bento-txt, .bento-cell.c4 .bento-txt,
.bento-cell.c5 .bento-txt, .bento-cell.c6 .bento-txt { gap: .1rem; padding-top: .8rem; }
.bento-cell.c2 .b-score, .bento-cell.c3 .b-score, .bento-cell.c4 .b-score,
.bento-cell.c5 .b-score, .bento-cell.c6 .b-score { font-size: .68rem; padding: .08rem .42rem; }
.bento-cell.c2 .b-heart, .bento-cell.c3 .b-heart, .bento-cell.c4 .b-heart,
.bento-cell.c5 .b-heart, .bento-cell.c6 .b-heart,
.bento-cell.c2 .b-star, .bento-cell.c3 .b-star, .bento-cell.c4 .b-star,
.bento-cell.c5 .b-star, .bento-cell.c6 .b-star { font-size: .72rem; }

.bento-cell { border-width: 3px; }
.bento-cell.c1 { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g2) border-box; border-color: transparent; }
.bento-cell.c2  { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g1) border-box; border-color: transparent; }
.bento-cell.c3  { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g3) border-box; border-color: transparent; }
.bento-cell.c4  { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g5) border-box; border-color: transparent; }
.bento-cell.c5  { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g6) border-box; border-color: transparent; }
.bento-cell.c6  { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g4) border-box; border-color: transparent; }
.bento-cell.c7  { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g7) border-box; border-color: transparent; }
.bento-cell.c8  { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g8) border-box; border-color: transparent; }
.bento-cell.c9  { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g2) border-box; border-color: transparent; }
.bento-cell.c10 { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g5) border-box; border-color: transparent; }

@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento-cell.c1 { grid-column: span 2; grid-row: span 2; }
  .bento-cell.c2, .bento-cell.c3, .bento-cell.c4 { grid-column: span 2; }
}
@media (max-width: 700px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(132px, 20vh, 160px); }
  .bento-cell.c1 { grid-column: span 2; grid-row: span 2; }
  .bento-cell.c2, .bento-cell.c3, .bento-cell.c4 { grid-column: span 2; }
  .bento-cell.c5, .bento-cell.c6 { grid-column: span 1; }
}

/* ============ หน้าจัดอันดับ ============ */
.rank-block { margin-top: 3rem; }
.rank-block .section-head h2 { margin-top: 0; }
.vote-block {
  padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(59, 63, 224, .1), transparent);
}
.empty-vote { text-align: center; }
.empty-vote .btn { margin-top: 1rem; }

.rank-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .55rem; }
.rank-list li {
  display: flex; align-items: center; gap: .9rem;
  padding: .6rem .8rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--surface);
}
.rank-list li:hover { border-color: #c9ccdd; }
.rank-no {
  flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: var(--surface-2); color: var(--text-3); font-weight: 700; font-size: .95rem;
}
.rank-no.r1 { background: var(--g1); color: #fff; }
.rank-no.r2 { background: var(--g2); color: #fff; }
.rank-no.r3 { background: var(--g3); color: #fff; }
.rank-thumb {
  flex: 0 0 84px; height: 54px; overflow: hidden; border-radius: 8px; background: var(--surface-2);
}
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.rank-info { flex: 1 1 auto; min-width: 0; display: grid; gap: .1rem; }
.rank-info strong { font-size: .98rem; }
.rank-info .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { flex: 0 0 auto; color: var(--accent); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.rank-score small { color: var(--text-3); font-weight: 400; }

@media (max-width: 560px) {
  .rank-thumb { display: none; }
}

/* ดัน showcase ขึ้นมาชิดด้านบน */
.hero.compact { padding: clamp(.7rem, 1.6vw, 1.15rem) 1.25rem clamp(.5rem, 1vw, .75rem); border-bottom: 0; }
.hero.compact h1 { font-size: clamp(1.55rem, 3.6vw, 2.5rem); max-width: 26ch; margin-bottom: .45rem; }
.hero.compact .lead { margin: 0; font-size: clamp(.95rem, 1.15vw, 1.12rem); max-width: none; text-align: left; white-space: normal; }
.hero-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .8rem 1.6rem; max-width: min(1400px, 94vw); margin: 0 auto;
}
@media (min-width: 1250px) { .hero-row .lead { white-space: nowrap; } }
.hero-row .hero-cta { margin: 0; }
.hero.compact .btn { padding: .48rem 1.05rem; font-size: .85rem; }
.hero.compact .shapes i { filter: blur(90px); opacity: .3; }
.bento-wrap.tight { padding-top: 0; padding-bottom: 0; }
.bento-wrap.tight .bento-head { margin-bottom: .5rem; }
.bento-wrap.tight .bento-head h2 { font-size: clamp(1.1rem, 1.9vw, 1.45rem); }

/* ชื่อโดเมนในการ์ด กดไปเว็บจริงได้ */
a.dom { transition: color .18s ease; }
a.dom:hover, a.dom:focus-visible { color: var(--accent); text-decoration: underline; }

/* ============ เมนูสมาชิกบนแถบบน ============ */
.nav .search { flex: 0 1 220px; margin-left: auto; }
.nav-user { display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.nav-user .me { color: var(--text-2); font-size: .88rem; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.login-link { color: var(--text-2); font-size: .92rem; }
.login-link:hover { color: var(--accent); }
.btn.small { padding: .45rem 1rem; font-size: .86rem; }
.link-btn { border: 0; background: none; color: var(--text-3); font-size: .86rem; padding: 0; }
.link-btn:hover { color: var(--accent); }
.nav-user form { display: inline; }

@media (max-width: 980px) {
  .nav { flex-wrap: wrap; }
  .nav .search { order: 5; flex: 1 1 100%; margin-left: 0; }
  .nav-user { margin-left: auto; }
}

/* ============ แยกคะแนนแอปเทพ ออกจากดาวสมาชิกและหัวใจจากกลุ่ม ============ */
.score-badge {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  display: grid; place-items: center; line-height: 1;
  min-width: 46px; padding: .4rem .5rem; border-radius: 12px;
  background: rgba(255, 255, 255, .92); border: 2px solid var(--accent-solid);
  backdrop-filter: blur(6px);
}
.score-badge b { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.score-badge i { font-style: normal; font-size: .58rem; color: var(--text-3); margin-top: .1rem; }

.metrics { display: flex; gap: .55rem; align-items: center; white-space: nowrap; }
.m-star { color: var(--accent); font-weight: 600; }
.m-heart { color: var(--text-3); }

.bento-score { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .1rem; }
.b-score {
  padding: .12rem .5rem; border-radius: 999px;
  background: var(--accent-solid); color: var(--on-accent); font-size: .74rem; font-weight: 700;
}
.b-star { font-style: normal; color: var(--accent); font-size: .78rem; font-weight: 600; }
.b-heart { font-style: normal; color: var(--text-3); font-size: .78rem; }
.b-none { color: var(--text-3); font-size: .78rem; }

.rank-score { display: flex; align-items: center; gap: .5rem; }
.rank-score b {
  min-width: 34px; padding: .18rem .45rem; border-radius: 8px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--accent-solid);
  color: var(--accent); font-size: .86rem;
}
.score-sub { display: grid; gap: .15rem; margin-top: .4rem; }
.score .score-sub span { font-size: .8rem; }

/* ============ เอฟเฟกต์ 3 มิติและการเคลื่อนไหว ============ */

/* 1 การ์ดเอียงตามเมาส์ พร้อมแสงสะท้อนวิ่งตาม */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s ease; }
.tilt:hover { box-shadow: 0 22px 48px rgba(21, 23, 43, .12); }
.tilt::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 255, 255, .13), transparent 42%);
}
.tilt:hover::after { opacity: 1; }
.card.tilt:hover { transform: none; }   /* ให้ JS คุมการเอียงแทน hover เดิม */

/* 4 เนื้อหาลอยขึ้นตอนเลื่อนถึง */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.3,1); }
.reveal.shown { opacity: 1; transform: none; }

/* 7 ตัวเลขวิ่งนับ */
.count-up { display: inline-block; min-width: 2.5ch; font-variant-numeric: tabular-nums; }

/* 8 ตารางพลิก 3 มิติตอนสลับ */
.bento { perspective: 1400px; }
.bento-cell { transform-style: preserve-3d; backface-visibility: hidden; }
.bento-cell.swap {
  transform: rotateY(88deg) scale(.96);
  opacity: .25;
  transition: transform .32s cubic-bezier(.55,.06,.68,.19), opacity .32s ease;
}

@media (prefers-reduced-motion: reduce) {
  .tilt, .reveal, .bento-cell.swap { transition: none !important; transform: none !important; opacity: 1 !important; }
  .tilt::after { display: none; }
}

/* ============ หน้าคำถามที่พบบ่อย ============ */
.wrap.narrow-wide { max-width: 820px; }
.faq { display: grid; gap: 1rem; margin-top: 1.5rem; }
.faq-item {
  padding: 1.3rem 1.5rem; border: 2px solid transparent; border-radius: var(--radius);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g2) border-box;
}
.faq-item:nth-child(6n+1) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g1) border-box; }
.faq-item:nth-child(6n+2) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g2) border-box; }
.faq-item:nth-child(6n+3) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g3) border-box; }
.faq-item:nth-child(6n+4) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g4) border-box; }
.faq-item:nth-child(6n+5) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g6) border-box; }
.faq-item:nth-child(6n+6) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g5) border-box; }
.faq-item h2 { margin: 0 0 .6rem; font-size: 1.12rem; color: var(--text); }
.faq-item p { margin: 0; color: var(--text-2); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin: .8rem 0 1rem; }
.foot-nav a { color: var(--text-2); font-size: .9rem; }
.foot-nav a:hover { color: var(--accent); }

/* ============ หน้ารายละเอียด จัดใหม่ให้เนื้อหานำ ภาพเป็นตัวประกอบ ============ */
.detail-body {
  display: grid; gap: 2rem; align-items: start; margin-top: 1.8rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
.detail-left section.first { margin-top: 0; }
.detail-left section.first h2 { margin-top: 0; }
.detail-side { position: sticky; top: 84px; display: grid; gap: .9rem; }
.detail-shot {
  display: block; overflow: hidden; border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); margin: 0; max-width: 440px;
}
.detail-shot img { width: 100%; height: auto; display: block; transition: transform .35s ease; }
.detail-shot:hover img { transform: scale(1.03); }
.detail-side .visit { margin: 0; text-align: center; max-width: 440px; }

.quick-facts {
  margin: 0; padding: .9rem 1.1rem; max-width: 440px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  display: grid; gap: .55rem;
}
.quick-facts > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; }
.quick-facts dt { color: var(--text-3); margin: 0; }
.quick-facts dd { margin: 0; color: var(--text); text-align: right; }

@media (max-width: 900px) {
  .detail-body { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .detail-shot, .detail-side .visit, .quick-facts { max-width: none; }
}

/* ============ แถบเมนูหลังบ้าน ============ */
.admin-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.8rem; }
.admin-tabs a {
  padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text-2); font-size: .9rem; white-space: nowrap;
}
.admin-tabs a:hover { color: var(--text); border-color: #c9ccdd; }
.admin-tabs a.on { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); font-weight: 600; }
.admin .stat strong { background: linear-gradient(135deg, #3b3fe0, #6d70ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

.tech-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 1.5rem; }
.tech-box { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tech-box h2 { margin: 0 0 .8rem; font-size: 1rem; }
.bar-row { display: grid; grid-template-columns: minmax(0, 8rem) 1fr auto; gap: .6rem; align-items: center; margin-bottom: .4rem; font-size: .85rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar-track i { display: block; height: 100%; background: linear-gradient(90deg, #3b3fe0, #6d70ff); }
.bar-n { color: var(--text-3); font-size: .8rem; min-width: 2ch; text-align: right; }
.opp { padding: .18rem .5rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.opp.hot { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); font-weight: 700; }

/* ============ ตารางเรียงได้ และกราฟในหลังบ้าน ============ */
th.sortable { cursor: pointer; user-select: none; position: relative; padding-right: 1.4rem; }
th.sortable:hover { color: var(--accent); }
th.sortable::after { content: '⇅'; position: absolute; right: .5rem; opacity: .3; font-size: .78rem; }
th.sorted-asc::after { content: '↑'; opacity: 1; color: var(--accent); }
th.sorted-desc::after { content: '↓'; opacity: 1; color: var(--accent); }

.chart {
  margin: 1rem 0 1.4rem; padding: 1.2rem 1.1rem .8rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.chart svg {
  width: 100%;
  min-width: 680px;
  height: 280px;
  display: block;
  font-family: var(--font);
}

/* ============ แจ้งเตือน สั่งงาน บทความ ============ */
.alerts { display: grid; gap: .7rem; margin-top: 1rem; }
.alert {
  display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center;
  padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.alert:hover { border-color: #c9ccdd; color: var(--text); }
.alert-ico { font-size: 1.3rem; }
.alert-body { display: grid; gap: .15rem; min-width: 0; }
.alert-go { color: var(--text-3); font-size: 1.3rem; }
.alert.lv-urgent { border-color: var(--danger); background: linear-gradient(90deg, rgba(255,84,112,.09), transparent); }
.alert.lv-warn { border-color: var(--accent-solid); background: linear-gradient(90deg, rgba(59, 63, 224,.09), transparent); }
.alert.lv-ok { border-color: #2c6b52; }

.job-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); margin: 1.2rem 0 2rem; }
.job-card { padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); display: grid; gap: .5rem; align-content: start; }
.job-card h2 { margin: 0; font-size: 1.02rem; }
.job-card p { margin: 0; }
.job-cost { color: var(--accent); font-size: .82rem; }
.job-card button { padding: .6rem 1.2rem; border: 0; border-radius: 999px; background: var(--accent-solid); color: var(--on-accent); font-weight: 600; }
.job-card button:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
.job-out { max-width: 380px; white-space: pre-wrap; word-break: break-word; }

.article-form { display: grid; gap: 1rem; margin-top: 1.2rem; }
.article-form label { display: grid; gap: .35rem; color: var(--text-2); font-size: .9rem; }
.article-form input, .article-form textarea, .article-form select {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit;
}
.article-form textarea { font-family: var(--mono); font-size: .9rem; line-height: 1.6; resize: vertical; }
.article-form .two { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; gap: .6rem; align-items: end; }
.form-actions button { padding: .75rem 1.6rem; border: 0; border-radius: 999px; background: var(--accent-solid); color: var(--on-accent); font-weight: 600; }
@media (max-width: 700px) { .article-form .two { grid-template-columns: 1fr; } }

/* ============ บทความ ============ */
.article-meta { margin-top: -.6rem; }
.article-body { margin: 1.8rem 0; font-size: 1.05rem; line-height: 1.85; }
.article-body h2 { margin: 2.2rem 0 .8rem; font-size: 1.4rem; }
.article-body h3 { margin: 1.6rem 0 .6rem; font-size: 1.12rem; color: var(--accent); }
.article-body p { margin: 0 0 1.1rem; color: var(--text-2); }
.article-body ul, .article-body ol { margin: 0 0 1.2rem; padding-left: 1.4rem; color: var(--text-2); }
.article-body li { margin-bottom: .5rem; }
.article-list { display: grid; gap: .8rem; margin-top: 1.4rem; }
.article-item {
  display: grid; gap: .3rem; padding: 1.1rem 1.3rem;
  border: 2px solid transparent; border-radius: var(--radius);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g2) border-box;
  transition: transform .2s ease;
}
.article-item:nth-child(4n+1) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g1) border-box; }
.article-item:nth-child(4n+3) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g3) border-box; }
.article-item:nth-child(4n+4) { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g4) border-box; }
.article-item:hover { transform: translateY(-3px); color: var(--text); }
.article-item strong { font-size: 1.06rem; }
.article-date { color: var(--text-3); }

/* ============ Top 10 Weekly ============ */
.weekly-section { margin-bottom: 3.5rem; }
.top10-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 1.2rem;
}
.top10-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.top10-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-solid);
  box-shadow: 0 12px 30px rgba(21, 23, 43, .12);
}
.top-rank-1 {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #ffd700, #ff8f4b) border-box;
}
.top-rank-2 {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #e0e0e0, #818cf8) border-box;
}
.top-rank-3 {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #cd7f32, #f857a6) border-box;
}
.top10-rank-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: .3rem .75rem;
  font-size: .82rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(21, 23, 43, .12);
}
.top-rank-1 .top10-rank-tag { border-color: #d4a017; color: #8a6100; }
.top-rank-2 .top10-rank-tag { border-color: #9ca3af; color: #4b5563; }
.top-rank-3 .top10-rank-tag { border-color: #cd7f32; color: #8b4513; }

.top10-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}
.top10-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.top10-card:hover .top10-thumb img {
  transform: scale(1.04);
}
.top10-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.25rem 1.2rem;
  gap: .5rem;
}
.top10-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.top10-body h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}
.top10-body h3 a {
  color: var(--text);
}
.top10-body h3 a:hover {
  color: var(--accent);
}
.top10-body .tagline {
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.top10-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .4rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line-soft);
  font-size: .82rem;
}
.top10-foot .dom {
  color: var(--text-3);
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top10-foot .dom:hover {
  color: var(--accent);
}

/* ============ เกณฑ์การให้คะแนน (Criteria Page) ============ */
.criteria-header { text-align: center; margin: 1.5rem 0 3rem; }
.criteria-header h1 { margin-top: .6rem; }
.criteria-header .badge-pill {
  display: inline-block; padding: .35rem .95rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--accent); font-size: .85rem; font-weight: 600;
}
.criteria-card-highlight {
  padding: 2rem; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(59, 63, 224, 0.1), rgba(124, 77, 255, 0.06));
  border: 1px solid rgba(59, 63, 224, 0.3);
  margin-bottom: 3.5rem;
}
.criteria-card-highlight h2 { margin-top: 0; font-size: 1.5rem; text-align: center; margin-bottom: 1.8rem; }
.score-breakdown-grid {
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.score-item {
  background: var(--surface); padding: 1.4rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); display: flex; flex-direction: column;
}
.score-item .score-num {
  font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1;
}
.score-item .score-unit { font-size: .85rem; color: var(--text-3); margin-bottom: .6rem; }
.score-item strong { font-size: 1.05rem; margin-bottom: .4rem; }
.score-item p { color: var(--text-2); font-size: .88rem; line-height: 1.5; margin: 0; }

.criteria-section { margin-bottom: 3.5rem; }
.criteria-section h2 { margin-bottom: .6rem; font-size: 1.5rem; }
.dimension-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.dimension-card {
  display: flex; gap: 1.2rem; padding: 1.4rem 1.6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  align-items: flex-start;
}
.dim-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; margin-top: .1rem; }
.dim-body h3 { margin: 0 0 .4rem; font-size: 1.12rem; color: var(--text); }
.dim-body p { margin: 0; color: var(--text-2); font-size: .92rem; line-height: 1.6; }

.rules-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 1.4rem; }
.rule-card {
  padding: 1.4rem; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--line);
}
.rule-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; color: var(--accent); }
.rule-card p { margin: 0; color: var(--text-2); font-size: .9rem; line-height: 1.55; }

.criteria-cta-box {
  padding: 2.2rem; border-radius: var(--radius); background: var(--surface);
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g1) border-box;
  text-align: center;
}
.criteria-cta-box h2 { margin-top: 0; font-size: 1.4rem; }
.criteria-cta-box ul {
  list-style: none; padding: 0; margin: 1.2rem auto 1.8rem;
  max-width: 500px; text-align: left; display: grid; gap: .6rem;
}
.criteria-cta-box li { color: var(--text-2); font-size: .95rem; }
.criteria-cta-box .cta-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* ============ Ideas & Blueprints ============ */
.blueprints-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin: 1.2rem 0 3rem;
}
.blueprint-card {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .8rem;
  transition: transform .2s ease, border-color .2s ease;
}
.blueprint-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-solid);
}
.blueprint-card.hot {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g1) border-box;
}
.bp-badge {
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.blueprint-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}
.bp-target {
  font-size: .88rem;
  color: var(--text-2);
  padding: .5rem .8rem;
  background: var(--surface-2);
  border-radius: 8px;
}
.bp-solution {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.55;
}
.bp-solution ul {
  padding-left: 1.2rem;
  margin: .4rem 0 0;
  display: grid;
  gap: .35rem;
  color: var(--text-2);
}
.bp-monetize {
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px solid var(--line-soft);
  font-size: .92rem;
  color: var(--accent);
}

.pitfalls-section {
  margin-bottom: 3rem;
  padding: 1.8rem;
  border-radius: var(--radius);
  background: rgba(255, 84, 112, 0.04);
  border: 1px solid rgba(255, 84, 112, 0.2);
}
.pitfalls-section h2 { margin-top: 0; margin-bottom: 1.2rem; }
.pitfalls-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.pf-item {
  background: var(--surface);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.pf-item strong { display: block; color: var(--danger); font-size: .95rem; margin-bottom: .3rem; }
.pf-item p { margin: 0; color: var(--text-2); font-size: .85rem; line-height: 1.45; }

/* ============ บทความ Bento Grid Layout (Articles Page) ============ */
.articles-header { text-align: center; margin: 1.5rem 0 2.5rem; }
.articles-header h1 { margin-top: .6rem; }
.articles-header .badge-pill {
  display: inline-block; padding: .35rem .95rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--accent); font-size: .85rem; font-weight: 600;
}

/* Hero Featured Bento Card */
.article-hero-bento { margin-bottom: 2.5rem; }
.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hero-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 36px rgba(21, 23, 43, .12), 0 0 24px rgba(59, 63, 224, 0.2);
}
.hero-cover {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 1200 / 630;
}
.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.hero-card:hover .hero-cover img { transform: scale(1.03); }
.hero-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--g1);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .8rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(21, 23, 43, .12);
}
.hero-content {
  padding: 2.2rem 2.2rem 2.2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .8rem;
}
.hero-meta {
  display: flex;
  gap: 1rem;
  font-size: .85rem;
  color: var(--text-3);
}
.hero-content h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.35;
  color: var(--text);
}
.hero-content p {
  margin: 0;
  color: var(--text-2);
  font-size: .95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.read-more-btn {
  margin-top: .6rem;
  color: var(--accent);
  font-weight: 600;
  font-size: .92rem;
}

/* Bento Grid */
.articles-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.6rem;
  margin-bottom: 3.5rem;
}
.bento-article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.bento-article-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-solid);
  box-shadow: 0 12px 28px rgba(21, 23, 43, .12);
}
.bento-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.bento-cover {
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: var(--surface-2);
  overflow: hidden;
}
.bento-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.bento-article-card:hover .bento-cover img { transform: scale(1.04); }
.bento-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .6rem;
}
.bento-meta {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-3);
}
.bento-body h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--text);
}
.bento-body .excerpt {
  margin: 0;
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.read-link {
  margin-top: .4rem;
  color: var(--accent);
  font-size: .88rem;
  font-weight: 600;
}

/* Individual Article Single Cover */
.article-main-cover {
  margin: 1.5rem 0 2.2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(21, 23, 43, .12);
}
.article-main-cover img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

@media (max-width: 800px) {
  .hero-card { grid-template-columns: 1fr; gap: 0; }
  .hero-content { padding: 1.4rem; }
  .articles-bento-grid { grid-template-columns: 1fr; }
}

/* ============ Homepage Articles Horizontal Slider ============ */
.home-articles-slider-section {
  margin: 3.5rem 0 2rem;
  padding: 1.8rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.home-articles-slider-section::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 63, 224, 0.12), transparent 70%);
  pointer-events: none;
}
.badge-pill-sm {
  display: inline-block;
  padding: .2rem .75rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: .3rem;
}
.slider-controls {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.slider-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}
.slider-arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(59, 63, 224, 0.4);
}
.articles-slider-track {
  display: flex;
  gap: 1.3rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 1rem .2rem 1.4rem;
  margin: 0 -0.2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  cursor: grab;
}
.articles-slider-track.active-drag {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}
.articles-slider-track::-webkit-scrollbar {
  height: 6px;
}
.articles-slider-track::-webkit-scrollbar-track {
  background: transparent;
}
.articles-slider-track::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}
.slider-article-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.slider-article-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(21, 23, 43, .12), 0 0 18px rgba(59, 63, 224, 0.2);
}
.slider-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.slider-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: var(--surface-2);
  overflow: hidden;
}
.slider-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.slider-article-card:hover .slider-card-cover img {
  transform: scale(1.05);
}
.slider-date {
  position: absolute;
  bottom: .6rem;
  right: .6rem;
  padding: .2rem .55rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
}
.slider-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .5rem;
}
.slider-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slider-card-body p {
  margin: 0;
  color: var(--text-2);
  font-size: .84rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.slider-read-link {
  margin-top: .4rem;
  color: var(--accent);
  font-size: .85rem;
  font-weight: 600;
}

/* ========================================================
   ADMIN IDEAS PRO TRACKING & 80 BLUEPRINTS
   ======================================================== */
.ideas-tracker-header {
  background: var(--surface);
  border: 1px solid rgba(21, 23, 43, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 30px rgba(21, 23, 43, .12);
}
.tracker-head-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}
.tracker-stats-grid {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--surface-2);
  border: 1px solid rgba(21, 23, 43, 0.08);
  border-radius: 12px;
  padding: .6rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 85px;
  cursor: pointer;
  transition: all .2s ease;
}
.stat-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(21, 23, 43, 0.2);
}
.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
  font-family: monospace;
}
.stat-lbl {
  font-size: .75rem;
  color: var(--text-2);
  margin-top: 2px;
}
.stat-pill.total .stat-num { color: var(--text); }
.stat-pill.star .stat-num { color: #b45309; }
.stat-pill.prog .stat-num { color: #0369a1; }
.stat-pill.done .stat-num { color: #047857; }

.ideas-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid rgba(21, 23, 43, 0.06);
  padding-top: 1.2rem;
}
.filter-status-group {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid rgba(21, 23, 43, 0.08);
  padding: .45rem .9rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.filter-btn:hover {
  color: var(--text);
  border-color: rgba(21, 23, 43, 0.2);
}
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(59, 63, 224, 0.4);
}
.filter-cat-select select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid rgba(21, 23, 43, 0.12);
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  outline: none;
  cursor: pointer;
}

/* Category Blocks & Cards */
.category-block {
  margin-bottom: 3rem;
}
.category-title-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(21, 23, 43, 0.08);
  padding-bottom: .6rem;
}
.category-title-bar h3 {
  margin: 0;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.badge-count {
  font-size: .75rem;
  background: rgba(21, 23, 43, 0.08);
  color: var(--text-2);
  padding: .2rem .5rem;
  border-radius: 20px;
  font-weight: normal;
}

.ideas-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.4rem;
}
.idea-pro-card {
  background: var(--surface);
  border: 1px solid rgba(21, 23, 43, 0.08);
  border-radius: 14px;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  position: relative;
  transition: all .2s ease;
}
.idea-pro-card:hover {
  border-color: rgba(21, 23, 43, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(21, 23, 43, .12);
}

/* Status styles on cards */
.idea-pro-card.status-interested {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, var(--surface) 30%);
}
.idea-pro-card.status-in_progress {
  border-color: rgba(56, 189, 248, 0.5);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.06) 0%, var(--surface) 30%);
}
.idea-pro-card.status-completed {
  border-color: rgba(0, 245, 160, 0.5);
  background: linear-gradient(180deg, rgba(0, 245, 160, 0.06) 0%, var(--surface) 30%);
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cat-tag {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  background: rgba(21, 23, 43, 0.05);
  padding: .2rem .55rem;
  border-radius: 6px;
}
.score-badge {
  background: rgba(21, 23, 43, 0.08);
  padding: .25rem .6rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: .95rem;
  color: var(--text);
  border: 1px solid rgba(21, 23, 43, 0.12);
}
.score-badge.top-tier {
  background: linear-gradient(135deg, rgba(59, 63, 224, 0.25) 0%, rgba(59, 63, 224, 0.4) 100%);
  border-color: rgba(59, 63, 224, 0.6);
  color: #6d70ff;
  box-shadow: 0 0 10px rgba(59, 63, 224, 0.3);
}
.score-max {
  font-size: .72rem;
  opacity: 0.6;
}

.idea-title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--text);
}
.idea-angle-badge {
  font-size: .8rem;
  font-weight: 600;
  color: #0369a1;
  background: rgba(56, 189, 248, 0.1);
  padding: .3rem .6rem;
  border-radius: 6px;
  align-self: flex-start;
}

.idea-body-details {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--text-2);
  flex: 1;
}
.detail-row {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
}
.detail-row.highlight {
  background: rgba(0, 245, 160, 0.05);
  border-left: 3px solid #00f5a0;
  padding: .45rem .6rem;
  border-radius: 0 6px 6px 0;
  color: var(--text);
}
.d-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.d-text strong {
  color: var(--text);
}
.detail-row.score-row {
  opacity: 0.8;
  border-top: 1px dashed rgba(21, 23, 43, 0.08);
  padding-top: .4rem;
}

/* Action Bar */
.tracking-action-bar {
  border-top: 1px solid rgba(21, 23, 43, 0.06);
  padding-top: .8rem;
}
.status-btn-group {
  display: flex;
  gap: .4rem;
}
.btn-track {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid rgba(21, 23, 43, 0.1);
  color: var(--text-2);
  padding: .4rem .3rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  text-align: center;
}
.btn-track:hover {
  color: var(--text);
  border-color: rgba(21, 23, 43, 0.25);
}
.btn-track.star.active {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
  border-color: #f59e0b;
  font-weight: 700;
}
.btn-track.prog.active {
  background: rgba(56, 189, 248, 0.2);
  color: #0369a1;
  border-color: #38bdf8;
  font-weight: 700;
}
.btn-track.done.active {
  background: rgba(0, 245, 160, 0.2);
  color: #047857;
  border-color: #00f5a0;
  font-weight: 700;
}
.btn-track.del {
  flex: 0 0 46px;
  background: rgba(255, 88, 88, 0.05);
  border-color: rgba(255, 88, 88, 0.15);
  color: #b42335;
}
.btn-track.del:hover {
  background: rgba(255, 88, 88, 0.25);
  border-color: #ff5858;
  color: var(--text);
}

/* Note Box */
.idea-note-box {
  position: relative;
}
.idea-note-box textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid rgba(21, 23, 43, 0.06);
  border-radius: 6px;
  color: var(--text);
  padding: .45rem .6rem;
  font-size: .8rem;
  resize: vertical;
  min-height: 44px;
  outline: none;
  font-family: inherit;
}
.idea-note-box textarea:focus {
  border-color: var(--accent);
  background: var(--surface-2);
}
.save-indicator {
  position: absolute;
  right: .6rem;
  bottom: .4rem;
  font-size: .7rem;
  font-weight: 600;
  pointer-events: none;
}

/* ========================================================
   SUBMIT APP PAGE & NAVBAR BUTTON
   ======================================================== */
.nav-submit-btn {
  background: rgba(255, 122, 77, 0.12);
  color: var(--accent-2-ink) !important;
  border: 1px solid rgba(255, 122, 77, 0.5);
  padding: .3rem .75rem !important;
  border-radius: 20px;
  font-weight: 700 !important;
  transition: all .2s ease;
}
.nav-submit-btn:hover, .nav-submit-btn.on {
  background: var(--accent-2) !important;
  color: #15172b !important;
  border-color: var(--accent-2);
  box-shadow: 0 0 14px rgba(59, 63, 224, 0.5);
}
.btn.accent-glow {
  background: linear-gradient(135deg, #ff7a4d 0%, #ffa15e 100%);
  color: #15172b !important;
  font-weight: 800;
  border: none;
  box-shadow: 0 4px 18px rgba(59, 63, 224, 0.45);
}
.btn.accent-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 63, 224, 0.65);
}

.submit-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}
.submit-header {
  text-align: center;
  margin-bottom: 2rem;
}
.submit-header .pill-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  color: var(--accent);
  background: rgba(59, 63, 224, 0.12);
  border: 1px solid rgba(59, 63, 224, 0.3);
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .8rem;
}
.submit-header h1 {
  font-size: 2.2rem;
  margin: 0 0 .5rem;
  font-weight: 800;
}
.submit-header .sub-lead {
  color: var(--text-2);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

.submit-card {
  background: var(--surface);
  border: 1px solid rgba(21, 23, 43, 0.1);
  border-radius: 16px;
  padding: 2.2rem;
  box-shadow: 0 12px 36px rgba(21, 23, 43, .12);
}
.submit-form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
}
.form-row {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.form-row .form-group {
  min-width: 260px;
}
.form-group label {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}
.form-group .req {
  color: var(--danger);
}
.form-group input, .form-group select, .form-group textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: .65rem .9rem;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: all .2s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 63, 224, 0.18);
}
.form-group .hint {
  font-size: .78rem;
  color: var(--text-2);
}
.form-actions {
  margin-top: .8rem;
}
.btn-large {
  width: 100%;
  padding: .85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
}
.submit-note {
  text-align: center;
  font-size: .8rem;
  color: var(--text-2);
  margin: .5rem 0 0;
}
.alert-box {
  padding: .9rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.alert-box.error {
  background: rgba(255, 88, 88, 0.12);
  border: 1px solid rgba(255, 88, 88, 0.35);
  color: #b42335;
}


/* หน้าเก็บคอมเมนต์เองจาก Chrome */
.hv-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 1.4rem 1.5rem; margin-bottom: 1.6rem; }
.hv-panel h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.hv-panel.ok { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g3) border-box;
  border: 2px solid transparent; }
.hv-panel.err { border-color: #d93a4a; color: #b42335; }
.hv-panel .steps { margin: 1rem 0 1.2rem 1.1rem; color: var(--text-2); line-height: 2; }
.hv-panel .steps b { color: var(--accent); }
.code-box { width: 100%; margin-top: .9rem; padding: .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2);
  font-family: 'IBM Plex Mono', monospace; font-size: .72rem; line-height: 1.5; resize: vertical; }
.stat-row { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  margin: 1rem 0; }
.stat-row div { padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); text-align: center; }
.stat-row b { display: block; font-size: 1.7rem; }
.stat-row .hi b { background: var(--g3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-row span { color: var(--text-3); font-size: .8rem; }
.drop { border: 2px dashed #c9ccdd; border-radius: var(--radius); padding: 2rem 1.2rem;
  text-align: center; margin-bottom: 1rem; transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--accent-solid); background: rgba(59, 63, 224,.07); }
.drop p { margin: .3rem 0; }

/* รายงานผู้เข้าชมจาก GA4 */
.ga-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end;
  justify-content: space-between; margin-bottom: 1.2rem; }
.ga-h { margin: 0; font-size: 1.35rem; }
.ga-range { display: flex; gap: .4rem; }
.ga-range .btn { padding: .4rem .9rem; font-size: .85rem; }
.ga-range .btn.on { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
.ga-live { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.2rem;
  padding: .8rem 1.1rem; border-radius: var(--radius-sm);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--g3) border-box;
  border: 2px solid transparent; }
.ga-live .dot { width: 11px; height: 11px; border-radius: 50%; background: #00f5a0;
  box-shadow: 0 0 0 4px rgba(0,245,160,.18); }
.ga-live b { font-size: 1.25rem; }
.stat-row span i { font-style: normal; font-weight: 600; margin-left: .3rem; }
.stat-row span i.up { color: #15803d; }
.stat-row span i.down { color: #d93a4a; }
.ga-chart { display: flex; align-items: flex-end; gap: 3px; height: 190px; margin-top: 1rem; }
.ga-chart .gc { flex: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; min-width: 0; }
.ga-chart .gc b { width: 100%; border-radius: 4px 4px 2px 2px; background: var(--g3); display: block; }
.ga-chart .gc:hover b { background: var(--g1); }
.ga-chart .gc u { text-decoration: none; font-size: .6rem; color: var(--text-3); margin-top: 6px;
  white-space: nowrap; overflow: hidden; }
.ga-cols { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.ga-bar { display: grid; grid-template-columns: 116px 1fr 66px; gap: .7rem; align-items: center;
  margin-bottom: .7rem; font-size: .88rem; }
.ga-bar span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-bar i { height: 12px; border-radius: 6px; background: var(--surface-2); display: block; }
.ga-bar i b { height: 100%; border-radius: 6px; background: var(--g6); display: block; }
.ga-bar em { font-style: normal; text-align: right; color: var(--text-2); }
.ga-select { padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); margin-right: .6rem; max-width: 100%; }

/* ส่วนเจาะลึกคนไทยและพฤติกรรม */
.ga-chart.hours { height: 120px; }
.nr-split { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: .8rem; }
.nr-box { padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); text-align: center; }
.nr-box b { display: block; font-size: 1.6rem; }
.nr-box.ret b { background: var(--g3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nr-box span { color: var(--text-3); font-size: .8rem; }
.nr-track { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden;
  margin-bottom: .6rem; }
.nr-track b { display: block; height: 100%; border-radius: 6px; background: var(--g3); }

/* แอปเทพแนะนำ (การ์ดเดียวใต้ hero) */
.pick-wrap{max-width:var(--max);margin:0 auto;padding:.25rem 1.25rem 0}
.pick{display:flex;align-items:center;gap:1rem;background:linear-gradient(120deg,#0E4D43,#146355);color:#fff;border-radius:18px;padding:.9rem 1.1rem;text-decoration:none;border:2px solid #E0A93B;box-shadow:0 10px 30px rgba(14,77,67,.25);transition:transform .15s}
.pick:hover{transform:translateY(-2px)}
.pick-img{width:72px;height:72px;border-radius:50%;border:3px solid #F6D58A;flex:none}
.pick-body{display:flex;flex-direction:column;gap:.15rem;flex:1;min-width:0}
.pick-eyebrow{font-size:.8rem;color:#F6D58A;font-weight:700}
.pick-name{font-size:1.05rem;line-height:1.3}
.pick-tag{font-size:.88rem;color:#CFE3DC}
.pick-cta{flex:none;background:#06C755;color:#fff;font-weight:700;padding:.6rem 1rem;border-radius:999px;font-size:.92rem;white-space:nowrap}
@media (max-width:640px){.pick{flex-wrap:wrap}.pick-cta{width:100%;text-align:center}}

/* ชุดสีครามพื้นขาว: ข้อความที่วางบนภาพ (bento) ยังเป็นพื้นเข้ม ตัวหนังสือขาว */
.bento-cell, .bento-cell:hover { color: #fff; }
.bento-cat, .bento-tag { color: rgba(255, 255, 255, .82); }
.bento-score, .bento-cell .b-star { color: #c7c9ff; }
.bento-cell .b-heart, .bento-cell .b-none { color: rgba(255, 255, 255, .78); }
.hero .lead strong { text-shadow: none; }
.hero h1 em { text-shadow: none; }
/* ป้ายคะแนนบนภาพหน้าเว็บ (คนละตัวกับ .score-badge ในหน้าไอเดียหลังบ้าน) */
.score-badge:not(.card-top-row .score-badge) {
  background: rgba(255, 255, 255, .94); border: 2px solid var(--accent-solid);
  padding: .4rem .5rem; border-radius: 12px;
}

/* ตัวกรองแบบคนไทย ใต้แถวหมวด */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.2rem 0 1rem; }
.filters a {
  padding: .45rem .95rem; border-radius: 999px; font-size: .92rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
}
.filters a small { color: var(--text-3); margin-left: .25rem; font-size: .8rem; }
.filters a:hover { border-color: var(--accent); color: var(--accent); }
.filters a.on { background: #ecedfd; border-color: var(--accent); color: var(--accent); font-weight: 700; }
.filters a.on small { color: var(--accent); }

/* หน้าผลงาน: แถบข้อมูลย่อแบบ App Store */
.info-strip {
  display: flex; overflow-x: auto; margin: 1.2rem 0 0; padding: .9rem 0;
  border-bottom: 1px solid var(--line-soft); scrollbar-width: none;
}
.info-strip::-webkit-scrollbar { display: none; }
.info-strip > div {
  flex: 1 0 118px; display: grid; justify-items: center; gap: .1rem; text-align: center;
  padding: 0 .8rem; border-left: 1px solid var(--line);
}
.info-strip > div:first-child { border-left: 0; }
.info-strip span { font-size: .72rem; color: var(--text-3); letter-spacing: .02em; white-space: nowrap; }
.info-strip b { font-size: 1.35rem; line-height: 1.3; color: var(--text); font-variant-numeric: tabular-nums; }
.info-strip > div:first-child b { color: var(--accent); }
.info-strip small { font-size: .78rem; color: var(--text-2); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* หน้าผลงาน: ข้อมูลเว็บจากการสแกน */
.tech-info dl { margin: .4rem 0 .6rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 1.6rem; }
.tech-info dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.tech-info dt { color: var(--text-3); margin: 0; }
.tech-info dd { margin: 0; color: var(--text); text-align: right; font-weight: 500; }

/* หน้าผลงาน: ภาพจอคอม + ภาพมือถือซ้อนมุม */
.shot-pair { position: relative; max-width: 440px; }
.shot-pair.has-m { padding-bottom: 2.2rem; }
.shot-pair.has-m .detail-shot { margin-right: 3.2rem; }
.phone-shot {
  position: absolute; right: 0; bottom: 0; width: 26%; min-width: 92px;
  border: 5px solid #15172b; border-radius: 18px; overflow: hidden; background: #15172b;
  box-shadow: 0 12px 30px rgba(21, 23, 43, .22); transition: transform .2s ease;
}
.phone-shot img { width: 100%; height: auto; display: block; border-radius: 12px; }
.phone-shot:hover { transform: translateY(-3px); }
@media (max-width: 900px) { .shot-pair { max-width: none; } }
/* คะแนนย้ายไปอยู่ในแถบข้อมูลแล้ว ไม่ต้องโชว์ซ้ำมุมขวาบน */
.detail-head .score { display: none; }
.quote blockquote { overflow-wrap: anywhere; }
@media (max-width: 900px) { .detail-body { grid-template-columns: minmax(0, 1fr); } }

/* หน้าแรก: 10 อันดับท็อปแยกหมวด แถวเลื่อนแนวนอนแบบ App Store */
.t10-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2rem) / 3); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .6rem; margin-top: .9rem;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.t10-card { display: grid; gap: .55rem; scroll-snap-align: start; color: var(--text); }
.t10-card img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px;
  background: var(--surface-2); transition: transform .25s ease, box-shadow .25s ease;
}
.t10-card:hover img { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(21, 23, 43, .14); }
.t10-card span { font-weight: 600; font-size: .98rem; }
.t10-card:hover span { color: var(--accent); }
@media (max-width: 900px) { .t10-row { grid-auto-columns: 72%; } }

/* กำแพง icon ผลงานคนไทย ไหลลงมารวมที่โลโก้ (views/partials/icon-wall.ejs) */
.iwall { margin: 3.5rem 0 1rem; overflow: hidden; text-align: center; }
.iwall-cols { display: flex; justify-content: center; align-items: flex-start; gap: clamp(.5rem, 1.2vw, 1rem); }
.iwall-col { display: flex; flex-direction: column; gap: clamp(.5rem, 1.2vw, 1rem); animation: iwall-float 7s ease-in-out infinite; animation-delay: var(--d); }
.iwall-col:nth-child(odd) { margin-top: 2.2rem; }
.iwall-col a { display: block; width: clamp(44px, 5.2vw, 72px); aspect-ratio: 1; border-radius: 22%; overflow: hidden;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft), 0 6px 16px rgba(21, 23, 43, .08); transition: transform .2s ease; }
.iwall-col a:hover { transform: scale(1.12); }
.iwall-col img { width: 100%; height: 100%; object-fit: cover; }
@keyframes iwall-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.iwall-foot { display: grid; justify-items: center; gap: .6rem; margin-top: 1.8rem; }
.iwall-logo { width: clamp(84px, 9vw, 112px); height: auto; border-radius: 22%; box-shadow: 0 16px 36px rgba(59, 63, 224, .28); }
.iwall-foot h2 { margin: .4rem 0 0; font-size: clamp(1.3rem, 2.6vw, 2rem); }
.iwall-cta { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin-top: .4rem; }
@media (max-width: 760px) { .iwall-col.c5, .iwall-col.c6, .iwall-col.c7 { display: none; } }
@media (max-width: 480px) { .iwall-col.c4 { display: none; } }
@media (prefers-reduced-motion: reduce) { .iwall-col { animation: none; } }

/* แถว icon ใต้ของเด็ด (แทนรูปทรงเรขาคณิตเดิม) */
.geo-icons .geo-item { border-radius: 22%; overflow: hidden; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft), 0 6px 16px rgba(21, 23, 43, .08);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), opacity .35s ease; }
.geo-icons .geo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.geo-icons .geo-item:hover { transform: translateY(-6px) scale(1.12); z-index: 2; }
.geo-icons .geo-item.swap { opacity: 0; transform: scale(.8); }

/* 28 ก.ย. 69 กล่องคำถามที่พบบ่อย (AEO) ใช้สีชุดครามเทพเดิม */
.faq-block { margin: 2.5rem 0 1rem; }
.faq-home { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.faq-block h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.faq-list { display: grid; gap: .6rem; }
.faq-list details { background: var(--surface, #fff); border: 1px solid var(--line, #e2e4ee); border-radius: 14px; padding: .75rem 1rem; }
.faq-list summary { cursor: pointer; font-weight: 600; color: var(--ink, #15172b); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent, #3b3fe0); font-weight: 700; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: .6rem 0 .2rem; color: var(--text-2, #465247); line-height: 1.65; }
.faq-more { margin-top: .8rem; }
