/* home-trial.css — ดีไซน์หน้าแรกแบบทดลอง (โหลดต่อจาก style.css, ใช้กับ index-trial.html เท่านั้น) */
.shell{ padding-top:76px; }
/* ระยะข้อความหัวเรื่องจากแถบหัวเว็บ: ปรับตัวเลขนี้ (100 = ห่างเท่าเดิมตอนมีไอคอน, 0 = ชิดสุด) */
:root{ --hero-top:40; }
:root:not([data-theme="light"]) body{ background:radial-gradient(120% 340px at 50% 0, #0b0b0b 0%, #000 70%) no-repeat #000; }

/* ---------- Header ---------- */
header.trial-hdr{
  top:8px; height:56px; box-sizing:border-box;
  width:calc(min(100%, 480px) - 20px);
  padding:0 9px 0 14px; gap:8px;
  background:#0a0a0a; border:1px solid #1e1e1e; border-radius:18px;
  -webkit-backdrop-filter:none; backdrop-filter:none;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset;
}
header.trial-hdr .brand{ gap:6px; text-decoration:none; color:inherit; min-width:0; flex:1 1 auto; }
header.trial-hdr .logo{ width:46px; height:46px; border-radius:12px; flex-shrink:0; margin-left:-5px; }
header.trial-hdr .brand-name{ font-family:inherit; font-size:16px; font-weight:700; letter-spacing:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.hdr-actions{ display:flex; align-items:center; gap:6px; flex-shrink:0; }
.hdr-btn{
  display:flex; align-items:center; justify-content:center;
  background:#1a1a1a; border:0; border-radius:14px; height:37px;
  color:#d8d8d8; cursor:pointer; font-family:inherit; text-decoration:none;
}
.hdr-bal{ gap:6px; padding:0 9px; font-size:15px; font-weight:600; color:#fff; white-space:nowrap; }
.hdr-icon{ width:37px; padding:0; }
/* ปุ่มเมนู = .login-btn เดิม (script.js ใช้งานต่อ) — ล้างสไตล์ปุ่มแดงเดิม */
header.trial-hdr .login-btn.hdr-icon{ background:#1a1a1a; border-radius:14px; padding:0; gap:0; }
header.trial-hdr .login-btn.hdr-icon.is-authed{
  width:auto; padding:0 10px 0 5px; gap:7px; border:0; background:#1a1a1a; color:#e6e6e8;
}
@media (max-width:380px){ header.trial-hdr .brand-name{ font-size:15px; } header.trial-hdr .logo{ width:42px; height:42px; } }

/* ---------- Hero ---------- */
.trial-hero{ padding:calc(50px * var(--hero-top, 40) / 100) 15px 0; text-align:center; display:flex; flex-direction:column; align-items:center; }
.trial-hero h1.headline{ margin:0; font-size:40px; font-weight:400; line-height:1.22; letter-spacing:-.3px; color:#fff; }
.trial-hero .hl-line{
  display:block; margin-top:0; font-size:38px; font-weight:400; line-height:1.22;
  background:linear-gradient(180deg,#f4f4f4 20%,#8a8a8a 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent;
}
.trial-hero h1.headline .hl{ color:transparent; -webkit-text-fill-color:transparent; }
.trial-hero .sub{ margin:18px 7px 0; max-width:none; font-size:14px; line-height:1.65; color:#9a9a9c; }
.trial-hero .cta-row{ display:flex; gap:9px; width:100%; margin:22px 0 0; padding:0; box-sizing:border-box; flex-wrap:nowrap; }
.cta{
  flex:1 1 0; display:flex; align-items:center; justify-content:center; gap:10px;
  height:42px; border-radius:15px; font-size:15px; font-weight:600; font-family:inherit;
  text-decoration:none; -webkit-tap-highlight-color:transparent; transition:transform .15s ease;
}
.cta:active{ transform:scale(.97); }
.cta-primary{
  background:var(--red); color:#fff; border:1px solid rgba(255,255,255,.25);
  box-shadow:0 10px 28px -8px var(--red), 0 1px 0 rgba(255,255,255,.4) inset;
}
.cta-ghost{ background:#0b0b0c; color:#f1f1f3; border:1px solid #26262a; }

/* ---------- Banner: รูป Hero เดิมของเว็บ (storefront.js ใส่ <img> ให้เอง) ---------- */
.promo{
  position:relative; overflow:hidden; box-sizing:border-box;
  margin:24px 16px 0; padding:0; min-height:0; aspect-ratio:748 / 262; border:0; border-radius:12px;
  background:#101012; display:block;
}
.promo.has-image{ aspect-ratio:auto; background:transparent; }
.promo.has-image img{ width:100%; height:auto; display:block; border-radius:12px; }

/* =========================================================
   ธีมสว่าง — ใช้เมื่อ <html data-theme="light"> (สลับด้วยปุ่มพระอาทิตย์/พระจันทร์ในหัวเว็บ)
   ========================================================= */
:root[data-theme="light"]{
  color-scheme:light;
  --bg:#f5f5f8; --bg-raise:#ffffff; --card:#ffffff; --card-border:#e4e4ea;
  --text:#15151a; --text-dim:#5c5c66; --text-faint:#8a8a94;
  background:#f5f5f8;
}
/* ปิดสภาพอากาศพื้นหลัง (ออกแบบมาสำหรับธีมมืด) และคืนสีพื้นหลัง */
:root[data-theme="light"] :not(html)[class*="wfx-"]{ display:none !important; }
:root[data-theme="light"].wfx-on body,
:root[data-theme="light"].wfx-on .shell{ background:var(--bg) !important; }
:root[data-theme="light"] body{ background:var(--bg); color:var(--text); }

/* Header */
:root[data-theme="light"] header.trial-hdr{ background:#fff; border-color:#e4e4ea; box-shadow:0 6px 20px -10px rgba(20,20,40,.18); }
:root[data-theme="light"] header.trial-hdr .brand-name{ color:#15151a; }
:root[data-theme="light"] .hdr-btn,
:root[data-theme="light"] header.trial-hdr .login-btn.hdr-icon,
:root[data-theme="light"] header.trial-hdr .login-btn.hdr-icon.is-authed{ background:#efeff3; color:#25252b; }
:root[data-theme="light"] .hdr-bal{ color:#15151a; }
:root[data-theme="light"] .hdr-icon svg{ stroke:#2a2a30; }

/* Hero */
:root[data-theme="light"] .trial-hero h1.headline{ color:#15151a; }
:root[data-theme="light"] .trial-hero .hl-line{ background:linear-gradient(180deg,#1a1a1f 30%,#ff0001 100%); -webkit-background-clip:text; background-clip:text; }
:root[data-theme="light"] .trial-hero .sub{ color:#5c5c66; }
:root[data-theme="light"] .cta-ghost{ background:#fff; color:#15151a; border-color:#d9d9e0; }
:root[data-theme="light"] .cta-primary{ box-shadow:0 8px 22px -8px rgba(255,0,1,.7), 0 1px 0 rgba(255,255,255,.35) inset; }

/* Stats */
:root[data-theme="light"] .stats .stat-card{ background:#fff; border:1px solid rgba(255,0,1,.22); box-shadow:0 8px 20px -14px rgba(20,20,40,.25); }
:root[data-theme="light"] .stats .stat-card > canvas.scfx-bg{ display:none; }
:root[data-theme="light"] .stats .stat-icon{ background:#ffeaea; color:#e00001; box-shadow:none; }
:root[data-theme="light"] .stats .stat-label{ color:#5c5c66; text-shadow:none; }
:root[data-theme="light"] .stats .stat-value{ background:none; -webkit-text-fill-color:#e00001; color:#e00001; }
:root[data-theme="light"] .stats .stat-value .unit{ -webkit-text-fill-color:#6a6a74; color:#6a6a74; }

/* Why / Recent / Weekly */
:root[data-theme="light"] .why-card{ background:#fff; border-color:#e4e4ea; box-shadow:0 8px 20px -16px rgba(20,20,40,.25); }
:root[data-theme="light"] .why-icon{ background:#ffeaea; }
:root[data-theme="light"] .rp-card,
:root[data-theme="light"] .wb-card{ background:#fff; border-color:#e4e4ea; box-shadow:0 8px 18px -14px rgba(20,20,40,.3); }
:root[data-theme="light"] .wb-card.is-top{ border-color:rgba(255,0,1,.45); }
:root[data-theme="light"] .rp-card img,
:root[data-theme="light"] .rp-card .rp-icon-fallback,
:root[data-theme="light"] .wb-media{ background:#ececf0; }

/* Categories */
:root[data-theme="light"] .cat-item{ background:#fff; border-color:#e4e4ea; box-shadow:0 12px 26px -18px rgba(20,20,40,.35); }
:root[data-theme="light"] .cat-banner-bg{ background:#ececf0; }
:root[data-theme="light"] .cat-banner::after{ background:linear-gradient(to top,#fff 0%,rgba(255,255,255,.35) 18%,transparent 42%); }
:root[data-theme="light"] .cat-meta{ background:linear-gradient(180deg,transparent,#fff 45%,#fff); }
:root[data-theme="light"] .cat-meta::before{ background:radial-gradient(55% 100% at 50% 50%,rgba(255,40,50,.1),transparent 75%); }
:root[data-theme="light"] .cat-meta-name{ color:#d0001a; text-shadow:none; }
:root[data-theme="light"] .cat-st{ color:#6a6a74; }
:root[data-theme="light"] .cat-st b{ color:#15151a; }

/* Footer + Discord */
:root[data-theme="light"] footer.sf .fname{ color:#15151a; }
:root[data-theme="light"] footer.sf .sf-desc,
:root[data-theme="light"] footer.sf .sf-col a,
:root[data-theme="light"] footer.sf .sf-copy,
:root[data-theme="light"] footer.sf .sf-legal a{ color:#5c5c66; }
:root[data-theme="light"] footer.sf .sf-col h4{ color:#15151a; }
:root[data-theme="light"] footer.sf .sf-col a:hover,
:root[data-theme="light"] footer.sf .sf-legal a:hover{ color:#000; }
:root[data-theme="light"] footer.sf .sf-rule{ background:#e4e4ea; }
:root[data-theme="light"] .dcw{ background:#fff; border-color:#e4e4ea; }
:root[data-theme="light"] .dcw-title b,
:root[data-theme="light"] .dcw-online span,
:root[data-theme="light"] .dcw-name{ color:#15151a; }
:root[data-theme="light"] .dcw-title span,
:root[data-theme="light"] .dcw-online small{ color:#6a6a74; }
:root[data-theme="light"] .dcw-online{ background:#efeff3; }
:root[data-theme="light"] .dcw-list{ border-color:#e4e4ea; }
:root[data-theme="light"] .dcw-av em{ box-shadow:0 0 0 2.5px #fff; }

/* =========================================================
   เงาบางๆ (ธีมมืดเท่านั้น) — เพิ่มความลอยนิดหน่อย ไม่ฉูดฉาด
   ปรับความเข้มได้ที่ตัวแปร --sh ด้านล่าง (0 = ไม่มีเงา, .5 = ค่าปัจจุบัน)
   ========================================================= */
:root:not([data-theme="light"]){ --sh:.5; }
:root:not([data-theme="light"]) header.trial-hdr{
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset, 0 8px 20px -10px rgba(0,0,0,var(--sh));
}
:root:not([data-theme="light"]) .cta-ghost{ box-shadow:0 6px 16px -10px rgba(0,0,0,var(--sh)); }
:root:not([data-theme="light"]) .promo.has-image img{ box-shadow:0 10px 24px -14px rgba(0,0,0,.7); }
:root:not([data-theme="light"]) .stats .stat-card,
:root:not([data-theme="light"]) .why-card,
:root:not([data-theme="light"]) .rp-card,
:root:not([data-theme="light"]) .cat-item,
:root:not([data-theme="light"]) .dcw{
  box-shadow:0 10px 22px -16px rgba(0,0,0,.75);
}
