/* Local refinement: the demo, voice bank and other routes retain their canon. */
/* This stylesheet is loaded only on five-cards.html. Theme colours switch together,
   avoiding an initial dark surface with still-light-theme text during interpolation. */
:root { transition: none; }
@font-face {
  font-family: "ULYA Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./assets/fonts/manrope-v20-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "ULYA Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./assets/fonts/manrope-v20-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.five-cards-page { --font-ui: "ULYA Manrope", ui-sans-serif, system-ui, sans-serif; background: var(--bg); font-family: var(--font-ui); transition: none; }
.full-deck-shell { width: min(100%, 1040px); padding-inline: clamp(20px, 5vw, 48px); }
.full-deck-shell .topbar { min-height: 64px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.full-deck-shell .wordmark > span { font-size: 1.8rem; letter-spacing: .14em; }
.full-deck-shell .wordmark small { font-size: .8125rem; letter-spacing: .01em; text-transform: lowercase; }
.theme-control { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-size: .8125rem; }
.full-deck-shell select { min-height: 48px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text-primary); font: inherit; }
.theme-control select { max-width: 140px; font-size: .875rem; }
.deck-intro { display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: center; gap: 32px; padding: 36px 0 24px; }
:root[data-theme] .full-deck-shell h1 { max-width: none; margin: 0 0 20px; font-size: clamp(2.125rem, 4.8vw, 3.5rem); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
:root[data-theme="light"] .full-deck-shell h1 { font-weight: 500; }
.deck-lead { max-width: 32ch; margin: 0; color: var(--text-secondary); font-size: 1rem; line-height: 1.65; text-wrap: pretty; }
.deck-emblem { width: 240px; aspect-ratio: 1; }
.deck-emblem img { display: block; width: 100%; height: 100%; object-fit: contain; }
.deck-emblem .emblem-night { display: none; }
:root[data-theme="dark"] .deck-emblem .emblem-night { display: block; }
:root[data-theme="dark"] .deck-emblem .emblem-pearl { display: none; }
.test-boundary { margin: 0 0 32px; border-block: 1px solid var(--border); color: var(--text-secondary); font-size: .875rem; line-height: 1.65; }
.test-boundary summary { min-height: 48px; padding: 13px 0; cursor: pointer; }
.test-boundary p { max-width: 70ch; margin: 0 0 16px; }
#case-section { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 56px; }
.full-deck-shell h2 { margin: 0 0 20px; font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.case-picker label { display: block; margin-bottom: 10px; color: var(--text-secondary); font-size: .875rem; }
#case-choice { width: 100%; }
.case-caption { margin: 14px 0 0; color: var(--text-secondary); font-size: .875rem; line-height: 1.6; }
#question-preview { margin: 0 0 16px; font-size: 1.375rem; line-height: 1.5; text-wrap: pretty; }
:root[data-theme="dark"] #question-preview { font-family: Georgia, "Times New Roman", serif; font-size: 1.625rem; line-height: 1.45; }
.deck-meta { margin: 0; color: var(--text-secondary); font-size: .875rem; line-height: 1.6; }
.full-deck-shell .primary-button { justify-content: center; max-width: 380px; margin: 24px 0 0; font-weight: 600; box-shadow: none; transition: border-color 180ms ease; }
.full-deck-shell .primary-button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent); color: var(--cta-text); }
.full-deck-shell .primary-button:disabled { opacity: 1; background: var(--surface-raised); color: var(--text-secondary); border-color: var(--border); }
.full-deck-shell #deck-status { margin: 24px 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text-secondary); font-size: .875rem; line-height: 1.65; }
.full-deck-shell #deck-status[data-error="true"] { padding: 16px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--notice-bg); color: var(--notice-strong); }
.full-deck-shell #deck-status:empty { display: none; }
.full-deck-shell .cards-block { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.spread-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.spread-heading h2 { margin-bottom: 12px; }
#reveal-progress { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
#active-question { max-width: 65ch; margin-bottom: 24px; font-size: 1rem; line-height: 1.65; }
.full-deck-shell .deck { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0; }
.full-deck-shell .tarot-card { min-height: 282px; padding: 16px 10px; gap: 12px; background: var(--surface); box-shadow: none; transition: transform 220ms var(--ease-ritual), border-color 180ms ease; }
.full-deck-shell .tarot-card:hover:not(:disabled) { transform: translateY(-2px); box-shadow: none; }
.full-deck-shell .tarot-card::before { inset: 5px; border-radius: 9px; }
.full-deck-shell .card-position { display: flex; align-items: center; justify-content: center; min-height: 54px; font-size: .8125rem; line-height: 1.4; }
.full-deck-shell .card-back { max-width: 106px; }
.full-deck-shell .card-face { max-width: 134px; }
.full-deck-shell .tarot-card strong { font-size: 1rem; line-height: 1.35; }
.full-deck-shell .tarot-card small { max-width: 100%; color: var(--text-secondary); font-size: .8125rem; }
:root[data-theme] .full-deck-shell .art-pending { display: grid; place-items: center; background-image: none; border: 0; background-color: transparent; color: var(--accent); }
.full-deck-shell .art-pending svg { display: block; width: 54%; fill: none; stroke: currentColor; stroke-width: 1; }
.full-deck-shell #meanings-section { max-width: 72ch; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
#meanings-section > p { font-size: 1rem; line-height: 1.7; }
.meaning-entry { padding: 24px 0; border-bottom: 1px solid var(--border); }
.meaning-entry h3 { margin: 0 0 10px; font-size: 1rem; font-weight: 600; line-height: 1.5; }
.meaning-entry p { margin: 0; font-size: 1rem; line-height: 1.75; }
.full-deck-shell .safety-note { font-size: .875rem !important; }
.full-deck-shell .secondary-button:disabled { margin-top: 24px; cursor: not-allowed; color: var(--text-secondary); background: var(--surface-raised); border-color: var(--border); }
.deck-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 32px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.deck-footer p { max-width: 55ch; }
.deck-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: .875rem; line-height: 1.6; text-underline-offset: 4px; }
.full-deck-shell :focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
@media (max-width: 760px) {
  .deck-intro { grid-template-columns: minmax(0, 1fr) 164px; gap: 16px; }
  .deck-emblem { width: 164px; }
  #case-section { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .case-picker h2 { margin-bottom: 16px; }
  .case-caption { display: none; }
  .full-deck-shell .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .full-deck-shell .tarot-card:last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
  .deck-footer { flex-direction: column; gap: 8px; }
}
@media (max-width: 480px) {
  .full-deck-shell { padding-top: max(20px, env(safe-area-inset-top)); }
  .full-deck-shell .topbar { gap: 12px; padding-bottom: 16px; }
  .full-deck-shell .wordmark > span { font-size: 1.625rem; }
  .full-deck-shell .wordmark small { max-width: none; line-height: 1.4; }
  .theme-control { flex-direction: column; align-items: flex-start; gap: 4px; }
  .theme-control select { max-width: 118px; padding-inline: 8px; }
  .deck-intro { grid-template-columns: minmax(0, 1fr) 88px; gap: 4px; padding: 28px 0 24px; }
  .deck-emblem { width: 88px; }
  :root[data-theme] .full-deck-shell h1 { margin-bottom: 16px; font-size: clamp(1.75rem, 8vw, 2rem); line-height: 1.12; }
  .deck-lead { grid-column: 1 / -1; font-size: 1rem; }
  .deck-intro-copy { display: contents; }
  .deck-intro h1 { grid-column: 1; grid-row: 1; }
  .deck-emblem { grid-column: 2; grid-row: 1; }
  .test-boundary { margin-bottom: 24px; }
  #question-preview { font-size: 1.25rem; }
  :root[data-theme="dark"] #question-preview { font-size: 1.25rem; }
  .full-deck-shell .primary-button { max-width: none; margin-top: 20px; }
  .full-deck-shell .tarot-card { min-height: 260px; }
  .spread-heading { flex-direction: column; gap: 0; margin-bottom: 16px; }
  .spread-heading h2 { margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { .full-deck-shell * { transition: none !important; transform: none !important; } }
