/* =========================================================
   NEXLEVELS — shadcn/ui + Beautiful UI Design System (v10)
   Tokens: Zinc neutral + single Coral accent (#E85B4A)
   Fonts: Customizable via Site Settings (default Geist + Sukhumvit Set)
   Icons: Material Symbols Outlined (wght 300) + Real Social Brand SVGs
   Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96
   Radius: 6px / 8px / 12px (strictly consistent)
   ========================================================= */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 4%;
  --card: 0 0% 100%;
  --muted: 240 5% 96%;
  --muted-foreground: 240 4% 46%;
  --accent: 240 5% 93%;
  --border: 240 6% 90%;
  --primary: 240 6% 10%;
  --primary-foreground: 0 0% 98%;
  --coral: 6 77% 58%;
  --coral-hi: 6 82% 62%;
  --success: 152 60% 36%;
  --warn: 36 86% 48%;
  --dot: 240 6% 84%;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --f-sans: "Geist", "Sukhumvit Set", "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, monospace;
  --f-script: "Instrument Serif", Georgia, serif;
  --f-serif: "DM Serif Display", Georgia, serif;
  --f-script-style: italic;
  --f-body-weight: 300;
  --f-body-size: 15px;
}

.dark {
  --background: 240 6% 5%;
  --foreground: 0 0% 96%;
  --card: 240 5% 8%;
  --muted: 240 4% 13%;
  --muted-foreground: 240 4% 60%;
  --accent: 240 4% 14%;
  --border: 240 4% 16%;
  --primary: 0 0% 96%;
  --primary-foreground: 240 6% 10%;
  --coral: 6 77% 60%;
  --coral-hi: 6 84% 65%;
  --success: 152 55% 50%;
  --warn: 38 85% 58%;
  --dot: 240 4% 18%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: hsl(var(--background)); color-scheme: dark; }
html:not(.dark) { color-scheme: light; }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-weight: var(--f-body-weight);
  font-size: var(--f-body-size);
  line-height: 1.65;
  letter-spacing: .005em;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; color: inherit; }
::selection { background: hsl(var(--coral)); color: #fff; }

.ms {
  font-family: "Material Symbols Outlined";
  font-weight: 300; font-style: normal; font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  font-variation-settings: "wght" 300, "opsz" 20;
  user-select: none; flex: none;
}
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); }

.wrap { width: min(1152px, 100% - 32px); margin-inline: auto; }

/* ---------- Header (shadcn sticky glass on scroll) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / .82);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-word { font-weight: 500; letter-spacing: .16em; font-size: 13.5px; white-space: nowrap; }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: hsl(var(--muted)); border: 1px solid hsl(var(--border)); flex: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 400; color: hsl(var(--muted-foreground));
  border: 1px solid transparent; background: transparent;
  transition: color .15s, background-color .15s, border-color .15s;
}
.nav a:hover, .icon-btn:hover { color: hsl(var(--foreground)); background: hsl(var(--accent)); }
.nav a.active { color: hsl(var(--foreground)); background: hsl(var(--accent)); font-weight: 500; }
.icon-btn { width: 32px; padding: 0; }
.nav a.nav-account { border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.nav a.nav-sub {
  background: hsl(var(--coral)); color: #fff; font-weight: 500; margin-left: 4px;
}
.nav a.nav-sub:hover { background: hsl(var(--coral-hi)); color: #fff; }

main { padding: 32px 0 96px; min-height: 70vh; }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: hsl(var(--muted-foreground)); font-weight: 500;
}
.eyebrow::before { content: ""; width: 12px; height: 1px; background: hsl(var(--coral)); }
.script { font-family: var(--f-script); font-style: var(--f-script-style); font-weight: 400; }
.serif { font-family: var(--f-serif); font-weight: 400; }

/* ---------- Buttons (shadcn Button) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  font-size: 13.5px; font-weight: 400; color: hsl(var(--foreground));
  transition: background-color .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: hsl(var(--accent)); border-color: hsl(var(--foreground) / .22); }
.btn-accent { background: hsl(var(--coral)); border-color: hsl(var(--coral)); color: #fff; font-weight: 500; }
.btn-accent:hover { background: hsl(var(--coral-hi)); border-color: hsl(var(--coral-hi)); color: #fff; }
.btn-light { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-weight: 500; }
.btn-light:hover { opacity: .9; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn .ms { font-size: 16px; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- Social Brand Icon Buttons (Real SVG Logos) ---------- */
.social-row { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.social-btn {
  width: 36px; height: 36px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  color: hsl(var(--foreground));
  transition: transform .15s var(--ease), border-color .15s, background-color .15s;
}
.social-btn svg { width: 17px; height: 17px; display: block; flex: none; }
.social-btn:hover { transform: translateY(-1px); border-color: hsl(var(--foreground) / .3); background: hsl(var(--accent)); }
.social-btn.brand-color { color: var(--brand-color, currentColor); }
.social-btn.brand-color:hover { border-color: var(--brand-color, hsl(var(--foreground) / .35)); }

/* ---------- Hero Banner (Visual Banner + Editorial Scrim) ---------- */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-lg);
  background: hsl(var(--card));
  padding: clamp(28px, 5vw, 56px);
  margin-bottom: 64px;
  min-height: 380px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero[data-height="compact"] { min-height: 300px; padding: clamp(24px, 4vw, 40px); }
