:root {
  /* ธีมม่วงเข้ม (DOOLAKORN) — โครงตัวแปรเดิมของ jortang ทุกอย่าง แค่เปลี่ยนค่าสี */
  --bg: #140e24;
  --bg-2: #1d1536;
  --card: #1d1536;
  --card-2: #271d47;
  --line: #362a5c;
  --ink: #f1eefb;
  --muted: #a89cc4;
  --pink: #7c3aed;
  --pink-2: #a855f7;
  --gold: #f4b11e;
  --green: #40d376;
  --blue: #5498f7;
  --purple: #a04bef;
  --red: #e53d3d;
  --grad: linear-gradient(135deg, var(--pink), var(--pink-2));
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 15% -10%, rgba(124,58,237,.20), transparent 60%),
              radial-gradient(1000px 500px at 100% 0%, rgba(160,75,239,.14), transparent 55%),
              var(--bg);
  color: var(--ink);
  font-family: "Prompt", system-ui, sans-serif;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.brand-text, .hero-body h1, .card .info h3,
.section-head h2, .detail-body h2, .plan-tier-head h3, .plan-row-price,
.auth-card h2, .panel h3 {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(20,17,29,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--grad);
  font-weight: 900; font-size: 21.8px;
  box-shadow: 0 8px 22px rgba(124,58,237,.35);
}
.brand-text { font-weight: 900; font-size: 25.3px; line-height: 1.1; }
.brand-text small { display: block; font-weight: 600; font-size: 14.9px; color: var(--muted); }

.topnav-links { display: flex; align-items: center; gap: 4px; }
.tab.toplink {
  flex-direction: row;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 16.7px;
  font-weight: 700;
  white-space: nowrap;
}
.tab.toplink span { display: none; }
.tab.toplink.is-active { background: rgba(255,255,255,.07); }
.tab.toplink.is-active::before { display: none; }

.search-wrap {
  flex: 1;
  min-width: 0;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 42px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
}
.search-wrap input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); }
.search-wrap .icon { opacity: .7; font-size: 16.1px; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.pill {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 800;
  font-size: 14.9px;
  white-space: nowrap;
}
.pill.is-vip { background: var(--grad); border: 0; }

.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(26,22,37,.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 0 12px;
  background: none; border: 0; color: var(--muted); font-size: 12.6px; font-weight: 700;
  position: relative;
}
.tab span { font-size: 20.7px; }
.tab.is-active { color: var(--pink-2); }
.tab.is-active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad);
}

.app { max-width: 1280px; margin: 0 auto; padding: 22px 24px 60px; }

.hero {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1916 / 821;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 32px;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .5s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(15,12,22,.95) 5%, rgba(15,12,22,.25) 55%, rgba(15,12,22,.1)),
              linear-gradient(90deg, rgba(15,12,22,.75), transparent 65%);
}
.hero-slide.generated-slide {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #120b18;
}
.hero-slide.generated-slide::before { display: none; }
.generated-slide picture,
.hero-art { display: block; width: 100%; height: 100%; }
.hero-art { object-fit: cover; object-position: left center; cursor: pointer; }
.hero-slide .hero-body { position: relative; z-index: 1; max-width: 620px; margin-left: 34px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--grad); font-size: 13.8px; font-weight: 900; margin-bottom: 12px;
}
.hero-body h1 { margin: 0 0 10px; font-size: clamp(29.9px, 4.6vw, 50.6px); line-height: 1.1; }
.hero-body p { margin: 0 0 18px; color: #f0e6ea; font-size: 16.1px; max-width: 480px; }
.hero-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  background: rgba(10,8,15,.5); color: #fff;
  font-size: 34.5px; line-height: 1;
  backdrop-filter: blur(8px);
  transition: background .2s ease, transform .2s ease;
}
.hero-arrow:hover { background: rgba(124,58,237,.85); transform: translateY(-50%) scale(1.04); }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }
.hero-dots { position: absolute; z-index: 2; right: 22px; bottom: 18px; display: flex; gap: 6px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 999px; border: 0; background: rgba(255,255,255,.42); padding: 0; transition: width .25s ease, background .25s ease; }
.hero-dots button.is-active { background: var(--pink-2); width: 22px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--card-2); font-weight: 800; font-size: 16.1px;
}
.btn.primary { background: var(--grad); border: 0; box-shadow: 0 10px 26px rgba(124,58,237,.3); }
.btn.ghost { background: rgba(255,255,255,.06); }
.btn.block { width: 100%; justify-content: center; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14.4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.ad-banner {
  position: relative;
  margin: 22px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 96px;
}
.ad-banner img { width: 100%; height: 100%; object-fit: cover; }
.ad-banner .ad-tag, .ad-vertical .ad-tag {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(0,0,0,.55); font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
}
.ad-vertical {
  position: relative;
  margin: 22px auto;
  max-width: 300px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
}
.ad-vertical img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-vertical-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1px dashed var(--line); background: var(--card); color: var(--muted);
  font-size: 17.2px; font-weight: 800; cursor: default;
}
.ad-vertical-placeholder small { font-size: 13.8px; font-weight: 600; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  margin: 30px 0 14px;
}
.section-head h2 { margin: 0; font-size: 23px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 14.9px; }
.section-head-title { display: flex; align-items: center; gap: 12px; }
.back-btn {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 23px; line-height: 1;
}

