/* The two fonts are served from this site (src/fonts), not from Google. Both are variable fonts,
   Latin subset, under the SIL Open Font License: see src/fonts/README.txt. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/fraunces-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;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/figtree-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;
}

:root {
  --paper: #F6EEDF;
  --paper-2: #EDE0C8;
  --card: #FBF6EA;
  --ink: #221C35;
  --ink-2: #5B5470;
  --clay: #C9573A;
  --sun: #E3A72F;
  --sage: #7F9A83;
  --rose: #D98F86;
  --night: #2B2550;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --radius-card: 6% / 3.6%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper) radial-gradient(52rem 26rem at 50% -9rem, #F8DFA4 0%, rgba(248, 223, 164, 0) 70%) no-repeat;
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- header and footer ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 20px 2px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 20px/1 var(--serif);
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand svg { width: 17px; height: 17px; flex: none; }
.deck-link {
  font: 600 14px/1 var(--sans);
  text-decoration: none;
  padding: 9px 0 9px 10px;
  color: var(--ink-2);
  white-space: nowrap;
}
.tabs {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 30px 6px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  /* six tabs do not fit a phone: the row scrolls and the right edge fades as a hint */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  font: 600 14px/1 var(--sans);
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }

main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 20px 44px;
}

.foot {
  padding: 26px 20px calc(30px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
}
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.foot a { text-decoration: none; font-weight: 600; color: var(--ink); }
.foot p + p { margin-top: 4px; }

/* ---------- type ---------- */
.eyebrow {
  font: 700 12px/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clay);
}
h1 {
  font: 600 clamp(31px, 8.6vw, 44px)/1.04 var(--serif);
  letter-spacing: -.02em;
  margin-top: 10px;
  text-wrap: balance;
}
.lede { color: var(--ink-2); margin-top: 10px; text-wrap: balance; }
.intro { text-align: center; padding-top: 10px; }

.ask { margin: 16px auto 0; max-width: 420px; }
.ask input {
  width: 100%;
  font: 500 17px/1.3 var(--sans);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
}
.ask input:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.ask small { display: block; margin-top: 7px; color: var(--ink-2); font-size: 13px; }
.spread.has-result .ask { display: none; }

/* ---------- cards on the table ---------- */
.table { margin-top: 12px; }
.fan {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 26px 0 16px;
  transition: height .65s var(--ease), padding .65s var(--ease), opacity .3s;
}
.spread[data-pick="3"] .fan { --cw: min(22vw, 124px); --ov: -.12; padding-bottom: 40px; }
.fan .gap { flex: none; width: var(--cw); margin: 0 calc(var(--cw) * var(--ov)); }
.spread[data-pick="1"] .fan { --cw: min(27vw, 150px); --ov: .02; }

