:root {
  --ink: #0b0d0c;
  --ink-2: #151917;
  --paper: #f3f5f2;
  --surface: #ffffff;
  --surface-soft: #e9eeeb;
  --text: #111613;
  --muted: #69736e;
  --line: #d4ddd8;
  --line-dark: #303733;
  --green: #16c784;
  --green-deep: #087f5b;
  --green-soft: #dff8ed;
  --blue: #4d7cff;
  --amber: #d97706;
  --danger: #c11f47;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--text); background: var(--paper); letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.hidden { display: none !important; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.store-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100% - 1280px) / 2));
  border-bottom: 1px solid var(--line-dark);
  color: white;
  background: rgba(11, 13, 12, .96);
  backdrop-filter: blur(18px);
}
.store-brand { min-width: 0; display: inline-flex; align-items: center; gap: 11px; justify-self: start; color: white; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #3b4641; border-radius: 4px; color: var(--green); background: #171b19; }
.brand-mark svg { width: 19px; }
.brand-copy { min-width: 0; display: grid; line-height: 1; }
.brand-copy strong { font-size: 15px; }
.brand-copy small { margin-top: 5px; color: #82908a; font-family: var(--mono); font-size: 9px; }
.store-tabs { height: 100%; display: flex; align-items: center; gap: 2px; }
.store-tabs button { position: relative; height: 42px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 4px; padding: 0 14px; color: #96a19c; background: transparent; }
.store-tabs button::after { content: ""; position: absolute; right: 14px; bottom: -15px; left: 14px; height: 2px; background: transparent; transform: scaleX(.2); transition: transform .25s ease, background .25s ease; }
.store-tabs button:hover { color: white; background: #171b19; }
.store-tabs button.active { color: white; }
.store-tabs button.active::after { background: var(--green); transform: scaleX(1); }
.store-tabs svg { width: 16px; }
.store-tabs b { min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 4px; color: var(--ink); background: var(--green); font-family: var(--mono); font-size: 10px; }
.store-security { display: inline-flex; align-items: center; gap: 7px; justify-self: end; color: #aeb8b3; font-size: 12px; }
.store-security svg { width: 15px; color: var(--green); }

.store-main { min-height: calc(100vh - 72px); }
.store-view { display: none; }
.store-view.active { display: block; }
.store-hero {
  position: relative;
  height: 650px;
  min-height: 520px;
  max-height: calc(100svh - 96px);
  overflow: hidden;
  color: white;
  background: var(--ink);
  isolation: isolate;
}
#mail-flow-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-grid { position: absolute; inset: 0; z-index: -1; border-bottom: 1px solid var(--line-dark); pointer-events: none; }
.hero-grid::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% + 260px); width: 1px; background: #242a27; }
.hero-grid::after { content: ""; position: absolute; top: 112px; right: 0; left: 0; height: 1px; background: #1c211f; }
.hero-content { width: min(1280px, calc(100% - 48px)); height: 100%; display: flex; flex-direction: column; justify-content: center; margin: 0 auto; padding: 54px 0 70px; }
.hero-kicker { display: flex; align-items: center; gap: 10px; color: #8d9a94; font-family: var(--mono); font-size: 10px; }
.hero-kicker span { width: 34px; height: 2px; background: var(--green); }
.hero-content h1 { max-width: 760px; margin: 23px 0 0; font-size: 78px; line-height: .94; font-weight: 720; letter-spacing: 0; }
.hero-content h1 span { color: var(--green); }
.hero-copy { max-width: 560px; margin: 28px 0 0; color: #aeb8b3; font-size: 16px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 10px; margin-top: 32px; }
.hero-actions button { height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 4px; padding: 0 17px; font-weight: 700; }
.hero-actions svg { width: 17px; }
.hero-primary { border: 1px solid var(--green); color: #06130d; background: var(--green); }
.hero-primary:hover { background: #3dd79d; }
.hero-secondary { border: 1px solid #343d39; color: white; background: #151917; }
.hero-secondary:hover { border-color: #56635d; background: #1d2320; }
.hero-metrics { display: flex; gap: 0; margin: 48px 0 0; }
.hero-metrics div { min-width: 132px; padding: 0 24px; border-left: 1px solid #343d39; }
.hero-metrics div:first-child { padding-left: 0; border-left: 0; }
.hero-metrics dt { color: white; font-family: var(--mono); font-size: 20px; font-weight: 700; }
.hero-metrics dd { margin: 5px 0 0; color: #77837d; font-size: 11px; }
.hero-rail { position: absolute; right: max(24px, calc((100% - 1280px) / 2)); bottom: 34px; display: flex; align-items: center; gap: 12px; color: #64706a; font-family: var(--mono); font-size: 9px; }
.hero-rail i { width: 88px; height: 1px; background: #38413d; }
.hero-rail b { color: #93a099; font-weight: 500; }

.catalog-shell, .history-shell { width: min(1280px, calc(100% - 48px)); margin: 0 auto; }
.catalog-shell { padding: 78px 0 92px; }
.catalog-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-bottom: 30px; }
.catalog-heading > div { display: grid; gap: 10px; }
.section-index { color: var(--green-deep); font-family: var(--mono); font-size: 10px; font-weight: 700; }
.catalog-heading h2, .history-hero h1 { margin: 0; font-size: 42px; line-height: 1.05; letter-spacing: 0; }
.catalog-heading p { max-width: 360px; margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
.catalog-stock { display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; }
.catalog-stock strong { color: var(--green-deep); font-family: var(--mono); font-size: 28px; line-height: 1; }

.renew-context { display: grid; grid-template-columns: 44px minmax(0, 1fr) 36px; align-items: center; gap: 14px; margin-bottom: 28px; padding: 14px 16px; border: 1px solid #a8dbc6; border-radius: 4px; background: var(--green-soft); }
.renew-context > span { width: 44px; height: 44px; display: grid; place-items: center; color: white; background: var(--green-deep); }
.renew-context > span svg { width: 20px; }
.renew-context > div { min-width: 0; }
.renew-context p { margin: 4px 0 0; color: #47675a; overflow-wrap: anywhere; }
.renew-context button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 4px; color: #47675a; background: transparent; }
.renew-context button:hover { background: rgba(8, 127, 91, .1); }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product-card:only-child { grid-column: 1 / -1; }
.product-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 16px 50px rgba(22, 38, 31, .06); transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s ease, box-shadow .3s ease; }
.product-card:hover { transform: translateY(-5px); border-color: #a6b6ae; box-shadow: 0 24px 70px rgba(22, 38, 31, .11); }
.product-card::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--green); transform: scaleX(.22); transform-origin: left; transition: transform .35s ease; }
.product-card:nth-child(even)::before { background: var(--blue); }
.product-card:hover::before { transform: scaleX(1); }
.product-head { min-height: 142px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: start; gap: 15px; padding: 25px 24px 22px; border-bottom: 1px solid var(--line); }
.product-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #badfce; border-radius: 4px; color: var(--green-deep); background: var(--green-soft); }
.product-card:nth-child(even) .product-icon { border-color: #c7d2f8; color: var(--blue); background: #edf1ff; }
.product-icon svg { width: 21px; }
.product-copy { min-width: 0; display: grid; gap: 5px; }
.product-copy strong { font-size: 18px; overflow-wrap: anywhere; }
.product-copy small { color: var(--muted); line-height: 1.6; }
.product-number { color: #a4afa9; font-family: var(--mono); font-size: 11px; }
.product-quantity { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: #f8faf8; }
.product-quantity > span:first-child { display: grid; gap: 4px; }
.product-quantity strong { font-size: 13px; }
.product-quantity small { color: var(--muted); font-size: 11px; }
.product-quantity > b { min-width: 42px; font-family: var(--mono); font-size: 20px; text-align: center; }
.card-quantity-stepper { width: 142px; height: 40px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: white; }
.card-quantity-stepper button { display: grid; place-items: center; border: 0; color: var(--text); background: #edf2ef; }
.card-quantity-stepper button:hover:not(:disabled) { color: var(--green-deep); background: var(--green-soft); }
.card-quantity-stepper button:disabled { cursor: not-allowed; opacity: .45; }
.card-quantity-stepper svg { width: 15px; }
.card-quantity-stepper input { min-width: 0; width: 100%; border: 0; border-right: 1px solid var(--line); border-left: 1px solid var(--line); background: white; text-align: center; font-family: var(--mono); font-weight: 700; appearance: textfield; }
.card-quantity-stepper input::-webkit-inner-spin-button { appearance: none; }
.plan-list { display: grid; }
.plan-row { min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 12px 24px; border-bottom: 1px solid var(--line); transition: background .2s ease; }
.plan-row:last-child { border-bottom: 0; }
.plan-row:hover { background: #f8faf8; }
.plan-copy { min-width: 0; display: grid; gap: 4px; }
.plan-copy strong { font-size: 14px; }
.plan-copy small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.plan-price { min-width: 88px; color: var(--text); font-family: var(--mono); font-size: 18px; text-align: right; }
.buy-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 4px; color: white; background: var(--ink); transition: transform .2s ease, color .2s ease, background .2s ease; }
.buy-button:hover { transform: translateX(2px); color: var(--ink); background: var(--green); }
.buy-button:disabled { cursor: not-allowed; transform: none; border-color: #aab4af; color: #7d8882; background: #dfe5e1; }
.buy-button svg { width: 17px; }
.store-loading, .store-empty { grid-column: 1 / -1; min-height: 290px; display: grid; place-content: center; justify-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); }
.store-loading svg, .store-empty svg { width: 28px; color: var(--green-deep); }

.cdk-band { margin-top: 18px; min-height: 126px; display: grid; grid-template-columns: .75fr 1.25fr; align-items: center; gap: 32px; padding: 24px 28px; border-radius: 8px; color: white; background: var(--ink-2); }
.cdk-heading { display: flex; align-items: center; gap: 14px; }
.cdk-heading > span:last-child { display: grid; gap: 4px; }
.cdk-heading small { color: #65716b; font-family: var(--mono); font-size: 9px; }
.cdk-heading strong { font-size: 20px; }
.cdk-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #35403a; border-radius: 4px; color: var(--green); background: #1d2320; }
.cdk-icon svg { width: 21px; }
.cdk-band form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 9px; }
.cdk-band label { min-width: 0; display: grid; gap: 7px; }
.cdk-band label > span { color: #7e8b85; font-size: 11px; }
.cdk-band label > small { color: #59645f; font-size: 10px; }
.cdk-band input { width: 100%; min-width: 0; height: 44px; border: 1px solid #39423e; border-radius: 4px; padding: 0 13px; color: white; background: #0e110f; font-family: var(--mono); text-transform: uppercase; }
.cdk-band input::placeholder { color: #4f5a55; }
.cdk-band button, .checkout-submit { height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 4px; padding: 0 16px; color: #06130d; background: var(--green); font-weight: 750; }
.cdk-band form > button { margin-top: 21px; }
.cdk-band button:hover, .checkout-submit:hover { background: #3dd79d; }
.cdk-band button svg, .checkout-submit svg { width: 16px; }

.history-hero { position: relative; min-height: 260px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 56px; overflow: hidden; padding: 58px max(24px, calc((100% - 1280px) / 2)) 48px; color: white; background: var(--ink); }
.history-hero::before { content: ""; position: absolute; right: max(24px, calc((100% - 1280px) / 2)); bottom: 0; left: max(24px, calc((100% - 1280px) / 2)); height: 1px; background: linear-gradient(90deg, var(--green) 0 17%, #29312d 17% 100%); }
.history-hero::after { content: ""; position: absolute; top: 0; right: 14%; bottom: 0; width: 1px; background: #202623; transform: rotate(19deg); transform-origin: bottom; }
.history-hero-copy { position: relative; z-index: 1; }
.history-hero h1 { margin-top: 15px; font-size: 50px; }
.history-hero p { max-width: 520px; margin: 16px 0 0; color: #83908a; line-height: 1.7; }
.history-overview { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(104px, auto)) auto; align-items: end; gap: 0; }
.history-overview > span { display: grid; gap: 7px; padding: 0 24px; border-left: 1px solid #35403b; }
.history-overview > span:first-child { padding-left: 0; border-left: 0; }
.history-overview small { color: #748079; font-size: 10px; }
.history-overview strong { color: var(--green); font-family: var(--mono); font-size: 28px; line-height: 1; }
.history-overview .quiet-button { margin-left: 18px; }
.quiet-button { height: 40px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #36403b; border-radius: 4px; padding: 0 13px; color: white; background: #171b19; }
.quiet-button:hover { border-color: #57645e; }
.quiet-button svg { width: 15px; }
.history-shell { padding: 32px 0 80px; }
.browser-warning { display: flex; gap: 13px; margin-bottom: 20px; padding: 15px 17px; border: 1px solid #e9c28c; border-radius: 4px; background: #fff7e8; color: var(--amber); }
.browser-warning svg { width: 19px; flex: 0 0 auto; }
.browser-warning p { margin: 4px 0 0; color: #82633e; }
.history-list { display: grid; gap: 14px; }
.history-batch { display: grid; grid-template-columns: 88px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 14px 42px rgba(22, 38, 31, .055); transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease, box-shadow .25s ease; }
.history-batch:hover, .history-batch.expanded { transform: translateY(-2px); border-color: #a8b7af; box-shadow: 0 24px 62px rgba(22, 38, 31, .1); }
.history-batch-rail { position: relative; display: flex; align-items: center; flex-direction: column; padding: 22px 0; color: white; background: var(--ink-2); }
.history-batch-rail::after { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--green); }
.history-batch-rail small { color: #67736d; font-family: var(--mono); font-size: 8px; writing-mode: vertical-rl; }
.history-batch-rail strong { margin-top: 13px; font-family: var(--mono); font-size: 26px; line-height: 1; }
.history-batch-rail span { width: 32px; height: 32px; display: grid; place-items: center; margin-top: auto; border: 1px solid #38423d; border-radius: 4px; color: var(--green); background: #1c221f; }
.history-batch-rail svg { width: 15px; }
.history-batch-body { min-width: 0; }
.history-batch-header { min-height: 118px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px 24px 19px; }
.history-batch-title { min-width: 0; display: grid; gap: 7px; }
.history-eyebrow { color: var(--green-deep); font-family: var(--mono); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.history-batch-title > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.history-batch-title h3 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.history-batch-title h3 b { color: var(--green-deep); font-family: var(--mono); font-size: 14px; }
.history-batch-title p { margin: 0; color: var(--muted); }
.history-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 4px; padding: 5px 8px; color: var(--amber); background: #fff3df; font-size: 10px; font-weight: 700; }
.history-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(217, 119, 6, .12); }
.history-status.fulfilled { color: var(--green-deep); background: var(--green-soft); }
.history-status.fulfilled i { box-shadow: 0 0 0 3px rgba(8, 127, 91, .12); }
.history-status.expired { color: #68716d; background: #edf0ee; }
.history-status.expired i { box-shadow: 0 0 0 3px rgba(104, 113, 109, .12); }
.history-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.history-actions a, .history-actions button { height: 38px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 4px; padding: 0 12px; color: var(--text); background: var(--surface); text-decoration: none; font-weight: 650; }
.history-actions a:hover, .history-actions button:hover { border-color: #99aaa1; }
.history-actions .primary { border-color: var(--ink); color: white; background: var(--ink); }
.history-actions .primary:hover { border-color: var(--green-deep); background: var(--green-deep); }
.history-actions .batch-export { min-width: 158px; justify-content: center; }
.history-actions .batch-export.expired-export { border-color: #c9cfcc; color: #68716d; background: #edf0ee; }
.history-actions .batch-export.expired-export:hover { border-color: #9da7a2; color: #4e5753; background: #e4e8e6; }
.history-actions .batch-renew { border-color: #8fcdb2; color: var(--green-deep); background: var(--green-soft); }
.history-actions .batch-renew:hover { border-color: var(--green-deep); background: #d9f6e9; }
.history-actions .pending-action { border-color: #b9dcca; color: var(--green-deep); background: var(--green-soft); }
.history-actions .icon-only { width: 38px; padding: 0; justify-content: center; }
.history-actions .batch-toggle svg { transition: transform .2s ease; }
.history-batch.expanded .batch-toggle svg { transform: rotate(180deg); }
.history-actions svg { width: 14px; }
.history-batch-meta { display: grid; grid-template-columns: .72fr 1.25fr .9fr 1.5fr; margin: 0 24px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.history-batch-meta > span { min-width: 0; display: grid; gap: 5px; padding: 13px 16px; border-right: 1px solid var(--line); }
.history-batch-meta > span:first-child { padding-left: 0; }
.history-batch-meta > span:last-child { border-right: 0; }
.history-batch-meta small { color: var(--muted); font-size: 10px; }
.history-batch-meta strong { min-width: 0; overflow: hidden; color: #344139; font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-batch-meta > span:last-child strong { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.history-batch-items { border-top: 1px solid var(--line); padding: 22px 24px 24px; background: #f8faf8; contain: layout paint; }
.history-batch-items.hidden { display: none; }
.history-batch-items-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.history-batch-items-head > div { display: grid; gap: 4px; }
.history-batch-items-head > div > span { color: var(--green-deep); font-family: var(--mono); font-size: 8px; font-weight: 700; }
.history-batch-items-head small { color: var(--muted); }
.history-batch-items-head button { height: 34px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; color: var(--text); background: white; }
.history-batch-items-head svg { width: 14px; }
.history-mailbox-list { border-top: 1px solid var(--line); }
.history-mailbox-row { position: relative; min-height: 66px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.history-mailbox-row::before { content: ""; position: absolute; top: 50%; left: 13px; width: 7px; height: 7px; border: 2px solid #a3b0a9; border-radius: 50%; background: #f8faf8; transform: translateY(-50%); }
.history-mailbox-index { padding-left: 25px; color: #9ba6a0; font-family: var(--mono); font-size: 9px; }
.history-mailbox-copy { min-width: 0; display: grid; gap: 3px; }
.history-mailbox-copy strong { overflow-wrap: anywhere; }
.history-mailbox-copy small { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.history-mailbox-copy small svg { width: 12px; }
.history-mailbox-copy small b { width: 3px; height: 3px; margin: 0 2px; border-radius: 50%; background: #9aa69f; }
.history-mailbox-actions { display: flex; gap: 6px; }
.history-mailbox-actions a, .history-mailbox-actions button { height: 32px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 4px; padding: 0 9px; color: var(--text); background: white; text-decoration: none; }
.history-mailbox-actions a:hover { border-color: #95a69e; color: var(--green-deep); }
.history-mailbox-row.expired { color: #737c78; }
.history-mailbox-row.expired::before { border-color: #aab2ae; background: #e4e8e6; }
.history-mailbox-actions .expired-mailbox-action { border-color: #d5dad7; color: #737c78; background: #edf0ee; cursor: not-allowed; }
.history-mailbox-actions .expired-mailbox-action:hover { border-color: #aeb6b2; color: #535c58; }
.history-mailbox-actions svg { width: 13px; }
.history-batch-waiting { min-height: 92px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.history-batch-waiting > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #d5ded9; border-radius: 4px; color: var(--amber); background: white; }
.history-batch-waiting > div { display: grid; gap: 3px; }
.history-batch-waiting strong { color: var(--text); }
.history-batch-waiting small { color: var(--muted); }
.history-batch-waiting svg { width: 17px; }

.checkout-dialog, .purchase-result-dialog { position: fixed; inset: 0; z-index: 1000; margin: auto; max-height: calc(100dvh - 32px); overflow-y: auto; border: 0; border-radius: 8px; padding: 0; color: var(--text); background: var(--surface); box-shadow: 0 32px 100px rgba(8, 16, 12, .34); }
.checkout-dialog { width: min(500px, calc(100% - 28px)); }
.purchase-result-dialog { width: min(780px, calc(100% - 28px)); max-height: calc(100vh - 32px); }
.checkout-dialog::backdrop, .purchase-result-dialog::backdrop { background: rgba(7, 10, 8, .72); backdrop-filter: blur(8px); }
.checkout-dialog form { position: relative; padding: 27px; overflow: hidden; }
.dialog-stripe { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--green); }
.checkout-head { display: flex; justify-content: space-between; gap: 15px; }
.checkout-head > div { min-width: 0; }
.checkout-head span, .result-heading small { color: var(--green-deep); font-family: var(--mono); font-size: 9px; font-weight: 700; }
.checkout-head h2 { margin: 8px 0 0; font-size: 23px; }
.checkout-head p { margin: 5px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.checkout-head button, .result-heading > button { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface); }
.checkout-head button:hover, .result-heading > button:hover { color: var(--text); border-color: #9eada5; }
.checkout-options { display: grid; gap: 9px; margin-top: 22px; }
.quantity-option, .api-checkout-option, .renew-plan-option { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 4px; background: #fafbfa; }
.quantity-option > span:first-child, .api-checkout-option > span, .renew-plan-option > span { display: grid; gap: 3px; }
.quantity-option small, .api-checkout-option small, .renew-plan-option small { color: var(--muted); }
.renew-plan-option select { min-width: 160px; height: 40px; border: 1px solid var(--line); border-radius: 4px; padding: 0 34px 0 11px; color: var(--text); background: white; }
.quantity-stepper { width: 132px; height: 38px; display: grid; grid-template-columns: 38px 1fr 38px; flex: 0 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: white; }
.quantity-stepper button { display: grid; place-items: center; border: 0; color: var(--text); background: #f2f5f3; }
.quantity-stepper button:hover { color: var(--green-deep); background: var(--green-soft); }
.quantity-stepper button svg { width: 15px; }
.quantity-stepper input { width: 100%; min-width: 0; border: 0; border-right: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; font-family: var(--mono); font-weight: 700; appearance: textfield; }
.quantity-stepper input::-webkit-inner-spin-button { appearance: none; }
.api-checkout-option { cursor: pointer; }
.api-checkout-option:has(input:checked) { border-color: #91d3b7; background: var(--green-soft); }
.api-checkout-option input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--green-deep); }
.checkout-summary { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; padding: 16px; border-left: 3px solid var(--green); background: #f0f4f1; }
.checkout-summary > span { display: grid; gap: 4px; }
.checkout-summary small { color: var(--muted); font-size: 10px; }
.checkout-summary strong { font-family: var(--mono); font-size: 26px; }
#checkout-payment-types { display: grid; gap: 7px; border: 0; padding: 0; }
#checkout-payment-types legend { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
#checkout-payment-types label { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 4px; }
#checkout-payment-types label:has(input:checked) { border-color: #91d3b7; background: var(--green-soft); }
#checkout-payment-types input { accent-color: var(--green-deep); }
.checkout-error { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 11px 12px; border: 1px solid #e5a5b4; border-radius: 4px; color: #912a43; background: #fff1f4; line-height: 1.55; }
.checkout-error.hidden { display: none; }
.checkout-error svg { width: 17px; flex: 0 0 auto; margin-top: 1px; }
.checkout-submit { width: 100%; margin-top: 18px; color: white; background: var(--ink); }
.checkout-submit:hover { color: var(--ink); }

.purchase-result { padding: 27px; }
.result-delivery-animation { height: 78px; display: grid; grid-template-columns: 46px minmax(80px, 1fr) 46px; align-items: center; gap: 12px; margin-bottom: 22px; padding: 12px 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #f5f8f6; }
.delivery-node { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #b6c3bc; border-radius: 4px; color: var(--muted); background: white; }
.delivery-node.target { color: var(--green-deep); border-color: #8fcdb2; background: var(--green-soft); }
.delivery-node svg { width: 19px; }
.delivery-track { position: relative; height: 20px; display: block; border-top: 1px solid #aebbb4; }
.delivery-track::before { content: ""; position: absolute; top: -3px; right: 0; width: 5px; height: 5px; border-top: 1px solid #aebbb4; border-right: 1px solid #aebbb4; transform: rotate(45deg); }
.delivery-track i { position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border: 1px solid var(--green-deep); background: var(--green); opacity: 0; }
.purchase-result.delivery-active .delivery-node:first-child { animation: delivery-source .65s ease both; }
.purchase-result.delivery-active .delivery-node.target { animation: delivery-target .55s 1.05s cubic-bezier(.2,.8,.2,1) both; }
.purchase-result.delivery-active .delivery-track i { animation: delivery-packet 1.15s cubic-bezier(.4,0,.2,1) both; }
.purchase-result.delivery-active .delivery-track i:nth-child(2) { animation-delay: .18s; }
.purchase-result.delivery-active .delivery-track i:nth-child(3) { animation-delay: .36s; }
.purchase-result.delivery-active .result-heading { animation: result-content-in .55s .85s ease both; }
.purchase-result.delivery-active .result-meta, .purchase-result.delivery-active .result-items, .purchase-result.delivery-active .result-actions { animation: result-content-in .55s 1s ease both; }
@keyframes delivery-source { 0% { transform: scale(.72); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes delivery-packet { 0% { left: 0; opacity: 0; transform: rotate(0); } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 7px); opacity: 0; transform: rotate(180deg); } }
@keyframes delivery-target { 0% { transform: scale(.72); box-shadow: 0 0 0 0 rgba(22,199,132,.28); } 70% { transform: scale(1.08); box-shadow: 0 0 0 13px rgba(22,199,132,0); } 100% { transform: scale(1); } }
@keyframes result-content-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-heading { display: grid; grid-template-columns: 52px minmax(0, 1fr) 36px; align-items: center; gap: 14px; }
.result-heading > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 4px; color: var(--ink); background: var(--green); }
.result-heading > span svg { width: 25px; }
.result-heading h2 { margin: 5px 0 0; font-size: 23px; }
.result-heading p { margin: 4px 0 0; color: var(--muted); }
.result-meta { display: grid; grid-template-columns: 1.35fr .55fr 1fr; gap: 8px; margin: 22px 0 12px; }
.result-meta > span { min-width: 0; display: grid; gap: 4px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9f7; }
.result-meta small { color: var(--muted); font-size: 10px; }
.result-meta strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.result-items { max-height: min(42vh, 390px); display: grid; gap: 8px; overflow-y: auto; padding-right: 2px; }
.result-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 4px; }
.result-item-index { color: #99a49e; font-family: var(--mono); font-size: 10px; }
.result-item-main { min-width: 0; display: grid; gap: 4px; }
.result-item-main strong { overflow-wrap: anywhere; }
.result-item-main small { color: var(--muted); }
.result-item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.result-item-actions a { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: var(--surface); text-decoration: none; }
.result-item-actions a.primary { border-color: var(--ink); color: white; background: var(--ink); }
.result-item-actions svg { width: 14px; }
.result-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.result-actions button { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 4px; padding: 0 15px; font-weight: 700; }
.result-secondary { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.result-primary { border: 1px solid var(--ink); color: white; background: var(--ink); }
.result-actions svg { width: 15px; }

.store-toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; max-width: min(480px, calc(100% - 32px)); transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 11px 14px; border: 1px solid #35403a; border-radius: 4px; color: white; background: var(--ink-2); box-shadow: 0 16px 50px rgba(7, 12, 9, .24); transition: .22s ease; }
.store-toast.show { transform: translate(-50%, 0); opacity: 1; }
.store-toast.error { border-color: #e1728d; background: var(--danger); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .store-topbar { grid-template-columns: 1fr auto; padding: 0 18px; }
  .store-security { display: none; }
  .hero-content h1 { font-size: 62px; }
  .product-grid { grid-template-columns: 1fr; }
  .cdk-band { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .store-topbar { height: 64px; gap: 10px; padding: 0 12px; }
  .brand-copy { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .store-tabs { justify-self: end; }
  .store-tabs button { height: 38px; gap: 6px; padding: 0 9px; font-size: 12px; }
  .store-tabs button::after { bottom: -13px; right: 9px; left: 9px; }
  .store-tabs b { display: none; }
  .store-hero { height: 580px; min-height: 520px; max-height: none; }
  .hero-content { width: min(100% - 32px, 1280px); justify-content: flex-start; padding: 78px 0 46px; }
  .hero-content h1 { margin-top: 20px; font-size: 46px; line-height: .98; }
  .hero-copy { margin-top: 23px; font-size: 14px; line-height: 1.75; }
  .hero-actions { align-items: stretch; flex-direction: column; margin-top: 26px; }
  .hero-actions button { width: 100%; }
  .hero-metrics { margin-top: 32px; }
  .hero-metrics div { min-width: 0; flex: 1; padding: 0 10px; }
  .hero-metrics dt { font-size: 16px; }
  .hero-metrics dd { font-size: 9px; }
  .hero-rail { right: 16px; bottom: 18px; }
  .hero-grid::before { left: 74%; }
  .catalog-shell, .history-shell { width: min(100% - 24px, 1280px); }
  .catalog-shell { padding: 54px 0 64px; }
  .catalog-heading { grid-template-columns: 1fr; gap: 11px; }
  .catalog-heading h2, .history-hero h1 { font-size: 32px; }
  .catalog-heading p { text-align: left; }
  .catalog-stock { justify-content: flex-start; }
  .product-head { min-height: 126px; grid-template-columns: 44px minmax(0, 1fr) auto; padding: 21px 17px 18px; }
  .product-icon { width: 44px; height: 44px; }
  .product-quantity { padding: 11px 16px; }
  .plan-row { grid-template-columns: minmax(0, 1fr) auto 40px; gap: 9px; padding: 11px 16px; }
  .plan-price { min-width: 72px; font-size: 15px; }
  .cdk-band { padding: 21px 17px; }
  .cdk-band form { grid-template-columns: 1fr; }
  .cdk-band button { width: 100%; margin-top: 0; }
  .history-hero { min-height: 330px; grid-template-columns: 1fr; align-items: end; gap: 32px; padding: 48px 16px 34px; }
  .history-hero h1 { font-size: 38px; }
  .history-overview { grid-template-columns: 1fr 1fr; }
  .history-overview > span { padding: 0 16px; }
  .history-overview .quiet-button { grid-column: 1 / -1; width: 100%; justify-content: center; margin: 22px 0 0; }
  .history-shell { padding-top: 22px; }
  .history-batch { grid-template-columns: 1fr; }
  .history-batch-rail { height: 42px; align-items: center; flex-direction: row; gap: 9px; padding: 0 14px; }
  .history-batch-rail small { writing-mode: initial; }
  .history-batch-rail strong { margin: 0; font-size: 15px; }
  .history-batch-rail span { width: 28px; height: 28px; margin: 0 0 0 auto; }
  .history-batch-header { grid-template-columns: 1fr; align-items: start; gap: 16px; padding: 19px 16px 14px; }
  .history-batch-title h3 { font-size: 18px; }
  .history-actions { justify-content: flex-start; }
  .history-actions .batch-export { flex: 1 1 auto; }
  .history-actions .pending-action { flex: 1 1 auto; justify-content: center; }
  .history-batch-meta { grid-template-columns: 1fr 1fr; margin: 0 16px 18px; }
  .history-batch-meta > span { padding: 11px 12px; border-bottom: 1px solid var(--line); }
  .history-batch-meta > span:first-child { padding-left: 0; }
  .history-batch-meta > span:nth-child(2) { border-right: 0; }
  .history-batch-meta > span:nth-last-child(-n+2) { border-bottom: 0; }
  .history-batch-items { padding: 15px 14px; }
  .history-batch-items-head { align-items: flex-start; flex-direction: column; }
  .history-mailbox-row { grid-template-columns: 33px minmax(0, 1fr); align-items: start; padding: 12px 0; }
  .history-mailbox-row::before { left: 9px; top: 19px; transform: none; }
  .history-mailbox-index { padding: 4px 0 0 19px; }
  .history-mailbox-copy small { align-items: flex-start; flex-wrap: wrap; }
  .history-mailbox-actions { grid-column: 2; flex-wrap: wrap; margin-top: 3px; }
  .checkout-dialog form, .purchase-result { padding: 20px; }
  .result-delivery-animation { height: 68px; grid-template-columns: 40px minmax(56px, 1fr) 40px; padding: 9px 11px; }
  .delivery-node { width: 38px; height: 38px; }
  .quantity-option, .api-checkout-option, .renew-plan-option { align-items: flex-start; flex-direction: column; }
  .renew-plan-option select { width: 100%; }
  .quantity-stepper { width: 100%; }
  .result-meta { grid-template-columns: 1fr 1fr; }
  .result-meta > span:first-child { grid-column: 1 / -1; }
  .result-item { grid-template-columns: 24px minmax(0, 1fr); }
  .result-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .result-actions { flex-direction: column-reverse; }
  .result-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
