/* Color themes. Type, space, radius, shadow, and motion stay in tokens.css.
   A theme only replaces color tokens, a photo wash, and one ambient layer. */

html[data-theme="minimal"][data-mode="light"] #app.phone,
.theme-sample[data-theme="minimal"][data-mode="light"] {
  color-scheme: light;
  --bg: #FFFFFF; --grouped: #F2F2F7; --elevated: #FFFFFF;
  --ink: #000000; --muted: #636366;
  --label-secondary: rgba(60, 60, 67, 0.6); --label-tertiary: rgba(60, 60, 67, 0.45);
  --separator: rgba(60, 60, 67, 0.18); --fill: rgba(120, 120, 128, 0.12); --line: var(--separator);
  --accent: #000000; --accent-button: #000000; --accent-on: #FFFFFF; --secondary: #636366;
  --accent-tint: color-mix(in srgb, var(--accent) 10%, var(--elevated));
  --bar: rgba(255, 255, 255, 0.72); --photo-wash: transparent;
}
html[data-theme="minimal"][data-mode="dark"] #app.phone,
.theme-sample[data-theme="minimal"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #000000; --grouped: #1C1C1E; --elevated: #2C2C2E;
  --ink: #FFFFFF; --muted: #C7C7CC;
  --label-secondary: rgba(235, 235, 245, 0.6); --label-tertiary: rgba(235, 235, 245, 0.4);
  --separator: rgba(84, 84, 88, 0.65); --fill: rgba(120, 120, 128, 0.24); --line: var(--separator);
  --accent: #FFFFFF; --accent-button: #FFFFFF; --accent-on: #000000; --secondary: #C7C7CC;
  --accent-tint: color-mix(in srgb, var(--accent) 14%, var(--elevated));
  --bar: rgba(28, 28, 30, 0.72); --photo-wash: transparent;
}

html[data-theme="pnw"][data-mode="light"] #app.phone,
.theme-sample[data-theme="pnw"][data-mode="light"] {
  color-scheme: light;
  --bg: #F7F9F8; --grouped: #EEF1EF; --elevated: #FFFFFF;
  --ink: #14201B; --muted: #3E4A46;
  --label-secondary: rgba(20, 40, 32, 0.62); --label-tertiary: rgba(20, 40, 32, 0.45);
  --separator: rgba(20, 40, 32, 0.16); --fill: rgba(47, 93, 70, 0.10); --line: var(--separator);
  --accent: #2F5D46; --accent-button: #2F5D46; --accent-on: #FFFFFF; --secondary: #1E4A36;
  --accent-tint: color-mix(in srgb, var(--accent) 14%, var(--elevated));
  --bar: rgba(238, 241, 239, 0.78); --photo-wash: rgba(47, 93, 70, 0.12);
}
html[data-theme="pnw"][data-mode="dark"] #app.phone,
.theme-sample[data-theme="pnw"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #0E1412; --grouped: #15201B; --elevated: #1C2A24;
  --ink: #F4F7F5; --muted: #D7E0DC;
  --label-secondary: rgba(215, 224, 220, 0.62); --label-tertiary: rgba(215, 224, 220, 0.42);
  --separator: rgba(215, 224, 220, 0.18); --fill: rgba(127, 184, 154, 0.16); --line: var(--separator);
  --accent: #7FB89A; --accent-button: #2F5D46; --accent-on: #FFFFFF; --secondary: #8FCBB0;
  --accent-tint: color-mix(in srgb, var(--accent) 18%, var(--elevated));
  --bar: rgba(21, 32, 27, 0.78); --photo-wash: rgba(127, 184, 154, 0.14);
}

html[data-theme="christmas"][data-mode="light"] #app.phone,
.theme-sample[data-theme="christmas"][data-mode="light"] {
  color-scheme: light;
  --bg: #FFFCF7; --grouped: #FBF7F0; --elevated: #FFFFFF;
  --ink: #241816; --muted: #5C534C;
  --label-secondary: rgba(36, 24, 22, 0.62); --label-tertiary: rgba(36, 24, 22, 0.45);
  --separator: rgba(36, 24, 22, 0.16); --fill: rgba(80, 40, 20, 0.10); --line: var(--separator);
  --accent: #B3261E; --accent-button: #B3261E; --accent-on: #FFFFFF; --secondary: #1F4D3A;
  --accent-tint: color-mix(in srgb, var(--accent) 12%, var(--elevated));
  --bar: rgba(251, 247, 240, 0.8); --photo-wash: rgba(179, 38, 30, 0.12);
}
html[data-theme="christmas"][data-mode="dark"] #app.phone,
.theme-sample[data-theme="christmas"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #140E0C; --grouped: #1E1614; --elevated: #2A1E1A;
  --ink: #FFF8F4; --muted: #E4D5CE;
  --label-secondary: rgba(255, 248, 244, 0.62); --label-tertiary: rgba(255, 248, 244, 0.42);
  --separator: rgba(255, 248, 244, 0.16); --fill: rgba(255, 107, 94, 0.16); --line: var(--separator);
  --accent: #FF6B5E; --accent-button: #B3261E; --accent-on: #FFFFFF; --secondary: #8FCBB0;
  --accent-tint: color-mix(in srgb, var(--accent) 18%, var(--elevated));
  --bar: rgba(30, 22, 20, 0.78); --photo-wash: rgba(255, 107, 94, 0.14);
}