.section-band {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line);
  margin: 28px 0 14px;
}
.band-left { display: flex; align-items: center; gap: 12px; }
.band-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-size: 19.5px; flex: none;
}
.section-band h2 { margin: 0; font-size: 18.4px; font-weight: 800; }
.band-more {
  height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13.8px; font-weight: 800; background: transparent; border: 1px solid; white-space: nowrap;
}
.band-recommend { background: rgba(124,58,237,.10); border-color: rgba(124,58,237,.32); }
.band-recommend .band-icon { background: rgba(124,58,237,.22); color: #d0aaff; }
.band-recommend h2 { color: #d0aaff; }
.band-popular { background: rgba(244,177,30,.10); border-color: rgba(244,177,30,.32); }
.band-popular .band-icon { background: rgba(244,177,30,.22); color: #ffcf6b; }
.band-popular h2 { color: #ffcf6b; }
.band-popular .band-more { border-color: rgba(244,177,30,.4); color: #ffcf6b; }
.band-new { background: rgba(64,211,118,.10); border-color: rgba(64,211,118,.32); }
.band-new .band-icon { background: rgba(64,211,118,.22); color: #8fe0ab; }
.band-new h2 { color: #8fe0ab; }
.band-new .band-more { border-color: rgba(64,211,118,.4); color: #8fe0ab; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 36px; padding: 0 15px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14.4px; color: var(--muted);
}
.chip:nth-of-type(6n+2) { background: rgba(236,72,153,.16); border-color: rgba(236,72,153,.3); color: #f6a8cb; }
.chip:nth-of-type(6n+3) { background: rgba(84,152,247,.16); border-color: rgba(84,152,247,.3); color: #9dc2fa; }
.chip:nth-of-type(6n+4) { background: rgba(64,211,118,.16); border-color: rgba(64,211,118,.3); color: #8fe0ab; }
.chip:nth-of-type(6n+5) { background: rgba(244,177,30,.16); border-color: rgba(244,177,30,.3); color: #f8cc7c; }
.chip:nth-of-type(6n+6) { background: rgba(160,75,239,.16); border-color: rgba(160,75,239,.3); color: #c79bf5; }
.chip.is-active { background: var(--grad) !important; color: white !important; border: 0 !important; }
.chip.sm { height: 26px; padding: 0 11px; font-size: 13.2px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.4); }
.card .poster {
  position: relative;
  aspect-ratio: 9/16;
  background-size: cover; background-position: center;
  background-color: var(--card-2);
}
.card .rank-no {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--grad); font-size: 13.8px; font-weight: 900;
}
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12.1px; font-weight: 900; letter-spacing: .02em;
}
.badge.vip { background: linear-gradient(135deg, var(--gold), #ff8a00); color: #241300; }
.badge.free { background: var(--green); color: #0b3d20; }
.badge.hot { background: var(--pink); color: #fff; }
.badge.off { background: rgba(255,255,255,.08); color: var(--muted); }
.card .badges { position: absolute; top: 8px; right: 8px; z-index: 1; display: flex; gap: 4px; }
.card .info { padding: 10px 12px 13px; }
.card .info h3 { margin: 0 0 4px; font-size: 15.5px; }
.card .info .meta { color: var(--muted); font-size: 13.2px; }

.poster-royal { background-image: linear-gradient(155deg,#3b1257,#9c2160 55%,#e8a33d); }
.poster-mafia { background-image: linear-gradient(155deg,#15181f,#6b1530 55%,#3a3f4d); }
.poster-fantasy { background-image: linear-gradient(155deg,#0b3b32,#0f766e 50%,#22d3ee); }
.poster-office { background-image: linear-gradient(155deg,#0f1b3d,#141824 55%,#7c3aed); }
.poster-cafe { background-image: linear-gradient(155deg,#4a2c12,#a8621b 50%,#f4b8c9); }
.poster-action { background-image: linear-gradient(155deg,#0c0f1a,#1f3a8f 48%,#e8a33d); }


.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* series detail dialog */
.dialog { border: 0; padding: 0; background: transparent; max-width: 920px; width: calc(100vw - 28px); }
.dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(2px); }
.detail-layout { display: grid; grid-template-columns: 220px 1fr; background: var(--bg-2); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.detail-poster { aspect-ratio: 9/16; background-size: cover; background-position: center; }
.detail-body { padding: 24px; max-height: 80vh; overflow: auto; }
.detail-body h2 { margin: 6px 0 8px; font-size: 27.6px; }
.detail-body .meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.detail-body p.synopsis { color: #e2d6db; font-size: 15.5px; margin: 0 0 16px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px,1fr)); gap: 8px; }
.ep-btn {
  height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  font-weight: 800; font-size: 14.4px; position: relative;
}
.ep-btn.is-locked { color: var(--gold); background: rgba(244,177,30,.1); border-color: rgba(244,177,30,.3); }
.ep-btn.is-current { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink); }
.dialog-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 999px; background: rgba(0,0,0,.5); border: 0; color: white; font-size: 18.4px; }

/* player */
.player-wrap { display: grid; grid-template-columns: minmax(280px,380px) 1fr; gap: 22px; }
.player-shell {
  position: relative; aspect-ratio: 9/16; max-height: 78vh;
  border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line);
}
.player-shell video { width: 100%; height: 100%; object-fit: cover; }
.player-locked {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 26px;
  background: rgba(15,12,22,.92);
}
.player-locked .lock-box { max-width: 260px; }
.player-locked .lock-icon { font-size: 46px; margin-bottom: 10px; }
.player-side { display: grid; gap: 16px; align-content: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.panel h3 { margin: 0 0 10px; font-size: 17.2px; }

.info-card-row { display: flex; gap: 14px; }
.info-card-poster {
  width: 84px; flex: none; aspect-ratio: 9/16;
  border-radius: 10px; background-size: cover; background-position: center; background-color: var(--card-2);
}
.info-card-body { min-width: 0; }
.info-card-body h3 { margin: 0 0 8px; font-size: 17.2px; line-height: 1.3; }
.info-card .chip-row { margin-bottom: 8px; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13.8px; color: var(--muted); }
.info-card .synopsis { margin-top: 12px; }

/* vip / membership */
.profile-card .menu-row { margin-top: 12px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }

.plan-tier {
  padding: 20px; border-radius: 18px; background: var(--card);
  border: 1px solid rgba(124,58,237,.35); box-shadow: 0 14px 30px rgba(124,58,237,.14);
}
.plan-tier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.plan-tier-emoji { font-size: 34.5px; }
.plan-tier-head h3 { margin: 0; font-size: 20.7px; }
.plan-tier-head p { margin: 2px 0 0; color: var(--muted); font-size: 14.4px; }
.feature-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; font-size: 14.9px; color: #d9c9d2; }
.plan-row-list { display: grid; gap: 10px; }
.plan-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); text-align: left;
}
.plan-row.is-selected { border-color: var(--pink); background: rgba(124,58,237,.12); }
.plan-row-name { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15.5px; }
.plan-row-price { font-weight: 800; font-size: 16.1px; }
.plan-row-radio { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--line); flex: none; }
.plan-row-radio.is-on { border-color: var(--pink); background: radial-gradient(circle, var(--pink) 0 40%, transparent 42%); }

.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; text-align: center; }
.trust-row > div { padding: 14px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.trust-row span { font-size: 23px; display: block; margin-bottom: 6px; }
.trust-row strong { display: block; font-size: 13.2px; font-weight: 800; }
.trust-row small { color: var(--muted); font-size: 12.1px; }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 14px; }

.transfer-box { display: grid; gap: 10px; margin-top: 14px; }
.transfer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 17px; color: #fff; }
.transfer-row:last-child { border-bottom: 0; }
.transfer-row span { color: #fff; }
.transfer-row strong { font-size: 19px; }
.upload-box {
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 20px; text-align: center; margin-top: 14px; cursor: pointer;
}
.upload-box img { max-height: 160px; margin: 0 auto 10px; border-radius: 10px; }

.orders-list { display: grid; gap: 10px; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 14.9px; }
.order-status { padding: 4px 10px; border-radius: 999px; font-size: 12.6px; font-weight: 900; }
.order-status.pending_payment { background: rgba(244,177,30,.15); color: var(--gold); }
.order-status.pending_review { background: rgba(59,130,246,.18); color: #7dd3fc; }
.order-status.paid { background: rgba(34,197,94,.18); color: #6ee7a2; }
.order-status.rejected { background: rgba(239,68,68,.18); color: #fca5a5; }

/* auth dialog */
.dialog-narrow { max-width: 400px; }
.auth-card { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.auth-card h2 { margin: 0 0 4px; }
.auth-card p.sub { color: var(--muted); font-size: 14.9px; margin: 0 0 18px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 14.4px; font-weight: 700; color: var(--muted); }
.field input { height: 44px; padding: 0 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.stars { color: #4a4159; letter-spacing: 2px; }
.stars .star.is-on { color: var(--gold); }
.stars.sm { font-size: 13.8px; }
.stars-input { display: flex; gap: 6px; }
.stars-input .star { background: none; border: 0; padding: 0; font-size: 32.2px; color: #4a4159; line-height: 1; }
.stars-input .star.is-on { color: var(--gold); }
.rating-summary { display: flex; align-items: center; gap: 10px; font-size: 15.5px; color: var(--muted); margin-bottom: 14px; }
.rating-summary .stars { font-size: 20.7px; }

.review-form { padding: 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.field-label { font-size: 14.4px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.review-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; resize: vertical;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-size: 15.5px;
}
.review-foot { display: flex; justify-content: space-between; margin: 6px 0 12px; color: var(--muted); font-size: 13.2px; }
.review-list { margin-top: 16px; display: grid; gap: 10px; }
.review-row { padding: 12px 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-top strong { font-size: 15.5px; }
.review-row p { margin: 8px 0 6px; font-size: 15.5px; }
.review-row small { color: var(--muted); font-size: 13.2px; }

.panel + .panel { margin-top: 16px; }
.panel .synopsis { margin: 0; color: #ded4e8; font-size: 15.5px; }

.legal-doc h3 { margin: 20px 0 8px; font-size: 16.7px; color: var(--pink-2); }
.legal-doc h3:first-child { margin-top: 0; }
.legal-doc p { margin: 0; color: #ded4e8; font-size: 15.5px; line-height: 1.7; }

/* ---------- หน้าโปรไฟล์สมาชิก ---------- */
.profile-card {
  border-radius: 18px; padding: 18px;
  background: linear-gradient(140deg, rgba(124,58,237,.16), rgba(160,75,239,.12)), var(--card);
  border: 1px solid rgba(124,58,237,.3);
}
.profile-top { display: flex; align-items: center; gap: 14px; }
.profile-top .avatar {
  width: 58px; height: 58px; border-radius: 999px; flex: none;
  display: grid; place-items: center; font-size: 27.6px; font-weight: 900;
  background: var(--grad); box-shadow: 0 8px 22px rgba(124,58,237,.35);
}
.profile-top h3 { margin: 0; font-size: 20.7px; font-weight: 800; }
.profile-top small { color: var(--muted); font-size: 13.8px; }
.profile-vip {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: rgba(0,0,0,.25); border: 1px solid var(--line);
}
.profile-vip span { font-size: 14.9px; font-weight: 800; color: var(--muted); }
.profile-vip.is-vip span { color: var(--gold); }
.profile-vip p { margin: 4px 0 0; font-size: 15.5px; }

.coin-box {
  margin-top: 12px; padding: 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(244,177,30,.18), rgba(244,177,30,.06));
  border: 1px solid rgba(244,177,30,.35);
}
.coin-box span { font-size: 14.4px; font-weight: 800; color: var(--gold); }
.coin-box strong { display: block; margin: 2px 0; font-size: 32.2px; font-weight: 900; }
.coin-box small { color: var(--muted); font-size: 13.2px; }

.redeem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.redeem-tile {
  padding: 14px 8px; border-radius: 14px; text-align: center;
  background: var(--card); border: 1px solid rgba(244,177,30,.3);
}
.redeem-tile small { display: block; color: var(--muted); font-size: 13.2px; }
.redeem-tile strong { display: block; margin: 6px 0 4px; font-size: 21.8px; font-weight: 800; color: var(--gold); }
.redeem-tile span { font-size: 13.2px; font-weight: 700; color: var(--pink-2); }
.redeem-tile.is-short { opacity: .55; border-color: var(--line); }
.redeem-tile.is-short span { color: var(--muted); }

.coin-history { margin-top: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); padding: 12px 14px; }
.coin-history summary { cursor: pointer; font-size: 14.9px; font-weight: 700; color: var(--muted); }
.coin-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.9px; }
.coin-row:last-child { border-bottom: 0; }
.coin-row small { display: block; color: var(--muted); font-size: 12.6px; }
.coin-row .plus { color: var(--green); }
.coin-row .minus { color: var(--pink-2); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.stat-tile { padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19.5px; }
.stat-tile strong { display: block; margin-top: 12px; font-size: 19.5px; font-weight: 800; }
.stat-tile small { color: var(--muted); font-size: 13.8px; }

.resume-bar {
  width: 100%; margin-top: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  border-radius: 14px; background: var(--card-2); border: 1px solid rgba(236,72,153,.3);
}
.resume-icon {
  width: 36px; height: 36px; border-radius: 999px; flex: none;
  display: grid; place-items: center; background: var(--grad); font-size: 16.1px;
}
.resume-text { flex: 1; min-width: 0; }
.resume-text strong { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-text small { color: var(--muted); font-size: 13.8px; }
.resume-go { color: var(--muted); font-size: 23px; }

.band-sub { margin: -8px 0 14px; color: var(--muted); font-size: 14.9px; }
.plan-tile {
  padding: 16px 12px; border-radius: 14px; text-align: center;
  background: var(--card); border: 1px solid var(--line);
}
.plan-tile strong { display: block; margin: 10px 0 2px; font-size: 23px; font-weight: 800; }
.plan-tile small { color: var(--muted); font-size: 13.8px; }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.menu-tile {
  padding: 16px; border-radius: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--line);
}
.menu-tile strong { display: block; margin-top: 12px; font-size: 16.1px; font-weight: 800; }
.menu-tile small { color: var(--muted); font-size: 13.8px; }
.tile-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19.5px; flex: none; }

.list-head { margin: 24px 0 10px; font-size: 14.9px; font-weight: 800; color: var(--muted); }
.menu-list { border-radius: 14px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.menu-row {
  width: 100%; padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row strong { display: block; font-size: 16.1px; font-weight: 700; }
.menu-row small { color: var(--muted); font-size: 13.8px; }
.menu-row > span:nth-child(2) { flex: 1; min-width: 0; }
.menu-row .go { color: var(--muted); font-size: 20.7px; }
.menu-row.is-static { cursor: default; }

.account-divider { margin: 6px 0 12px; font-size: 14.4px; font-weight: 700; color: var(--muted); }

.field input::placeholder { color: #6f6683; }
.field-hint { display: block; margin-top: 6px; font-size: 13.2px; color: var(--muted); line-height: 1.4; }
.field-pass { position: relative; display: flex; }
.field-pass input { flex: 1; padding-right: 44px; }
.field-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 17.2px; opacity: .65;
}
.field-eye.is-on { opacity: 1; color: var(--pink-2); }
.pw-strength { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: -4px 0 8px; }
.pw-strength i { height: 3px; border-radius: 999px; background: var(--line); transition: background .2s ease; }
.pw-strength i.is-weak { background: #ef4444; }
.pw-strength i.is-ok { background: var(--gold); }
.pw-strength i.is-strong { background: var(--green); }

.auth-switch { text-align: center; margin-top: 14px; font-size: 14.9px; color: var(--muted); }
.auth-switch a { color: var(--pink-2); font-weight: 800; }
.form-error {
  color: #ffd4d4; font-size: 14.9px; margin: 0 0 14px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(239,68,68,.16); border: 1px solid rgba(239,68,68,.4);
}
.field input.is-invalid { border-color: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,.18); }

.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  max-width: min(380px, calc(100vw - 36px));
  padding: 13px 16px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateY(120%); opacity: 0; transition: all .2s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 900px) {
  .topnav { padding: 12px 16px; }
  .brand-text { display: none; }
  .topnav-links { display: none; }
  .tabbar { display: grid; }
  .app { padding: 16px 16px 90px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-poster { aspect-ratio: 16/9; }
  .player-wrap { grid-template-columns: 1fr; }
  .player-shell { max-height: none; }
  .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero { min-height: 0; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; }
  .hero-slide { padding: 24px 20px 30px; background-position: 64% center; }
  .hero-slide::before {
    background: linear-gradient(0deg, rgba(15,12,22,.97) 5%, rgba(15,12,22,.72) 43%, rgba(15,12,22,.12) 82%),
                linear-gradient(90deg, rgba(15,12,22,.75), transparent 85%);
  }
  .hero-slide .hero-body { margin-left: 0; }
  .hero-body h1 { font-size: 31px; }
  .hero-body p { font-size: 14.9px; line-height: 1.6; }
  .hero-arrow { width: 34px; height: 34px; font-size: 28.7px; top: 28px; transform: none; }
  .hero-arrow:hover { transform: scale(1.04); }
  .hero-prev { left: 8px; }
  .hero-next { right: 8px; }
  .hero-dots { right: 16px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

.support-link {
  display: block; margin-top: 14px; padding: 12px 14px; border-radius: 12px; text-align: center;
  background: rgba(6,199,85,.12); border: 1px solid rgba(6,199,85,.4);
  color: #7ee2a8; font-size: 14.9px; font-weight: 700;
}

/* ป็อปอัพ "ชำระเงินสำเร็จ" หลังตรวจสลิปผ่าน */
.pay-success {
  background: var(--panel, #141824);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 30px 24px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pay-success::before {
  content: "";
  position: absolute; inset: -40% -20% auto -20%; height: 200px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,60,140,.35), transparent 70%);
  pointer-events: none;
}
.pay-success-burst {
  position: relative;
  width: 76px; height: 76px; margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(34,197,94,.15), 0 10px 30px rgba(34,197,94,.35);
  animation: paySuccessPop .45s cubic-bezier(.2,.9,.3,1.4);
}
.pay-success-check { color: #fff; font-size: 46px; font-weight: 900; line-height: 1; }
@keyframes paySuccessPop {
  0% { transform: scale(.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.pay-success h2 {
  margin: 0 0 8px; font-size: 26.4px; color: #fff; position: relative;
}
.pay-success-lead {
  margin: 0 0 18px; color: rgba(255,255,255,.75); font-size: 16.7px; line-height: 1.7; position: relative;
}
.pay-success-lead strong { color: var(--gold, #ffb020); }
.pay-success-box {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 4px 14px;
  margin-bottom: 18px;
  text-align: left;
  position: relative;
}
.pay-success-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 0; font-size: 16.1px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.pay-success-row:last-child { border-bottom: 0; }
.pay-success-row span { color: rgba(255,255,255,.6); }
.pay-success-row b { color: #fff; font-weight: 700; }
.pay-success-note {
  margin: 12px 0 0; font-size: 13.8px; color: rgba(255,255,255,.45); line-height: 1.6; position: relative;
}
