/* Five rooms for the same collection. Shared geometry keeps a look change still. */
:root,
:root[data-fuego-theme="afterhours"] {
  color-scheme: dark;
  --bg: #211a2a;
  --surface: #302538;
  --ink: #fff3e4;
  --muted: #d1bdcc;
  --line: #665269;
  --red: #ff967d;
  --blue: #c3afe6;
  --lime: #eed49c;
  --mf-button-ink: #271c29;
  --mf-frame: #c3afe6;
  --mf-frame-ink: #2e233b;
  --mf-mat: #362c42;
  --mf-mat-two: #443039;
  --mf-mat-three: #383b32;
  --mf-shop: #eed49c;
  --mf-shop-ink: #352820;
  --mf-accent: #ff967d;
  --mf-radius: 2px;
  --mf-shadow: 12px 12px 0 #140f1b;
  --mf-pattern: none;
}
:root[data-fuego-theme="poolside"] {
  color-scheme: light;
  --bg: #e4f2ed;
  --surface: #f6fcf8;
  --ink: #173e40;
  --muted: #3d6663;
  --line: #93b7ac;
  --red: #a33832;
  --blue: #1a646a;
  --lime: #235f54;
  --mf-button-ink: #fff5ea;
  --mf-frame: #b6d8e1;
  --mf-frame-ink: #173e40;
  --mf-mat: #c9e2d8;
  --mf-mat-two: #eecac0;
  --mf-mat-three: #d9e6b6;
  --mf-shop: #1f5a55;
  --mf-shop-ink: #f5f3d5;
  --mf-accent: #a33832;
  --mf-radius: 26px;
  --mf-shadow: 0 12px 0 #bbd3c9;
  --mf-pattern: linear-gradient(#37686712 1px, transparent 1px), linear-gradient(90deg, #37686712 1px, transparent 1px);
}
:root[data-fuego-theme="printshop"] {
  color-scheme: light;
  --bg: #f7da57;
  --surface: #ffe889;
  --ink: #292036;
  --muted: #554124;
  --line: #967235;
  --red: #812b38;
  --blue: #52324f;
  --lime: #473337;
  --mf-button-ink: #fff7df;
  --mf-frame: #f2aac0;
  --mf-frame-ink: #292036;
  --mf-mat: #eabc48;
  --mf-mat-two: #eab49b;
  --mf-mat-three: #c6c477;
  --mf-shop: #39283c;
  --mf-shop-ink: #fff0b6;
  --mf-accent: #812b38;
  --mf-radius: 0;
  --mf-shadow: 10px 10px 0 #292036;
  --mf-pattern: radial-gradient(#55412420 .6px, transparent .6px);
}
:root[data-fuego-theme="neonveranda"] {
  color-scheme: dark;
  --bg: #12393e;
  --surface: #19464a;
  --ink: #f2f3d9;
  --muted: #b8d2c8;
  --line: #67958e;
  --red: #ffa18b;
  --blue: #91ded3;
  --lime: #d0e592;
  --mf-button-ink: #14363a;
  --mf-frame: #22585b;
  --mf-frame-ink: #f2f3d9;
  --mf-mat: #255553;
  --mf-mat-two: #496158;
  --mf-mat-three: #325f66;
  --mf-shop: #c7d991;
  --mf-shop-ink: #163d3d;
  --mf-accent: #ffa18b;
  --mf-radius: 5px;
  --mf-shadow: 8px 8px 0 #0d2e32;
  --mf-pattern: none;
  --mf-nav-bg: #12393e;
  --mf-nav-ink: #f2f3d9;
  --mf-nav-line: #67958e;
  --mf-nav-accent: #ffa18b;
}
:root[data-fuego-theme="paperstudio"] {
  color-scheme: light;
  --bg: #ded8cd;
  --surface: #eee8dc;
  --ink: #283353;
  --muted: #54586b;
  --line: #828493;
  --red: #943d51;
  --blue: #2a48a0;
  --lime: #2d496c;
  --mf-button-ink: #fff2df;
  --mf-frame: #eee8dc;
  --mf-frame-ink: #283353;
  --mf-mat: #bbbecb;
  --mf-mat-two: #d1b3ad;
  --mf-mat-three: #c8c4ae;
  --mf-shop: #2d4489;
  --mf-shop-ink: #f5eada;
  --mf-accent: #943d51;
  --mf-radius: 0;
  --mf-shadow: 8px 8px 0 #a8aba8;
  --mf-pattern: none;
  --paper-cobalt: #2d4489;
  --paper-coral: #d2a29c;
  --paper-tape: #c7bb9c;
  --mf-nav-bg: #ded8cd;
  --mf-nav-ink: #283353;
  --mf-nav-line: #828493;
  --mf-nav-accent: #943d51;
}

html { background: var(--bg); }
.mf-header nav { flex-wrap: wrap; row-gap: 12px; }
@media (max-width: 380px) { .mf-header nav { gap: 12px; font-size: 14px; } }
body.mf-home, body.mf-catalog { background: var(--bg); color: var(--ink); }
.mf-home { background-image: var(--mf-pattern); background-size: 28px 28px; }
[data-fuego-theme="printshop"] .mf-home { background-size: 5px 5px; }
/* All changes use the same font metrics and grid, including on the first paint. */
.mf-home h1 { font-size: clamp(68px,7.6vw,118px); }
.mf-home .mf-hero { padding-top: 52px; }
.mf-home .mf-hero-art { transform: none; border-radius: var(--mf-radius); background: var(--mf-frame); color: var(--mf-frame-ink); box-shadow: var(--mf-shadow); padding: 30px 30px 20px; }
.mf-home .mf-hero-art > a { height: 430px; }
.mf-home .mf-hero-art img { filter: none; }
.mf-home .mf-hero-art figcaption { min-height: 18px; }
[data-fuego-theme="afterhours"] .mf-home h1 em { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 9px; }
[data-fuego-theme="poolside"] .mf-home h1 em { text-decoration: underline; text-decoration-style: wavy; text-decoration-thickness: 3px; text-underline-offset: 8px; }
[data-fuego-theme="printshop"] .mf-home h1 em { text-shadow: 3px 3px 0 #fff3b2; }
.mf-button { color: var(--mf-button-ink); background: var(--red); border-radius: var(--mf-radius); border: 1px solid transparent; }
.mf-button:hover { background: var(--red); filter: brightness(1.08); }
.mf-home .mf-art-image { background: var(--mf-mat); border-radius: var(--mf-radius); }
.mf-home .mf-art-card:nth-child(2) .mf-art-image { background: var(--mf-mat-two); }
.mf-home .mf-art-card:nth-child(3) .mf-art-image { background: var(--mf-mat-three); }
.mf-shop { background: var(--mf-shop); color: var(--mf-shop-ink); border-radius: var(--mf-radius); }
.mf-shop .mf-eyebrow, .mf-shop p:not(.mf-eyebrow) { color: inherit; }
.mf-shop .mf-button-light { background: var(--mf-shop-ink); color: var(--mf-shop); }
.mf-home .mf-studio-card { background: var(--bg); }
.mf-home .mf-about { background: var(--bg); }
.mf-home .mf-footer { background: var(--bg); }
/* A real, accessible choice, with an explicit persistent lock. */
.mf-mood { max-width: 1312px; margin: 0 auto; display: none; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 0 0; }
html[data-fuego-theme-ready="true"] .mf-mood { display: flex; }
.mf-mood[hidden] { display: none; }
.mf-mood-title { font-size: 12px; color: var(--muted); line-height: 1.5; }
.mf-mood-title strong { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.mf-mood-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mf-mood button { min-height: 44px; padding: 10px 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 50px; color: var(--ink); background: var(--bg); font: 500 13px Barlow,Arial,sans-serif; cursor: pointer; }
.mf-mood button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mf-mood button[aria-pressed="true"]::after { content: "✓"; }
.mf-mood button::after { content: ""; width: 10px; }
.mf-mood-swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #ffffff80; background: #c3afe6; }
[data-theme-choice="poolside"] .mf-mood-swatch { background: #72bcb2; }
[data-theme-choice="printshop"] .mf-mood-swatch { background: #f7da57; border-color: #29203660; }
.mf-mood-lock { display: flex; align-items: center; gap: 9px; min-height: 44px; margin-left: 10px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.mf-mood-lock input { width: 18px; height: 18px; accent-color: var(--red); margin: 0; }
.mf-mood button:focus-visible, .mf-mood input:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.mf-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* The gallery, shop, project directory and journal use the same tokens. */
html body.mf-shop-page { --bg: inherit; --ink: inherit; --muted: inherit; --line: inherit; }
.mf-catalog .mf-controls input, .mf-catalog .mf-controls select,
.mf-shop-page .browse-controls input, .mf-shop-page .browse-controls select { background: var(--surface); color: var(--ink); border-color: var(--line); }
.mf-controls input::placeholder, .mf-shop-page .browse-controls input::placeholder { color: var(--muted); }
.mf-catalog .mf-gallery-image { background: var(--mf-mat); border-radius: var(--mf-radius); }
.mf-catalog .mf-gallery-card:nth-child(3n+2) .mf-gallery-image { background: var(--mf-mat-two); }
.mf-catalog .mf-gallery-card:nth-child(3n+3) .mf-gallery-image { background: var(--mf-mat-three); }
.mf-catalog .mf-project { background: var(--surface); border-radius: var(--mf-radius); }
.mf-catalog .mf-access { color: var(--ink); border-color: var(--line); }
.mf-catalog .mf-filters button { border-color: var(--line); }
.mf-catalog .mf-filters button[aria-pressed="true"],
.mf-shop-page .browse-store .store-category-chip.is-active { background: var(--red); color: var(--mf-button-ink); border-color: var(--red); }
.mf-catalog .mf-journal-callout { color: var(--mf-frame-ink); background: var(--mf-frame); border-radius: var(--mf-radius); }
.mf-catalog .mf-hub-contact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--mf-radius); }
.mf-shop-page .browse-store .store-product-image { background: var(--mf-mat); border-radius: var(--mf-radius); }
.mf-shop-page .browse-store .store-product-copy h3, .mf-shop-page .browse-store .store-product-copy p { color: var(--ink); }
.mf-shop-page .browse-controls label, .mf-shop-page .browse-store .store-count,
.mf-shop-page .browse-store .browse-loading, .mf-shop-page .browse-store .store-empty-state,
.mf-shop-page .browse-store .browse-no-image, .mf-shop-page .browse-store .integration-note { color: var(--muted); }
.mf-shop-page .browse-store .browse-no-image { background: var(--mf-mat); }
/* Older tools and forms keep their established contrast-safe dark surfaces.
   Shared accents, navigation and typography carry the chosen room through them. */
body.mf-theme-legacy {
  --accent: var(--mf-accent); --accent-strong: var(--mf-frame); --accent-deep: var(--mf-accent);
  --bg: #211a2a; --bg-soft: #302538; --surface: #302538; --surface-strong: #302538;
  --ink: #fff3e4; --muted: #d1bdcc; --line: #665269;
  color-scheme: dark; background: var(--bg); color: var(--ink);
}
[data-fuego-theme="poolside"] body.mf-theme-legacy { --bg: #153c3c; --bg-soft: #204e4b; --surface: #204e4b; --surface-strong: #204e4b; --mf-accent: #ffb7a5; --line: #668d83; }
[data-fuego-theme="printshop"] body.mf-theme-legacy { --bg: #292036; --bg-soft: #382b43; --surface: #382b43; --surface-strong: #382b43; --mf-accent: #f7da57; --line: #8b7591; }
.mf-theme-legacy .fuego-ambient { display: none; }
.mf-theme-legacy .page-shell, .mf-theme-legacy .hero, .mf-theme-legacy .topbar { background: var(--bg); }
.mf-theme-legacy .hero::before, .mf-theme-legacy .hero::after { content: none; }
.mf-theme-legacy .topbar { border-bottom: 1px solid var(--line); }
.mf-theme-legacy .brand, .mf-theme-legacy .nav a, .mf-theme-legacy .nav-folder summary { color: var(--ink); text-shadow: none; }
.mf-theme-legacy .nav a.is-active { color: var(--accent); }
.mf-theme-legacy .button.primary { background: var(--accent); color: #211a2a; border-color: var(--accent); box-shadow: none; }
.mf-theme-legacy .button.ghost { color: var(--ink); border-color: var(--line); background: var(--surface); }
.mf-theme-legacy h1, .mf-theme-legacy h2 { text-shadow: none; }
@media (max-width: 1440px) { .mf-mood { margin-inline: 64px; } }
@media (max-width: 1000px) {
  .mf-mood { margin-inline: 32px; align-items: flex-start; }
  .mf-mood-options { justify-content: flex-end; }
  .mf-home .mf-hero { padding-top: 40px; }
  .mf-home .mf-hero-art > a { height: 350px; }
}
@media (max-width: 700px) {
  .mf-mood { margin-inline: 20px; padding-top: 20px; flex-direction: column; gap: 10px; }
  .mf-mood-title strong { display: inline; margin-right: 7px; }
  .mf-mood-title br { display: none; }
  .mf-mood-options { justify-content: flex-start; gap: 7px; }
  .mf-mood button { padding: 9px 10px; font-size: 12px; }
  .mf-mood-lock { margin-left: 0; }
  .mf-home .mf-hero { padding-top: 28px; gap: 32px; }
  .mf-home h1 { font-size: clamp(62px,16vw,88px); }
  .mf-home .mf-hero-art { margin: 0 5px 8px 0; padding: 24px 22px 18px; }
  .mf-home .mf-hero-art > a { height: 330px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* An original sun/flame printer's mark: a static signature shared by all five. */
 .mf-hero-art { position: relative; isolation: isolate; }
 .mf-fuego-stamp {
  position: absolute; top: -25px; right: 20px; width: 50px; height: 50px;
  z-index: 2; overflow: visible; pointer-events: none; color: var(--mf-frame-ink);
}
 .mf-stamp-ground { fill: var(--mf-frame); }
 .mf-stamp-rays { fill: none; stroke: currentColor; stroke-width: 1.5; }
 .mf-stamp-flame { fill: currentColor; fill-rule: evenodd; }
 .mf-veranda-art,
 .mf-paper-art {
  display: none; position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: -1; overflow: hidden;
}

/* Veranda: a neon sign held within the vocabulary of Miami architecture.
   Linework sits in the frame gutters; it never covers the actual artwork or copy. */
:root[data-fuego-theme="neonveranda"] .mf-hero-art {
  border-radius: 90px 90px 5px 5px;
  outline: 1px solid #67958e; outline-offset: -1px;
}
:root[data-fuego-theme="neonveranda"] .mf-veranda-art { display: block; }
:root[data-fuego-theme="neonveranda"] .mf-veranda-lines { fill: none; stroke: #91ded3; stroke-width: 1.4; opacity: .8; }
:root[data-fuego-theme="neonveranda"] .mf-veranda-leaves { fill: #92ad7d; opacity: .52; }
:root[data-fuego-theme="neonveranda"] .mf-hero h1 em {
  text-decoration: underline; text-decoration-color: #91ded3;
  text-decoration-thickness: 2px; text-underline-offset: 10px;
  text-shadow: 0 0 16px #ffa18b26;
}
:root[data-fuego-theme="neonveranda"] .mf-button {
  box-shadow: 0 0 0 3px #12393e, 0 0 0 4px #67958e;
}
:root[data-fuego-theme="neonveranda"] .mf-art-image { outline: 1px solid #67958e; outline-offset: -1px; }

/* Cut-paper studio: cut shapes, registration marks and a translucent tape tab.
   Printed planes carry the editorial weight without moving the type or painting. */
:root[data-fuego-theme="paperstudio"] .mf-home {
  background-image: repeating-linear-gradient(103deg, #28335305 0, #28335305 1px, transparent 1px, transparent 5px);
  background-size: auto;
}
:root[data-fuego-theme="paperstudio"] .mf-paper-art { display: block; }
:root[data-fuego-theme="paperstudio"] .mf-paper-cobalt { fill: var(--paper-cobalt); }
:root[data-fuego-theme="paperstudio"] .mf-paper-coral { fill: var(--paper-coral); }
:root[data-fuego-theme="paperstudio"] .mf-paper-tape { fill: var(--paper-tape); opacity: .8; }
:root[data-fuego-theme="paperstudio"] .mf-paper-registration { fill: none; stroke: var(--paper-cobalt); stroke-width: 1; opacity: .6; }
:root[data-fuego-theme="paperstudio"] .mf-hero h1 { isolation: isolate; }
:root[data-fuego-theme="paperstudio"] .mf-hero h1 em {
  position: relative;
  color: #f5eada;
  text-shadow: 2px 2px 0 #192d6d;
}
/* The paper paints behind every heading glyph, including the preceding line.
   An inline background paints later and can cover that line at the tight leading. */
:root[data-fuego-theme="paperstudio"] .mf-hero h1 em::before {
  content: ""; position: absolute; inset: .14em -8px .03em -5px; z-index: -1;
  background: #2d4489; pointer-events: none;
}
:root[data-fuego-theme="paperstudio"] .mf-hero-art {
  outline: 1px solid #b8b0a2; outline-offset: -1px;
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 3px, #28335305 3px, #28335305 4px);
}
:root[data-fuego-theme="paperstudio"] .mf-art-image { box-shadow: 5px 5px 0 #a8aba8; }
:root[data-fuego-theme="paperstudio"] .mf-button { box-shadow: 4px 4px 0 #b3a899; }


/* The frame treatments continue through the collection without covering its art. */
:root[data-fuego-theme="neonveranda"] :is(.mf-gallery-image, .mf-detail-visual) {
  outline: 1px solid #67958e; outline-offset: -1px;
  background-image: linear-gradient(90deg, transparent 12px, #91ded340 12px, #91ded340 13px, transparent 13px);
}
:root[data-fuego-theme="neonveranda"] :is(.mf-project, .mf-app-card) {
  box-shadow: inset 4px 0 0 #91ded3;
}
:root[data-fuego-theme="paperstudio"] :is(.mf-gallery-image, .mf-detail-visual) {
  box-shadow: 5px 5px 0 #a8aba8;
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 3px, #28335305 3px, #28335305 4px);
}
:root[data-fuego-theme="paperstudio"] :is(.mf-project, .mf-app-card) {
  box-shadow: 5px 5px 0 #a8aba8;
  background-image: linear-gradient(135deg, #2d448914 12px, transparent 12px);
}
/* Older tool/form surfaces stay dark, with readable versions of each palette. */
[data-fuego-theme="neonveranda"] body.mf-theme-legacy {
  --bg: #12393e; --bg-soft: #19464a; --surface: #19464a; --surface-strong: #19464a;
  --ink: #f2f3d9; --muted: #b8d2c8; --line: #67958e;
  --mf-accent: #ffa18b; --red: #ffa18b; --blue: #91ded3; --lime: #d0e592;
}
[data-fuego-theme="paperstudio"] body.mf-theme-legacy {
  --bg: #283353; --bg-soft: #354260; --surface: #354260; --surface-strong: #354260;
  --ink: #fff2df; --muted: #c9c9d6; --line: #8791ad;
  --mf-accent: #ffc3b5; --red: #ffc3b5; --blue: #a9beff; --lime: #e5dba8;
}
/* A reserved caption area and stable button labels prevent layout movement.
   The action row is separate from the five choices at every viewport width. */
.mf-mood { align-items: flex-start; }
.mf-mood-title { flex: 0 0 244px; min-width: 244px; min-height: 72px; }
#mf-theme-current { display: inline-block; min-width: 108px; }
#mf-theme-hint { display: block; max-width: 244px; min-height: 36px; }
.mf-mood-options { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
.mf-mood-actions { display: flex; flex: 0 0 100%; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mf-mood-actions button::after, #mf-theme-keep::after, #mf-theme-replay::after { display: none; }
#mf-theme-keep { min-width: 130px; justify-content: center; background: var(--red); color: var(--mf-button-ink); border-color: var(--red); }
#mf-theme-replay { min-width: 126px; justify-content: center; }
#mf-theme-keep[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--mf-button-ink); }
.mf-mood button:disabled { cursor: default; opacity: 1; }
.mf-mood button[aria-disabled="true"] { cursor: default; }
[data-theme-choice="neonveranda"] .mf-mood-swatch { background: #91ded3; border-color: #12393e; }
[data-theme-choice="paperstudio"] .mf-mood-swatch { background: #2d4489; border-color: #eee8dc; border-radius: 0; }
@media (max-width: 1000px) {
  .mf-mood-title { flex-basis: 210px; min-width: 210px; }
  :root[data-fuego-theme="neonveranda"] .mf-hero-art { border-radius: 60px 60px 5px 5px; }
}
@media (max-width: 700px) {
  .mf-mood-title { flex-basis: auto; min-width: 0; width: 100%; min-height: 72px; }
  .mf-mood-title strong { display: block; }
  .mf-mood-options { width: 100%; justify-content: flex-start; }
  .mf-mood-actions { justify-content: flex-start; gap: 7px; }
  #mf-theme-keep, #mf-theme-replay { min-width: 126px; }
  .mf-fuego-stamp { right: 14px; top: -22px; width: 44px; height: 44px; }
  :root[data-fuego-theme="neonveranda"] .mf-hero-art { border-radius: 58px 58px 5px 5px; }
}
