/* 1TAKE Studios: components.css v3, "Shopee at 11.11".
   Every class in BUILD_CONTEXT.md §3's component contract, restyled to the v3 tokens, plus the
   v3-only components (price block, flash bar, badges, pill buttons, product card, phone frame,
   trust chips, review card, compact compare table, accordion, sticky buy bar, announcement bar,
   the gated-demo gate card). Colors only via var(--...) from tokens.css. No icon fonts: small
   glyphs are inline SVG data URIs used as CSS masks so they inherit color through currentColor. */

:root {
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M20.3 5.3a1 1 0 0 1 0 1.4l-10 10a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.4L9.6 14.6l9.3-9.3a1 1 0 0 1 1.4 0z'/%3E%3C/svg%3E");
  --icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V11a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm-3 8V6a3 3 0 0 1 6 0v3zm3 4a2 2 0 0 1 1 3.73V19a1 1 0 1 1-2 0v-2.27A2 2 0 0 1 12 13z'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8.6 4.6a1 1 0 0 1 1.4 0l6 6a1 1 0 0 1 0 1.4l-6 6a1 1 0 1 1-1.4-1.4L13.6 12 8.6 6.4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  --icon-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M13 2 3 14h6l-1 8 11-14h-7l1-6z'/%3E%3C/svg%3E");
  --icon-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 2 4 5v6c0 5 3.4 9 8 11 4.6-2 8-6 8-11V5z'/%3E%3C/svg%3E");
  --icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm1.7 2 7.3 5.6L19.3 7z'/%3E%3C/svg%3E");
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--btn-h);
  padding: var(--s-2) var(--s-5);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--fs-3);
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--t-hover) var(--ease),
    border-color var(--t-hover) var(--ease),
    color var(--t-hover) var(--ease),
    transform var(--t-hover) var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--rule);
}

.btn-secondary:hover { border-color: var(--ink-2); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

.btn-ghost:hover { background: var(--inset); }

.btn-sm {
  min-height: 36px;
  padding: var(--s-1) var(--s-3);
  font-size: var(--fs-2);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-link {
  display: inline-flex;
  min-height: auto;
  padding: 0;
  background: none;
  color: var(--link);
  font-weight: 700;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  border-radius: 2px;
}

.btn-link:hover { text-decoration: none; }

.btn[data-state="copied"] {
  background: var(--good-soft);
  color: var(--good);
  border-color: transparent;
}

.btn[data-state="copied"]::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  mask-image: var(--icon-check);
  -webkit-mask-image: var(--icon-check);
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

/* Full-width buy CTA. Body text is never set on accent; this is a short,
   bold (800 weight) label at >=16px, which is the one place white-on-accent
   is allowed. */
.btn-buy {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs-4);
  font-weight: 800;
  border-radius: var(--r-pill);
  min-height: var(--btn-h);
}

.btn-buy:hover { background: var(--accent-hover); }

/* ================= Pill buttons (v3) =================
   Same visual family as .btn but for landing/marketplace contexts that
   don't need the app's .btn state machinery (data-state, etc). */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--btn-h);
  padding: var(--s-2) var(--s-5);
  border-radius: var(--r-pill);
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--fs-3);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}

.pill-btn:hover { border-color: var(--ink-2); }

.pill-btn-red {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.pill-btn-red:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.pill-btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.pill-btn-outline:hover { background: var(--inset); }

/* ================= Chips / badges / tags ================= */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 3px var(--s-2);
  border-radius: var(--r-tag);
  font-size: var(--fs-2);
  font-weight: 600;
  background: var(--inset);
  color: var(--ink-2);
  line-height: 1.4;
}

