/* Shared storefront chrome. Loaded after each page's business-specific CSS. */
:root {
  --paper: #fff;
  --white: #fff;
  --ink: #19191b;
  --muted: #6f6f7b;
  --line: #e1e1e7;
  --orange: #f37021;
  --blue: #2a74db;
  --accent: var(--blue);
  --accent-pale: #f4f7fc;
  --accent-line: #aac6ee;
  /* Legacy business templates keep these names; their accent is now blue. */
  --green: var(--blue);
  --green-hover: #205eb5;
  --green-ink: #205eb5;
  --green-soft: var(--accent-pale);
  --radius: 8px;
  --radius-sm: 4px;
  color-scheme: light;
  font-family: Inter, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overscroll-behavior: none; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font-family: inherit; font-size: 14px; line-height: 1.65; overflow-x: clip; }
body > main { flex: 1; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a, button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.skip-link { position: absolute; top: -80px; left: 16px; padding: 12px; background: var(--paper); z-index: 100; }
.skip-link:focus { top: 12px; }
.page-shell { width: min(1280px, 100%); margin: auto; padding: 0 40px; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }

/* Existing shells are supported without renaming IDs or all page markup. */
.store-header, .site-header, .orders-header, .auth-header {
  position: static; height: auto; min-height: 64px; padding: 0; background: var(--paper); border-bottom: 1px solid var(--line); color: var(--ink);
}
.header-inner { width: min(1280px, 100%); min-height: 64px; height: auto; margin: auto; padding: 14px 40px; display: flex; align-items: center; gap: 24px; }
.header-inner .brand, .header-inner .wordmark { display: inline-flex; align-items: center; flex: none; gap: 8px; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.4; white-space: nowrap; }
.header-inner .brand-logo { flex: none; width: 52px; height: 35px; object-fit: contain; }
.header-inner .brand-subname { margin: 0; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.header-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-left: auto; padding: 0; }
.header-inner nav a { padding: 3px 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.header-inner nav a:hover, .header-inner nav a[aria-current="page"] { color: var(--ink); }
.header-inner .account-nav { flex: none; }
.header-inner .account-link { color: var(--muted); font-weight: 500; }
.header-inner .account-link:hover { color: var(--blue); }
.header-inner .account-register { border-radius: var(--radius-sm); background: var(--blue); color: #fff; }
.header-inner .account-register:hover { background: var(--green-hover); color: #fff; }
.header-inner .account-profile { border-color: var(--accent-line); border-radius: var(--radius-sm); background: var(--accent-pale); color: var(--blue); }
.header-inner .account-link:focus-visible { outline: 2px solid var(--blue); }
.header-inner .header-order { min-height: 34px; padding: 7px 14px; font-size: 12px; }
.site-announcement { min-height: 0; padding: 8px 16px; background: #000; border-bottom: 1px solid #000; color: #fff; text-align: center; }
.site-announcement p { white-space: pre-line; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }

/* Buttons and form controls retain business classes and disabled semantics. */
.button, .primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; transition: background 140ms, border-color 140ms; }
.button-green, .button-primary, .primary-button { border-color: var(--blue); background: var(--blue); color: #fff; }
.button-green:hover:not(:disabled), .button-primary:hover:not(:disabled), .primary-button:hover:not(:disabled) { border-color: var(--green-hover); background: var(--green-hover); }
.button-dark { border-color: #000; background: #000; color: #fff; }
.button-dark:hover { background: #252525; }
.button-outline, .secondary-button, .button-neutral { border-color: var(--line); background: var(--paper); color: var(--ink); }
.button-outline:hover:not(:disabled), .secondary-button:hover:not(:disabled), .button-neutral:hover:not(:disabled) { border-color: var(--accent-line); background: var(--accent-pale); }
.button-block { width: 100%; }
.field-label, .form-field > label { display: block; color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.form-field { min-width: 0; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { max-width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); padding: 11px 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
input:disabled, select:disabled, textarea:disabled { background: #f6f6f8; color: var(--muted); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); }
dialog { border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #0007; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.close-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); }
.close-button svg { width: 18px; height: 18px; }

/* Footer rules never select generic footer tags (dialogs have their own). */
.site-footer, .store-footer { margin-top: 64px; padding: 32px 0 76px; border-top: 1px solid #000; background: #000; color: #b8b8c2; font-size: 12px; }
.site-footer .footer-inner, .store-footer .footer-inner, .site-footer .site-footer-inner { width: min(1280px, 100%); min-height: 0; margin: auto; padding: 0 40px; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.site-footer .footer-inner:has(.footer-top) { display: block; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.footer-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.footer-identity > img { width: 66px; height: 44px; object-fit: contain; flex: none; }
.site-footer .footer-brand, .store-footer .footer-brand, .footer-wordmark { color: #fff; font-size: 17px; line-height: 1.4; font-weight: 700; letter-spacing: .4px; }
.footer-brand span { color: #b8b8c2; font-size: 12px; font-weight: 500; }
#site-footer-text { margin-top: 8px; max-width: 65ch; white-space: pre-line; overflow-wrap: anywhere; color: #b8b8c2; font-size: 12px; line-height: 1.8; }
.site-footer nav, .store-footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin-left: auto; padding: 0; font-size: 12px; }
.site-footer nav a, .store-footer nav a { color: #b8b8c2; }
.site-footer nav a:hover, .store-footer nav a:hover { color: #fff; }
.site-footer .footer-inner .button-outline, .store-footer .footer-inner .button-outline, .site-footer .site-footer-inner .button-outline { background: transparent; border-color: #55555e; color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 18px; min-height: 0; border-top: 1px solid #333; }
.footer-bottom small, .footer-icp { color: #b8b8c2; font-size: 11px; line-height: 1.8; }
.footer-icp { display: block; margin-top: 8px; }
.site-icp a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Catalog tiles: one hover rule includes non-link sold-out cards. */
.plan-card { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 14px; min-height: 350px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 2px 0 #19191b08; text-align: left; color: var(--ink); transition: border-color 140ms, transform 140ms; }
.plan-card:hover, .plan-card:focus-visible { border-color: var(--blue); transform: translateY(-2px); }
.plan-card.is-hot { border-color: var(--blue); }
.plan-card.is-hot::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: var(--blue); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-index { min-width: 0; color: var(--muted); font-size: 11px; letter-spacing: 1px; overflow-wrap: anywhere; }
.hot-badge { display: inline-flex; flex: none; align-items: center; gap: 4px; border: 1px solid var(--blue); border-radius: 999px; background: #fff; color: var(--blue); padding: 3px 8px; font-size: 11px; }
.hot-badge svg { width: 12px; height: 12px; fill: currentColor; }
.product-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-heading > div { min-width: 0; }
.plan-card h3 { font-size: 22px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; overflow-wrap: anywhere; }
.product-icon { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 6px; background: var(--ink); color: #fff; font-size: 30px; font-weight: 700; }
.product-icon img { width: 46px; height: 46px; object-fit: contain; }
.plan-subtitle, .plan-delivery { color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.plan-subtitle { margin-top: 4px; }
.plan-price { font-size: 48px; font-weight: 700; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 19px; margin-right: 4px; }
.price-decimal { font-size: 22px; }
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13px; }
.benefits li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; }
.benefits li::before { content: "◆"; color: var(--orange); font-size: 9px; line-height: 1.8; }
.card-action { margin-top: auto; }
.card-action .button, .more-card .button { width: 100%; }
.more-card { justify-content: center; border-style: dashed; text-align: center; align-items: center; }
.more-title { font-size: 24px; font-weight: 600; }
.more-description { font-size: 13px; color: var(--muted); }
.more-card .button { margin-top: auto; }

/* One real contact dialog shared by every user page. */
.contact-trigger { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 45; display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 11px 18px; border: 1px solid #ffffff80; border-radius: var(--radius-sm); background: #000; color: #fff; box-shadow: 0 6px 22px #0002; font-size: 13px; font-weight: 600; }
.contact-trigger:hover { background: #252525; }
.contact-trigger svg, .contact-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 24px; overflow: auto; box-shadow: 0 24px 70px #0002; }
.contact-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.contact-heading h2 { font-size: 24px; }
.contact-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.contact-close svg { width: 18px; height: 18px; }
.contact-description { margin-top: 16px; white-space: pre-line; overflow-wrap: anywhere; color: var(--muted); }
.contact-channel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.contact-channel > p { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.contact-channel > a:first-of-type, .contact-channel > strong { align-self: center; overflow-wrap: anywhere; min-width: 0; font-weight: 600; }
.contact-channel > a:first-of-type { text-decoration: underline; text-underline-offset: 3px; }
.contact-channel .button { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.contact-empty { padding-top: 24px; color: var(--muted); }
.contact-message { min-height: 20px; margin-top: 14px; font-size: 13px; color: var(--green-ink); }
@media (max-width: 860px) {
  .header-inner { gap: 16px; }
  .header-inner nav { gap: 14px; }
  .header-inner .header-order { display: none; }
}
@media (max-width: 580px) {
  .page-shell { padding: 0 20px; }
  .header-inner { padding: 12px 20px; flex-wrap: wrap; gap: 10px 16px; }
  .header-inner nav { display: flex; order: 3; width: 100%; margin-left: 0; gap: 18px; }
  .header-inner .account-nav { margin-left: auto; }
  .header-inner .brand-subname { font-size: 12px; }
  .site-footer .footer-inner, .store-footer .footer-inner, .site-footer .site-footer-inner { padding: 0 20px; }
  .footer-top { flex-direction: column; gap: 20px; }
  .site-footer nav, .store-footer nav { margin-left: 0; }
  .contact-trigger { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); min-height: 44px; padding: 10px 14px; font-size: 12px; }
  .contact-channel { grid-template-columns: minmax(0, 1fr); }
  .contact-channel .button { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
