/* Tensor Tarot */
:root {
  --bg: #07061a;
  --bg-2: #0e0b2a;
  --ink: #f1e8d6;
  --ink-soft: #c9bfd8;
  --muted: #8f87ad;
  --gold: #e8c26a;
  --gold-hi: #fbe3a0;
  --gold-lo: #a9792f;
  --violet: #8b7cf6;
  --panel: rgba(22, 18, 54, 0.62);
  --panel-line: rgba(232, 194, 106, 0.22);
  --radius: 18px;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --caps: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --card-w: min(30vw, 168px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) radial-gradient(120% 70vh at 50% -10vh, #1b1450 0%, var(--bg-2) 55%, var(--bg) 100%) no-repeat;
  color: var(--ink);
  font: 400 1.06rem/1.6 var(--sans);
  padding: env(safe-area-inset-top, 0) max(16px, env(safe-area-inset-right, 0)) env(safe-area-inset-bottom, 0) max(16px, env(safe-area-inset-left, 0));
  overflow-x: hidden;
}

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nebula {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none; opacity: .55;
  background:
    radial-gradient(40% 30% at 18% 28%, rgba(139, 124, 246, .18), transparent 70%),
    radial-gradient(35% 28% at 82% 18%, rgba(232, 120, 160, .10), transparent 70%),
    radial-gradient(45% 35% at 70% 85%, rgba(80, 170, 220, .10), transparent 70%);
  animation: drift 60s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, -2%, 0) rotate(4deg); } }

.top, main, .foot { position: relative; z-index: 1; }

a { color: var(--gold-hi); text-decoration-color: rgba(232, 194, 106, .4); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.top {
  max-width: 1100px; margin: 0 auto; padding: 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { font: 600 1rem/1 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.brand-star { display: inline-block; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav { display: flex; gap: 6px; }
.nav a {
  font: 500 .82rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; padding: 10px 12px; border-radius: 999px;
}
.nav a[aria-current="page"] { color: var(--gold-hi); background: rgba(232, 194, 106, .1); }

main { max-width: 1100px; margin: 0 auto; min-height: 70vh; }
.view { animation: fadeUp .6s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- type ---------- */
.eyebrow { font: 500 .78rem/1.4 var(--caps); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin: 0 0 .6rem; text-align: center; }
.title {
  font: 600 clamp(2.6rem, 9vw, 5.2rem)/1 var(--caps); letter-spacing: .06em; margin: 0; text-align: center;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 18px rgba(232, 194, 106, .25));
}
.title-sm { font-size: clamp(2rem, 6vw, 3.4rem); }
.tagline { font: italic 400 clamp(1.15rem, 3.4vw, 1.45rem)/1.45 var(--serif); color: var(--ink-soft); text-align: center; max-width: 34ch; margin: .9rem auto 0; }

/* ---------- home ---------- */
.hero { padding: clamp(12px, 4vh, 48px) 0 8px; }
.hero-fan { position: relative; height: clamp(170px, 34vw, 250px); margin: 26px auto 8px; max-width: 520px; }
.hero-fan .fan-card {
  position: absolute; left: 50%; bottom: 0; width: clamp(92px, 20vw, 134px); aspect-ratio: 2 / 3;
  transform-origin: 50% 120%; margin-left: calc(clamp(92px, 20vw, 134px) / -2);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55));
  animation: bob 6s ease-in-out infinite;
}
.hero-fan .fan-card svg { width: 100%; height: 100%; display: block; }
@keyframes bob { 50% { translate: 0 -6px; } }

.ask { max-width: 760px; margin: 0 auto; padding: 8px 0 24px; text-align: center; }
.q-label { display: block; font: italic 500 1.25rem/1.3 var(--serif); color: var(--ink); margin: 10px 0 10px; }
.opt { color: var(--muted); font-size: .95rem; }
.q {
  width: 100%; max-width: 560px; padding: 15px 18px; border-radius: 14px;
  background: rgba(10, 8, 30, .7); border: 1px solid var(--panel-line); color: var(--ink);
  font: italic 400 1.2rem/1.3 var(--serif); text-align: center;
}
.q::placeholder { color: var(--muted); }
.q:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232, 194, 106, .12); }