.chip-accent {
  /* Solid accent with white text at 700+: accent-on-accent-soft was 2.9:1. */
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

/* .chip-sand is the old TESTED/Studio chip. It always renders as a solid
   yellow badge with ink text now (never yellow text on a yellow tint --
   that fails contrast at any weight since yellow itself is too light). */
.chip-sand {
  background: var(--badge);
  color: var(--badge-ink);
}

.chip-locked {
  background: var(--inset);
  color: var(--muted);
}

.chip-locked::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: currentColor;
  mask-image: var(--icon-lock);
  -webkit-mask-image: var(--icon-lock);
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.chip-mono {
  font-family: var(--font-mono);
  letter-spacing: 0;
  text-transform: none;
}

/* Generic badge family (v3): flash/mall yellow, red, green, plain. Solid
   fills with a text color chosen for contrast, not swapped per-token. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 3px var(--s-2);
  border-radius: var(--r-tag);
  font-size: var(--fs-1);
  font-weight: 800;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  background: var(--inset);
  color: var(--ink-2);
  line-height: 1.4;
}

.badge-yellow {
  background: var(--badge);
  color: var(--badge-ink);
}

.badge-red {
  background: var(--accent);
  color: var(--accent-ink);
}

.badge-green {
  background: var(--good);
  color: #FFFFFF;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--s-2);
  border-radius: var(--r-tag);
  font-size: var(--fs-1);
  font-weight: 700;
  color: var(--ink-2);
  background: var(--inset);
}

.tag-tested {
  background: var(--badge);
  color: var(--badge-ink);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
}

/* ================= Fields ================= */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.field-example {
  color: var(--muted);
  font-size: var(--fs-2);
  line-height: var(--lh-snug);
}

.field-help {
  color: var(--ink-2);
  font-size: var(--fs-2);
}

.input,
.textarea,
.search {
  min-height: var(--tap-min);
  width: 100%;
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  font-family: var(--font-body);
  font-size: var(--fs-3);
  transition: border-color var(--t-hover) var(--ease);
}

.input::placeholder,
.textarea::placeholder,
.search::placeholder {
  color: var(--muted);
}

.input:focus,
.textarea:focus,
.search:focus {
  border-color: var(--accent);
}

.textarea {
  min-height: calc(var(--tap-min) * 2);
  resize: vertical;
  line-height: var(--lh-body);
}

.input-mono {
  font-family: var(--font-mono);
}

.search {
  border-radius: var(--r-pill);
}

.field-notice {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-tag);
  font-size: var(--fs-2);
  background: var(--inset);
  color: var(--ink-2);
}

.field-notice-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.field-notice-bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.field-notice .btn-link {
  color: currentColor;
}

/* ================= Option cards ================= */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--s-3);
}

.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-height: var(--tap-min);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms var(--ease), background-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

.option-card:hover {
  border-color: var(--ink-2);
}

.option-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--accent-soft);
}

.option-card-thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--r-tag);
  overflow: hidden;
  background: var(--inset);
}

.option-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.option-card-thumb.is-square { aspect-ratio: 1 / 1; }

.option-card-title {
  font-weight: 700;
  font-size: var(--fs-3);
  color: var(--ink);
}

.option-card-sub {
  font-size: var(--fs-2);
  color: var(--ink-2);
}

.option-card-locked {
  color: var(--muted);
  cursor: pointer;
}

.option-card-locked .option-card-title {
  color: var(--ink-2);
}

.option-card-unlock {
  font-size: var(--fs-1);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ================= Ratio cards ================= */
.ratio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--s-3);
}

.ratio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  cursor: pointer;
  min-height: 132px;
  justify-content: center;
  transition: border-color 120ms var(--ease), background-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

.ratio-card:hover { border-color: var(--ink-2); }

.ratio-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.ratio-box {
  /* A real proportioned rectangle: height is fixed at 72px, width follows the ratio, capped by the card. */
  display: block;
  aspect-ratio: var(--w) / var(--h);
  height: 72px;
  max-width: 100%;
  margin-inline: auto;
  border: 2px solid currentColor;
  border-radius: var(--r-tag);
  box-sizing: border-box;
}

/* ================= Fold ================= */
.fold {
  border-bottom: 1px solid var(--rule);
  padding-block: var(--s-4);
}

.fold-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
}

.fold-title {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-size: var(--fs-5);
  font-weight: 800;
  color: var(--ink);
}

.fold-title .step-index {
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  font-weight: 400;
  color: var(--muted);
}

.fold-body {
  padding-top: var(--s-4);
}

.fold-summary {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink-2);
  font-size: var(--fs-3);
}

.fold-check {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: var(--accent);
  mask-image: var(--icon-check);
  -webkit-mask-image: var(--icon-check);
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.fold[data-collapsed="true"] {
  padding-block: var(--s-3);
}

.fold[data-collapsed="true"] .fold-header {
  cursor: pointer;
}

.fold[data-collapsed="true"] .fold-body {
  display: none;
}

/* ================= Slate output panel ================= */
.slate {
  background: var(--surface);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Plain header row (the clapper stripe motif is gone; see base.css). Holds
   an optional step-index label, right-aligned since the corner bracket that
   used to balance it on the left is retired too. */
.slate-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 28px;
  padding: var(--s-2) var(--s-4) 0;
}

.slate-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4) 0;
  font-family: var(--font-body);
  font-size: var(--fs-1);
  font-weight: 600;
  color: var(--ink-2);
}