html[data-theme="nieve"][data-mode="light"] #app.phone,
.theme-sample[data-theme="nieve"][data-mode="light"] {
  color-scheme: light;
  --bg: #F8FBFE; --grouped: #F1F6FC; --elevated: #FFFFFF;
  --ink: #122033; --muted: #3E4C5C;
  --label-secondary: rgba(18, 32, 51, 0.62); --label-tertiary: rgba(18, 32, 51, 0.45);
  --separator: rgba(18, 32, 51, 0.14); --fill: rgba(42, 111, 219, 0.10); --line: var(--separator);
  --accent: #1B4F9C; --accent-button: #2A6FDB; --accent-on: #FFFFFF; --secondary: #1B4F9C;
  --accent-tint: color-mix(in srgb, #2A6FDB 14%, var(--elevated));
  --bar: rgba(241, 246, 252, 0.8); --photo-wash: rgba(42, 111, 219, 0.10);
}
html[data-theme="nieve"][data-mode="dark"] #app.phone,
.theme-sample[data-theme="nieve"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #0B1220; --grouped: #10182A; --elevated: #18243A;
  --ink: #F4F7FC; --muted: #C9D4E8;
  --label-secondary: rgba(201, 212, 232, 0.64); --label-tertiary: rgba(201, 212, 232, 0.42);
  --separator: rgba(201, 212, 232, 0.18); --fill: rgba(127, 178, 255, 0.16); --line: var(--separator);
  --accent: #7FB2FF; --accent-button: #1B4F9C; --accent-on: #FFFFFF; --secondary: #7FB2FF;
  --accent-tint: color-mix(in srgb, var(--accent) 18%, var(--elevated));
  --bar: rgba(16, 24, 42, 0.78); --photo-wash: rgba(127, 178, 255, 0.12);
}

html[data-theme="nochebuena"][data-mode="light"] #app.phone,
.theme-sample[data-theme="nochebuena"][data-mode="light"] {
  color-scheme: light;
  --bg: #FBF6EC; --grouped: #F4EDE2; --elevated: #FFFCF6;
  --ink: #1A1408; --muted: #5C5348;
  --label-secondary: rgba(26, 20, 8, 0.62); --label-tertiary: rgba(26, 20, 8, 0.45);
  --separator: rgba(26, 20, 8, 0.14); --fill: rgba(92, 67, 12, 0.10); --line: var(--separator);
  --accent: #5C430C; --accent-button: #6E5210; --accent-on: #FFFFFF; --secondary: #8A6412;
  --accent-tint: color-mix(in srgb, #C4922E 22%, var(--elevated));
  --bar: rgba(244, 237, 226, 0.82); --photo-wash: rgba(196, 146, 46, 0.16);
}
html[data-theme="nochebuena"][data-mode="dark"] #app.phone,
.theme-sample[data-theme="nochebuena"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #0E1628; --grouped: #121C32; --elevated: #18223A;
  --ink: #F8F1E4; --muted: #E4D7C4;
  --label-secondary: rgba(248, 241, 228, 0.64); --label-tertiary: rgba(248, 241, 228, 0.42);
  --separator: rgba(248, 241, 228, 0.16); --fill: rgba(232, 176, 75, 0.16); --line: var(--separator);
  --accent: #E8B04B; --accent-button: #E8B04B; --accent-on: #1A1408; --secondary: #F2D48A;
  --accent-tint: color-mix(in srgb, var(--accent) 18%, var(--elevated));
  --bar: rgba(14, 22, 40, 0.78); --photo-wash: rgba(232, 176, 75, 0.18);
}

html[data-theme="peru"][data-mode="light"] #app.phone,
.theme-sample[data-theme="peru"][data-mode="light"] {
  color-scheme: light;
  --bg: #FBF7F2; --grouped: #F7F1E8; --elevated: #FFFCF8;
  --ink: #2A1C14; --muted: #5A463C;
  --label-secondary: rgba(42, 28, 20, 0.62); --label-tertiary: rgba(42, 28, 20, 0.45);
  --separator: rgba(42, 28, 20, 0.14); --fill: rgba(163, 74, 40, 0.10); --line: var(--separator);
  --accent: #A34A28; --accent-button: #A34A28; --accent-on: #FFFFFF; --secondary: #E8B923;
  --accent-tint: color-mix(in srgb, var(--accent) 12%, var(--elevated));
  --bar: rgba(247, 241, 232, 0.82); --photo-wash: rgba(163, 74, 40, 0.12);
}
html[data-theme="peru"][data-mode="dark"] #app.phone,
.theme-sample[data-theme="peru"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #160F0C; --grouped: #241810; --elevated: #2E2018;
  --ink: #FBF6F0; --muted: #E6D2C4;
  --label-secondary: rgba(251, 246, 240, 0.64); --label-tertiary: rgba(251, 246, 240, 0.42);
  --separator: rgba(251, 246, 240, 0.16); --fill: rgba(233, 138, 94, 0.16); --line: var(--separator);
  --accent: #E98A5E; --accent-button: #9A4528; --accent-on: #FFFFFF; --secondary: #F0C24A;
  --accent-tint: color-mix(in srgb, var(--accent) 16%, var(--elevated));
  --bar: rgba(36, 24, 16, 0.8); --photo-wash: rgba(233, 138, 94, 0.14);
}

html[data-theme="espana"][data-mode="light"] #app.phone,
.theme-sample[data-theme="espana"][data-mode="light"] {
  color-scheme: light;
  --bg: #FBF6EC; --grouped: #F8F1E3; --elevated: #FFFCF6;
  --ink: #2A1410; --muted: #5C463C;
  --label-secondary: rgba(42, 20, 16, 0.62); --label-tertiary: rgba(42, 20, 16, 0.45);
  --separator: rgba(42, 20, 16, 0.14); --fill: rgba(170, 21, 27, 0.10); --line: var(--separator);
  --accent: #AA151B; --accent-button: #AA151B; --accent-on: #FFFFFF; --secondary: #F1BF00;
  --accent-tint: color-mix(in srgb, var(--accent) 12%, var(--elevated));
  --bar: rgba(248, 241, 227, 0.82); --photo-wash: rgba(170, 21, 27, 0.10);
}
html[data-theme="espana"][data-mode="dark"] #app.phone,
.theme-sample[data-theme="espana"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #160C0C; --grouped: #241414; --elevated: #301C1A;
  --ink: #FFF6EE; --muted: #F0D8CC;
  --label-secondary: rgba(255, 246, 238, 0.64); --label-tertiary: rgba(255, 246, 238, 0.42);
  --separator: rgba(255, 246, 238, 0.16); --fill: rgba(255, 180, 174, 0.14); --line: var(--separator);
  --accent: #FFB4AE; --accent-button: #AA151B; --accent-on: #FFFFFF; --secondary: #F1BF00;
  --accent-tint: color-mix(in srgb, var(--accent) 16%, var(--elevated));
  --bar: rgba(36, 20, 20, 0.8); --photo-wash: rgba(241, 191, 0, 0.12);
}

html[data-theme="minimal"] #app.phone, .theme-sample[data-theme="minimal"] { --photo-filter: saturate(0.95); }
html[data-theme="pnw"] #app.phone, .theme-sample[data-theme="pnw"] { --photo-filter: saturate(0.78) hue-rotate(16deg) contrast(1.04); }
html[data-theme="christmas"] #app.phone, .theme-sample[data-theme="christmas"] { --photo-filter: saturate(0.95); }
html[data-theme="nieve"] #app.phone, .theme-sample[data-theme="nieve"] { --photo-filter: saturate(0.55) hue-rotate(188deg) brightness(1.08); }
html[data-theme="nochebuena"] #app.phone, .theme-sample[data-theme="nochebuena"] { --photo-filter: sepia(0.28) saturate(0.9) contrast(1.06) brightness(0.96); }
html[data-theme="peru"] #app.phone, .theme-sample[data-theme="peru"] { --photo-filter: sepia(0.22) saturate(1.18) hue-rotate(-12deg); }
html[data-theme="espana"] #app.phone, .theme-sample[data-theme="espana"] { --photo-filter: sepia(0.16) saturate(1.12) hue-rotate(-18deg) contrast(1.04); }

/* Photo wash sits inside the hero, under the existing scrim. */
#app .ph-frame > img,
.theme-sample .ph-frame > img {
  box-shadow: inset 0 0 0 999px var(--photo-wash, transparent);
}

/* PNW: fog on the header only. Perú and España: a warm wash in the same band. */
html[data-theme="pnw"][data-mode="light"] #app.phone {
  background-image: linear-gradient(180deg, #E4ECE8 0, transparent 150px);
}
html[data-theme="pnw"][data-mode="dark"] #app.phone {
  background-image: linear-gradient(180deg, #1C2C26 0, transparent 150px);
}
html[data-theme="peru"][data-mode="light"] #app.phone {
  background-image: linear-gradient(180deg, #F3E2D2 0, transparent 140px);
}
html[data-theme="peru"][data-mode="dark"] #app.phone {
  background-image: linear-gradient(180deg, #3A2418 0, transparent 140px);
}
html[data-theme="espana"][data-mode="light"] #app.phone {
  background-image: linear-gradient(180deg, #F6E6C2 0, transparent 140px);
}
html[data-theme="espana"][data-mode="dark"] #app.phone {
  background-image: linear-gradient(180deg, #3A2214 0, transparent 140px);
}

/* Nochebuena: a candle glow just under the hero, where the next block starts. */
html[data-theme="nochebuena"] #app .ph-frame {
  box-shadow: 0 16px 28px rgba(232, 176, 75, 0.45);
}
html[data-theme="nochebuena"] #app .detail-new .pad,
html[data-theme="nochebuena"] #app .desk-detail-body {
  background-image: radial-gradient(120% 56px at 50% 0, rgba(232, 176, 75, 0.55), transparent 72%);
  background-repeat: no-repeat;
}

