/* Storefront components: shared typography, predictable spacing, deliberate motion. */
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.content:focus { outline: none; }
.btn { min-height: 44px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: none; border-color: transparent; }
.btn-primary:hover { background: var(--accent-hover); color: var(--ink); }
.btn-ghost { border-color: var(--border-ui); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 1; background: var(--surface-3); color: var(--muted); border-color: transparent; }
.btn[aria-busy="true"] { cursor: wait; opacity: .75; }
.card { background: var(--surface); box-shadow: none; padding: 24px; border-radius: 12px; }
.card .row > div { min-width: 0; }
.card-title { overflow-wrap: anywhere; }
.page-head h1 { font-size: 30px; line-height: 1.25; margin-bottom: 8px; }
.page-head > div { max-width: 70ch; }
.account-email { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.order-email-status { margin: 18px 0; padding: 12px 0; border-block: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.order-email-status span { display: block; color: var(--text-2); overflow-wrap: anywhere; margin-top: 3px; }
.table-wrap { border-radius: 8px; }
.payload { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.input, .select, .textarea { border-radius: 8px; min-height: 44px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.empty { padding: 48px 24px; background: var(--surface); border: 0; border-radius: 12px; }
.empty h2 { font-size: 22px; }
.empty p { margin: 12px 0 24px; color: var(--muted); }
.home-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding: 26px 0 38px; }
.home-hero__label { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-2); margin-bottom: 22px; }
.home-hero__label span { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.home-hero h1 { font-size: 52px; font-weight: 650; letter-spacing: -.035em; line-height: 1.12; margin: 0 0 22px; }
.home-hero h1 span { color: var(--accent); }
.home-hero__lead { max-width: 46ch; font-size: 15px; line-height: 1.7; color: var(--muted); margin-bottom: 26px; }
.home-hero .btn { gap: 28px; min-height: 48px; }
.hero-product { background: var(--surface); border-radius: 16px; padding: 28px; }
.hero-product__top { display: block; font-size: 12px; color: var(--muted); margin-bottom: 30px; }
.hero-product__item { display: flex; align-items: center; gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.hero-product__item > svg { color: var(--accent); width: 26px; height: 26px; flex: none; }
.hero-product__item > div { min-width: 0; flex: 1; }
.hero-product__item strong { display: block; font-size: 15px; font-weight: 600; }
.hero-product__item div span { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.hero-product__item > span { color: var(--muted); font-size: 20px; }
.hero-product__bottom { display: flex; gap: 12px; align-items: center; margin-top: 24px; font-size: 12px; color: var(--muted); }
.hero-product__bottom span { color: var(--accent); font-size: 20px; }
.store-benefits { display: flex; gap: 32px; justify-content: space-between; padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.store-benefits p { display: flex; gap: 12px; align-items: center; margin: 0; font-size: 12px; color: var(--muted); }
.store-benefits svg { width: 23px; height: 23px; flex: none; color: var(--text-2); }
.store-benefits strong { display: block; color: var(--text); font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.catalog-section + .catalog-section { margin-top: 48px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.section-heading h2 { font-size: 24px; margin-bottom: 6px; }
.section-heading h1 { font-size: 32px; overflow-wrap: anywhere; }
.section-heading p { font-size: 13px; color: var(--muted); margin: 0; }
.section-heading > a { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.section-heading > a span { color: var(--accent); margin-left: 8px; }
.section-heading--page { margin-bottom: 30px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.catalog-card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: 12px; overflow: hidden; transition: background-color 180ms var(--ease); }
.catalog-card:hover { background: var(--surface-2); }
.catalog-card__visual { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 115px; padding: 24px 20px; background: #1a2925; color: #89deaf; }
.catalog-card:nth-child(3n + 2) .catalog-card__visual { background: #1e2932; color: #a9c7e2; }
.catalog-card:nth-child(3n + 3) .catalog-card__visual { background: #292636; color: #c3b7df; }
.catalog-card--guide .catalog-card__visual { min-height: 94px; background: var(--surface-2); color: var(--text-2); }
.country-code { font-size: 44px; line-height: 1; font-weight: 550; letter-spacing: -.03em; }
.catalog-card__type { max-width: 17ch; font-size: 11px; line-height: 1.6; text-align: right; color: inherit; }
.catalog-card__visual svg { width: 32px; height: 38px; }
.catalog-card__body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 20px; min-width: 0; }
.catalog-card h3 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 600; }
.catalog-card h3 a { color: var(--text); }
.catalog-card h3 a:hover { color: var(--accent); text-decoration: none; }
.catalog-card__lead { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.catalog-card__meta { display: grid; gap: 9px; margin-top: auto; color: var(--muted); font-size: 12px; padding-top: 4px; }
.availability { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); line-height: 1.4; margin: 0; }
.availability > span { width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; flex: none; }
.availability--in { color: var(--accent); }
.availability--in > span { background: currentColor; }
.catalog-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.catalog-price { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.catalog-price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.catalog-price--note { font-size:14px; line-height:1.5; letter-spacing:0; }
.catalog-card__open { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 12px; border-radius: 8px; background: var(--surface-3); color: var(--text); font-size: 12px; font-weight: 600; transition: background 180ms var(--ease), color 180ms var(--ease); }
.catalog-card__open:hover { background: var(--accent); color: var(--ink); text-decoration: none; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; margin: 0 0 28px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs > span:last-child { overflow-wrap: anywhere; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 390px); gap: 40px; align-items: start; }
.product-story, .product-aside { min-width: 0; }
.product-kind { color: var(--accent); font-size: 13px; margin-bottom: 12px; }
.product-heading h1 { font-size: 36px; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.product-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 12px; margin-top: 20px; }
.product-badges span + span::before { content: "·"; margin-right: 12px; color: var(--muted); }
.product-description { margin-top: 36px; }
.product-story h2 { font-size: 18px; margin-bottom: 16px; }
.product-prose { color: var(--text-2); white-space: pre-line; font-size: 15px; line-height: 1.8; max-width: 70ch; overflow-wrap: anywhere; }
.product-details { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 32px; }
.product-details p { font-size: 14px; line-height: 1.7; color: var(--text-2); max-width: 70ch; }
.product-example { display: block; border-radius: 8px; padding: 14px; background: var(--surface); color: var(--text); font: 13px/1.6 var(--font-mono); overflow-wrap: anywhere; margin: 16px 0 8px; }
.product-details .hint { color: var(--muted); font-size: 12px; }
.delivery-steps { margin: 0; padding-left: 22px; color: var(--muted); }
.delivery-steps li { padding-left: 6px; margin: 20px 0; font-size: 13px; }
.delivery-steps strong { display: block; color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.delivery-steps span { display: block; }
.purchase-panel { position: static; background: var(--surface); border-radius: 14px; padding: 26px; }
.purchase-price { margin: 20px 0 4px; font-size: 36px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.purchase-price-note { font-size: 13px; color: var(--muted); margin: 0 0 28px; }
.purchase-option { margin-bottom: 24px; }
.purchase-option h2 { font-size: 13px; font-weight: 500; color: var(--text-2); margin: 0 0 10px; }
.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.option { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 11px 4px; min-height: 60px; border-radius: 8px; border: 1px solid var(--border-strong); color: var(--text-2); font-size: 12px; line-height: 1.4; transition: background 180ms var(--ease), border-color 180ms var(--ease); }
.option small { font-size: 11px; color: var(--muted); }
.option:hover { background: var(--surface-2); border-color: var(--border-ui); color: var(--text); text-decoration: none; }
.option.is-selected { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.option.is-selected small { color: var(--accent); }
.option-grid--geo .option { font-size: 11px; }
.quantity-field { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 20px 0; font-size: 13px; }
.quantity-field .input { width: 82px; text-align: center; }
.purchase-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); padding-top: 20px; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.purchase-total strong { color: var(--text); font-size: 23px; }
.purchase-submit { min-height: 48px; }
.purchase-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.related-guides { margin-top: 28px; }
.related-guides h2 { font-size: 15px; margin-bottom: 10px; }
.related-guides a { display: flex; align-items: center; gap: 20px; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.related-guides a:hover { color: var(--accent); text-decoration: none; }
.related-guides strong { display: block; font-size: 13px; font-weight: 500; line-height: 1.5; }
.related-guides small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
/* Native dialog lives in the browser top layer, outside every sticky context. */
html:has(.login-dialog[open]) { overflow: hidden; }
.login-dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 36px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; margin: auto; overflow-y: auto; }
.login-dialog::backdrop { background: rgba(4, 8, 11, .78); }
.login-dialog[open] { animation: dialog-in 180ms var(--ease) both; }
.login-dialog[open]::backdrop { animation: backdrop-in 180ms var(--ease); }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--text); background: var(--surface-2); }
.icon-button svg { width: 20px; height: 20px; }
.login-close { position: absolute; top: 12px; right: 12px; }
.login-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-dim); color: var(--accent); margin-bottom: 24px; }
.login-mark svg { width: 25px; height: 25px; }
.login-dialog h2 { font-size: 25px; font-weight: 600; margin-bottom: 12px; }
.login-dialog > p:not(.login-error):not(.login-footnote) { font-size: 14px; line-height: 1.7; color: var(--muted); margin-bottom: 26px; }
.login-dialog .field { margin-bottom: 18px; }
.login-dialog .input { min-height: 50px; font-size: 16px; background: var(--bg); }
.login-dialog .btn { min-height: 48px; justify-content: space-between; }
.login-dialog .login-code { text-align: center; font: 24px/1.5 var(--font-mono); letter-spacing: .3em; padding-left: calc(12px + .3em); }
.login-recipient { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 16px; font-size: 13px; }
.login-recipient > span { overflow-wrap: anywhere; min-width: 0; }
.login-recipient button { font-size: 12px; flex: none; }
.login-error { margin: 16px 0 0; color: var(--danger); font-size: 13px; line-height: 1.5; }
.login-footnote { border-top: 1px solid var(--border); margin: 24px 0 0; padding-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-resend { display: block; width: 100%; margin-top: 14px; font-size: 13px; min-height: 40px; }
.login-resend:disabled { color: var(--muted); cursor: default; }
.login-preview { margin-top: 18px; padding: 12px 16px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 11px; }
.login-preview strong { display: block; margin-top: 4px; color: var(--text); font: 20px/1.5 var(--font-mono); letter-spacing: .15em; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); max-width: calc(100% - 32px); padding: 12px 20px; background: var(--text); color: var(--bg); border-radius: 10px; font-size: 14px; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 1200px) {
  .home-hero { gap: 24px; }
  .home-hero h1 { font-size: 42px; }
  .hero-product { padding: 22px; transform: none; }
  .hero-product__item { gap: 10px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); gap: 24px; }
  .product-heading h1 { font-size: 30px; }
  .purchase-panel { padding: 20px; }
  .option-grid--geo { grid-template-columns: 1fr; }
  .option-grid--geo .option { flex-direction: row; justify-content: space-between; padding: 10px 12px; min-height: 44px; font-size: 13px; }
}
@media (max-width: 960px) {
  .home-hero { grid-template-columns: 1fr; padding-top: 10px; }
  .hero-product { display: none; }
  .home-hero h1 { font-size: 44px; }
  .store-benefits { gap: 20px; flex-wrap: wrap; }
  .product-layout { grid-template-columns: 1fr; }
  .product-aside { display: contents; }
  .product-story { display: contents; }
  .product-heading { grid-row: 1; }
  .purchase-panel { grid-row: 2; }
  .product-description { grid-row: 3; margin-top: 8px; }
  .product-details { grid-column: 1; margin-top: 0; }
  .related-guides { grid-row: 6; }
  .option-grid--geo { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .option-grid--geo .option { flex-direction: column; font-size: 12px; min-height: 60px; justify-content: center; padding: 10px 4px; }
}
@media (max-width: 760px) {
  .home-hero { padding: 8px 0 28px; }
  .home-hero h1 { font-size: 40px; }
  .home-hero__label { margin-bottom: 18px; }
  .home-hero__lead { font-size: 14px; max-width: 46ch; }
  .store-benefits { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
  .store-benefits p { font-size: 12px; }
  .store-benefits strong { font-size: 13px; }
  .section-heading { flex-wrap: wrap; align-items: baseline; margin-bottom: 18px; }
  .section-heading h2 { font-size: 22px; }
  .section-heading h1 { font-size: 28px; }
  .catalog-grid { gap: 14px; }
  .catalog-card__visual { min-height: 92px; padding: 18px; }
  .catalog-card__body { padding: 18px; }
  .card { padding: 18px; }
  .card .nowrap { white-space: normal; }
  .page-head h1 { font-size: 28px; }
  .input, .select, .textarea { font-size: 16px; }
  .breadcrumbs { margin-bottom: 22px; font-size: 11px; }
  .purchase-panel { padding: 22px; }
  .product-heading h1 { font-size: 28px; }
  .product-prose { font-size: 14px; }
  .login-dialog { padding: 28px 24px; }
}
@media (max-width: 520px) {
  .catalog-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-card__visual { min-height: 104px; }
  .catalog-card__body { gap: 12px; }
  .catalog-card__lead { max-width: 50ch; }
  .home-hero h1 { font-size: 38px; }
  .section-heading > a { font-size: 12px; }
  .purchase-panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-dialog[open], .login-dialog[open]::backdrop { animation: none; }
  .btn:active:not(:disabled) { transform: none; }
}