.spreads { border: 0; padding: 0; margin: 26px 0 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.spreads legend { font: 500 .78rem/1 var(--caps); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin: 0 auto 14px; padding: 0; }
.spread-opt { position: relative; cursor: pointer; }
.spread-opt input { position: absolute; opacity: 0; inset: 0; }
.spread-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%;
  padding: 18px 12px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-line);
  transition: border-color .2s, transform .2s, background .2s, box-shadow .2s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.spread-opt:hover .spread-card { transform: translateY(-2px); border-color: rgba(232, 194, 106, .45); }
.spread-opt input:checked + .spread-card {
  border-color: var(--gold); background: rgba(52, 38, 96, .7);
  box-shadow: 0 0 0 1px var(--gold), 0 10px 40px rgba(232, 194, 106, .15);
}
.spread-opt input:focus-visible + .spread-card { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.spread-name { font: 600 1rem/1.2 var(--caps); letter-spacing: .08em; color: var(--gold-hi); }
.spread-blurb { font: 400 .86rem/1.4 var(--sans); color: var(--ink-soft); }
.spread-diagram { display: grid; gap: 4px; height: 52px; place-content: center; margin-bottom: 4px; }
.spread-diagram i { display: block; width: 14px; height: 21px; border-radius: 3px; border: 1.5px solid var(--gold); background: rgba(232, 194, 106, .12); }
.spread-opt input:checked + .spread-card .spread-diagram i { background: rgba(232, 194, 106, .35); }
.d-three { grid-auto-flow: column; }
.d-five { grid-template-columns: repeat(3, 14px); grid-template-rows: repeat(3, 15px); gap: 2px 3px; }
.d-five i { height: 15px; width: 11px; justify-self: center; }
.d-five i:nth-child(1) { grid-area: 2 / 2; }
.d-five i:nth-child(2) { grid-area: 2 / 1; }
.d-five i:nth-child(3) { grid-area: 3 / 2; }
.d-five i:nth-child(4) { grid-area: 1 / 2; }
.d-five i:nth-child(5) { grid-area: 2 / 3; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px;
  padding: 14px 28px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  font: 600 .95rem/1 var(--caps); letter-spacing: .14em; text-transform: uppercase;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-gold {
  color: #1a1030; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #c99a45);
  box-shadow: 0 8px 30px rgba(232, 194, 106, .3), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-gold:hover { box-shadow: 0 10px 44px rgba(232, 194, 106, .45), inset 0 1px 0 rgba(255, 255, 255, .6); color: #1a1030; }
.btn-ghost { color: var(--gold-hi); border-color: rgba(232, 194, 106, .45); background: rgba(10, 8, 30, .35); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(232, 194, 106, .08); color: #fff; }
.btn-small { min-height: 42px; padding: 10px 20px; font-size: .8rem; }
.btn-glyph { display: inline-block; }
.btn:hover .btn-glyph { animation: spin 2s linear infinite; }
.fine { color: var(--muted); font-size: .8rem; margin-top: 14px; }

/* ---------- table ---------- */
.table-head { text-align: center; padding-top: 6px; }
.asked { font: italic 500 clamp(1.3rem, 4vw, 1.8rem)/1.3 var(--serif); color: var(--ink); max-width: 30ch; margin: 0 auto 6px; }
.asked::before { content: '“'; color: var(--gold); }
.asked::after { content: '”'; color: var(--gold); }
.hint { font: italic 400 1.15rem/1.4 var(--serif); color: var(--ink-soft); min-height: 1.6em; margin: 4px 0 0; }

.stage { position: relative; min-height: calc(var(--card-w) * 1.5 + 60px); margin: 16px auto 8px; display: grid; place-items: center; }
.stage.is-five { --card-w: min(24vw, 150px); }
.stage.is-one { --card-w: min(52vw, 230px); }
.stage.is-three { --card-w: min(29vw, 190px); }

.shuffle { position: relative; width: var(--card-w); aspect-ratio: 2 / 3; }
.shuffle .sh {
  position: absolute; inset: 0; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5));
}
.shuffle .sh svg { width: 100%; height: 100%; display: block; }
.shuffle.is-going .sh:nth-child(odd) { animation: riffleL .62s ease-in-out infinite; }
.shuffle.is-going .sh:nth-child(even) { animation: riffleR .62s ease-in-out infinite; }
.shuffle.is-going .sh:nth-child(3n) { animation-delay: .08s; }
@keyframes riffleL { 0%, 100% { transform: none; } 45% { transform: translateX(-62%) rotate(-9deg); } }
@keyframes riffleR { 0%, 100% { transform: none; } 45% { transform: translateX(62%) rotate(9deg); } }

.layout { display: grid; gap: clamp(10px, 2.4vw, 22px); justify-content: center; align-items: start; }
.layout-one { grid-template-columns: var(--card-w); }
.layout-three { grid-template-columns: repeat(3, var(--card-w)); }
.layout-five {
  grid-template-columns: repeat(3, var(--card-w));
  grid-template-areas: ". guide ." "challenge heart outcome" ". root .";
  gap: clamp(6px, 1.6vw, 16px) clamp(8px, 2vw, 22px);
}
.slot { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.slot[data-pos="heart"] { grid-area: heart; }
.slot[data-pos="challenge"] { grid-area: challenge; }
.slot[data-pos="root"] { grid-area: root; }
.slot[data-pos="guide"] { grid-area: guide; }
.slot[data-pos="outcome"] { grid-area: outcome; }
.layout-five .slot { align-self: center; }
.layout-five .pos-label { min-height: 2.5em; display: flex; align-items: flex-end; justify-content: center; }
.pos-label { font: 500 clamp(.62rem, 2vw, .76rem)/1.2 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); text-align: center; }
.slot-name { font: italic 500 clamp(.92rem, 2.6vw, 1.12rem)/1.2 var(--serif); color: var(--ink); text-align: center; min-height: 1.3em; opacity: 0; transition: opacity .6s .3s; }
.slot.is-open .slot-name { opacity: 1; }

.card {
  position: relative; width: var(--card-w); aspect-ratio: 2 / 3; padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 1100px; border-radius: 10px; -webkit-tap-highlight-color: transparent;
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
}
.card .tilt { position: absolute; inset: 0; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .25s ease-out; }
.card .inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, 1.3, .4, 1); }
.card.is-open .inner { transform: rotateY(180deg); }
.card .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); }
.card .face svg { width: 100%; height: 100%; display: block; }
.card .front { transform: rotateY(180deg); }
.card .sheen {
  position: absolute; inset: 0; border-radius: 10px; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0; transition: opacity .3s;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 240, 200, .5), transparent 42%),
    linear-gradient(115deg, transparent 30%, rgba(160, 140, 255, .18) 45%, rgba(255, 210, 140, .22) 55%, transparent 70%);
  transform: rotateY(180deg) translateZ(1px); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.card.is-open:hover .sheen, .card.is-open.is-tilting .sheen { opacity: 1; }