.phone > canvas.snow {
  position: absolute; left: 0; right: 0; width: 100%;
  pointer-events: none; z-index: 4;
}
@media (prefers-reduced-motion: reduce) {
  .phone > canvas.snow { display: none; }
}

/* Exploration chrome, outside the product column's content. */
:root { --chrome-h: 44px; }
.phone .chrome {
  position: sticky; top: 0; z-index: 40;
  height: var(--chrome-h); min-height: var(--chrome-h); max-height: var(--chrome-h);
  flex-wrap: nowrap; overflow: visible; gap: 6px;
  padding: 0 8px; align-items: center;
}
.chrome-more { position: relative; margin-left: auto; }
.chrome-more summary {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; list-style: none; font-weight: 700;
}
.chrome-more summary::-webkit-details-marker { display: none; }
.chrome-pop {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 50;
  min-width: 220px; padding: 8px; border-radius: 14px;
  background: var(--elevated, #fff); color: var(--ink, #000);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.12));
  display: flex; flex-direction: column; gap: 8px;
}
.chrome-extra { flex: none; flex-basis: auto; width: auto; display: flex; flex-wrap: wrap; }
.chrome > a { white-space: nowrap; font-size: 13px; }
.chrome-themes { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; }
.chrome .dot-btn {
  width: 18px; height: 18px; min-width: 18px; min-height: 18px; padding: 0;
  border-radius: 999px; border: 2px solid transparent; background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28); text-decoration: none; flex: none;
}
.chrome .dot-btn[aria-checked="true"] { border-color: var(--ink); }
.chrome .chrome-mode {
  text-decoration: none; min-height: 32px; padding: 0 8px; border-radius: 999px;
  background: var(--fill); color: var(--ink); font-weight: 600; font-size: 13px; flex: none;
}