.hero[data-height="tall"] { min-height: 480px; padding: clamp(32px, 6vw, 68px); }

.hero:not(.has-banner)::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(hsl(var(--dot)) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(65% 95% at 100% 50%, #000 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(65% 95% at 100% 50%, #000 10%, transparent 80%);
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: 0;
  pointer-events: none;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(95deg, rgba(10,10,12, var(--hero-scrim, .76)) 0%, rgba(10,10,12, calc(var(--hero-scrim, .76) * .72)) 55%, rgba(10,10,12, calc(var(--hero-scrim, .76) * .38)) 100%),
    linear-gradient(to top, rgba(10,10,12, .72) 0%, transparent 55%);
}
.hero > *:not(.hero-bg):not(.hero-scrim) { position: relative; z-index: 2; }

/* High-contrast light text guaranteed over banner photo in BOTH Dark & Light modes */
.hero.has-banner { color: #f8f8fa; border-color: rgba(255,255,255,.12); background: #0c0c0e; }
.hero.has-banner .hero-top .who span { color: rgba(244,244,246,.74); }
.hero.has-banner .hero-title .script { color: rgba(255,255,255,.92); }
.hero.has-banner .hero-intro { color: rgba(244,244,246,.82); }
.hero.has-banner .hero-stats span { color: rgba(244,244,246,.68); }
.hero.has-banner .btn-light { background: #fafafa; border-color: #fafafa; color: #111113; }
.hero.has-banner .btn-light:hover { background: #fff; opacity: .94; }
.hero.has-banner .btn-ghost-hero {
  background: rgba(16,16,20,.55); border-color: rgba(255,255,255,.22); color: #fafafa;
  backdrop-filter: blur(10px);
}
.hero.has-banner .btn-ghost-hero:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); }
.hero.has-banner .social-btn {
  background: rgba(14,14,18,.58); border-color: rgba(255,255,255,.18);
  color: #f4f4f6; backdrop-filter: blur(10px);
}
.hero.has-banner .social-btn.brand-color { color: var(--brand-color-dark, var(--brand-color, #fff)); }
.hero.has-banner .social-btn:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.38); }

.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-ident { display: flex; align-items: center; gap: 12px; }
.hero-top .avatar { width: 44px; height: 44px; border-color: rgba(255,255,255,.2); }
.hero-top .who strong { display: block; font-weight: 500; letter-spacing: .12em; font-size: 14px; line-height: 1.2; }
.hero-top .who span { color: hsl(var(--muted-foreground)); font-family: var(--f-mono); font-size: 12px; }

.hero-title { margin: 0; line-height: .94; letter-spacing: -.02em; }
.hero-title .script { display: block; font-size: clamp(34px, 5.6vw, 68px); color: hsl(var(--foreground) / .9); }
.hero-title .serif { display: block; font-size: clamp(52px, 9.2vw, 118px); }
.hero-title .serif .dot { color: hsl(var(--coral)); }
.hero-intro { max-width: 540px; color: hsl(var(--muted-foreground)); font-size: 15px; margin: 16px 0 24px; }

.hero-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero-cta-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; text-align: right; }
.hero-stats b { display: block; font-size: 24px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stats span { font-family: var(--f-mono); font-size: 11px; color: hsl(var(--muted-foreground)); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Sections (strict 64px vertical rhythm) ---------- */
section + section { margin-top: 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 6px 0 0; font-weight: 500; font-size: clamp(20px, 2.2vw, 24px); letter-spacing: -.015em; line-height: 1.25; }
.link-more {
  display: inline-flex; align-items: center; gap: 4px;
  color: hsl(var(--muted-foreground)); font-size: 13.5px; transition: color .15s; white-space: nowrap;
}
.link-more:hover { color: hsl(var(--foreground)); }

/* ---------- Featured story (Latest video / SEO article) ---------- */
.featured {
  display: grid; grid-template-columns: 1.5fr 1fr; align-items: stretch;
  border: 1px solid hsl(var(--border)); border-radius: var(--r-lg); overflow: hidden;
  background: hsl(var(--card)); transition: border-color .2s;
}
.featured:hover { border-color: hsl(var(--foreground) / .22); }
.featured .thumb { border-radius: 0; border: 0; aspect-ratio: 16/9; }
.featured-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 12px; border-left: 1px solid hsl(var(--border)); }
.featured-body h3 { margin: 0; font-weight: 500; font-size: clamp(19px, 2vw, 24px); letter-spacing: -.015em; line-height: 1.35; }
.featured-body p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 14.5px; }
.featured-gear { display: flex; align-items: center; gap: 10px; color: hsl(var(--muted-foreground)); font-size: 13px; margin-top: 4px; }
.featured-body .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- Thumb ---------- */
.thumb {
  position: relative; overflow: hidden; border-radius: var(--r-md);
  background: hsl(var(--muted)); border: 1px solid hsl(var(--border)); aspect-ratio: 16/9;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
a:hover .thumb img { transform: scale(1.03); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 42%); pointer-events: none; }
.thumb-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; color: hsl(var(--muted-foreground));
  background: hsl(var(--muted));
}
.thumb-placeholder .ms { font-size: 36px; }
.tag {
  position: absolute; z-index: 1; bottom: 8px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums;
  background: rgba(12,12,14,.82); backdrop-filter: blur(6px);
  padding: 3px 8px; border-radius: var(--r-sm); color: #fff; border: 1px solid rgba(255,255,255,.1);
}
.tag.l { left: 8px; }
.tag.r { right: 8px; }
.tag.gear { background: hsl(var(--coral)); border-color: transparent; }

/* ---------- Video & Story grid ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.video-card { display: flex; flex-direction: column; gap: 12px; }
.video-card h3 {
  margin: 0; font-size: 15.5px; font-weight: 400; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-card .meta { font-size: 12.5px; color: hsl(var(--muted-foreground)); margin-top: -6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Shorts rail ---------- */
.shorts {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(176px, 1fr); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none;
}
.shorts::-webkit-scrollbar { display: none; }
.short-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
.short-card .thumb { aspect-ratio: 9/16; border-radius: var(--r-lg); }
.short-card h3 {
  margin: 0; font-size: 13.5px; font-weight: 400; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Gear mini stack ---------- */
.mini { display: flex; }
.mini span {
  width: 28px; height: 28px; border-radius: var(--r-sm); margin-right: -6px; overflow: hidden;
  background: hsl(var(--muted)); border: 2px solid hsl(var(--card));
  display: grid; place-items: center; color: hsl(var(--muted-foreground));
}
.mini span .ms { font-size: 15px; }
.mini span img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Product cards (Beautiful UI Bento spotlight) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card, .digital-card {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--r-lg);
  overflow: hidden; transition: border-color .2s;
}
.product-card::before, .product-card::after,
.digital-card::before, .digital-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
}
.product-card::before, .digital-card::before {
  z-index: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), hsl(var(--coral) / .08), transparent 65%);
}
.product-card::after, .digital-card::after {
  z-index: 10; padding: 1px;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), hsl(var(--coral) / .55), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.product-card:hover::before, .product-card:hover::after,