.slate-body {
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  max-height: 48vh;
  overflow: auto;
  padding: var(--s-4);
}

.slate-negative {
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-wrap;
  padding: var(--s-4);
  border-top: 1px solid var(--rule);
}

.slate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4);
  border-top: 1px solid var(--rule);
}

.slot {
  background: var(--inset);
  border-radius: var(--r-tag);
  padding: 0 2px;
  transition: background-color var(--t-assemble) var(--ease), color var(--t-assemble) var(--ease);
}

.slot-landing {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ================= Sheet / popover / toast ================= */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
  z-index: 40;
}

.sheet-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--r-panel) var(--r-panel) 0 0;
  box-shadow: var(--shadow-float);
  transform: translateY(100%);
  transition: transform 200ms ease;
  z-index: 41;
}

.sheet[data-open="true"] {
  transform: translateY(0);
}

.sheet[data-side="right"] {
  left: auto;
  right: 0;
  top: 0;
  bottom: 0;
  width: 420px;
  max-width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  transform: translateX(100%);
}

.sheet[data-side="right"][data-open="true"] {
  transform: translateX(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--rule);
  margin: var(--s-2) auto;
}

.sheet[data-side="right"] .sheet-handle {
  display: none;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--rule);
}

.sheet-body {
  padding: var(--s-4);
}

.popover {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  box-shadow: var(--shadow-float);
  max-height: 60vh;
  overflow: auto;
  z-index: 30;
}

.toast-region {
  position: fixed;
  left: 50%;
  bottom: var(--s-6);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  z-index: 50;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  background: var(--ink);
  color: var(--ground);
  border-radius: var(--r-pill);
  font-size: var(--fs-2);
  box-shadow: var(--shadow-float);
  pointer-events: auto;
}

/* ================= Table ================= */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-1);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

.table td {
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-2);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

/* Compact comparison table (v3): denser rows, sticky first column, a check
   or dash per cell rather than prose. */
.compare-table-compact {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  overflow: hidden;
  font-size: var(--fs-2);
}

.compare-table-compact th,
.compare-table-compact td {
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--rule);
  text-align: center;
  vertical-align: middle;
}

.compare-table-compact th:first-child,
.compare-table-compact td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
}

.compare-table-compact thead th {
  background: var(--inset);
  font-weight: 800;
  color: var(--ink);
}

.compare-table-compact tbody tr:last-child th,
.compare-table-compact tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table-compact .yes {
  color: var(--good);
  font-weight: 800;
}

.compare-table-compact .no {
  color: var(--rule);
}

/* ================= Tier cards ================= */
.tier-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-card);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.tier-card-featured {
  border: 2px solid var(--accent);
}

.tier-card-studio {
  border-color: var(--badge);
}

.tier-badge {
  position: absolute;
  top: calc(-1 * var(--s-3));
  left: var(--s-5);
}

.tier-name {
  font-family: var(--font-display);
  font-size: var(--fs-5);
  font-weight: 800;
}

.tier-price {
  font-family: var(--font-display);
  font-size: var(--fs-7);
  font-weight: 800;
  color: var(--accent);
  line-height: var(--lh-tight);
}

.tier-onetime {
  display: block;
  margin-top: var(--s-1);
  font-size: var(--fs-2);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--accent);
}

.tier-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.tier-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  font-size: var(--fs-3);
  color: var(--ink);
}

.tier-list li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 4px;
  width: 12px;
  height: 12px;
  background-color: var(--good);
  mask-image: var(--icon-check);
  -webkit-mask-image: var(--icon-check);
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

/* Cards touch less, gap more: bigger, clearer separation between tiers. */
.tier-grid,
.cluster:has(> .tier-card) {
  gap: var(--s-5);
}

/* ================= Action bar ================= */
.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-3);
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: var(--s-3) var(--s-4);
  padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom));
  z-index: 20;
}

.action-bar .btn {
  min-height: var(--tap-min);
}

.action-bar .ticks {
  justify-self: center;
}

/* ================= kbd, notes, cards, banners ================= */
.kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  border: 1px solid var(--rule);
  border-radius: var(--r-tag);
  background: var(--surface);
  color: var(--ink-2);
}

.locked-note {
  font-size: var(--fs-2);
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  padding: var(--s-4);
}

