:root {
  --canvas: #f5f5ee;
  --surface: #fffefa;
  --surface-soft: #f0f3e9;
  --ink: #1b3026;
  --ink-strong: #102c20;
  --muted: #52665a;
  --line: #dce5d8;
  --line-strong: #c9d6c9;
  --forest: #14583e;
  --forest-deep: #103c2d;
  --red: #b83226;
  --theme-accent: #14583e;
  --theme-accent-soft: #e3f0e2;
  --warning-ink: #674510;
}

.app-shell { width: min(100%, 1440px); }
.topbar { background: rgba(253, 253, 248, .96); border-bottom: 1px solid var(--line); }
.brand-mark { border-radius: 14px; background: var(--forest); }
.brand-copy strong { font-size: 15px; letter-spacing: -.3px; }
.brand-copy small { color: #647669; }
.language-control select, .ambient-dock {
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: none;
}
.main-content { width: min(100%, 1160px); }
.home-page { gap: 30px; }
.hero {
  min-height: 280px;
  border-radius: 26px;
  background: linear-gradient(125deg, #103d2e, #1d6845);
  box-shadow: 0 16px 40px rgba(16, 61, 46, .14);
}
.hero h1, .section-head h2, .quick-flow-head h2, .promo-title-line h3,
.builder-heading h1, .content-panel h2, .help-sheet h2 {
  font-family: inherit;
  font-weight: 850;
  letter-spacing: -.045em;
}
.hero h1 { font-size: clamp(38px, 4.5vw, 58px); line-height: 1.04; }
.hero p { color: #e6f4e9; font-size: 16px; }
.hero-help { min-height: 44px; font-size: 12px; }
.hero-art-panel { box-shadow: 0 14px 28px rgba(0, 0, 0, .17); }
.hero-art-panel-main, .hero-art-panel-small { animation: none; }
.section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.section-kicker, .mini-eyebrow { color: var(--forest); }
.promo-card {
  border-color: #dbe5d8;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(27, 55, 37, .06);
}
.promo-media { background: #e7eddf; }
.promo-title-line h3 { font-size: 24px; }
.promo-title-line h3 span { font-family: inherit; font-size: 13px; }
.promo-price, .price-pill strong, .sticky-total strong, .summary-price {
  font-family: inherit;
  font-weight: 850;
  letter-spacing: -.045em;
}
.promo-price { font-size: clamp(32px, 3.2vw, 42px); }
.pricing-status-note { font-size: 12px; line-height: 1.45; }
.primary-button, .secondary-button, .ghost-button {
  min-height: 50px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 750;
}
.primary-button { background: var(--forest); box-shadow: none; }
.primary-button:hover { background: #104c36; box-shadow: none; }
.primary-button:disabled { opacity: 1; background: #e1e8df; color: #5d6e60; }
.poster-link { min-height: 44px; font-size: 12px; }
.quick-flow, .home-note, .content-panel, .summary-card {
  border-color: var(--line);
  box-shadow: 0 6px 22px rgba(27, 55, 37, .045);
}
.quick-flow-item { background: #f3f6ed; }
.quick-flow-item strong { font-size: 12px; }
.quick-flow-item small, .home-note p { font-size: 12px; }
.back-link { font-size: 13px; }
.builder-heading h1 { font-size: clamp(26px, 3vw, 36px); }
.builder-heading p, .panel-hint { font-size: 14px; line-height: 1.55; }
.price-pill { background: #fff; }
.step-chip { min-height: 52px; border-radius: 14px; }
.step-chip strong { font-size: 12px; white-space: normal; line-height: 1.2; }
.tap-guidance { font-size: 12px; }
.content-panel h2 { font-size: 25px; }
.group-label { font-size: 12px; }
.group-label small { font-size: 11px; }
.product-card, .list-card { border-radius: 16px; background: #fff; }
.variant-dialog { width: min(720px, calc(100vw - 24px)); max-height: min(82dvh, 900px); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 28px 80px rgba(10,30,20,.28); }
.variant-dialog::backdrop { background: rgba(10,25,18,.58); }
.variant-sheet { padding: 18px; }
.variant-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.variant-heading p { margin: 0 0 4px; color: var(--theme-accent); font-size: .8rem; font-weight: 700; }
.variant-heading h2 { margin: 0; }
.variant-dialog .option-grid { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
@media (prefers-reduced-motion: no-preference) {
  .variant-dialog[open] .variant-sheet { animation: variant-sheet-in .24s ease-out; }
  @keyframes variant-sheet-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 600px) {
  .variant-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 85dvh; margin: 0; border-radius: 22px 22px 0 0; }
  .variant-sheet { padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
}
.product-card.selected, .list-card.selected {
  border-color: var(--theme-accent);
  background: var(--theme-accent-soft);
  box-shadow: 0 0 0 2px var(--theme-accent-soft);
}
.product-name, .list-copy strong { font-size: 14px; }
.product-original, .product-detail, .list-copy em, .list-copy small { font-size: 12px; line-height: 1.45; }
.price-tag { font-size: 11px; }
.selection-recap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 20px;
}
.selection-recap-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 64px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--theme-accent-soft);
  color: var(--ink-strong);
  text-align: left;
  cursor: pointer;
}
.selection-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 10px;
  background: #f3f0e8;
  font-size: 25px;
}
.selection-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.selection-thumb.image-failed::before { content: attr(data-fallback); }
.selection-recap-copy { display: grid; flex: 1; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.selection-recap-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.selection-recap-copy strong { font-size: 13px; line-height: 1.3; }
.selection-recap-disclosure { color: var(--muted); font-size: 10px; line-height: 1.3; }
.selection-recap-edit { align-self: center; color: var(--theme-accent); font-size: 11px; font-weight: 700; }
.summary-product { display: flex; align-items: flex-start; gap: 12px; flex: 1; }
.summary-product-copy { min-width: 0; }
.summary-product .selection-thumb { flex-basis: 64px; width: 64px; height: 64px; }
.summary-line--product { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.summary-line .summary-image-disclosure, .summary-line .summary-line-note { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: none; }
.summary-line .summary-image-disclosure { margin-top: 4px; }
.summary-line .summary-line-note { grid-column: 1 / -1; margin: 3px 0 0; }
.sticky-action { border-top-color: var(--line); background: rgba(255, 254, 250, .97); }
.sticky-total small { font-size: 10px; }
.sticky-selection-state, .sticky-selection small { font-size: 11px; }
.sticky-selection small { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.summary-line strong, .summary-line .amount { font-size: 15px; }
.summary-line small, .summary-caption, .cashier-callout small, .price-disclaimer { font-size: 12px; }
.summary-line small { letter-spacing: .02em; }
.cashier-callout { background: #edf5e9; border-color: #d4e5d1; }
.help-step p, #ambientStatus, .ambient-empty small, .ambient-footnote { font-size: 12px; }
.draft-preview-notice {
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid #e6c77e;
  border-radius: 12px;
  background: #fff5d9;
  color: #674510;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.screen-enter { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .screen-changed .screen-enter, .screen-changed > .content-panel,
  .screen-changed > .summary-card {
    animation: experience-enter .24s cubic-bezier(.2, .7, .2, 1) both;
  }
  @keyframes experience-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .selection-changed .product-card.selected, .selection-changed .list-card.selected {
    animation: selection-feedback .18s ease-out both;
  }
  @keyframes selection-feedback {
    from { transform: scale(.98); }
    to { transform: scale(1); }
  }
}

@media (max-width: 640px) {
  .topbar { padding: max(8px, env(safe-area-inset-top)) 16px 8px; }
  .topbar-inner { min-height: 48px; }
  .brand { gap: 8px; }
  .brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: 14px; white-space: nowrap; }
  .header-tools { gap: 7px; }
  .language-control select { min-width: 105px; width: 118px; min-height: 44px; font-size: 12px; }
  .ambient-dock, .ambient-dock.is-compact { width: 44px; min-width: 44px; min-height: 44px; }
  .main-content { padding: 16px 16px 64px; }
  .home-page { gap: 24px; }
  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 8px;
    padding: 24px 20px;
    border-radius: 22px;
  }
  .eyebrow { font-size: 10px; line-height: 1.4; letter-spacing: .08em; }
  .hero h1 { margin: 12px 0 9px; font-size: clamp(28px, 8vw, 38px); line-height: 1.04; }
  .hero p { font-size: 13px; line-height: 1.5; }
  .hero-foot { margin-top: 13px; font-size: 10px; }
  .hero-help { margin-top: 12px; padding: 8px 12px; font-size: 12px; }
  .hero-art { min-height: 156px; }
  .hero-art-orbit { width: 122px; height: 122px; right: -24px; }
  .hero-art-panel-main { top: 24px; right: -1px; width: 100px; height: 92px; }
  .hero-art-panel-small { right: -8px; bottom: 0; width: 53px; height: 53px; }
  .hero-art-note { display: none; }
  .section-head { align-items: flex-start; }
  .section-head h2 { font-size: 23px; line-height: 1.12; }
  .section-aside { max-width: 105px; font-size: 10px; }
  .promo-grid { gap: 12px; }
  .promo-card { grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); border-radius: 19px; }
  .promo-body { padding: 16px 14px 12px; }
  .promo-title-line h3 { font-size: 19px; }
  .promo-title-line h3 span { font-size: 12px; }
  .promo-price-row { margin-top: 10px; }
  .promo-price-row > div > small { font-size: 10px; }
  .promo-price { font-size: 29px; }
  .promo-body .primary-button { min-height: 48px; margin-top: 12px; font-size: 13px; }
  .pricing-status-note { padding: 8px; font-size: 11px; }
  .poster-link { min-height: 44px; font-size: 11px; }
  .promo-tag { max-width: 100%; font-size: 9px; }
  .quick-flow { padding: 18px; }
  .quick-flow-grid { grid-template-columns: 1fr; gap: 8px; }
  .quick-flow-item { min-height: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr); padding: 10px; }
  .quick-flow-item > span { width: 30px; height: 30px; }
  .quick-flow-item strong, .quick-flow-item small { font-size: 12px; }
  .home-note p { font-size: 12px; }
  .builder-heading h1 { font-size: 27px; }
  .builder-heading p, .panel-hint { font-size: 13px; }
  .price-pill { min-width: 104px; }
  .price-pill strong { font-size: 20px; overflow-wrap: anywhere; }
  .stepper { gap: 6px; }
  .step-chip { min-height: 48px; padding: 7px; }
  .step-chip strong { font-size: 11px; }
  .tap-guidance { font-size: 12px; }
  .content-panel { padding: 18px 14px; border-radius: 18px; }
  .content-panel h2 { font-size: 23px; }
  .product-card { min-height: 190px; }
  .product-name { font-size: 13px; }
  .product-original, .product-detail { font-size: 11px; }
  .list-card { min-height: 76px; }
  .list-copy strong { font-size: 13px; }
  .list-copy em, .list-copy small { font-size: 11px; }
  .sticky-action { margin: 14px -16px -64px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .sticky-inner { grid-template-columns: minmax(90px, .75fr) minmax(0, 1.25fr); gap: 8px 12px; }
  .sticky-total strong { font-size: 21px; }
  .sticky-selection { grid-column: 1 / -1; grid-row: 1; gap: 5px; }
  .sticky-selection small { flex: 0 0 100%; width: 100%; min-width: 0; }
  .sticky-selection-state, .sticky-selection small { font-size: 10px; }
  .sticky-inner .primary-button { min-height: 48px; font-size: 13px; }
  .summary-card { padding: 0 18px 20px; }
  .summary-head { margin: 0 -18px; padding: 18px; font-size: 10px; }
  .summary-price { font-size: 46px; }
  .summary-line strong, .summary-line .amount { font-size: 14px; }
  .cashier-actions .primary-button, .cashier-actions .secondary-button, .cashier-actions .ghost-button { min-height: 48px; font-size: 13px; }
}

@media (max-width: 600px) {
  .selection-recap { grid-template-columns: minmax(0, 1fr); }
  .selection-thumb { flex-basis: 48px; width: 48px; height: 48px; }
  .summary-product .selection-thumb { flex-basis: 56px; width: 56px; height: 56px; }
}

@media (max-width: 370px) {
  .topbar { padding-right: 12px; padding-left: 12px; }
  .brand-copy strong { font-size: 13px; }
  .language-control select { width: 104px; min-width: 104px; max-width: 104px; font-size: 11px; }
  .hero { grid-template-columns: minmax(0, 1fr) 74px; padding: 20px 16px; }
  .hero h1 { font-size: 27px; }
  .hero-art-panel-main { width: 83px; height: 80px; }
  .promo-card { grid-template-columns: minmax(90px, 31%) minmax(0, 1fr); }
  .sticky-inner { grid-template-columns: minmax(80px, .75fr) minmax(0, 1.25fr); }
  .sticky-inner .primary-button { font-size: 12px; }
  .sticky-total strong { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen-enter, .screen-changed > .content-panel, .screen-changed > .summary-card,
  .selection-changed .product-card.selected, .selection-changed .list-card.selected { animation: none !important; }
}
