:root {
  --bg: #0a0a0a;
  --fg: #e8e8e8;
  --muted: #8a8a8a;
  --surface: #141414;
  --border: #2a2a2a;
  --cyan: #4dd9d9;
  --orange: #e8723a;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Sans Thai", "Sukhumvit Set", "Thonburi", "Noto Sans Thai", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; }

.hero, .filter, .grid, .closing, footer {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.hero { padding: 40px 0 24px; }

.brand {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--cyan);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-decoration: none;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 8vw, 56px);
  line-height: 1.25;
  font-weight: 700;
}

h1 em { font-style: normal; color: var(--orange); }

.hero p, .closing p {
  max-width: 40em;
  margin: 0 0 8px;
  color: #c9c9c9;
  font-size: clamp(16px, 4.2vw, 18px);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}

.btn:hover { border-color: var(--cyan); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #111; }
.btn.primary:hover { filter: brightness(1.08); }
button.btn { justify-content: center; color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
button.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; }

.filter {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  padding: 12px 0;
  background: linear-gradient(var(--bg) 70%, transparent);
}

.filter button {
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.filter button[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 28px 20px;
  padding: 8px 0 48px;
}

.card { display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 68px; }
.card[hidden] { display: none; }

.player {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.player img, .player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(10, 10, 10, .62);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
  transition: transform .15s, background .15s;
}

.play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  translate: -50% -50%;
  border-style: solid;
  border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent #fff;
}

.player:hover .play, .player:focus-visible .play { transform: scale(1.08); background: var(--orange); }
.player:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.soon {
  display: grid;
  place-items: center;
  cursor: default;
  color: var(--muted);
  background: repeating-linear-gradient(135deg, #121212 0 14px, #171717 14px 28px);
}

.meta { padding: 14px 2px 0; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.num { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid currentColor;
}

.tag-th { color: var(--orange); }
.tag-en { color: var(--cyan); }

.card h2 { margin: 6px 0 0; font-size: 20px; line-height: 1.35; }

.en { margin: 2px 0 8px; color: var(--muted); font-size: 13px; }

.desc { margin: 0 0 10px; font-size: 15px; color: #cfcfcf; }

.demo { margin: 0; font-size: 14px; color: var(--muted); }
.demo span { display: block; font-size: 12px; }
.demo q { color: var(--fg); quotes: none; }

.closing {
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
}

.closing h2 { margin: 0 0 12px; font-size: clamp(22px, 6vw, 32px); }

footer {
  padding: 24px 0 calc(32px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 720px) {
  .hero { padding-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

video.player { object-fit: contain; background: #000; cursor: auto; }

/* Phones: compact side-by-side cards so all 20 styles scan quickly; a playing card goes full width. */
@media (max-width: 599px) {
  .grid { gap: 22px; }
  .card { display: grid; grid-template-columns: 40% 1fr; gap: 14px; align-items: start; }
  .card .meta { padding-top: 0; }
  .card h2 { font-size: 17px; }
  .desc { font-size: 14px; line-height: 1.55; }
  .play { width: 52px; height: 52px; }
  .play::after { border-width: 10px 0 10px 16px; }
  .card.playing { grid-template-columns: 1fr; }
}

/* ---------- Shared widths for the added sections ---------- */
.igf, .longform, .styles-head {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.fine { color: var(--muted); font-size: 13px; line-height: 1.6; }
.form-err { min-height: 1em; margin: 6px 0 0; color: #ff9b7a; font-size: 14px; }

/* ---------- Long-form 16:9 ---------- */
.player.wide { aspect-ratio: 16 / 9; }

.dur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.longform { padding: 40px 0 8px; border-top: 1px solid var(--border); }
.longform h2, .styles-head h2 { margin: 0 0 10px; font-size: clamp(24px, 6.4vw, 36px); line-height: 1.3; }
.longform > p, .styles-head p { max-width: 40em; margin: 0 0 8px; color: #c9c9c9; }

.lf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 28px 24px;
  margin-top: 22px;
}

.lf-card { min-width: 0; scroll-margin-top: 16px; }
.lf-card .meta { padding-top: 12px; }
.lf-card h3 { margin: 8px 0 6px; font-size: 21px; line-height: 1.4; }
.lf-card .tag { display: inline-block; }

/* Dub switch on a long-form card: same picture, another soundtrack. */
.dub { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; scroll-margin-top: 16px; }
.dub button {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.dub button[aria-pressed="true"] { border-color: var(--orange); background: #2a160c; color: var(--fg); }
.dub button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.dub-note { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }

.chan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.chan-name { color: var(--muted); font-size: 14px; }
.chan-name b { color: var(--fg); font-weight: 600; }
.chan-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s;
}
.social:hover, .social:focus-visible { border-color: var(--cyan); }
.social svg { flex: none; }

/* ---------- Sales hero: offer, price, seats and both pay buttons above the fold ---------- */
.hero.sell { padding: 28px 0 32px; }
.sell h1 { font-size: clamp(28px, 7.6vw, 52px); margin-bottom: 12px; }
.sell-copy { display: grid; gap: 12px; max-width: 46em; }
.sell-copy > p { margin: 0; }
.sell .offer-kicker { margin: 0; color: var(--cyan); }
.sell-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sell-price b { color: var(--fg); font-size: clamp(44px, 12vw, 64px); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sell-price span { color: #c9c9c9; font-size: 16px; }
.sell-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.sell-cta .pay-btn { width: auto; min-height: 56px; padding: 10px 26px; font-size: 17px; font-weight: 700; }
.sell .form-err:empty { display: none; }
.sell .fine a { color: var(--cyan); font-weight: 600; }
@media (max-width: 599px) {
  .sell-cta .pay-btn { width: 100%; }
}

/* ---------- Done-with-you offer ---------- */
.offer {
  display: grid;
  gap: 24px 48px;
  width: min(100% - 32px, 1120px);
  margin: 40px auto 0;
  padding: 40px 0 8px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 8px;
}
.offer h2 { margin: 0 0 14px; font-size: clamp(24px, 6.4vw, 38px); line-height: 1.3; }
.offer-copy > p { max-width: 36em; margin: 0 0 8px; color: #c9c9c9; }
.slots {
  justify-self: start;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 15px;
  font-weight: 600;
}
.slots b { font-variant-numeric: tabular-nums; }
.pay-btn.reserve-btn { border-color: var(--orange); background: transparent; color: var(--orange); }

/* Checkout card: dark, title, big price, check-list, one big button. */
.offer-card {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 26px 22px 20px;
  border: 1px solid #333;
  border-radius: 22px;
  background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.offer-kicker { margin: 0 0 -6px; color: var(--cyan); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.offer-next { margin: 0; padding: 10px 12px; border-radius: 10px; background: #10201f; color: #bfe9e6; font-size: 14px; line-height: 1.55; }
.offer-title { margin: 0; font-size: clamp(21px, 5.4vw, 26px); line-height: 1.4; }
.offer-price { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 0; }
.offer-price b { color: var(--fg); font-size: clamp(46px, 13vw, 64px); font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.offer-price span { color: #c9c9c9; font-size: 20px; font-weight: 600; }
.offer-note { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.checks { display: grid; gap: 12px; margin: 6px 0 4px; padding: 16px 0 0; border-top: 1px solid #2a2a2a; list-style: none; }
.checks li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.5; }
.checks svg { flex: none; margin-top: 1px; color: var(--orange); }
.offer-card .pay-btn { width: 100%; min-height: 58px; font-size: 18px !important; font-weight: 700 !important; }
.offer-card .reserve-btn { min-height: 50px; font-size: 16px !important; }
.offer-card .form-err { margin: -6px 0 0; min-height: 0; }
.offer-card .form-err:empty { display: none; }
.offer-card .fine { margin: 0; }
/* Package bonus files inside every offer box. */
.bonus { display: grid; gap: 8px; padding: 12px 14px; border: 1px dashed #5a3420; border-radius: 12px; background: #160f0b; }
.bonus-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 14px; color: #c9c9c9; }
.bonus-head b { padding: 2px 10px; border-radius: 999px; background: var(--orange); color: #111; font-size: 13px; }
.bonus ul { display: grid; gap: 6px; margin: 0; padding: 0 0 0 20px; font-size: 15px; line-height: 1.5; }
.bonus li::marker { color: var(--orange); }
.bonus-total { margin: 0; padding-top: 8px; border-top: 1px solid #3a2416; color: var(--fg); font-size: 15px; font-weight: 700; }
@media (min-width: 880px) {
  .offer { grid-template-columns: 1.1fr minmax(360px, 1fr); align-items: start; }
}
.styles-head { padding: 44px 0 0; border-top: 1px solid var(--border); margin-top: 40px; }

/* ---------- Niche chat ---------- */
.igf {
  display: grid;
  gap: 20px 40px;
  padding: 28px 0 44px;
  scroll-margin-top: 8px;
}

.igf h2 { margin: 0 0 10px; font-size: clamp(24px, 6.4vw, 38px); line-height: 1.3; }
.igf-copy > p { margin: 0 0 10px; color: #c9c9c9; }

.steps { margin: 14px 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 40px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  color: #111;
  font-weight: 700;
  font-size: 14px;
}

.chatbox {
  display: flex;
  flex-direction: column;
  height: min(660px, calc(100svh - 32px));
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffb27f, var(--orange) 55%, #9b3d14);
  box-shadow: 0 0 0 2px #1f1f1f, 0 0 0 3px var(--cyan);
}
.who { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.who small { color: var(--cyan); font-size: 12px; }
.chat-reset {
  margin-left: auto;
  min-height: 34px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.chat-reset:hover { color: var(--fg); border-color: var(--cyan); }

.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: pop .22s ease-out;
}
.msg.bot { align-self: flex-start; background: #1d1d1d; border: 1px solid #2c2c2c; border-bottom-left-radius: 5px; }
.msg.me { align-self: flex-end; background: #3a2216; border: 1px solid #5a3420; border-bottom-right-radius: 5px; }
.msg.note { border-color: #5a3420; color: #ffcfb5; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.typing { display: flex; gap: 5px; padding: 14px 16px; }
.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: bounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-5px); } }

.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.chat-input[hidden] { display: none; }
.chat-input input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}
.chat-input input:focus { outline: none; border-color: var(--cyan); }
.chat-input button {
  min-width: 64px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #111;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.chat-input button:disabled, .chat-input input:disabled { opacity: .5; cursor: progress; }

.assess {
  padding: 16px;
  border: 1px solid #23413f;
  border-radius: 14px;
  background: #0f1a19;
  animation: pop .22s ease-out;
}
.assess-k { margin: 0 0 4px; color: var(--cyan); font-size: 12px; letter-spacing: .02em; }
.assess h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.45; }
.assess h4 { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; font-size: 15px; }
.assess p { margin: 0; color: #d4d4d4; font-size: 14px; line-height: 1.65; }
.assess-row { margin-top: 2px; }
.level { padding: 1px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 12px; font-weight: 600; }
.level[data-tone="good"] { color: var(--cyan); }
.level[data-tone="mid"] { color: #d9c27a; }
.level[data-tone="warn"] { color: #ff9b7a; }
.eps { display: grid; gap: 8px; margin: 0 0 4px; padding-left: 20px; font-size: 14px; }
.eps b { display: block; color: var(--fg); line-height: 1.45; }
.eps span { color: #c4c4c4; line-height: 1.55; }
.assess .picks { margin-top: 4px; }
.assess .caution { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #13110b; color: #e3d6ae; }
.assess .caution b { color: #f0dc9a; }
.assess > .fine { margin-top: 10px; color: var(--muted); font-size: 12px; }

.picks { display: grid; gap: 10px; }
.pick {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #181818;
  color: var(--fg);
  text-decoration: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s;
  animation: pop .22s ease-out;
}
.pick:hover, .pick:focus-visible { border-color: var(--cyan); outline: none; }
.thumb {
  display: block;
  width: 76px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}
.thumb.wide { aspect-ratio: 16 / 9; margin-top: 6px; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pick-text b { font-size: 15px; line-height: 1.4; }
.pick-why { color: #c4c4c4; font-size: 13px; line-height: 1.55; }
.pick-cta { margin-top: 4px; color: var(--orange); font-size: 13px; font-weight: 600; }

/* Code-drawn swatches for styles that have no public poster. */
.swatch-lf-doodle {
  background:
    radial-gradient(circle at 50% 38%, transparent 13px, #1b1b1b 14px 16px, transparent 17px),
    linear-gradient(160deg, transparent 58%, #b3321f 58% 61%, transparent 61%),
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(0, 0, 0, .05) 9px 10px),
    #efe6d2;
}
.swatch-lf-medieval {
  background:
    conic-gradient(from 45deg at 50% 50%, #1d4fa3 0 25%, #a3122a 0 50%, #0f7a5c 0 75%, #d8a21c 0),
    #0b1640;
  background-size: 24px 24px, auto;
  box-shadow: inset 0 0 0 3px #111;
}
.swatch-missing { background: repeating-linear-gradient(135deg, #121212 0 10px, #1b1b1b 10px 20px); }

.email-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #5a3420;
  border-radius: 14px;
  background: #1c130e;
  animation: pop .22s ease-out;
}
.email-form p { margin: 0; }
.email-form input {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}
.email-form input:focus { outline: none; border-color: var(--cyan); }
.email-form .btn { justify-content: center; font: inherit; font-weight: 700; cursor: pointer; }
.email-form .btn:disabled { opacity: .6; cursor: progress; }
.email-form .fine { margin: 0; }

.choice { display: flex; flex-wrap: wrap; gap: 8px; animation: pop .22s ease-out; }
.choice .btn { min-height: 44px; }
.msg a { color: var(--cyan); font-weight: 600; }
.offer-card.in-chat { flex: none; padding: 20px 16px 16px; animation: pop .22s ease-out; }
.offer-card.in-chat .offer-price b { font-size: 46px; }

/* Style references attached under the chat log. */
.refs { display: grid; gap: 8px; padding: 8px 10px 0; border-top: 1px solid var(--border); }
.refs[hidden] { display: none; }
.refs-toggle {
  justify-self: start;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--cyan);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.refs-panel { display: grid; gap: 8px; padding-bottom: 4px; }
.refs-panel[hidden] { display: none; }
.refs-panel .fine { margin: 0; font-size: 12px; }
.refs-file { position: relative; justify-self: start; min-height: 40px; padding: 6px 16px; font-size: 14px; cursor: pointer; }
.refs-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.refs-link { display: flex; gap: 8px; }
.refs-link input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}
.refs-link input:focus { outline: none; border-color: var(--cyan); }
.refs-link .btn { min-height: 40px; padding: 6px 16px; }
.refs .form-err { margin: 0; font-size: 13px; }
.refs .form-err:empty { display: none; }
.refs-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.refs-list:empty { display: none; }
.ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 4px 3px 4px;
  border: 1px solid #2c4442;
  border-radius: 999px;
  background: #0f1a19;
  font-size: 13px;
}
.ref-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.ref-chip span { overflow: hidden; padding-left: 6px; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.ref-chip img + span { padding-left: 0; }
.ref-x { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #1d2b2a; color: var(--fg); font-size: 16px; line-height: 1; cursor: pointer; }

@media (min-width: 900px) {
  .igf { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .igf-copy { position: sticky; top: 24px; padding-top: 8px; }
}

/* ---------- Payment success page ---------- */
.paid-hero { padding-bottom: 0; }
.paidpage { display: grid; gap: 14px; width: min(100% - 32px, 720px); margin: 0 auto; padding: 8px 0 40px; }
.paidpage section { display: grid; gap: 14px; justify-items: start; }
.paidpage:not([data-state="paid"]) .state-paid,
.paidpage:not([data-state="pending"]) .state-pending,
.paidpage:not([data-state="unknown"]) .state-unknown { display: none; }
.paidpage h1 { margin: 0; font-size: clamp(28px, 7.4vw, 42px); }
.paidpage h2 { margin: 8px 0 0; font-size: 20px; }
.paidpage p { margin: 0; color: #cfcfcf; }
.test-note { display: none; padding: 8px 14px; border: 1px dashed #d9c27a; border-radius: 10px; color: #d9c27a !important; font-size: 14px; }
.paidpage[data-test] .test-note { display: block; }
.status-pill {
  padding: 6px 16px;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  color: var(--cyan) !important;
  font-weight: 700;
}
.state-pending .status-pill { border-color: #d9c27a; color: #d9c27a !important; }
.order-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #333;
  border-radius: 16px;
  background: var(--surface);
}
.order-box span { flex-basis: 100%; color: var(--muted); font-size: 14px; }
.order-box b { font-size: clamp(26px, 7vw, 34px); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.order-box .btn { min-height: 40px; padding: 6px 16px; }
.btn.big { min-height: 58px; padding: 12px 28px; font-size: 18px; font-weight: 700; }
/* Paid page: package vs e-book copy, then the download buttons the worker fills in. */
.paidpage[data-kind="ebook"] .only-package,
.paidpage:not([data-kind="ebook"]) .only-ebook { display: none; }
.paidpage div.only-package, .paidpage div.only-ebook { display: grid; gap: 14px; justify-items: start; }
.downloads { display: grid; gap: 10px; width: 100%; }
.downloads .dl-btn { justify-content: center; width: 100%; min-height: 54px; text-align: center; white-space: normal; }
.dl-wait { display: grid; gap: 4px; padding: 12px 14px; border: 1px dashed #444; border-radius: 12px; }
.dl-wait span { color: var(--muted); font-size: 14px; }
.dl-wait a { color: var(--cyan); font-weight: 600; }

/* ---------- Featured trend card (long-form): full width on desktop, red "trending now" badge ---------- */
.trend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 8px 8px 0;
  padding: 3px 12px 3px 10px;
  border-radius: 999px;
  background: #e0262b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}
.trend::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: trend-pulse 1.6s ease-in-out infinite;
}
@keyframes trend-pulse { 50% { opacity: .3; } }
.lf-feature .player { box-shadow: 0 0 0 2px #e0262b; }
@media (min-width: 860px) {
  .lf-feature {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
  }
  .lf-feature .meta { padding-top: 0; }
  .lf-feature h3 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .trend::before { animation: none; }
}

/* ---------- Long-form sales sections ---------- */
.block { width: min(100% - 32px, 1120px); margin: 40px auto 0; padding: 40px 0 8px; border-top: 1px solid var(--border); scroll-margin-top: 8px; }
.block h2 { margin: 0 0 12px; font-size: clamp(24px, 6.4vw, 38px); line-height: 1.3; }
.block > p { max-width: 40em; margin: 0 0 10px; color: #c9c9c9; }
.block a { color: var(--cyan); font-weight: 600; }
.pains { display: grid; gap: 12px; margin: 16px 0; }
.pains article, .fit-grid > div { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pains h3 { margin: 0 0 4px; color: var(--orange); font-size: 18px; }
.pains p { margin: 0; color: #cfcfcf; }
.how .steps { max-width: 40em; }
.how h3 { margin: 18px 0 4px; font-size: 18px; }
.how .fine { max-width: 40em; margin: 0 0 8px; }
.fit-grid { display: grid; gap: 14px; margin-top: 12px; }
.fit-grid h3 { margin: 0 0 8px; font-size: 18px; }
.fit-grid ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fit-grid li { position: relative; padding-left: 26px; color: #d4d4d4; }
.fit-yes li::before { content: "✓"; position: absolute; left: 0; color: var(--cyan); font-weight: 700; }
.fit-no li::before { content: "✕"; position: absolute; left: 0; color: #ff9b7a; font-weight: 700; }
@media (min-width: 760px) {
  .pains { grid-template-columns: repeat(3, 1fr); }
  .fit-grid { grid-template-columns: 1fr 1fr; }
}
.faq-list { display: grid; gap: 8px; max-width: 46em; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.faq summary { padding: 14px 44px 14px 16px; position: relative; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 12px; color: var(--orange); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "×"; }
.faq details p { margin: 0; padding: 0 16px 14px; color: #cfcfcf; }
.final { display: grid; gap: 24px 48px; padding-bottom: 32px; }
.final-copy p { margin: 0 0 8px; color: #c9c9c9; }
@media (min-width: 880px) { .final { grid-template-columns: 1.1fr minmax(360px, 1fr); align-items: start; } }
/* Standalone e-book at the end of the page: same card, quieter frame so the package stays the main offer. */
.ebook { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 40px; }
.ebook-card { border-color: #24403f; }
.ebook-card .checks svg { color: var(--cyan); }

/* Compact pay strip between sections. */
.cta-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; width: min(100% - 32px, 1120px); margin: 32px auto 0; padding: 16px 18px; border: 1px solid #5a3420; border-radius: 16px; background: #160f0b; }
.cta-strip p { display: grid; gap: 4px; margin: 0; }
.cta-strip p > span { color: #c9c9c9; font-size: 14px; }
.cta-strip [data-slots] b { color: var(--cyan); }
.strip-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.strip-btns .pay-btn { min-height: 48px; padding: 8px 20px; }
.cta-strip .form-err, .sticky-pay .form-err { flex-basis: 100%; margin: 0; }
.cta-strip .form-err:empty, .sticky-pay .form-err:empty { display: none; }
@media (max-width: 599px) { .strip-btns, .strip-btns .pay-btn { width: 100%; } }

/* Sticky pay bar on phones; igf.js hides it while an offer box, strip, the hero buttons or the chat is on screen. */
.sticky-pay { display: none; }
@media (max-width: 899px) {
  .sticky-pay:not([hidden]) { position: fixed; inset: auto 0 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #333; background: rgba(10, 10, 10, .96); }
  .sticky-pay .pay-btn { min-height: 48px; padding: 8px 18px; font-weight: 700; }
  footer { padding-bottom: 96px; }
}
.sticky-text { color: #c9c9c9; font-size: 13px; line-height: 1.35; }