.banner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-control);
  background: var(--inset);
  color: var(--ink);
  font-size: var(--fs-3);
}

.banner-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

/* ================= Landing hero price ================= */
.hero-price {
  font-family: var(--font-display);
  font-size: var(--fs-price);
  font-weight: 800;
  line-height: var(--lh-tight);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.onetime-line {
  font-size: var(--fs-2);
  color: var(--ink-2);
}

.onetime-line .mono {
  color: var(--ink);
}

/* ================================================================
   V3 components: the Shopee/TikTok Shop layer.
   ================================================================ */

/* ---------------- Price block ----------------
   56px accent price, struck previous price, yellow -N% tag. */
.price-block {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
}

.price-now {
  font-family: var(--font-display);
  font-size: var(--fs-price);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.price-was {
  font-size: var(--fs-4);
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--muted);
}

.price-tag {
  display: inline-flex;
  align-items: center;
  background: var(--badge);
  color: var(--badge-ink);
  font-size: var(--fs-1);
  font-weight: 800;
  padding: 3px var(--s-2);
  border-radius: var(--r-tag);
  align-self: center;
}

/* ---------------- Flash bar ----------------
   Red fill on a track, e.g. "487 of 500 claimed". Fill width is set inline
   via style="--pct: 62%" by the caller. */
.flash-bar {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.flash-bar-track {
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--inset);
  overflow: hidden;
}

.flash-bar-fill {
  height: 100%;
  width: var(--pct, 0%);
  background: var(--accent);
  border-radius: var(--r-pill);
  transition: width 400ms var(--ease);
}

.flash-bar-label {
  font-size: var(--fs-1);
  font-weight: 700;
  color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  .flash-bar-fill { transition: none; }
}

/* ---------------- Product card ---------------- */
.product-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  box-shadow: var(--shadow-card);
  padding: var(--s-3);
}

.product-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-tag);
  overflow: hidden;
  background: var(--inset);
}

.product-card-media img,
.product-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-title {
  font-weight: 700;
  font-size: var(--fs-3);
  color: var(--ink);
}

.product-card-meta {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  flex-wrap: wrap;
}

/* ---------------- Phone frame ---------------- (moved from landing.css) */
.phone-frame {
  width: min(240px, 70vw);
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  border: 6px solid var(--ink);
  background: var(--ink);
  overflow: hidden;
  position: relative;
}

.phone-frame video,
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------------- Trust chips ---------------- */
.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-pill);
  background: var(--inset);
  color: var(--ink-2);
  font-size: var(--fs-1);
  font-weight: 700;
}

.trust-chip .icon {
  color: var(--accent);
}

.trust-chips img {
  height: 24px;
  width: auto;
  display: block;
}

/* ---------------- Review card ---------------- */
.review-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.review-card-media {
  aspect-ratio: 16 / 9;
  background: var(--inset);
}

.review-card-media img,
.review-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-card-body {
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-card-name {
  font-weight: 700;
  font-size: var(--fs-2);
  color: var(--ink);
}

.review-card-meta {
  font-size: var(--fs-1);
  color: var(--muted);
}

/* ---------------- Accordion (details/summary) ---------------- */
.accordion {
  border-bottom: 1px solid var(--rule);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: var(--s-3);
  font-weight: 700;
  font-size: var(--fs-3);
  cursor: pointer;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background-color: var(--muted);
  mask-image: var(--icon-chevron);
  -webkit-mask-image: var(--icon-chevron);
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  transform: rotate(90deg);
  transition: transform var(--t-hover) var(--ease);
}

.accordion[open] summary::after {
  transform: rotate(-90deg);
}

.accordion-body {
  padding-bottom: var(--s-3);
  color: var(--ink-2);
  font-size: var(--fs-3);
  line-height: var(--lh-body);
}

/* ---------------- Sticky buy bar ----------------
   Fixed to the bottom, always visible (unlike the old action-bar, which
   only shows in the app's fold flow). Two buttons: an outline Chat and a
   full-width-ish red Buy. Safe-area aware. */
.sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--s-3);
  background: var(--surface);
  border-top: 1px solid var(--rule);
  box-shadow: var(--shadow-float);
  padding: var(--s-3) var(--s-4);
  padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom));
}

.sticky-buy .pill-btn {
  min-height: var(--btn-h);
}

.sticky-buy .pill-btn-outline {
  padding-inline: var(--s-4);
}

