:root {
  color-scheme: dark;
  --bg: #08070b;
  --surface: #111015;
  --surface-2: #18161e;
  --line: #292530;
  --text: #f7f5fa;
  --muted: #a9a4b2;
  --purple: #8c2fff;
  --purple-2: #a855f7;
  --success: #5fe0a0;
  --danger: #ff6b85;
  --radius: 16px;
  --dialog-bg: #0f0d13;
  --focus: color-mix(in srgb, var(--purple) 55%, white);
  --gutter: 24px;
  --wrap: min(1400px, calc(100% - 2 * var(--gutter)));
  /* Side space that lines full-width bars (header, menu) up with .wrap content; % resolves like .wrap's width. */
  --edge: calc((100% - var(--wrap)) / 2);
  --header-h: 76px;
  --section-pad: 74px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow-wrap: break-word; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.hidden { display: none !important; }
/* A `display` of our own (buttons are inline-flex) beats the browser's own [hidden] rule, so say it again here. */
[hidden] { display: none !important; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 999; background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: 16px; padding-inline: var(--edge); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 21px; letter-spacing: .04em; width: max-content; }
.brand-mark { display: block; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 7px rgba(168,85,247,.45)); transform: scale(1.18); }
.site-header nav { display: flex; gap: clamp(20px, 2.4vw, 34px); color: var(--muted); white-space: nowrap; }
.site-header nav a { position: relative; transition: color .2s ease; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--text); }
/* A purple underline slides in under the link being pointed at. */
.site-header nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--purple), var(--purple-2)); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease-out); }
.site-header nav a:hover::after, .site-header nav a:focus-visible::after { transform: scaleX(1); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 18px; min-width: 0; }
.text-button { border: 0; background: transparent; padding: 6px 0; cursor: pointer; }
.text-button:hover, .text-button:focus-visible { color: var(--purple-2); }
.align-left { justify-self: start; color: var(--muted); }
.account-button { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #493466; background: #15111c; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.cart-button > svg, .menu-button > svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; font-size: 12px; background: var(--purple); }
.menu-button { display: none; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; }
.menu-button[aria-expanded="true"] { border-color: #493466; background: #15111c; }
.menu-button .menu-close, .menu-button[aria-expanded="true"] .menu-lines { display: none; }
.menu-button[aria-expanded="true"] .menu-close { display: inline; }

.hero { min-height: 480px; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(40px, 6vw, 84px); padding-block: 58px 70px; }
.hero-copy { max-width: 520px; }
.hero-badge { position: relative; display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 7px 15px 7px 11px; overflow: hidden; border: 1px solid #4a2f6b; border-radius: 999px; background: linear-gradient(135deg, rgba(140,47,255,.2), rgba(140,47,255,.05)); font-size: 14px; font-weight: 700; box-shadow: 0 8px 26px rgba(140,47,255,.14); }
.hero-badge svg { width: 17px; height: 17px; flex: none; fill: #f5c86a; filter: drop-shadow(0 0 6px rgba(245,200,106,.45)); }
.hero-badge strong { color: var(--purple-2); }
/* A soft shine crosses the badge now and then. */
.hero-badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.16) 50%, transparent 70%); transform: translateX(-100%); animation: shine 7s ease-in-out 1.4s infinite; pointer-events: none; }
@keyframes shine { 0% { transform: translateX(-100%); } 20%, 100% { transform: translateX(100%); } }
/* The hero settles in when the page opens: badge, title and text one after another, then the picture. */
.hero-copy > * { animation: rise .7s var(--ease-out) backwards; }
.hero-copy > :nth-child(2) { animation-delay: .07s; }
.hero-copy > :nth-child(3) { animation-delay: .14s; }
.hero-copy > :nth-child(4) { animation-delay: .21s; }
.hero-copy > :nth-child(5) { animation-delay: .28s; }
.hero-show { animation: settle .9s var(--ease-out) .16s backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes settle { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.eyebrow { color: var(--purple-2); margin: 0 0 12px; text-transform: uppercase; font-weight: 800; font-size: 12px; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(50px, 5.7vw, 78px); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.08; letter-spacing: -.04em; }
h3 { margin-bottom: 7px; font-size: 20px; line-height: 1.3; }
.hero-text { color: var(--muted); font-size: clamp(18px, 2vw, 22px); max-width: 440px; margin-bottom: 30px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; padding: 12px 20px; border: 1px solid transparent; font-weight: 800; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.button-primary { color: white; background: linear-gradient(135deg, #7220e5, #9b38ff); box-shadow: 0 12px 34px rgba(140,47,255,.2); }
.button-primary:not(:disabled):hover { background: linear-gradient(135deg, #8128f3, #aa4dff); }
.button-secondary { background: var(--surface-2); border-color: var(--line); }
.button-secondary:not(:disabled):hover { border-color: #493466; }
.button-danger { color: #ffdbe2; border-color: #6e2c39; background: #2a1118; }
.button:disabled { cursor: not-allowed; }
.button:disabled:not([aria-busy="true"]) { color: var(--muted); background: var(--surface-2); border-color: var(--line); box-shadow: none; }
.button[aria-busy="true"] { cursor: progress; opacity: .8; }
.button-small { min-height: 38px; padding: 8px 14px; font-size: 14px; }
/* Notices from the dashboard (notice-view.js): bars under the menu, one popup. Each style sets --notice. */
.notice-stack { display: grid; border-bottom: 1px solid var(--line); }
.notice-stack[hidden] { display: none; }
.notice { --notice: var(--purple-2); display: flex; align-items: center; gap: 12px; padding: 10px var(--edge); background: color-mix(in srgb, var(--notice) 9%, var(--surface)); animation: notice-in .45s var(--ease-out) both; }
.notice + .notice { border-top: 1px solid var(--line); }
.notice-success, .notice-popup.notice-success { --notice: var(--success); }
.notice-warning, .notice-popup.notice-warning { --notice: #f2c46d; }
.notice-promo, .notice-popup.notice-promo { --notice: #ff6fc4; }
.notice.notice-promo { background: linear-gradient(90deg, color-mix(in srgb, var(--purple) 20%, var(--surface)), color-mix(in srgb, #ff6fc4 14%, var(--surface))); }
.notice-icon { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--notice); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice-text { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.notice-title, .notice-text strong { color: var(--text); }
.notice-text a, .notice-popup-message a { color: var(--text); text-decoration: underline; text-decoration-color: var(--notice); text-underline-offset: 3px; }
.notice .notice-button { flex: none; min-height: 34px; padding: 6px 13px; color: var(--text); background: color-mix(in srgb, var(--notice) 20%, transparent); border-color: color-mix(in srgb, var(--notice) 55%, transparent); }
.notice .notice-button:hover, .notice .notice-button:focus-visible { background: color-mix(in srgb, var(--notice) 32%, transparent); }
.notice-close { flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.notice-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.notice-close:hover, .notice-close:focus-visible { color: var(--text); background: color-mix(in srgb, var(--notice) 18%, transparent); }
.notice.is-closing { animation: notice-out .28s ease both; }
@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes notice-out { to { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 620px) {
  .notice { flex-wrap: wrap; row-gap: 8px; }
  .notice-text { flex-basis: calc(100% - 76px); }
  .notice .notice-button { order: 3; margin-left: 32px; }
}
.notice-dialog { width: min(460px, calc(100% - 30px)); }
.notice-popup { --notice: var(--purple-2); display: grid; justify-items: center; gap: 12px; padding-top: 6px; text-align: center; }
.notice-popup .notice-icon { width: 48px; height: 48px; padding: 11px; border-radius: 14px; background: color-mix(in srgb, var(--notice) 16%, transparent); }
.notice-popup h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.notice-popup-message { margin: 0; color: var(--muted); }
.notice-popup-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

.admin-bar { border-bottom: 1px solid #3a2752; background: linear-gradient(90deg, #1a0f29, #120c1a); }
.admin-bar-inner { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-block: 8px; }
.admin-bar-inner p { margin: 0; color: var(--muted); font-size: 14px; }
.admin-bar-inner strong { color: var(--purple-2); margin-right: 6px; }
.admin-bar-actions { display: flex; gap: 8px; }
.hero-show { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(100%, 720px); min-width: 0; justify-self: end; }
.hero-media { display: block; width: 100%; margin: 0; padding: 10px; border-radius: var(--radius); overflow: hidden; border: 1px solid #3e2a50; background: #0d0b11; cursor: pointer; box-shadow: 0 24px 70px rgba(92, 22, 155, .13); transition: border-color .3s ease, box-shadow .3s ease; }
/* Hero slideshow: the pictures sit on top of each other and cross-fade, the shown one easing out of a slight zoom. */
.hero-frame { position: relative; display: grid; overflow: hidden; border-radius: 10px; background: #09080c; }
.hero-frame img { grid-area: 1 / 1; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-slide { opacity: 0; transition: opacity .9s ease; }
.hero-slide.is-active { opacity: 1; animation: hero-zoom 7s ease-out both; }
@keyframes hero-zoom { from { transform: scale(1.05); } }
/* The caption and the controls share a row while they fit; on a phone the controls wrap below and the dots get narrower,
   so any number of products fits the screen. */
.hero-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 0 4px; }
.hero-caption { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-width: 0; padding: 4px 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.hero-caption strong { font-size: 16px; transition: color .2s ease; }
.hero-price { color: var(--muted); font-size: 14px; }
.hero-arrow { color: var(--purple-2); transition: transform .25s var(--ease-out); }
.hero-caption:hover strong, .hero-caption:focus-visible strong { color: var(--purple-2); }
.hero-caption:hover .hero-arrow { transform: translateX(3px); }
.hero-controls { display: flex; flex: 0 1 auto; min-width: 0; align-items: center; gap: 8px; margin-left: auto; }
.hero-dots { display: flex; min-width: 0; gap: 2px; }
/* Each dot is a 24px-tall target; the visible part is a thin bar that fills while its product is shown. */
.hero-dot { position: relative; display: grid; flex: 0 1 30px; width: 30px; min-width: 12px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.hero-dot::before, .hero-dot::after { content: ""; grid-area: 1 / 1; align-self: center; width: 100%; height: 5px; border-radius: 999px; }
.hero-dot::before { background: #2e2839; transition: background .2s ease; }
.hero-dot:hover::before { background: #493466; }
.hero-dot::after { background: var(--purple-2); transform: scaleX(0); transform-origin: left; }
.hero-dot[aria-current="true"]::after { transform: scaleX(1); }
/* Playing: the shown product's bar fills over the time it stays (5.5 s, as HERO_DELAY in app.js) and stops while paused. */
.hero-show.is-auto .hero-dot[aria-current="true"]::after { animation: hero-progress 5.5s linear both; animation-play-state: paused; }
.hero-show.is-auto.is-running .hero-dot[aria-current="true"]::after { animation-play-state: running; }
@keyframes hero-progress { from { transform: scaleX(0); } }
.hero-pause { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.hero-pause:hover, .hero-pause:focus-visible { border-color: #493466; color: var(--text); }
.hero-pause svg { width: 14px; height: 14px; fill: currentColor; }
.hero-pause .icon-play, .hero-show:not(.is-auto) .hero-pause .icon-pause { display: none; }
.hero-show:not(.is-auto) .hero-pause .icon-play { display: block; }

.products, .reviews { padding-block: var(--section-pad); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) - var(--section-pad) + 20px); }
.trust + .reviews { border-top: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.section-heading > p { color: var(--muted); margin: 0 0 7px; }
.category-filters { display: flex; gap: 9px; margin: -11px -6px 22px; padding: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.category-filters::-webkit-scrollbar { display: none; }
.category-filters.fade-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); }
.category-filters.fade-start { -webkit-mask-image: linear-gradient(90deg, transparent, #000 64px); mask-image: linear-gradient(90deg, transparent, #000 64px); }
.category-filters.fade-start.fade-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent); }
.category-button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); padding: 9px 15px; cursor: pointer; }
.category-button:hover { color: white; border-color: #5a3b77; }
.category-button[aria-pressed="true"] { color: white; border-color: var(--purple); background: #27163b; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.product-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 15px; padding: 11px; background: linear-gradient(180deg, #111015, #0c0b0f); transition: transform .3s var(--ease-out), border-color .3s ease, box-shadow .3s ease; }
.product-image-button { position: relative; display: block; width: 100%; border: 0; background: #09080c; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; }
.card-media { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(8,7,11,.78); color: var(--text); font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }
.card-edit { position: absolute; top: 18px; right: 18px; z-index: 2; padding: 5px 12px; border: 1px solid #6d4a97; border-radius: 999px; background: rgba(27,16,40,.92); color: #fff; font-size: 13px; font-weight: 800; }
.card-edit:hover, .card-edit:focus-visible { background: var(--purple); }
.image-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border: 1px dashed var(--line); border-radius: 10px; background: #0c0b10; color: var(--muted); font-size: 14px; }
.price small { color: var(--muted); font-size: 13px; font-weight: 700; }
.product-image-button img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s var(--ease-out); }
.product-image-button:hover img { transform: scale(1.04); }
/* Cards lift toward the pointer (not on touch screens, where hover sticks after a tap). */
@media (hover: hover) {
  .product-card:hover { transform: translateY(-4px); border-color: #3e2a50; box-shadow: 0 20px 44px rgba(92,22,155,.16); }
  .review-card:hover { transform: translateY(-2px); border-color: #3a2e48; }
  .hero-media:hover { border-color: #5a3b77; box-shadow: 0 28px 80px rgba(92,22,155,.24); }
}
.product-card h3 { margin: 15px 5px 3px; }
.product-card .product-type { color: var(--purple-2); margin: 0 5px 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.product-card .product-description { color: var(--muted); margin: 0 5px 13px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: auto 5px 14px; }
.price { font-weight: 900; font-size: 20px; }
.compatibility { color: var(--muted); font-size: 13px; }
.product-card .button { width: 100%; }
.skeleton { aspect-ratio: 4 / 5; border-radius: var(--radius); background: linear-gradient(100deg, #111015 30%, #1d1923 50%, #111015 70%); background-size: 300% 100%; animation: loading 1.4s infinite; }
@keyframes loading { to { background-position: -150% 0; } }

.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.trust > * { display: grid; grid-template-columns: auto 1fr; align-content: center; column-gap: 13px; padding: 30px clamp(16px, 2.3vw, 36px); transition: background .2s ease; }
.trust > * + * { border-left: 1px solid var(--line); }
.trust-link:hover { background: #100d15; }
.trust-icon { grid-row: 1 / 3; align-self: center; width: 27px; height: 27px; fill: none; stroke: var(--purple-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease-out); }
.trust > :hover .trust-icon { transform: scale(1.12) rotate(-4deg); }
.trust small { color: var(--muted); }
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.review-card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; overflow-wrap: anywhere; transition: transform .3s var(--ease-out), border-color .25s ease; }
.review-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-bottom: 10px; }
.review-card .stars { color: var(--purple-2); letter-spacing: 3px; }
.review-product { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.review-card p { margin-bottom: 0; }
.review-card footer { margin-top: auto; padding-top: 18px; color: var(--muted); font-size: 14px; }
.review-card .button { align-self: flex-start; margin-top: 14px; min-height: 38px; padding: 8px 12px; font-size: 13px; }
/* Auto reviews: quieter than written ones, no stars, a badge that says what they are. */
.review-card.is-auto { background: transparent; border-style: dashed; }
.auto-badge { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.review-card .no-issue { color: var(--success); font-weight: 700; }
.review-summary { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.review-summary:empty { display: none; }
/* Previous / Next under the reviews once they fill more than one page. */
.review-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; margin-top: 28px; }
.review-page { color: var(--muted); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.purchase-item:has(.purchase-auto) { flex-wrap: wrap; }
.purchase-auto { flex: 1 1 100%; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.empty-state { grid-column: 1 / -1; color: var(--muted); border: 1px dashed var(--line); padding: 30px; border-radius: 12px; text-align: center; }
.site-footer { min-height: 150px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.brand-small { color: var(--text); font-size: 16px; }
.brand-small .brand-mark { width: 28px; height: 28px; }
.site-footer p { margin: 0; text-align: center; }
.footer-links { justify-self: end; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a:hover, .footer-links a:focus-visible, .footer-links a[aria-current="page"] { color: var(--text); }

.dialog { width: min(600px, calc(100% - 30px)); max-height: min(90vh, 820px); max-height: min(90dvh, 820px); padding: 0; color: var(--text); background: var(--dialog-bg); border: 1px solid #32283d; border-radius: 18px; box-shadow: 0 24px 100px #000; overflow: hidden; overflow: clip; }
.dialog[open] { display: flex; flex-direction: column; }
/* Dialogs rise and fade in over a darkening, blurring backdrop. Only real <dialog> elements: the admin
   preview draws a product page with the same class on a plain box that never "opens". */
dialog.dialog { opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .22s ease, transform .32s var(--ease-out); }
dialog.dialog[open] { opacity: 1; transform: none; }
dialog.dialog::backdrop { background: rgba(0,0,0,0); backdrop-filter: blur(0); transition: background-color .3s ease, backdrop-filter .3s ease; }
dialog.dialog[open]::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(8px); }
@starting-style {
  dialog.dialog[open] { opacity: 0; transform: translateY(16px) scale(.98); }
  dialog.dialog[open]::backdrop { background: rgba(0,0,0,0); backdrop-filter: blur(0); }
}
/* Closing fades out too, where the browser can keep the dialog on top while it does. A closing dialog
   never catches clicks meant for the page. */
@supports (overlay: auto) {
  dialog.dialog { transition: opacity .2s ease, transform .24s ease, overlay .24s allow-discrete, display .24s allow-discrete; }
  dialog.dialog::backdrop { transition: background-color .24s ease, backdrop-filter .24s ease, overlay .24s allow-discrete, display .24s allow-discrete; }
  dialog.dialog[open] { transition: opacity .22s ease, transform .32s var(--ease-out); }
}
dialog.dialog:not([open]), dialog.dialog:not([open])::backdrop { pointer-events: none; }
/* The body scrolls instead of the dialog, so the close button never scrolls out of reach. */
.dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 30px; scrollbar-width: thin; scrollbar-color: #3a3046 transparent; }
.dialog-close { position: absolute; top: 14px; right: 16px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #201b27; cursor: pointer; }
.dialog-close:hover { background: #2d2537; }
.dialog-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.dialog h2 { font-size: clamp(28px, 3.2vw, 40px); }
.dialog h2 + p { color: var(--muted); margin: 10px 0 0; }
/* The product page adapts to its own width (container queries), so the admin preview and the real dialog match. */
.product-dialog { width: min(1080px, calc(100% - 30px)); container-type: inline-size; }
/* Scrolling content on top, fixed purchase bar below: Buy now / Add to bag are always on screen. */
.product-sheet { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.product-dialog-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 32px; align-items: start; }
.product-col { display: grid; gap: 16px; min-width: 0; }
.product-gallery { display: grid; gap: 10px; min-width: 0; outline: none; }
.gallery-stage { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #09080c; touch-action: pan-y; }
.gallery-stage > .image-placeholder { border: 0; border-radius: 0; }
.product-main-image, .gallery-play img, .gallery-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 0; }
.gallery-play { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #09080c; cursor: pointer; }
.gallery-play img { filter: brightness(.55); }
.play-badge { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(140,47,255,.92); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.play-badge::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.gallery-nav { position: absolute; top: 50%; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.14); border-radius: 50%; background: rgba(8,7,11,.72); color: #fff; cursor: pointer; backdrop-filter: blur(6px); }
.gallery-nav:hover { background: var(--purple); }
.gallery-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-count { position: absolute; right: 10px; bottom: 10px; padding: 2px 9px; border-radius: 999px; background: rgba(8,7,11,.72); font-size: 12px; font-weight: 700; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; scrollbar-color: #3a3046 transparent; }
.gallery-thumb { position: relative; flex: 0 0 96px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 9px; background: #09080c; cursor: pointer; opacity: .65; transition: opacity .18s ease, border-color .18s ease; }
.gallery-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery-thumb:hover, .gallery-thumb[aria-current="true"] { opacity: 1; }
.gallery-thumb[aria-current="true"] { border-color: var(--purple-2); }
.gallery-thumb.is-video { min-height: 54px; }
.gallery-thumb .play-badge { width: 26px; height: 26px; }
.gallery-thumb .play-badge::after { border-width: 5px 0 5px 8px; }
.video-link { justify-self: start; }
.product-features { display: grid; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.product-features li { position: relative; padding-left: 28px; }
.product-features li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #2b1741; }
.product-features li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 6px; height: 9px; border: solid var(--purple-2); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.purchase-edit { color: var(--purple-2); font-weight: 800; }
.product-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.product-fact { padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #121017; }
.product-fact dt { color: var(--muted); font-size: 12px; }
.product-fact dd { margin: 2px 0 0; font-weight: 700; }
.product-summary .eyebrow { padding-right: 44px; }
.product-summary .description { color: var(--muted); font-size: 16.5px; margin: 10px 0 0; }
.license-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; min-width: 0; margin: 4px 0 0; padding: 0; border: 0; }
/* A floated legend becomes a normal grid item, so it can span both columns. */
.license-options legend { float: left; grid-column: 1 / -1; width: 100%; padding: 0; margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.license-option { position: relative; display: block; min-width: 0; cursor: pointer; }
/* The real radio stays in the page (keyboard + screen readers); the card is its visual. */
.license-input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.license-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; row-gap: 4px; height: 100%; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.license-option:hover .license-card { border-color: #5a3b77; }
.license-input:checked + .license-card { border-color: var(--purple-2); background: linear-gradient(160deg, rgba(140,47,255,.22), rgba(140,47,255,.04) 70%), var(--surface); box-shadow: 0 12px 30px rgba(140,47,255,.16); }
.license-input:focus-visible + .license-card { outline: 3px solid var(--focus); outline-offset: 3px; }
.license-name { font-weight: 800; }
.license-check { width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #4a4254; border-radius: 50%; transition: background .18s ease, border-color .18s ease; }
.license-check svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.5); transition: opacity .18s ease, transform .18s ease; }
.license-input:checked + .license-card .license-check { border-color: var(--purple-2); background: var(--purple); }
.license-input:checked + .license-card .license-check svg { opacity: 1; transform: none; }
.license-price { grid-column: 1 / -1; font-size: 26px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.license-detail { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.license-badge { position: absolute; top: 0; right: 14px; transform: translateY(-50%); padding: 3px 9px; border-radius: 999px; background: linear-gradient(135deg, #7220e5, #b565ff); color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 6px 16px rgba(140,47,255,.35); }
.purchase-note { color: var(--muted); font-size: 13px; margin: 0; }
.product-purchase { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 16px 30px; border-top: 1px solid var(--line); background: #0b0a0f; }
.purchase-summary { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 10px; }
.purchase-label { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.dialog-price { font-size: 28px; font-weight: 900; line-height: 1.15; }
.purchase-plan { color: var(--muted); font-size: 14px; }
.product-dialog-actions { display: flex; gap: 10px; }
.product-dialog-actions .button { min-width: 160px; }
.cart-dialog { width: min(560px, calc(100% - 30px)); }
.cart-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding: 13px 0; }
.cart-item img { width: 92px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; background: #09080c; }
.cart-item p { color: var(--muted); margin: 3px 0 0; font-size: 13px; }
.cart-remove { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; }
.cart-remove:hover { color: var(--danger); background: #1d1823; }
.cart-summary { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 20px; }
.cart-empty { color: var(--muted); text-align: center; padding: 36px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); padding: 4px; border-radius: 10px; margin: 0 44px 22px 0; }
.auth-tabs button { border: 0; border-radius: 8px; background: transparent; padding: 10px; color: var(--muted); cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: #2b1741; color: white; }
.auth-note { margin: 0 0 18px; padding: 10px 12px; border: 1px solid #3a2752; border-radius: 9px; background: #1a1225; font-size: 14px; }
.auth-note.success { border-color: #1f5a41; background: #0f1f18; color: var(--success); }
.stack { display: grid; gap: 17px; }
.stack label { display: grid; gap: 7px; font-size: 14px; font-weight: 700; }
.stack label small { color: var(--muted); font-weight: 400; }
input:not([type="radio"], [type="checkbox"]), select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #17141c; color: var(--text); padding: 12px 13px; }
textarea { resize: vertical; }
.form-message { min-height: 24px; margin: 0; color: var(--muted); }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
/* "Remember me" under the password, and the email-code step (code-step.js) that can follow it. */
.stack label.remember-me { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.remember-me input { width: 18px; height: 18px; accent-color: var(--purple-2); }
.remember-me small { font-weight: 400; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: .45em; text-align: center; }
.code-step-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.code-step-links .text-button { color: var(--muted); }
.code-step-links .text-button:disabled { cursor: default; opacity: .7; }
.account-dialog { width: min(520px, calc(100% - 30px)); }
.account-dialog .button { width: 100%; }
#accountName, .account-email { overflow-wrap: anywhere; }
.account-purchases h3 { margin-bottom: 10px; }
.purchase-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.purchase-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.purchase-item div { display: grid; min-width: 0; }
.purchase-item small { color: var(--muted); }
.muted-text { color: var(--muted); margin: 0; }
.admin-area { display: grid; gap: 10px; padding: 16px; border: 1px solid #3a2752; border-radius: 12px; background: #140f1c; }
.admin-area h3 { margin: 0; }
/* Apply to resell: what resellers get, then numbered steps that tick off once done. */
.resell-dialog { width: min(560px, calc(100% - 30px)); }
.resell-dialog .button { width: 100%; }
.resell-perks { display: grid; gap: 10px; margin: 0; padding: 16px 18px; list-style: none; border: 1px solid #3a2752; border-radius: 12px; background: linear-gradient(160deg, rgba(140,47,255,.14), rgba(140,47,255,.02) 70%), var(--surface); }
.resell-perks li { position: relative; padding-left: 28px; }
.resell-perks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #2b1741; }
.resell-perks li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 6px; height: 9px; border: solid var(--purple-2); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.resell-apply { display: grid; gap: 14px; }
.resell-apply h3 { margin: 4px 0 0; }
.resell-steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.resell-steps li { position: relative; display: grid; gap: 2px; min-height: 30px; padding-left: 44px; counter-increment: step; }
/* The number is decoration (the list is already ordered), so screen readers skip it where they can. */
.resell-steps li::before { content: counter(step); content: counter(step) / ""; position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #4a2f6b; border-radius: 50%; background: #1b1226; color: var(--purple-2); font-size: 14px; font-weight: 800; transition: background .3s ease, border-color .3s ease; }
.resell-steps li.is-done::before { content: "✓"; content: "✓" / ""; border-color: #1f5a41; background: #0f1f18; color: var(--success); }
.resell-steps span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.resell-account { justify-self: start; color: var(--purple-2); font-size: 14px; font-weight: 800; }
.resell-account:hover, .resell-account:focus-visible { color: var(--text); }
/* The Discord button stays in view under the scrolling steps, like the product page's buy bar. */
.resell-footer { flex: none; display: grid; gap: 8px; padding: 14px 30px 16px; border-top: 1px solid var(--line); background: #0b0a0f; }
.resell-note { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
/* Wins over element rules (a hidden file input otherwise keeps the 100% width of every input and widens the page). */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.account-note { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; margin: 12px 0 0; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px); transform: translate(-50%, 150%); opacity: 0; pointer-events: none; border: 1px solid #493466; border-radius: 10px; background: #17121f; color: white; padding: 12px 18px; transition: .25s ease; box-shadow: 0 12px 50px #000; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.update-banner { position: fixed; top: 16px; left: 50%; z-index: 101; display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 32px); transform: translateX(-50%); padding: 10px 10px 10px 18px; border: 1px solid #6d4a97; border-radius: 12px; background: #1b1028; color: var(--text); box-shadow: 0 18px 50px #000; font-weight: 600; }
/* Shown after Komerza’s checkout closes, until the payment is confirmed. It sits in the page flow under the header
   (sticky while scrolling), so it never covers the page. */
.payment-banner { position: sticky; top: calc(var(--header-h) + 10px); z-index: 25; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; width: fit-content; max-width: calc(100% - 32px); margin: 14px auto 0; padding: 9px 9px 9px 16px; border: 1px solid #5a4a1f; border-radius: 12px; background: #19150c; color: var(--text); box-shadow: 0 12px 40px rgba(0, 0, 0, .55); font-weight: 600; }
.payment-banner .banner-text { display: flex; align-items: center; gap: 10px; margin: 0; }
.payment-banner .banner-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.payment-banner .banner-close { width: 34px; height: 34px; display: grid; place-items: center; align-self: start; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.payment-banner .banner-close:hover, .payment-banner .banner-close:focus-visible { color: var(--text); border-color: #6d5a2a; }
.payment-banner .spinner { width: 16px; height: 16px; flex: none; border: 2px solid #f2c46d44; border-top-color: #f2c46d; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 761px) {
  .payment-banner { grid-template-columns: minmax(0, 1fr) auto auto; }
  .payment-banner .banner-actions { grid-column: 2; grid-row: 1; }
  .payment-banner .banner-close { grid-column: 3; grid-row: 1; align-self: center; }
}
@media (max-width: 760px) {
  .payment-banner { width: auto; margin-inline: 16px; font-size: 15px; }
}
.pending-order { flex-wrap: wrap; border-color: #5a4a1f; }
.pending-order div { flex: 1 1 180px; }
/* License keys: sold-out durations, and delivered keys in the account. */
.card-soldout { position: absolute; top: 8px; right: 8px; padding: 3px 10px; border-radius: 999px; background: rgba(110,44,57,.92); color: #fff; font-size: 12px; font-weight: 800; }
.license-option.is-sold-out { cursor: not-allowed; }
.license-option.is-sold-out .license-card { opacity: .5; }
.license-option.is-sold-out:hover .license-card { border-color: var(--line); }
.license-option.is-sold-out .license-detail { color: var(--danger); font-weight: 700; }
.cart-item.is-sold-out img { opacity: .5; }
.sold-out-text { color: var(--danger); font-weight: 700; }
.cart-note { margin: 0; color: #f2c46d; font-size: 14px; }
.purchase-item.has-key { flex-wrap: wrap; }
.purchase-item .purchase-key { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.key-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.key-value { flex: 1 1 160px; min-width: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #0b0a0e; font: 14px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.key-actions { display: flex; gap: 14px; }
.purchase-key-wait { flex: 1 1 100%; margin: 4px 0 0; color: #f2c46d; font-size: 14px; }
/* Buying without an account: the email step, and the order page's optional "set a password" offer. */
.guest-summary, .guest-alt { margin: 0; color: var(--muted); font-size: 14px; }
.guest-alt .text-button { color: var(--purple-2); font-weight: 700; }
.guest-save { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.guest-save h3 { margin: 0; font-size: 16px; }
.guest-save .form-message:empty { display: none; }
/* Discount code in the bag. */
.discount-form { display: grid; gap: 7px; }
.discount-form label { font-size: 14px; font-weight: 700; }
.discount-row { display: flex; gap: 8px; }
.discount-row input { flex: 1; min-width: 0; padding-block: 9px; text-transform: uppercase; letter-spacing: .06em; }
.discount-row input::placeholder { text-transform: none; letter-spacing: normal; }
.discount-message { margin: 0; color: var(--muted); font-size: 14px; }
.discount-message:empty { display: none; }
.discount-message.error { color: var(--danger); }
.discount-applied { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 10px 12px; border: 1px dashed #1f5a41; border-radius: 10px; color: var(--success); }
.discount-applied strong { letter-spacing: .04em; }
.cart-lines { display: grid; gap: 4px; color: var(--muted); }
.cart-line { display: flex; justify-content: space-between; }
.discount-line { color: var(--success); }
.pending-note { color: #f2c46d; font-size: 14px; font-weight: 700; }

.legal-shell { min-height: 100vh; display: flex; flex-direction: column; }
.legal-header { width: var(--wrap); margin: 0 auto; min-height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.legal-back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.legal-back:hover { color: white; }
.legal-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.legal-content { flex: 1 0 auto; width: min(780px, calc(100% - 30px)); margin: 0 auto; padding: 70px 0 100px; }
.legal-content h1 { font-size: clamp(44px, 7vw, 72px); }
.legal-content h2 { margin: 40px 0 12px; font-size: 25px; letter-spacing: -.02em; }
.legal-content p:not(.eyebrow), .legal-content li { color: var(--muted); }
.legal-content a { color: var(--purple-2); text-decoration: underline; text-underline-offset: 3px; }
.legal-content a:hover { color: var(--text); }
.legal-content li + li { margin-top: 8px; }
.legal-updated { border-left: 2px solid var(--purple); padding-left: 13px; }

/* ---------- Motion ---------- */
/* Scroll reveal: app.js adds .reveal (so without the script nothing is hidden), then .is-visible as the
   element scrolls in, with a short per-batch delay for a cascade. */
.reveal { opacity: 0; }
.reveal.is-visible { opacity: 1; animation: reveal .7s var(--ease-out) var(--reveal-delay, 0ms) backwards; }
@keyframes reveal { from { opacity: 0; transform: translateY(22px); } }

/* Moving between pages of the store (store, legal pages, reseller panel, admin) cross-fades instead of flashing white.
   The switch itself is a tiny inline <style> in each page's <head> (see PAGE_TRANSITION_STYLE in src/security.js):
   from here it could load too late, and Chrome would cancel the transition. These rules shape it. */
::view-transition-old(root) { animation: page-out .2s ease both; }
::view-transition-new(root) { animation: page-in .38s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

/* The header gains a shadow once the page scrolls under it (browsers with scroll-driven animations). */
@supports (animation-timeline: scroll()) {
  .site-header { animation: header-shade linear both; animation-timeline: scroll(); animation-range: 0 120px; }
  @keyframes header-shade { to { background: color-mix(in srgb, var(--bg) 95%, transparent); box-shadow: 0 12px 34px rgba(0,0,0,.45); } }
}

@media print {
  .reveal { opacity: 1 !important; animation: none !important; }
}

@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust > :nth-child(odd) { border-left: 0; }
  .trust > :nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 1080px) {
  .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { grid-template-columns: 1fr; justify-items: center; padding-block: 36px; }
  .footer-links { justify-self: auto; justify-content: center; }
}

@media (max-width: 900px) {
  .hero { min-height: 0; grid-template-columns: minmax(0, 1fr); padding-block: 54px; gap: 38px; }
  .hero-copy { max-width: 620px; }
  .hero-show { justify-self: start; width: 100%; }
}

@container (max-width: 820px) {
  .product-dialog-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  /* One column: photos, title, features, durations, then the info tiles. */
  .product-col { display: contents; }
  .product-gallery { order: 1; }
  .video-link { order: 2; }
  .product-summary { order: 3; }
  .product-features { order: 4; }
  .license-options { order: 5; }
  .purchase-note { order: 6; }
  .product-facts { order: 7; }
  .product-dialog:not(.preview-dialog) .dialog-body { padding-top: 62px; }
  .product-summary .eyebrow { padding-right: 0; }
}

@container (max-width: 560px) {
  .product-dialog .dialog-body { padding-inline: 20px; padding-bottom: 22px; }
  .product-dialog:not(.preview-dialog) .dialog-body { padding-top: 60px; }
  .product-purchase { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 20px 16px; }
  .purchase-summary { display: flex; align-items: baseline; gap: 10px; }
  .dialog-price { font-size: 24px; }
  .product-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .product-dialog-actions .button { min-width: 0; }
  .license-options { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .license-card { padding: 14px; }
  .license-price { font-size: 22px; }
  .gallery-thumb { flex-basis: 76px; }
}

/* Four menu links plus the account and bag buttons need about 900px; below that the menu folds into the ☰ button.
   (app.js closes an open menu when the window grows past this width.) */
@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px var(--edge) 14px; background: #0b0a0f; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(0,0,0,.45); }
  .site-header.menu-open nav { display: flex; animation: menu-in .24s var(--ease-out); }
  .site-header nav a { padding: 13px 0; color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
  .site-header nav a:last-child { border-bottom: 0; }
  .site-header nav a::after { content: none; }
  .menu-button { display: grid; }
  .header-actions { gap: 12px; }
}

@media (max-width: 620px) {
  :root { --gutter: 15px; --header-h: 66px; --section-pad: 54px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 28px; height: 28px; }
  .header-actions { gap: 10px; }
  .account-button { max-width: 96px; }
  .cart-button { padding: 8px 10px; }
  .cart-button > span:first-of-type { display: none; }
  h1 { font-size: 52px; }
  .hero { padding-top: 46px; }
  .section-heading { display: grid; align-items: start; }
  .section-heading > p { font-size: 14px; }
  .product-grid, .review-grid { grid-template-columns: minmax(0, 1fr); }
  .trust { grid-template-columns: minmax(0, 1fr); padding-block: 8px; }
  .trust > * { padding: 18px 10px; }
  .trust > * + * { border-left: 0; border-top: 1px solid var(--line); }
  .dialog-body { padding: 24px 20px; }
  .resell-footer { padding: 12px 20px 14px; }
  .admin-bar-inner p span { display: none; }
}

/* ---- Reseller dashboard: credits balance + top-up ---- */
.reseller-balance { border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; margin: 0 0 32px; background: var(--surface); }
.reseller-balance-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.reseller-balance-head h2 { margin: 0 0 6px; font-size: 20px; }
.reseller-balance-head p { margin: 0; }
.reseller-balance-amount { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.reseller-balance-amount strong { font-size: 32px; letter-spacing: -.02em; color: var(--text); }
.reseller-topup { margin: 22px 0 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.reseller-topup label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); min-width: 160px; }
.reseller-topup input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; }
.reseller-topup .form-message { flex-basis: 100%; }

/* ---- Reseller menu designer (menu-designer.js) ---- */
/* It fits the screen like an app: toolbar on top, settings panel on the left, the live menu on the right. Each column
   scrolls on its own, so the menu stays in view while any setting changes. */
.designer { margin: 36px 0 0; padding-top: 32px; border-top: 1px solid var(--line); }
.designer-head h2 { margin: 0 0 6px; font-size: 22px; }
.designer-head .muted-text { max-width: 720px; }

.dz-toolbar { position: sticky; top: 82px; z-index: 8; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; padding: 9px 10px 9px 16px; border: 1px solid #3e2a50; border-radius: 14px; background: color-mix(in srgb, var(--dialog-bg) 94%, transparent); backdrop-filter: blur(16px); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); }
.dz-product { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.dz-product select { max-width: 220px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; }
.dz-history { display: flex; gap: 4px; }
.dz-icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); cursor: pointer; transition: border-color .15s ease, opacity .15s ease; }
.dz-icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dz-icon-button:hover:not(:disabled) { border-color: var(--purple); }
.dz-icon-button:disabled { opacity: .35; cursor: default; }
.dz-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.dz-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.dz-status.is-dirty { color: #f2c46d; }
.dz-status.is-dirty::before { background: #f2c46d; }
.dz-save { display: flex; gap: 8px; }
.dz-product-note { margin: 10px 4px 0; color: var(--muted); font-size: 13px; }
.dz-toolbar select:focus-visible, .dz-panel input:focus-visible, .dz-panel button:focus-visible, .dz-seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Segmented choices: the mode switch, every widget style, and the choices inside popovers. */
.dz-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.dz-seg button { padding: 6px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s ease, color .15s ease; }
.dz-seg button:hover { color: var(--text); }
.dz-seg button[aria-checked="true"], .dz-seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--purple) 32%, var(--surface-2)); color: var(--text); }

.dz-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; height: max(560px, calc(100vh - 200px)); margin-top: 12px; }

/* The settings panel: Look (shared by every product) and Layout (this product). */
.dz-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.dz-panel-tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); }
.dz-panel-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 800; cursor: pointer; }
.dz-panel-tabs button:hover { color: var(--text); }
.dz-panel-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--purple-2); }
.dz-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--purple) 26%, transparent); color: var(--text); font-size: 11px; }
.dz-count:empty { display: none; }
.dz-panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 16px; scrollbar-width: thin; scrollbar-color: #3a3344 transparent; }
.dz-panel-body > .text-button { margin-top: 10px; color: var(--muted); font-size: 13px; }
.dz-group { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.dz-group:last-child { border-bottom: 0; }
.dz-group h3 { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dz-hint { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.dz-field { display: grid; gap: 5px; font-size: 13px; font-weight: 700; }
.dz-field em { color: var(--muted); font-style: normal; font-weight: 400; }
.dz-field input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px; font-weight: 400; }

.dz-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dz-preset { display: grid; gap: 6px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.dz-preset:hover { border-color: var(--purple); transform: translateY(-1px); }
.dz-preset-swatches { display: flex; height: 16px; overflow: hidden; border-radius: 5px; }
.dz-preset-swatches span { flex: 1; }
.dz-preset-swatches span:last-child { flex: 1.4; }
.dz-preset-name { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.dz-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dz-color { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.dz-color input { grid-row: span 2; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.dz-color code { color: var(--muted); font-size: 11px; font-weight: 400; }
.dz-color input::-webkit-color-swatch-wrapper { padding: 0; }
.dz-color input::-webkit-color-swatch { border: 0; border-radius: 6px; }

/* Fonts: each name is drawn in its own face (loaded from Google Fonts on this page only). */
.dz-font-pick { border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.dz-font-pick summary { display: flex; align-items: center; gap: 10px; padding: 9px 11px; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.dz-font-pick summary::-webkit-details-marker { display: none; }
.dz-font-pick summary b { flex: 1; overflow: hidden; color: var(--text); font-size: 16px; font-weight: 400; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.dz-font-pick summary::after { content: ''; flex: none; width: 7px; height: 7px; margin: -3px 2px 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; }
.dz-font-pick[open] summary::after { margin-top: 3px; transform: rotate(225deg); }
.dz-font-list { max-height: 250px; overflow-y: auto; padding: 2px 6px 8px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.dz-font-group { display: grid; gap: 1px; padding-top: 8px; }
.dz-font-style { padding: 0 8px 2px; color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dz-font { padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: 16px; text-align: left; cursor: pointer; }
.dz-font:hover { background: var(--surface-2); }
.dz-font[aria-pressed="true"] { background: color-mix(in srgb, var(--purple) 28%, transparent); }
.dz-size { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 10px; font-size: 13px; font-weight: 700; }
.dz-size b { color: var(--purple-2); font-variant-numeric: tabular-nums; }
.dz-size input { grid-column: 1 / -1; width: 100%; accent-color: var(--purple); }

.dz-styles { display: grid; gap: 12px; }
.dz-style-row { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.dz-style-row .dz-seg { display: flex; }
.dz-style-row .dz-seg button { flex: 1 1 0; padding: 6px 4px; font-size: 12.5px; }
/* Four or more choices (the logo's position) sit two to a row. */
.dz-style-row .dz-seg:has(> :nth-child(4)), .pop-choice .dz-seg:has(> :nth-child(4)) { display: grid; grid-template-columns: 1fr 1fr; }

/* The logo box: the current logo on a checkerboard (so transparency shows), and upload / remove. Files can be dropped
   on it too. */
.dz-logo { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); transition: border-color .15s ease, background .15s ease; }
.dz-logo.is-dropping { border-color: var(--purple-2); background: color-mix(in srgb, var(--purple) 12%, var(--bg)); }
.dz-logo-preview { flex: none; width: 64px; height: 64px; display: grid; place-items: center; padding: 4px; border-radius: 8px; background: conic-gradient(#2a2731 25%, #1d1b23 0 50%, #2a2731 0 75%, #1d1b23 0) 0 0 / 12px 12px; color: var(--muted); font-size: 10.5px; line-height: 1.2; text-align: center; }
.dz-logo-preview.is-empty { background: var(--surface-2); }
.dz-logo-preview img { max-width: 100%; max-height: 100%; }
.dz-logo-actions { display: grid; justify-items: start; gap: 4px; }
.dz-logo-actions label { cursor: pointer; }
.dz-logo-actions .text-button { padding: 2px 0; color: var(--muted); font-size: 13px; }
.dz-logo input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }

.dz-palette { display: grid; gap: 6px; min-height: 52px; margin: 0; padding: 0; list-style: none; border-radius: 9px; outline: 2px dashed transparent; outline-offset: 4px; transition: background .15s ease, outline-color .15s ease; }
.dz-palette.drop-into { background: color-mix(in srgb, var(--purple) 10%, transparent); outline-color: var(--purple); }
.dz-palette-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 13px; cursor: grab; }
.dz-palette-item:hover { border-color: var(--purple); }
.dz-palette-item.is-dragging { opacity: .45; }
.dz-palette-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-type { flex: none; min-width: 48px; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--purple) 18%, transparent); color: var(--purple-2); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.dz-needed { flex: none; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, #f2c46d 18%, transparent); color: #f2c46d; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.dz-palette-empty { padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.dz-tips { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* The canvas: a dotted board the menu window sits on, at its real size (the board scrolls if it is bigger). */
.dz-canvas { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.dz-mode-hint { margin: 0; color: var(--muted); font-size: 13px; }
.dz-canvas .form-message { min-height: 0; font-size: 13px; }
.dz-canvas .form-message:empty { display: none; }
.ig-stage { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background-color: #0a090d; background-image: radial-gradient(circle, rgba(255, 255, 255, .07) 1px, transparent 1.5px); background-size: 18px 18px; scrollbar-width: thin; }

/* The menu window. Every colour and size is a --ig-* property set from the same values the tool is sent
   (buildStyle in brand-theme.js), and each widget style is chosen by a data attribute on the window. */
.ig-window {
  position: relative; overflow: hidden;
  width: var(--ig-win-w); height: var(--ig-win-h);
  min-width: var(--ig-win-min-w); min-height: var(--ig-win-min-h);
  display: flex; flex-direction: column;
  border: var(--ig-border-window) solid var(--ig-Border); border-radius: var(--ig-round-window);
  background: var(--ig-WindowBg); color: var(--ig-Text);
  font-family: var(--ig-font); font-size: var(--ig-size); line-height: 1.25;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  user-select: none;
}
/* Anything editable: a quiet outline on hover while editing, a clear one on the selected part.
   :where() keeps this reset at zero specificity, so every component class below still wins. Without it the reset
   strips the padding and background off tabs, headers and buttons. */
:where(.ig-window [data-edit]) { position: relative; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ig-window [data-edit]::after { content: ''; position: absolute; inset: -3px; border: 1px solid transparent; border-radius: 5px; pointer-events: none; transition: border-color .15s ease; }
.ig-window[data-mode="edit"] [data-edit]:hover::after { border-color: color-mix(in srgb, #a855f7 65%, transparent); }
.ig-window .is-selected { outline: 2px solid #a855f7; outline-offset: 3px; }
.ig-window[data-mode="try"] [data-edit] { cursor: default; }
.ig-window[data-mode="try"] .ig-tab, .ig-window[data-mode="try"] .ig-hit { cursor: pointer; }

/* Title bar, drawn by the tool itself: a solid bar, an accent line under the name, or an accent gradient. */
.ig-titlebar { flex: none; display: flex; align-items: center; justify-content: var(--ig-title-align); width: 100%; height: calc(var(--ig-title-size) + 16px); padding: 0 var(--ig-pad-win-x); background: var(--ig-TitleBgActive); }
.ig-title { min-width: 0; overflow: hidden; font-family: var(--ig-title-font); font-size: var(--ig-title-size); font-weight: var(--ig-title-weight); line-height: normal; text-overflow: ellipsis; white-space: nowrap; }
.ig-window[data-title="line"] .ig-titlebar { border-bottom: 2px solid var(--ig-accent); background: var(--ig-WindowBg); }
.ig-window[data-title="gradient"] .ig-titlebar { background: linear-gradient(90deg, color-mix(in srgb, var(--ig-accent) 55%, var(--ig-TitleBgActive)), var(--ig-TitleBgActive) 75%); }

/* The reseller's logo, at its own shape: the reseller sets its height and corner rounding, its position picks the slot.
   In the title bar the bar grows to fit it; above the tabs it is never wider than the sidebar. */
.ig-logo { flex: none; display: block; height: var(--ig-logo-size); aspect-ratio: var(--logo-ratio, 1); padding: 0; }
.ig-logo img { display: block; width: 100%; height: 100%; border-radius: var(--ig-logo-round); }
.ig-window:not([data-logo="none"]) .ig-titlebar { gap: var(--ig-inner-gap); }
.ig-window[data-logo="title"] .ig-titlebar, .ig-window[data-logo="title-end"] .ig-titlebar, .ig-window[data-logo="replace"] .ig-titlebar { height: calc(max(var(--ig-title-size), var(--ig-logo-size)) + 16px); }
.ig-window[data-logo="title-end"] .ig-titlebar .ig-logo { position: absolute; top: 50%; right: var(--ig-pad-win-x); transform: translateY(-50%); }
.ig-window[data-tabs="side"] .ig-tabs .ig-logo { align-self: center; width: min(100%, calc(var(--ig-logo-size) * var(--logo-ratio, 1))); height: auto; margin-bottom: calc(var(--ig-section-gap) - 2px); }
.ig-window[data-tabs="top"] .ig-tabs .ig-logo { align-self: center; margin-right: 4px; }
/* Dragged anywhere: it floats over the menu at the spot the script works out from its anchor (left/top/size set through
   the CSSOM). While trying the menu, clicks go through it to whatever is underneath, as they do in the tool. */
.ig-window[data-logo="free"] > .ig-logo { position: absolute; z-index: 4; }
.ig-window[data-mode="edit"] .ig-logo { cursor: grab; touch-action: none; }
.ig-logo.is-moving { cursor: grabbing; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .55)); }
.ig-window[data-mode="try"][data-logo="free"] > .ig-logo { pointer-events: none; }
.ig-logo img { -webkit-user-drag: none; }
/* Snap guides while dragging: the window's padding line or centre line the logo just lined up with. */
.ig-guide { position: absolute; z-index: 5; background: #a855f7; pointer-events: none; }
.ig-guide-x { top: 0; bottom: 0; width: 1px; }
.ig-guide-y { left: 0; right: 0; height: 1px; }

.ig-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ig-window[data-tabs="side"] .ig-frame { flex-direction: row; }

/* Tabs along the top: an ImGui tab bar with its line under the tabs. */
.ig-tabs { flex: none; display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--ig-inner-gap); padding: var(--ig-pad-win-y) var(--ig-pad-win-x) 0; border-bottom: 1px solid var(--ig-TabActive); }
.ig-tab { display: inline-flex; align-items: center; gap: 6px; height: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); padding: 0 var(--ig-pad-frame-x); border: var(--ig-border-tab) solid var(--ig-Border); border-bottom: 0; border-radius: var(--ig-round-tab) var(--ig-round-tab) 0 0; background: var(--ig-Tab); color: var(--ig-Text); white-space: nowrap; }
.ig-tab:hover { background: var(--ig-TabHovered); }
.ig-tab.is-active { background: var(--ig-TabActive); }
.ig-icon { flex: none; width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Tabs down a sidebar: a child window of full-width rows, the open one marked with an accent bar. */
.ig-window[data-tabs="side"] .ig-tabs { flex-direction: column; flex-wrap: nowrap; align-items: stretch; width: var(--ig-sidebar-w); gap: 2px; padding: var(--ig-pad-win-y) 8px; overflow-y: auto; border-bottom: 0; border-right: var(--ig-border-child) solid var(--ig-Border); background: var(--ig-ChildBg); scrollbar-width: none; }
.ig-window[data-tabs="side"] .ig-tab { height: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2 + 10px); padding: 0 10px; border: 0; border-radius: var(--ig-round-tab); background: transparent; }
.ig-window[data-tabs="side"] .ig-tab span { overflow: hidden; text-overflow: ellipsis; }
.ig-window[data-tabs="side"] .ig-tab:hover { background: var(--ig-TabHovered); }
.ig-window[data-tabs="side"] .ig-tab.is-active { background: var(--ig-TabActive); box-shadow: inset 3px 0 0 var(--ig-accent); }
.ig-tab-add { align-self: center; padding: 2px 9px; border: 1px dashed color-mix(in srgb, var(--ig-Text) 28%, transparent); border-radius: var(--ig-round-tab); background: transparent; color: var(--ig-TextDisabled); font: inherit; cursor: pointer; }
.ig-tab-add:hover { border-color: var(--ig-accent); color: var(--ig-Text); }
.ig-window[data-tabs="top"] .ig-tab-add { margin-bottom: 3px; }
.ig-window[data-tabs="side"] .ig-tab-add { align-self: stretch; margin-top: 4px; padding: 4px; }
.ig-window[data-mode="try"] .ig-tab-add { display: none; }

/* The settings area scrolls on its own, beside its own scrollbar. */
.ig-content { flex: 1; min-width: 0; min-height: 0; display: flex; }
.ig-body { flex: 1; min-width: 0; overflow-y: auto; padding: var(--ig-pad-win-y) var(--ig-pad-win-x); scrollbar-width: none; }
.ig-body::-webkit-scrollbar { display: none; }
.ig-scroll { flex: none; width: var(--ig-scrollbar); background: var(--ig-ScrollbarBg); }
.ig-scroll-grab { position: absolute; top: calc(2px + var(--top, 0) * (100% - 4px)); left: 2px; right: 2px; height: calc(var(--size, 1) * (100% - 4px)); border-radius: var(--ig-round-scroll); background: var(--ig-ScrollbarGrab); }
.ig-scroll:hover .ig-scroll-grab { background: var(--ig-ScrollbarGrabHovered); }
.ig-scroll.is-idle { opacity: .35; }
.ig-window[data-mode="try"] .ig-scroll.is-idle { display: none; }
.ig-foot { flex: none; margin: 0; padding: 4px var(--ig-pad-win-x) 6px; overflow: hidden; color: var(--ig-TextDisabled); text-overflow: ellipsis; white-space: nowrap; }

/* Sections: full width, or half width so two share a row (in the tool, two child windows on one line). */
.ig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ig-section-gap); align-items: start; }
.ig-section { position: relative; grid-column: 1 / -1; min-width: 0; }
.ig-section[data-span="half"] { grid-column: auto; }
.ig-window[data-sections="boxed"] .ig-section { padding: var(--ig-pad-win-y) var(--ig-pad-win-x); border: var(--ig-border-child) solid var(--ig-Border); border-radius: var(--ig-round-child); background: var(--ig-ChildBg); }
/* Boxed: the title with a line after it (ImGui's SeparatorText). Header: a bar. Plain: dimmed text only. */
.ig-section-title { display: flex; align-items: center; gap: var(--ig-inner-gap); width: 100%; margin-bottom: var(--ig-row-gap); color: var(--ig-Text); white-space: nowrap; }
.ig-section-title::before { content: ''; order: 2; flex: 1; min-width: 12px; height: 1px; background: var(--ig-Separator); }
.ig-window[data-sections="header"] .ig-section-title { height: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); padding: 0 var(--ig-pad-frame-x); border-radius: var(--ig-round-frame); background: var(--ig-Header); }
.ig-window[data-sections="plain"] .ig-section-title { color: var(--ig-TextDisabled); }
.ig-window[data-sections="header"] .ig-section-title::before, .ig-window[data-sections="plain"] .ig-section-title::before { content: none; }
/* Under a header bar or a plain title the settings are indented (ImGui::Indent); a box has its own padding instead. */
.ig-window[data-sections="header"] .ig-items, .ig-window[data-sections="plain"] .ig-items { padding-left: var(--ig-indent); }
.ig-section-title.is-empty { color: var(--ig-TextDisabled); font-style: italic; opacity: .55; }
.ig-window[data-mode="try"] .ig-section-title.is-empty { display: none; }
.ig-add-section { display: block; width: 100%; margin-top: var(--ig-section-gap); padding: 8px; border: 1px dashed color-mix(in srgb, var(--ig-Text) 24%, transparent); border-radius: var(--ig-round-child); background: transparent; color: var(--ig-TextDisabled); font: inherit; cursor: pointer; }
.ig-add-section:hover { border-color: var(--ig-accent); color: var(--ig-Text); }
.ig-window[data-mode="try"] .ig-add-section { display: none; }

/* Settings inside a section: 1–3 columns (a table in the tool), widget first and label to its right. */
.ig-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ig-row-gap) 8px; min-height: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); border-radius: 6px; }
.ig-items[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ig-items[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ig-items.drop-into { outline: 2px dashed #a855f7; outline-offset: 3px; }
.ig-drop-hint { grid-column: 1 / -1; margin: 0; padding: 8px; border: 1px dashed color-mix(in srgb, var(--ig-Text) 24%, transparent); border-radius: 6px; color: var(--ig-TextDisabled); text-align: center; }
.ig-window[data-mode="try"] .ig-drop-hint { visibility: hidden; }
.ig-empty { margin: 0; padding: 20px; color: var(--ig-TextDisabled); text-align: center; }
.ig-item { position: relative; display: flex; align-items: center; min-width: 0; }
.ig-window[data-mode="edit"] .ig-item, .ig-window[data-mode="edit"] .ig-hit { cursor: grab; }
.ig-item.is-dragging { opacity: .35; }
.ig-hit { flex: 1; display: flex; align-items: center; gap: var(--ig-inner-gap); min-width: 0; }
.ig-label { min-width: 0; overflow: hidden; color: var(--ig-Text); text-overflow: ellipsis; white-space: nowrap; }
.ig-item.drop-before::before, .ig-item.drop-after::before { content: ''; position: absolute; z-index: 1; border-radius: 2px; background: #a855f7; pointer-events: none; }
.ig-items[data-cols="1"] > .drop-before::before { top: calc(var(--ig-row-gap) / -2 - 1px); left: 0; right: 0; height: 2px; }
.ig-items[data-cols="1"] > .drop-after::before { bottom: calc(var(--ig-row-gap) / -2 - 1px); left: 0; right: 0; height: 2px; }
.ig-items:not([data-cols="1"]) > .drop-before::before { top: 0; bottom: 0; left: -5px; width: 2px; }
.ig-items:not([data-cols="1"]) > .drop-after::before { top: 0; bottom: 0; right: -5px; width: 2px; }
.ig-tab.drop-into { outline: 2px solid #a855f7; outline-offset: 2px; }
.ig-remove { position: absolute; top: 50%; right: -4px; z-index: 2; width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ig-WindowBg); color: var(--ig-TextDisabled); cursor: pointer; opacity: 0; transform: translateY(-50%); transition: opacity .15s ease; }
.ig-remove::before { content: '×'; font: 16px/1 ui-sans-serif, system-ui, sans-serif; }
.ig-item:hover .ig-remove, .ig-item.is-selected .ig-remove { opacity: 1; }
.ig-remove:hover { background: color-mix(in srgb, var(--ig-Text) 16%, var(--ig-WindowBg)); color: var(--ig-Text); }
.ig-needed { flex: none; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--ig-CheckMark) 22%, transparent); color: var(--ig-Text); font: 800 9px/1.5 ui-sans-serif, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.ig-window[data-mode="try"] .ig-remove, .ig-window[data-mode="try"] .ig-needed { display: none; }

/* On/off: a checkbox with one of three marks, or a toggle switch. Every variant is in the markup; the window's
   data-check and data-mark pick the one that shows. */
.ig-check { position: relative; flex: none; display: grid; place-items: center; width: var(--ig-check); height: var(--ig-check); border: var(--ig-border-frame) solid var(--ig-Border); border-radius: var(--ig-round-frame); background: var(--ig-FrameBg); transition: background .15s ease; }
.ig-check > * { grid-area: 1 / 1; }
.ig-hit:hover .ig-check { background: var(--ig-FrameBgHovered); }
.ig-mark { opacity: 0; }
.ig-mark-check { width: 72%; height: 72%; fill: none; stroke: var(--ig-CheckMark); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ig-mark-fill { width: 56%; height: 56%; border-radius: calc(var(--ig-round-frame) * .6); background: var(--ig-CheckMark); }
.ig-mark-dot { width: 46%; height: 46%; border-radius: 50%; background: var(--ig-CheckMark); }
.ig-window[data-mark="check"] .ig-check.is-on .ig-mark-check,
.ig-window[data-mark="fill"] .ig-check.is-on .ig-mark-fill,
.ig-window[data-mark="dot"] .ig-check.is-on .ig-mark-dot { opacity: 1; }
.ig-knob { display: none; }
.ig-window[data-check="switch"] .ig-check { width: calc(var(--ig-check) * 1.8); border-radius: 999px; }
.ig-window[data-check="switch"] .ig-check.is-on { border-color: transparent; background: var(--ig-CheckMark); }
.ig-window[data-check="switch"] .ig-mark { display: none; }
.ig-window[data-check="switch"] .ig-knob { display: block; justify-self: start; width: calc(var(--ig-check) - 6px); height: calc(var(--ig-check) - 6px); margin-left: calc(3px - var(--ig-border-frame)); border-radius: 50%; background: var(--ig-Text); transition: transform .15s ease; }
.ig-window[data-check="switch"] .ig-check.is-on .ig-knob { transform: translateX(calc(var(--ig-check) * .8)); }

/* Sliders: a filled bar with a grab and the value inside, or a thin line with a round knob and the value beside it.
   --pos (0–1) is set per slider through the CSSOM. A control is the reseller's control width, but never more than
   half its column, so the label beside it keeps the other half (the tool does the same with SetNextItemWidth). */
.ig-slider { position: relative; flex: 0 0 min(var(--ig-control-w), 50%); height: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); overflow: hidden; border: var(--ig-border-frame) solid var(--ig-Border); border-radius: var(--ig-round-frame); background: var(--ig-FrameBg); }
.ig-hit:hover .ig-slider { background: var(--ig-FrameBgHovered); }
.ig-track { position: absolute; inset: 0; }
.ig-fill { position: absolute; top: 0; bottom: 0; left: 0; width: calc(2px + var(--pos, 0) * (100% - var(--ig-grab-min) - 4px) + var(--ig-grab-min) / 2); background: color-mix(in srgb, var(--ig-SliderGrab) 40%, transparent); }
.ig-grab { position: absolute; top: 2px; bottom: 2px; left: calc(2px + var(--pos, 0) * (100% - var(--ig-grab-min) - 4px)); width: var(--ig-grab-min); border-radius: var(--ig-round-grab); background: var(--ig-SliderGrab); }
.ig-val { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ig-Text); font-variant-numeric: tabular-nums; pointer-events: none; }
.ig-window[data-slider="thin"] .ig-slider { --knob: max(var(--ig-grab-min), 10px); overflow: visible; border-color: transparent; background: transparent; }
.ig-window[data-slider="thin"] .ig-track { inset: auto; top: 50%; left: calc(var(--knob) / 2); right: calc(3.4em + var(--knob) / 2); height: 4px; margin-top: -2px; border-radius: 2px; background: var(--ig-FrameBg); }
.ig-window[data-slider="thin"] .ig-fill { width: calc(var(--pos, 0) * 100%); border-radius: inherit; background: var(--ig-SliderGrab); }
.ig-window[data-slider="thin"] .ig-grab { top: 50%; bottom: auto; left: calc(var(--pos, 0) * (100% - 3.4em - var(--knob))); width: var(--knob); height: var(--knob); margin-top: calc(var(--knob) / -2); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ig-SliderGrab) 22%, transparent); }
.ig-window[data-slider="thin"] .ig-val { left: auto; width: 3em; justify-items: end; }

/* Dropdowns, inputs, colour swatches and buttons share the frame look. */
.ig-combo, .ig-input { flex: 0 0 min(var(--ig-control-w), 50%); display: flex; align-items: center; min-width: 0; height: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); overflow: hidden; border: var(--ig-border-frame) solid var(--ig-Border); border-radius: var(--ig-round-frame); background: var(--ig-FrameBg); white-space: nowrap; }
.ig-hit:hover .ig-combo, .ig-hit:hover .ig-input { background: var(--ig-FrameBgHovered); }
.ig-combo-text { flex: 1; min-width: 0; overflow: hidden; padding: 0 var(--ig-pad-frame-x); text-overflow: ellipsis; }
.ig-combo svg { flex: none; width: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); height: 100%; padding: 0 calc((var(--ig-size) + var(--ig-pad-frame-y) * 2) * .25); background: var(--ig-Button); fill: none; stroke: var(--ig-Text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ig-input { padding: 0 var(--ig-pad-frame-x); color: var(--ig-Text); }
.ig-swatch { flex: none; width: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); height: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); border: var(--ig-border-frame) solid var(--ig-Border); border-radius: var(--ig-round-frame); background: var(--ig-accent); }
.ig-button { display: inline-flex; align-items: center; justify-content: var(--ig-button-align); width: var(--ig-button-w); max-width: 100%; min-width: 0; height: calc(var(--ig-size) + var(--ig-pad-frame-y) * 2); padding: 0 var(--ig-pad-frame-x); overflow: hidden; border: var(--ig-border-frame) solid var(--ig-Border); border-radius: var(--ig-round-frame); background: var(--ig-Button); color: var(--ig-Text); white-space: nowrap; transition: background .12s ease; }
.ig-hit:hover .ig-button { background: var(--ig-ButtonHovered); }
.ig-button.is-pressed { background: var(--ig-ButtonActive); }

/* The resize grip, like the one on a real ImGui window. */
.ig-resize { position: absolute; right: 0; bottom: 0; z-index: 6; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }
.ig-resize::before { content: ''; position: absolute; right: 3px; bottom: 3px; border-left: 11px solid transparent; border-bottom: 11px solid var(--ig-ResizeGrip); }
.ig-resize:hover::before { border-bottom-color: var(--ig-ResizeGripHovered); }
.ig-window[data-mode="try"] .ig-resize { pointer-events: none; }

/* The popover: one panel, refilled for whichever part was clicked, placed beside the window by the script. */
.ig-popover { position: absolute; top: 0; left: 0; z-index: 5; width: 300px; max-height: min(620px, calc(100% - 16px)); overflow-y: auto; padding: 14px 16px 16px; border: 1px solid #3e2a50; border-radius: 14px; background: var(--dialog-bg); box-shadow: 0 22px 60px rgba(0, 0, 0, .6); scrollbar-width: thin; }
.ig-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ig-popover-head h3 { margin: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.ig-popover-close { flex: none; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.ig-popover-close::before { content: '×'; font-size: 20px; line-height: 1; }
.ig-popover-close:hover { background: color-mix(in srgb, var(--purple) 18%, transparent); color: var(--text); }
.ig-popover-hint { margin: 3px 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ig-popover-hint:empty { display: none; }
.ig-popover-body { display: grid; gap: 13px; }
.pop-heading { display: grid; gap: 2px; margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.pop-heading small { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.pop-range { display: grid; gap: 5px; font-size: 13px; }
.pop-range > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.pop-range b { color: var(--purple-2); font-variant-numeric: tabular-nums; }
.pop-shared { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.pop-range input { width: 100%; accent-color: var(--purple); }
.pop-rename { display: grid; gap: 5px; font-size: 13px; }
.pop-rename > span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-weight: 700; }
.pop-rename .text-button { padding: 0; color: var(--purple-2); font-size: 12px; }
.pop-rename input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); font-size: 13px; }
.pop-rename input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.pop-rename small { color: var(--muted); font-size: 11.5px; }
.pop-choice { display: grid; gap: 6px; font-size: 13px; }
.pop-choice .dz-seg { display: flex; }
.pop-choice .dz-seg button { flex: 1 1 0; padding: 5px 6px; font-size: 12.5px; }
/* The logo's anchor: a 3 × 3 grid of arrows, one per corner, edge and the centre. */
.pop-choice .dz-seg[data-key="logoAnchor"] { display: grid; grid-template-columns: repeat(3, 36px); width: max-content; }
.pop-choice .dz-seg[data-key="logoAnchor"] button { padding: 4px 0; font-size: 15px; line-height: 1.2; }
.pop-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pop-note b { color: var(--text); font-weight: 700; }
.pop-color { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; font-size: 13px; opacity: .7; transition: opacity .2s ease; }
.pop-color.is-set { opacity: 1; }
.pop-color.is-set span { font-weight: 700; }
.pop-color input { width: 30px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.pop-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pop-wide { width: 100%; justify-content: center; }
.pop-danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.pop-icons-wrap { display: grid; gap: 6px; font-size: 13px; }
.pop-icons { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.pop-icon { display: grid; place-items: center; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); font-size: 9.5px; cursor: pointer; }
.pop-icon svg { width: 16px; height: 16px; }
.pop-icon:hover { border-color: var(--purple); }
.pop-icon[aria-pressed="true"] { border-color: var(--purple-2); background: color-mix(in srgb, var(--purple) 28%, transparent); }

@media (max-width: 1100px) {
  .dz-layout { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  /* Stacked: the menu first, the settings under it. */
  .dz-toolbar { position: static; }
  .dz-status { margin-left: 0; }
  .dz-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  .dz-canvas { order: -1; }
  .ig-stage { flex: none; padding: 14px; }
  .dz-panel { max-height: 75vh; }
}

/* ---- Reseller panel, Type 2: key format, bought recently, your keys and the tools, web menus ---- */
/* Rebranded resellers: which kind of keys to buy (branded / store), one kind per order. */
.buy-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 2px; }
.buy-mode-option { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.buy-mode-option small { color: var(--muted); font-size: 12.5px; }
.buy-mode-option.is-active { border-color: var(--purple); background: color-mix(in srgb, var(--purple) 14%, var(--surface)); box-shadow: 0 0 0 1px var(--purple) inset; }
/* Plain resellers: the step up to Rebranded. */
.upgrade-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 18px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--purple) 45%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--purple) 8%, var(--surface)); }
.upgrade-box h2 { margin: 0 0 4px; font-size: 18px; }
.upgrade-box .muted-text { margin: 0; max-width: 640px; }
.upgrade-action { display: grid; justify-items: end; gap: 6px; }
.upgrade-action .form-message:empty { display: none; }
.key-format-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border: 1px solid #3e2a50; border-radius: 12px; background: color-mix(in srgb, var(--purple) 8%, transparent); font-size: 14px; }
.key-format-bar .eyebrow { margin: 0; }
.key-format-sample { padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--purple-2); font-size: 13px; }
.key-format-sample:empty { display: none; }
.key-format-bar .text-button { margin-left: auto; color: var(--purple-2); font-weight: 700; }

.format-dialog { width: min(640px, calc(100% - 30px)); }
.format-grid { display: grid; gap: 14px; }
.format-choice { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.format-choice legend { padding: 0 0 6px; font-size: 14px; font-weight: 700; }
.format-option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.format-option:has(input:checked) { border-color: var(--purple); background: color-mix(in srgb, var(--purple) 10%, transparent); }
.format-option span { display: grid; }
.format-option small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.format-field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.format-field input, .format-field select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
.format-field small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.format-field.is-off { display: none; }
.format-check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
/* The dialog form is a .stack, whose "label { display: grid }" would otherwise win and put each box on its own line. */
.format-dialog .format-option { display: flex; }
.format-dialog .format-check { display: flex; }
.format-dialog .format-option input, .format-dialog .format-check input { width: auto; flex: none; margin: 0; }
.format-preview { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.format-preview .eyebrow { margin: 0; }
.format-preview ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.format-preview code { font-size: 15px; color: var(--text); }
.format-preview-error { color: var(--danger); font-size: 14px; }
.format-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.format-actions .form-message { margin: 0; }

.recent-keys { margin: 0 0 28px; padding: 20px 24px; border: 1px solid color-mix(in srgb, var(--success) 45%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--success) 6%, var(--surface)); }
.recent-keys-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.recent-keys-head h2 { margin: 0 0 4px; font-size: 19px; }
.recent-keys-head .eyebrow { margin: 0 0 4px; color: var(--success); }
.recent-keys-actions { display: flex; gap: 8px; }

.your-keys { display: grid; gap: 12px; margin-bottom: 28px; }
.your-keys h2 { margin: 0; font-size: 19px; }
.your-keys > .muted-text { margin-top: -6px; }
.key-tools { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.key-tools-input input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: 15px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.key-tools-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.key-tools-time { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.key-tools-time input, .key-tools-time select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); font: inherit; }
.key-tools-time input { width: 84px; margin-left: 6px; }
.key-tools .form-message { margin: 0; }
.key-tools .form-message:empty { display: none; }
.key-result { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; }
.key-result.is-good { border-color: color-mix(in srgb, var(--success) 50%, transparent); }
.key-result.is-warn { border-color: color-mix(in srgb, #f2c46d 60%, transparent); }
.key-result p { margin: 0; }
.key-result-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.key-result-head code { font-size: 15px; color: var(--purple-2); }
.key-result-head span { color: var(--muted); }
.key-states { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.key-state b { color: var(--muted); font-weight: 700; margin-right: 4px; }
.key-list-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.key-search { flex: 1 1 220px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; }
.key-list-bar select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; }
.key-list-count { color: var(--muted); font-size: 13px; margin-left: auto; }
.key-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.key-row-text { grid-row: 1; overflow-wrap: anywhere; font-size: 14px; color: var(--text); }
.key-row-meta { grid-row: 2; color: var(--muted); font-size: 12.5px; }
.key-row-actions { grid-row: 1 / span 2; display: flex; gap: 10px; }
.key-row-actions .text-button { color: var(--purple-2); font-size: 13px; font-weight: 700; padding: 2px 0; }
.key-row.is-deleted .key-row-text { text-decoration: line-through; color: var(--muted); }
.key-row-empty { color: var(--muted); font-size: 14px; }
.key-list-pages { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.key-list-pages:empty { display: none; }

.web-menus { display: grid; gap: 12px; margin: 36px 0 28px; padding-top: 32px; border-top: 1px solid var(--line); }
.web-menus h2 { margin: 0; font-size: 19px; }
.web-menus > .muted-text { margin-top: -6px; max-width: 760px; }
.web-menu-card { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.web-menu-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.web-menu-head h3 { margin: 0; font-size: 17px; }
.web-menu-card .muted-text { margin: 0; font-size: 14px; }
.web-menu-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.web-menu-files { margin: 0; color: var(--muted); font-size: 13px; }
.web-menu-card .form-message { margin: 0; }
.web-menu-card .form-message:empty { display: none; }
.web-menu-draft { display: grid; gap: 10px; padding: 14px; border: 1px dashed #3e2a50; border-radius: 12px; }
.web-menu-draft p { margin: 0; font-size: 14px; }
.web-menu-preview { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 10px; background: #0a090d; }
/* Full screen preview: the browser's own (:fullscreen), or filling the window where that isn't available. */
.web-menu-preview-wrap { display: grid; }
.web-menu-exit-full { display: none; }
.web-menu-preview-wrap:fullscreen, .web-menu-preview-wrap.is-maximized { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--bg); }
.web-menu-preview-wrap.is-maximized { position: fixed; inset: 0; z-index: 1000; }
.web-menu-preview-wrap:fullscreen .web-menu-preview, .web-menu-preview-wrap.is-maximized .web-menu-preview { flex: 1 1 auto; height: auto; min-height: 0; }
.web-menu-preview-wrap:fullscreen .web-menu-exit-full, .web-menu-preview-wrap.is-maximized .web-menu-exit-full { display: inline-flex; align-self: flex-end; }
body.has-maximized { overflow: hidden; }
.upload-button { cursor: pointer; }

@media (max-width: 720px) {
  .key-row { grid-template-columns: 1fr; }
  .key-row-actions { grid-row: 3; }
  .web-menu-preview { height: 420px; }
}

.buy-notice { margin: 0 0 12px; padding: 12px 16px; border: 1px solid color-mix(in srgb, #f2c46d 60%, transparent); border-radius: 12px; background: color-mix(in srgb, #f2c46d 8%, transparent); color: #f6dca4; font-size: 14px; }

/* ---- Reseller panel: collapsible buy cards, recent cards with images ---- */
details.buy-card { display: block; }
details.buy-card > summary { list-style: none; cursor: pointer; }
details.buy-card > summary::-webkit-details-marker { display: none; }
details.buy-card > summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-left: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .18s ease; }
details.buy-card[open] > summary::after { transform: rotate(-135deg); }
details.buy-card[open] { border-color: color-mix(in srgb, var(--purple) 45%, var(--line)); }
details.buy-card .buy-plans { margin-top: 14px; }
.buy-card-head-text h3 { margin: 0; }
.buy-card-side { display: grid; justify-items: end; gap: 3px; margin-left: auto; text-align: right; }
.buy-card-from { color: var(--muted); font-size: 13px; white-space: nowrap; }
.buy-card-from strong { color: var(--text); font-size: 16px; }
.buy-card-picked { color: var(--success); font-size: 12.5px; font-weight: 800; }
.buy-card-picked:empty { display: none; }
.recent-card summary .buy-card-image { width: 40px; height: 40px; border-radius: 8px; }
.recent-card-text { display: grid; gap: 2px; min-width: 0; }
.recent-card-text small { color: var(--muted); font-size: 12.5px; }
.recent-card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 10px; }
.recent-more { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px 12px; }
.recent-more small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 520px) { .buy-card-side { display: none; } }

/* ---- Reseller panel: "Bought recently" cards per product ---- */
.recent-card { list-style: none; margin: 0; padding: 0; }
.recent-card + .recent-card { margin-top: 8px; }
.recent-card details { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.recent-card details[open] { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); }
.recent-card summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.recent-card summary::-webkit-details-marker { display: none; }
.recent-card summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .18s ease; margin-left: auto; }
.recent-card details[open] summary::after { transform: rotate(-135deg); }
.recent-card summary strong { font-size: 15px; }
.recent-card summary > span:not(:first-child) { color: var(--muted); font-size: 13.5px; }
.recent-card .is-nested { padding: 0 12px 12px; gap: 6px; }

/* ---- Reseller panel: a card per product with its durations beside it ---- */
.buy-card { display: grid; gap: 14px; margin: 0 0 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.buy-card.is-off { opacity: .65; }
.buy-card-head { display: flex; gap: 14px; align-items: center; }
.buy-card-image { width: 56px; height: 56px; flex: none; border-radius: 10px; object-fit: cover; background: var(--bg); }
.buy-card-image.is-placeholder { background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 25%, var(--bg)), var(--bg)); }
.buy-card-head-text { display: grid; gap: 4px; min-width: 0; }
.buy-card-head-text h3 { margin: 0; font-size: 16px; }
.buy-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.buy-card-badge { padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--purple) 15%, transparent); color: var(--purple-2); font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.buy-card-badge.is-accent { background: color-mix(in srgb, var(--success) 20%, transparent); color: var(--success); }
.buy-card-badge.is-warn { background: color-mix(in srgb, #f2c46d 20%, transparent); color: #f6dca4; }
.buy-card-badge.is-muted { background: color-mix(in srgb, var(--muted) 20%, transparent); color: var(--muted); }
.buy-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.buy-plan { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.buy-plan.is-off { opacity: .55; }
.buy-plan-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.buy-plan-price { display: flex; align-items: baseline; gap: 8px; }
.buy-plan-price strong { font-size: 20px; }
.buy-plan-original { color: var(--muted); font-size: 12px; text-decoration: line-through; }
.buy-plan-stock { color: var(--muted); font-size: 12.5px; }
.buy-plan-qty input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: 15px/1 inherit; text-align: center; }
.buy-plan-qty input:disabled { cursor: not-allowed; }
.buy-plan-total { color: var(--text); font-size: 13px; text-align: right; font-weight: 700; }
.buy-plan-total:empty, .buy-plan-total:is(:not([data-line-total])) { display: none; }
@media (max-width: 520px) { .buy-card-head { align-items: flex-start; } .buy-plans { grid-template-columns: 1fr; } }

/* ---- Panel, round 2: pots per product, the locked key pattern, menu send state, the Discord box ---- */
.credit-pots { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.credit-pots li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 14px; }
.credit-pots small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.key-format-lock { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--purple) 18%, transparent); color: var(--purple-2); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.web-menu-sent { margin: 0; font-size: 13.5px; }
.web-menu-sent.is-ok { color: var(--success); }
.web-menu-sent.is-off { color: #f2c46d; }
.web-menu-sent .text-button { color: var(--purple-2); font-weight: 700; }
.discord-notice h2 { font-size: clamp(24px, 3vw, 30px); }
.discord-notice .button { justify-self: start; }
/* Komerza’s checkout (its Embed) in a frame over the page, the size Komerza’s own script gives it (500px wide, 90% of the
   screen high), full screen on phones. Komerza draws everything inside; the page shows a loading line until it says it’s
   ready, and a close button only until then (its own checkout has one). */
.kmz-checkout { position: fixed; inset: 0; width: min(90vw, 500px); height: min(90dvh, 950px); max-width: none; max-height: none; margin: auto; padding: 0;
  border: 0; border-radius: 12px; background: #1f2937; color: #f5f5f5; overflow: hidden; box-shadow: 0 30px 90px rgba(0, 0, 0, .7); animation: kmz-in .2s ease both; }
.kmz-checkout::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.kmz-frame { display: block; width: 100%; height: 100%; border: 0; }
.kmz-frame[hidden], .kmz-loading[hidden] { display: none; }
.kmz-loading { display: grid; place-content: center; justify-items: center; gap: 14px; height: 100%; padding: 32px; text-align: center; color: #d1d5db; }
.kmz-loading p { max-width: 34ch; margin: 0; }
.kmz-loading .spinner { width: 26px; height: 26px; border: 3px solid #4b556366; border-top-color: #93c5fd; border-radius: 50%; animation: spin .8s linear infinite; }
.kmz-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #374151;
  border-radius: 8px; background: transparent; color: #d1d5db; cursor: pointer; }
.kmz-close:hover { color: #fff; border-color: #6b7280; }
.kmz-close:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.kmz-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.kmz-checkout.is-ready .kmz-close { display: none; }
@keyframes kmz-in { from { opacity: 0; transform: scale(.98); } }
@media (prefers-reduced-motion: reduce) { .kmz-checkout { animation: none; } }
@media (max-width: 560px) { .kmz-checkout { width: 100vw; height: 100dvh; border-radius: 0; } }

/* ---- Resell landing page (/resell.html) ---- */
/* Same vocabulary as the storefront: a two-column hero, the trust strip, gradient cards and the rise-in animation. */
.resell-shell { min-height: 100vh; display: flex; flex-direction: column; }
.resell-shell main { flex: 1 0 auto; }
.resell-header { min-height: var(--header-h); display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.resell-header .legal-back { margin-left: auto; }
.resell-badge { padding: 4px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--purple) 55%, transparent); background: color-mix(in srgb, var(--purple) 16%, transparent); color: var(--purple-2); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.resell-hero { min-height: 460px; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: clamp(36px, 5vw, 76px); padding-block: 56px 64px; }
.resell-hero-copy { max-width: 560px; }
.resell-hero-copy > * { animation: rise .7s var(--ease-out) backwards; }
.resell-hero-copy > :nth-child(2) { animation-delay: .07s; }
.resell-hero-copy > :nth-child(3) { animation-delay: .14s; }
.resell-hero-copy > :nth-child(4) { animation-delay: .21s; }
.resell-hero-copy > :nth-child(5) { animation-delay: .28s; }
.resell-hero h1 { font-size: clamp(42px, 5.4vw, 70px); line-height: 1.04; margin: 0 0 18px; letter-spacing: -.025em; }
.resell-lead { font-size: clamp(16px, 1.15vw, 19px); color: var(--muted); margin: 0 0 30px; max-width: 480px; }
.resell-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.resell-cta-button { font-size: 16px; padding: 15px 30px; }
.resell-cta-note { margin: 0; color: var(--muted); font-size: 14px; max-width: 420px; }
.resell-cta .form-message { min-height: 0; font-size: 14px; max-width: 440px; }

/* Hero visual: a preview of the credits panel the reseller gets. */
.resell-hero-visual { justify-self: end; width: min(100%, 520px); }
.credits-card { border: 1px solid #3e2a50; border-radius: var(--radius); background: linear-gradient(180deg, #141019, #0c0b10); padding: 26px 26px 20px; box-shadow: 0 24px 70px rgba(92, 22, 155, .16); animation: rise .8s var(--ease-out) .18s backwards; }
.credits-card-top { display: flex; flex-direction: column; gap: 6px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.credits-card-top .eyebrow { margin: 0; }
.credits-amount { font-size: 44px; letter-spacing: -.03em; line-height: 1; }
.credits-rows { list-style: none; margin: 0; padding: 16px 0 6px; display: grid; gap: 2px; }
.credits-rows li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; }
.credits-rows li + li { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.credits-in, .credits-out { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; font-weight: 800; font-size: 13px; }
.credits-in { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.credits-out { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.credits-what { color: var(--muted); min-width: 0; }
.credits-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.credits-plus { color: var(--success); }
.credits-foot { margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.resell-section { padding-block: var(--section-pad); border-top: 1px solid var(--line); }
.resell-section h2 { font-size: clamp(28px, 3.2vw, 42px); margin: 0; letter-spacing: -.025em; }

/* The margin example: retail → your price → what you keep. */
.margin-board { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 14px; }
.margin-step { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; background: linear-gradient(180deg, #111015, #0c0b0f); }
.margin-keep { border-color: color-mix(in srgb, var(--success) 42%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--success) 7%, #111015), #0c0b0f); }
.margin-label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.margin-value { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.03em; line-height: 1; }
.margin-you { color: var(--purple-2); }
.margin-keep .margin-value { color: var(--success); }
.margin-step small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.margin-arrow { align-self: center; width: 26px; height: 26px; fill: none; stroke: var(--purple-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.margin-note { margin: 20px 0 0; color: var(--muted); font-size: 14px; max-width: 760px; }

.resell-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.resell-journey li { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; background: linear-gradient(180deg, #111015, #0c0b0f); transition: transform .3s var(--ease-out), border-color .3s ease, box-shadow .3s ease; }
.resell-journey li:hover { transform: translateY(-4px); border-color: #3e2a50; box-shadow: 0 20px 50px rgba(92, 22, 155, .13); }
.journey-step { color: var(--purple-2); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.journey-icon { width: 28px; height: 28px; fill: none; stroke: var(--purple-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.resell-journey h3 { font-size: 18px; margin: 2px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.resell-journey p { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.55; }
.resell-pill { padding: 2px 9px; border: 1px solid color-mix(in srgb, var(--purple) 55%, transparent); color: var(--purple-2); border-radius: 999px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }

.resell-faq { display: grid; gap: 10px; max-width: 900px; }
.resell-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .25s ease; }
.resell-faq details[open] { border-color: #3e2a50; }
.resell-faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.resell-faq summary::-webkit-details-marker { display: none; }
.resell-faq summary::after { content: ''; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--purple-2); border-bottom: 2px solid var(--purple-2); transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--ease-out); }
.resell-faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.resell-faq p { margin: 0; padding: 0 22px 20px; color: var(--muted); line-height: 1.6; }

.resell-final { padding-block: var(--section-pad); border-top: 1px solid var(--line); text-align: center; }
.resell-final-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.resell-final h2 { font-size: clamp(30px, 3.6vw, 46px); margin: 0 0 6px; letter-spacing: -.025em; }
.resell-final-text { color: var(--muted); margin: 0 0 18px; }

@media (max-width: 1000px) {
  .resell-hero { grid-template-columns: minmax(0, 1fr); padding-block: 44px 46px; }
  .resell-hero-visual { justify-self: stretch; width: 100%; }
  .resell-journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .margin-board { grid-template-columns: minmax(0, 1fr); }
  .margin-arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 620px) {
  .resell-journey { grid-template-columns: minmax(0, 1fr); }
  .credits-amount { font-size: 36px; }
  .resell-cta-button { width: 100%; }
  /* Keep the header on one line: the back link never wraps, and the badge steps aside when space is tight. */
  .resell-header { gap: 10px; }
  .resell-header .legal-back { white-space: nowrap; }
}
@media (max-width: 430px) {
  .resell-badge { display: none; }
}

@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }

/* Reduced motion: everything appears at once, with no sliding, cascades or page transitions. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ---- Resell page: what each plan can sell ---- */
.resell-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); font-size: 15px; }
.resell-table th, .resell-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.resell-table thead th { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.resell-table tbody tr:last-child > * { border-bottom: 0; }
.resell-table tbody th { font-weight: 800; }
.plan-yes { color: var(--success); font-weight: 900; }
.plan-no { color: var(--muted); }
@media (max-width: 640px) {
  .resell-table thead { display: none; }
  .resell-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .resell-table tbody th { grid-column: 1 / -1; border: 0; padding-bottom: 4px; }
  .resell-table td { border: 0; padding: 4px 16px; }
  .resell-table td::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 700; }
}

/* ---- Resell page: the two plans ---- */
.resell-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.resell-plan { display: flex; flex-direction: column; gap: 12px; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.resell-plan-featured { border-color: color-mix(in srgb, var(--purple) 55%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--purple) 12%, var(--surface)), var(--surface) 60%); }
.resell-plan .eyebrow { margin: 0; }
.resell-plan h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--muted); }
.resell-plan h3 strong { display: block; font-size: 44px; line-height: 1; color: var(--text); font-weight: 900; }
.resell-plan-lead { margin: 0; color: var(--success); font-weight: 700; font-size: 14px; }
.resell-plan ul { display: grid; gap: 9px; margin: 4px 0 8px; padding: 0; list-style: none; flex: 1; }
.resell-plan li { position: relative; padding-left: 24px; font-size: 15px; }
.resell-plan li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--purple-2); border-bottom: 2px solid var(--purple-2); transform: rotate(-45deg); }
.resell-plan code { font-size: 13px; color: var(--purple-2); }
.resell-plan .resell-cta-button { align-self: stretch; }
#plans .resell-cta-note, #plans .form-message { max-width: none; margin: 14px 0 0; text-align: center; }
@media (max-width: 760px) { .resell-plans { grid-template-columns: 1fr; } }

/* ---- Reseller panel: quick links, the rebranding overview, the locked designer ---- */
.panel-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 22px; }
.panel-jump a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.panel-jump a:hover { border-color: var(--purple); color: var(--purple-2); }
.rebrand-overview { display: grid; gap: 10px; margin: 0 0 28px; }
.rebrand-overview h2 { margin: 0; font-size: 19px; }
.rebrand-overview > .muted-text { margin: -4px 0 4px; }
.rebrand-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.rebrand-tile { display: grid; align-content: start; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rebrand-tile.is-ok { border-color: color-mix(in srgb, var(--success) 40%, var(--line)); }
.rebrand-tile.is-todo { border-color: color-mix(in srgb, #f2c46d 60%, var(--line)); }
.rebrand-tile h3 { margin: 0; font-size: 15px; }
.rebrand-tile p { margin: 0; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.rebrand-tile code { color: var(--purple-2); }
.rebrand-tile .button, .rebrand-tile .text-button { justify-self: start; }
.rebrand-tile .text-button { color: var(--purple-2); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.designer-empty { margin: 0; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.designer.is-empty > :not(.designer-head):not(.designer-empty) { display: none; }
.format-note { margin: 0; color: var(--muted); font-size: 13.5px; font-weight: 400; }
.format-note code { color: var(--purple-2); }

/* ---- Password fields: the show/hide eye, and the rules checklist on new passwords ---- */
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover { color: var(--text); background: #221c2a; }
.password-toggle:focus-visible { outline: 2px solid var(--purple-2); outline-offset: 1px; color: var(--text); }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.password-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 13px; font-weight: 500; color: var(--muted); }
.password-rules li { position: relative; padding-left: 20px; transition: color .15s ease; }
.password-rules li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 50%; }
.password-rules.is-started li:not(.is-met) { color: #f2c46d; }
.password-rules li.is-met { color: var(--success); }
.password-rules li.is-met::before { top: .2em; width: 10px; height: 5px; border: 0; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; border-radius: 0; transform: rotate(-45deg); }
@media (max-width: 420px) { .password-rules { grid-template-columns: 1fr; } }