.digital-card:hover::before, .digital-card:hover::after { opacity: 1; }
.product-card > *, .digital-card > * { position: relative; z-index: 1; }

.product-grid.bento .product-card:first-child { grid-column: span 2; grid-row: span 2; }
.product-grid.bento .product-card:first-child .p-img { aspect-ratio: auto; flex: 1; min-height: 240px; }
.product-grid.bento .product-card:first-child .p-img .ms { font-size: 56px; }
.product-grid.bento .product-card:first-child .p-name { font-size: 20px; }
.product-grid.bento .product-card:first-child .p-body { flex: none; }

.p-img {
  position: relative; aspect-ratio: 4/3; display: grid; place-items: center;
  background: hsl(var(--muted) / .55); border-bottom: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground)); overflow: hidden;
}
.p-img .ms { font-size: 36px; transition: transform .35s var(--ease), color .2s; }
.product-card:hover .p-img .ms { transform: scale(1.06); color: hsl(var(--foreground)); }
.p-img img { width: 100%; height: 100%; object-fit: cover; }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: var(--r-sm);
  color: hsl(var(--foreground)); background: hsl(var(--background) / .88);
  border: 1px solid hsl(var(--border)); backdrop-filter: blur(6px);
}
.p-body { padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-cat { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.p-name { margin: 0; font-weight: 500; font-size: 15.5px; line-height: 1.35; }
.p-note { margin: 2px 0 0; font-size: 13px; color: hsl(var(--muted-foreground)); line-height: 1.5; }
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 16px; }
.p-price { font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; color: hsl(var(--foreground)); }
.p-in { font-size: 12px; color: hsl(var(--muted-foreground)); padding: 0 16px 12px; margin-top: -4px; }
.p-in a { color: hsl(var(--foreground)); border-bottom: 1px solid hsl(var(--border)); }
.p-in a:hover { border-bottom-color: hsl(var(--foreground)); }

/* ---------- Digital Products Storefront (/store & /p/<slug>) ---------- */
.digital-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.digital-cover {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  background: hsl(var(--muted)); border-bottom: 1px solid hsl(var(--border));
  display: grid; place-items: center; color: hsl(var(--muted-foreground));
}
.digital-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.digital-card:hover .digital-cover img { transform: scale(1.03); }
.digital-cover .ms { font-size: 40px; }
.digital-body { padding: 20px 20px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.digital-title { margin: 0; font-weight: 500; font-size: 18px; letter-spacing: -.01em; line-height: 1.35; }
.digital-tagline { margin: 0; font-size: 13.5px; color: hsl(var(--muted-foreground)); line-height: 1.55; }
.digital-format {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 12px; color: hsl(var(--muted-foreground));
}
.digital-format .ms { font-size: 15px; }
.digital-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px 20px; border-top: 1px solid hsl(var(--border)); margin-top: auto;
}
.dp-price-row { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.dp-price { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.dp-compare { font-size: 13.5px; color: hsl(var(--muted-foreground)); text-decoration: line-through; }

/* Digital Product Detail (/p/<slug>) */
.dp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start; }
.dp-hero-cover {
  aspect-ratio: 16/10; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid hsl(var(--border)); background: hsl(var(--muted));
  margin-bottom: 24px;
}
.dp-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.dp-title { margin: 8px 0 12px; font-weight: 600; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.25; }
.dp-lead { margin: 0 0 24px; font-size: 16px; color: hsl(var(--muted-foreground)); line-height: 1.65; }
.dp-features {
  list-style: none; margin: 0 0 28px; padding: 20px; border-radius: var(--r-lg);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  display: flex; flex-direction: column; gap: 10px;
}
.dp-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.5; }
.dp-features .ms { color: hsl(var(--success)); font-size: 18px; margin-top: 2px; }

.buy-card {
  position: sticky; top: 76px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.buy-card .dp-price { font-size: 32px; line-height: 1; }
.buy-meta { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); font-size: 13px; color: hsl(var(--muted-foreground)); }
.buy-meta div { display: flex; align-items: center; gap: 8px; }
.buy-meta .ms { font-size: 16px; color: hsl(var(--foreground)); }
.stripe-trust {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: hsl(var(--muted-foreground)); padding-top: 4px;
}
.stripe-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-sm);
  border: 1px solid hsl(var(--border)); background: hsl(var(--background));
  font-family: var(--f-mono); font-size: 11px; color: hsl(var(--foreground));
}
.thankyou-card {
  max-width: 560px; margin: 48px auto; padding: 36px; border-radius: var(--r-lg);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.thankyou-card .ms.ok { font-size: 44px; color: hsl(var(--success)); }
.thankyou-card h1 { margin: 4px 0 0; font-size: 24px; font-weight: 600; }
.thankyou-card p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 14.5px; }