/* ---------------- Announcement bar ----------------
   Yellow on ink, cycling one-liners. Only the .is-on item is visible; a
   controller (JS) rotates which child carries that class. */
.ann-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  background: var(--ink);
  color: var(--badge);
  overflow: hidden;
}

.ann-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding-inline: var(--s-4);
  font-size: var(--fs-1);
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
  pointer-events: none;
}

.ann-item.is-on {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---------------- Icon sizing ----------------
   Inline SVG icons (fire, lightning, shield, envelope, payment logos) size
   consistently and inherit color through currentColor where the SVG uses it. */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.icon-sm { font-size: var(--fs-3); }
.icon-md { font-size: var(--fs-5); }
.icon-lg { font-size: var(--fs-7); }

/* ================================================================
   Gated demo: progress -> partial reveal -> gate card
   (moved here from landing.css and restyled red/yellow for v3; markup is
   unchanged, so no HTML or JS updates were needed to pick this up.)
   ================================================================ */
.gate-stage {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
}

.gate-progress {
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--inset);
  overflow: hidden;
}

.gate-progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: var(--r-pill);
  transition: width 120ms linear;
}

.gate-stage-label {
  margin: 0;
  font-size: var(--fs-2);
  font-weight: 700;
  color: var(--ink-2);
}

.gate-stage-label::after { content: "…"; }

.gate-slate {
  position: relative;
  overflow: hidden;
  padding-top: var(--s-3);
}

.gate-slate .slate-label-row {
  padding-right: 84px;
}

.gate-visible {
  max-height: none;
  overflow: visible;
  padding-bottom: var(--s-2);
}

.gate-frost {
  position: relative;
  min-height: 220px;
}

.gate-frost[data-state="building"] .gate-card {
  display: none;
}

.gate-hidden {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  opacity: 0.85;
  max-height: 260px;
  overflow: hidden;
}

.gate-frost::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--surface) 55%);
  pointer-events: none;
  z-index: 1;
}

.gate-card {
  position: relative;
  z-index: 2;
  margin: -120px var(--s-3) var(--s-3);
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--r-panel);
  padding: var(--s-4);
  box-shadow: var(--shadow-float);
  display: grid;
  gap: var(--s-2);
  text-align: center;
}

.gate-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--s-2);
}

.gate-price {
  font-family: var(--font-display);
  font-size: var(--fs-7);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.gate-next {
  margin: 0;
  font-size: var(--fs-1);
  color: var(--muted);
}

.gate-next::before { content: "then "; }

.gate-headline {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-4);
  font-weight: 800;
  line-height: 1.2;
}

.gate-sub {
  margin: 0;
  font-size: var(--fs-2);
  color: var(--ink-2);
}

.gate-card .btn-buy {
  margin-top: var(--s-1);
}

.gate-payments {
  margin: 0;
  font-size: var(--fs-1);
  font-weight: 700;
  color: var(--muted);
}

.gate-guarantee {
  margin: 0;
  font-size: var(--fs-1);
  color: var(--good);
  font-weight: 600;
}

.gate-email {
  display: grid;
  gap: var(--s-1);
  text-align: left;
  padding-top: var(--s-1);
  border-top: 1px solid var(--rule);
}

.gate-email .input {
  flex: 1;
  min-width: 0;
}

.gate-exhausted {
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

.gate-clip {
  margin: 0;
  display: grid;
  gap: var(--s-2);
  justify-items: center;
}

.gate-clip figcaption {
  font-size: var(--fs-1);
  color: var(--muted);
  text-align: center;
  max-width: 36ch;
}

@media (prefers-reduced-motion: reduce) {
  .gate-progress-fill { transition: none; }
}


/* ================= Icon buttons + pack cards (v2 slate) ================= */
.ico { display: inline-block; flex: none; vertical-align: middle; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; min-height: 40px; padding: 0 12px; border-radius: 12px; }
.icon-btn:not(.icon-btn-labeled) { padding: 0; width: 40px; }
.icon-btn .ico-check { display: none; }
.icon-btn[data-state="copied"] .ico-copy { display: none; }
.icon-btn[data-state="copied"] .ico-check { display: inline-block; color: var(--good); }
.icon-btn[data-state="copied"] { border-color: var(--good); }
.icon-btn-primary { min-height: 48px; padding: 0 18px; font-size: 15px; }
.btn-label { white-space: nowrap; }

.slate-actions { gap: 8px; padding: 14px 16px; }
.slate-actions .icon-btn-primary { flex: 1 1 100%; }
@media (min-width: 640px) { .slate-actions .icon-btn-primary { flex: 0 1 auto; } }
.slate-negative-wrap { border-top: 1px solid var(--rule); }
.slate-negative-summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 13px; font-weight: 700; color: var(--muted); }
.slate-negative-summary::-webkit-details-marker { display: none; }
.slate-negative-wrap .slate-negative { padding-top: 0; }
.slate-polish { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--rule); color: var(--accent-text); flex-wrap: wrap; }

