/* Independent solid background layer. Loaded only by opt-in theme frames. */
[data-background] { background: var(--paper); color: var(--ink); }
[data-background-mode="dark"] { color-scheme: dark; }
[data-background-mode="light"] { color-scheme: light; }
[data-background] .home-brand,
[data-background] .home-visual,
[data-background] .product-visual,
[data-background] .gallery-main,
[data-background] .price-sheet,
[data-background] .official-contact,
[data-background] .contact-purchase,
[data-background] .inquiry-section { background: var(--surface); }
[data-background] .review-strip,
[data-background] .theme-sample-bar,
[data-background] .appearance-picker { background: var(--surface); color: var(--ink); }
[data-background] .theme-sample-bar { padding: 14px max(20px, calc((100% - 1240px)/2)); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; }
[data-background] .theme-sample-bar a { display: inline-flex; min-height: 44px; align-items: center; margin-inline-end: 16px; color: var(--blue); text-decoration: underline; }
[data-background] .theme-sample-bar p { font-size: 13px; }
[data-background] .appearance-picker { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: end; padding: 18px max(20px, calc((100% - 1240px)/2)); border-bottom: 1px solid var(--line); }
[data-background] .appearance-picker label { display: grid; gap: 6px; font-size: 14px; }
[data-background] .appearance-picker select,
[data-background] .appearance-picker input { min-height: 44px; max-width: 100%; border: 1px solid var(--line); border-radius: 4px; background: var(--input); color: var(--ink); }
[data-background] .appearance-picker select { padding: 8px 12px; }
[data-background] .appearance-picker input[type="color"] { width: 96px; padding: 4px; }
[data-background] .appearance-color { font-size: 14px; padding-bottom: 12px; }
[data-background] .appearance-picker p { width: 100%; font-size: 13px; color: var(--muted); }
[data-background] .appearance-presets { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; }
[data-background] .appearance-presets .button { min-height: 44px; font-size: 13px; padding: 8px 12px; }
[data-background] .field input,
[data-background] .field select,
[data-background] .field textarea,
[data-background] .copy-field input { background: var(--input); color: var(--ink); border-color: var(--line); }
[data-background] .field input::placeholder,
[data-background] .field textarea::placeholder { color: var(--muted); opacity: 1; }
[data-background] .primary,
[data-background] .light { background: var(--blue); color: var(--action-ink); }
[data-background] .primary:hover,
[data-background] .light:hover { background: var(--blue-deep); color: var(--action-hover-ink); }
[data-background] .secondary { background: var(--input); color: var(--blue); border-color: var(--blue); }
[data-background] .secondary:hover { background: var(--surface); color: var(--blue); }
[data-background] .spec-picker label { border-color: var(--line); }
[data-background] .spec-picker label:has(input:checked) { background: var(--blue); color: var(--action-ink); border-color: var(--blue); }
[data-background] .asset-frame { color: var(--ink); border-color: var(--line); }
[data-background] .home-visual figcaption > p { color: var(--muted); }
[data-background] .skip-link { background: var(--ink); color: var(--paper); }
[data-background] :focus-visible { outline-color: var(--blue); }
[data-background] .button:disabled { background: var(--input); color: var(--muted); }
[data-background] .field-error,
[data-background] .errorlist { color: var(--error-ink); }
[data-background] .field [aria-invalid="true"] { border-color: var(--error-ink); }
[data-background] .form-result,
[data-background] .form-result[data-state="failure"],
[data-background] .entry-feedback { background: var(--surface); color: var(--ink); }
[data-background] .site-header .brand { background: #d3dde3; padding: 10px 12px; border-radius: 4px; }
[data-background] .site-header .brand img { display: block; }
[data-background] .home-contact,
[data-background][data-theme="classic"] .home-brand-panel { background: var(--brand-panel); color: #f2e8d6; }
[data-background] .home-contact { --muted: #bacada; --blue: #d8bc85; --blue-deep: #e8cfa1; --action-ink: #142c45; --action-hover-ink: #142c45; }
[data-background] .home-contact h2,
[data-background] .home-contact .on-blue { color: #f2e8d6; }
[data-background] .home-contact p { color: #bacada; }
[data-background] .home-contact :focus-visible { outline-color: #d8bc85; }
/* Vivid keeps its yellow brand accents, with local foreground roles. */
[data-background][data-theme="vivid"] .home-brand-panel,
[data-background][data-theme="vivid"] .home-visual,
[data-background][data-theme="vivid"] .home-brand,
[data-background][data-theme="vivid"] .gallery-main,
[data-background][data-theme="vivid"] .contact-heading {
  background: var(--accent); --ink: var(--accent-ink); --muted: var(--accent-muted);
  --blue: var(--accent-link); --blue-deep: var(--accent-link); --line: var(--accent-line);
  --input: var(--accent-input); color: var(--ink);
}
@media(max-width:700px) { [data-background] .appearance-picker { padding-inline: 20px; } }

[data-background] .spec-picker input:checked + span { background: transparent; color: inherit; }
[data-background][data-theme="vivid"] .home-brand-panel,
[data-background][data-theme="vivid"] .home-visual,
[data-background][data-theme="vivid"] .home-brand,
[data-background][data-theme="vivid"] .gallery-main,
[data-background][data-theme="vivid"] .contact-heading { --action-ink: #ffffff; --action-hover-ink: #ffffff; }

[data-background] .theme-sample-bar a { min-width: 44px; }
[data-background] .home-contact .light { background: var(--blue); color: var(--action-ink); }
[data-background] .home-contact .light:hover { background: var(--blue-deep); color: var(--action-hover-ink); }

.theme-preview-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface, var(--paper)); color: var(--ink); }
.theme-preview-notice a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; }
[data-background] .partner-option { border-color: var(--line); }
[data-background] .category-controls a[aria-current="page"] { background: var(--blue); color: var(--action-ink); }
.category-controls a { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