.card:not(.is-open):hover .tilt { transform: translateY(-6px) rotateX(var(--rx)) rotateY(var(--ry)); }
.card:not(.is-open) .face.back { box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 0 rgba(232, 194, 106, .0); animation: beckon 2.8s ease-in-out infinite; }
@keyframes beckon { 50% { box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 26px 2px rgba(232, 194, 106, .28); } }
.card.is-open .front { animation: glowOnce 1.6s ease-out .4s both; }
@keyframes glowOnce { 0% { box-shadow: 0 0 0 0 rgba(251, 227, 160, .0); } 30% { box-shadow: 0 0 46px 8px rgba(251, 227, 160, .45); } 100% { box-shadow: 0 14px 34px rgba(0, 0, 0, .55); } }
.card.is-flat .face { box-shadow: 0 14px 34px rgba(0, 0, 0, .55); }

.table-tools { text-align: center; margin: 8px 0 0; }

/* ---------- reading ---------- */
.reading { max-width: 820px; margin: 30px auto 0; outline: none; }
.entries { display: grid; gap: 18px; }
.entry {
  display: grid; grid-template-columns: 96px 1fr; grid-template-areas: "art title" "art body"; gap: 4px 22px; align-items: start; padding: 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(14px); animation: fadeUp .7s ease forwards;
}
.entry-art { grid-area: art; width: 96px; aspect-ratio: 2 / 3; border-radius: 7px; overflow: hidden; box-shadow: 0 8px 22px rgba(0, 0, 0, .5); cursor: zoom-in; padding: 0; border: 0; background: none; }
.entry-art svg { width: 100%; height: 100%; display: block; }
.entry-pos { font: 500 .74rem/1.4 var(--caps); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0; }
.entry-pos .prompt { color: var(--muted); letter-spacing: .1em; text-transform: none; font: italic 400 .98rem/1 var(--serif); }
.entry-name { font: 600 clamp(1.5rem, 4.5vw, 1.95rem)/1.15 var(--serif); margin: 4px 0 6px; color: var(--ink); }
.entry-name .num { font: 500 .8rem/1 var(--caps); color: var(--gold); letter-spacing: .14em; margin-left: 8px; vertical-align: middle; }
.kw { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; }
.kw li { font: 500 .72rem/1 var(--sans); letter-spacing: .06em; padding: 6px 10px; border-radius: 999px; color: var(--ink-soft); background: rgba(139, 124, 246, .14); border: 1px solid rgba(139, 124, 246, .25); }
.kw li.el { color: var(--gold-hi); background: rgba(232, 194, 106, .1); border-color: rgba(232, 194, 106, .3); }
.entry-line { font: 500 clamp(1.22rem, 3.6vw, 1.42rem)/1.5 var(--serif); color: var(--ink); margin: 0 0 10px; }
.entry-essence { font: italic 400 1.04rem/1.5 var(--serif); color: var(--ink-soft); margin: 0 0 10px; }
.entry details { margin-top: 6px; }
.entry summary { cursor: pointer; font: 500 .8rem/1.4 var(--sans); letter-spacing: .08em; color: var(--gold); list-style: none; display: inline-flex; gap: 6px; align-items: center; padding: 6px 0; }
.entry summary::-webkit-details-marker { display: none; }
.entry summary::before { content: '✦'; transition: transform .3s; }
.entry details[open] summary::before { transform: rotate(45deg); }
.entry details p { color: var(--ink-soft); margin: 8px 0 0; font-size: 1rem; }
.invite { font: italic 500 1.12rem/1.5 var(--serif) !important; color: var(--gold-hi) !important; }
.invite b { font: 600 .72rem/1 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 4px; font-style: normal; }