.pack-section { border-top: 1px solid var(--rule); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pack-head { display: flex; align-items: center; gap: 10px; }
.pack-ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.pack-titles { min-width: 0; flex: 1; }
.pack-title { font-family: var(--font-display); font-size: 16px; font-weight: 800; margin: 0; }
.pack-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.pack-count { background: var(--badge); color: var(--badge-ink); font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 20px; }
.pack-grid { display: grid; gap: 10px; }
@media (min-width: 900px) { .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pack-card { background: var(--ground); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 12px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.pack-card-top { display: flex; align-items: center; gap: 8px; }
.pack-card-top .icon-btn { margin-left: auto; }
.pack-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); padding: 3px 8px; border-radius: 20px; }
.pack-meta { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pack-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }
.pack-card-mono .pack-text { font-family: var(--font-mono); font-size: 13px; }

/* fold headers */
.fold-ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); flex: none; margin-right: 8px; }

.slate-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.slate-empty p { margin: 0; max-width: 28ch; }


/* ================= v3 wizard polish: strip, iconed options, ratio previews, step rail, phone mock ================= */
.strip { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; margin: 12px 14px 4px; }
.strip-frame { flex: none; height: 56px; aspect-ratio: var(--w, 16) / var(--h, 9); max-width: 100px; border-radius: 8px; overflow: hidden; background: var(--inset); display: block; }
.strip-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.strip-brand { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-change { flex: none; }

.option-card-iconed { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; min-height: 48px; }
.option-card-ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.option-card[aria-pressed="true"] .option-card-ico { background: var(--accent); color: #fff; }

.ratio-box-thumb { position: relative; border: 0; box-shadow: 0 0 0 2px currentColor; }
.ratio-box-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ratio-card { min-height: 0; padding: 10px; }
.ratio-card[aria-pressed="true"] { color: var(--accent-text); }

.step-list { display: flex; flex-direction: column; gap: 4px; }
.step-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 12px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.step-row:hover { background: var(--ground); }
.step-row.is-on { background: var(--accent-soft); border-color: rgba(240, 78, 35, 0.25); }
.step-ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface); color: var(--accent-text); flex: none; border: 1px solid var(--rule); }
.step-row.is-on .step-ico { background: var(--accent); color: #fff; border-color: var(--accent); }
.step-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.step-txt b { font-size: 13px; }
.step-txt span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-check { color: var(--good); flex: none; }
.rail-saved { margin-top: 14px; border-top: 1px solid var(--rule); padding-top: 10px; }
.rail-saved > summary { cursor: pointer; font-weight: 800; font-size: 13px; padding: 6px 0; list-style: none; }
.rail-saved > summary::-webkit-details-marker { display: none; }

.pane-phone { display: flex; justify-content: center; padding: 14px 14px 0; }
.pane-phone-shot { position: relative; width: 150px; aspect-ratio: var(--w, 9) / var(--h, 16); border-radius: 18px; overflow: hidden; border: 5px solid var(--ink); background: var(--ink); }
.pane-phone.is-wide .pane-phone-shot { width: 100%; max-width: 320px; border-radius: 12px; border-width: 4px; }
.pane-phone-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pane-phone-badge { position: absolute; top: 8px; left: 8px; background: var(--badge); color: var(--badge-ink); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px; border-radius: 20px; }
.pane-phone-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }

.scene-story-head { display: flex; align-items: center; gap: 8px; }
.scene-beat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.scene-beat-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--ground); border: 1px solid var(--rule); border-radius: 20px; padding: 3px 9px 3px 4px; font-size: 11.5px; color: var(--ink-2); }
.scene-beat-pill b { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; }
.scene-shot-head { align-items: center; gap: 8px; }
.scene-shot-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.scene-shot-title { flex: 1; font-weight: 700; }

.slate-tip { margin: 0; padding: 0 16px 12px; font-size: 12.5px; font-weight: 700; color: var(--good); }
