/* W23 #609: a non-Tarot deck runs in the Home engine. Tarot-only chrome (Compare plans) is not offered for it; the picker keeps
   Tarot's card. Saving to the Journal IS offered (#634 Gypsy save:
   the button stays visible, the same Journal rules and limit as Tarot; this rule used to hide it for every deck). */
html[data-deck-mode] #upgradeFromSpreadBtn { display: none; }
.spread-option[data-access-class="deck"] { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.deck-draw-input { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--d01-muted, var(--muted)); }
.deck-draw-input select { min-height: 42px; max-width: 220px; border: 1px solid var(--d01-edge, var(--border)); border-radius: 8px; background: transparent; color: inherit; font: inherit; padding: 0 10px; }
@media (max-width: 760px) { .deck-draw-input { flex: 1 1 100%; } .deck-draw-input select { flex: 1; max-width: none; } }

/* The picker keeps Tarot's tile (same card, icon slot and labels): in deck mode every method is a full tile, not one of the
   four featured Tarot ids, so the two Tarot rules that fold the others into "More readings" rows are overridden here. */
html[data-deck-mode] .d01-atelier .d01-picker-data #spreadPicker > .spread-option { display: flex !important; min-height: 184px; }
html[data-deck-mode] .d01-atelier .d01-picker-data .spread-option::before { background: var(--d01-gold); -webkit-mask: var(--d01r-tile-icon) center / contain no-repeat; mask: var(--d01r-tile-icon) center / contain no-repeat; }
@media (min-width: 761px) {
  html[data-deck-mode] .d01-atelier .d01-picker-data .spread-option::before { width: 44px; aspect-ratio: 1; margin: 6px auto 22px; border: 0; border-radius: 0; box-shadow: none; }
}
@media (max-width: 760px) { html[data-deck-mode] .d01-atelier .d01-picker-data #spreadPicker > .spread-option { min-height: 56px; } }
html[data-deck-mode] .d01-atelier .d01-picker-data .spread-option[data-icon="three"] { --d01r-tile-icon: url("/assets/atelier/d01r/tile-three.svg"); }
html[data-deck-mode] .d01-atelier .d01-picker-data .spread-option[data-icon="paths"] { --d01r-tile-icon: url("/assets/atelier/d01r/tile-paths.svg"); }
html[data-deck-mode] .d01-atelier .d01-picker-data .spread-option[data-icon="sun"] { --d01r-tile-icon: url("/assets/atelier/d01r/tile-sun.svg"); }
html[data-deck-mode] .d01-atelier .d01-picker-data .spread-option[data-icon="sprig"] { --d01r-tile-icon: url("/assets/atelier/d01r/tile-sprig.svg"); }
html[data-deck-mode] .d01-atelier .d01-picker-data .spread-option[data-icon="star"] { --d01r-tile-icon: url("/assets/atelier/d01r/tile-star.svg"); }

/* Deck mode (#703, MC1 T2): Home is ONE template. The hero art (sky, cloud, the deck's own three cards), the call to action, the quick-spread strip and the discovery block are the same
   as Tarot's and are filled from the deck (public/home-deck-hero.js); only Tarot's product sections that describe Tarot itself ("More insightful spreads", Premium) stay hidden, and the
   Tarot-quota fine print is invisible (its room is kept, so the hero is as tall as Tarot's). While the deck's words are being written (data-deck-home="pending") Tarot's words in the three
   blocks are hidden and their room is kept. */
html[data-deck-mode] :is(.d01-deeper, .d01r-premium) { display: none; }
html[data-deck-mode] .d01-hero .d01-fineprint { visibility: hidden; }
html:is([data-deck-home="pending"], [data-deck-mode]:not([data-deck-home])) .d01-hero-art .d01r-hero-fan,
html:is([data-deck-home="pending"], [data-deck-mode]:not([data-deck-home])) .d01-features > *,
html:is([data-deck-home="pending"], [data-deck-mode]:not([data-deck-home])) .d01-discovery > article > *,
html:is([data-deck-home="pending"], [data-deck-mode]:not([data-deck-home])) .d01-discovery .d01r-library-art { visibility: hidden; }
/* The strip's glyph is the spread's own Step 1 icon (a gold mask, same as the tile), at the size of Tarot's line icons. */
.d01-atelier .d01-feature-glyph { display: block; background: var(--d01r-icon, var(--d01-gold)); -webkit-mask: var(--d01r-tile-icon, none) center / contain no-repeat; mask: var(--d01r-tile-icon, none) center / contain no-repeat; }
.d01-atelier .d01-feature-glyph-all { --d01r-tile-icon: url("/assets/atelier/d01r/tile-star.svg"); }

/* Home Step 1 deck tabs (owner, variant A, 15.11; replaces the S2 gold pill). Four text tabs in ONE row at every width (320 included), the chosen one gold with a gold underline.
   Component-scoped: it takes the width of the Step 1 heading column it sits in (inline-size 100%, min-inline-size 0) and never sets the page's margins. Columns are minmax(0, n fr)
   in the proportions of the approved mock (names of different length), so a long name never pushes the row wider than the column. The visible name is the registry's `pill.short`
   (data-short, drawn by ::after); the element's text and its aria-label stay the deck's full name (owner rule 15.11), so search, screen readers and the name gate read "Tarot dos Orixás".
   A "Soon" tab (flag OFF, or the page language not open for the deck) is shown muted with its Soon word, disabled, out of the Tab order: never an active tab. */
.d01-picker-heading { container-type: inline-size; }
.deck-switch { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(0, .94fr) minmax(0, 1.08fr) minmax(0, 1.08fr); inline-size: 100%; max-inline-size: 100%; min-inline-size: 0; margin: 10px 0 14px; border-block-end: 1px solid var(--d01-edge, var(--border)); }
.deck-switch-option {
  position: relative; min-inline-size: 0; min-block-size: 44px; padding: 4px 1px 6px; border: 0; border-radius: 6px 6px 0 0; background: transparent; color: var(--text);
  font: inherit; font-size: clamp(11px, 4.1cqw, 1rem); font-weight: 600; line-height: 1.15; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.deck-switch-option:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 5%, transparent); }