/* ---------- Watch / Full SEO Article page ---------- */
.back {
  display: inline-flex; align-items: center; gap: 6px;
  color: hsl(var(--muted-foreground)); font-size: 13.5px; margin-bottom: 16px; transition: color .15s;
}
.back:hover { color: hsl(var(--foreground)); }
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 32px; align-items: start; }
.player {
  position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden;
  background: #000; border: 1px solid hsl(var(--border));
}
.player.vertical { aspect-ratio: 9/16; max-width: 380px; max-height: 76vh; margin-inline: auto; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-cover {
  aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid hsl(var(--border)); background: hsl(var(--muted)); margin-bottom: 8px;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.watch h1 { font-weight: 500; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.015em; line-height: 1.32; margin: 20px 0 8px; }
.watch .desc { color: hsl(var(--muted-foreground)); margin: 0 0 16px; font-size: 14.5px; }
.watch-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.article-byline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: hsl(var(--muted-foreground)); margin-bottom: 16px;
}
.article-byline .avatar { width: 24px; height: 24px; }

.gear-panel {
  position: sticky; top: 72px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-lg); padding: 20px;
}
.gear-panel h2 { margin: 8px 0 4px; font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.gear-panel .sub { margin: 0 0 16px; font-size: 13px; color: hsl(var(--muted-foreground)); }
.gear-list { display: flex; flex-direction: column; gap: 8px; }
.gear-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 10px; border-radius: var(--r-md);
  background: hsl(var(--background)); border: 1px solid hsl(var(--border));
  transition: border-color .15s;
}
.gear-item:hover { border-color: hsl(var(--coral) / .45); }
.gear-item .p-img { aspect-ratio: 1; border-radius: var(--r-sm); border: 1px solid hsl(var(--border)); }
.gear-item .p-img .ms { font-size: 24px; }
.gear-item .p-name { font-size: 14px; font-weight: 500; }
.gear-item .p-note { font-size: 12.5px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.gear-item .row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.gear-item .row .btn { margin-left: auto; }
.ts {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid hsl(var(--border)); background: hsl(var(--muted));
  font-family: var(--f-mono); font-size: 11.5px; font-variant-numeric: tabular-nums;
  padding: 2px 8px; height: 24px; border-radius: var(--r-sm);
  color: hsl(var(--muted-foreground)); transition: .15s;
}
.ts:hover { color: #fff; border-color: hsl(var(--coral)); background: hsl(var(--coral)); }
.gear-panel .all { width: 100%; margin-top: 16px; }

/* ---------- Full SEO Article Prose ---------- */
.story-article { margin-top: 32px; padding-top: 24px; border-top: 1px solid hsl(var(--border)); }
.story-article .eyebrow { margin-bottom: 16px; }

.toc-box {
  margin: 0 0 24px; padding: 16px 20px; border-radius: var(--r-md);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
}
.toc-title {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: hsl(var(--muted-foreground)); margin-bottom: 10px; font-weight: 500;
}
.toc-list { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.toc-list a { color: hsl(var(--foreground) / .85); transition: color .15s; }
.toc-list a:hover { color: hsl(var(--coral)); }

.prose { font-size: 15.5px; line-height: 1.85; color: hsl(var(--foreground) / .88); }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  font-weight: 500; font-size: 22px; color: hsl(var(--foreground));
  margin: 36px 0 12px; letter-spacing: -.015em; line-height: 1.35; scroll-margin-top: 76px;
}
.prose h3 { font-weight: 500; font-size: 17.5px; color: hsl(var(--foreground)); margin: 24px 0 8px; line-height: 1.4; }
.prose h4 { font-weight: 500; font-size: 15.5px; color: hsl(var(--foreground)); margin: 18px 0 6px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: hsl(var(--coral)); border-bottom: 1px solid hsl(var(--coral) / .35); }
.prose a:hover { border-bottom-color: hsl(var(--coral)); }
.prose strong { color: hsl(var(--foreground)); font-weight: 500; }
.prose code {
  font-family: var(--f-mono); font-size: .88em; padding: 2px 6px;
  border-radius: 4px; background: hsl(var(--muted)); border: 1px solid hsl(var(--border));
}
.prose blockquote {
  margin: 24px 0; padding: 16px 20px; border-left: 2px solid hsl(var(--coral));
  background: hsl(var(--muted) / .5); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: hsl(var(--foreground)); font-size: 16px; line-height: 1.7;
}
.prose figure { margin: 24px 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: 8px; text-align: center; font-size: 12.5px; color: hsl(var(--muted-foreground)); }
.prose img { border-radius: var(--r-md); border: 1px solid hsl(var(--border)); margin: 24px 0; width: 100%; height: auto; }
.prose hr { border: 0; border-top: 1px solid hsl(var(--border)); margin: 32px 0; }

/* Callout box */
.prose .callout {
  margin: 24px 0; padding: 16px 20px; border-radius: var(--r-md);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--coral)); font-size: 14.5px; line-height: 1.75;
}