.shape { margin: 34px auto 0; text-align: center; padding: 28px clamp(18px, 4vw, 40px); border-radius: var(--radius); position: relative;
  background: linear-gradient(180deg, rgba(52, 38, 96, .55), rgba(22, 18, 54, .55)); border: 1px solid rgba(232, 194, 106, .35); }
.shape-headline { font: 600 clamp(1.35rem, 4vw, 1.75rem)/1.4 var(--serif); color: var(--gold-hi); margin: 0 auto 12px; max-width: 36ch; }
.shape-notes { list-style: none; padding: 0; margin: 0 auto; max-width: 60ch; display: grid; gap: 12px; text-align: left; }
.shape-notes li { font: 400 1.14rem/1.55 var(--serif); color: var(--ink); padding-left: 26px; position: relative; }
.shape-notes li::before { content: '✧'; position: absolute; left: 0; color: var(--gold); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 30px 0 10px; }
.error { text-align: center; color: #ffb4a8; font: italic 1.15rem/1.4 var(--serif); }

/* ---------- deck ---------- */
.deck-head { padding: 18px 0 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 18px; }
.chip { font: 500 .8rem/1 var(--sans); letter-spacing: .06em; padding: 10px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-soft); background: rgba(10, 8, 30, .5); border: 1px solid var(--panel-line); }
.chip.is-on { color: #1a1030; background: var(--gold); border-color: var(--gold); }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px; padding-bottom: 30px; }
.deck-item { padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--ink-soft); font: italic 400 .95rem/1.2 var(--serif); text-align: center; }
.deck-item .thumb { width: 100%; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); transition: transform .2s, box-shadow .2s; }
.deck-item .thumb svg { width: 100%; height: 100%; display: block; }
.deck-item:hover .thumb { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 14px 30px rgba(0, 0, 0, .6), 0 0 22px rgba(232, 194, 106, .2); }
.deck-item[hidden] { display: none; }