.deck-switch-option[aria-selected="true"] { color: var(--d01-gold, var(--accent)); }
.deck-switch-option[aria-selected="true"]::before { content: ""; position: absolute; inset-inline: 8%; inset-block-end: -1px; block-size: 3px; border-radius: 2px; background: var(--d01-gold, var(--accent)); }
.deck-switch-option:focus-visible { outline: 2px solid var(--d01-gold, var(--focus, #b4873f)); outline-offset: -2px; z-index: 1; }
.deck-switch-option:disabled { cursor: not-allowed; color: var(--muted); opacity: .78; }
/* the visible tab name: data-short; the full name stays the text of the element (font-size 0, not removed) */
.deck-switch-full { font-size: 0; white-space: nowrap; }
.deck-switch-full::after { content: attr(data-short); font-size: clamp(11px, 4.1cqw, 1rem); }
.deck-switch-soon { display: block; max-inline-size: 100%; margin-block-start: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .58rem; font-weight: 600; letter-spacing: 0; line-height: 1.1; color: var(--muted); }
/* a ~280 px column (320 px phone): the longest Soon words ("Prossimamente", "Binnenkort", "Prochainement") stay whole inside a quarter of the row */
@container (max-width: 330px) { .deck-switch-soon { font-size: .54rem; } }
@media (prefers-reduced-motion: no-preference) { .deck-switch-option { transition: color .15s ease, background-color .15s ease; } }

/* CLS (#609): /?deck=<id> before the deck is activated (theme-init.js sets data-deck-boot from the URL). The Home is laid out as the Tarot template from the first paint (the deck keeps its
   quality, not its words): Tarot's words, fan and strip stay invisible until the deck's own are written, and the picker has the deck's height reserved (measured at 8 widths, a little
   under so the late content only grows). Nothing below moves when the deck arrives. */
html[data-deck-boot]:not([data-deck-mode]) :is(.d01-deeper, .d01r-premium) { display: none; }
html[data-deck-boot]:not([data-deck-mode]) .d01-hero-copy > *:not(.build-chip),
html[data-deck-boot]:not([data-deck-mode]) .d01-hero-art .d01r-hero-fan,
html[data-deck-boot]:not([data-deck-mode]) .d01-features > *,
html[data-deck-boot]:not([data-deck-mode]) .d01-discovery > article > *,
html[data-deck-boot]:not([data-deck-mode]) .d01-discovery .d01r-library-art { visibility: hidden; }
html[data-deck-boot]:not([data-deck-mode]) .spread-browser { min-height: var(--deck-boot-picker, 650px); }
html[data-deck-boot]:not([data-deck-mode]) .spread-browser > * { visibility: hidden; }
html[data-deck-boot] { --deck-boot-hero: 175px; --deck-boot-picker: 410px; }
@media (max-width: 1299px) { html[data-deck-boot] { --deck-boot-hero: 148px; --deck-boot-picker: 420px; } }
@media (max-width: 1099px) { html[data-deck-boot] { --deck-boot-hero: 125px; --deck-boot-picker: 650px; } }
@media (max-width: 768px) { html[data-deck-boot] { --deck-boot-hero: 125px; --deck-boot-picker: 670px; } }
@media (max-width: 400px) { html[data-deck-boot] { --deck-boot-hero: 125px; --deck-boot-picker: 930px; } }
@media (max-width: 359px) { html[data-deck-boot] { --deck-boot-hero: 135px; --deck-boot-picker: 1010px; } }

/* #703: a deck that cannot be opened is said out loud next to the deck switch (the desk notice is inside the closed desk). */
.deck-load-error { margin: 0 0 10px; padding: 8px 12px; border: 1px solid #b35a65; border-radius: 10px; color: #ad3f4f; font-size: .88rem; line-height: 1.4; }
:root[data-theme="dark"] .deck-load-error { color: #f8adba; }
.deck-load-error[hidden] { display: none; }
