/* skin.css — NickThai clean light skin (SEO-safe long-form layout) */
:root {
  --bg:#f5f8fc; --surface:#fff; --surface2:#eef3fa; --border:#dde6f1;
  --ink:#0f1c33; --ink-soft:#33445e; --muted:#62748e;
  --accent:#2f6bd8; --accent-ink:#fff; --accent-soft:#e9f1ff;
  --stage:#141a2e; --stage-soft:#1d2540;
  --radius:16px; --radius-sm:11px;
  --shadow:0 1px 2px rgba(20,40,80,.05), 0 8px 24px rgba(20,40,80,.06);
  --hero:radial-gradient(120% 120% at 85% -10%, #e6efff 0%, #f5f8fc 55%);
  --font-d:"Bai Jamjuree", system-ui, sans-serif;
  --font-b:"IBM Plex Sans Thai", system-ui, sans-serif;
  --fancy:"Segoe UI Symbol","Noto Sans Symbols2","Apple Symbols", system-ui, sans-serif;
}
[data-theme="gamer"]   { --bg:#f4f3fb; --surface2:#f0eefb; --border:#e7e3f4; --ink:#1a1633; --ink-soft:#42386b; --muted:#736b97; --accent:#6b4ef0; --accent-soft:#ece7ff; --radius:12px; --radius-sm:9px; --hero:radial-gradient(120% 120% at 85% -10%, #e9e2ff 0%, #f4f3fb 55%); }
[data-theme="pastel"]  { --bg:#fbf6f4; --surface2:#fdf0f3; --border:#f3e3e6; --ink:#3a2c30; --ink-soft:#6a545b; --muted:#9b8087; --accent:#f0608a; --accent-soft:#ffe6ee; --radius:22px; --radius-sm:15px; --hero:radial-gradient(120% 120% at 85% -10%, #ffe3ec 0%, #eafaf2 60%, #fbf6f4 100%); }
[data-theme="minimal"] { --bg:#fafafa; --surface2:#f4f4f5; --border:#ebebeb; --ink:#16181d; --ink-soft:#3d4046; --muted:#8a8d93; --accent:#1f2430; --accent-soft:#eef0f2; --radius:8px; --radius-sm:6px; --hero:linear-gradient(180deg, #f3f4f6 0%, #fafafa 70%); }

* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
html, body { margin:0; }
body { background:var(--bg); color:var(--ink); font-family:var(--font-b); line-height:1.6; font-weight:400;
  text-rendering:optimizeLegibility; transition:background .3s, color .3s; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
button { font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; }
img { max-width:100%; display:block; }
::selection { background:var(--accent-soft); }
.wrap { max-width:1040px; margin:0 auto; padding:0 20px; }
.prose { max-width:760px; }
h1,h2,h3 { font-family:var(--font-d); letter-spacing:-.015em; color:var(--ink); }

/* ---------- NAV ---------- */
.nav { position:sticky; top:0; z-index:40; background:color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter:saturate(1.4) blur(12px); border-bottom:1px solid var(--border); }
.nav-inner { max-width:1040px; margin:0 auto; padding:0 20px; height:62px; display:flex; align-items:center; gap:24px; }
.brand { display:flex; align-items:center; gap:9px; font-family:var(--font-d); font-weight:700; color:var(--ink); }
.brand:hover { text-decoration:none; }
.brand-mark { width:30px; height:30px; border-radius:9px; background:var(--accent); color:var(--accent-ink);
  display:grid; place-items:center; box-shadow:0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.brand-mark.sm { width:24px; height:24px; border-radius:7px; }
.brand-name { font-size:19px; }
.brand-dot { color:var(--muted); font-weight:600; }
.nav-links { margin-left:auto; display:flex; gap:4px; }
.nav-links a { padding:8px 14px; border-radius:9px; font-weight:500; font-size:15px; color:var(--ink-soft); transition:.15s; }
.nav-links a:hover { background:var(--surface2); color:var(--ink); text-decoration:none; }
.nav-links a.active { color:var(--accent); }
.nav-burger { display:none; margin-left:auto; padding:6px; border-radius:9px; color:var(--ink-soft); }

/* ---------- HERO ---------- */
.hero { background:var(--hero); border-bottom:1px solid var(--border); }
.hero-inner { max-width:920px; margin:0 auto; padding:40px 20px 36px; }
.hero-banner { border-radius:var(--radius); overflow:hidden; border:1px solid var(--border); box-shadow:var(--shadow);
  margin-bottom:26px; aspect-ratio:680/220; background:linear-gradient(120deg, var(--accent-soft), var(--surface2)); }
.hero-banner img { width:100%; height:100%; object-fit:cover; }
.hero-badge { display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; color:var(--accent);
  background:color-mix(in srgb, var(--accent) 9%, var(--surface)); border:1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  padding:6px 13px; border-radius:999px; }
h1.hero-title { font-weight:700; font-size:clamp(26px, 4.4vw, 40px); line-height:1.18; margin:16px 0 0; text-wrap:balance; }
.intro-list { list-style:none; margin:18px 0 0; padding:0; display:grid; gap:8px; max-width:640px; }
.intro-list li { display:flex; gap:10px; align-items:flex-start; color:var(--ink-soft); font-size:15.5px; }
.intro-list li::before { content:""; flex:none; width:8px; height:8px; margin-top:9px; border-radius:3px;
  background:var(--accent); transform:rotate(45deg); }
.intro-list strong { color:var(--ink); }

/* ---------- GENERATOR ---------- */
.gen { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:22px; margin:26px 0 0; }
.gen-lead { font-weight:600; color:var(--ink); font-size:16px; margin:0 0 14px; }
.search { display:flex; align-items:center; gap:10px; background:var(--bg); border:1px solid var(--border);
  border-radius:999px; padding:7px 8px 7px 18px; transition:border-color .18s, box-shadow .18s; }
.search:focus-within { border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.search .ic { color:var(--muted); display:flex; }
.search input { flex:1; border:none; outline:none; background:none; font-family:var(--font-d);
  font-size:19px; font-weight:600; color:var(--ink); min-width:0; padding:8px 0; }
.search input::placeholder { color:var(--muted); font-weight:500; font-family:var(--font-b); }
.search .clear { width:36px; height:36px; border-radius:999px; color:var(--muted); display:grid; place-items:center; flex:none; }
.search .clear:hover { background:var(--surface2); color:var(--ink); }
.sugg { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; }
.sugg-label { font-size:13px; color:var(--muted); }
.sugg-chip { font-size:13px; font-weight:600; color:var(--ink-soft); background:var(--surface);
  border:1px solid var(--border); padding:5px 12px; border-radius:999px; transition:.15s; }
.sugg-chip:hover { border-color:var(--accent); color:var(--accent); }
.sugg-count { font-size:13px; color:var(--muted); margin-left:auto; }

.filters { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; margin-top:18px; padding-bottom:2px; }
.filters::-webkit-scrollbar { display:none; }
.chip { white-space:nowrap; font-size:13.5px; font-weight:600; color:var(--ink-soft);
  background:var(--bg); border:1px solid var(--border); padding:7px 15px; border-radius:999px; transition:.15s; }
.chip:hover { border-color:color-mix(in srgb, var(--accent) 40%, var(--border)); }
.chip.on { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }

.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; margin-top:16px; }
.card { position:relative; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:11px 12px 9px; display:flex; flex-direction:column; gap:8px; min-height:84px; cursor:pointer; user-select:none;
  transition:transform .12s, box-shadow .16s, border-color .16s; }
.card:hover { transform:translateY(-2px); box-shadow:var(--shadow); border-color:color-mix(in srgb, var(--accent) 38%, var(--border)); }
.card.is-copied { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.card-text { flex:1; display:flex; align-items:center; font-family:var(--fancy);
  font-size:18px; line-height:1.3; color:var(--ink); font-weight:500; word-break:break-word; overflow-wrap:anywhere; }
.card-bar { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.card-tag { font-size:10.5px; font-weight:600; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:108px; }
.card.is-copied .card-tag { color:var(--accent); }
.like { width:24px; height:24px; border-radius:999px; color:var(--muted); display:grid; place-items:center; flex:none; transition:.15s; }
.like:hover { background:var(--surface2); color:#e25563; }
.like.on { color:#e25563; }
.gen-empty { text-align:center; color:var(--muted); padding:40px 20px; font-size:15px; }

/* ---------- SECTIONS ---------- */
section.block { padding:46px 0 0; }
.sec-head { margin:0 0 18px; }
.sec-head h2 { font-weight:700; font-size:clamp(21px,3vw,27px); margin:0; }
.sec-head p { color:var(--muted); font-size:14.5px; margin:6px 0 0; }
.prose p { color:var(--ink-soft); margin:0 0 14px; }
.prose p:last-child { margin-bottom:0; }

/* ---------- 50 NAMES (vote chips) ---------- */
.namegrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:8px; }
.nameitem { display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:9px 10px 9px 14px; }
.nameitem .nm { flex:1; min-width:0; font-family:var(--fancy); font-size:17px; color:var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; background:none; text-align:left; padding:0; }
.nameitem .nm:hover { color:var(--accent); }
.vote { flex:none; display:flex; align-items:center; gap:3px; }
.vbtn { display:inline-flex; align-items:center; gap:3px; font-size:12px; font-weight:700; color:var(--muted);
  background:var(--surface2); border-radius:999px; padding:4px 9px; transition:.15s; font-variant-numeric:tabular-nums; }
.vbtn.up:hover, .vbtn.up.on { color:#1f9d63; background:#e7f6ee; }
.vbtn.down:hover, .vbtn.down.on { color:#e25563; background:#fdecee; }
.more-link { display:inline-flex; align-items:center; gap:6px; margin-top:16px; font-weight:600; font-size:14.5px; }

/* ---------- WEEKLY ---------- */
.weekly { display:grid; gap:12px; }
.wcard { display:grid; grid-template-columns:auto 1fr; gap:14px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:16px; }
.wno { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; font-family:var(--font-d);
  font-weight:700; font-size:16px; color:var(--muted); background:var(--surface2); }
.wcard.top .wno { color:var(--accent-ink); background:var(--accent); }
.wbody h3 { font-size:18px; margin:0; display:flex; align-items:flex-start; gap:10px; flex-wrap:nowrap; }
.wbody h3 a { color:var(--ink); flex:1; min-width:0; }
.wbody h3 .vote { flex:none; margin-top:1px; }
.wmeta { font-size:12.5px; color:var(--muted); margin:3px 0 0; }
.wsat { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; color:#1f9d63; }
.wchips { display:flex; flex-wrap:wrap; gap:8px; margin:11px 0 0; }
.wchip { font-family:var(--fancy); font-size:15px; color:var(--ink); background:var(--bg); border:1px solid var(--border);
  border-radius:999px; padding:6px 13px; cursor:pointer; transition:.15s; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wchip:hover { border-color:var(--accent); color:var(--accent); }
.wdesc { font-size:13.5px; color:var(--ink-soft); margin:11px 0 0; }
.wmore { margin-top:11px; font-size:13.5px; font-weight:600; }

/* ---------- STEPS ---------- */
.steps { display:grid; gap:12px; counter-reset:step; }
.step { display:grid; grid-template-columns:auto 1fr; gap:14px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:16px 18px; }
.step::before { counter-increment:step; content:counter(step); width:30px; height:30px; border-radius:9px;
  background:var(--accent-soft); color:var(--accent); font-family:var(--font-d); font-weight:700; display:grid; place-items:center; }
.step h3 { font-size:16px; margin:2px 0 4px; }
.step p { margin:0; color:var(--ink-soft); font-size:14px; }

/* ---------- TAG CLOUD ---------- */
.tagcloud { display:flex; flex-wrap:wrap; gap:9px; }
.tag { display:inline-flex; align-items:center; gap:8px; font-family:var(--font-d); font-weight:600; font-size:14.5px;
  color:var(--ink-soft); background:var(--surface); border:1px solid var(--border); padding:8px 9px 8px 14px;
  border-radius:999px; transition:.15s; }
.tag:hover { color:var(--accent); border-color:color-mix(in srgb, var(--accent) 45%, var(--border)); text-decoration:none; transform:translateY(-1px); }
.tag .num { font-size:11.5px; font-weight:700; color:var(--muted); background:var(--surface2); border-radius:999px; padding:2px 8px; font-variant-numeric:tabular-nums; }

/* ---------- TOC ---------- */
.toc { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; }
.toc-title { font-family:var(--font-d); font-weight:700; font-size:14px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin:0 0 12px; }
.toc ol { margin:0; padding-left:20px; columns:2; column-gap:30px; }
.toc li { margin:0 0 7px; font-size:14px; break-inside:avoid; }
.toc a { color:var(--ink-soft); }
.toc a:hover { color:var(--accent); }

/* ---------- FOOTER ---------- */
.foot { border-top:1px solid var(--border); background:var(--surface); margin-top:50px; }
.foot-inner { max-width:1040px; margin:0 auto; padding:34px 20px; }
.foot-brand { display:inline-flex; align-items:center; gap:8px; font-family:var(--font-d); font-weight:700; font-size:17px; color:var(--ink); }
.foot-addr { color:var(--muted); font-size:13px; margin:12px 0 0; line-height:1.7; }
.foot-addr a { color:var(--ink-soft); }
.foot-links { display:flex; flex-wrap:wrap; gap:18px; margin:16px 0 0; }
.foot-links a { font-size:13.5px; color:var(--ink-soft); }
.foot-copy { color:var(--muted); font-size:12.5px; margin:18px 0 0; }

/* ---------- THEME SWITCHER ---------- */
.theme-fab { position:fixed; right:18px; bottom:18px; z-index:50; display:flex; gap:6px; align-items:center;
  background:var(--surface); border:1px solid var(--border); border-radius:999px; padding:7px 9px; box-shadow:var(--shadow); }
.theme-fab .tl { font-size:12px; font-weight:600; color:var(--muted); padding:0 4px 0 6px; }
.sw { width:24px; height:24px; border-radius:999px; border:2px solid var(--surface); box-shadow:0 0 0 1px var(--border); cursor:pointer; transition:transform .12s; }
.sw:hover { transform:scale(1.12); }
.sw.on { box-shadow:0 0 0 2px var(--accent); }
.sw.clean { background:#2f6bd8; } .sw.gamer { background:#6b4ef0; } .sw.pastel { background:#f0608a; } .sw.minimal { background:#1f2430; }

/* ---------- TOAST ---------- */
.toast { position:fixed; left:50%; bottom:78px; transform:translateX(-50%); z-index:60;
  display:flex; align-items:center; gap:8px; background:var(--ink); color:#fff; font-weight:600; font-size:14px;
  padding:11px 18px; border-radius:999px; box-shadow:0 10px 30px rgba(0,0,0,.22); opacity:0; pointer-events:none;
  transition:opacity .2s, transform .2s; }
.toast.show { opacity:1; transform:translate(-50%, -6px); }

/* ---------- SPOTLIGHT GENERATOR + FEATURED PREVIEW ---------- */
.gen.spotlight { padding:24px; border:1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  box-shadow:0 2px 8px rgba(20,40,80,.05), 0 22px 55px color-mix(in srgb, var(--accent) 13%, transparent); }
.gen-title { font-family:var(--font-d); font-weight:700; font-size:clamp(20px,3.4vw,27px); text-align:center; margin:0; letter-spacing:-.01em; }
.gen-sub { text-align:center; color:var(--muted); font-size:14.5px; margin:6px 0 18px; }
.gen.spotlight .search { padding:9px 9px 9px 20px; border-width:2px; }
.gen.spotlight .search input { font-size:clamp(19px,3vw,23px); }

.featured { margin-top:16px; border:1px solid var(--stage); border-radius:var(--radius);
  background:radial-gradient(120% 140% at 50% -20%, var(--stage-soft) 0%, var(--stage) 70%); padding:22px 20px; text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05), 0 14px 34px rgba(20,28,55,.22); }
.featured-tabs { display:flex; gap:6px; justify-content:center; flex-wrap:wrap; margin-bottom:14px; }
.ftab { font-size:12.5px; font-weight:600; color:#c4cde2; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.14);
  padding:5px 13px; border-radius:999px; transition:.15s; }
.ftab:hover { border-color:rgba(255,255,255,.4); color:#fff; }
.ftab.on { background:#fff; color:var(--stage); border-color:#fff; }
.featured-main { font-family:var(--fancy); font-size:clamp(28px,5.6vw,48px); line-height:1.3; color:#fff;
  word-break:break-word; overflow-wrap:anywhere; min-height:1.3em; padding:10px 4px; cursor:pointer; transition:transform .12s;
  text-shadow:0 1px 16px rgba(120,160,255,.25); }
.featured-main:active { transform:scale(.99); }
.featured-copy { margin-top:14px; display:inline-flex; align-items:center; gap:8px; background:var(--accent); color:var(--accent-ink);
  font-family:var(--font-d); font-weight:700; font-size:15px; padding:12px 26px; border-radius:999px;
  box-shadow:0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); transition:.15s; white-space:nowrap; }
.featured-copy:hover { filter:brightness(1.08); transform:translateY(-1px); }
.featured-copy.done { background:#1f9d63; box-shadow:0 6px 18px rgba(31,157,99,.4); }

/* ---------- BREADCRUMB ---------- */
.crumb { display:flex; gap:8px; align-items:center; font-size:13.5px; color:var(--muted); padding:18px 0 0; flex-wrap:wrap; }
.crumb a { color:var(--ink-soft); } .crumb .sep { opacity:.45; }
.crumb b { color:var(--ink); font-weight:600; }

/* ---------- KEYWORD HERO ---------- */
.kw-hero h1 { font-weight:700; font-size:clamp(24px,4vw,38px); line-height:1.2; margin:14px 0 0; text-wrap:balance; }
.kw-hero .lead { color:var(--ink-soft); font-size:15.5px; line-height:1.65; margin:12px 0 0; max-width:760px; }
.kw-hero .lead .hl { color:var(--accent); font-weight:600; }

/* ---------- STAT BOX ---------- */
.statbox { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.stat { background:var(--surface); padding:16px 18px; }
.stat .v { font-family:var(--font-d); font-weight:700; font-size:23px; color:var(--ink); font-variant-numeric:tabular-nums; }
.stat .k { font-size:12.5px; color:var(--muted); margin-top:2px; }

/* ---------- GENDER VOTE ---------- */
.genvote { display:flex; gap:12px; flex-wrap:wrap; }.gvbtn { flex:1; min-width:150px; display:flex; align-items:center; justify-content:center; gap:10px; padding:16px;
  border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); font-family:var(--font-d);
  font-weight:700; font-size:16px; color:var(--ink); transition:.15s; }
.gvbtn:hover { border-color:color-mix(in srgb, var(--accent) 40%, var(--border)); }
.gvbtn .pct { font-size:13px; color:var(--muted); font-weight:600; font-variant-numeric:tabular-nums; }
.gvbtn.boy.on { border-color:#2f6bd8; background:#eef4ff; color:#2f6bd8; }
.gvbtn.girl.on { border-color:#f0608a; background:#ffeef3; color:#e0457a; }
.gvbar { height:9px; border-radius:999px; overflow:hidden; display:flex; margin-top:12px; background:var(--surface2); }
.genvote .gvbar { flex-basis:100%; width:100%; margin-top:0; }
.gvbar i { display:block; height:100%; transition:width .25s; }
.gvbar .b { background:#2f6bd8; } .gvbar .g { background:#f0608a; }

/* ---------- RELATED LIST ---------- */
.rellist { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:10px; }
.rel { display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:11px 14px; transition:.15s; }
.rel:hover { border-color:color-mix(in srgb, var(--accent) 40%, var(--border)); transform:translateY(-1px); text-decoration:none; }
.rel .rk { font-family:var(--font-d); font-size:13.5px; font-weight:700; color:var(--accent); white-space:nowrap; }
.rel .rv { flex:1; min-width:0; font-family:var(--fancy); font-size:15px; color:var(--ink-soft);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:right; }

/* ---------- RESPONSIVE ---------- */
@media (max-width:640px) {
  .nav-burger { display:grid; }
  .nav-links { position:absolute; top:62px; left:0; right:0; flex-direction:column; gap:2px;
    background:var(--surface); border-bottom:1px solid var(--border); padding:8px 14px; display:none; }
  .nav-links.open { display:flex; }
  .grid { grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:10px; }
  .namegrid { grid-template-columns:1fr; }
  .toc ol { columns:1; }
  .card-text { font-size:19px; }
  .theme-fab .tl { display:none; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } * { animation:none !important; transition:none !important; } }
