/* Shared Sunflower palette; the existing layout and motion stay intact. */
:root,
body,
body.shop-home {
  --background: #fff9ed;
  --sidebar: #f5edda;
  --surface: #fffdf7;
  --surface-solid: #fffdf7;
  --ink: #352919;
  --muted: #6c5b41;
  --line: #e6dac2;
  --line-strong: #c7b48e;
  --mint: #805b08;
  --mint-soft: #f4e8bb;
  --blue: #bd952d;
  --blue-soft: #f8edc9;
  --focus: #805b08;
  --teal: #805b08;
  --teal-dark: #684706;
  --teal-soft: #f4e8bb;
  --stage: #31452e;
  --stage-ink: #fffbed;
  --stage-muted: #d4ddc2;
  --shadow: 0 18px 42px #5c42100d;
  --sun-gold: #edbf3d;
  --sun-gold-hover: #dfae29;
  --sun-gold-ink: #3d2b0b;
  --sun-relay: #f7efcf;
  --sun-business: #efe5d1;
}

body { color: var(--ink); background: var(--background); }
::selection,
.shop-home ::selection,
.guide-layout ::selection { color: #3d2b0b; background: #f1d470; }
a:focus-visible,
.sidebar a:focus-visible { outline-color: var(--focus); }

.shop-home .brand-logo { background: transparent; }
.shop-home .brand-logo img,
.portal-logo img { object-fit: contain; mix-blend-mode: normal; }
.portal-logo,
.portal-logo img { width: 36px; height: 36px; }

.shop-home .card-action .primary-link {
  color: var(--sun-gold-ink);
  background: var(--sun-gold);
  border-color: var(--sun-gold);
}
.shop-home .card-action .primary-link:hover {
  color: var(--sun-gold-ink);
  background: var(--sun-gold-hover);
  border-color: var(--sun-gold-hover);
}
.shop-home .gpt-pass,
.shop-home .gpt-pass:hover { background: #31452e; color: #fffbed; }
.shop-home .gpt-pass::after { border-color: #b8a74d; }
.shop-home .hero-stage .claude-pass { background: #f6e6b9; color: #3d2b0b; }
.shop-home .relay-card,
.shop-home .relay-contact { background: var(--sun-relay); }
.shop-home .business-contact { background: var(--sun-business); }
.shop-home .business-contact .wechat-contact p,
.shop-home .business-contact .contact-card-heading p { color: var(--muted); }
.shop-home .wechat-icon { background: #e4d6b5; color: #6c4b10; }

.sidebar { background: var(--sidebar); color: var(--ink); border-color: var(--line); }
.portal-brand strong,
.menu-item { color: var(--ink); }
.portal-brand small,
.nav-caption,
.sidebar-footer p,
.sidebar-footer a { color: var(--muted); }
.sidebar-footer { border-color: var(--line); }
.menu-item:hover { color: var(--teal-dark); background: var(--teal-soft); }
.menu-item.is-active { color: var(--teal-dark); background: #efdda0; }
.workspace,
.embed-shell,
.embed-toolbar,
.embed-stage iframe { background: var(--surface); }
.embed-stage { background: var(--background); }
.open-external { border-color: var(--line-strong); }
.frame-loading { color: var(--muted); background: #fff9edf5; }
.frame-loading > span { border-color: var(--line-strong); border-top-color: var(--teal); }

.guide { color: var(--ink); }
.guide h1,
.guide h2,
.guide h4 { color: var(--ink); }
.guide h3,
.guide a,
.guide .word-teal,
.guide .word-amber { color: var(--teal-dark); }
.guide blockquote { border-color: var(--line); background: #fbf5e7; }
.guide .note-info { border-color: #dfd0a3; background: #faf1d9; }
.guide .note-warning { border-color: #e7cf89; background: #fff2c8; }
.guide .note-success { border-color: #cfd8b7; background: #f0f3e7; }
.guide .word-highlight { background: #f6df8b; }
.guide .word-blue-highlight { background: #6c4c14; color: #fff9ed; }
.guide .word-shade { background: #f0e8d5; }
.guide th { background: #f1e5bc; color: #64470d; }
.price-tables th { background: #604920; color: #fffbed; }
.price-tables > :nth-child(2) th,
.price-tables > :nth-child(3) th { background: #435331; color: #fffbed; }
.guide pre { background: #f6eedc; }
.guide-toc summary,
.guide-toc .toc-level-2 { color: var(--teal-dark); }
.guide-toc a { color: var(--muted); }
.guide-toc a:hover,
.guide-toc a[aria-current] { background: var(--teal-soft); color: var(--teal-dark); }
.guide-toc summary:focus-visible,
.guide-toc a:focus-visible,
.guide .table-scroll:focus-visible,
.guide :focus-visible { outline-color: var(--focus); }
.guide-toc nav { scrollbar-color: var(--line-strong) transparent; }

.shop-home .qr-grid.sunflower-single-group { grid-template-columns: minmax(0, 1fr); }
.shop-home .qr-window.sunflower-qq { aspect-ratio: auto; }
.shop-home .qr-window.sunflower-qq::before { display: none; }
.shop-home .qr-window.sunflower-qq img {
  position: static;
  width: 100%;
  max-width: 300px;
  height: auto;
  left: auto;
  top: auto;
}

@media (max-width: 959px) {
  .guide-toc,
  .guide-toc nav { background: var(--surface); }
}

@media (prefers-color-scheme: dark) {
  :root,
  body,
  body.shop-home {
    --background: #221e15;
    --sidebar: #2b2619;
    --surface: #2d281c;
    --surface-solid: #2d281c;
    --ink: #f9f1df;
    --muted: #d4c6a7;
    --line: #4e4430;
    --line-strong: #81714b;
    --mint: #efcc6b;
    --mint-soft: #45391c;
    --focus: #efcc6b;
    --teal: #efcc6b;
    --teal-dark: #efcc6b;
    --teal-soft: #45391c;
    --stage: #c9d4a5;
    --stage-ink: #273220;
    --stage-muted: #c9d4a5;
    --sun-relay: #39311e;
    --sun-business: #342e21;
  }
  .shop-home .wechat-icon { background: #4b3c20; color: #efcc6b; }
  .menu-item.is-active { color: #f3d781; background: #4b3c20; }
  .frame-loading { background: #221e15f5; }
  .guide blockquote { background: #342e21; border-color: #5b4d31; }
  .guide .note-info { background: #3b321e; border-color: #6c5930; }
  .guide .note-warning { background: #43361a; border-color: #846825; }
  .guide .note-success { background: #2c3725; border-color: #536347; }
  .guide .note-danger { background: #412825; border-color: #765048; }
  .guide .word-red { color: #ffb4a6; }
  .guide .word-blue { color: #b7d4f4; }
  .guide .word-green { color: #c9dda7; }
  .guide .word-navy { color: #c3d4ee; }
  .guide .word-highlight { background: #5b491b; color: #fff0bc; }
  .guide .word-shade { background: #403720; }
  .guide th { background: #44391e; color: #f3d781; }
  .price-tables th { background: #604920; color: #fffbed; }
  .price-tables > :nth-child(2) th,
  .price-tables > :nth-child(3) th { background: #435331; color: #fffbed; }
  .guide pre { background: #342e21; }
}