.tcard {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  flex: none;
  position: relative;
  aspect-ratio: 3 / 5;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  perspective: 1000px;
  border-radius: var(--radius-card);
  box-shadow: 0 8px 18px rgba(34, 28, 53, .2);
  -webkit-tap-highlight-color: transparent;
}
.tcard:focus-visible { outline: 3px solid var(--clay); outline-offset: 4px; border-radius: 10px; }
.tcard-inner {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.3, 1.25, .45, 1);
}
.tcard.is-flipped .tcard-inner { transform: rotateY(180deg); }
.tcard.no-anim .tcard-inner { transition: none; }
.tcard-back, .tcard-front {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: var(--radius-card);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.tcard-front { transform: rotateY(180deg); }
.tcard.is-reversed .tcard-front { transform: rotateY(180deg) rotate(180deg); }
.tcard svg, .face svg { display: block; width: 100%; height: 100%; }

.fan .tcard {
  width: var(--cw);
  margin: 0 calc(var(--cw) * var(--ov));
  rotate: var(--r, 0deg);
  translate: 0 var(--y, 0px);
  transition: translate .25s var(--ease), opacity .25s;
  animation: deal .55s var(--ease) backwards;
  animation-delay: calc(var(--i) * 70ms);
}
.fan .tcard:hover, .fan .tcard:focus-visible { translate: 0 calc(var(--y, 0px) - 12px); }
.fan .tcard.is-leaving { opacity: 0; translate: 0 calc(var(--y, 0px) + 18px); pointer-events: none; }
@keyframes deal {
  from { opacity: 0; transform: translateY(44px) scale(.9); }
  to { opacity: 1; transform: none; }
}

.slots { display: flex; justify-content: center; gap: 12px; margin-top: 4px; }
.spread[data-pick="3"] .slots { --sw: min(28vw, 160px); }
.spread[data-pick="1"] .slots { --sw: min(60vw, 260px); display: none; }
.spread[data-pick="1"] .table.is-done .slots { display: flex; }
.slot { width: var(--sw); text-align: center; }
.slot-frame {
  position: relative;
  aspect-ratio: 3 / 5;
  border: 2px dashed rgba(34, 28, 53, .28);
  border-radius: var(--radius-card);
  transition: border-color .3s;
}
.slot-frame .tcard {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  rotate: 0deg;
  translate: none;
  animation: none;
  cursor: default;
}
.slot-label {
  margin-top: 10px;
  font: 700 11px/1.2 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.slot-name {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  font: 600 15px/1.2 var(--serif);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.table.is-done .fan { height: 0 !important; padding: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.table.is-done .slot-frame { border-color: transparent; }

/* ---------- reading ---------- */
.reading { margin-top: 24px; }
.reading > * { animation: rise .6s var(--ease) both; }
.reading > *:nth-child(2) { animation-delay: .08s; }
.reading > *:nth-child(3) { animation-delay: .16s; }
.reading > *:nth-child(4) { animation-delay: .24s; }
.reading > *:nth-child(n+5) { animation-delay: .32s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.r-head { text-align: center; }
.tag {
  display: inline-block;
  font: 700 11px/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  vertical-align: middle;
}
.tag.rev { background: var(--clay); }
.r-head h2 { font: 600 36px/1.05 var(--serif); letter-spacing: -.02em; margin-top: 12px; }
.keys { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.keys li { font: 600 13px/1 var(--sans); padding: 7px 11px; border-radius: 999px; border: 1.5px solid var(--ink); }
.msg { font: 400 21px/1.42 var(--serif); margin-top: 20px; text-wrap: pretty; }
.facets { display: grid; gap: 10px; margin-top: 20px; }
.facet { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; padding: 15px 17px; }
.facet h3 {
  font: 700 11px/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 7px;
}
.facet.try { background: var(--ink); color: var(--paper); }
.facet.try h3 { color: var(--sun); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 700 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.note { margin-top: 16px; font-size: 14px; color: var(--ink-2); text-align: center; }

.next { display: grid; gap: 8px; margin-top: 26px; }
.next a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border-radius: 18px;
  background: var(--paper-2);
  text-decoration: none;
  font: 600 16px/1.2 var(--sans);
}
.next a::after { content: "\2192"; }

.pos { padding: 20px 0; border-top: 1.5px solid rgba(34, 28, 53, .15); }
.pos:first-child { border-top: 0; padding-top: 0; }
.pos h3 { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--clay); }
.pos h2 { font: 600 27px/1.1 var(--serif); letter-spacing: -.01em; margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pos .lead { font: 400 19px/1.42 var(--serif); margin-top: 10px; }
.pos p + p { margin-top: 8px; color: var(--ink-2); }
.pos a { display: inline-block; margin-top: 10px; font-weight: 600; }

.verdict { font: 700 clamp(60px, 19vw, 92px)/1 var(--serif); letter-spacing: -.03em; margin-top: 8px; }
.verdict.yes { color: #4C7757; }
.verdict.no { color: var(--clay); }
.q { font: italic 400 19px/1.4 var(--serif); color: var(--ink-2); text-wrap: balance; }

/* ---------- text below the spread ---------- */
.more { margin-top: 46px; padding-top: 26px; border-top: 1.5px solid rgba(34, 28, 53, .15); }
.more h2 { font: 600 24px/1.15 var(--serif); letter-spacing: -.01em; }
.more p { margin-top: 10px; color: var(--ink-2); }

.more h2:not(:first-child) { margin-top: 22px; }

/* ---------- horary ---------- */
.horary.has-result .hform { display: none; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 20px; }
.chips-label {
  flex-basis: 100%;
  margin-bottom: 4px;
  text-align: center;
  font: 700 12px/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font: 600 15px/1 var(--sans);
  cursor: pointer;
}
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.place { margin-top: 18px; text-align: center; }
.place-now { color: var(--ink-2); }
.place-now b { color: var(--ink); }
.linkbtn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  padding: 4px 2px;
  font: 600 15px/1.2 var(--sans);
  color: var(--clay);
  text-decoration: underline;
  cursor: pointer;
}
.place-edit { display: grid; gap: 8px; justify-items: center; margin-top: 10px; }
.place-edit select {
  width: 100%;
  max-width: 320px;
  font: 500 16px/1.2 var(--sans);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
}
.place-edit small { color: var(--ink-2); font-size: 13px; }
.hform .btn { width: 100%; margin-top: 20px; }
.verdict.long { font-size: clamp(40px, 12.5vw, 64px); }
.wheel { width: min(100%, 380px); margin: 18px auto 0; }
.wheel svg { display: block; width: 100%; height: auto; }

/* The wheel builds itself. horary.js adds .anim (hidden start) and then .go (play).
   The ring of signs and the planets turn clockwise into place, the way the sky turns;
   then the two houses light up, the planets of the question ripple, and the line is drawn. */
.wheel .w-sky { transform-box: view-box; transform-origin: 50% 50%; }
.wheel .w-planet,
.wheel .w-halo { transform-box: fill-box; transform-origin: center; }
.wheel.anim:not(.go) .w-sky { opacity: 0; transform: rotate(-80deg); }
.wheel.anim:not(.go) .w-planet,
.wheel.anim:not(.go) .w-sector,
.wheel.anim:not(.go) .w-angle,
.wheel.anim:not(.go) .w-link { opacity: 0; }
.wheel.go .w-sky { animation: w-turn 1.7s cubic-bezier(.16, 1, .3, 1) both; will-change: transform; }
.wheel.go .w-planet { animation: w-pop .55s var(--ease) both; animation-delay: calc(.2s + var(--i, 0) * .09s); }
.wheel.go .w-angle { animation: w-fade .5s ease 1.25s both; }
.wheel.go .w-sector { animation: w-fade .6s ease 1.5s both; }
.wheel.go .w-halo { animation: w-ring 1s ease-out 1.6s forwards; }
.wheel.go .w-link { animation: w-draw .8s var(--ease) 1.85s both; }
@keyframes w-turn {
  from { opacity: 0; transform: rotate(-80deg); }
  25% { opacity: 1; }
  to { opacity: 1; transform: rotate(0deg); }
}
@keyframes w-pop {
  from { opacity: 0; transform: scale(.2); }
  70% { opacity: 1; transform: scale(1.14); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes w-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes w-ring {
  from { opacity: .9; transform: scale(1); }
  to { opacity: 0; transform: scale(2.6); }
}
@keyframes w-draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }

/* The lock: a panel that says what the full reading holds, and the locked facets under it. */
.paywall {
  padding: 22px 18px 18px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.paywall .eyebrow { color: var(--sun); }
.paywall h3 { font: 600 25px/1.12 var(--serif); letter-spacing: -.01em; margin-top: 8px; }
.paywall ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; font-size: 15px; line-height: 1.35; }
.paywall li::before { content: "\2726\00a0"; color: var(--sun); }
.pw-price { margin-top: 14px; font: 600 19px/1.2 var(--serif); }
.paywall .btn { width: 100%; margin-top: 16px; background: var(--sun); border-color: var(--sun); color: var(--ink); }
.paywall .btn[disabled] { opacity: .75; cursor: default; }
.paywall .linkbtn { margin-top: 12px; color: var(--paper); font-weight: 500; font-size: 14px; }
.facet.locked { background: transparent; border-style: dashed; border-color: rgba(34, 28, 53, .35); }
.facet.locked h3 { color: var(--ink-2); margin-bottom: 10px; }
.veil { display: grid; gap: 8px; }
.veil span { height: 11px; border-radius: 6px; background: rgba(34, 28, 53, .1); }
.veil span:nth-child(2) { width: 90%; }
.veil span:nth-child(3) { width: 62%; }
.verdict.sealed { color: var(--ink-2); }

/* While the wheel plays on screen, the answer waits for the line to be drawn. */
.reading.sync > .wheel { animation-delay: 0s; }
.reading.sync > .stamp { animation-delay: .3s; }
.reading.sync .verdict { animation: v-in .7s var(--ease) 1.9s both; }
.reading.sync > .msg { animation-delay: 2.15s; }
.reading.sync > .facets,
.reading.sync > .positions,
.reading.sync > .actions,
.reading.sync > .note { animation-delay: 2.5s; }
@keyframes v-in {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to { opacity: 1; transform: none; }
}
.stamp {
  margin-top: 2px;
  text-align: center;
  font: 700 11px/1.3 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.facet h3 .dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  vertical-align: -1px;
}
.dot.you { background: var(--clay); }
.dot.it { background: var(--sun); }
.facet p + p { margin-top: 8px; }
.facet ul { margin: 0; padding-left: 18px; }
.facet li + li { margin-top: 6px; }
.facet.warn { background: var(--paper-2); }
.positions {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  background: var(--card);
}
.positions summary { font: 700 14px/1.2 var(--sans); cursor: pointer; }
.positions table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.positions th { text-align: left; font-weight: 600; padding: 6px 8px 6px 0; }
.positions thead th {
  font: 700 11px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid rgba(34, 28, 53, .18);
}
.positions th small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-2); }
.positions td { padding: 6px 0; color: var(--ink-2); white-space: nowrap; }
.positions th:last-child,
.positions td:last-child { text-align: right; padding-right: 0; }
.positions .note { text-align: left; margin-top: 10px; }

/* ---------- deck pages ---------- */
.deckgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; margin-top: 24px; }
.deckgrid a { text-decoration: none; text-align: center; font: 600 13px/1.25 var(--sans); }
.deckgrid .face {
  display: block;
  aspect-ratio: 3 / 5;
  margin-bottom: 8px;
  border-radius: var(--radius-card);
  box-shadow: 0 6px 14px rgba(34, 28, 53, .16);
  transition: transform .25s var(--ease);
}
.deckgrid a:hover .face { transform: translateY(-4px) rotate(-1.5deg); }

.cardpage h1 span { display: block; font: 500 16px/1.3 var(--sans); letter-spacing: 0; color: var(--ink-2); margin-top: 8px; }
.cardpage .hero {
  width: min(62vw, 260px);
  aspect-ratio: 3 / 5;
  margin: 22px auto 4px;
  border-radius: var(--radius-card);
  box-shadow: 0 10px 24px rgba(34, 28, 53, .2);
}
.cardpage .keys { margin-top: 18px; }
.cardpage section { margin-top: 22px; }
.cardpage h2, .prose h2 { font: 600 22px/1.2 var(--serif); letter-spacing: -.01em; margin-bottom: 6px; }
.prevnext { display: flex; justify-content: space-between; gap: 10px; margin-top: 30px; font-weight: 600; }
.prevnext a { text-decoration: none; }
.prose h2 { margin-top: 26px; }
.prose p { margin-top: 10px; }
.center { text-align: center; }

/* ---------- share sheet ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(34, 28, 53, .74);
}
.sheet {
  width: min(100%, 380px);
  max-height: 100%;
  overflow: auto;
  background: var(--paper);
  border-radius: 24px;
  padding: 18px;
  text-align: center;
}
.sheet img { width: min(100%, 236px); border-radius: 14px; box-shadow: 0 8px 22px rgba(34, 28, 53, .25); }
.sheet p { font-size: 14px; color: var(--ink-2); margin-top: 12px; }
.sheet .actions { margin-top: 14px; }

@media (min-width: 600px) {
  main { padding-top: 22px; }
  .top { padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
}
