:root{color-scheme:dark;--copper:#e7b389;--paper:#f5e7d0;--wine:#4d141f}
body{background:radial-gradient(ellipse at 80% 10%,#641c28 0%,transparent 58%),#260e18;color:var(--paper)}
header,main,footer{max-width:1100px}
header,footer{border-color:#ab775a55}
header{font-size:1rem;letter-spacing:.15em}
main[data-screen=home]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.83fr);gap:6%;align-content:center;align-items:center;padding-block:36px}
.home-art{grid-column:2;grid-row:1;margin:0;aspect-ratio:4/5;position:relative;background:linear-gradient(#43141c22,#280c1477),url(art/lacquer.jpg) center/cover;border-radius:45% 45% 3px 3px;box-shadow:inset 0 0 0 1px #dfac802e}
.home-art img{position:absolute;width:40%;border-radius:4%;box-shadow:3px 8px 16px #18071099;top:25%;left:29%;transform:rotate(-3deg)}
.home-art img:first-child{left:11%;top:30%;transform:rotate(-21deg)}
.home-art img:last-child{left:48%;top:33%;transform:rotate(19deg)}
.home-copy{grid-area:1/1}
h1{font-size:clamp(3.3rem,6.8vw,5.7rem);line-height:.99}
h1 em{font-weight:normal;color:var(--copper)}
small{color:var(--copper)}
textarea{border:1px solid #b67b69;background:#230d17aa;border-radius:4px;color:var(--paper);font:1.12rem/1.45 Georgia}
textarea::placeholder{color:#c3a5a5}
button{background:var(--paper);color:#431822}
.secondary{color:var(--paper)}
.card:not(.face),.slots .filled{background-color:#3b1d32;background-image:repeating-radial-gradient(ellipse at 0% 50%,transparent 0 12px,#ba8567 13px,transparent 14px 22px)}
.leaf rect:first-child{fill:#402033;stroke:#cd9675}.raised .leaf rect:first-child{fill:#60304b}
.leaf path{fill:none;stroke:#cf9875;stroke-width:.85}
.raised{filter:drop-shadow(1px 5px 3px #190810aa)}
.slots i{width:32px;height:47px}.slot-flight{position:fixed;pointer-events:none;z-index:5;background:#48253b;border:2px double #e1b68c;border-radius:4px}
.spread .art-face{background:transparent;padding:0;outline:0;border:0}.art-face img,.miniatures img{width:100%;height:100%;object-fit:fill;border-radius:5%;box-shadow:0 5px 13px #260c183a}
body:has(.letter){color-scheme:light;background:#f3e5ce;color:#37232a}
body:has(.letter) header,body:has(.letter) footer{color:#603841}
.letter{margin:auto;max-width:60ch}
.letter h1{font-size:clamp(2.2rem,5vw,3.7rem);font-style:italic}
.letter small,.letter .byline{color:#75473e}
.letter button{background:var(--wine);color:var(--paper)}
.letter .secondary{background:transparent;color:var(--wine)}
.miniatures{display:flex;gap:12px;margin:24px 0}
.miniatures img{width:min(22%,92px);height:auto;aspect-ratio:.64}
@media(max-width:680px){main[data-screen=home]{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:20px;padding-block:20px}.home-art{width:100%;aspect-ratio:auto;height:clamp(125px,20svh,180px);border-radius:6px;overflow:hidden}.home-art img{width:auto;height:90%;left:40%;top:8%}.home-art img:first-child{left:25%;top:20%}.home-art img:last-child{left:53%;top:18%}.home-copy h1{margin:.12em 0 .33em}.spread{max-width:360px}}
@media(prefers-reduced-motion:no-preference){.art-face img{animation:turn-in .32s ease-out}@keyframes turn-in{from{transform:perspective(500px) rotateY(65deg);opacity:.5}}}

.draw-table {
  margin: 0 auto;
  text-align: center;
  max-width: 880px;
  padding: clamp(16px, 3vh, 32px) 0;
}
.draw-table h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.7rem);
  margin: 12px auto 0;
}
main[data-screen=pick] .draw-table .quote {
  font: italic clamp(1rem, 2vw, 1.25rem)/1.45 Georgia, serif;
  color: #efc9b7;
  margin-block: 0;
}
.draw-table .whole-deck {
  margin: clamp(16px, 3vh, 32px) auto 0;
  isolation: isolate;
}
.draw-table .whole-deck::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 22% 1% 3%;
  background: radial-gradient(ellipse, #b65b4538 0, #35111c00 70%);
}
.draw-table .leaf.under-raised { visibility: hidden }
.draw-table .leaf rect:first-child, .draw-table .raised .printed rect:first-child { fill: url(#printed-back) }
.draw-table .leaf > :not(:first-child) { display: none }
.draw-table .hint { font: italic 1.03rem/1.5 Georgia, serif; color: #edcfc3 }
.draw-table .slots {
  gap: clamp(12px, 2vw, 22px);
  margin: clamp(16px, 3vh, 30px) 0 10px;
}
.draw-table .slots i {
  width: clamp(50px, 10vw, 72px);
  height: auto;
  aspect-ratio: 70/111;
  border: 1px solid #b7806b70;
  border-radius: 5px;
  box-shadow: inset 0 0 14px #180b1680;
}
.draw-table .slots .filled, .slot-flight, .spread .card:not(.face) {
  background: #351b2e url(art/back.jpg) center / 100% 100%;
  border: 1px solid #c09371;
  outline: none;
  box-shadow: 1px 4px 9px #14091188;
}
.spread .card:not(.face) { color: transparent }
.draw-table .deck-controls output { font-variant-numeric: tabular-nums; color: #e2c3b5 }
.draw-table #take-card { margin: 1px auto 0 }
@media (max-width:600px) {
  .draw-table { padding-block: 10px }
  main[data-screen=pick]{padding-inline:14px}
}
@media(max-height:700px) {
  .draw-table {padding:0}
  .draw-table .whole-deck {max-width:520px;margin-top:12px}
  .draw-table .slots {margin-block:10px 0}
  .draw-table .slots i {width:40px}
}

.letter-tools {display:flex;align-items:center;justify-content:space-between;gap:.25rem 1rem;flex-wrap:wrap;margin-bottom:.85rem}
.letter-tools nav {display:flex;align-items:center;gap:1rem}
.letter .letter-tools button {font:500 .9rem/1.25 system-ui;padding:0;margin:0;min-height:44px;background:transparent;border:0;color:var(--wine);text-decoration:underline;text-decoration-color:#986d62;text-underline-offset:4px}
.letter .letter-tools .secondary {color:#684b45;text-decoration:none}
.letter .letter-tools button:hover {text-decoration:underline}
.letter button:focus-visible {outline:2px solid #6d3345;outline-offset:3px}
.letter h1:focus {outline:none}
.letter .card-name {color:#602535;font-weight:700}
.letter .keepsake {position:relative;isolation:isolate;overflow:hidden;background:#e9d8bd;color:#412734;margin:1.65rem 0;padding:1.4rem clamp(1.25rem,4vw,2.65rem) 1.55rem;border-block:1px solid #b78e69}
.letter .keepsake::after {content:'✧';position:absolute;right:-.2em;top:-.37em;color:#a9795620;font:9rem/1 Georgia;z-index:-1}
.letter .keepsake h2 {margin:0 0 .55rem;font:600 .88rem/1.4 system-ui;color:#744b3e}
.letter .keepsake p {max-width:35ch;margin:0;font:italic clamp(1.45rem,3.5vw,2rem)/1.22 Georgia,serif;text-wrap:pretty}
@media(max-width:520px){.letter-tools{align-items:flex-start}.letter-tools nav{gap:.85rem}.letter-tools>small{width:100%}}

/* Keep the wordmark in Georgia and use conversational type for the reading. */
:root {
  --display-type: "Avenir Next", Avenir, "Segoe UI", "Trebuchet MS", sans-serif;
  --book-type: var(--display-type);
}
h1, .draw-table h1, .letter h1 {
  font-family: var(--display-type);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -.025em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 em {font-style: normal}
main small, .letter .keepsake h2, footer {
  font: normal .8125rem/1.5 var(--display-type);
  text-transform: none;
  letter-spacing: .025em;
}
label, textarea, button, .letter .letter-tools button, .draw-table .hint,
.draw-table .deck-controls output {font-family: var(--book-type)}
label, button {font-size: 1rem}
button:not(.card):not([data-step]) {border-radius: .8rem}
.letter {max-width: 40rem}
.letter h1 {font-size:clamp(2rem, 4.5vw, 3.1rem); margin: .36em 0 .52em}
.letter>p, .letter aside button {
  font: normal clamp(1.0625rem, 1.7vw, 1.16rem)/1.7 var(--book-type);
  letter-spacing: normal;
}
.letter>p {color:#3e3032}
.letter aside button {max-width:100%;white-space:normal;text-wrap:balance}
.letter .card-name {color:#682b37;font-weight:600}
.reading-cards {
  display:flex; align-items:baseline; flex-wrap:wrap; gap:.85rem;
  margin:0 0 1.55rem; padding:0 0 1.25rem;
  border-bottom:1px solid #bd9d827d;
}
.reading-cards figure {margin:0}
.reading-cards figure:has(img) {width:min(27%,6.75rem);align-self:flex-start}
.reading-cards img {display:block;width:100%;height:auto;aspect-ratio:.64;border-radius:4%;box-shadow:0 3px 7px #41242a25}
.reading-cards figcaption {margin-top:.55rem;font:normal .875rem/1.35 var(--display-type);color:#693e41}
.letter-tools nav {gap:1.1rem}
.letter .letter-tools button {font-size:1rem}
.letter .keepsake {background:#efdecc;border:0;border-radius:1rem}
.letter .keepsake::after {content:none}
.letter .keepsake p {font:normal clamp(1.4rem,3vw,1.85rem)/1.32 var(--book-type)}
.letter aside {border-color:#bd9d827d}

body {font-family:var(--book-type)}
header {font-family:Georgia,serif}
body:has(.letter) {background:#faf1e6;color:#442d33}
main[data-screen=pick] .draw-table .quote, .spread .face {font-family:var(--book-type)}
.draw-table .hint {font-style:normal}
.letter .keepsake p {font-weight:450}

header .brand-home {color:inherit;text-decoration:none}
header .brand-home:hover {text-decoration:underline;text-underline-offset:.25em}
header .brand-home:focus-visible {outline:2px solid currentColor;outline-offset:5px}

.letter .continuation {border:0;padding:0}
.letter .continuation summary {
  display:block;
  list-style:none;
  cursor:pointer;
  font:normal clamp(1.0625rem,1.7vw,1.16rem)/1.7 var(--book-type);
}
.letter .continuation summary::-webkit-details-marker {display:none}
.letter .continuation-teaser {
  display:block;
  max-height:4.4em;
  overflow:hidden;
  margin-bottom:.65rem;
  color:#3e3032;
  -webkit-mask-image:linear-gradient(to bottom, #000 12%, transparent 100%);
  mask-image:linear-gradient(to bottom, #000 12%, transparent 100%);
}
.letter .continuation-cta {
  display:inline-flex;
  align-items:center;
  gap:.7rem;
  border-radius:.8rem;
  padding:12px 24px;
  background:var(--wine);
  color:var(--paper);
}
.letter .continuation summary:hover .continuation-cta {background:#67212d}
.letter .continuation summary:focus-visible {outline:none}
.letter .continuation summary:focus-visible .continuation-cta {
  outline:2px solid var(--wine);
  outline-offset:4px;
}
.continuation-chevron {
  width:.48em;
  height:.48em;
  border:solid currentColor;
  border-width:0 2px 2px 0;
  transform:translateY(-.12em) rotate(45deg);
}
.continuation[open] .continuation-teaser {display:none}
.continuation[open] .continuation-chevron {transform:translateY(.12em) rotate(225deg)}
.continuation[open] summary {margin-bottom:1rem}
.letter .continuation > p {font:normal clamp(1.0625rem,1.7vw,1.16rem)/1.7 var(--book-type);margin:0 0 1em;padding:0;color:#3e3032}

main[data-screen=home]:has(#home-content) { display: block; }
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .83fr);
  align-items: center;
  gap: 6%;
}
.home-eyebrow {
  display: block;
  margin-bottom: .65rem;
  color: #e6c18e;
  font: 500 .875rem/1.4 "Avenir Next", system-ui, sans-serif;
  letter-spacing: .08em;
}
.home-intro {
  max-width: 32ch;
  margin: 0 0 1.1rem;
  color: #f0dacf;
  font-size: 1rem;
  line-height: 1.6;
}
.editorial-example { margin: 1.25rem 0; }
.editorial-example img {
  width: min(32%, 7.25rem);
  height: auto;
  display: block;
  border-radius: .5rem;
  margin-bottom: .65rem;
}
.editorial {
  color: #f9eade;
  font: 17px/1.65 "Avenir Next", system-ui, sans-serif;
}
.home-guide {
  margin-top: clamp(48px, 8vw, 100px);
  padding-top: 23px;
  border-top: 1px solid #dfac8040;
}
.editorial h2 {
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.25;
  margin: 1.35em 0 .4em;
}
.editorial p { margin: 0 0 1em; max-width: 62ch; }
.editorial li { max-width: 62ch; margin-bottom: .35em; }
.editorial a, footer a { color: #f0c995; text-underline-offset: 3px; }
footer a { margin-left: .65em; }
.editorial-page { margin: 0; }
.editorial-page main { padding-block: 42px 60px; }
.editorial-page h1 {
  font: 500 clamp(34px, 6vw, 60px)/1.12 "Avenir Next", system-ui, sans-serif;
  letter-spacing: -.035em;
  margin: 0 0 .45em;
}
.editorial-page header a { color: inherit; text-decoration: none; }
.editorial a.editorial-cta {
  display: inline-block;
  margin: 8px 0;
  padding: 12px 24px;
  border-radius: 30px;
  background: #e7bd89;
  color: #271e27;
  text-decoration: none;
}
@media (max-width: 680px) {
  .home-layout { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
}
.editorial-page header, .editorial-page main, .editorial-page footer {
  box-sizing: border-box;
  margin-inline: auto;
  padding-inline: clamp(20px, 6vw, 64px);
}
.editorial-page header, .editorial-page footer {
  padding-block: 18px;
  font-size: 15px;
}
body:has(.letter) footer a { color: #603841; }