/* Pros & Cons comparison grid */
.prose .pros-cons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0;
}
.prose .pros, .prose .cons {
  padding: 16px 20px; border-radius: var(--r-md);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
}
.prose .pros { border-top: 2px solid hsl(var(--success)); }
.prose .cons { border-top: 2px solid hsl(var(--warn)); }
.prose .pros h4, .prose .cons h4 { margin: 0 0 10px; font-size: 14.5px; font-weight: 500; }
.prose .pros h4 { color: hsl(var(--success)); }
.prose .cons h4 { color: hsl(var(--warn)); }
.prose .pros ul, .prose .cons ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.65; }

/* Responsive SEO Spec/Comparison Table */
.prose .table-wrap {
  overflow-x: auto; margin: 24px 0; border-radius: var(--r-md);
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
}
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid hsl(var(--border)); }
.prose th { background: hsl(var(--muted) / .55); font-weight: 500; color: hsl(var(--foreground)); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

/* FAQ Accordion (generates FAQPage JSON-LD!) */
.prose details.faq-item {
  margin: 10px 0; border-radius: var(--r-md);
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  overflow: hidden;
}
.prose details.faq-item summary {
  cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 500;
  color: hsl(var(--foreground)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.prose details.faq-item summary::-webkit-details-marker { display: none; }
.prose details.faq-item summary::after {
  content: "+"; font-family: var(--f-mono); font-size: 16px; color: hsl(var(--muted-foreground));
}
.prose details.faq-item[open] summary::after { content: "−"; color: hsl(var(--coral)); }
.prose details.faq-item .faq-ans {
  padding: 0 18px 16px; font-size: 14.5px; color: hsl(var(--muted-foreground)); line-height: 1.7;
}

/* Inline product / digital card inside story notes */
.inline-gear {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  margin: 24px 0; padding: 12px 16px; border-radius: var(--r-lg);
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  transition: border-color .15s;
}
.inline-gear:hover { border-color: hsl(var(--coral) / .45); }
.inline-gear .p-img { aspect-ratio: 1; border-radius: var(--r-md); border: 1px solid hsl(var(--border)); }
.inline-gear .p-img .ms { font-size: 28px; }
.inline-gear .ig-cat { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.inline-gear .ig-name { font-weight: 500; font-size: 15.5px; color: hsl(var(--foreground)); line-height: 1.35; }
.inline-gear .ig-note { font-size: 13px; color: hsl(var(--muted-foreground)); margin-top: 2px; line-height: 1.45; }
.inline-gear .ig-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.inline-gear .ig-price { font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; color: hsl(var(--foreground)); }
.inline-gear a { border: 0; color: inherit; }
.prose .inline-gear a.btn-accent { color: #fff; }

/* ---------- Shop & Store page headers ---------- */
.shop-head { margin-bottom: 24px; }
.shop-head h1 { margin: 8px 0 8px; line-height: 1; }
.shop-head h1 .script { font-size: clamp(32px, 4.5vw, 52px); }
.shop-head h1 .serif { font-size: clamp(44px, 6vw, 72px); }
.shop-head p { margin: 0; color: hsl(var(--muted-foreground)); max-width: 600px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; align-items: center; }
.search-wrap { position: relative; flex: 1 1 260px; }
.search-wrap .ms { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: hsl(var(--muted-foreground)); font-size: 18px; pointer-events: none; }
.search {
  width: 100%; height: 36px; padding: 0 12px 0 36px; border-radius: var(--r-md);
  border: 1px solid hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--foreground));
  font: inherit; font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search::placeholder { color: hsl(var(--muted-foreground)); }
.search:focus { border-color: hsl(var(--foreground) / .35); box-shadow: 0 0 0 3px hsl(var(--foreground) / .08); }
.chips { display: flex; gap: 4px; padding: 2px; border-radius: var(--r-md); background: hsl(var(--muted)); overflow-x: auto; scrollbar-width: none; }
.chip {
  height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 0; background: transparent;
  font-size: 13px; color: hsl(var(--muted-foreground)); white-space: nowrap; transition: .15s;
}
.chip:hover { color: hsl(var(--foreground)); }
.chip.active { background: hsl(var(--background)); color: hsl(var(--foreground)); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* ---------- Modal (Stripe Setup Guide / Demo Checkout Notice) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 16px;
}
.modal {
  width: min(460px, 100%); background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.modal h3 { margin: 0; font-size: 17px; font-weight: 600; }
.modal p { margin: 0; font-size: 13.5px; color: hsl(var(--muted-foreground)); line-height: 1.65; }
.modal ol { margin: 4px 0; padding-left: 18px; font-size: 13.5px; color: hsl(var(--foreground) / .88); line-height: 1.7; }

/* ---------- Beautiful UI Loading (Pixel grid + Shimmer) ---------- */
.empty, .loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; color: hsl(var(--muted-foreground)); padding: 96px 0; font-size: 14px; }
.pixels { display: grid; grid-template-columns: repeat(3, 4px); gap: 2px; }
.pixels i { width: 4px; height: 4px; border-radius: 1px; background: hsl(var(--coral)); animation: px 1.2s infinite; }
@keyframes px { 0%,100% { opacity: .15 } 50% { opacity: 1 } }
.shimmer {
  background: linear-gradient(90deg, hsl(var(--muted-foreground)) 0%, hsl(var(--foreground)) 50%, hsl(var(--muted-foreground)) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sh 2s linear infinite;
}
@keyframes sh { from { background-position: 100% 0 } to { background-position: -100% 0 } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid hsl(var(--border)); padding: 32px 0 48px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: end; }
.footer-mark { font-size: 24px; margin-bottom: 8px; }
.footer-mark em { font-family: var(--f-script); font-style: var(--f-script-style); }
.footer-mark strong { font-family: var(--f-serif); font-weight: 400; }
.disclosure { margin: 0; max-width: 560px; font-size: 12.5px; color: hsl(var(--muted-foreground)); }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); z-index: 60;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  padding: 8px 16px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Motion ---------- */
.reveal { animation: rise .45s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: .04s; }
.reveal:nth-child(3) { animation-delay: .08s; }
.reveal:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .watch, .dp-layout { grid-template-columns: 1fr; }
  .gear-panel, .buy-card { position: static; }
}
@media (max-width: 820px) {
  .featured { grid-template-columns: 1fr; }
  .featured-body { border-left: 0; border-top: 1px solid hsl(var(--border)); padding: 24px; }
  .hero-bottom { flex-direction: column; align-items: flex-start; }
  .hero-stats { text-align: left; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .digital-grid { grid-template-columns: 1fr; }
  .prose .pros-cons { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 24px); }
  main { padding-top: 16px; }
  .topbar-inner { gap: 8px; }
  .brand { gap: 7px; }
  .brand .avatar { width: 24px; height: 24px; }
  .brand-word { font-size: 12px; letter-spacing: .1em; }
  .nav { gap: 2px; }
  .nav a { padding: 0 8px; font-size: 12.5px; }
  .nav a[data-nav="home"] { display: none; }
  .nav a.nav-account span:last-child, .nav a.nav-sub span:last-child { display: none; }
  .nav a.nav-account, .nav a.nav-sub, .icon-btn { width: 30px; height: 30px; padding: 0; }
  .nav a.nav-sub { margin-left: 2px; }
  .hero { margin-bottom: 48px; min-height: 320px; }
  section + section { margin-top: 48px; }
  .product-grid { gap: 12px; }
  .product-grid.bento .product-card:first-child .p-img { min-height: 180px; }
  .p-body { padding: 12px 12px 4px; }
  .p-name { font-size: 14px; }
  .p-note, .p-in { display: none; }
  .product-grid.bento .product-card:first-child .p-note { display: block; }
  .p-foot { flex-direction: column; align-items: stretch; padding: 8px 12px 12px; }
  .p-foot .btn { width: 100%; }
  .shorts { grid-auto-columns: 44%; }
  .player:not(.vertical) { border-radius: 0; margin-inline: -12px; border-left: 0; border-right: 0; }
  .back { display: none; }
  .inline-gear { grid-template-columns: 56px 1fr; }
  .inline-gear .ig-cta { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
}
