/* Streava Store v2: calm dark storefront, luminous crimson accent. */
:root {
    --bg: #0e0c0f;
    --surface: #17141a;
    --surface-2: #1f1b23;
    --line: #2c2731;
    --ink: #f4f1f5;
    --muted: #a39ba8;
    --accent: #e11d48;
    --accent-text: #fb7185;
    --accent-ink: #fff;
    --ok: #3ecf8e;
    --warn: #f5a524;
    --radius: 14px;
    --wrap: 1160px;
    color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body.sv2 {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.6 "Plus Jakarta Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -48px; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 20px; border-radius: 10px;
    font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
    border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none;
    transform: none;
}
.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 4px 14px rgba(225, 29, 72, .32), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn-primary:hover {
    background: #eb2752;
    box-shadow: 0 6px 20px rgba(225, 29, 72, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }

.tag {
    display: inline-block; padding: 3px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
}
.tag-warn { color: var(--warn); border-color: rgba(245, 165, 36, .35); background: rgba(245, 165, 36, .08); }
.tag-auto { color: var(--ok); border-color: rgba(62, 207, 142, .35); background: rgba(62, 207, 142, .08); }

/* Header */
.bar { position: sticky; top: 0; z-index: 50; background: rgba(14, 12, 15, .88); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand img { height: 32px; width: auto; display: block; }
.brand em { font-style: normal; color: var(--accent-text); margin-left: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav .nav-cs { color: var(--ink); border: 1px solid var(--line); margin-left: 8px; display: inline-flex; align-items: center; gap: 8px; }
.nav-cs i, .cs-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
.nav-cs.is-off i, .cs-status.is-off i { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { position: absolute; left: 12px; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; }
.nav-toggle span { top: 21px; }
.nav-toggle span::before { left: 0; top: -6px; }
.nav-toggle span::after { left: 0; top: 6px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; padding: 72px 0 56px; }
.eyebrow { color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.03em; }
.lead { color: var(--muted); font-size: 18px; margin-top: 20px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; scroll-margin-top: 100px; }
.feature:target { border-color: var(--accent); }
.feature-head { display: flex; gap: 16px; align-items: flex-start; }
.feature-head img { border-radius: 12px; flex: none; }
.feature-head h2 { font-size: 22px; margin-top: 8px; }
.feature-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.feature-list { list-style: none; margin: 24px 0; padding: 20px 0; border-block: 1px solid var(--line); display: grid; gap: 10px; font-size: 15px; }
.feature-list li { padding-left: 26px; position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.feature-list .ok { color: var(--ok); }
.feature-list .warn { color: var(--warn); }
.feature-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.price { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: baseline; }
.price s { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.price strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price span { color: var(--ok); font-size: 13px; font-weight: 700; }

/* Sections */
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 8px; }
.section-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
main > section + section { margin-top: 88px; }

/* Catalog */
.catalog { padding-top: 16px; }
main > .hero + .catalog { margin-top: 16px; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button {
    min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
    background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search input {
    width: min(320px, 100%); min-height: 42px; padding: 0 14px 0 40px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a39ba8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") 14px center no-repeat;
    color: var(--ink); font: inherit; font-size: 15px;
}
.search input::placeholder { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile {
    position: relative; display: grid; grid-template-columns: 52px 1fr auto; grid-template-rows: 1fr auto; gap: 14px 14px;
    align-items: center; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
    transition: border-color .15s, background .15s, transform .15s;
}
.tile:hover { border-color: #463e4c; background: var(--surface-2); transform: translateY(-2px); }
.tile:focus-within { border-color: var(--accent); }
.tile img, .tile-mark { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; align-self: start; }
.tile img, .feature-head img { background: #fff; padding: 4px; }
.tile-mark { display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: 20px; }
.tile-body h3 { font-size: 16px; font-weight: 700; }
.tile-body p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tile .tag { align-self: start; }
.tile-foot { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.tile-foot span { color: var(--muted); font-size: 13px; }
.tile-foot strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile.is-auto { border-color: rgba(224, 52, 79, .45); }
.tile-link { position: absolute; inset: 0; border-radius: inherit; }
.tile-link:focus-visible { outline-offset: -2px; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* Steps */
.split { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.steps li::before { content: counter(s, decimal-leading-zero); color: var(--accent-text); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.steps strong { font-size: 17px; }
.steps span { color: var(--muted); font-size: 15px; }

/* Reviews: native horizontal scroll-snap, no JS carousel */
.review-rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 360px); gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
    mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent);
    padding-right: 64px;
}
.review { margin: 0; scroll-snap-align: start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.stars { color: var(--warn); letter-spacing: 2px; font-size: 14px; }
.review blockquote { margin: 0; font-size: 15px; flex: 1; }
.review figcaption { display: grid; gap: 2px; font-size: 13px; }
.review figcaption span { color: var(--muted); }

/* Help banner */
.help {
    display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
    padding: 32px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
}
.help h2 { font-size: 22px; font-weight: 800; }
.help p { color: var(--muted); margin-top: 6px; }
.help p a { color: var(--ink); }
.help-side { display: flex; align-items: center; gap: 16px; }
.cs-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* Footer */
.foot { margin-top: 96px; border-top: 1px solid var(--line); padding: 56px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid > div { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot-grid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.foot-grid a { text-decoration: none; color: var(--ink); opacity: .85; }
.foot-grid a:hover { opacity: 1; text-decoration: underline; }
.foot-brand p { color: var(--muted); max-width: 30em; }
.pay { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pay span { display: grid; place-items: center; height: 36px; padding: 0 12px; background: #fff; border-radius: 8px; }
.pay img { height: 18px; width: auto; max-width: 72px; object-fit: contain; }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* Floating WhatsApp (markup shared with v1 partial) */
.sv2.is-floating-whatsapp-open::before { content: ""; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .45); pointer-events: none; }
.floating-whatsapp { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; justify-items: end; gap: 10px; pointer-events: none; }
.floating-whatsapp-panel, .floating-whatsapp-toggle { pointer-events: auto; }
.floating-whatsapp-panel { width: min(320px, calc(100vw - 32px)); display: grid; gap: 10px; }
.floating-whatsapp-chat, .floating-whatsapp-info { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.floating-whatsapp-chat { display: flex; align-items: center; gap: 12px; justify-self: end; padding: 14px 20px; text-decoration: none; font-weight: 700; }
.floating-whatsapp-icon, .floating-whatsapp-toggle-icon { display: inline-flex; }
.floating-whatsapp-icon svg { width: 24px; height: 24px; fill: #25d366; }
.floating-whatsapp-info { display: grid; gap: 12px; padding: 16px; }
.floating-whatsapp-status { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.floating-whatsapp-status > span { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.floating-whatsapp-status.is-offline > span { background: var(--warn); }
.floating-whatsapp-status strong { font-size: 14px; }
.floating-whatsapp-status small, .floating-whatsapp-hours div { color: var(--muted); font-size: 13px; }
.floating-whatsapp-hours { display: grid; gap: 8px; }
.floating-whatsapp-hours div { display: flex; justify-content: space-between; gap: 14px; }
.floating-whatsapp-hours strong { color: var(--ink); font-size: 13px; }
.floating-whatsapp-toggle {
    width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0;
    border-radius: 50%; background: #25d366; color: #fff; cursor: pointer; box-shadow: 0 10px 28px rgba(0, 0, 0, .4);
}
.floating-whatsapp-toggle svg { width: 30px; height: 30px; fill: currentColor; }
.floating-whatsapp-close-icon { display: none; position: relative; width: 24px; height: 24px; }
.floating-whatsapp-close-icon::before, .floating-whatsapp-close-icon::after { content: ""; position: absolute; top: 11px; left: 1px; width: 22px; height: 2.5px; border-radius: 2px; background: currentColor; }
.floating-whatsapp-close-icon::before { transform: rotate(45deg); }
.floating-whatsapp-close-icon::after { transform: rotate(-45deg); }
.floating-whatsapp.is-open .floating-whatsapp-toggle-icon { display: none; }
.floating-whatsapp.is-open .floating-whatsapp-close-icon { display: inline-flex; }

/* Responsive */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; }
    .split { grid-template-columns: 1fr; gap: 0; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    body.sv2 { font-size: 15px; }
    .wrap { width: min(100% - 32px, var(--wrap)); }
    .nav-toggle { display: inline-block; }
    .nav {
        position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
        padding: 12px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); display: none;
    }
    .nav.is-open { display: flex; }
    .nav a { padding: 14px 12px; }
    .nav .nav-cs { margin: 8px 0 0; justify-content: center; }
    .lead { font-size: 16px; }
    .hero-actions .btn { flex: 1; }
    .feature { padding: 22px; }
    .feature-foot .btn { width: 100%; }
    .toolbar { flex-direction: column; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
    .tabs button { flex: none; }
    .search input { width: 100%; }
    .grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .review-rail { grid-auto-columns: 85%; }
    .help { padding: 24px; }
    .help-side { width: 100%; justify-content: space-between; }
    main > section + section { margin-top: 64px; }
    .foot-grid { grid-template-columns: 1fr; gap: 28px; }
    .floating-whatsapp { right: 16px; bottom: 16px; }
    .foot-grid > div { gap: 0; }
    .foot-grid h3 { margin-bottom: 6px; }
    .foot-grid a { min-height: 44px; display: flex; align-items: center; }
    .foot-grid .muted { padding: 4px 0; }
    .foot { padding-bottom: 96px; } /* clearance for the WhatsApp button */
}

/* ===== Inner pages (FAQ, legal, invoice lookup, checkout, invoice) ===== */
.page { padding: 48px 0 0; }
.page-narrow { max-width: 820px; }
.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-head .lead { font-size: 17px; margin-top: 12px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; word-break: break-all; }
.break { word-break: break-all; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; line-height: 34px; }
.panel-muted { background: transparent; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.page-help { margin-top: 40px; }

/* FAQ / details */
.faq { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq-item summary {
    list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 700; position: relative; min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item ul, .faq-item > div { margin: 0; padding: 0 20px 20px 40px; color: var(--muted); display: grid; gap: 6px; }
.faq-item > div { padding-left: 20px; }

/* Legal */
.prose-list { display: grid; gap: 12px; }
.prose-list article { padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.prose-list h2 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.prose-list p { color: var(--muted); }
.timeline { margin-bottom: 32px; }
.timeline h2 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }

/* Forms */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 14px; }
.field input {
    min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--bg); color: var(--ink); font: inherit; font-size: 16px;
}
.field input::placeholder { color: #6f6775; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 52, 79, .2); }
.field small { color: var(--muted); font-size: 13px; }
.req { color: var(--accent-text); }
.alert { border: 1px solid rgba(224, 52, 79, .4); background: rgba(224, 52, 79, .08); border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; display: grid; gap: 6px; font-size: 14px; }
.alert a { color: var(--ink); font-weight: 600; }
.checklist { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 10px; font-size: 15px; }
.checklist li { padding-left: 26px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }

/* Checkout */
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; margin-bottom: 48px; }
.checkout-main { display: grid; gap: 14px; }
.checkout-side { position: sticky; top: 88px; margin-bottom: 48px; }
/* Logo | info | aside, all centered on one axis; both text columns share a 2-row rhythm. */
.product-head { display: flex; align-items: center; gap: 16px; }
.product-head img { flex: none; width: 56px; height: 56px; border-radius: 12px; background: #fff; padding: 4px; object-fit: contain; }
.product-head-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.product-head h1 { font-size: 22px; font-weight: 800; line-height: 26px; }
.product-head p { font-size: 14px; line-height: 22px; }
.product-head-aside { display: grid; gap: 4px; justify-items: end; }
.product-head-price { font-size: 20px; font-weight: 800; line-height: 22px; font-variant-numeric: tabular-nums; }
fieldset.panel { margin: 0; min-width: 0; }
fieldset.panel:disabled {
    opacity: 0.35;
    filter: grayscale(1);
    pointer-events: none;
    user-select: none;
}
fieldset.panel legend { float: left; width: 100%; font-weight: 700; font-size: 16px; margin-bottom: 14px; padding: 0; }
fieldset.panel legend + * { clear: both; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice > span {
    display: grid; gap: 2px; height: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--bg); transition: border-color .15s, background .15s;
}
.choice strong { font-size: 15px; }
.choice > span > span { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.choice em { font-style: normal; color: var(--muted); font-size: 12px; }
.choice:hover > span { border-color: #463e4c; }
.choice input:checked + span {
    border-color: var(--accent);
    background: rgba(225, 29, 72, .08);
    box-shadow: 0 0 24px rgba(225, 29, 72, .16), inset 0 0 0 1px var(--accent);
}
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice.is-unavailable { cursor: not-allowed; }
.choice.is-unavailable > span > :not(em) { opacity: .5; }
.choice.is-unavailable em { color: var(--warn); }
.choices-pay .choice > span { justify-items: start; gap: 8px; }
.choices-device { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.choices-device .choice strong { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.choices-device .choice-badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--ink); white-space: nowrap; }
.choice input:checked + span .choice-badge { background: var(--accent); color: #fff; }
.pay-logo {
    display: inline-grid; place-items: center; height: 34px; padding: 0 10px;
    background: rgba(255, 255, 255, .94); border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px; transition: background .15s, border-color .15s;
}
.pay-logo img { height: 18px; width: auto; max-width: 84px; object-fit: contain; }
.choice:hover .pay-logo, .choice input:checked + span .pay-logo { background: #fff; border-color: rgba(255, 255, 255, .3); }

.rows { margin: 0 0 18px; display: grid; }
.rows > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.rows .total { border-bottom: 0; padding-top: 14px; font-size: 16px; }
.rows .total dt { color: var(--ink); font-weight: 700; }
.rows .total dd { font-size: 20px; font-weight: 800; }
.summary .small { margin-top: 12px; text-align: center; }
.panel .small a { color: var(--ink); }

/* Modals (checkout confirm / error) */
body.is-alert-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .65); }
.modal-card { width: min(440px, 100%); background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 16px; }
.modal-card h2 { font-size: 20px; font-weight: 800; }
.modal-card .rows { margin: 0; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions .btn:only-child { grid-column: 1 / -1; }
.confirm-method { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.confirm-method div { display: grid; }
.retry-track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.retry-track span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s linear; }

/* Invoice */
.invoice-title { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid; }
.status.is-wait { color: var(--warn); border-color: rgba(245, 165, 36, .4); background: rgba(245, 165, 36, .08); }
.status.is-ok { color: var(--ok); border-color: rgba(62, 207, 142, .4); background: rgba(62, 207, 142, .08); }
.status.is-bad { color: #ff6b81; border-color: rgba(255, 107, 129, .4); background: rgba(255, 107, 129, .08); }
.invoice-total { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.invoice-total > div { display: grid; gap: 4px; }
.invoice-total strong { font-size: clamp(28px, 4vw, 36px); font-weight: 800; font-variant-numeric: tabular-nums; }
.countdown { text-align: right; }
.countdown strong { color: var(--warn); }
.pay-panel { display: grid; gap: 16px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; }
.panel-title h2 { margin: 0; }
.notice { display: grid; gap: 4px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.notice span { color: var(--muted); }
.notice.is-ok { border-color: rgba(62, 207, 142, .4); }
.notice.is-ok strong { color: var(--ok); }
.notice.is-bad { border-color: rgba(255, 107, 129, .4); }
.notice.is-bad strong { color: #ff6b81; }
.qr { display: grid; justify-items: center; gap: 12px; text-align: center; }
.qr-live { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.qr-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(62, 207, 142, .18); }
.qr-frame { background: #fff; padding: 14px; border-radius: 14px; }
.qr-frame img { width: min(260px, 70vw); height: auto; image-rendering: pixelated; }
.instructions { background: var(--bg); }
.instruction-group { padding: 0 20px 16px; display: grid; gap: 8px; }
.instruction-group ol { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; font-size: 14px; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }

@media (max-width: 960px) {
    .two-col, .checkout { grid-template-columns: 1fr; }
    .checkout-side { position: static; }
}

@media (max-width: 640px) {
    .page { padding-top: 32px; }
    .panel { padding: 18px; }
    .product-head { flex-wrap: wrap; gap: 14px; }
    .product-head img { width: 48px; height: 48px; }
    .product-head-aside { width: 100%; grid-auto-flow: column; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
    .choices { grid-template-columns: 1fr 1fr; }
    .countdown { text-align: left; }
    .page-actions .btn { flex: 1; }
}