.palette { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.palette .swatch-btn {
  width: 76px; min-height: 44px; padding: 4px 0; border: 0; background: transparent;
  color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px;
  font: inherit; font-size: 12px; line-height: 16px; font-weight: 500;
}
.palette .dot {
  width: 36px; height: 36px; border-radius: 999px; background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.palette .swatch-btn[aria-checked="true"] .dot {
  box-shadow: 0 0 0 2px var(--grouped), 0 0 0 4px var(--ink);
}

.theme-pair { display: grid; gap: 12px; margin: 0 0 20px; }
.catalog .theme-pair { grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) {
  .catalog .theme-pair { grid-template-columns: 1fr; }
}
.theme-name { margin: 8px 0; font-size: 17px; line-height: 22px; }
.theme-sample {
  background: var(--grouped); color: var(--ink);
  border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: inset 0 0 0 0.5px var(--separator);
}
.theme-sample.phone { min-height: 0; width: 100%; margin: 0; overflow: visible; }
.theme-sample .theme-chips { display: flex; gap: 6px; }
.theme-sample .theme-chips i {
  width: 28px; height: 28px; border-radius: 999px; display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.theme-sample .ec, .theme-sample .block-ev { padding: 10px 12px; }
.theme-sample .daystrip { display: flex; }
.theme-sample .btn { align-self: flex-start; padding: 0 16px; }