.card-dialog {
  width: min(880px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border-radius: 22px; color: var(--ink);
  background: linear-gradient(180deg, #1b1546, #0d0a26); border: 1px solid rgba(232, 194, 106, .35); box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
}
.card-dialog::backdrop { background: rgba(4, 3, 14, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.card-dialog[open] { animation: fadeUp .35s ease both; }
.dlg-close-row { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 8px 8px 0; z-index: 2; }
.dlg-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--panel-line); background: rgba(10, 8, 30, .7); color: var(--gold-hi); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.dlg-body { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 28px; padding: 0 28px 28px; }
.dlg-art { width: 100%; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); align-self: start; }
.dlg-art svg { width: 100%; height: 100%; display: block; }
.dlg-text .eyebrow { text-align: left; }
.dlg-name { font: 600 clamp(1.8rem, 5vw, 2.4rem)/1.1 var(--serif); margin: 0 0 10px; }
.dlg-essence { font: italic 400 1.15rem/1.5 var(--serif); color: var(--ink-soft); margin: 0 0 12px; }
.dlg-meaning { font: 500 1.22rem/1.55 var(--serif); margin: 0 0 14px; }
.dlg-invite { font: italic 500 1.12rem/1.5 var(--serif); color: var(--gold-hi); margin: 0 0 14px; }
.dlg-more summary { cursor: pointer; color: var(--gold); font: 500 .82rem/1.4 var(--sans); letter-spacing: .08em; padding: 6px 0; }
.dlg-positions { margin: 8px 0 0; }
.dlg-positions dt { font: 500 .72rem/1.4 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: 12px; }
.dlg-positions dd { margin: 2px 0 0; font: 400 1.06rem/1.5 var(--serif); color: var(--ink-soft); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50;
  padding: 12px 20px; border-radius: 999px; background: var(--gold); color: #1a1030; font: 600 .85rem/1 var(--sans);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: fadeUp .3s ease both;
}

.foot { max-width: 1100px; margin: 40px auto 0; padding: 26px 0 34px; text-align: center; color: var(--muted); font-size: .85rem; border-top: 1px solid rgba(232, 194, 106, .12); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .spreads { grid-template-columns: 1fr; }
  .spread-card { flex-direction: row; text-align: left; padding: 14px 16px; gap: 14px; }
  .spread-card .spread-diagram { flex: 0 0 52px; margin: 0; }
  .spread-name { flex: 0 0 auto; min-width: 7.5em; }
  .spread-blurb { font-size: .82rem; }
  .entry { display: block; padding: 18px; }
  .entry-art { width: 72px; flex: 0 0 72px; }
  .entry-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
  .dlg-body { grid-template-columns: 1fr; padding: 0 18px 22px; }
  .dlg-art { width: min(240px, 70%); margin: 0 auto; }
  .nav a { padding: 10px 8px; }
  .brand { font-size: .86rem; letter-spacing: .14em; }
}
@media (min-width: 641px) {
  .entry-head { display: contents; }
  .entry-title { grid-area: title; }
  .entry-body { grid-area: body; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .entry { opacity: 1; transform: none; }
}
