/* Styles for the pages the server writes: saved readings, confirmations, privacy and terms. */
@font-face {
  font-family: "IM Fell English";
  src: url("/fonts/im-fell-english-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url("/fonts/im-fell-english-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #170d19;
  --plum: #22132a;
  --bone: #ecdfc6;
  --dim: #b9a793;
  --gold: #d9a95b;
  --gold-bright: #efc888;
  --line: rgba(236, 223, 198, 0.2);
  --display: "IM Fell English", "Iowan Old Style", Palatino, Georgia, serif;
  --text: "EB Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --edge: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(90, 22, 38, 0.5), transparent 70%),
    var(--night);
  background-repeat: no-repeat;
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.25rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ol,
figure {
  margin: 0;
  padding: 0;
}

a {
  color: var(--bone);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

.top {
  padding: 22px var(--edge) 0;
}

.brand {
  font-family: var(--display);
  font-size: 1.75rem;
  text-decoration: none;
}

main {
  padding: 0 var(--edge);
}

.button {
  display: inline-block;
  background: var(--gold);
  color: var(--night);
  border: 0;
  border-radius: 999px;
  padding: 0.72em 1.6em;
  min-height: 48px;
  font: 500 1.125rem var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.button:hover {
  background: var(--gold-bright);
}

/* ---- a saved reading ---- */

.reading {
  max-width: 43rem;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 88px) 0 64px;
}

.when {
  font-style: italic;
  color: var(--dim);
  text-align: center;
}

.reading h1 {
  margin-top: 0.5rem;
  font: 400 clamp(2.6rem, 7vw, 4.5rem) / 1.02 var(--display);
  text-align: center;
  text-wrap: balance;
}

.question {
  margin-top: 1.2rem;
  text-align: center;
  font: italic 400 1.5rem/1.35 var(--display);
  color: var(--gold-bright);
  text-wrap: balance;
}

.opening {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 1.375rem;
  line-height: 1.5;
}

.spread {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 30px);
  margin: clamp(36px, 7vw, 64px) 0;
}

.spread li {
  flex: 0 1 12.5rem;
  animation: deal 1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i) * 0.16s + 0.2s);
}

.spread li:nth-child(odd) .card {
  rotate: -1.4deg;
}

.spread li:nth-child(even) .card {
  rotate: 1.1deg;
}

@keyframes deal {
  from {
    opacity: 0;
    translate: 0 46px;
    rotate: 5deg;
  }
}

.card {
  border-radius: 4.5% / 2.7%;
  overflow: hidden;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.5),
    0 18px 38px -8px rgba(0, 0, 0, 0.75),
    0 0 60px rgba(217, 169, 91, 0.1);
}

.card img {
  display: block;
  width: 100%;
  height: auto;
}

.card.reversed img {
  rotate: 180deg;
}

figcaption {
  margin-top: 1rem;
  text-align: center;
  line-height: 1.25;
}

figcaption em,
figcaption strong,
figcaption span {
  display: block;
}

figcaption em {
  font-size: 0.9375rem;
  color: var(--dim);
}

figcaption strong {
  font: 400 clamp(1.0625rem, 2.6vw, 1.375rem) var(--display);
}

figcaption span {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--gold);
}

.passage {
  margin-top: 2rem;
}

.passage h2 {
  font: 400 1.625rem/1.2 var(--display);
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.passage h2 em {
  font-size: 1.125rem;
}

.whole {
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.guidance {
  margin-top: 1.1rem;
  font: italic 400 1.5625rem/1.4 var(--display);
  color: var(--gold-bright);
}

.pending {
  text-align: center;
  color: var(--dim);
  font-style: italic;
}

.again {
  margin-top: 2.8rem;
  text-align: center;
}

/* ---- larger spreads, follow-ups ---- */

.spread.many {
  flex-wrap: wrap;
  gap: 14px;
}

.spread.many li {
  flex: 0 1 6.6rem;
}

.spread.many figcaption em,
.spread.many figcaption span {
  font-size: 0.8125rem;
}

.spread.many figcaption strong {
  font-size: 0.9375rem;
}

.place {
  font-style: italic;
  color: var(--dim);
  font-size: 1.0625rem;
}

.follow {
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.follow h2 {
  font: italic 400 1.5rem/1.3 var(--display);
  color: var(--gold-bright);
  margin-bottom: 0.4rem;
}

/* ---- journal and plans ---- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.top-link {
  font-size: 1.125rem;
}

.journal,
.upgrade {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 88px) 0 72px;
}

.journal h1,
.upgrade h1 {
  font: 400 clamp(2.6rem, 7vw, 4.25rem) / 1 var(--display);
  margin-bottom: 1.2rem;
}

.journal h2,
.upgrade h2 {
  font: 400 1.75rem/1.2 var(--display);
  color: var(--gold);
  margin: 2.6rem 0 0.8rem;
}

.journal h3 {
  font: 400 1.25rem/1.3 var(--display);
  margin: 1.6rem 0 0.6rem;
  color: var(--dim);
}

.journal .lede,
.upgrade .lede {
  font-size: 1.375rem;
  line-height: 1.5;
  margin-bottom: 1.6rem;
}

.welcome {
  color: var(--gold-bright);
  font-style: italic;
}

.facts,
.suits,
.repeat,
.entries,
.includes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2.4rem;
  margin-bottom: 1rem;
}

.facts strong {
  font: 400 2.25rem/1 var(--display);
  color: var(--bone);
  margin-right: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.suits {
  margin-top: 1rem;
  display: grid;
  gap: 0.35rem;
}

.suits li {
  display: grid;
  grid-template-columns: 9rem 1fr 2rem;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.0625rem;
}

.suits i {
  height: 6px;
  width: var(--w);
  min-width: 2px;
  background: var(--gold);
  border-radius: 3px;
}

.suits b {
  font-weight: 400;
  color: var(--dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.repeat {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.8rem;
}

.repeat li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  line-height: 1.25;
}

.repeat em {
  display: block;
  color: var(--dim);
  font-size: 0.9375rem;
}

.thumb {
  display: inline-block;
  width: 2.5rem;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  flex: none;
}

.thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.thumb.reversed img {
  rotate: 180deg;
}

.entries li + li {
  border-top: 1px solid var(--line);
}

.entries a {
  display: block;
  padding: 1.1rem 0;
  text-decoration: none;
  line-height: 1.35;
}

.entries a:hover strong {
  color: var(--gold-bright);
}

.entries .when {
  display: block;
  font-size: 0.9375rem;
  color: var(--dim);
}

.entries strong {
  display: block;
  font: 400 1.5rem/1.25 var(--display);
}

.entries em {
  display: block;
  color: var(--dim);
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.6rem;
}

.thumbs .thumb {
  width: 1.9rem;
}

.account,
.signin {
  margin-top: 2.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.signin label {
  display: block;
  font-style: italic;
  color: var(--dim);
}

.signin .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0.3rem;
}

.signin input {
  flex: 1 1 13rem;
  min-height: 48px;
  background: rgba(10, 4, 11, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  color: var(--bone);
  font: inherit;
}

.signin button,
.linkish {
  font: inherit;
  cursor: pointer;
}

.signin button {
  background: var(--gold);
  color: var(--night);
  border: 0;
  border-radius: 999px;
  padding: 0.6em 1.4em;
  min-height: 48px;
  font-weight: 500;
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--bone);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.status {
  min-height: 1.6em;
  margin-top: 0.7rem;
  color: var(--gold-bright);
}

.includes li {
  padding: 0.55rem 0 0.55rem 1.6rem;
  position: relative;
  border-top: 1px solid var(--line);
}

.includes li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.25rem;
  width: 7px;
  height: 7px;
  rotate: 45deg;
  background: var(--gold);
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 18px;
  margin-top: 2rem;
}

.plan {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
  background: rgba(34, 19, 42, 0.6);
}

.plan h2 {
  margin-top: 0;
}

.price {
  font: 400 3rem/1 var(--display);
  margin-bottom: 1.2rem;
}

.price span {
  font: 400 1.125rem var(--text);
  color: var(--dim);
}

.saving {
  margin: -0.6rem 0 1.2rem;
  color: var(--gold-bright);
  font-style: italic;
}

.soon {
  margin-top: 2rem;
  font: italic 400 1.5rem/1.4 var(--display);
  color: var(--gold-bright);
}

.fine {
  font-size: 0.9375rem;
  color: var(--dim);
}

/* ---- header links, reading tools, invitation, birth card ---- */

/* The menu is the same on every page as on the home page: same items, order, size and underline. */
.top {
  padding: max(18px, env(safe-area-inset-top)) var(--edge) 0;
}

.top .brand {
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--bone);
}

.top-links {
  display: flex;
  align-items: baseline;
  gap: clamp(0.8rem, 2.4vw, 1.8rem);
  font-size: 1.125rem;
  white-space: nowrap;
}

.top-links a,
.top-links .linkish {
  display: inline-block;
  padding: 10px 2px;
  min-height: 44px;
  color: var(--bone);
  font-family: var(--text);
  font-size: inherit;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}

.top-links a:hover,
.top-links .linkish:hover {
  color: var(--gold-bright);
}

@media (max-width: 560px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-links {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9375rem;
  }

  .top-links a,
  .top-links .linkish {
    min-height: 40px;
    padding: 6px 0;
  }
}

.tools {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.8rem;
}

.tools .linkish {
  min-height: 44px;
}

.invite {
  margin-top: 2rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(34, 19, 42, 0.6);
}

.invite h2 {
  font: 400 1.75rem/1.2 var(--display);
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.invite-link {
  width: min(100%, 24rem);
  min-height: 48px;
  margin: 0.9rem 0.6rem 0.6rem 0;
  background: rgba(10, 4, 11, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  color: var(--bone);
  font: inherit;
  font-size: 1rem;
}

/* the journal's own invitation link */
.invite-own {
  margin-top: 2rem;
}

.invite-own .pass-line {
  color: var(--gold);
  font-style: italic;
}

.birth {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 2rem 1.6rem;
}

.birth figure {
  margin: 0 0 0.9rem;
  text-align: center;
}

.birth .card {
  max-width: 13rem;
  margin: 0 auto 0.8rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.birth .card img {
  display: block;
  width: 100%;
  height: auto;
}

.birth figcaption em,
.birth figcaption strong {
  display: block;
}

.birth figcaption em {
  color: var(--dim);
  font-size: 0.9375rem;
}

.birth figcaption strong {
  font: 400 1.5rem/1.2 var(--display);
}

.keep {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  margin-top: 0.6rem;
  font-style: normal !important;
}

.keep input {
  flex: none !important;
  width: 1.1rem;
  height: 1.1rem;
  min-height: 0 !important;
  padding: 0;
  accent-color: var(--gold);
}

.how {
  margin-top: 1.8rem;
  color: var(--dim);
  font-size: 0.9375rem;
}

/* ---- morning readings ---- */

.letter {
  position: relative;
  max-width: 68rem;
  margin: 0 auto 56px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  min-height: 27rem;
  display: flex;
  align-items: flex-end;
}

.letter-film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 50%;
  z-index: -2;
}

.letter::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to right, rgba(23, 13, 25, 0.93) 0%, rgba(23, 13, 25, 0.72) 42%, rgba(23, 13, 25, 0.05) 78%);
}

.letter-body {
  max-width: 31rem;
  padding: clamp(28px, 5vw, 56px);
}

.letter h2 {
  font: 400 clamp(2rem, 4.6vw, 3rem) / 1.05 var(--display);
  margin-bottom: 0.7rem;
}

.subscribe {
  margin-top: 1.3rem;
}

.subscribe label {
  display: block;
  font-style: italic;
  color: var(--dim);
}

.subscribe .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0.25rem;
}

.subscribe input {
  flex: 1 1 13rem;
  min-height: 48px;
  background: rgba(10, 4, 11, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  color: var(--bone);
  font: inherit;
}

.subscribe input:focus {
  outline: none;
  border-color: var(--gold-bright);
}

.subscribe button {
  flex: 1 1 auto;
  background: var(--gold);
  color: var(--night);
  border: 0;
  border-radius: 999px;
  padding: 0.6em 1.4em;
  min-height: 48px;
  font: 500 1.125rem var(--text);
  cursor: pointer;
}

.subscribe button:disabled {
  opacity: 0.6;
}

.subscribe .status {
  min-height: 1.6em;
  margin-top: 0.8rem;
  color: var(--gold-bright);
}

.subscribe .fine {
  font-size: 0.9375rem;
  color: var(--dim);
}

.subscribe.done label,
.subscribe.done .row,
.subscribe.done .fine {
  display: none;
}

/* ---- short messages, privacy, terms ---- */

.message {
  max-width: 36rem;
  margin: 0 auto;
  padding: clamp(64px, 16vh, 150px) 0 96px;
  text-align: center;
}

.message h1 {
  font: 400 clamp(2.4rem, 6.5vw, 4rem) / 1.04 var(--display);
  text-wrap: balance;
  margin-bottom: 1.2rem;
}

.message p,
.message form {
  margin-top: 1.4rem;
}

.legal {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 88px) 0 72px;
}

.legal h1 {
  font: 400 clamp(2.6rem, 7vw, 4.25rem) / 1 var(--display);
  margin-bottom: 1.4rem;
}

.legal h2 {
  font: 400 1.625rem/1.2 var(--display);
  color: var(--gold);
  margin: 2.2rem 0 0.4rem;
}

.legal p + p {
  margin-top: 0.9rem;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 28px var(--edge) 40px;
  font-size: 1rem;
  color: var(--dim);
  text-align: center;
}

.foot a {
  color: var(--dim);
  margin: 0 0.6em;
}

@media (max-width: 640px) {
  body {
    font-size: 1.125rem;
  }

  .letter::after {
    background: linear-gradient(to top, rgba(23, 13, 25, 0.97) 0%, rgba(23, 13, 25, 0.86) 55%, rgba(23, 13, 25, 0.25) 100%);
  }

  .letter {
    min-height: 34rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Other ways of asking: rune stones, hexagrams, numbers ---- */

.card.stone,
.card.numeral,
.card.hexagram {
  aspect-ratio: 560 / 939;
  display: grid;
  place-items: center;
}

.card.stone {
  aspect-ratio: 4 / 5;
  margin: 12% 6%;
  border-radius: 46% 54% 50% 50% / 42% 44% 56% 58%;
  background:
    radial-gradient(120% 90% at 30% 18%, rgba(255, 244, 220, 0.2), transparent 55%),
    radial-gradient(90% 80% at 70% 90%, rgba(0, 0, 0, 0.55), transparent 60%),
    linear-gradient(155deg, #5b5148, #2c2622 62%, #1a1614);
  box-shadow:
    inset 0 2px 3px rgba(255, 240, 215, 0.22),
    inset 0 -10px 22px rgba(0, 0, 0, 0.6),
    0 22px 30px -10px rgba(0, 0, 0, 0.8);
}

.card.stone span {
  font-family: "Noto Sans Runic", "Segoe UI Historic", "Apple Symbols", "Segoe UI Symbol", sans-serif;
  font-size: clamp(3rem, 11vw, 5.6rem);
  line-height: 1;
  color: #1a120c;
  /* carved: dark cut, a lit lower lip, and gold leaf rubbed into the groove */
  text-shadow:
    0 1px 0 rgba(255, 236, 200, 0.35),
    0 -1px 1px rgba(0, 0, 0, 0.9),
    0 0 14px rgba(239, 200, 136, 0.35);
  -webkit-text-stroke: 1px rgba(217, 169, 91, 0.75);
}

.card.stone.reversed span {
  rotate: 180deg;
}

.card.numeral,
.card.hexagram {
  background:
    radial-gradient(90% 60% at 50% 30%, rgba(217, 169, 91, 0.16), transparent 70%),
    linear-gradient(170deg, #2e1a36, #170d19);
  outline: 1px solid rgba(217, 169, 91, 0.55);
  outline-offset: -9px;
}

.card.numeral span {
  font-family: var(--display);
  font-size: clamp(3.4rem, 12vw, 6.5rem);
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 0 30px rgba(217, 169, 91, 0.45);
}

.card.hexagram {
  grid-template-rows: repeat(6, 1fr);
  place-items: stretch;
  gap: 5.5%;
  padding: 30% 20%;
}

.hexagram i {
  display: block;
  border-radius: 2px;
  background: linear-gradient(#f3d6a0, #c8944a);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.hexagram i.yin {
  background:
    linear-gradient(90deg, transparent 42%, #20122a 42%, #20122a 58%, transparent 58%),
    linear-gradient(#f3d6a0, #c8944a);
  background: linear-gradient(90deg, #dcae66 0 42%, transparent 42% 58%, #dcae66 58% 100%);
  box-shadow: none;
}

.hexagram i.moving {
  filter: drop-shadow(0 0 7px rgba(255, 214, 140, 0.95)) brightness(1.2);
  animation: moving-line 2.4s ease-in-out infinite;
}

@keyframes moving-line {
  50% {
    opacity: 0.55;
  }
}

.thumb.glyph {
  display: grid;
  place-items: center;
  aspect-ratio: 56 / 94;
  background: linear-gradient(170deg, #2e1a36, #170d19);
  outline: 1px solid rgba(217, 169, 91, 0.4);
  outline-offset: -2px;
  color: var(--gold-bright);
  font-family: "Noto Sans Runic", "Segoe UI Historic", "Apple Symbols", var(--display);
  font-size: 1.05rem;
}

.doors {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: clamp(18px, 3vw, 34px) clamp(14px, 2.5vw, 26px);
  margin: 2.6rem 0;
  padding: 0;
}

.doors a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.doors .card {
  transition:
    translate 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s;
}

.doors a:hover .card,
.doors a:focus-visible .card {
  translate: 0 -8px;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.5),
    0 28px 44px -10px rgba(0, 0, 0, 0.85),
    0 0 70px rgba(217, 169, 91, 0.28);
}

.doors .card.stone {
  margin: 29% 6% 28.7%; /* the stone stands as tall in its row as a card does */
}

.doors h2 {
  margin-top: 1rem;
  font-size: 1.3rem;
}

.doors p {
  margin-top: 0.3rem;
  color: var(--dim);
  font-size: 0.975rem;
  line-height: 1.4;
}

.ways {
  max-width: 62rem;
}

.cast textarea {
  flex: 1 1 100%;
  background: rgba(10, 4, 11, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: var(--bone);
  font: inherit;
  resize: vertical;
}

.cast label + .row {
  margin-bottom: 1rem;
}

.cast input[type="date"] {
  color-scheme: dark;
}

.cast .fine {
  color: var(--dim);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.cast.busy button {
  opacity: 0.6;
  pointer-events: none;
}

.cast .status:empty {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hexagram i.moving {
    animation: none;
  }
  .doors .card {
    transition: none;
  }
}

/* ================= The journal: a page to be looked at ================= */

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body.bare main {
  padding: 0;
}

body.bare .top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
}

.jr {
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow: clip;
}

.jr h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  color: var(--gold-bright);
  text-wrap: balance;
}

.jr-heading {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.jr-heading p {
  margin-top: 0.7rem;
  color: var(--dim);
}

.jr-heading strong {
  color: var(--bone);
  font-weight: 500;
}

.jr > section {
  padding: clamp(64px, 11vw, 140px) var(--edge) 0;
}

/* things rise into place as they are scrolled to */
.js .jr .reveal {
  opacity: 0;
  translate: 0 34px;
  transition: opacity 1.1s var(--ease), translate 1.1s var(--ease);
}

.js .jr .reveal.in {
  opacity: 1;
  translate: 0 0;
}

/* ---- opening scene ---- */

.jr-hero {
  position: relative;
  min-height: min(100svh, 62rem);
  display: grid;
  align-items: center;
  padding: 110px var(--edge) clamp(90px, 16vh, 170px);
  isolation: isolate;
  overflow: hidden;
}

.jr-scene {
  position: absolute;
  inset: -4%;
  z-index: -2;
  translate: calc(var(--px, 0) * -14px) calc(var(--py, 0) * -10px + var(--scroll, 0) * 90px);
  transition: translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.jr-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 60%;
  animation: jr-breathe 26s ease-in-out infinite alternate;
}

@keyframes jr-breathe {
  from {
    scale: 1;
    filter: brightness(0.92);
  }
  to {
    scale: 1.08;
    filter: brightness(1.05);
  }
}

.jr-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, rgba(23, 13, 25, 0.9) 0%, rgba(23, 13, 25, 0.55) 38%, rgba(23, 13, 25, 0) 66%),
    linear-gradient(to top, var(--night) 0%, rgba(23, 13, 25, 0.5) 22%, rgba(23, 13, 25, 0) 48%),
    linear-gradient(to bottom, rgba(23, 13, 25, 0.7) 0%, rgba(23, 13, 25, 0) 20%);
}

.jr-motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.jr-title {
  max-width: 40rem;
}

.jr-tonight {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-style: italic;
  color: var(--dim);
  animation: jr-fade 1.4s 0.2s both;
}

.moon {
  width: 1.35em;
  height: 1.35em;
  flex: none;
  filter: drop-shadow(0 0 6px rgba(239, 200, 136, 0.55));
}

.moon-dark {
  fill: rgba(236, 223, 198, 0.1);
  stroke: rgba(236, 223, 198, 0.3);
  stroke-width: 0.6;
}

.moon-lit {
  fill: #f4e3bd;
}

.jr-hero h1 {
  margin-top: 0.4rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.6rem, 9.5vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.015em;
  color: var(--bone);
  text-shadow: 0 2px 40px rgba(10, 4, 11, 0.8);
}

.jr-hero h1 .word {
  display: inline-block;
  white-space: nowrap;
}

.jr-hero h1 i {
  display: inline-block;
  font-style: normal;
  animation: jr-letter 1.3s calc(var(--i) * 0.055s + 0.35s) cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes jr-letter {
  from {
    opacity: 0;
    translate: 0 0.5em;
    rotate: 7deg;
    filter: blur(6px);
  }
}

@keyframes jr-fade {
  from {
    opacity: 0;
  }
}

.jr-hero .lede {
  margin-top: 1.2rem;
  max-width: 30rem;
  font-size: 1.3125rem;
  animation: jr-fade 1.6s 1.2s both;
}

.jr-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 26px;
  height: 44px;
  margin-left: -13px;
  border: 1px solid rgba(236, 223, 198, 0.45);
  border-radius: 14px;
  animation: jr-fade 1.6s 2s both;
}

.jr-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold-bright);
  animation: jr-cue 2.2s ease-in-out infinite;
}

@keyframes jr-cue {
  60% {
    translate: 0 16px;
    opacity: 0;
  }
  100% {
    translate: 0 0;
    opacity: 0;
  }
}

/* ---- the sky ---- */

.jr > .jr-sky {
  position: relative;
  padding-bottom: clamp(20px, 4vw, 50px);
}

.jr-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.jr-sky .jr-heading {
  position: relative;
}

.jr-chart {
  position: relative;
  height: clamp(300px, 46vw, 520px);
  max-width: 78rem;
  margin: 1rem auto 0;
}

.jr-chart::before {
  /* a faint band of light across the sky */
  content: "";
  position: absolute;
  inset: 10% -10%;
  background: radial-gradient(ellipse 60% 42% at 50% 50%, rgba(122, 52, 96, 0.34), rgba(217, 169, 91, 0.06) 55%, transparent 72%);
  rotate: -7deg;
  filter: blur(8px);
}

.jr-chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.jr-chart polyline {
  fill: none;
  stroke: rgba(239, 200, 136, 0.5);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  /* with a non-scaling stroke the dashes are measured in screen pixels, so one dash longer than any line will do */
  stroke-dasharray: 9000;
  stroke-dashoffset: 9000;
  transition: stroke-dashoffset 7s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

.jr-sky.in polyline,
html:not(.js) .jr-chart polyline {
  stroke-dashoffset: 0;
}

.star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  display: grid;
  place-items: center;
  text-decoration: none;
  opacity: 0;
  scale: 0.2;
  transition: opacity 0.9s calc(var(--i) * 0.11s + 0.5s), scale 0.9s calc(var(--i) * 0.11s + 0.5s) cubic-bezier(0.2, 1.6, 0.4, 1);
}

.jr-sky.in .star,
html:not(.js) .star {
  opacity: 1;
  scale: 1;
}

.star::before {
  content: "";
  width: calc(var(--s) * 13px);
  height: calc(var(--s) * 13px);
  background: radial-gradient(circle, #fff7e2 0 18%, rgba(255, 221, 150, 0.9) 30%, rgba(239, 200, 136, 0) 70%);
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  animation: jr-twinkle calc(3.2s + var(--i) * 0.37s) ease-in-out infinite;
  transition: scale 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.star::after {
  content: "";
  position: absolute;
  width: calc(var(--s) * 30px);
  height: calc(var(--s) * 30px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 140, 0.4), transparent 68%);
}

.star.latest::after {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, rgba(255, 214, 140, 0.55), transparent 66%);
  animation: jr-pulse 3.4s ease-in-out infinite;
}

@keyframes jr-twinkle {
  50% {
    opacity: 0.55;
    rotate: 12deg;
  }
}

@keyframes jr-pulse {
  50% {
    scale: 1.35;
    opacity: 0.5;
  }
}

.star:hover::before,
.star:focus-visible::before {
  scale: 1.9;
}

.star b {
  position: absolute;
  bottom: 100%;
  left: 50%;
  translate: -50% 6px;
  width: max-content;
  max-width: 15rem;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(217, 169, 91, 0.4);
  background: rgba(23, 13, 25, 0.92);
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--bone);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, translate 0.3s;
  z-index: 2;
}

.star b em {
  display: block;
  font-family: var(--text);
  font-size: 0.875rem;
  color: var(--dim);
}

.star:hover b,
.star:focus-visible b,
.star.latest b {
  opacity: 1;
  translate: -50% 0;
}

/* near the edges the label opens inward, so it is never cut off */
.star.edge-r b {
  left: auto;
  right: 4px;
  translate: 0 6px;
}

.star.edge-l b {
  left: 4px;
  translate: 0 6px;
}

.star.edge-r:hover b,
.star.edge-r:focus-visible b,
.star.edge-r.latest b,
.star.edge-l:hover b,
.star.edge-l:focus-visible b,
.star.edge-l.latest b {
  translate: 0 0;
}

.jr-chart:has(.star:not(.latest):hover) .star.latest b {
  opacity: 0;
}

/* ---- three instruments ---- */

.jr-numbers ul {
  list-style: none;
  padding: 0;
  margin: clamp(30px, 5vw, 60px) auto 0;
  max-width: 68rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 4vw, 56px);
  text-align: center;
}

.jr-numbers li {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 1rem;
  color: var(--dim);
}

.jr-numbers strong {
  color: var(--bone);
  font-weight: 500;
}

.jr-numbers .count strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(5rem, 13vw, 9.5rem);
  line-height: 0.8;
  background: linear-gradient(180deg, #fbe7bd, #c98f43 70%, #7b4a1e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(217, 169, 91, 0.35));
}

.candles {
  display: flex;
  align-items: end;
  gap: clamp(8px, 1.4vw, 16px);
  height: 8.5rem;
}

.candles i {
  position: relative;
  width: 14px;
  height: 58px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, #6d5a3c, #cdb88a 45%, #5c4a30);
  opacity: 0.4;
}

.candles i:nth-child(3n + 1) {
  height: 46px;
}

.candles i:nth-child(4n + 2) {
  height: 70px;
}

.candles i:nth-child(5) {
  height: 52px;
}

.candles i.lit {
  opacity: 1;
  background: linear-gradient(90deg, #a87b2e, #ffe2a4 45%, #9a6c25);
  box-shadow: 0 -14px 34px 6px rgba(255, 180, 80, 0.28);
}

.candles i.lit::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  width: 11px;
  height: 24px;
  margin-left: -5.5px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 78%, #fffbe6 0 22%, #ffc94f 46%, #f2792b 72%, rgba(242, 121, 43, 0) 100%);
  transform-origin: 50% 100%;
  animation: jr-flame calc(1.1s + var(--i) * 0.13s) ease-in-out infinite alternate;
  filter: blur(0.3px);
}

.candles i::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1.5px;
  height: 5px;
  margin-left: -0.75px;
  background: #2b1d14;
}

@keyframes jr-flame {
  0% {
    transform: scale(1, 1) rotate(-3deg);
  }
  50% {
    transform: scale(0.9, 1.14) rotate(2deg);
  }
  100% {
    transform: scale(1.06, 0.93) rotate(4deg);
  }
}

.dial {
  height: 8.5rem;
  display: grid;
  place-items: center;
}

.dial img {
  width: 4.6rem;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 14px 26px -6px rgba(0, 0, 0, 0.8), 0 0 40px rgba(217, 169, 91, 0.18);
  transition: rotate 2.2s cubic-bezier(0.3, 1.3, 0.4, 1) 0.5s;
}

.jr-numbers.in .dial img,
html:not(.js) .dial img {
  rotate: var(--turn);
}

/* ---- the five medallions ---- */

.jr-suits ul {
  list-style: none;
  padding: 0;
  margin: clamp(30px, 5vw, 60px) auto 0;
  max-width: 76rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 2.4vw, 34px);
  text-align: center;
}

.jr-suits li {
  transition: opacity 1s calc(var(--i) * 0.12s + 0.2s), translate 1s calc(var(--i) * 0.12s + 0.2s) var(--ease);
}

.js .jr-suits:not(.in) li {
  opacity: 0;
  translate: 0 30px;
}

.medal {
  position: relative;
  aspect-ratio: 1;
  max-width: 13rem;
  margin: 0 auto;
}

.medal img {
  position: absolute;
  inset: 9%;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  /* the medallions are painted on black: keep the disc, drop the corners */
  -webkit-mask-image: radial-gradient(circle closest-side, #000 84%, transparent 89%);
  mask-image: radial-gradient(circle closest-side, #000 84%, transparent 89%);
  animation: jr-turn 9s calc(var(--i) * -1.7s) ease-in-out infinite alternate;
}

@keyframes jr-turn {
  from {
    transform: perspective(600px) rotateY(-16deg) rotateX(4deg);
    filter: brightness(0.92);
  }
  to {
    transform: perspective(600px) rotateY(16deg) rotateX(-4deg);
    filter: brightness(1.12);
  }
}

.jr-suits li:first-child .medal img {
  /* this one is a pendant, a little smaller in its frame */
  inset: 3%;
  width: 94%;
  height: 94%;
  -webkit-mask-image: radial-gradient(circle closest-side at 50% 53%, #000 79%, transparent 83%);
  mask-image: radial-gradient(circle closest-side at 50% 53%, #000 79%, transparent 83%);
}

.jr-suits li.none .medal img {
  filter: grayscale(0.85) brightness(0.5);
  animation: none;
}

.jr-suits li.lead .medal::before {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 200, 136, 0.3), transparent 66%);
  animation: jr-pulse 4s ease-in-out infinite;
}

.medal svg {
  position: absolute;
  inset: 0;
  rotate: -90deg;
}

.medal circle {
  fill: none;
  stroke: rgba(236, 223, 198, 0.12);
  stroke-width: 1.2;
}

.medal .arc {
  stroke: var(--gold-bright);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: var(--share) 1;
  stroke-dashoffset: var(--share);
  filter: drop-shadow(0 0 4px rgba(239, 200, 136, 0.8));
  transition: stroke-dashoffset 2.2s cubic-bezier(0.3, 0, 0.2, 1) calc(var(--i) * 0.14s + 0.6s);
}

.jr-suits.in .arc,
html:not(.js) .arc {
  stroke-dashoffset: 0;
}

.jr-suits h3 {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  color: var(--bone);
}

.jr-suits li p {
  color: var(--dim);
  font-size: 0.975rem;
  line-height: 1.3;
  text-wrap: balance;
}

.jr-suits b {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.9rem;
  color: var(--gold-bright);
}

/* ---- cards that return ---- */

.jr-repeat ul {
  list-style: none;
  padding: 0;
  margin: clamp(40px, 6vw, 70px) auto 0;
  display: flex;
  justify-content: center;
  text-align: center;
}

.jr-repeat li {
  --off: calc(var(--i) - (var(--n) - 1) / 2);
  flex: 0 1 12rem;
  margin: 0 -0.6rem;
  rotate: calc(var(--off) * 5deg);
  translate: 0 calc(var(--off) * var(--off) * 9px);
  transition: rotate 0.5s var(--ease), translate 0.5s var(--ease);
}

.jr-repeat li:hover {
  rotate: 0deg;
  translate: 0 -18px;
  z-index: 2;
}

.jr-repeat h3 {
  margin-top: 1rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
}

.jr-repeat li p {
  color: var(--gold-bright);
  font-style: italic;
}

/* ---- the thread of readings ---- */

.jr-thread ol {
  position: relative;
  list-style: none;
  padding: 0;
  margin: clamp(40px, 6vw, 80px) auto 0;
  max-width: 72rem;
}

.jr-thread ol::before,
.jr-thread ol::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(236, 223, 198, 0.14);
}

.jr-thread ol::after {
  width: 2px;
  margin-left: -0.5px;
  background: linear-gradient(to bottom, rgba(239, 200, 136, 0), var(--gold-bright) 12%, var(--gold-bright) 92%, #fff3d2);
  box-shadow: 0 0 12px rgba(239, 200, 136, 0.7);
  transform-origin: 50% 0;
  transform: scaleY(var(--p, 0));
}

.jr-thread li {
  position: relative;
  width: 50%;
  padding: 0 clamp(26px, 5vw, 70px) clamp(44px, 7vw, 90px) 0;
  text-align: right;
}

/* the two sides interleave, each reading starting beside the middle of the one before */
.jr-thread li + li {
  margin-top: calc(-1 * clamp(90px, 13vw, 180px));
}

.jr-thread li:nth-child(even) {
  margin-left: 50%;
  padding: 0 0 clamp(44px, 7vw, 90px) clamp(26px, 5vw, 70px);
  text-align: left;
}

.jr-thread li::before {
  /* the knot where this reading hangs on the thread */
  content: "";
  position: absolute;
  top: 0.55rem;
  right: -6px;
  width: 11px;
  height: 11px;
  rotate: 45deg;
  background: var(--night);
  border: 1px solid var(--gold-bright);
  box-shadow: 0 0 12px rgba(239, 200, 136, 0.6);
  z-index: 1;
  transition: background-color 0.8s 0.4s;
}

.jr-thread li:nth-child(even)::before {
  right: auto;
  left: -6px;
}

.jr-thread li.in::before,
html:not(.js) .jr-thread li::before {
  background: var(--gold-bright);
}

.jr-thread a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.jr-thread .when {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  color: var(--dim);
  font-size: 1rem;
}

.jr-thread li:nth-child(even) .when {
  justify-content: flex-start;
}

.jr-thread .when em {
  color: var(--gold);
}

.jr-thread .when em::before {
  content: "· ";
  font-style: normal;
}

.jr-thread strong {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  line-height: 1.08;
  color: var(--bone);
  text-wrap: balance;
  transition: color 0.3s;
}

.jr-thread a:hover strong,
.jr-thread a:focus-visible strong {
  color: var(--gold-bright);
}

.jr-thread q {
  display: block;
  margin-top: 0.35rem;
  font-style: italic;
  color: var(--dim);
}

.fan {
  --w: clamp(52px, 7vw, 84px);
  display: flex;
  justify-content: flex-end;
  margin-top: 1.3rem;
  padding: 0.6rem calc(var(--w) * 0.2) 0.4rem;
  min-height: calc(var(--w) * 1.9);
}

.jr-thread li:nth-child(even) .fan {
  justify-content: flex-start;
}

.fan-card {
  --off: calc(var(--i) - (var(--n) - 1) / 2);
  flex: 0 0 auto;
  width: var(--w);
  aspect-ratio: 560 / 939;
  margin-left: calc(var(--w) * -0.52);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: -4px 8px 16px rgba(0, 0, 0, 0.6);
  transform-origin: 50% 120%;
  rotate: 0deg;
  transition: rotate 0.9s calc(var(--i) * 0.05s + 0.25s) var(--ease), translate 0.5s var(--ease), margin 0.6s var(--ease);
}

.fan-card:first-child {
  margin-left: 0;
}

.jr-thread li.in .fan-card,
html:not(.js) .fan-card {
  rotate: calc(var(--off) * min(7deg, 40deg / var(--n)));
}

.jr-thread a:hover .fan-card,
.jr-thread a:focus-visible .fan-card {
  margin-left: calc(var(--w) * -0.3);
  translate: 0 -8px;
}

.jr-thread a:hover .fan-card:first-child,
.jr-thread a:focus-visible .fan-card:first-child {
  margin-left: 0;
}

.fan-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fan-card.reversed img {
  rotate: 180deg;
}

.fan-card.glyph b {
  font-weight: 400;
}

.fan-card.glyph.reversed b {
  rotate: 180deg;
}

.fan-card.glyph {
  display: grid;
  place-items: center;
  background: linear-gradient(170deg, #2e1a36, #170d19);
  outline: 1px solid rgba(217, 169, 91, 0.45);
  outline-offset: -3px;
  color: var(--gold-bright);
  font-family: "Noto Sans Runic", "Segoe UI Historic", "Apple Symbols", var(--display);
  font-size: calc(var(--w) * 0.42);
}

.jr > .jr-close {
  max-width: 46rem;
  margin: 0 auto;
  padding-bottom: clamp(50px, 8vw, 90px);
  text-align: center;
}

.jr-close .signin {
  text-align: left;
}

.jr .welcome {
  max-width: 40rem;
  margin: 2rem auto 0;
  padding: 0 var(--edge);
  text-align: center;
  color: var(--gold-bright);
}

@media (max-width: 760px) {
  .jr-hero::after {
    background:
      linear-gradient(to top, var(--night) 0%, rgba(23, 13, 25, 0.9) 34%, rgba(23, 13, 25, 0.25) 58%, rgba(23, 13, 25, 0) 72%),
      linear-gradient(to bottom, rgba(23, 13, 25, 0.7) 0%, rgba(23, 13, 25, 0) 20%);
  }

  .jr-scene img {
    object-position: 78% 50%;
  }

  .jr-hero {
    align-items: end;
    padding-bottom: 96px;
  }

  .jr-thread li + li {
    margin-top: 0;
  }

  .jr-numbers ul {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .jr-suits ul {
    grid-template-columns: repeat(6, 1fr);
    row-gap: 2rem;
  }

  .jr-suits li {
    grid-column: span 2;
  }

  .jr-suits li:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .jr-suits li p {
    display: none;
  }

  .jr-chart {
    height: 340px;
  }

  /* on a phone the sky keeps only the latest stars, so each can still be tapped */
  .star.far {
    pointer-events: none;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
  }

  .star.far::after {
    display: none;
  }

  .star b {
    max-width: 9.5rem;
    font-size: 0.95rem;
  }

  .jr-repeat ul {
    flex-wrap: wrap;
    row-gap: 2rem;
  }

  .jr-repeat li {
    flex-basis: 8.5rem;
  }

  .jr-thread ol::before,
  .jr-thread ol::after {
    left: 5px;
  }

  .jr-thread li,
  .jr-thread li:nth-child(even) {
    width: auto;
    margin-left: 0;
    margin-top: 0;
    padding: 0 0 3.4rem 30px;
    text-align: left;
  }

  .jr-thread li::before,
  .jr-thread li:nth-child(even)::before {
    left: 0;
    right: auto;
  }

  .jr-thread .when,
  .fan {
    justify-content: flex-start;
  }

  .jr-thread .when {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jr *,
  .jr *::before,
  .jr *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .jr .reveal,
  .js .jr-suits:not(.in) li {
    opacity: 1;
    translate: 0 0;
  }

  .jr-chart polyline {
    stroke-dasharray: none;
  }

  .medal .arc {
    stroke-dashoffset: 0;
  }

  .star {
    opacity: 1;
    scale: 1;
  }

  .jr-thread ol::after {
    transform: none;
  }

  .jr-thread li::before {
    background: var(--gold-bright);
  }

  .fan-card {
    rotate: calc(var(--off) * min(7deg, 40deg / var(--n)));
  }

  .dial img {
    rotate: var(--turn);
  }
}

/* ---- forecast ---- */
.periods {
  margin: 0.4rem 0 1.2rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.periods legend {
  padding: 0;
  font-style: italic;
  color: var(--dim);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0.5rem;
}

.signin .chip {
  position: relative;
  display: inline-flex;
  font-style: normal;
  color: var(--bone);
  cursor: pointer;
}

.signin .chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  min-height: 46px;
  padding: 0.35em 1.15em 0.4em 0.95em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 4, 11, 0.4);
  line-height: 1.2;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

/* A small moon on each chip, dark until it is chosen. */
.chip span::before {
  content: "";
  flex: none;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  border: 1px solid var(--dim);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.chip:hover span {
  border-color: rgba(217, 169, 91, 0.6);
}

.chip input:checked + span {
  border-color: var(--gold);
  background: rgba(217, 169, 91, 0.14);
  color: var(--gold-bright);
  box-shadow: 0 0 26px -6px rgba(217, 169, 91, 0.45);
}

.chip input:checked + span::before {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(239, 200, 136, 0.7);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.pick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 1rem;
}

.pick p {
  flex: 1 1 9rem;
  max-width: 16rem;
}

.pick select {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 0.3rem;
  padding: 0.5rem 2.4rem 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23d9a95b' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.9rem center,
    rgba(10, 4, 11, 0.55);
  color: var(--bone);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}

.pick[hidden],
.pick [hidden] {
  display: none;
}

/* The month and the year are only asked for when a chip needs them. Without :has() they simply stay in view. */
@supports selector(:has(a)) {
  .periods:not(:has(input[value^="that-"]:checked)) .pick,
  .periods:has(input[value="that-year"]:checked) .pick-month {
    display: none;
  }
}

.cast .keep {
  margin: 0 0 0.6rem;
  line-height: 1.35;
}

@media (max-width: 520px) {
  .chips {
    gap: 8px;
  }

  .chip span {
    padding-inline: 0.8em 0.95em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chip span,
  .chip span::before {
    transition: none;
  }
}
/* ---- end forecast ---- */

/* Another page has opened over this one (see /shell.js): this one waits underneath, out of sight. */
html.covered {
  overflow: hidden;
}

html.covered body {
  visibility: hidden;
}

/* ---- pages that are one screen tall ---- */

body.screen .foot {
  display: none;
}

.jr-empty .jr-hero {
  min-height: 100svh;
  padding-bottom: 40px;
}

.jr-empty .jr-begin {
  margin-top: 1.6rem;
}

.jr-empty .signin {
  margin-top: 1.4rem;
  max-width: 30rem;
  text-align: left;
}

@media (max-height: 760px) {
  .jr-empty .jr-title h1 {
    font-size: clamp(3rem, 12vh, 5rem);
  }
}

/* ---- more ways to ask: a hall of seven painted doors, all on one screen ---- */

.hall {
  height: 100svh;
  min-height: 34rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(14px, 2.4vh, 26px);
  padding: clamp(84px, 11vh, 112px) var(--edge) clamp(16px, 3vh, 30px);
  /* one screen exactly: a door still held at the start of its entrance (door-in, 26px lower) or the shadows under the
     doors must not lengthen the page, which would then scroll by a few pixels */
  overflow: clip;
}

.hall header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 2rem;
}

.hall h1 {
  font-size: clamp(2.2rem, 4.6vh + 1vw, 3.6rem);
  line-height: 1.05;
}

.hall .lede {
  margin: 0;
  color: var(--dim);
  font-size: 1.125rem;
}

.hall-doors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(6px, 0.8vw, 12px);
  min-height: 0;
}

.hall-doors li {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(217, 169, 91, 0.22),
    0 24px 40px -18px rgba(0, 0, 0, 0.9);
  transition:
    flex-grow 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.5s;
  animation: door-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i) * 70ms);
}

@keyframes door-in {
  from {
    opacity: 0;
    translate: 0 26px;
  }
}

.hall-doors a {
  position: absolute;
  inset: 0;
  display: block;
  color: var(--bone);
  text-decoration: none;
}

.hall-doors img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(0.85);
  scale: 1.02;
  transition:
    filter 0.7s,
    scale 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hall-doors a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 9, 20, 0.96) 0%, rgba(18, 9, 20, 0.7) 24%, rgba(18, 9, 20, 0) 58%);
}

.door-words {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 0 clamp(10px, 1.1vw, 18px) clamp(14px, 2.4vh, 24px);
  display: block;
}

.door-words b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.5vw, 1.6rem);
  line-height: 1.15;
  color: var(--gold-bright);
}

.door-words span {
  display: block;
  margin-top: 0.45rem;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--bone);
}

@media (hover: hover) and (min-width: 900px) {
  /* the words of a door appear as it opens */
  /* Every name ends on the same line, and the space under it is kept for its description, so nothing jumps. */
  .door-words b {
    min-height: 2.3em;
    display: flex;
    align-items: flex-end;
  }

  .door-words span {
    width: 21rem;
    max-width: calc(100vw / 3.6);
    height: 2.8em;
    text-wrap: balance;
    opacity: 0;
    transition: opacity 0.45s;
  }

  .hall-doors li:hover,
  .hall-doors li:focus-within {
    flex-grow: 2.4;
    box-shadow:
      0 0 0 1px rgba(240, 205, 135, 0.7),
      0 30px 60px -18px rgba(0, 0, 0, 0.95),
      0 0 80px rgba(217, 169, 91, 0.22);
  }

  .hall-doors li:hover img,
  .hall-doors li:focus-within img {
    filter: none;
    scale: 1.07;
  }

  .hall-doors li:hover .door-words span,
  .hall-doors li:focus-within .door-words span {
    opacity: 1;
    transition-delay: 0.2s;
  }
}

/* Without a pointer to hover with, or on a narrow screen: the doors stand in a row to be swiped through. */
@media (hover: none), (max-width: 899px) {
  .hall {
    padding-inline: 0;
  }

  .hall header {
    padding-inline: var(--edge);
  }

  .hall-doors {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--edge);
    padding-inline: var(--edge);
    scrollbar-width: none;
  }

  .hall-doors::-webkit-scrollbar {
    display: none;
  }

  .hall-doors li {
    flex: 0 0 min(74vw, 20rem);
    scroll-snap-align: start;
  }

  .hall-doors img {
    filter: brightness(0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hall-doors li {
    animation: none;
  }
}

/* ---- the journal as a book: every page one screen tall, turned sideways ---- */

.jr-book {
  position: relative;
  height: 100svh;
  overflow: hidden;
}

.jr-pages {
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.jr-pages::-webkit-scrollbar {
  display: none;
}

.jr-page {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  align-items: center;
  padding: 96px var(--edge) 84px;
}

.jr-fit {
  width: 100%;
  min-width: 0;
}

.jr-page.jr-cover {
  padding: 0;
  display: block;
}

.jr-cover .jr-hero {
  height: 100%;
  min-height: 0;
  padding-bottom: 96px;
}

.jr-book .jr-chart {
  height: min(clamp(280px, 46vw, 520px), 50svh);
}

.jr-book .jr-numbers ul,
.jr-book .jr-suits ul,
.jr-book .jr-repeat ul {
  margin-top: clamp(20px, 4.5vh, 56px);
}

.jr-last .jr-close {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}

.jr-last .again {
  margin-top: 2rem;
}

/* four readings to a page */
.leaf {
  text-align: left;
  list-style: none;
  margin: clamp(22px, 5vh, 56px) auto 0;
  padding: 0;
  max-width: 78rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 36px);
}

.leaf a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.2rem 0 0.4rem 1.1rem;
  border-left: 1px solid rgba(217, 169, 91, 0.35);
  color: var(--bone);
  text-decoration: none;
  transition: border-color 0.3s;
}

.leaf a:hover,
.leaf a:focus-visible {
  border-left-color: var(--gold-bright);
}

.leaf .when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.55rem;
  font-style: italic;
  font-size: 1rem;
  color: var(--dim);
}

.leaf .when em {
  flex-basis: 100%;
  color: var(--gold);
}

.leaf strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-top: 0.6rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.3rem, 1.9vw, 1.7rem);
  line-height: 1.15;
}

.leaf q {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--dim);
}

.leaf .fan {
  margin-top: auto;
  padding-top: 1.2rem;
  justify-content: flex-start;
}

/* the page turner */
.jr-turn {
  position: absolute;
  inset: auto 0 max(14px, env(safe-area-inset-bottom)) 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  pointer-events: none;
}

.jr-turn > * {
  pointer-events: auto;
}

.jr-turn button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(217, 169, 91, 0.55);
  background: rgba(23, 13, 25, 0.6);
  backdrop-filter: blur(6px);
  color: var(--gold-bright);
  cursor: pointer;
  transition:
    opacity 0.3s,
    background 0.3s,
    border-color 0.3s;
}

/* Only where a pointer can hover: on a phone a tapped button stays "hovered", and it must keep its arrow. */
@media (hover: hover) {
  .jr-turn button:hover:not(:disabled) {
    background-color: rgba(217, 169, 91, 0.2);
    border-color: var(--gold-bright);
  }
}

.jr-turn button:disabled {
  opacity: 0.25;
  cursor: default;
}

.jr-turn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jr-at {
  min-width: 5.5rem;
  text-align: center;
  font-style: italic;
  font-size: 1rem;
  color: var(--bone);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* until the book has been opened, the way forward draws the eye */
.jr-book:not(.opened) .jr-turn button:last-child {
  animation: turn-me 2.4s ease-in-out infinite;
}

@keyframes turn-me {
  50% {
    box-shadow: 0 0 0 9px rgba(217, 169, 91, 0);
    border-color: var(--gold-bright);
  }

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(217, 169, 91, 0.45);
  }
}

@media (max-width: 1000px) {
  .leaf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .jr-page {
    padding: 112px var(--edge) 80px;
  }

  .jr-cover .jr-hero {
    padding-top: 120px;
  }

  .leaf {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
  }

  /* a reading is a row: its words on the left, its cards on the right */
  .leaf a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: center;
  }

  .leaf .when,
  .leaf strong {
    grid-column: 1;
  }

  .leaf .when {
    font-size: 0.9375rem;
  }

  .leaf strong {
    -webkit-line-clamp: 2;
    font-size: 1.25rem;
    margin-top: 0.3rem;
  }

  .leaf q {
    display: none;
  }

  .leaf .fan {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    padding: 0 6px 0 0;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jr-book:not(.opened) .jr-turn button:last-child {
    animation: none;
  }
}

.leaf .fan {
  --w: clamp(40px, 4.4vw, 64px);
}

@media (max-width: 560px) {
  .leaf .fan {
    --w: 34px;
  }

  .leaf .fan-card:nth-child(n + 5) {
    display: none;
  }

  /* the cards that return: three and two, standing straight, each with room for its name */
  .jr-book .jr-repeat ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 12px;
    margin-top: 22px;
  }

  .jr-book .jr-repeat li {
    flex: 0 0 calc((100% - 24px) / 3);
    margin: 0;
    rotate: none;
    translate: none;
  }

  .jr-book .jr-repeat h3 {
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.2;
  }

  .jr-book .jr-repeat li p {
    font-size: 0.9375rem;
  }

  .jr-book .jr-heading p {
    margin-top: 0.4rem;
  }
}

/* short screens: the same pages with less air, before anything has to shrink */
@media (max-height: 720px) {
  .jr-page {
    padding-top: 84px;
    padding-bottom: 72px;
  }

  .jr-book h2 {
    font-size: clamp(1.6rem, 5.4vh, 2.4rem);
  }
}

@media (max-height: 720px) and (max-width: 560px) {
  .jr-page {
    padding-top: 100px;
  }

  .jr-book .jr-numbers ul {
    gap: 6px;
    margin-top: 10px;
  }
}

/* ---- the page behind each door: its painting on one side, the asking on the other, all on one screen ---- */

.stage {
  position: relative;
  height: 100svh;
  min-height: 28rem;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  overflow: hidden;
  isolation: isolate;
}

.stage-art {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 58%, transparent 99%);
  mask-image: linear-gradient(to right, #000 58%, transparent 99%);
  animation: stage-dawn 1.6s ease-out both;
}

.stage-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 60% 40%;
  animation: stage-drift 34s ease-in-out infinite alternate;
}

/* candlelight breathing over the painting, and shade under the menu */
.stage-art i {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(18, 9, 20, 0.85), rgba(18, 9, 20, 0) 22%, rgba(18, 9, 20, 0) 78%, rgba(18, 9, 20, 0.8)),
    radial-gradient(60% 50% at 55% 40%, rgba(255, 190, 110, 0.2), rgba(255, 190, 110, 0) 70%);
  animation: stage-flicker 5.5s ease-in-out infinite;
}

@keyframes stage-dawn {
  from {
    opacity: 0;
  }
}

@keyframes stage-drift {
  from {
    scale: 1.03;
    translate: 0 0;
  }

  to {
    scale: 1.14;
    translate: -1.5% -2%;
  }
}

@keyframes stage-flicker {
  0%,
  100% {
    opacity: 0.75;
  }

  35% {
    opacity: 1;
  }

  60% {
    opacity: 0.6;
  }
}

.stage-words {
  min-width: 0;
  display: grid;
  align-items: center;
  padding: 100px var(--edge) 36px clamp(16px, 3.5vw, 56px);
}

.stage-fit {
  width: 100%;
  max-width: 35rem;
  animation: stage-arrive 1s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes stage-arrive {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

.stage .when {
  font-style: italic;
  color: var(--dim);
}

.stage .when a {
  color: var(--gold);
}

.stage h1 {
  margin-top: 0.3rem;
  font-size: clamp(2.8rem, 5.4vw, 5.2rem);
  line-height: 1;
}

.stage .lede {
  margin-top: 1.1rem;
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  line-height: 1.5;
}

.stage form.signin {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  max-width: none;
  text-align: left;
}

/* the birth card, once found: the cards take the screen and the painting falls back behind them */
.stage-found {
  grid-template-columns: minmax(0, 1fr);
}

.stage-found .stage-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-mask-image: none;
  mask-image: none;
  filter: brightness(0.28) saturate(0.8);
}

.stage-found .stage-words {
  padding-left: var(--edge);
  justify-items: center;
}

.stage-found .stage-fit {
  max-width: 68rem;
}

.stage-found h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.stage-found .lede {
  display: none;
}

.stage-found form.signin {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  max-width: 34rem;
}

.stage-found .birth {
  margin: 1.4rem 0 0;
  gap: clamp(16px, 3vw, 44px);
}

.stage-found .birth .card {
  max-width: min(11rem, 22svh);
}

.stage-found .how {
  margin-top: 1rem;
}

@media (max-width: 860px) {
  /* on a phone the painting fills the screen and the words stand in front of it */
  .stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-art {
    position: absolute;
    inset: 0;
    z-index: -1;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .stage-art i {
    background:
      linear-gradient(to bottom, rgba(18, 9, 20, 0.9) 0%, rgba(18, 9, 20, 0.35) 26%, rgba(18, 9, 20, 0.82) 52%, rgba(18, 9, 20, 0.97) 100%),
      radial-gradient(70% 30% at 50% 22%, rgba(255, 190, 110, 0.22), rgba(255, 190, 110, 0) 70%);
  }

  .stage-words {
    align-items: end;
    padding: 118px var(--edge) max(22px, env(safe-area-inset-bottom));
  }

  .stage-fit {
    max-width: none;
  }

  .stage h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }

  .stage form.signin {
    margin-top: 1.1rem;
    padding-top: 1rem;
  }

  .stage .row button {
    width: 100%;
  }

  .stage-found .stage-words {
    align-items: center;
  }

  .stage-found .birth .card {
    max-width: 5.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-art,
  .stage-art img,
  .stage-art i,
  .stage-fit {
    animation: none;
  }
}

/* ---- the paintings move ---- */

.stage-art video,
.hall-doors video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s;
  pointer-events: none;
}

.stage-art video.on {
  opacity: 1;
}

.stage-art video {
  transform-origin: 60% 40%;
  animation: stage-drift 34s ease-in-out infinite alternate;
}

.stage-art img,
.stage-art video {
  transform: translate(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -12px));
  transition:
    transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 1.2s;
}

.hall-doors video {
  scale: 1.07;
}

.hall-doors li:hover video.on,
.hall-doors li:focus-within video.on {
  opacity: 1;
}

@media (hover: none), (max-width: 899px) {
  .hall-doors video.on {
    opacity: 0.9;
  }
}

canvas.motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hall {
  position: relative;
}

.hall > canvas.motes {
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .stage-art video,
  .hall-doors video {
    display: none;
  }
}

/* ---- one-screen pages: the words column is exactly the screen, so its contents can be fitted to it ---- */

.stage {
  grid-template-rows: minmax(0, 1fr);
}

.stage-words {
  min-height: 0;
  height: 100%;
}

.stage-fit,
.stage .when {
  text-align: left;
}

.stage-found .stage-fit {
  text-align: center;
}

.stage-found form.signin {
  margin-inline: auto;
}

.stage-found .birth {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.stage-found .birth p {
  font-size: 1.0625rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 860px) {
  .stage .lede {
    margin-top: 0.7rem;
    font-size: 1.0625rem;
    line-height: 1.42;
  }

  .stage .cast .chip span,
  .stage .cast .chip {
    font-size: 1rem;
  }

  .stage .cast .keep {
    font-size: 1rem;
    line-height: 1.35;
  }

  .stage .cast .fine {
    font-size: 0.875rem;
    line-height: 1.35;
  }

  .stage-found .birth {
    gap: 12px;
    margin-top: 1rem;
  }

  .stage-found .birth p {
    font-size: 0.9375rem;
    line-height: 1.35;
  }

  .stage-found .birth figcaption strong {
    font-size: 1.15rem;
  }

  .stage-found .how {
    font-size: 0.875rem;
  }
}

/* a short phone: the introduction gives way to the form */
@media (max-width: 860px) and (max-height: 720px) {
  .stage-words {
    padding-top: 104px;
  }

  .stage .lede {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .stage form.signin {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
  }
}

/* ---- a reading: a book over its own film ---- */

.rd-film {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.rd-film img,
.rd-film video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: stage-drift 40s ease-in-out infinite alternate;
}

.rd-film video {
  opacity: 0;
  transition: opacity 1.4s;
}

.rd-film video.on {
  opacity: 1;
}

/* the film is clear on the cover and falls back into shadow once the book is opened */
.rd-film::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 50% 50%, rgba(18, 9, 20, 0.5), rgba(18, 9, 20, 0.82)),
    linear-gradient(to bottom, rgba(18, 9, 20, 0.8), rgba(18, 9, 20, 0) 30%, rgba(18, 9, 20, 0) 70%, rgba(18, 9, 20, 0.9));
  transition: background-color 1.2s;
}

.rd.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.72);
}

.rd .jr-pages {
  position: relative;
  z-index: 1;
}

.rd .jr-turn {
  z-index: 3;
}

.rd .jr-fit {
  margin: 0 auto;
}

/* the cover */
.rd-cover .jr-fit {
  max-width: 50rem;
  text-align: center;
  animation: stage-arrive 1.3s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.rd .when {
  font-style: italic;
  color: var(--gold);
}

.rd h1 {
  margin-top: 0.5rem;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 1.02;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7);
  text-wrap: balance;
}

.rd .question {
  margin-top: 1.3rem;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: var(--gold-bright);
}

.rd .opening {
  margin: 1.2rem auto 0;
  max-width: 38rem;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

/* the spread on the table */
.rd-table .jr-fit {
  max-width: 84rem;
}

.rd-spread {
  list-style: none;
  margin: clamp(18px, 4vh, 44px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 10.5rem));
  justify-content: center;
  gap: clamp(14px, 2.4vh, 26px) clamp(10px, 1.6vw, 24px);
}

.rd-spread button,
.rd-spread div {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bone);
  font: inherit;
  text-align: center;
}

.rd-spread button {
  cursor: pointer;
}

.rd-face {
  display: block;
  container-type: inline-size;
}

.rd-face .card {
  margin: 0;
  rotate: none;
}

.rd-face .card.stone {
  margin: 17% 6%;
}

.rd-face .card.stone span {
  font-size: 44cqw;
}

.rd-face .card.numeral span {
  font-size: 50cqw;
}

.rd-spread .rd-face {
  transition:
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.4s;
}

.rd-spread button:hover .rd-face,
.rd-spread button:focus-visible .rd-face {
  translate: 0 -10px;
  filter: drop-shadow(0 0 26px rgba(217, 169, 91, 0.45));
}

.rd-spread em,
.rd-spread strong,
.rd-spread li span:not(.rd-face) {
  display: block;
}

.rd-spread em {
  margin-top: 0.7rem;
  font-size: 0.9375rem;
  color: var(--dim);
}

.rd-spread strong {
  font: 400 1.2rem/1.2 var(--display);
}

.rd-spread li > * > span:last-child:not(.rd-face) {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--gold);
}

/* dealt one after another when the page is reached */
.js .rd-table:not(.in) .rd-spread li {
  opacity: 0;
  translate: 0 46px;
  rotate: 7deg;
}

.rd-spread li {
  transition:
    opacity 0.7s,
    translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    rotate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(0.25s + var(--i) * 0.11s);
}

/* a page for each card: the card turns over as the page arrives, then floats */
.rd-card .jr-fit {
  max-width: 68rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 96px);
}

.rd-card .rd-face {
  width: min(21rem, 30vw, 40svh);
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 16deg)) rotateX(calc(var(--ty, 0) * -12deg));
  transition:
    transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.9s;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 46px rgba(217, 169, 91, 0.22));
}

.js .rd-card:not(.in) .rd-face {
  opacity: 0;
  transform: perspective(1100px) rotateY(-95deg) translateY(30px) scale(0.92);
}

.rd-card.in .rd-face .card {
  animation: rd-float 7s ease-in-out infinite;
}

@keyframes rd-float {
  50% {
    translate: 0 -10px;
  }
}

/* a slow glint that crosses the face of the card */
.rd-card .card:not(.stone) {
  position: relative;
  overflow: hidden;
}

.rd-card .card:not(.stone)::after {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, rgba(255, 240, 210, 0) 42%, rgba(255, 240, 210, 0.3) 50%, rgba(255, 240, 210, 0) 58%);
  translate: -70% 0;
  animation: rd-glint 6.5s 1.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rd-glint {
  0%,
  55% {
    translate: -70% 0;
  }

  100% {
    translate: 70% 0;
  }
}

.rd-text {
  text-align: left;
}

.rd .place {
  font-style: italic;
  font-size: 1.125rem;
  color: var(--gold);
}

.rd-text h2 {
  margin-top: 0.2rem;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.05;
  color: var(--bone);
}

.rd-text h2 em {
  font-size: 0.5em;
  color: var(--gold);
}

.rd-text p:last-child {
  margin-top: 1.2rem;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.45vw, 1.3rem);
  line-height: 1.6;
}

.rd-text > * {
  transition:
    opacity 0.9s,
    translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rd-text > :nth-child(2) {
  transition-delay: 0.25s;
}

.rd-text > :nth-child(3) {
  transition-delay: 0.45s;
}

.js .rd-card:not(.in) .rd-text > * {
  opacity: 0;
  translate: 0 18px;
}

/* the whole of it */
.rd-whole .jr-fit,
.rd-follow .jr-fit,
.rd-wait .jr-fit {
  max-width: 44rem;
  text-align: center;
}

.rd .synthesis {
  margin-top: 1.4rem;
  font-size: clamp(1.125rem, 1.45vw, 1.3rem);
  line-height: 1.6;
}

.rd .guidance {
  position: relative;
  margin-top: 1.8rem;
  padding-top: 1.8rem;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.7vw, 2.3rem);
  line-height: 1.25;
  color: var(--gold-bright);
  text-wrap: balance;
}

.rd .guidance::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  rotate: 45deg;
  translate: -50% -50%;
  background: var(--gold);
  box-shadow:
    -60px 60px 0 -4px var(--gold),
    60px -60px 0 -4px var(--gold);
}

.rd .tools {
  margin-top: 1.6rem;
  justify-content: center;
}

.rd .again {
  margin-top: 1.4rem;
}

.rd-wait .rd-face {
  width: min(12rem, 26svh);
  margin: 0 auto 1.4rem;
}

.rd-letter .jr-fit {
  max-width: 62rem;
}

.rd-letter .letter {
  margin: 0;
}

@media (max-width: 760px) {
  .rd-spread {
    grid-template-columns: repeat(var(--mcols), minmax(0, 6.4rem));
    gap: 12px 10px;
  }

  .rd-spread em {
    margin-top: 0.4rem;
    font-size: 0.8125rem;
  }

  .rd-spread strong {
    font-size: 0.9375rem;
  }

  .rd-card .jr-fit {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 18px;
  }

  .rd-card .rd-face {
    width: min(46vw, 25svh);
  }

  .rd-text {
    text-align: center;
  }

  .rd-text p:last-child {
    margin-top: 0.8rem;
    font-size: 1.0625rem;
    line-height: 1.5;
  }

  .rd .synthesis {
    margin-top: 0.8rem;
    font-size: 1.0625rem;
    line-height: 1.5;
  }

  .rd .guidance {
    margin-top: 1.3rem;
    padding-top: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rd-film img,
  .rd-film video,
  .rd-cover .jr-fit,
  .rd-card.in .rd-face .card,
  .rd-card .card::after {
    animation: none;
  }

  .rd-film video {
    display: none;
  }
}

/* the spread is centred row by row, so a last short row sits in the middle */
.rd-spread {
  --g: clamp(10px, 1.6vw, 24px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 2.4vh, 26px) var(--g);
}

.rd-spread li {
  flex: 0 0 min(10.5rem, calc((100% - (var(--cols) - 1) * var(--g)) / var(--cols)));
  min-width: 0;
}

.rd.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.5);
}

@media (max-width: 760px) {
  .rd-spread {
    --g: 10px;
    gap: 12px var(--g);
  }

  .rd-spread li {
    flex-basis: min(6.4rem, calc((100% - (var(--mcols) - 1) * var(--g)) / var(--mcols)));
  }
}

/* a large spread lies in two rows, each card small enough for both rows to stand on the screen */
.rd-spread.two li {
  flex-basis: min(8.2rem, 13.5svh, calc((100% - (var(--cols) - 1) * var(--g)) / var(--cols)));
}

.rd-spread.two strong {
  font-size: 1rem;
}

.rd-spread.two em {
  font-size: 0.8125rem;
}

@media (max-width: 760px) {
  .rd-spread.two li {
    flex-basis: min(4.6rem, 11svh, calc((100% - (var(--mcols) - 1) * var(--g)) / var(--mcols)));
  }

  .rd-spread.two em {
    display: none;
  }

  .rd-spread.two strong {
    margin-top: 0.3rem;
    font-size: 0.8125rem;
  }
}

/* small print never leaves one word alone on a last line */
.fine,
.lede,
.jr-heading p {
  text-wrap: pretty;
}

.fine {
  text-wrap: balance;
}

/* ---- the casting: a film that takes the whole screen while a reading is being written ---- */

.ritual {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #120914;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.ritual.on {
  opacity: 1;
}

.ritual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* a soft dark frame, so the film reads as a scene and the words below stay legible */
.ritual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(18, 9, 20, 0) 45%, rgba(18, 9, 20, 0.75) 100%),
    linear-gradient(to bottom, rgba(18, 9, 20, 0.55), rgba(18, 9, 20, 0) 22%, rgba(18, 9, 20, 0) 66%, rgba(18, 9, 20, 0.92));
  pointer-events: none;
}

.ritual-line {
  position: absolute;
  inset: auto var(--edge) max(9svh, calc(env(safe-area-inset-bottom) + 40px));
  z-index: 2;
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.2;
  color: var(--bone);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
  text-wrap: balance;
  opacity: 0;
  translate: 0 10px;
  transition:
    opacity 0.45s,
    translate 0.45s;
}

.ritual-line.in {
  opacity: 1;
  translate: 0 0;
  transition-duration: 1.1s;
}

.ritual canvas.motes {
  z-index: 1;
}

/* ---- the journal: a painted scene behind every page ---- */

.jr-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  /* the scene stands on the lower part of the page and dissolves into the dark above it */
  translate: 0 var(--drop, 22%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 6%, #000 46%);
  mask-image: linear-gradient(to bottom, transparent 6%, #000 46%);
}

.jr-art img,
.jr-art video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

.jr-art video {
  opacity: 0;
  transition: opacity 1.4s;
}

.jr-art video.on {
  opacity: 1;
}

.jr-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 9, 20, var(--veil, 0.18));
}

/* candlelight breathing over the stills */
.jr-art-candles img,
.jr-art-book img,
.jr-art-key img {
  animation: jr-candlelight 5.5s ease-in-out infinite;
}

@keyframes jr-candlelight {
  0%,
  100% {
    filter: brightness(1);
  }
  23% {
    filter: brightness(1.09);
  }
  41% {
    filter: brightness(0.95);
  }
  68% {
    filter: brightness(1.06);
  }
  84% {
    filter: brightness(0.98);
  }
}

/* the sky fills its whole page */
.jr-art-sky {
  --drop: 0%;
  --veil: 0.12;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}

.jr-art-key {
  --drop: 14%;
}

.jr-art-key img {
  object-position: 100% 100%;
}

.jr-book .jr-page > .jr-fit {
  position: relative;
  z-index: 1;
}

/* pages with a scene keep their words above it */
.jr-book .jr-numbers,
.jr-book .jr-suits,
.jr-book .jr-repeat,
.jr-book .jr-leaf,
.jr-book .jr-last {
  padding-bottom: max(84px, 21svh);
}

.jr-book .jr-heading,
.jr-book .jr-numbers li,
.jr-book .jr-suits li,
.leaf a {
  text-shadow: 0 1px 14px rgba(10, 4, 12, 0.95);
}

.jr-book .jr-numbers li,
.jr-book .jr-suits li p {
  color: var(--bone);
}

/* seven real candles: one lit for each day in a row */
.candles {
  gap: 0;
  height: 9.5rem;
}

.candles img {
  width: 3.1rem;
  height: 9.5rem;
  object-fit: cover;
  mix-blend-mode: lighten;
  filter: brightness(0.55) saturate(0.6);
}

.candles img.lit {
  filter: none;
  animation: jr-candlelight calc(3.2s + var(--i) * 0.37s) ease-in-out infinite;
}

.dial {
  height: 9.5rem;
}

.dial img {
  width: 5.4rem;
}

/* five gilded medallions */
.jr-suits .medal img,
.jr-suits li:first-child .medal img {
  inset: 7%;
  width: 86%;
  height: 86%;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 95%, transparent 99%);
  mask-image: radial-gradient(circle closest-side, #000 95%, transparent 99%);
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.7));
}

.jr-suits li.none .medal img {
  filter: grayscale(0.7) brightness(0.45);
}

.jr-suits .medal {
  max-width: 11.5rem;
}

.jr-last .jr-close {
  margin-left: max(0px, calc(50% - 30rem));
  text-align: left;
}

@media (max-width: 760px) {
  .jr-art {
    --drop: 30%;
  }

  .jr-art-sky {
    --drop: 0%;
  }

  .jr-book .jr-numbers,
  .jr-book .jr-suits,
  .jr-book .jr-repeat,
  .jr-book .jr-leaf,
  .jr-book .jr-last {
    padding-bottom: max(84px, 15svh);
  }

  .jr-art::after {
    background: rgba(18, 9, 20, 0.4);
  }

  .candles,
  .candles img {
    height: 6.4rem;
  }

  .candles img {
    width: 2.1rem;
  }

  .jr-last .jr-close {
    margin-left: auto;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jr-art img,
  .candles img.lit {
    animation: none;
  }

  .jr-art video {
    display: none;
  }
}

/* the words sit straight on the scene (no layer of their own), so the candles can blend into it */
.jr-book .jr-page > .jr-fit {
  z-index: auto;
}

.jr-numbers .count strong {
  text-shadow: none;
}

.jr-art::after {
  background:
    linear-gradient(to top, rgba(18, 9, 20, 0.8), rgba(18, 9, 20, 0) 24%),
    rgba(18, 9, 20, var(--veil, 0.18));
}

.jr-art-candles {
  --drop: 36%;
}

.jr-art-emblems {
  --drop: 28%;
}

@media (max-width: 760px) {
  .jr-art::after {
    background:
      linear-gradient(to top, rgba(18, 9, 20, 0.85), rgba(18, 9, 20, 0) 30%),
      rgba(18, 9, 20, 0.4);
  }

  .jr-art-candles,
  .jr-art-emblems {
    --drop: 40%;
  }
}

.candles img {
  mix-blend-mode: normal;
}

.jr-numbers .count strong {
  line-height: 1.15;
  padding-bottom: 0.08em;
}

/* ---- Other languages run longer than English: room for them on a phone ---- */
h1,
h2,
h3,
.button,
button {
  overflow-wrap: break-word;
}

:root:not([lang="en"]) .legal h1 {
  font-size: min(clamp(2.6rem, 7vw, 4.25rem), 9vw);
}

/* A one-word title longer than its column ("Конфиденциальность") is hyphenated, never cut mid-word without a mark. */
.bk-legal .rd-cover h1 {
  -webkit-hyphens: auto;
  hyphens: auto;
}

@media (max-width: 560px) {
  .upgrade {
    padding: 24px 0 16px;
  }

  .upgrade h1 {
    font-size: 2.3rem;
    margin-bottom: 0.8rem;
  }

  .upgrade .lede {
    font-size: 1.2rem;
    line-height: 1.42;
    margin-bottom: 0.9rem;
  }

  .upgrade .includes li {
    line-height: 1.35;
  }

  .upgrade .soon {
    margin-top: 1rem;
    font-size: 1.2rem;
    line-height: 1.35;
  }

  :root:not([lang="en"]) .stage .lede {
    -webkit-line-clamp: 4;
  }
}

@media (max-height: 800px) {
  .upgrade {
    padding: 20px 0 12px;
  }

  .upgrade h1 {
    font-size: 2.3rem;
    margin-bottom: 0.7rem;
  }

  .upgrade .lede {
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
  }

  .upgrade .includes li {
    padding-block: 0.45rem;
    line-height: 1.3;
  }

  .upgrade .soon {
    margin-top: 0.8rem;
    font-size: 1.1rem;
    line-height: 1.3;
  }
}

@media (max-height: 700px) and (max-width: 560px) {
  .upgrade h1 {
    font-size: 1.9rem;
  }

  .upgrade .lede,
  .upgrade .soon {
    font-size: 1.02rem;
  }

  .upgrade .includes li {
    font-size: 0.95rem;
    padding-block: 0.32rem;
  }
}

/* ---- about ---- */

.about-date {
  color: var(--dim);
  font-style: italic;
  margin-bottom: 1rem;
}

.about-facts {
  width: 100%;
  margin: 1.6rem 0 0.4rem;
  border-collapse: collapse;
}

.about-facts caption {
  text-align: start;
  font: 400 1.625rem/1.2 var(--display);
  color: var(--gold);
  padding-bottom: 0.5rem;
}

.about-facts th,
.about-facts td {
  text-align: start;
  vertical-align: top;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  font-weight: 400;
}

.about-facts th {
  color: var(--dim);
  padding-right: 1.4rem;
}

.about-go {
  margin-top: 2rem;
}

/* The often-asked button sits at the end of the question's label row. */
form.cast {
  position: relative;
}

form.cast > .asks-open {
  position: absolute;
  top: -0.75rem;
  right: 0;
}

.upgrade .trial {
  margin: 1.2rem 0 0.2rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--bone);
  font-size: 1.0625rem;
  line-height: 1.4;
}

/* Card-meaning pages */
.crumbs {
  font-size: 0.95rem;
  color: var(--dim);
  margin-bottom: 1rem;
}
.card-page h1,
.card-hub h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 0.6rem;
  text-wrap: balance;
}
.card-top {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
  margin: 1.4rem 0 0.6rem;
}
.card-top figure {
  margin: 0;
}
.card-top img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(217, 169, 91, 0.25);
}
.card-lede {
  font-size: 1.2rem;
  line-height: 1.5;
}
.card-top .about-facts {
  margin-top: 1rem;
  width: 100%;
}
.card-ask {
  margin-top: 1.6rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
  font-size: 1.2rem;
  color: var(--gold);
}
.card-go {
  margin: 2.4rem 0 0;
  padding: 1.4rem 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(217, 169, 91, 0.06);
}
.card-go h2 {
  margin-top: 0;
}
.card-go p + p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.4rem;
}
.card-near {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.card-near a,
.crumbs a,
.card-alt {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.card-note {
  margin-top: 1.4rem;
  font-size: 0.92rem;
  color: var(--dim);
}
.card-hub {
  max-width: 62rem;
}
.card-hub > p {
  max-width: 40rem;
}
.card-go-line {
  margin-top: 1.4rem;
}
.card-grid {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr));
  gap: 1.4rem 1rem;
}
.card-grid a {
  display: grid;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
}
.card-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease;
}
.card-grid a:hover img,
.card-grid a:focus-visible img {
  transform: translateY(-4px);
}
.card-grid b {
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.2;
  margin-top: 0.35rem;
}
.card-grid span {
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--dim);
}
@media (max-width: 560px) {
  .card-top {
    grid-template-columns: 1fr;
  }
  .card-top figure {
    max-width: 11rem;
    margin: 0 auto;
  }
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem 0.7rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card-grid img {
    transition: none;
  }
}

/* Pages that draw one card and show its meaning */
.draw-start {
  margin: 1.6rem 0 0.4rem;
}
.draw-result {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
  margin: 1.8rem 0 0.6rem;
  scroll-margin-top: 1rem;
}
.draw-result figure {
  margin: 0;
}
.draw-result img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(217, 169, 91, 0.25);
}
.draw-result img.rev {
  transform: rotate(180deg);
}
.draw-result h2 {
  margin-top: 0;
  font-size: 2rem;
}
.draw-answer {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.05em 0.6em;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--bone, #ecdfc6);
  font-size: 0.8em;
  vertical-align: 0.12em;
}
.draw-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.4rem;
  margin-top: 1.1rem;
}
.draw-page .card-near {
  justify-content: flex-start;
  gap: 0.4rem 1.4rem;
}
@media (max-width: 560px) {
  .draw-result {
    grid-template-columns: 1fr;
  }
  .draw-result figure {
    max-width: 10rem;
    margin: 0 auto;
  }
}

/* Often-asked questions on a practice page: a short list under the form, each with a small gold lozenge. Where the
   screen has room for only some, they are shown a page at a time and turned by the arrows beside the title (pages.js). */
.often {
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(217, 169, 91, 0.22);
}
.often-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
}
.often-title {
  margin: 0;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--gold);
}
.often-pager {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--dim);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.often-pager[hidden] {
  display: none;
}
.often-at {
  min-width: 3.2em;
  text-align: center;
}
:root body .often-turn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(217, 169, 91, 0.45);
  border-radius: 50%;
  background: rgba(10, 4, 11, 0.45);
  color: var(--gold);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s, box-shadow 0.25s;
}
.often-turn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:root body .often-turn:hover,
:root body .often-turn:focus-visible {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  background: rgba(217, 169, 91, 0.14);
  box-shadow: 0 0 18px -4px rgba(239, 200, 136, 0.5);
}
.often ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.often ul.often-in {
  animation: often-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes often-in {
  from {
    opacity: 0;
    translate: calc(var(--often-from, 1) * 14px) 0;
  }
}
.often li + li {
  border-top: 1px solid rgba(236, 223, 198, 0.09);
}
.often [data-ask-fill] {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0.36rem 0 0.36rem 1.35rem;
  border: 0;
  background: none;
  text-align: start;
  cursor: pointer;
  font-family: inherit;
  font-style: normal;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.3;
  color: rgba(240, 229, 208, 0.9);
  text-shadow: 0 1px 12px rgba(10, 4, 11, 0.95);
  transition: color 0.3s, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), text-shadow 0.3s;
}
.often [data-ask-fill]::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: calc(0.36rem + 0.5em);
  width: 0.4rem;
  height: 0.4rem;
  rotate: 45deg;
  border: 1px solid rgba(217, 169, 91, 0.8);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.often [data-ask-fill]:hover,
.often [data-ask-fill]:focus-visible {
  color: var(--gold-bright, #efc888);
  transform: translateX(0.3rem);
  text-shadow: 0 0 22px rgba(239, 200, 136, 0.35), 0 1px 12px rgba(10, 4, 11, 0.95);
}
.often [data-ask-fill]:hover::before,
.often [data-ask-fill]:focus-visible::before {
  background: var(--gold-bright, #efc888);
  box-shadow: 0 0 10px rgba(239, 200, 136, 0.7);
}
@media (prefers-reduced-motion: reduce) {
  .often ul.often-in {
    animation: none;
  }
}

/* the fitted box is measured straight after its zoom or its step is changed, so nothing in it may be eased: with
   reduced motion every property of everything is given a tiny transition (above), and a measurement taken in the same
   moment would read the old sizes */
@media (prefers-reduced-motion: reduce) {
  .stage-way [data-fit],
  .stage-way [data-fit] *,
  .stage-way [data-fit] *::before,
  .stage-way [data-fit] *::after {
    transition-property: none !important;
  }
}

/* ---- a way of asking, drawn tighter step by step on a short screen (data-tight, set by pages.js) before it is ever
        scaled: 1 closes up the spaces and makes the heading and the controls a little smaller; 2 also leaves out the
        introduction and folds the forecast's "remember my date" behind a Privacy button. ---- */
.stage-way[data-tight] h1 {
  font-size: clamp(2.3rem, 4vw, 3.6rem);
}
.stage-way[data-tight] .lede {
  margin-top: 0.6rem;
  font-size: 1.0625rem;
  line-height: 1.4;
}
.stage-way[data-tight] form.signin {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
}
.stage-way[data-tight] .cast label + .row {
  margin-bottom: 0.6rem;
}
.stage-way[data-tight] .cast textarea {
  padding-block: 0.45rem;
}
:root body .stage-way[data-tight] form.signin button[type="submit"] {
  min-height: 50px;
  font-size: 1.125rem;
}
.stage-way[data-tight] .periods {
  margin: 0.2rem 0 0.7rem;
}
.stage-way[data-tight] .chips {
  gap: 7px;
  margin-top: 0.35rem;
}
.stage-way[data-tight] .chip span {
  min-height: 38px;
  padding: 0.2em 0.85em 0.25em 0.7em;
  font-size: 1rem;
}
.stage-way[data-tight] .pick {
  margin-top: 0.6rem;
}
.stage-way[data-tight] .pick select {
  min-height: 42px;
}
.stage-way[data-tight] .cast .keep {
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.stage-way[data-tight] .cast .fine {
  font-size: 0.9375rem;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}
.stage-way[data-tight] .often {
  margin-top: 0.9rem;
  padding-top: 0.6rem;
}
.stage-way[data-tight] .often [data-ask-fill] {
  padding-block: 0.28rem;
}
.stage-way[data-tight="2"] .lede {
  display: none;
}
.stage-way[data-tight="2"] .when {
  font-size: 0.9375rem;
}
/* the chips say what they are; their question is still read out */
.stage-way[data-tight="2"] .periods legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.stage-way[data-tight="2"] .chips {
  gap: 6px;
  margin-top: 0.2rem;
}
.stage-way[data-tight="2"] .chip span {
  gap: 0.42em;
  min-height: 35px;
  padding: 0.12em 0.72em 0.17em 0.6em;
}
:root body .stage-way[data-tight="2"] form.signin button[type="submit"] {
  min-height: 48px;
}
.stage-way[data-tight="2"] h1 {
  margin-top: 0;
}
.stage-way[data-tight="2"] form.signin {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
}
.stage-way[data-tight="2"] .cast label + .row {
  margin-bottom: 0.4rem;
}
.stage-way[data-tight="2"] .periods {
  margin: 0 0 0.4rem;
}
/* the month and the year show what they are; their names are still read out */
.stage-way[data-tight="2"] .pick {
  gap: 6px 10px;
  margin-top: 0.4rem;
}
.stage-way[data-tight="2"] .pick label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.stage-way[data-tight="2"] .pick select {
  margin-top: 0;
  min-height: 40px;
}

/* the forecast's "remember my date of birth" and the note on what is kept: in the form where there is room, behind a
   Privacy button where not. The button stands at the end of the date's label; the note opens over the foot of the form. */
.keep-open {
  display: none;
}
.stage-way[data-tight="2"] form.cast > .keep-open {
  display: block;
  float: right;
  margin-left: 1rem;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(217, 169, 91, 0.45);
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.stage-way[data-tight="2"] form.cast > .keep-open[aria-expanded="true"] {
  color: var(--gold-bright);
}
.stage-way[data-tight="2"] .keep-box {
  display: none;
}
.stage-way[data-tight="2"] form.keep-on .keep-box {
  display: block;
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: -0.6rem;
  right: -0.6rem;
  padding: 0.9rem 1rem 0.3rem;
  border: 1px solid rgba(217, 169, 91, 0.35);
  border-radius: 12px;
  background: linear-gradient(180deg, #1d0f1f, #140a16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 100vmax rgba(10, 4, 11, 0.35);
}

/* ---- the birth card, read: six pages on the one screen, turned by the tabs above them ---- */

.stage-found .stage-fit.birthcard {
  max-width: 74rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "when form"
    "title form"
    "book book";
  column-gap: 2rem;
  align-items: end;
  text-align: left;
}

.stage-found .birthcard .when {
  grid-area: when;
}

.stage-found .birthcard .lede {
  display: none;
}

.stage-found .birthcard h1 {
  grid-area: title;
  margin: 0;
  font-size: clamp(1.9rem, 2.7vw, 2.6rem);
}

.stage-found .birthcard form.signin {
  grid-area: form;
  display: grid;
  justify-items: end;
  margin: 0;
  padding: 0;
  border: 0;
  max-width: none;
}

/* the field keeps its name for a screen reader; on the page the date in it says what it is */
.stage-found .birthcard form.signin > label[for] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.stage-found .birthcard .row {
  margin: 0;
  flex-wrap: nowrap;
}

.stage-found .birthcard .row input {
  flex: 0 1 12rem;
}

/* the golden button, a size smaller now that it only asks again */
:root body .stage-found .birthcard form.signin button[type="submit"] {
  min-height: 48px;
  padding-right: 1.3em;
  font-size: 1.0625rem;
  white-space: nowrap;
}

.stage-found .birthcard .row input {
  min-height: 48px;
}

.stage-found .birthcard .keep {
  min-height: 0;
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  color: var(--dim);
}

.bc-book {
  grid-area: book;
  min-width: 0;
  margin-top: 0.9rem;
  font-variant-numeric: lining-nums;
}

.bc-tabs {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.2rem);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.bc-tabs::-webkit-scrollbar {
  display: none;
}

.bc-tabs button {
  flex: none;
  min-height: 44px;
  padding: 0.5rem 0 0.45rem;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--dim);
  font: 1.1875rem/1.2 var(--display);
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.3s,
    border-color 0.3s;
}

.bc-tabs button:hover {
  color: var(--bone);
}

.bc-tabs button[aria-selected="true"] {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

/* every page lies in the same place, so the book is as tall as its longest page and never jumps */
.bc-panels {
  display: grid;
  margin-top: 1rem;
  border: 1px solid rgba(217, 169, 91, 0.32);
  border-radius: 5px;
  background: linear-gradient(160deg, rgba(34, 19, 42, 0.66), rgba(16, 8, 18, 0.6));
  box-shadow:
    inset 0 0 0 5px rgba(23, 13, 25, 0.25),
    inset 0 0 0 6px rgba(217, 169, 91, 0.13),
    0 30px 60px -30px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.bc-panel {
  grid-area: 1 / 1;
  min-width: 0;
  padding: clamp(1.2rem, 2.4vw, 2.1rem) clamp(1.2rem, 3vw, 2.6rem);
  display: grid;
  align-content: center;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.45s,
    visibility 0s 0.45s;
}

.bc-panel.on {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.45s;
}

.bc-panel:focus-visible {
  outline-offset: -4px;
}

.bc-one,
.bc-three,
.bc-five {
  grid-template-columns: minmax(0, 15.5rem) minmax(0, 1fr);
  gap: clamp(1.4rem, 3.4vw, 3rem);
  align-items: center;
}

.bc-face .card {
  max-height: 52svh;
  aspect-ratio: 560 / 939;
  margin-inline: auto;
}

.bc-panel h2 {
  margin: 0;
  font: clamp(1.9rem, 2.9vw, 2.75rem) / 1.08 var(--display);
  color: var(--bone);
}

.bc-roman {
  margin-right: 0.15em;
  font-family: var(--text);
  color: var(--gold);
  font-size: 0.62em;
  vertical-align: 0.28em;
}

.bc-eyebrow {
  margin: 0 0 0.2rem;
  font-style: italic;
  color: var(--gold);
}

.bc-keys {
  margin: 0.45rem 0 0;
  font-style: italic;
  font-size: 1.125rem;
  color: var(--gold-bright);
}

.bc-lead {
  margin: 0.8rem 0 0;
  max-width: 44rem;
  font-size: 1.25rem;
  line-height: 1.48;
}

.bc-panel h3 {
  margin: 0 0 0.25rem;
  font: 1.1875rem/1.2 var(--display);
  color: var(--gold-bright);
}

.bc-panel p {
  margin-block: 0;
}

/* what the card is made of, and the sum that found it */
.bc-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem 2.4rem;
  align-items: start;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.bc-traits {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bc-traits li {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  line-height: 1.25;
  color: var(--dim);
}

.bc-traits em {
  display: block;
  font-style: normal;
  font-size: 1.125rem;
  color: var(--bone);
}

.bc-num,
.bc-glyph {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--gold-bright);
  font: 400 1.25rem/1 var(--text);
}

.bc-num {
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.bc-glyph {
  font: 1.6rem/1 "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
}

/* The 22 birth cards, each a link to its own page (worker/pages.ts allBirthCards): out of sight until the line above
   the heading asks for them (#all-birth-cards), then a leaf of glass over the stage, which never scrolls. On a phone
   the link in that line is the numerals alone, so that the line stays one line; it is named in full to those who
   hear the page. */
.bc-all-short {
  display: none;
}

@media (max-width: 480px) {
  .bc-all-open .bc-all-long {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .bc-all-open .bc-all-short {
    display: inline;
    letter-spacing: 0.04em;
  }
}

.bc-all {
  display: none;
}

.bc-all:target {
  position: fixed;
  inset: 0 0 var(--consent-h, 0px);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 72px 16px 14px;
  background: rgba(14, 7, 16, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bc-all-in {
  width: min(44rem, 100%);
  max-height: 100%;
  overflow: auto;
  padding: clamp(14px, 2.6vw, 28px) clamp(14px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(217, 169, 91, 0.1), rgba(217, 169, 91, 0) 60%),
    linear-gradient(rgba(34, 19, 42, 0.9), rgba(23, 13, 25, 0.95));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(239, 200, 136, 0.12);
}

.bc-all h2 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  text-align: center;
}

.bc-all ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bc-all a {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.28rem 0.4rem;
  border-radius: 6px;
  color: var(--bone);
  font-size: 1.0625rem;
  line-height: 1.25;
  text-decoration: none;
}

.bc-all a:hover,
.bc-all a:focus-visible {
  background: rgba(217, 169, 91, 0.12);
  color: var(--gold-bright);
}

.bc-all b {
  flex: 0 0 2.9rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.bc-all span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bc-all .bc-all-close {
  margin: 0.7rem 0 0;
  text-align: center;
}

.bc-all .bc-all-close a {
  display: inline-block;
  color: var(--dim);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .bc-all:target {
    padding: 60px 12px 10px;
  }

  .bc-all ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
  }

  .bc-all a {
    gap: 0.35rem;
    padding: 0.2rem 0.25rem;
    font-size: 0.875rem;
  }

  .bc-all b {
    flex-basis: 2.5rem;
    font-size: 0.8125rem;
  }
}

.bc-el {
  width: 2.1rem;
  height: 2.1rem;
  fill: none;
  stroke: var(--gold-bright);
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.bc-sum {
  min-width: 15rem;
  text-align: right;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.35;
}

.bc-sum-what {
  font-style: italic;
  color: var(--gold);
}

.bc-sum-date {
  color: var(--dim);
}

.bc-sum ol {
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.bc-sum li {
  display: flex;
  justify-content: flex-end;
  gap: 0.45em;
  white-space: nowrap;
}

.bc-sum li b {
  min-width: 1.5em;
  font-weight: 400;
  color: var(--gold-bright);
}

.bc-sum li b::before {
  content: "= ";
  color: var(--dim);
}

.bc-sum-end {
  margin-top: 0.35rem !important;
  padding-top: 0.3rem;
  border-top: 3px double rgba(217, 169, 91, 0.6);
  font: 1.25rem/1.2 var(--display);
}

.bc-sum-end b {
  margin-right: 0.3em;
  font-family: var(--text);
  font-weight: 400;
  color: var(--gold);
}

.bc-sum-note {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--dim);
}

/* gifts on the lit side of the card, the shadow on its dark side */
.bc-two {
  text-align: center;
}

.bc-sides {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.6rem);
  align-items: center;
  margin-top: 1.3rem;
}

.bc-sides ul {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.25rem;
  line-height: 1.3;
}

.bc-sides li + li {
  margin-top: 0.7rem;
}

.bc-gifts {
  text-align: right;
}

.bc-shade {
  text-align: left;
}

.bc-shade h3 {
  color: var(--dim);
}

.bc-shade ul {
  color: #cdbfae;
}

.bc-split {
  position: relative;
  width: clamp(7rem, 12vw, 10.5rem);
  border-radius: 4.5% / 2.7%;
  overflow: hidden;
  box-shadow: 0 18px 38px -8px rgba(0, 0, 0, 0.75);
}

.bc-split img {
  display: block;
  width: 100%;
  height: auto;
}

.bc-split::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255, 214, 150, 0.1) 49.6%, rgba(239, 200, 136, 0.9) 49.6% 50.4%, rgba(14, 6, 16, 0.74) 50.4%);
}

.bc-lesson {
  max-width: 44rem;
  margin: 1.4rem auto 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.bc-lesson p,
.bc-ask p {
  font: italic 1.375rem/1.4 var(--display);
  color: var(--bone);
}

/* two short passages side by side */
.bc-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem clamp(1.2rem, 3vw, 2.6rem);
  margin-top: 1.2rem;
  font-size: 1.125rem;
  line-height: 1.45;
}

.bc-ask,
.bc-meet {
  margin-top: 1.3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.bc-ask p {
  color: var(--gold-bright);
}

/* the constellation: the cards that share one number, strung on a line of stars */
.bc-four {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 3.4vw, 3rem);
  align-items: center;
}

.bc-number {
  display: grid;
  gap: 1.2rem;
}

.bc-figure {
  font: 400 clamp(6rem, 11vw, 10rem) / 0.78 var(--text);
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
}

.bc-stars {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.3rem 1.2rem;
  margin: 0;
  padding: 0 0 0 1.9rem;
  list-style: none;
}

.bc-stars::before {
  content: "";
  position: absolute;
  top: 2.5rem;
  bottom: 2.5rem;
  left: 0.4rem;
  width: 1px;
  background: rgba(217, 169, 91, 0.6);
}

.bc-stars li {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  font-size: 1.125rem;
  line-height: 1.4;
}

.bc-stars li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -1.5rem;
  width: 0.5rem;
  height: 0.5rem;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 12px 3px rgba(239, 200, 136, 0.5);
}

.bc-stars li.mine::before {
  width: 0.85rem;
  height: 0.85rem;
}

.bc-thumbs {
  display: flex;
  gap: 0.5rem;
}

.bc-thumbs .card {
  width: 5.2rem;
}

.bc-stars em {
  display: block;
  color: var(--gold);
}

.bc-stars strong {
  display: block;
  font: 400 1.375rem/1.2 var(--display);
}

.bc-stars strong span {
  margin-left: 0.3em;
  font: 1rem var(--text);
  color: var(--dim);
  white-space: nowrap;
}

.bc-stars p {
  margin-top: 0.25rem;
}

/* how the year's card meets the birth card */
.bc-meet {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
  font-size: 1.125rem;
  line-height: 1.45;
}

.bc-meet-marks {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bc-meet-marks span {
  width: 2.6rem;
  border-radius: 3px;
  overflow: hidden;
}

.bc-meet-marks img {
  display: block;
  width: 100%;
  height: auto;
}

.bc-meet-marks i {
  display: flex;
}

.bc-meet-marks .bc-el {
  width: 1.5rem;
  height: 1.5rem;
}

/* the ribbon of years: each year's card, and above it the number of the year climbing to nine and beginning again */
.bc-six {
  text-align: center;
}

.bc-note {
  max-width: 44rem;
  margin: 0.5rem auto 0 !important;
  font-size: 1.125rem;
  color: var(--dim);
}

.bc-ribbon {
  position: relative;
  max-width: 62rem;
  margin: 0.8rem auto 0;
  --track: 5.2rem;
}

.bc-ribbon svg {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: var(--track);
  overflow: visible;
}

.bc-ribbon path {
  fill: none;
  stroke: rgba(217, 169, 91, 0.7);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.bc-years {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.bc-years li {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: calc(var(--track) + 0.5rem) 0.25rem 0;
  line-height: 1.2;
}

.bc-years b {
  position: absolute;
  top: calc(var(--track) * (0.88 - (var(--r) - 1) * 0.095));
  left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--night);
  color: var(--gold-bright);
  font: 400 0.9375rem/1 var(--text);
}

.bc-years .card {
  width: min(100%, 4.6rem);
  opacity: 0.72;
}

.bc-yr {
  margin-top: 0.45rem;
  color: var(--dim);
  font-variant-numeric: lining-nums;
}

.bc-nm {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--dim);
}

.bc-years .now b {
  width: 1.9rem;
  height: 1.9rem;
  background: var(--gold);
  color: var(--night);
  font-size: 1.0625rem;
}

.bc-years .now .card {
  width: min(100%, 5.6rem);
  opacity: 1;
  outline: 1px solid var(--gold-bright);
  outline-offset: 3px;
}

.bc-years .now .bc-yr,
.bc-years .now .bc-nm {
  color: var(--gold-bright);
}

.bc-round {
  max-width: 58rem;
  margin: 1rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.bc-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 1.8rem);
  margin: 0.8rem 0 0;
  font-size: 1.0625rem;
}

.bc-foot a,
.bc-foot .linkish {
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.3em;
}

.bc-turn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(217, 169, 91, 0.55);
  border-radius: 50%;
  background: rgba(23, 13, 25, 0.6);
  color: var(--gold-bright);
  cursor: pointer;
  transition:
    opacity 0.3s,
    background 0.3s;
}

.bc-turn:first-child {
  margin-right: auto;
}

.bc-turn:last-child {
  margin-left: auto;
}

.bc-turn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .bc-turn:hover:not(:disabled) {
    background-color: rgba(217, 169, 91, 0.2);
  }
}

.bc-turn:disabled {
  opacity: 0.25;
  cursor: default;
}

@media (max-width: 860px) {
  .stage-found .stage-fit.birthcard {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title when"
      "form form"
      "book book";
    align-items: baseline;
  }

  .stage-found .stage-words {
    padding-top: 98px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .stage-found .birthcard h1 {
    font-size: 1.75rem;
  }

  .stage-found .birthcard form.signin {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    margin-top: 0.5rem;
  }

  .stage-found .birthcard .row {
    min-width: 0;
  }

  .stage-found .birthcard .row input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
  }

  .stage-found .birthcard .row button {
    width: auto;
    flex: none;
  }

  :root body .stage-found .birthcard form.signin button[type="submit"] {
    gap: 0.5em;
    padding-right: 1em;
    font-size: 1rem;
  }

  .stage-found .birthcard .row input {
    padding-inline: 0.6rem;
  }

  .stage-found .birthcard .keep {
    font-size: 0.875rem;
    line-height: 1.25;
  }

  .bc-book {
    margin-top: 0.5rem;
  }

  .bc-tabs {
    gap: 1.1rem;
    margin-inline: calc(var(--edge) * -1);
    padding-inline: var(--edge);
  }

  .bc-tabs button {
    font-size: 1.0625rem;
  }

  .bc-panels {
    margin-top: 0.7rem;
  }

  .bc-panel {
    padding: 0.95rem 0.95rem 1rem;
  }

  /* the card stands in the corner and the words run round it */
  .bc-one,
  .bc-three,
  .bc-five {
    display: block;
  }

  .bc-face {
    float: left;
    width: 5.6rem;
    margin: 0.15rem 0.9rem 0.3rem 0;
  }

  .bc-panel h2 {
    font-size: 1.6rem;
  }

  .bc-keys {
    margin-top: 0.3rem;
    font-size: 1rem;
  }

  .bc-lead {
    margin-top: 0.55rem;
    font-size: 1.0625rem;
    line-height: 1.4;
  }

  .bc-panel h3,
  .bc-roles dt {
    font-size: 1.0625rem;
  }

  .bc-facts {
    clear: both;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
    margin-top: 0.8rem;
    padding-top: 0.7rem;
  }

  .bc-traits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: start;
  }

  .bc-traits li {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0.3rem;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.2;
  }

  .bc-traits em {
    font-size: 1rem;
  }

  .bc-sum {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.8rem;
    align-items: end;
    min-width: 0;
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
    font-size: 0.9375rem;
  }

  .bc-sum-what,
  .bc-sum-date {
    grid-column: 1;
    text-align: left;
  }

  .bc-sum ol {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }

  .bc-sum-end,
  .bc-sum-note {
    grid-column: 1 / -1;
    font-size: 1.0625rem;
  }

  .bc-two h2 {
    font-size: 1.4rem;
  }

  .bc-sides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: start;
    margin-top: 0.8rem;
  }

  .bc-split {
    display: none;
  }

  .bc-gifts {
    text-align: left;
    padding-right: 0.9rem;
    border-right: 1px solid rgba(217, 169, 91, 0.45);
  }

  .bc-sides ul {
    font-size: 1rem;
    line-height: 1.25;
  }

  .bc-sides li + li {
    margin-top: 0.55rem;
  }

  .bc-lesson {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
  }

  .bc-lesson p,
  .bc-ask p {
    font-size: 1.125rem;
    line-height: 1.35;
  }

  .bc-pair {
    gap: 0.7rem 0.9rem;
    margin-top: 0.8rem;
    font-size: 1rem;
    line-height: 1.36;
  }

  .bc-three .bc-pair {
    clear: both;
    grid-template-columns: minmax(0, 1fr);
  }

  .bc-three .bc-face {
    display: none;
  }

  .bc-ask,
  .bc-meet {
    margin-top: 0.8rem;
    padding-top: 0.7rem;
  }

  .bc-four {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
  }

  .bc-number {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
  }

  .bc-figure {
    font-size: 4.2rem;
    line-height: 0.82;
  }

  .bc-stars {
    gap: 0.75rem 0.8rem;
    padding: 0.8rem 0 0 1.3rem;
    border-top: 1px solid var(--line);
  }

  .bc-stars::before {
    top: 2.8rem;
    bottom: 2rem;
    left: 0.3rem;
  }

  .bc-stars li {
    font-size: 0.9375rem;
    line-height: 1.32;
  }

  .bc-stars li::before {
    left: -1rem;
  }

  .bc-thumbs {
    gap: 0.3rem;
  }

  .bc-thumbs .card {
    width: 3.3rem;
  }

  .bc-stars strong {
    font-size: 1.125rem;
  }

  .bc-stars strong span {
    font-size: 0.875rem;
  }

  .bc-stars p {
    margin-top: 0.1rem;
  }

  .bc-meet {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
    font-size: 1rem;
    line-height: 1.36;
  }

  .bc-meet-marks {
    display: none;
  }

  .bc-note {
    font-size: 0.9375rem;
    line-height: 1.3;
  }

  .bc-ribbon {
    --track: 3.6rem;
  }

  .bc-years li {
    padding-inline: 2px;
  }

  /* held to a fixed width, so the cards do not grow when the page is fitted to a short screen */
  .bc-years .card {
    width: min(100%, 2.3rem);
  }

  .bc-years .now .card {
    width: min(100%, 2.6rem);
  }

  .bc-years b {
    width: 1.3rem;
    height: 1.3rem;
    font-size: 0.8125rem;
  }

  .bc-years .now b {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.9375rem;
  }

  .bc-yr {
    font-size: 0.8125rem;
  }

  .bc-nm {
    display: none;
  }

  .bc-round {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0.7rem;
    padding-top: 0.7rem;
  }

  .bc-foot {
    margin-top: 0.5rem;
    font-size: 1rem;
  }

  .bc-turn {
    width: 40px;
    height: 40px;
  }
}

/* a short screen: the same pages with less air, before anything has to shrink */
@media (min-width: 861px) and (max-height: 800px) {
  .stage-found .stage-words {
    padding-top: 84px;
    padding-bottom: 20px;
  }

  .stage-found .birthcard h1 {
    font-size: 1.9rem;
  }

  .bc-book {
    margin-top: 0.4rem;
  }

  .bc-tabs button {
    min-height: 40px;
    padding-block: 0.35rem;
  }

  .bc-panels {
    margin-top: 0.7rem;
  }

  .bc-panel {
    padding-block: 1rem;
  }

  .bc-facts,
  .bc-pair,
  .bc-sides,
  .bc-lesson,
  .bc-ask,
  .bc-meet {
    margin-top: 0.9rem;
  }

  .bc-facts,
  .bc-lesson,
  .bc-ask,
  .bc-meet,
  .bc-round {
    padding-top: 0.8rem;
  }

  .bc-split {
    width: 7rem;
  }

  .bc-figure {
    font-size: 6rem;
  }

  .bc-stars {
    row-gap: 0.8rem;
  }

  .bc-thumbs .card {
    width: 4.3rem;
  }

  .bc-ribbon {
    --track: 3.9rem;
  }

  .bc-years .card {
    width: min(100%, 3.9rem);
  }

  .bc-years .now .card {
    width: min(100%, 4.7rem);
  }

  .bc-round {
    margin-top: 0.7rem;
  }

  .bc-foot {
    margin-top: 0.5rem;
  }
}

@media (max-width: 860px) and (max-height: 700px) {
  .stage-found .birthcard .when {
    display: none;
  }

  .stage-found .birthcard h1 {
    font-size: 1.5rem;
  }

  .bc-tabs button {
    min-height: 38px;
    padding-block: 0.3rem;
  }

  .bc-panel {
    padding: 0.7rem 0.8rem 0.8rem;
  }

  .bc-ribbon {
    --track: 3rem;
  }

  .bc-note {
    display: none;
  }
}

/* A screen too short for a whole page of the book: each page is laid out in leaves (pages.js paginate), turned by
   the same arrows and swipes; the pieces of the other leaves are put away, and the book keeps one height. */
.bc-paged .bc-off {
  display: none !important;
}

.bc-paged .bc-panels {
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.bc-paged .bc-panel {
  align-content: start;
}

/* which leaf of the page is open, beside its tab's name: "2/3" */
.bc-tabs button[data-leaf]::after {
  content: attr(data-leaf);
  margin-left: 0.45em;
  font: italic 0.8125rem/1 var(--text);
  color: var(--dim);
}

/* The date comes first. On a short phone the two finer choices, remembering the date and how to count, wait for the
   second step: they stand under the date again once the cards are shown, and the form sends them as they are. */
@media (max-width: 560px) and (max-height: 720px) {
  .stage:not(.stage-found) .birthcard .keep,
  .stage:not(.stage-found) .birthcard .bc-method {
    display: none !important;
  }

  /* with the cards shown they come back, except while the bar that asks about counting visits takes the foot of the
     screen: then the book keeps the room, and they return as soon as the bar is answered */
  body:has(> .consent) .stage-found .birthcard .keep,
  body:has(> .consent) .stage-found .birthcard .bc-method {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bc-panel,
  .bc-panel.on,
  .bc-tabs button,
  .bc-turn {
    transition: none;
  }
}

/* the two ways of counting a birth card: one quiet line under the date, the chosen way underlined in gold */
.stage-found .birthcard .bc-method,
.bc-method {
  margin: 0.3rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.1rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--dim);
}

.bc-method legend {
  float: left;
  padding: 0;
  margin-right: 1rem;
  font-style: italic;
  font-size: inherit;
  color: var(--dim);
}

.stage-found .birthcard .bc-method label,
.bc-method label {
  position: relative;
  display: inline-block;
  min-height: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  font-style: normal;
  color: inherit;
  cursor: pointer;
}

/* the radio itself is there for the keyboard and the screen reader, not for the eye */
.stage-found .birthcard .bc-method input,
.bc-method input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  /* no taller or wider than its own label: the field's usual minimum height reached down over the tabs below */
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  opacity: 0;
  cursor: pointer;
  flex: none;
}

.bc-method span {
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.bc-method label:hover span {
  color: var(--gold);
}

.bc-method input:checked + span {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.bc-method input:focus-visible + span {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .stage-found .birthcard .bc-method,
  .bc-method {
    justify-content: flex-start;
    font-size: 0.875rem;
  }
}

/* =====================================================================================================
   Fixes after the audit: the header and footer on a phone, the bar that asks about counting visits,
   the plans page, and the pages that draw one card.
   ===================================================================================================== */

/* ---- header on a phone: the brand, the music emblem and the language ring share the first line;
        the rest of the menu wraps tidily on the line below. Nothing may be wider than the screen. ---- */
@media (max-width: 560px) {
  .top {
    position: relative;
  }

  .top-links {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0 1.15rem;
    min-width: 0;
    max-width: 100%;
    margin-top: 6px;
  }

  .top-links [data-music],
  .top-links .langs {
    position: absolute;
    right: var(--edge);
    margin: 0;
  }

  .top-links .langs {
    top: calc(max(18px, env(safe-area-inset-top)) - 6px);
  }

  .top-links [data-music] {
    top: calc(max(18px, env(safe-area-inset-top)) - 8px);
    right: calc(var(--edge) + 48px);
  }

  /* a saved reading has no language ring: the music emblem takes the corner */
  .top-links:not(:has(.langs)) [data-music] {
    right: calc(var(--edge) - 10px);
  }

  .top-links .langs summary {
    width: 40px;
    height: 40px;
    font-size: 0.8125rem;
  }

  /* the way in is on the journal page; the rule in buttons.css that hides it here is outweighed by .top-links .linkish */
  .top-links .signin-open {
    display: none;
  }
}

@media (max-width: 380px) {
  .top-links {
    column-gap: 0.9rem;
    font-size: 0.875rem;
  }
}

/* ---- footer: a link never breaks in two; the row wraps between links ---- */
.foot p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.3em;
}

.foot a,
.foot .linkish {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  white-space: nowrap;
  color: var(--dim);
}

@media (max-width: 560px) {
  .foot {
    padding: 20px var(--edge) 28px;
  }

  .foot p {
    gap: 0 1.1em;
  }

  .foot a,
  .foot .linkish {
    min-height: 40px;
  }
}

/* ---- WIDGET PAGE (worker/embed.ts, public/widget.js): the reading's book over the table film, with three pages:
        the words, the widget itself with its two choices, and its code. A phone turns them, and each is sized from
        the room the screen has (less the bar that asks about counting visits), so none is ever made smaller to fit.
        A wide screen lays all three open at once as one composed screen: the widget, large, on the left; the words,
        the choices and the code on the right. ---- */
.rd.wg h1 {
  font-size: clamp(2rem, 8.4vw, 3.4rem);
}

.wg-show iframe {
  display: block;
  width: min(320px, 100%);
  height: clamp(15rem, calc(100svh - var(--consent-h, 0px) - 276px), 520px);
  margin: 0 auto;
  border: 0;
  border-radius: 12px;
  background: var(--night);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(217, 169, 91, 0.3);
}

.wg-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em 1em;
  width: 100%;
  max-width: 34rem;
  margin: 1rem auto 0;
  text-align: left;
}

.wg-opts label {
  flex: 1 1 7em;
}

/* the colours say more than the language does */
.wg-opts label + label {
  flex: 1.5 1 9em;
}

.wg-opts select {
  text-overflow: ellipsis;
}

.wg-make {
  max-width: 34rem;
  margin: 0 auto;
  text-align: left;
}

.wg-opts label,
.wg-make label {
  display: block;
  font-style: italic;
  font-size: 0.9em;
  color: var(--dim);
}

.wg-opts select,
.wg-make textarea {
  display: block;
  width: 100%;
  margin-top: 0.25em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 4, 11, 0.62);
  color: var(--bone);
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.wg-opts select {
  min-height: 44px;
  padding: 0.3em 0.25em 0.3em 0.6em;
  font: inherit;
  font-style: normal;
}

.wg-opts select:focus-visible,
.wg-make textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.wg-make textarea {
  height: clamp(4.6rem, calc(100svh - var(--consent-h, 0px) - 450px), 11rem);
  padding: 0.6em 0.75em;
  font: max(13px, 0.8em) / 1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-style: normal;
  resize: none;
  word-break: break-all;
}

/* the code just copied: its box lights up while the words beside the button say so */
.wg-make textarea.wg-copied {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 24px rgba(217, 169, 91, 0.25);
}

.wg-do {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em 1em;
  margin-top: 0.8em;
}

.wg-do .status {
  min-height: 0;
  margin: 0;
  font-style: italic;
  font-size: 1em;
  color: var(--gold);
}

.wg-how,
.wg-terms {
  margin-top: 0.7em;
  font-size: 0.9em;
  line-height: 1.45;
  text-wrap: pretty;
}

.wg-how {
  color: var(--dim);
}

@media (min-width: 900px) and (min-height: 560px) {
  .rd.wg .jr-pages {
    display: grid;
    grid-template-columns: auto minmax(0, 34em);
    grid-template-areas:
      "show head"
      "show opts"
      "show make";
    justify-content: center;
    align-content: center;
    align-items: center;
    gap: 1.1em clamp(2rem, 6vw, 6rem);
    padding: 88px var(--edge) 24px;
    overflow: hidden;
    font-size: clamp(0.875rem, calc((100svh - var(--consent-h, 0px) - 112px) / 36), 1.25rem);
  }

  .rd.wg .jr-page,
  .rd.wg .jr-page > .jr-fit {
    display: contents;
    padding: 0;
  }

  .rd.wg .jr-turn,
  .rd.wg .bk-open {
    display: none;
  }

  .wg-head {
    grid-area: head;
    align-self: end;
    text-align: left;
  }

  .wg-head .when {
    text-align: left;
  }

  .rd.wg h1 {
    margin-top: 0.1em;
    font-size: 2.4em;
    line-height: 1.05;
  }

  .rd.wg .opening {
    max-width: none;
    margin: 0.6em 0 0;
    font-size: 1em;
    line-height: 1.45;
    text-align: left;
  }

  .wg-show {
    grid-area: show;
  }

  /* the widget, live, as large as the screen's height allows, in the proportions of the code it hands out */
  .wg-show iframe {
    --ph: min(640px, calc(100svh - var(--consent-h, 0px) - 130px));
    width: calc(var(--ph) * 0.6154);
    height: var(--ph);
    margin: 0;
  }

  .wg-opts {
    grid-area: opts;
    max-width: none;
    margin: 0.3em 0 0;
  }

  .wg-make {
    grid-area: make;
    align-self: start;
    max-width: none;
    margin: 0;
  }

  .wg-make textarea {
    height: 8.6em;
  }
}

/* ---- the bar that asks about counting visits lies along the bottom edge (buttons.css); shell.js gives its
        height as --consent-h. Pages that scroll end above it; pages one screen tall stand on top of it. ---- */
body:not(.screen) {
  padding-bottom: var(--consent-h, 0px);
}

.stage,
.hall,
.jr-book {
  height: calc(100svh - var(--consent-h, 0px));
}

.jr-empty .jr-hero {
  min-height: calc(100svh - var(--consent-h, 0px));
}

/* ---- the plans page: a painted scene behind it, the words on one side and the plans on the other ---- */
.upgrade {
  position: relative;
}

.up-art {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.up-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  translate: 0 14%;
  animation: jr-candlelight 5.5s ease-in-out infinite;
}

.up-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(90, 22, 38, 0.42), transparent 70%),
    linear-gradient(to bottom, var(--night) 0%, rgba(23, 13, 25, 0.93) 34%, rgba(23, 13, 25, 0.5) 72%, rgba(23, 13, 25, 0.28) 100%);
}

.upgrade .lede {
  text-wrap: pretty;
}

.upgrade .includes li:last-child {
  border-bottom: 1px solid var(--line);
}

.upgrade .trial {
  background: rgba(24, 12, 27, 0.55);
}

.upgrade .plans {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 1rem;
}

.upgrade .plan {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.35rem 1.4rem;
  border-color: rgba(217, 169, 91, 0.3);
  background: linear-gradient(180deg, rgba(56, 28, 50, 0.8), rgba(24, 12, 27, 0.88));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 190, 0.14),
    0 18px 40px rgba(0, 0, 0, 0.45);
}

.upgrade .plan.best {
  border-color: rgba(239, 200, 136, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 190, 0.22),
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 46px rgba(217, 169, 91, 0.2);
}

.upgrade .plan h2 {
  margin: 0 0 0.45rem;
  font-size: 1.5rem;
}

.upgrade .price {
  margin-bottom: 0.55rem;
  font-size: 2.75rem;
  white-space: nowrap;
}

.upgrade .saving {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.3;
}

:root body .upgrade .plan .button {
  width: 100%;
  margin-top: auto;
  padding-right: 1em;
}

.upgrade .status:empty {
  min-height: 0;
  margin: 0;
}

.upgrade .fine {
  margin-top: 0.75rem;
}

/* one reading, paid for once: a quieter row under the plans */
.upgrade .once {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem 1.4rem;
  margin-top: 1.1rem;
  padding: 1rem 1.2rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(24, 12, 27, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.upgrade .once-h {
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
}

.upgrade .once p {
  font-size: 1rem;
  line-height: 1.4;
}

.upgrade .once-row {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.6rem;
  margin: 0;
}

:root body .upgrade .once-row .button {
  min-height: 48px;
  font-size: 1.0625rem;
  white-space: nowrap;
}

@media (min-width: 980px) {
  .upgrade-plans {
    max-width: 74rem;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
    padding: clamp(20px, 5vh, 72px) 0 28px;
  }

  .upgrade-plans h1 {
    font-size: clamp(2.8rem, 4.6vw, 4rem);
  }

  .upgrade-plans .up-buy > .trial {
    margin-top: 0.4rem;
  }
}

@media (max-width: 979px) {
  .upgrade-plans .up-buy {
    margin-top: 1.4rem;
  }
}

@media (max-width: 560px) {
  .up-art img {
    translate: 0 10%;
    object-position: 38% 100%;
  }

  .up-art::after {
    background: linear-gradient(to bottom, var(--night) 0%, rgba(23, 13, 25, 0.94) 55%, rgba(23, 13, 25, 0.62) 82%, rgba(23, 13, 25, 0.4) 100%);
  }

  .upgrade .trial {
    font-size: 0.98rem;
    padding: 0.7rem 0.9rem;
  }

  .upgrade .plans {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .upgrade .plan {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    padding: 1rem 1.1rem 1.15rem;
  }

  .upgrade .plan h2 {
    margin: 0;
  }

  .upgrade .price {
    margin: 0;
    font-size: 2.2rem;
    text-align: right;
  }

  .upgrade .saving,
  .upgrade .plan .button {
    grid-column: 1 / -1;
  }

  .upgrade .saving {
    margin: 0.15rem 0 0;
  }

  :root body .upgrade .plan .button {
    margin-top: 0.8rem;
  }

  .upgrade .once {
    grid-template-columns: minmax(0, 1fr);
  }

  .upgrade .once-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  :root body .upgrade .once-row .button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .up-art img {
    animation: none;
  }
}

/* ---- pages that draw one card: the home page's table lies behind them, and the card is turned over ---- */
.draw-art {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 80% at 50% 46%, rgba(23, 13, 25, 0.9) 0%, rgba(23, 13, 25, 0.78) 55%, rgba(23, 13, 25, 0.3) 100%),
    linear-gradient(to bottom, rgba(23, 13, 25, 0.82) 0%, rgba(23, 13, 25, 0.15) 26%, rgba(23, 13, 25, 0.15) 70%, rgba(23, 13, 25, 0.7) 100%),
    url("/media/table-l.jpg") center / cover no-repeat;
}

@media (max-aspect-ratio: 4/5) {
  .draw-art {
    background:
      linear-gradient(to bottom, rgba(23, 13, 25, 0.86) 0%, rgba(23, 13, 25, 0.74) 45%, rgba(23, 13, 25, 0.7) 100%),
      url("/media/table-p.jpg") center / cover no-repeat;
  }
}

.draw-page h1 {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.draw-page .card-go {
  background: linear-gradient(180deg, rgba(56, 28, 50, 0.72), rgba(24, 12, 27, 0.84));
  border-color: rgba(217, 169, 91, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 190, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.4);
}

.draw-start {
  margin: 1.8rem 0 0.6rem;
}

.draw-result figure {
  position: relative;
}

.draw-result img.rev {
  transform: none;
  rotate: 180deg;
}

/* the card arrives face down and is turned over; then its words come up beside it */
.draw-reveal figure {
  perspective: 1100px;
}

.draw-reveal figure img,
.draw-reveal figure::before {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.draw-reveal figure img {
  animation: draw-face 1.15s 0.2s cubic-bezier(0.3, 0.1, 0.2, 1) both;
}

.draw-reveal figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 10px;
  background: url("/cards/back.webp") center / cover no-repeat;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(217, 169, 91, 0.25);
  animation: draw-back 1.15s 0.2s cubic-bezier(0.3, 0.1, 0.2, 1) both;
}

.draw-reveal figure::after {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(239, 200, 136, 0.5), rgba(239, 200, 136, 0));
  opacity: 0;
  animation: draw-glow 1.8s 0.75s ease-out both;
}

.draw-reveal > div {
  animation: draw-say 0.8s 0.95s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes draw-face {
  from {
    transform: translateY(22px) rotateY(-180deg) scale(0.94);
  }
  60% {
    transform: translateY(-6px) rotateY(0deg) scale(1.03);
  }
  to {
    transform: none;
  }
}

@keyframes draw-back {
  from {
    transform: translateY(22px) rotateY(0deg) scale(0.94);
  }
  60%,
  to {
    transform: translateY(-6px) rotateY(180deg) scale(1.03);
  }
}

@keyframes draw-glow {
  30% {
    opacity: 1;
  }
  to {
    opacity: 0.35;
  }
}

@keyframes draw-say {
  from {
    opacity: 0;
    translate: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .draw-reveal figure img,
  .draw-reveal figure::after,
  .draw-reveal > div {
    animation: none;
  }

  .draw-reveal figure::before {
    display: none;
  }
}

/* =====================================================================================================
   Fixes after the second audit: pages that would have to shrink too far scroll instead, the journal's
   first page, the hall on a phone, and a way past the menu for the keyboard.
   ===================================================================================================== */

/* ---- a one-screen page that does not fit at a readable size (pages.js) keeps its size and scrolls ---- */
.stage.stage-loose {
  height: auto;
  min-height: 100svh;
  grid-template-rows: auto;
  padding-bottom: var(--consent-h, 0px);
}

.stage-loose .stage-words {
  height: auto;
}

/* the birth card at its own size on a phone: the heading and the date each get the whole width, so no word is broken */
@media (max-width: 560px) {
  .stage-loose.stage-found .stage-fit.birthcard {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "when"
      "title"
      "form"
      "book";
  }

  .stage-loose.stage-found .birthcard .row {
    flex-wrap: wrap;
  }

  .stage-loose.stage-found .birthcard .row input {
    flex: 1 1 9rem;
    width: auto;
  }

  .stage-loose.stage-found .birthcard .row button {
    flex: 1 1 auto;
  }
}

/* ---- more ways to ask, on a phone: the menu takes two lines there, and the heading starts below it ---- */
@media (max-width: 560px) {
  .hall {
    padding-top: 104px;
  }
}

/* ---- the journal before its first reading: one screen, and nothing under the bar that asks about visits. The
        painting already stops where the bar begins (its height is the screen less the bar), so the page adds no room
        of its own for the bar: it would be counted twice, and the page would scroll by that much. ---- */
.jr-empty {
  padding-bottom: 0;
}

/* while the bar shows, the painting gives up a little of the air under the form */
body:has(> .consent) .jr-empty .jr-hero {
  padding-bottom: 16px;
}

/* The first step is the first reading. On a short phone, while the bar lies along the foot of the screen, the form
   that keeps the journal on every device waits for the second step: it comes back as soon as the bar is answered,
   with its label, its line for what happened and everything else it holds as they were. */
@media (max-width: 760px) and (max-height: 720px) {
  body:has(> .consent) .jr-empty .signin {
    display: none;
  }
}

.jr-empty .signin .status:empty {
  min-height: 0;
  margin: 0;
}

@media (min-width: 761px) and (max-height: 800px) {
  .jr-empty .jr-hero {
    padding-top: 88px;
    padding-bottom: 24px;
  }
}

@media (max-width: 760px) {
  .jr-empty .jr-hero {
    padding-top: 104px;
    padding-bottom: 24px;
  }

  .jr-empty .jr-title h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

  .jr-empty .jr-hero .lede {
    margin-top: 0.9rem;
    font-size: 1.1875rem;
  }

  .jr-empty .jr-begin {
    margin-top: 1.1rem;
  }

  .jr-empty .signin {
    margin-top: 0.9rem;
  }
}

/* ---- skip to content: out of sight until the keyboard reaches it ---- */
.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 20;
  padding: 0.6rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--night);
  color: var(--gold-bright);
  translate: 0 -200%;
}

.skip:focus {
  translate: 0 0;
}

main:focus {
  outline: none;
}

/* ---- Pages about a card as a birth card (worker/birthpages.ts): the card pages' layout, and a few pieces of their own ---- */
.birth-page h3 {
  margin: 1.3rem 0 0.25rem;
  font: 400 1.1875rem/1.2 var(--display);
  color: var(--gold-bright);
}
.birth-page h2 + h3,
.birth-sides h3 {
  margin-top: 0.6rem;
}
/* gifts on one side, the shadow on the other */
.birth-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
}
.birth-sides ul {
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
}
.birth-sides li {
  padding: 0.4rem 0;
  border-top: 1px solid var(--line);
  line-height: 1.35;
}
/* the sum written out for one date */
.birth-sum {
  max-width: 25rem;
  font-variant-numeric: lining-nums tabular-nums;
}
.birth-sum caption {
  font: italic 400 1.125rem/1.4 var(--text);
  color: var(--dim);
}
.birth-sum th {
  color: var(--bone);
}
.birth-sum td {
  text-align: end;
  color: var(--gold-bright);
}
.birth-sum-end th {
  color: var(--dim);
}
/* the cards that share a number, and the part each plays */
.birth-stars th {
  width: 34%;
}
.birth-stars td b {
  display: block;
  font-weight: 400;
  color: var(--gold-bright);
  font-variant-numeric: lining-nums;
}
.birth-stars td b span {
  margin-left: 0.4em;
  font-size: 0.92em;
  color: var(--dim);
}
@media (max-width: 560px) {
  .birth-sides {
    grid-template-columns: 1fr;
  }
  .birth-stars th,
  .birth-stars td {
    display: block;
    width: auto;
  }
  .birth-stars th {
    padding-bottom: 0;
  }
  .birth-stars td {
    padding-top: 0.15rem;
    border-top: 0;
  }
}

/* ---- the one-screen book of worker/book.ts: the book of a reading, with an address for each page.
        Everything here is under .bk, the class only that helper writes, so no other page is touched. ---- */

/* a leaf: the words stand on a pane of dark glass, as the pages of the birth card do, and read over any film */
.bk-leaf > .jr-fit {
  max-width: 66rem;
  padding: clamp(1.2rem, 2.4vw, 2.1rem) clamp(1.2rem, 3vw, 2.6rem);
  border: 1px solid rgba(217, 169, 91, 0.32);
  border-radius: 5px;
  background: linear-gradient(160deg, rgba(34, 19, 42, 0.66), rgba(16, 8, 18, 0.6));
  box-shadow:
    inset 0 0 0 5px rgba(23, 13, 25, 0.25),
    inset 0 0 0 6px rgba(217, 169, 91, 0.13),
    0 30px 60px -30px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  text-align: left;
  font-size: 1.125rem;
  line-height: 1.45;
  font-variant-numeric: lining-nums;
}

.bk .bk-title {
  margin: 0;
  font: clamp(1.9rem, 2.9vw, 2.75rem) / 1.08 var(--display);
  color: var(--bone);
  text-wrap: balance;
}

.bk-leaf h3 {
  margin: 0 0 0.25rem;
  font: 1.1875rem/1.2 var(--display);
  color: var(--gold-bright);
}

.bk-leaf p {
  margin-block: 0;
}

.bk-leaf .bk-title + p,
.bk-leaf .bk-except {
  margin-top: 0.8rem;
}

.bk-leaf a {
  color: var(--bone);
}

.bk-mid > .jr-fit {
  text-align: center;
}

/* the way in, at the foot of the cover */
.bk .bk-open {
  margin: 1.6rem 0 0;
}

/* a leaf with the card standing beside its words */
.bk-faced > .jr-fit {
  display: grid;
  grid-template-columns: minmax(0, 15.5rem) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(1.4rem, 3.4vw, 3rem);
}

.bk-faced .bc-face {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
}

.bk-faced .bk-title {
  grid-column: 2;
  grid-row: 2;
}

.bk-faced .bk-body {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
}

.bk-faced .card,
.bk-card .card {
  margin: 0 auto;
  rotate: none;
}

/* ---- the birth card pages (worker/birthpages.ts) ---- */

.bk-cover > .jr-fit {
  max-width: 70rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto auto auto 1fr;
  column-gap: clamp(28px, 6vw, 96px);
  text-align: left;
  animation: stage-arrive 1.3s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.bk-cover .bk-card {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  width: min(22rem, 30vw, 38svh);
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 12deg)) rotateX(calc(var(--ty, 0) * -9deg));
  transition: transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 46px rgba(217, 169, 91, 0.22));
}

.bk-cover .bk-words {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.bk-cover .bk-lede {
  grid-column: 2;
  grid-row: 3;
}

.bk-cover .bk-open {
  grid-column: 2;
  grid-row: 4;
}

.bk-crumbs {
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--gold);
}

/* the painting stays in sight behind the pages, as it does behind the calculator's */
.bk-birth.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.26);
}

.bk-crumbs a {
  color: var(--gold);
}

.bk-cover h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  line-height: 1.04;
  overflow-wrap: break-word;
}

.bk-cover .bc-keys {
  margin-top: 0.9rem;
  font-size: 1.25rem;
  text-shadow: 0 1px 12px rgba(10, 4, 12, 0.9);
}

.bk-cover .bk-lede {
  margin: 0.9rem 0 0;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  text-shadow: 0 1px 14px rgba(10, 4, 12, 0.95);
}

.bk-birth .bc-lead {
  max-width: none;
}

.bk-birth .bk-title + .bc-lead {
  margin-top: 0.8rem;
}

.bk-birth .bc-sum-end em {
  margin-right: 0.5em;
  font: italic 1rem var(--text);
  color: var(--gold);
}

.bk-birth .bk-via {
  color: var(--gold);
}

.bk-birth .bc-note {
  margin: 1.1rem 0 0;
  max-width: none;
  text-align: left;
}

/* the cards that share a number: the number and what it means on one side, the cards on the other */
.bk-number > .jr-fit {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 1.4rem clamp(1.4rem, 3.4vw, 3rem);
  align-items: center;
}

.bk-number .bk-title {
  grid-column: 1 / -1;
  text-align: center;
}

.bk-number .bc-number h3 {
  font-size: 1.6rem;
}

.bk-number .bc-number .bc-eyebrow {
  margin: 0;
}

.bk-number .bc-lead {
  margin-top: 0.4rem;
  font-size: 1.1875rem;
}

.bk-number .bc-traits {
  gap: 1rem;
  padding-left: clamp(1.4rem, 3.4vw, 3rem);
  border-left: 1px solid var(--line);
}

.bk-number .bc-traits .bc-el path {
  fill: none;
}

/* how the number is reached: the rule on one side, a date worked through on the other */
.bk-count > .jr-fit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.1rem clamp(1.4rem, 3.4vw, 3rem);
  align-items: center;
}

.bk-count .bk-title {
  grid-column: 1 / -1;
}

.bk-count .bc-sum {
  padding-left: clamp(1.4rem, 3.4vw, 3rem);
  border-left: 1px solid var(--line);
  font-size: 1.1875rem;
}

.bk-sum .bc-sum {
  margin-top: 1rem;
  text-align: left;
  font-size: 1.25rem;
}

.bk-sum .bc-sum li {
  justify-content: flex-start;
}

.bk-stars .bk-title {
  text-align: center;
}

.bk-stars .bc-stars {
  max-width: 44rem;
  margin: 1.4rem auto 0;
}

/* the cards on either side, with this one between them */
.bk .card-grid {
  --tile: min(11.5rem, 23svh);
  --gap: clamp(0.7rem, 3vw, 2.6rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem var(--gap);
  max-width: calc(var(--tile) * 3 + var(--gap) * 2);
  margin: 1.3rem auto 0;
}

.bk .card-grid a,
.bk .card-grid div {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  text-align: center;
}

.bk .card-grid img {
  border-radius: 4.5% / 2.7%;
}

.bk .card-grid .bk-here img {
  box-shadow:
    0 0 0 1px var(--gold-bright),
    0 0 34px rgba(239, 200, 136, 0.45),
    0 10px 28px rgba(0, 0, 0, 0.5);
}

.bk .card-grid .bk-here b {
  color: var(--gold-bright);
}

/* the ways on: to the calculator, and to a reading of one's own */
.bk .bk-go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  margin-top: 1.4rem;
}

.bk-last > .jr-fit {
  max-width: 42rem;
}

.bk-last .card-go {
  margin: 0;
  padding: clamp(1.1rem, 2.2vw, 1.8rem) clamp(1.1rem, 2.4vw, 2rem);
  border: 1px solid rgba(217, 169, 91, 0.32);
  border-radius: 5px;
  background: linear-gradient(160deg, rgba(34, 19, 42, 0.66), rgba(16, 8, 18, 0.6));
  box-shadow:
    inset 0 0 0 5px rgba(23, 13, 25, 0.25),
    inset 0 0 0 6px rgba(217, 169, 91, 0.13),
    0 30px 60px -30px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.bk-last .card-go h2 {
  margin: 0;
  font: clamp(1.6rem, 2.4vw, 2.1rem) / 1.1 var(--display);
  color: var(--bone);
}

.bk-last .card-go p {
  margin: 0.7rem 0 0;
  font-size: 1.125rem;
  line-height: 1.45;
}

.bk-last .card-go p + p {
  margin-top: auto;
  padding-top: 1rem;
}

.bk-last .card-note {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.9375rem;
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

.bk-last .card-note .about-date {
  margin-left: 0.6em;
  font-style: italic;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .bk-leaf > .jr-fit {
    padding: 0.95rem 0.95rem 1rem;
    font-size: 1rem;
    line-height: 1.38;
  }

  .bk .bk-title {
    font-size: 1.5rem;
  }

  .bk-leaf h3 {
    font-size: 1.0625rem;
  }

  .bk-faced > .jr-fit {
    display: block;
  }

  .bk-faced .bc-face {
    display: none;
  }

  .bk-birth .bc-pair.bk-one {
    grid-template-columns: minmax(0, 1fr);
  }

  .bk-number > .jr-fit {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }

  .bk-number .bk-title {
    text-align: left;
  }

  .bk-number .bc-number h3 {
    font-size: 1.25rem;
  }

  .bk-number .bc-lead {
    font-size: 1rem;
  }

  .bk-number .bc-traits {
    padding: 0.8rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .bk-count > .jr-fit {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }

  .bk-count .bc-sum,
  .bk-sum .bc-sum {
    padding-left: 0;
    border-left: 0;
    font-size: 1rem;
  }

  .bk-stars .bk-title {
    text-align: left;
  }

  .bk-stars .bc-stars {
    margin-top: 0.2rem;
  }

  .bk .bk-go {
    margin-top: 0.9rem;
  }

  .bk-last .card-go h2 {
    font-size: 1.375rem;
  }

  .bk-last .card-go p {
    margin-top: 0.4rem;
    font-size: 1rem;
    line-height: 1.38;
  }

  .bk-last .card-go p + p {
    padding-top: 0.6rem;
    gap: 0.2rem 1rem;
  }

  .bk-last .card-note {
    margin-top: 0.7rem;
  }
}

@media (max-width: 760px) {
  /* the cover on a phone: the card, then its name and its words beneath it */
  .bk-cover > .jr-fit {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    justify-items: center;
    text-align: center;
  }

  .bk-cover .bk-card,
  .bk-cover .bk-words,
  .bk-cover .bk-lede,
  .bk-cover .bk-open {
    grid-column: 1;
    grid-row: auto;
  }

  .bk-cover .bk-card {
    width: min(42vw, 22svh);
  }

  .bk-cover .bk-words {
    margin-top: 0.9rem;
  }

  .bk-cover h1 {
    margin-top: 0.1rem;
    font-size: 2rem;
  }

  .bk-cover .bc-keys {
    margin-top: 0.4rem;
    font-size: 1.0625rem;
  }

  .bk-cover .bk-lede {
    margin-top: 0.5rem;
    font-size: 1.0625rem;
    line-height: 1.42;
  }

  .bk .bk-open {
    margin-top: 0.9rem;
  }
}

/* a short phone: the card stands beside its name, so it can stay large */
@media (max-width: 760px) and (max-height: 700px) {
  .bk-cover > .jr-fit {
    grid-template-columns: 36% minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .bk-cover .bk-card {
    grid-row: 1;
    width: 100%;
  }

  .bk-cover .bk-words {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .bk-cover .bk-lede,
  .bk-cover .bk-open {
    grid-column: 1 / -1;
  }

  .bk-cover .bk-open {
    justify-self: center;
  }

  .bk-cover h1 {
    font-size: 1.625rem;
  }
}

/* with scripts off the book lies open as one long page: every page under the last, and the footer after them */
@media (scripting: none) {
  .bk.jr-book {
    height: auto;
    overflow: visible;
  }

  .bk .jr-pages {
    display: block;
    height: auto;
    overflow: visible;
  }

  .bk .jr-page {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-block: 28px;
  }

  .bk .jr-page:first-child {
    padding-top: 112px;
  }

  .bk .jr-turn {
    display: none;
  }

  .bk .rd-film {
    position: fixed;
  }

  body.screen:has(.bk) .foot {
    display: block;
    position: relative;
  }
}

/* a short phone: less air round a book's page before anything on it has to shrink */
@media (max-width: 560px) and (max-height: 720px) {
  .bk .jr-page {
    padding-top: 94px;
    padding-bottom: 70px;
  }

  .bk-leaf > .jr-fit {
    padding: 0.75rem 0.85rem 0.8rem;
  }

  .bk .bk-title {
    font-size: 1.375rem;
  }
}

/* on a phone the cover's words lie over the painting itself, so the lower half of it is drawn back */
@media (max-width: 760px) {
  .bk-cover {
    background: linear-gradient(to bottom, rgba(18, 9, 20, 0) 34%, rgba(18, 9, 20, 0.5) 58%, rgba(18, 9, 20, 0.62));
  }
}

/* long names and long words stay inside a tile, and a step of the sum may break where it must */
.bk .card-grid a,
.bk .card-grid div {
  grid-template-columns: minmax(0, 1fr);
}

.bk .card-grid b,
.bk .card-grid span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.bk-birth .bk-via {
  flex-wrap: wrap;
  white-space: normal;
}

@media (max-width: 860px) {
  .bk-sum .bc-sum {
    display: block;
    margin-top: 0.6rem;
  }
}

@media (max-width: 560px) and (max-height: 720px) {
  .bk-cover > .jr-fit {
    grid-template-columns: 32% minmax(0, 1fr);
  }

  .bk .bk-open {
    margin-top: 0.7rem;
  }

  .bk-birth .bc-sides {
    margin-top: 0.5rem;
  }

  .bk-birth .bc-lesson,
  .bk-birth .bc-ask {
    margin-top: 0.6rem;
    padding-top: 0.55rem;
  }

  .bk-birth .bc-pair {
    gap: 0.5rem 0.9rem;
    margin-top: 0.55rem;
  }

  .bk-birth .bc-stars {
    gap: 0.55rem 0.8rem;
  }
}

/* a card keeps its place before its picture has come: every scan is given the one shape */
.bk .card-grid img,
.bk-birth .bc-thumbs img,
.bk-birth .bc-split img {
  aspect-ratio: 560 / 939;
  object-fit: cover;
}

@media (max-width: 560px) and (max-height: 720px) {
  .bk-birth .bc-thumbs .card {
    width: 3.1rem;
  }

  .bk-birth .bc-stars li {
    line-height: 1.26;
  }
}

/* the cover's words lie above the shadow its card throws */
.bk-cover .bk-words,
.bk-cover .bk-lede,
.bk-cover .bk-open {
  position: relative;
  z-index: 1;
}

.bk-leaf .bk-title + .bk-how,
.bk-faced .bk-body > .bk-how:first-child,
.bk-faced .bk-body > .bc-lead:first-child {
  margin-top: 0.8rem;
}

.bk-count .bk-title + .bk-how {
  margin-top: 0;
}

.bk-how .bc-lead {
  margin-top: 0;
}

@media (max-width: 860px) {
  /* two cards that share a place are fanned, so their words keep their room */
  .bk-birth .bc-thumbs {
    gap: 0;
  }

  .bk-birth .bc-thumbs .card + .card {
    margin-left: -1.5rem;
    rotate: 5deg;
    translate: 0 3px;
  }

  .bk-leaf .bk-title + .bk-how,
  .bk-count .bk-title + .bk-how {
    margin-top: 0.5rem;
  }
}

/* =====================================================================================================
   ---- TAROT CARD BOOKS: a card's page and the hub of all 78 (cardPage and cardsHub in worker/cards.ts).
        Each is the one-screen book of worker/book.ts over the table the readings are laid on.
        Everything here is under .tc, the class only those two books carry, so no other page is touched. ---- */

/* the table stays in sight: its candles stand at the corners, and the middle is shaded for the words */
.tc .rd-film::after {
  background:
    radial-gradient(78% 68% at 50% 52%, rgba(18, 9, 20, 0.5), rgba(18, 9, 20, 0.08)),
    linear-gradient(to bottom, rgba(18, 9, 20, 0.78), rgba(18, 9, 20, 0) 24%, rgba(18, 9, 20, 0) 78%, rgba(18, 9, 20, 0.6));
}

.tc.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.26);
}

/* the height there is to stand in: the screen, less the bar that asks about counting visits while it is shown */
.tc {
  --svh: calc(100svh - var(--consent-h, 0px));
}

.tc span.card {
  display: block;
}

/* ---- a card's cover: the card standing in candlelight, its name and the ways in ---- */
.tc-cover > .jr-fit {
  max-width: 70rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(28px, 6vw, 96px);
  text-align: left;
  animation: stage-arrive 1.3s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.tc-cover .tc-card {
  position: relative;
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  width: min(23rem, 30vw, calc((var(--svh) - 230px) * 0.596));
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 12deg)) rotateX(calc(var(--ty, 0) * -9deg));
  transition: transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  filter: drop-shadow(0 34px 38px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 54px rgba(239, 180, 100, 0.26));
}

/* the light of the candles gathered behind the card */
.tc-cover .tc-card::before {
  content: "";
  position: absolute;
  inset: -22% -34%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 190, 110, 0.34), rgba(255, 160, 80, 0.1) 58%, rgba(255, 160, 80, 0) 78%);
  animation: tc-breathe 4.6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes tc-breathe {
  from {
    opacity: 0.62;
    scale: 0.97;
  }

  to {
    opacity: 1;
    scale: 1.03;
  }
}

.tc-card .card,
.tc-face .card {
  position: relative;
  margin: 0 auto;
  rotate: none;
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.42),
    0 1px 1px rgba(0, 0, 0, 0.5);
}

.tc-card .card {
  animation: rd-float 7s ease-in-out infinite;
}

/* a slow glint that crosses the face of the card */
.tc-card .card::after,
.tc-face .card::after {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, rgba(255, 240, 210, 0) 42%, rgba(255, 240, 210, 0.28) 50%, rgba(255, 240, 210, 0) 58%);
  translate: -70% 0;
  animation: rd-glint 6.5s 1.4s ease-in-out infinite;
  pointer-events: none;
}

.tc-cover .tc-words {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.tc-cover .bk-open {
  grid-column: 2;
  grid-row: 3;
}

.tc-crumbs {
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--gold);
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.9);
}

.tc-crumbs a {
  color: var(--gold);
}

.tc-cover h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  line-height: 1.04;
  overflow-wrap: break-word;
}

.tc-keys {
  margin: 0.9rem 0 0;
  font: italic 400 clamp(1.25rem, 1.7vw, 1.5rem) / 1.3 var(--display);
  color: var(--gold-bright);
  text-shadow: 0 1px 12px rgba(10, 4, 12, 0.9);
  text-wrap: balance;
}

/* a keyword keeps its dot, and is not broken while it fits on a line */
.tc-keys span {
  display: inline-block;
  max-width: 100%;
}

/* the six things most often asked of a card, each a way straight to its page */
.tc-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  margin-top: 1.4rem;
}

.tc-jump a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 1rem;
  border: 1px solid rgba(217, 169, 91, 0.42);
  border-radius: 999px;
  background: rgba(23, 13, 25, 0.52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--bone);
  font-size: 1.0625rem;
  line-height: 1.1;
  text-decoration: none;
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

@media (hover: hover) {
  .tc-jump a:hover {
    background-color: rgba(217, 169, 91, 0.2);
    border-color: var(--gold-bright);
  }
}

/* ---- a page of a card's book: the card stands at the edge of the pane, its words beside it ---- */
.tc-faced > .jr-fit {
  --face: min(19rem, calc(var(--svh) * 0.34));
  --hang: clamp(2.6rem, 5.4vw, 5rem);
  max-width: 62rem;
  display: grid;
  grid-template-columns: calc(var(--face) - var(--hang)) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(1.6rem, 3.6vw, 3.2rem);
  padding: clamp(1.4rem, 2.6vw, 2.3rem) clamp(1.4rem, 3.2vw, 2.9rem);
}

.tc-faced .tc-face {
  grid-column: 1;
  grid-row: 1 / -1;
  width: var(--face);
  align-self: center;
  margin-left: calc(-1 * var(--hang));
  rotate: -2.5deg;
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 14deg)) rotateX(calc(var(--ty, 0) * -10deg));
  transition:
    transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.9s;
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 40px rgba(239, 180, 100, 0.2));
}

.tc-reversed .tc-face {
  rotate: 2.5deg;
}

.js .tc-faced:not(.in) .tc-face {
  opacity: 0;
  transform: perspective(1100px) rotateY(-80deg) translateY(24px) scale(0.94);
}

.tc-faced .bk-title {
  grid-column: 2;
  grid-row: 2;
}

.tc-faced .tc-body {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
  margin-top: 0.9rem;
}

.tc-body p {
  font-size: 1.1875rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.tc-body p + p {
  margin-top: 0.9rem;
}

/* the answer of a card: a yes, a no or a maybe, struck like a seal */
.tc-body .tc-answer {
  margin: 0 0 0.9rem;
  line-height: 1;
}

.tc-answer b {
  display: inline-block;
  padding: 0.16em 1.1em 0.22em;
  border: 1px solid rgba(239, 200, 136, 0.62);
  border-radius: 999px;
  background: radial-gradient(120% 160% at 50% 0%, rgba(239, 200, 136, 0.22), rgba(23, 13, 25, 0.5));
  box-shadow:
    inset 0 0 0 4px rgba(23, 13, 25, 0.5),
    inset 0 0 0 5px rgba(239, 200, 136, 0.2),
    0 0 34px rgba(239, 200, 136, 0.22);
  font: 400 clamp(1.6rem, 2.5vw, 2.2rem) / 1.2 var(--display);
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.tc-answer.tc-no b {
  border-color: rgba(226, 150, 130, 0.6);
  color: #eab09d;
}

.tc-answer.tc-maybe b {
  color: var(--bone);
}

.tc-body .card-ask {
  margin-top: 1.2rem;
  font-family: var(--display);
  font-size: 1.3125rem;
  line-height: 1.3;
}

.tc-body .card-alt {
  color: var(--bone);
}

/* at a glance: the seal of the card's suit, and what is known of it in a few lines */
.tc-glance > .jr-fit {
  max-width: 52rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.3rem clamp(1.4rem, 3.4vw, 3rem);
  align-items: center;
}

.tc-glance .bk-title {
  grid-column: 1 / -1;
  text-align: center;
}

/* the card itself is laid on this page only where a tall phone has the room for it */
.tc-glance .tc-face {
  display: none;
}

.tc-seal {
  display: block;
  width: clamp(8rem, 17vw, 13rem);
  height: auto;
  border-radius: 50%;
  /* the seal is painted on black: only the gold disc is kept */
  -webkit-mask-image: radial-gradient(closest-side, #000 92.5%, rgba(0, 0, 0, 0) 95%);
  mask-image: radial-gradient(closest-side, #000 92.5%, rgba(0, 0, 0, 0) 95%);
}

/* the seal of the Major Arcana hangs from a loop, and its disc is smaller and lower: it is cut and sized to match */
.tc img[src$="suit-major.webp"] {
  -webkit-mask-image: radial-gradient(ellipse 41.2% 41.2% at 50% 54.2%, #000 97%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(ellipse 41.2% 41.2% at 50% 54.2%, #000 97%, rgba(0, 0, 0, 0) 100%);
  transform-origin: 50% 54.2%;
  scale: 1.13;
  translate: 0 -4.2%;
}

.tc-facts {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.1875rem;
  line-height: 1.4;
}

.tc-facts th {
  width: 1%;
  padding: 0.6rem 1.4rem 0.6rem 0;
  white-space: nowrap;
  text-align: left;
  vertical-align: top;
  font: italic 400 1.0625rem / 1.55 var(--text);
  color: var(--gold);
}

.tc-facts td {
  padding: 0.6rem 0;
}

.tc-facts tr + tr {
  border-top: 1px solid var(--line);
}

/* the cards on either side, with this one between them */
.tc-near > .jr-fit {
  max-width: 50rem;
  text-align: center;
}

.tc-tiles {
  --tile: min(11rem, calc(calc(var(--svh) * 0.33) - 7.4rem));
  --gap: clamp(0.7rem, 3vw, 2.6rem);
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem var(--gap);
  max-width: calc(var(--tile) * 3 + var(--gap) * 2);
  margin: 1.3rem auto 0;
}

.tc-tiles a,
.tc-tiles div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  color: var(--bone);
  text-decoration: none;
}

.tc-tiles .rd-face {
  width: 100%;
  transition:
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.4s;
}

.tc-tiles b {
  max-width: 100%;
  margin-top: 0.7rem;
  font: 400 1.125rem/1.2 var(--display);
  overflow-wrap: anywhere;
}

.tc-tiles li > * > span:last-child {
  max-width: 100%;
  margin-top: 0.15rem;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--gold);
  overflow-wrap: anywhere;
}

.tc-tiles .tc-here .card {
  box-shadow:
    0 0 0 1px var(--gold-bright),
    0 0 34px rgba(239, 200, 136, 0.45),
    0 10px 28px rgba(0, 0, 0, 0.5);
}

.tc-tiles .tc-here b {
  color: var(--gold-bright);
}

/* the ways on that the foot of a scrolling page would hold */
.tc .tc-ways {
  margin-top: 1rem;
  justify-content: center;
  gap: 0 1.5rem;
  font-size: 1.0625rem;
}

.tc-ways a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--bone);
}

/* the scans of the deck differ by a hair in height: on a table they are cut alike */
.tc-spread .card img,
.tc-tiles .card img,
.tc-fan .card img {
  aspect-ratio: 220 / 369;
  object-fit: cover;
}

/* ---- the last page: the way to a reading of one's own, and the ways on ---- */
.tc-last > .jr-fit {
  max-width: 54rem;
}

/* the deck waits face down beside the invitation to draw from it */
.tc-ask {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.6rem, 4vw, 3.2rem);
}

.tc-pile {
  position: relative;
  width: min(10.5rem, calc(var(--svh) * 0.22));
  aspect-ratio: 560 / 939;
  filter: drop-shadow(0 26px 26px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 40px rgba(239, 180, 100, 0.16));
}

.tc-pile .card {
  position: absolute;
  inset: 0;
  rotate: -7deg;
  translate: -7% 2%;
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.35),
    0 2px 3px rgba(0, 0, 0, 0.6);
}

.tc-pile .card + .card {
  rotate: 5deg;
  translate: 5% -1%;
}

.tc-pile .card + .card + .card {
  rotate: -1.5deg;
  translate: 0 -3%;
}

.tc-pile img {
  height: 100%;
  object-fit: cover;
}

.tc-last .card-go {
  margin: 0;
  padding: clamp(1.1rem, 2.2vw, 1.8rem) clamp(1.1rem, 2.4vw, 2rem);
  border: 1px solid rgba(217, 169, 91, 0.32);
  border-radius: 5px;
  background: linear-gradient(160deg, rgba(34, 19, 42, 0.7), rgba(16, 8, 18, 0.64));
  box-shadow:
    inset 0 0 0 5px rgba(23, 13, 25, 0.25),
    inset 0 0 0 6px rgba(217, 169, 91, 0.13),
    0 30px 60px -30px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  text-align: left;
}

.tc-last .card-go h2 {
  margin: 0;
  font: clamp(1.6rem, 2.4vw, 2.1rem) / 1.1 var(--display);
  color: var(--bone);
}

.tc-last .card-go p {
  margin: 0.7rem 0 0;
  font-size: 1.125rem;
  line-height: 1.45;
}

.tc-last .card-go p + p {
  margin-top: 1rem;
}

.tc-last .tc-tools {
  margin-top: 1.1rem;
  justify-content: center;
  gap: 0 1.5rem;
  font-size: 1.0625rem;
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

.tc-tools a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.tc-last .card-note {
  margin: 0.7rem 0 0;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--bone);
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
  text-wrap: balance;
}

.tc-last .card-note .about-date {
  margin-left: 0.5em;
  font-style: italic;
  white-space: nowrap;
}

.tc-foot {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 0.1rem 0 0;
  font-size: 0.9375rem;
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

.tc-foot a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--dim);
}

/* ---- the hub: a fan of cards on its cover, the deck at a glance, then the cards a row at a time ---- */
.tc-fan {
  --w: min(8.4rem, calc(var(--svh) * 0.13));
  display: flex;
  justify-content: center;
  margin: 0 0 clamp(1rem, 3.4vh, 2.2rem);
}

.tc-fan .card {
  flex: 0 0 var(--w);
  margin: 0 calc(var(--w) * -0.17);
  transform-origin: 50% 165%;
  rotate: calc(var(--n) * 9deg);
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.4),
    0 18px 30px -6px rgba(0, 0, 0, 0.85),
    0 0 50px rgba(239, 180, 100, 0.16);
  animation: tc-fan 1.5s calc(0.3s + (var(--n) + 2) * 0.09s) cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

@keyframes tc-fan {
  from {
    opacity: 0;
    rotate: 0deg;
    translate: 0 30px;
  }
}

.tc-deck > .jr-fit {
  max-width: 54rem;
  text-align: center;
}

.tc-deck p {
  font-size: 1.1875rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.tc-seals {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2.4vw, 2rem);
}

.tc-seals li {
  flex: 0 1 min(8rem, calc(var(--svh) * 0.15));
  min-width: 0;
}

.tc-seals a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 0.55rem;
  color: var(--bone);
  text-decoration: none;
}

.tc-seals img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(closest-side, #000 92.5%, rgba(0, 0, 0, 0) 95%);
  mask-image: radial-gradient(closest-side, #000 92.5%, rgba(0, 0, 0, 0) 95%);
  transition:
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.4s;
}

.tc-seals li,
.tc-head .tc-seal {
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.6));
}

.tc-seals b {
  max-width: 100%;
  font: 400 1.125rem/1.15 var(--display);
  overflow-wrap: anywhere;
}

.tc-table > .jr-fit {
  max-width: 86rem;
}

.tc-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: left;
}

.tc-head .tc-seal {
  width: clamp(3.6rem, 6vw, 5.2rem);
  flex: none;
}

.tc-head h2 {
  margin: 0;
  font: 400 clamp(1.9rem, 3.2vw, 3rem) / 1.05 var(--display);
  color: var(--bone);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.75);
}

.tc-head p {
  margin: 0.2rem 0 0;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--gold);
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

.tc-spread {
  --g: clamp(10px, 1.6vw, 24px);
  list-style: none;
  padding: 0;
  margin: clamp(18px, 4.4vh, 44px) 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px var(--g);
}

.tc-spread li {
  flex: 0 0 min(11.5rem, calc((var(--svh) - 410px) * 0.596), calc((100% - (var(--cols) - 1) * var(--g)) / var(--cols)));
  min-width: 0;
  transition:
    opacity 0.7s,
    translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    rotate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(0.2s + var(--i) * 0.09s);
}

/* dealt one after another when the page is reached */
.js .tc-table:not(.in) .tc-spread li {
  opacity: 0;
  translate: 0 46px;
  rotate: 7deg;
}

.tc-spread a {
  display: block;
  color: var(--bone);
  text-align: center;
  text-decoration: none;
}

.tc-spread .rd-face {
  transition:
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.4s;
}

.tc-spread .card {
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.3),
    0 18px 30px -8px rgba(0, 0, 0, 0.85),
    0 0 44px rgba(239, 180, 100, 0.1);
}

.tc-spread b,
.tc-spread a > span:last-child {
  display: block;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

.tc-spread b {
  margin-top: 0.75rem;
  font: 400 1.125rem/1.2 var(--display);
}

.tc-spread a > span:last-child {
  margin-top: 0.2rem;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--gold);
}

@media (hover: hover) {
  .tc-spread a:hover .rd-face,
  .tc-tiles a:hover .rd-face {
    translate: 0 -10px;
    filter: drop-shadow(0 0 26px rgba(217, 169, 91, 0.45));
  }

  .tc-seals a:hover img {
    filter: brightness(1.2);
  }
}

.tc-spread a:focus-visible .rd-face,
.tc-tiles a:focus-visible .rd-face {
  translate: 0 -10px;
  filter: drop-shadow(0 0 26px rgba(217, 169, 91, 0.45));
}

/* ---- narrower screens: the row of a table becomes two rows of four ---- */
@media (max-width: 900px) {
  .tc-spread {
    --g: 10px;
    gap: 12px var(--g);
  }

  /* each card has the whole width of its column for its name, and is itself as large as the height allows */
  .tc-spread li {
    flex-basis: min(9rem, calc((100% - (var(--mcols) - 1) * var(--g)) / var(--mcols)));
  }

  .tc-spread .rd-face {
    width: min(100%, calc((var(--svh) - 372px) * 0.298));
    margin: 0 auto;
  }

  /* a name is broken between its words, or where its language allows a hyphen, never at any letter */
  .tc-spread b {
    margin-top: 0.4rem;
    font-size: 0.875rem;
    line-height: 1.15;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  .tc-spread a > span:last-child {
    display: none;
  }
}

@media (max-width: 860px) {
  .tc-body p,
  .tc-deck p,
  .tc-facts {
    font-size: 1rem;
    line-height: 1.38;
  }

  .tc-facts th {
    padding: 0.42rem 0.9rem 0.42rem 0;
    font-size: 0.9375rem;
    line-height: 1.47;
  }

  .tc-facts td {
    padding: 0.42rem 0;
  }

  .tc-body .card-ask {
    margin-top: 0.8rem;
    font-size: 1.125rem;
  }

  .tc-last .card-go h2 {
    font-size: 1.375rem;
  }

  .tc-last .card-go p {
    margin-top: 0.4rem;
    font-size: 1rem;
    line-height: 1.38;
  }

  .tc-last .card-go p + p {
    margin-top: 0.6rem;
    gap: 0.2rem 1rem;
  }
}

@media (max-width: 760px) {
  /* a phone: the card, then its name and the ways in beneath it */
  .tc-cover {
    background: linear-gradient(to bottom, rgba(18, 9, 20, 0) 34%, rgba(18, 9, 20, 0.36) 58%, rgba(18, 9, 20, 0.3));
  }

  .tc .rd-film::after {
    background:
      radial-gradient(90% 60% at 50% 50%, rgba(18, 9, 20, 0.42), rgba(18, 9, 20, 0.05)),
      linear-gradient(to bottom, rgba(18, 9, 20, 0.62), rgba(18, 9, 20, 0) 22%, rgba(18, 9, 20, 0) 84%, rgba(18, 9, 20, 0.35));
  }

  .tc-cover > .jr-fit {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    justify-items: center;
    text-align: center;
  }

  .tc-cover .tc-card,
  .tc-cover .tc-words,
  .tc-cover .bk-open {
    grid-column: 1;
    grid-row: auto;
  }

  .tc-cover .tc-card {
    width: min(46vw, calc((var(--svh) - 604px) * 0.596));
  }

  .tc-cover .tc-words {
    margin-top: 1rem;
  }

  .tc-cover h1 {
    margin-top: 0.1rem;
    font-size: 2rem;
  }

  .tc-keys {
    margin-top: 0.45rem;
    font-size: 1.125rem;
  }

  .tc-jump {
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
  }

  .tc-jump a {
    min-height: 40px;
    padding: 0 0.8rem;
    font-size: 1rem;
  }

  .tc .bk-open {
    margin-top: 0.9rem;
  }

  /* a page: the card small beside its question, the answer beneath them both */
  .tc-faced > .jr-fit {
    grid-template-columns: 3.4rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.85rem;
    padding: 0.95rem 0.95rem 1rem;
  }

  .tc-faced .tc-face {
    grid-row: 1;
    width: auto;
    margin: 0;
    rotate: -3deg;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 18px rgba(239, 180, 100, 0.22));
  }

  .tc-reversed .tc-face {
    rotate: 3deg;
  }

  .tc-faced .bk-title {
    grid-row: 1;
    align-self: center;
  }

  .tc-faced .tc-body {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0.75rem;
  }

  .tc-body p + p {
    margin-top: 0.6rem;
  }

  .tc-body .tc-answer {
    margin-bottom: 0.6rem;
  }

  .tc-answer b {
    font-size: 1.5rem;
  }

  /* at a glance: the seal beside the title, the lines beneath them both */
  .tc-glance > .jr-fit {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.6rem 0.85rem;
  }

  .tc-glance .bk-title {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }

  .tc-glance .tc-seal {
    grid-column: 1;
    grid-row: 1;
    width: 3.6rem;
  }

  .tc-glance .tc-facts {
    grid-column: 1 / -1;
  }

  .tc-tiles {
    margin-top: 0.9rem;
  }

  .tc-tiles b {
    margin-top: 0.5rem;
    font-size: 1rem;
  }

  /* three cards abreast leave no room for their keywords: each card's own page opens with them */
  .tc-tiles li > * > span:last-child {
    display: none;
  }

  .tc-ask {
    display: block;
  }

  .tc-pile {
    display: none;
  }

  .tc-last .tc-tools {
    margin-top: 0.7rem;
    gap: 0 1.1rem;
    font-size: 1rem;
  }

  .tc-last .card-note {
    margin-top: 0.4rem;
    font-size: 0.875rem;
  }

  .tc-foot {
    font-size: 0.875rem;
  }

  .tc-fan {
    --w: min(4rem, calc(var(--svh) * 0.12));
  }

  .tc .tc-ways {
    margin-top: 0.5rem;
    gap: 0 1.1rem;
    font-size: 1rem;
  }

  .tc-ways a {
    min-height: 36px;
  }

  .tc-hub h1 {
    font-size: 2.3rem;
  }

  .tc-hub .opening {
    margin-top: 0.8rem;
    font-size: 1.0625rem;
    line-height: 1.45;
  }

  .tc-seals {
    gap: 0.5rem;
    margin-top: 1rem;
  }

  /* a name is never broken inside a word: it may reach a little past its seal instead */
  .tc-seals b {
    max-width: none;
    font-size: 0.875rem;
    overflow-wrap: normal;
  }

  .tc-head {
    gap: 0.7rem;
  }

  .tc-head .tc-seal {
    width: 3rem;
  }

  .tc-head h2 {
    font-size: 1.625rem;
  }

  .tc-head p {
    font-size: 0.9375rem;
  }
}

/* a phone: each fact's name stands above it, so a long name in Russian or German takes no width from the fact */
@media (max-width: 560px) {
  .tc-facts,
  .tc-facts tbody,
  .tc-facts tr,
  .tc-facts th,
  .tc-facts td {
    display: block;
    width: auto;
  }

  .tc-facts tr {
    padding: 0.36rem 0;
  }

  .tc-facts th {
    padding: 0;
    white-space: normal;
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .tc-facts td {
    padding: 0;
    overflow-wrap: anywhere;
  }

  /* the short facts stand two abreast: the yes or no beside the element (or beside the number of a Major card),
     the suit beneath them, so the page has a line to spare above the bar that asks about counting visits */
  .tc-facts tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 1.2rem;
  }

  .tc-facts tr {
    grid-column: 1 / -1;
  }

  .tc-facts tr:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }

  .tc-facts tr:nth-child(4):last-child,
  .tc-facts tr:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
  }

  .tc-facts tr:nth-child(4):not(:last-child) {
    grid-row: 4;
  }
}

/* a tall phone has room to spare on every page: the pane takes the height of the screen, and the card at its head
   takes all of it that the words leave, so a short answer stands under a large card and a long one under a smaller */
@media (max-width: 760px) and (min-height: 741px) {
  .tc-faced > .jr-fit,
  .tc-glance > .jr-fit {
    min-height: 100%;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(7rem, 1fr) auto auto;
    justify-items: center;
    padding-top: 1.1rem;
  }

  /* the room is measured, not filled: the card asks for no height of its own (container-type: size), and stands
     on the question beneath it */
  .tc-faced .tc-face,
  .tc-glance .tc-face {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    min-height: 0;
    align-self: stretch;
    container-type: size;
    margin: 0 0 0.8rem;
    rotate: -2deg;
    filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 30px rgba(239, 180, 100, 0.24));
  }

  .tc-faced .tc-face .card,
  .tc-glance .tc-face .card {
    flex: none;
    width: min(100cqw, 100cqh * 0.5964, 17rem);
    margin: 0;
  }

  /* at a glance: the card above, the seal of its suit beside the title, the facts beneath */
  .tc-glance > .jr-fit {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
  }

  .tc-glance .tc-seal,
  .tc-glance .bk-title {
    grid-row: 2;
  }

  .tc-glance .tc-facts {
    grid-row: 3;
  }

  .tc-reversed .tc-face {
    rotate: 2deg;
  }

  .tc-faced .bk-title {
    grid-column: 1;
    grid-row: 2;
    text-align: center;
  }

  .tc-faced .tc-body {
    grid-row: 3;
    justify-self: stretch;
  }

  /* the last page: the deck waits face down above the invitation to draw from it */
  .tc-ask {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0;
  }

  /* only as large as the room there is: with the bar that asks about counting visits, none, and the deck is not laid */
  .tc-pile {
    display: block;
    width: clamp(0px, calc(var(--svh) - 760px), 7rem);
    margin-bottom: clamp(0px, calc((var(--svh) - 760px) * 0.3), 1.4rem);
  }
}

/* a short phone: the card stands beside its name, so it can stay large */
@media (max-width: 760px) and (max-height: 700px) {
  .tc-cover > .jr-fit {
    grid-template-columns: 34% minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .tc-cover .tc-card {
    grid-row: 1;
    width: 100%;
  }

  .tc-cover .tc-words {
    display: contents;
  }

  .tc-cover .tc-crumbs {
    display: none;
  }

  .tc-cover h1 {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 1.625rem;
  }

  .tc-cover .tc-keys {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .tc-cover .tc-card {
    grid-row: 1 / 3;
  }

  .tc-cover .tc-jump,
  .tc-cover .bk-open {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .tc-faced > .jr-fit {
    grid-template-columns: 3rem minmax(0, 1fr);
    padding: 0.75rem 0.85rem 0.8rem;
  }

  .tc-faced .tc-body {
    margin-top: 0.6rem;
  }

  .tc-tiles {
    max-width: 17rem;
    margin-top: 0.6rem;
  }

  .tc .tc-ways {
    margin-top: 0.35rem;
  }

  .tc-ways a,
  .tc-tools a,
  .tc-foot a {
    min-height: 31px;
  }

  .tc-seals {
    margin-top: 0.7rem;
  }

  .tc-seals a {
    gap: 0.35rem;
  }

  .tc-deck p {
    font-size: 0.9375rem;
    line-height: 1.36;
  }

  /* a fact's name is set a size larger: with the bar about counting visits the page may be drawn a little smaller */
  .tc-facts th {
    font-size: 0.9375rem;
  }

  .tc-last .card-go {
    padding: 0.7rem 0.85rem 0.8rem;
  }

  .tc-last .card-go h2 {
    font-size: 1.3125rem;
  }

  .tc-last .card-go p {
    margin-top: 0.3rem;
    font-size: 0.9375rem;
    line-height: 1.34;
  }

  .tc-last .card-go p + p {
    margin-top: 0.5rem;
  }

  .tc-last .card-go .button {
    min-height: 44px;
    padding-block: 0.45em;
    font-size: 1.0625rem;
  }

  .tc-last .tc-tools {
    margin-top: 0.45rem;
  }

  /* the small print is set a size larger here: with the bar that asks about counting visits this page may be drawn
     a little smaller, and the note must still read at 13 pixels or more */
  .tc-last .card-note {
    margin-top: 0.2rem;
    font-size: 0.9375rem;
    line-height: 1.32;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-cover > .jr-fit,
  .tc-cover .tc-card::before,
  .tc-card .card,
  .tc-card .card::after,
  .tc-face .card::after,
  .tc-fan .card {
    animation: none;
  }
}

.bk .card-grid span {
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* =====================================================================================================
   WORDS-BEGIN. Pages of words on one screen (worker/pages.ts): About, Privacy and Terms as books of the
   shared one-screen book (.bk-doc); the short messages (.msg); and the plans page on a phone (.up-tabs).
   Nothing here touches another page: every rule is under one of those classes.
   ===================================================================================================== */

/* ---- a book of words: its text can be selected, and its cover is a title page over the painting ---- */
.bk-doc .jr-fit {
  -webkit-user-select: text;
  user-select: text;
}

.bk-doc .rd-cover .jr-fit {
  max-width: 46rem;
}

.bk-doc .rd-cover .when {
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

.bk-doc .rd-cover .opening {
  text-wrap: pretty;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.85);
}

/* the painted book stays in sight behind the pages about Lume; the policies stand on a darker, calmer scene */
.bk-about.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.52);
}

.bk-legal.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.8);
}

.bk-doc .bk-leaf > .jr-fit {
  line-height: 1.5;
}

.bk-doc .bk-leaf a:not(.button) {
  text-decoration-color: var(--gold);
  text-underline-offset: 0.22em;
}

/* ---- About: the facts, laid out as small plates rather than rows ---- */
.ab-glance > .jr-fit {
  max-width: 54rem;
}

.bk-about .about-facts {
  display: block;
  width: auto;
  margin: 0.9rem 0 0;
}

.bk-about .about-facts tbody {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.2rem, 2.6vw, 2.4rem);
}

.bk-about .about-facts tr {
  display: block;
  padding: 0.7rem 0 0.8rem;
  border-top: 1px solid rgba(217, 169, 91, 0.26);
}

.bk-about .about-facts tr:last-child {
  grid-column: span 2;
}

.bk-about .about-facts th,
.bk-about .about-facts td {
  display: block;
  padding: 0;
  border: 0;
}

.bk-about .about-facts th {
  font: italic 400 1rem/1.3 var(--text);
  color: var(--gold);
}

.bk-about .about-facts td {
  margin-top: 0.1rem;
  font: 400 1.3125rem/1.25 var(--display);
  color: var(--bone);
  text-wrap: balance;
}

.bk-about .about-facts tr:last-child td {
  font: 400 1.125rem/1.4 var(--text);
  text-wrap: pretty;
}

/* ---- About: a question to a page; on a wide screen three of them lie side by side on one leaf ---- */
.ab-ask > .jr-fit {
  max-width: 40rem;
}

.bk-about .ab-ask .bk-title {
  font-size: clamp(1.5rem, 2.1vw, 1.875rem);
  line-height: 1.12;
  color: var(--gold-bright);
}

.ab-ask p {
  text-wrap: pretty;
}

.ab-last > .jr-fit {
  max-width: 40rem;
}

.ab-last .about-go {
  margin-top: 1.5rem;
}

.ab-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.3rem;
  margin-top: 1.1rem;
  font-size: 1rem;
}

.ab-more a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
  color: var(--dim);
}

/* ---- Privacy and Terms: the contents, and a clause to a page ---- */
.lg-contents > .jr-fit {
  max-width: 36rem;
}

.lg-toc {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  counter-reset: clause;
}

.lg-toc li {
  counter-increment: clause;
  border-top: 1px solid rgba(217, 169, 91, 0.26);
}

.lg-toc li:last-child {
  border-bottom: 1px solid rgba(217, 169, 91, 0.26);
}

.bk-doc .lg-toc a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  min-height: 48px;
  padding: 0.62rem 0.3rem 0.58rem;
  font: 400 1.3125rem/1.2 var(--display);
  color: var(--bone);
  text-decoration: none;
  transition: color 0.25s, background-color 0.25s;
}

.lg-toc a::before {
  content: counter(clause, upper-roman);
  flex: 0 0 2rem;
  font: italic 400 1rem/1 var(--text);
  color: var(--gold);
}

.lg-toc a::after {
  content: "›";
  margin-left: auto;
  color: var(--gold);
}

@media (hover: hover) {
  .bk-doc .lg-toc a:hover {
    color: var(--gold-bright);
    background-color: rgba(217, 169, 91, 0.07);
  }
}

.lg-leaf > .jr-fit {
  max-width: 40rem;
}

.lg-up {
  margin-bottom: 0.3rem;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--dim);
}

.bk-doc .lg-up a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--gold);
}

.lg-up span::before {
  content: "· ";
}

.bk-legal .lg-leaf .bk-title {
  margin-bottom: 0.6rem;
  font-size: clamp(1.625rem, 2.4vw, 2.125rem);
}

.lg-leaf p + p {
  margin-top: 0.75em;
}

.lg-leaf .linkish {
  font: inherit;
  color: var(--gold-bright);
}

/* a wide screen: three questions lie together on one leaf (journal.js) */
@media (min-width: 900px) and (min-height: 600px) {
  .ab-ask > .jr-fit {
    max-width: 72rem;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: auto 1fr;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0.8rem clamp(1.8rem, 3.4vw, 3.2rem);
    padding: clamp(1.6rem, 2.6vw, 2.4rem) clamp(1.8rem, 3.4vw, 3rem);
  }

  .ab-ask .bk-part {
    display: contents;
  }

  .bk-about .ab-ask .bk-title + p {
    margin-top: 0;
  }

  .bk-about .ab-ask .bk-title {
    align-self: end;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(217, 169, 91, 0.3);
  }
}

@media (max-width: 760px) {
  .bk-about .about-facts tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
  }

  .bk-about .about-facts tr {
    padding: 0.42rem 0 0.48rem;
  }

  .bk-about .about-facts tr:last-child {
    grid-column: 1 / -1;
  }

  .bk-about .about-facts th {
    font-size: 0.9375rem;
  }

  .bk-about .about-facts td {
    font-size: 1.125rem;
    line-height: 1.2;
  }

  .bk-about .about-facts tr:last-child td {
    font-size: 1.0625rem;
    line-height: 1.35;
  }

  .bk-doc .lg-toc a {
    font-size: 1.1875rem;
  }
}

/* a short screen: the words end above the two studs that turn the page */
@media (max-height: 720px) {
  .bk-doc .jr-page {
    padding-bottom: 80px;
  }
}

@media (min-width: 900px) and (max-height: 720px) {
  .bk-doc .jr-page {
    padding-bottom: 90px;
  }
}

/* a short phone: every line of the page's own room goes to the words */
@media (max-width: 560px) and (max-height: 720px) {
  .bk-doc .jr-page {
    padding-top: 92px;
  }

  .bk-doc .bk-leaf > .jr-fit {
    line-height: 1.42;
  }

  .bk-doc .lg-toc a {
    min-height: 44px;
    padding-block: 0.5rem;
  }

  .bk-legal .lg-leaf .bk-title {
    margin-bottom: 0.4rem;
    font-size: 1.5rem;
  }

  .ab-last .about-go {
    margin-top: 1rem;
  }

  .bk-about .about-facts {
    margin-top: 0.5rem;
  }

  .bk-about .about-facts tr {
    padding: 0.26rem 0 0.32rem;
  }

  .bk-about .about-facts th {
    font-size: 0.875rem;
    line-height: 1.2;
  }

  .bk-about .about-facts td,
  .bk-about .about-facts tr:last-child td {
    font-size: 1.0625rem;
    line-height: 1.22;
  }
}

/* on paper the book lies open from its first page to its last, in ink, with nothing of the screen about it */
@media print {
  body:has(.bk-doc) {
    background: #fff;
    color: #000;
  }

  body:has(.bk-doc) .top,
  body:has(.bk-doc) .foot,
  body:has(.bk-doc) .consent,
  body:has(.bk-doc) .skip,
  .bk-doc .rd-film,
  .bk-doc .jr-turn,
  .bk-doc .bk-open,
  .bk-doc .lg-up,
  .bk-doc .about-go,
  .bk-doc .ab-more {
    display: none !important;
  }

  .bk-doc.jr-book,
  .bk-doc .jr-pages {
    display: block;
    height: auto;
    overflow: visible;
  }

  .bk-doc .jr-page,
  .js .bk-doc .jr-page.reveal {
    display: block;
    height: auto;
    overflow: visible;
    padding: 0 0 1.1rem;
    opacity: 1;
    translate: none;
    background: none;
  }

  .bk-doc .jr-page > .jr-fit {
    zoom: 1 !important;
    display: block;
    max-width: none;
    padding: 0;
    columns: auto;
    border: 0;
    background: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    text-align: left;
    animation: none;
  }

  .bk-doc .bk-part {
    display: block;
    break-before: auto !important;
  }

  .bk-doc *,
  .bk-doc .lg-toc a::before,
  .bk-doc .lg-toc a::after {
    color: #000 !important;
    text-shadow: none !important;
  }

  .bk-doc h1 {
    font-size: 2.2rem;
    margin: 0 0 0.4rem;
  }

  .bk-doc .bk-title,
  .bk-about .ab-ask .bk-title {
    margin: 0.6rem 0 0.3rem;
    padding: 0;
    border: 0;
    font-size: 1.35rem;
    break-after: avoid;
  }

  .bk-doc .jr-page:not(#cover) {
    break-inside: avoid;
  }
}

/* ---- the short messages: the words centred over a painting, on one screen ---- */
.msg {
  position: relative;
  height: calc(100svh - var(--consent-h, 0px));
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 104px var(--edge) 110px;
}

.msg-words {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  text-align: center;
  animation: stage-arrive 1.2s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* a pool of shade under the words, so they hold against the candles */
.msg-words::before {
  content: "";
  position: absolute;
  inset: -22% -30%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(18, 9, 20, 0.72), rgba(18, 9, 20, 0));
  pointer-events: none;
}

.msg h1 {
  margin: 0;
  font: 400 clamp(2.5rem, 6vw, 4.75rem) / 1.03 var(--display);
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.75);
}

.msg h1::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 1px;
  margin: 1.3rem auto 0;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.msg-words > p {
  margin: 1.2rem auto 0;
  max-width: 34rem;
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  text-wrap: pretty;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
}

.msg-words > p:has(.button),
.msg-words > form {
  margin-top: 1.9rem;
}

/* where there is room for it, the foot of the site lies along the bottom edge of the painting */
@media (min-width: 761px) and (min-height: 640px) {
  body.screen:has(.msg) .foot {
    display: block;
    position: absolute;
    inset: auto 0 var(--consent-h, 0px) 0;
    z-index: 2;
    padding: 46px var(--edge) 14px;
    border-top: 0;
    background: linear-gradient(to bottom, rgba(18, 9, 20, 0), rgba(18, 9, 20, 0.86) 62%);
    font-size: 0.875rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  }

  body.screen:has(.msg) .foot p {
    gap: 0 1.1em;
  }
}

@media (max-width: 760px) {
  .msg {
    padding: 112px var(--edge) 64px;
  }
}

/* ---- the plans page on a phone: one screen, and a row of tabs between what the plan holds, the plans, and
        single readings. A wide screen shows all three at once and has no row. ---- */
.up-tabs,
.up-next {
  display: none;
}

/* a screen too short for the plans and the foot of the site together keeps the plans */
@media (max-height: 879px) {
  body:has(.upgrade) .foot {
    display: none;
  }
}

/* and while the bar that asks about counting visits lies along the bottom edge, it stands where the foot would */
body:has(.upgrade):has(> .consent) .foot {
  display: none;
}

@media (max-width: 979px) {
  body:has(.upgrade) .foot {
    display: none;
  }

  body:has(.upgrade) {
    min-height: calc(100svh - var(--consent-h, 0px));
  }

  .upgrade-plans .up-tabs {
    display: flex;
    gap: 3px;
    margin: 0 0 0.9rem;
    padding: 3px;
    border: 1px solid rgba(217, 169, 91, 0.38);
    border-radius: 999px;
    background: rgba(24, 12, 27, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .up-tabs label {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    cursor: pointer;
  }

  .up-tabs input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }

  .up-tabs span {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 1rem;
    line-height: 1.1;
    text-align: center;
    color: var(--bone);
    transition: background-color 0.25s, color 0.25s;
  }

  .up-tabs input:checked + span {
    background: linear-gradient(180deg, #f3d59a, #d9a95b 55%, #b98a45);
    color: var(--night);
    box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.7), 0 2px 8px rgba(0, 0, 0, 0.45);
  }

  .up-tabs input:focus-visible + span {
    outline: 2px solid var(--gold-bright);
    outline-offset: 2px;
  }

  .upgrade-plans .up-next {
    display: block;
    margin-top: 1.1rem;
  }

  :root body .upgrade .up-next .button {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-inline: 0.9rem;
    font-size: 1.0625rem;
    text-align: center;
    text-wrap: balance;
    cursor: pointer;
  }

  .upgrade-plans:has(#up-view-get:checked) .up-buy,
  .upgrade-plans:has(#up-view-plans:checked) :is(.lede, .includes, .up-next, .once),
  .upgrade-plans:has(#up-view-once:checked) :is(.lede, .includes, .up-next, .trial, .plans, .fine) {
    display: none;
  }

  .upgrade-plans .up-buy {
    margin-top: 0;
  }

  .upgrade-plans .up-buy > .trial {
    margin-top: 0;
  }

  .upgrade-plans .once {
    margin-top: 0;
  }

  .upgrade .up-say h1 {
    margin-bottom: 0.75rem;
  }
}

/* a phone: the two plans are small plates, so both stand on the screen with the note about the trial above them */
@media (max-width: 560px) {
  .upgrade-plans .up-buy > .trial {
    padding: 0.55rem 0.8rem 0.6rem;
    font-size: 0.9375rem;
    line-height: 1.3;
  }

  .upgrade-plans .plans {
    gap: 10px;
    margin-top: 0.65rem;
  }

  .upgrade-plans .plan {
    padding: 0.65rem 0.9rem 0.8rem;
  }

  .upgrade-plans .plan h2 {
    font-size: 1.375rem;
  }

  .upgrade-plans .price {
    font-size: 1.9rem;
  }

  .upgrade-plans .saving {
    font-size: 0.9375rem;
    line-height: 1.25;
  }

  :root body .upgrade-plans .plan .button {
    min-height: 48px;
    margin-top: 0.5rem;
    font-size: 1.0625rem;
  }

  :root body .upgrade-plans .plan .button[data-art]::before {
    width: 2em;
    height: 2em;
  }

  .upgrade-plans .fine {
    margin-top: 0.55rem;
    font-size: 0.875rem;
    line-height: 1.3;
  }
}

@media (max-width: 560px) and (max-height: 700px) {
  .upgrade .up-say h1 {
    margin-bottom: 0.55rem;
    font-size: 1.75rem;
  }

  .upgrade-plans .up-tabs {
    margin-bottom: 0.65rem;
  }

  .up-tabs span {
    min-height: 38px;
    font-size: 0.9375rem;
  }
}

/* the plans page on a short phone: the note, both plans and the line about Stripe stand on one screen */
@media (max-width: 560px) and (max-height: 700px) {
  .upgrade-plans .up-buy > .trial {
    padding: 0.4rem 0.7rem 0.45rem;
    font-size: 0.875rem;
    line-height: 1.26;
  }

  .upgrade-plans .plans {
    gap: 8px;
    margin-top: 0.5rem;
  }

  .upgrade-plans .plan {
    padding: 0.45rem 0.8rem 0.6rem;
  }

  .upgrade-plans .plan h2 {
    font-size: 1.25rem;
  }

  .upgrade-plans .price {
    font-size: 1.7rem;
  }

  .upgrade-plans .saving {
    margin-top: 0;
    font-size: 0.875rem;
    line-height: 1.2;
  }

  :root body .upgrade-plans .plan .button {
    min-height: 44px;
    margin-top: 0.4rem;
    font-size: 1rem;
  }

  .upgrade-plans .fine {
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    line-height: 1.25;
  }
}

/* the plans page on a short wide screen: everything is set a little closer, so the readings paid for once stay on it */
@media (min-width: 980px) and (max-height: 800px) {
  .upgrade-plans {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .upgrade .plan {
    padding: 0.85rem 1.2rem 1rem;
  }

  .upgrade .plan h2 {
    margin-bottom: 0.25rem;
  }

  .upgrade .price {
    margin-bottom: 0.3rem;
    font-size: 2.25rem;
  }

  .upgrade .saving {
    margin-bottom: 0.65rem;
    font-size: 0.96rem;
  }

  .upgrade .fine {
    margin-top: 0.5rem;
  }

  .upgrade .once {
    margin-top: 0.7rem;
    padding: 0.7rem 1.1rem 0.8rem;
  }

  .upgrade .once p {
    font-size: 0.9375rem;
    line-height: 1.32;
  }

  :root body .upgrade .once-row .button {
    min-height: 44px;
  }
}

/* a narrow wide screen: the words on a plan's button take two lines at most */
@media (min-width: 980px) and (max-width: 1180px) {
  .upgrade-plans {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    column-gap: 2rem;
  }

  .upgrade .plan {
    padding-inline: 1rem;
  }

  /* the words on a plan's button stay on one line: the seal gives them its place */
  :root body .upgrade .plan .button,
  :root body .upgrade .plan .button[data-art] {
    justify-content: center;
    padding: 0.5em 0.9em;
    font-size: 1rem;
    white-space: nowrap;
  }

  :root body .upgrade .plan .button[data-art]::before {
    display: none;
  }
}

/* ==== second pass: the paintings are seen, and the policies are pages filled for the screen they are read on ==== */

/* ---- Privacy and Terms: the key, the book and the sealed letter stay in the light; the words stand beside them ---- */
.bk-legal .rd-film::after,
.bk-legal.opened .rd-film::after {
  background:
    linear-gradient(to right, rgba(18, 9, 20, 0.55), rgba(18, 9, 20, 0) 58%),
    linear-gradient(to bottom, rgba(18, 9, 20, 0.72), rgba(18, 9, 20, 0) 17%);
  background-color: transparent;
}

/* a page of a policy: one column of a comfortable measure, set with room between its lines (journal.js fills it) */
.bk-legal .lg-leaf {
  align-items: start;
}

.bk-legal .lg-leaf > .jr-fit {
  max-width: 35rem;
  padding: clamp(1.1rem, 2.6vh, 1.9rem) clamp(1.2rem, 2.4vw, 2.2rem) clamp(1.2rem, 2.8vh, 2rem);
  background: linear-gradient(160deg, rgba(34, 19, 42, 0.84), rgba(16, 8, 18, 0.8));
  font-size: 1.125rem;
  line-height: 1.58;
  text-wrap: pretty;
  hyphens: auto;
}

.bk-legal .lg-contents > .jr-fit {
  background: linear-gradient(160deg, rgba(34, 19, 42, 0.84), rgba(16, 8, 18, 0.8));
}

.bk-legal .lg-leaf .bk-title {
  margin-bottom: 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(217, 169, 91, 0.26);
}

/* a clause opens with a gilt initial, as the chapters of the site's other books do with their ornaments */
.bk-legal .lg-leaf .bk-title + p::first-letter {
  float: left;
  margin: 0.06em 0.09em 0 0;
  font: 400 3.05em / 0.82 var(--display);
  color: var(--gold-bright);
  text-shadow: 0 2px 14px rgba(217, 169, 91, 0.28);
}

.bk-legal .lg-leaf .bk-part > .bk-title {
  margin-top: 1.25em;
}

.bk-legal .lg-leaf .bk-part .lg-up {
  display: none;
}

/* wide: the words keep to the dark left of the painting, and the still life is whole beside them */
@media (min-width: 900px) and (min-height: 560px) {
  .bk-legal .jr-page > .jr-fit {
    margin-left: clamp(0rem, 3.5vw, 4.5rem);
    margin-right: auto;
  }

  .bk-legal .rd-cover > .jr-fit {
    max-width: 34rem;
    text-align: left;
  }

  .bk-legal .rd-cover .bk-open {
    justify-content: flex-start;
    text-align: left;
  }

  .bk-legal .rd-cover :is(.when, h1, .opening) {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  .bk-legal .lg-contents > .jr-fit {
    max-width: 33rem;
  }

  .bk-legal .lg-leaf > .jr-fit {
    font-size: 1.1875rem;
    line-height: 1.6;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .bk-legal .lg-leaf > .jr-fit {
    max-width: 30rem;
  }
}

/* a phone held upright: the painting is set small along the foot of the screen, so the key, the book and the
   letter are all in it, and the page of words ends above them */
@media (max-aspect-ratio: 4/5) {
  .bk-legal .rd-film,
  .msg-key .rd-film {
    background: linear-gradient(to bottom, #170d19, #1a070b 46%, #1a0508);
  }

  .bk-legal .rd-film img,
  .msg-key .rd-film img {
    inset: auto 0 0 0;
    height: 58%;
    object-position: 86% 100% !important;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
    mask-image: linear-gradient(to bottom, transparent, #000 30%);
    animation: none;
  }

  .bk-legal .rd-film::after,
  .bk-legal.opened .rd-film::after {
    background: linear-gradient(to bottom, rgba(18, 9, 20, 0.6), rgba(18, 9, 20, 0) 16%);
  }

  /* a page of words runs down to just above the studs that turn it: the still life shows around them and at the sides */
  .bk-legal .lg-leaf,
  .bk-legal .lg-contents {
    padding-bottom: calc(max(14px, env(safe-area-inset-bottom)) + 60px);
  }

  .bk-legal .lg-contents {
    align-items: start;
  }

  .bk-legal .lg-leaf > .jr-fit {
    line-height: 1.52;
  }
}

/* ---- the short messages: the painting is the page; only the menu, the foot and the words themselves are shaded ---- */
.msg .rd-film::after {
  background:
    linear-gradient(to bottom, rgba(18, 9, 20, 0.6), rgba(18, 9, 20, 0) 18%, rgba(18, 9, 20, 0) 80%, rgba(18, 9, 20, 0.5));
}

.msg-words::before {
  inset: -16% -20%;
  background: radial-gradient(closest-side, rgba(18, 9, 20, 0.7), rgba(18, 9, 20, 0.42) 55%, rgba(18, 9, 20, 0));
}

.msg h1 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55), 0 2px 30px rgba(0, 0, 0, 0.8);
}

/* the key and the letter lie to the right of their painting: on a wide screen the words stand to the left of them */
@media (min-aspect-ratio: 4/5) and (min-width: 900px) {
  .msg-key {
    justify-items: start;
  }

  .msg-key .msg-words {
    max-width: 36rem;
    margin-left: clamp(0rem, 5vw, 6rem);
    text-align: left;
  }

  .msg-key h1 {
    font-size: clamp(2.5rem, 4.6vw, 4rem);
  }

  .msg-key h1::after {
    margin-left: 0;
    background: linear-gradient(to right, var(--gold), transparent);
  }

  .msg-key .msg-words > p {
    margin-left: 0;
  }

  .msg-key .rd-film::after {
    background:
      linear-gradient(to right, rgba(18, 9, 20, 0.5), rgba(18, 9, 20, 0) 55%),
      linear-gradient(to bottom, rgba(18, 9, 20, 0.6), rgba(18, 9, 20, 0) 18%, rgba(18, 9, 20, 0) 80%, rgba(18, 9, 20, 0.5));
  }
}

@media (max-aspect-ratio: 4/5) {
  /* upright: the words stand above the key and the letter */
  .msg-key {
    align-items: start;
    padding-top: max(128px, 19svh);
  }

  /* the candle at the window is kept in the upright crop */
  .msg-dawn .rd-film :is(img, video) {
    object-position: 79% 50% !important;
  }
}

/* with scripts off the book lies open down the page: the painting keeps to the height of one screen at its foot */
@media (max-aspect-ratio: 4/5) {
  html:not(.js) .bk-legal .rd-film img {
    height: 58svh;
  }
}

/* upright: the title page stands above the still life, and the count of pages is read against it */
@media (max-aspect-ratio: 4/5) {
  .bk-legal .rd-cover {
    align-items: start;
    padding-top: max(124px, 19svh);
  }

  .bk-legal .jr-at {
    text-shadow: 0 1px 3px #000, 0 0 10px #000, 0 0 18px #000;
  }
}

/* a short phone held upright: the message about the key is set closer, so its button stands clear of the book */
@media (max-aspect-ratio: 4/5) and (max-height: 700px) {
  .msg-key {
    padding-top: 100px;
  }

  .msg-key h1 {
    font-size: 2.125rem;
  }

  .msg-key h1::after {
    margin-top: 0.9rem;
  }

  .msg-key .msg-words > p {
    margin-top: 0.8rem;
    font-size: 1.125rem;
    line-height: 1.42;
  }

  .msg-key .msg-words > p:has(.button),
  .msg-key .msg-words > form {
    margin-top: 1.2rem;
  }
}

/* a page of a policy on a screen held wide is filled down to the two studs that turn it, never under them */
@media (min-aspect-ratio: 4/5) {
  .bk-legal .lg-leaf {
    padding-bottom: 90px;
  }
}

/* ---- words never stand on the bright of a painting ---- */
/* a policy: the count of its pages is set on a dark seal of its own, so it is not read against the key */
.bk-legal .jr-at {
  min-width: 0;
  padding: 0.3em 0.85em;
  border-radius: 999px;
  background: rgba(18, 9, 20, 0.72);
  backdrop-filter: blur(6px);
}

/* wide: the studs that turn it stand under its column of words, on the dark left, not on the key and the letter */
@media (min-width: 900px) and (min-height: 560px) and (min-aspect-ratio: 4/5) {
  .bk-legal .jr-turn {
    justify-content: flex-start;
    padding-left: calc(var(--edge) + clamp(0rem, 3.5vw, 4.5rem));
  }
}

/* the plans page: the line that says the plans are not open yet lies on a dark plate, and the foot of the site,
   where it is shown, on a band of shade, never on the bare flames of the candles */
.upgrade .soon {
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(24, 12, 27, 0.78);
  backdrop-filter: blur(6px);
}

/* the plate brings its own air: a tall screen sets it a little nearer the list above it */
@media (min-height: 801px) and (min-width: 561px) {
  .upgrade .soon {
    margin-top: 1.25rem;
  }
}

body:has(.upgrade) .foot {
  position: relative;
  background: linear-gradient(to bottom, rgba(18, 9, 20, 0.7), rgba(18, 9, 20, 0.9));
  backdrop-filter: blur(6px);
}

body:has(.upgrade) .foot a {
  color: var(--bone);
}

/* a small phone with the bar that asks about counting visits, and no plans to show: set closer, to stand above it */
@media (max-width: 560px) and (max-height: 700px) {
  body:has(.consent) .upgrade:not(.upgrade-plans) {
    padding-top: 12px;
  }

  body:has(.consent) .upgrade:not(.upgrade-plans) h1 {
    margin-bottom: 0.35rem;
  }

  body:has(.consent) .upgrade:not(.upgrade-plans) .lede {
    margin-bottom: 0.45rem;
  }

  body:has(.consent) .upgrade:not(.upgrade-plans) .includes li {
    padding-block: 0.18rem;
  }

  body:has(.consent) .upgrade:not(.upgrade-plans) .soon {
    margin-top: 0.55rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.98rem;
  }

  /* about: the facts at a glance are set a little closer, so the page is never drawn smaller than its words allow */
  body:has(.consent) .bk-about .about-facts tr {
    padding: 0.12rem 0 0.2rem;
  }

  body:has(.consent) .bk-about .about-facts td,
  body:has(.consent) .bk-about .about-facts tr:last-child td {
    font-size: 0.9375rem;
    line-height: 1.15;
  }
}

/* a page that draws one card, on a phone: its button keeps its words on one line in every language */
@media (max-width: 560px) {
  :root body .lp-cover .lp-act .button[data-art] {
    padding-right: 0.9em;
    font-size: 1.0625rem;
  }
}

/* ---- a first visit on a phone: the bar that asks about counting visits takes the foot of the screen, and the
        plans page gives it that room. The button that only repeats the Plans tab steps aside, the list and the
        plates are set closer, and the line about Stripe and the sum saved wait until the bar has gone. ---- */
@media (max-width: 979px) {
  body:has(.consent) .upgrade-plans :is(.up-next, .fine, .saving) {
    display: none;
  }

  body:has(.consent) .upgrade-plans .lede {
    margin-bottom: 0.45rem;
  }

  body:has(.consent) .upgrade-plans .includes li {
    padding-block: 0.2rem;
  }
}

@media (max-width: 560px) {
  body:has(.consent) .upgrade .up-say h1 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
  }

  body:has(.consent) .upgrade-plans .up-tabs {
    margin-bottom: 0.6rem;
  }

  body:has(.consent) .upgrade-plans {
    padding-bottom: 4px;
  }

  body:has(.consent) .upgrade-plans .up-buy > .trial {
    padding: 0.35rem 0.65rem 0.4rem;
    font-size: 0.875rem;
    line-height: 1.24;
  }

  body:has(.consent) .upgrade-plans .plans {
    gap: 6px;
    margin-top: 0.4rem;
  }

  body:has(.consent) .upgrade-plans .plan {
    padding: 0.3rem 0.8rem 0.45rem;
  }

  :root body:has(.consent) .upgrade-plans .plan .button {
    min-height: 44px;
    margin-top: 0.2rem;
  }

  body:has(.consent) .upgrade-plans .plan h2 {
    font-size: 1.25rem;
  }

  body:has(.consent) .upgrade-plans .price {
    font-size: 1.6rem;
  }

  body:has(.consent) .upgrade-plans .once {
    gap: 0.5rem;
    padding: 0.6rem 0.85rem 0.7rem;
  }

  body:has(.consent) .upgrade-plans .once-h {
    margin-bottom: 0.2rem;
    font-size: 1.2rem;
  }

  body:has(.consent) .upgrade-plans .once p {
    font-size: 0.9375rem;
    line-height: 1.3;
  }

  :root body:has(.consent) .upgrade-plans .once-row .button {
    min-height: 44px;
  }

  body:has(.consent) .upgrade-plans .once-row {
    gap: 0.45rem;
  }
}

/* ---- the journal before its first reading: the line that answers the sign-in form (sent, or try again) takes
        the place of the form's own label, in the room between the rule above the form and its field, so the page
        never grows past one screen. The label's words stay for those who hear the page. ---- */
.jr-empty .signin {
  position: relative;
}

.jr-empty .signin .status:not(:empty) {
  position: absolute;
  inset: 0.35rem 0 auto 0;
  min-height: 0;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.25;
  text-wrap: balance;
}

.jr-empty .signin:has(.status:not(:empty)) label {
  color: transparent;
}
/* ---- WORDS-END ---- */

/* in the book the note on the year card is said on every screen: the calculator drops it on a short phone, a page of words does not */
.bk-birth .bc-note {
  display: block;
}

/* ---- .bk, second pass: the card comes onto a phone's pages where there is room, and gives way where there is not ---- */

/* a spare picture is dropped by journal.js (class bk-tight on its page) before any word is made smaller */
.bk .bk-tight .bk-spare {
  display: none;
}

@media (min-width: 861px) {
  /* on a wide screen these three pages are laid out without the card */
  .bk-number .bk-spare,
  .bk-count .bk-spare,
  .bk-last .bk-spare {
    display: none;
  }
}

@media (max-width: 860px) {
  .bk-faced > .jr-fit {
    display: flex;
    flex-direction: column;
  }

  .bk .jr-page:not(.bk-tight) .bk-spare {
    display: block;
    float: none;
    order: -1;
    grid-column: 1 / -1;
    width: auto;
    margin: 0 auto 0.2rem;
  }

  .bk .bk-spare .card {
    width: min(9.5rem, calc(var(--svh) * 0.19));
    max-height: none;
    margin: 0 auto;
    rotate: none;
    box-shadow:
      0 0 0 1px rgba(217, 169, 91, 0.35),
      0 0 30px rgba(239, 200, 136, 0.16),
      0 14px 30px rgba(0, 0, 0, 0.55);
  }

  .bk .bk-spare img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 560 / 939;
    border-radius: 4.5% / 2.7%;
  }

  /* the card of the last page stands on the painting, above the panel */
  .bk-last .bk-spare {
    margin-bottom: 1rem;
  }

  .bk-leaf.bk-number .bk-title,
  .bk-leaf.bk-count .bk-title,
  .bk-leaf.bk-faced .bk-title {
    text-align: center;
  }

  .bk .jr-page.bk-tight .bk-title {
    text-align: left;
  }

  /* what the card is made of: two tiles or three, and the row is filled either way */
  .bk-number .bc-traits {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .bk-number .bc-traits li {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* the cards on either side: their words break between words, never inside one */
.bk .card-grid span {
  overflow-wrap: normal;
  -webkit-hyphens: manual;
  hyphens: manual;
}

@media (max-width: 560px) {
  .bk .bk-mid .card-grid {
    --gap: 0.5rem;
    max-width: none;
  }

  .bk .card-grid span {
    font-size: 0.8125rem;
    line-height: 1.25;
  }
}

/* ---- .bk, second pass continued ---- */

/* whatever is marked as extra goes with the spare card when a page is tight */
.bk .bk-tight .bk-extra {
  display: none;
}

.bk .bk-tight .bc-stars li > div:last-child {
  grid-column: 1 / -1;
}

/* the lesson, and the question to carry: one page of two sayings */
.bk-lesson .bc-lesson {
  max-width: none;
  margin: 0.9rem 0 0;
  padding: 0;
  border: 0;
}

.bk-lesson .bc-lesson p {
  margin: 0;
}

@media (max-width: 860px) {
  /* the card on a phone's page: large where the page has room to spare, smaller where it has a little */
  .bk .bk-spare .card {
    width: min(9rem, 17svh);
  }

  .bk .bk-snug .bk-spare .card {
    width: min(5.6rem, 11svh);
  }

  .bk-lesson .bc-lesson,
  .bk-lesson .bc-ask {
    text-align: center;
  }

  .bk .jr-page.bk-tight.bk-lesson .bc-lesson,
  .bk .jr-page.bk-tight.bk-lesson .bc-ask {
    text-align: left;
  }

  /* the small words beside a sign keep a size that can bear a little scaling */
  .bk-number .bc-traits li,
  .bk-birth .bc-stars strong span {
    font-size: 0.9375rem;
  }
}

@media (max-width: 760px) {
  /* the cover's card gives up some of its height to the bar a first visit shows */
  .bk-cover .bk-card {
    width: min(42vw, calc(22svh - var(--consent-h, 0px) * 0.45));
  }
}

@media (max-width: 760px) and (max-height: 700px) {
  .bk-cover .bk-card {
    width: 100%;
  }
}

/* the cards on either side, on a phone: one under another, each beside its words, so no word has to be broken */
@media (max-width: 560px) {
  .bk .bk-mid .card-grid {
    --thumb: min(5rem, calc((100svh - var(--consent-h, 0px)) * 0.095));
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    max-width: none;
    margin-top: 0.8rem;
  }

  .bk .card-grid a,
  .bk .card-grid div {
    grid-template-columns: var(--thumb) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 0.9rem;
    row-gap: 0.1rem;
    justify-items: start;
    text-align: left;
  }

  .bk .card-grid img {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 100%;
    height: auto;
  }

  .bk .card-grid b {
    grid-column: 2;
    grid-row: 2;
    font-size: 1.125rem;
  }

  .bk .card-grid span {
    grid-column: 2;
    grid-row: 3;
    font-size: 0.9375rem;
    line-height: 1.3;
  }
}

@media (max-width: 860px) {
  /* a constellation of three with no room for its pictures is also set a little closer, before any word is made smaller */
  .bk .bk-tight.bk-stars .bc-stars {
    gap: 0.4rem 0.8rem;
    padding-top: 0.5rem;
  }

  .bk .bk-tight.bk-stars .bc-stars li {
    line-height: 1.26;
  }

  .bk .bk-tight.bk-stars .bc-stars p {
    margin-top: 0;
  }

  .bk .bk-tight.bk-stars .bk-title {
    font-size: 1.25rem;
  }
}

/* ---- ITEMS-BEGIN ---- a Lenormand card's or a rune's own page (worker/itempages.ts): /lenormand-cards/the-rider,
        /rune-meanings/fehu. A book of worker/book.ts; everything here is under .bk-item or named it-…, and the two
        rules for the page of all items (worker/practicepages.ts) that now leads to these. ---- */

/* the page of all items: a tile that leads to the item's own page is drawn as the tile that turns a page is */
.rd-spread a {
  display: block;
  width: 100%;
  color: var(--bone);
  text-align: center;
  text-decoration: none;
}

.rd-spread a:hover .rd-face,
.rd-spread a:focus-visible .rd-face {
  translate: 0 -10px;
  filter: drop-shadow(0 0 26px rgba(217, 169, 91, 0.45));
}

/* and the item's page there ends with the way to the whole of it */
.rd-text > p:has(+ .it-own) {
  margin-top: 1.2rem;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.45vw, 1.3rem);
  line-height: 1.6;
}

.rd-text .it-own {
  margin-top: 1.3rem;
}

@media (max-width: 760px) {
  .rd-text > p:has(+ .it-own) {
    margin-top: 0.8rem;
    font-size: 1.0625rem;
    line-height: 1.5;
  }

  .rd-text .it-own {
    margin-top: 0.8rem;
  }

  /* the picture gives the button its room, the more so while the bar that asks about counting visits is up */
  .rd-card:has(.it-own) .rd-face {
    width: clamp(4.5rem, calc((100svh - var(--consent-h, 0px) - 340px) * 0.5), min(40vw, 21svh));
  }
}

/* the painting stays in sight behind the pages: only a band at the top and the foot for the menu and the turning
   buttons, and a soft edge; the words are kept legible by their own pane and the shadow it throws, not by the scene */
.bk-item .rd-film::after {
  background:
    linear-gradient(to bottom, rgba(18, 9, 20, 0.72), rgba(18, 9, 20, 0) 20%, rgba(18, 9, 20, 0) 76%, rgba(18, 9, 20, 0.78)),
    radial-gradient(125% 95% at 50% 48%, rgba(18, 9, 20, 0.06), rgba(18, 9, 20, 0.2) 62%, rgba(18, 9, 20, 0.5));
}

.bk-item.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.08);
}

/* ---- the cover: the card or the stone in candlelight ---- */
.it-cover .it-card {
  position: relative;
}

.bk-runes .it-cover .it-card {
  width: min(21rem, 30vw, calc((100svh - var(--consent-h, 0px)) * 0.42));
}

/* the card leaves room for the bar that asks about counting visits, and its light never makes the cover longer */
.bk-lenormand .it-cover .it-card {
  width: min(22rem, 30vw, calc((100svh - var(--consent-h, 0px)) * 0.36));
}

.bk-item .it-cover {
  overflow: clip;
}

.it-cover .it-card::before {
  content: "";
  position: absolute;
  inset: -22% -34%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 190, 110, 0.34), rgba(255, 160, 80, 0.1) 58%, rgba(255, 160, 80, 0) 78%);
  animation: tc-breathe 4.6s ease-in-out infinite alternate;
  pointer-events: none;
}

.it-card .card {
  position: relative;
  animation: rd-float 7s ease-in-out infinite;
}

.bk-lenormand .it-card .card,
.bk-lenormand .it-face .card {
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.42),
    0 1px 1px rgba(0, 0, 0, 0.5);
}

/* a slow glint that crosses the face of the card */
.bk-lenormand .it-card .card::after {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, rgba(255, 240, 210, 0) 42%, rgba(255, 240, 210, 0.28) 50%, rgba(255, 240, 210, 0) 58%);
  translate: -70% 0;
  animation: rd-glint 6.5s 1.4s ease-in-out infinite;
  pointer-events: none;
}

/* a rune stone: river stone with its grain, the rune cut into it and the cut filled with gold leaf */
.bk-runes .card.stone {
  container-type: inline-size;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 28% 14%, rgba(255, 236, 205, 0.24), transparent 52%),
    radial-gradient(90% 80% at 76% 96%, rgba(0, 0, 0, 0.66), transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.5 0 0 0 .25 .5 0 0 0 .25 .5 0 0 0 .25 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='m' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.36 0 0 0 .3 .36 0 0 0 .3 .36 0 0 0 .3 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E"),
    linear-gradient(155deg, #62574d, #2e2723 58%, #151210);
  background-blend-mode: normal, normal, overlay, soft-light, normal;
  box-shadow:
    inset 0 3px 4px rgba(255, 240, 215, 0.3),
    inset 0 -16px 28px rgba(0, 0, 0, 0.66),
    inset 12px 0 24px rgba(255, 220, 170, 0.05),
    0 26px 34px -10px rgba(0, 0, 0, 0.85),
    0 0 60px rgba(239, 180, 100, 0.14);
}

.bk-runes .card.stone span {
  color: transparent;
  background: linear-gradient(168deg, #fff3cc 0%, #f1cd8b 26%, #b47d2b 54%, #f5d595 76%, #8a5a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0;
  text-shadow: none;
  -webkit-text-stroke: 0.028em #d9a95b;
  font-size: 46cqw;
  filter: drop-shadow(0 -1.5px 0.5px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 0 rgba(255, 236, 200, 0.38)) drop-shadow(0 0 12px rgba(239, 200, 136, 0.32));
  padding: 0.12em 0.2em;
}

/* its number and what it belongs to, under the name */
.it-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0;
  margin: 0.7rem 0 0;
  font: italic 400 clamp(1.125rem, 1.5vw, 1.375rem) / 1.3 var(--display);
  color: var(--gold-bright);
  text-shadow: 0 1px 12px rgba(10, 4, 12, 0.9);
}

.it-kicker > span:not(.it-pip) + span::before {
  content: "·";
  margin: 0 0.55em;
  color: var(--gold);
}

/* the playing card a Lenormand card carries: a small card with its pip */
.it-pip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.55em;
  height: 2.05em;
  margin-right: 0.6em;
  border-radius: 0.2em;
  background: linear-gradient(160deg, #f6ecd6, #d9c9a8);
  box-shadow:
    0 0 0 1px rgba(60, 40, 20, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.55);
  color: #2a1c1a;
  font: 400 1rem/1 var(--text);
  font-style: normal;
  text-shadow: none;
  rotate: -5deg;
}

.it-pip b {
  font-size: 0.875em; /* 14 pixels: room for the cover to be fitted a little smaller and still read at 13 (journal.js) */
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.it-pip i {
  font-style: normal;
  font-size: 0.875em;
  line-height: 1;
}

.it-pip.it-red {
  color: #9c2630;
}

.it-cover .it-lede {
  max-width: 36rem;
}

.it-keys {
  margin: 0;
  font: italic 400 clamp(1.1875rem, 1.6vw, 1.4rem) / 1.35 var(--display);
  color: var(--bone);
  text-wrap: balance;
}

.it-keys span {
  display: inline-block;
  max-width: 100%;
}

.it-keys span + span::before {
  content: "·";
  margin: 0 0.5em 0 0.3em;
  color: var(--gold);
}

/* what is known of a rune's letter */
.it-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.6rem;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(217, 169, 91, 0.4);
}

.it-facts dt {
  font: italic 400 1.0625rem/1.2 var(--display);
  color: var(--gold);
}

.it-facts dd {
  margin: 0.15rem 0 0;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  line-height: 1.35;
}

/* ---- a leaf: the card or the stone at the edge of the pane, the words beside it ---- */
.it-faced > .jr-fit,
.it-turns > .jr-fit {
  display: grid;
  grid-template-columns: minmax(0, min(21rem, calc((100svh - var(--consent-h, 0px) - 300px) * 0.596))) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(1.4rem, 3.2vw, 2.8rem);
}

.it-faced > .jr-fit > .it-face {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
}

.it-faced > .jr-fit > .bk-title {
  grid-column: 2 / -1;
  grid-row: 2;
}

.it-faced > .jr-fit > .it-body {
  grid-column: 2 / -1;
  grid-row: 3;
  min-width: 0;
  margin-top: 0.9rem;
}

/* a page cut in two for a phone lies whole on a wide screen: its second half beside its first */
.it-faced > .jr-fit:has(> .bk-part) > .it-body {
  grid-column: 2;
}

.it-faced > .jr-fit > .bk-part {
  grid-column: 3;
  grid-row: 3;
  min-width: 0;
  margin-top: 0.9rem;
  padding-left: clamp(1.2rem, 2.6vw, 2.2rem);
  border-left: 1px solid rgba(217, 169, 91, 0.3);
}

.it-faced .bk-part > .it-face {
  display: none;
}

.it-face .card {
  margin: 0 auto;
  rotate: none;
}

@media (min-width: 861px) {
  .bk-item .bk-leaf > .jr-fit {
    max-width: 72rem;
    font-size: clamp(1.125rem, 1.45vw, 1.3125rem);
  }

  .bk-item .bk-leaf h3 {
    font-size: clamp(1.375rem, 1.8vw, 1.625rem);
  }
}

.it-leaf-h,
.bk-item .bk-leaf h3 {
  margin: 0 0 0.3rem;
  font: italic 400 1.375rem/1.2 var(--display);
  color: var(--gold-bright);
}

.it-lead {
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  line-height: 1.55;
}

/* how the card is held by tradition, and the playing card in its corner */
.it-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.8rem;
  margin: 1.1rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid rgba(217, 169, 91, 0.3);
  list-style: none;
  font: italic 400 1.1875rem/1.2 var(--display);
  color: var(--gold-bright);
}

.it-marks li {
  display: flex;
  align-items: center;
}

.it-tone i {
  flex: none;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.6em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1cf, #d9a95b 55%, #7a531c);
  box-shadow: 0 0 12px rgba(239, 200, 136, 0.7);
}

.it-tone.it-negative i {
  background: radial-gradient(circle at 35% 30%, #c7b6c9, #5d4763 55%, #24162a);
  box-shadow: 0 0 10px rgba(150, 120, 170, 0.5);
}

.it-tone.it-neutral i {
  background: radial-gradient(circle at 35% 30%, #f4ead7, #a99a86 55%, #4c4238);
  box-shadow: 0 0 10px rgba(236, 223, 198, 0.4);
}

/* the advice, said as the card would say it */
.it-say p {
  font: italic 400 clamp(1.3125rem, 1.9vw, 1.75rem) / 1.35 var(--display);
  color: var(--bone);
  text-wrap: pretty;
}

.it-when {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(217, 169, 91, 0.3);
}

.it-body > .it-keys {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(217, 169, 91, 0.3);
  font-size: 1.1875rem;
  color: var(--gold-bright);
}

/* ---- a rune upright and turned: the stone above each of its meanings ---- */
.it-turns > .jr-fit {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: clamp(1.6rem, 4vw, 3.4rem);
  max-width: 60rem;
}

.it-turns > .jr-fit > .bk-title {
  grid-column: 1 / -1;
  grid-row: 1;
  text-align: center;
}

.it-turns > .jr-fit > .it-face {
  grid-column: 1;
  grid-row: 2;
}

.it-turns > .jr-fit > .it-body {
  grid-column: 1;
  grid-row: 3;
}

.it-turns > .jr-fit > .bk-part {
  grid-column: 2;
  grid-row: 2 / 4;
}

.it-turns .it-face {
  width: min(14rem, 26svh);
  margin: 1.1rem auto 0.9rem;
}

.it-turns .it-body {
  text-align: center;
}

.it-turns.it-fixed > .jr-fit {
  grid-template-columns: minmax(0, 1fr);
  max-width: 40rem;
}

/* ---- a Lenormand card with another: the two cards together, and what they say ---- */
.it-combos > .jr-fit {
  max-width: 68rem;
}

.it-pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.2rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.it-combos .bk-part > .bk-title {
  display: none;
}

.it-combos .bk-part .it-pairs {
  margin-top: 0.9rem;
}

.it-pairs a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem;
  height: 100%;
  padding: 0.8rem 1rem 0.8rem 0.9rem;
  border: 1px solid rgba(217, 169, 91, 0.26);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(60, 36, 62, 0.42), rgba(20, 10, 22, 0.36));
  color: var(--bone);
  text-decoration: none;
  transition:
    border-color 0.3s,
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.4s;
}

.it-pairs a:hover,
.it-pairs a:focus-visible {
  border-color: rgba(239, 200, 136, 0.7);
  translate: 0 -3px;
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.8);
}

/* this card and the other, the other laid over its edge */
.it-duo {
  display: flex;
  align-items: center;
  --w: clamp(4.2rem, 7vw, 6.4rem);
}

.it-duo .card {
  flex: none;
  width: var(--w);
  margin: 0;
  rotate: -5deg;
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.35),
    0 10px 18px -6px rgba(0, 0, 0, 0.8);
}

.it-duo .card + .card {
  margin-left: calc(var(--w) * -0.34);
  rotate: 4deg;
  translate: 0 4px;
}

.it-duo img {
  aspect-ratio: 560 / 939;
  object-fit: cover;
}

.it-with b {
  display: block;
  font: 400 1.3125rem/1.2 var(--display);
  color: var(--gold-bright);
}

.it-with > span {
  display: block;
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* ---- the ones on either side, with this one between them ---- */
.it-ring > .jr-fit {
  max-width: 54rem;
  text-align: center;
}

.it-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(0.6rem, 3vw, 2.4rem);
  margin: 1.2rem auto 0;
  padding: 0;
  max-width: min(46rem, 78svh);
  list-style: none;
}

.bk-runes .it-tiles {
  max-width: min(46rem, 96svh);
}

.it-tiles a,
.it-tiles li > div {
  display: block;
  color: var(--bone);
  text-decoration: none;
}

.it-tiles .rd-face {
  transition:
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 0.4s;
}

.it-tiles a:hover .rd-face,
.it-tiles a:focus-visible .rd-face {
  translate: 0 -8px;
  filter: drop-shadow(0 0 24px rgba(217, 169, 91, 0.45));
}

.it-tiles li:not(.it-here) .rd-face {
  margin-inline: 9%;
  opacity: 0.9;
}

.it-tiles .card {
  margin: 0;
}

.it-tiles img {
  aspect-ratio: 560 / 939;
  object-fit: cover;
}

.it-tiles b {
  display: block;
  margin-top: 0.7rem;
  font: 400 1.3125rem/1.2 var(--display);
  overflow-wrap: anywhere;
}

.it-tiles .it-here b {
  color: var(--gold-bright);
}

.it-tiles b + span {
  display: block;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--gold);
}

/* ---- the last page: the way into a reading ---- */
.it-go {
  margin-top: 1.2rem;
}

.it-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.4rem;
  margin-top: 1rem;
  font-style: italic;
}

.bk-item .it-more a {
  color: var(--gold-bright);
}

.it-fine {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(217, 169, 91, 0.3);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--dim);
}

.it-fine time {
  font-style: italic;
  white-space: nowrap;
}

/* ---- a phone: one thing to a page, with the card or the stone above it where there is room ---- */
@media (max-width: 860px) {
  .it-faced > .jr-fit,
  .it-turns > .jr-fit {
    display: flex;
    flex-direction: column;
  }

  .bk-item .jr-page:not(.bk-tight) .it-face.bk-spare {
    width: 100%;
    margin: 0 0 0.7rem;
  }

  .bk-item .bk-spare .card {
    width: min(9.5rem, 20svh);
  }

  .bk-runes .bk-spare .card {
    width: min(10.5rem, 20svh);
  }

  .bk-item .bk-snug .bk-spare .card {
    width: min(5.8rem, 12svh);
  }

  .it-faced > .jr-fit > .it-body,
  .it-turns > .jr-fit > .it-body {
    margin-top: 0.6rem;
  }

  .bk-item .bk-leaf h3 {
    font-size: 1.25rem;
  }

  .bk-item .bk-title {
    text-align: center;
  }

  .bk-item .bk-tight .bk-title {
    text-align: left;
  }

  /* a page that begins with its smaller heading: the second half of a page cut in two */
  .it-body > h3:first-child:last-of-type {
    font-size: 1.375rem;
  }

  .it-lead {
    font-size: 1rem;
    line-height: 1.4;
  }

  .it-say p {
    font-size: 1.25rem;
    line-height: 1.32;
  }

  .it-marks {
    gap: 0.4rem 1.2rem;
    margin-top: 0.7rem;
    padding-top: 0.6rem;
    font-size: 1.0625rem;
  }

  .it-when,
  .it-body > .it-keys {
    margin-top: 0.7rem;
    padding-top: 0.6rem;
  }

  .it-body > .it-keys {
    font-size: 1.0625rem;
  }

  .it-pairs {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    margin-top: 0.7rem;
  }

  .it-pairs a {
    gap: 0.9rem;
    padding: 0.6rem 0.7rem;
  }

  .it-duo {
    --w: min(3.5rem, 8.4svh);
  }

  .it-with b {
    font-size: 1.1875rem;
  }

  .it-with > span {
    line-height: 1.32;
  }

  .it-tiles {
    gap: 0.6rem;
    margin-top: 0.8rem;
    max-width: min(100%, 62svh);
  }

  .bk-runes .it-tiles {
    max-width: min(100%, 76svh);
  }

  .it-tiles b {
    margin-top: 0.5rem;
    font-size: 1.0625rem;
  }

  .it-tiles b + span {
    font-size: 1rem;
  }

  .it-go {
    margin-top: 0.8rem;
  }

  .it-more {
    margin-top: 0.7rem;
  }

  .it-fine {
    margin-top: 0.7rem;
    padding-top: 0.6rem;
  }
}

/* a narrow phone has no room for the words under a neighbour's name */
@media (max-width: 560px) {
  .it-tiles b + span em {
    display: none;
  }
}

/* a tall phone: the card or the stone stands large above the words */
@media (max-width: 860px) and (min-height: 740px) {
  .bk-item .bk-spare .card {
    width: min(11.5rem, 23svh);
  }

  .bk-runes .bk-spare .card {
    width: min(13rem, 24svh);
  }

  .bk-item .bk-snug .bk-spare .card {
    width: min(7rem, 14svh);
  }

  .bk-item.bk-lenormand .it-cover .it-card {
    width: min(54vw, calc((100svh - var(--consent-h, 0px)) * 0.22));
  }

  .it-duo {
    --w: min(5.4rem, 9.6svh);
  }

  .it-pairs {
    gap: 0.9rem;
  }

  .it-pairs a {
    padding: 0.9rem 0.8rem;
  }
}

@media (max-width: 760px) {
  .it-kicker {
    justify-content: center;
    margin-top: 0.45rem;
    font-size: 1.0625rem;
  }

  .it-keys {
    font-size: 1.125rem;
  }

  .it-facts {
    gap: 0.5rem 1rem;
    padding-top: 0.6rem;
    text-align: left;
  }

  .it-facts dt {
    font-size: 1rem;
  }

  .it-facts dd {
    font-size: 1rem;
    line-height: 1.3;
  }

  .bk-runes .it-cover .it-card {
    width: min(48vw, 24svh);
  }

  .bk-lenormand .it-cover .it-card {
    width: min(42vw, 22svh);
  }
}

@media (max-width: 760px) and (max-height: 700px) {
  .it-kicker {
    justify-content: flex-start;
  }

  .bk-runes .it-cover .it-card,
  .bk-lenormand .it-cover .it-card {
    width: 100%;
  }
}

/* a short phone: less air on the last page before anything on it has to shrink */
@media (max-width: 560px) and (max-height: 720px) {
  .it-go,
  .it-more,
  .it-fine {
    margin-top: 0.5rem;
  }

  .it-fine {
    padding-top: 0.45rem;
    line-height: 1.32;
  }
}

/* a wide screen too low for the picture: the words take its room */
@media (min-width: 861px) {
  .it-faced.bk-tight > .jr-fit {
    grid-template-columns: 0 minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .it-card .card,
  .it-cover .it-card::before,
  .bk-lenormand .it-card .card::after {
    animation: none;
  }
}

/* ==== the Lume Oracle, the I Ching and numerology: /oracle-cards/the-dawn, /i-ching-hexagrams/hexagram-29,
        /numerology-numbers/number-11. The same book; what is theirs alone is below. ==== */

/* ---- gold leaf: the lines of a hexagram and the figures of a number, with a slow light crossing them ---- */
@keyframes it-gleam {
  0%,
  52% {
    background-position: 120% 0, 0 0;
  }
  84%,
  100% {
    background-position: -20% 0, 0 0;
  }
}

.bk-iching .card.hexagram {
  aspect-ratio: 1 / 0.9;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  row-gap: 7.6%;
  padding: 4% 2%;
  background: none;
  outline: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 18px rgba(239, 186, 104, 0.32));
}

.bk-iching .hexagram i,
.bk-iching .hexagram i.yin,
.it-tri i,
.it-tri i.yin {
  display: block;
  border-radius: 1.5px;
  background:
    linear-gradient(100deg, rgba(255, 250, 232, 0) 40%, rgba(255, 250, 232, 0.7) 49%, rgba(255, 250, 232, 0) 58%) 120% 0 / 250% 100% no-repeat,
    linear-gradient(180deg, #fff6d8 0%, #f2cf8a 15%, #d39f4c 38%, #8e5b1f 58%, #d8ab5f 80%, #a8722c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 238, 0.85),
    inset 0 -1px 1px rgba(60, 30, 5, 0.75);
}

.bk-iching .hexagram i {
  animation: it-gleam 8s ease-in-out infinite;
  animation-delay: calc(var(--n, 0) * 0.16s);
}

.bk-iching .hexagram i.yin,
.it-tri i.yin {
  -webkit-mask: linear-gradient(90deg, #000 0 41%, transparent 41% 59%, #000 59%);
  mask: linear-gradient(90deg, #000 0 41%, transparent 41% 59%, #000 59%);
}

/* a trigram: three lines, drawn small beside its name */
.it-tri {
  display: inline-grid;
  flex: none;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  row-gap: 22%;
  width: 2.2rem;
  aspect-ratio: 1 / 0.62;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.85));
}

/* a number: its figures cut from the same gold, standing free over the film */
.bk-numerology .card.numeral {
  position: relative;
  aspect-ratio: 1.25;
  container-type: inline-size;
  background: none;
  outline: 0;
  box-shadow: none;
}

.bk-numerology .card.numeral span {
  position: relative;
  padding: 0 0.04em;
  font: 400 60cqw / 1 var(--display);
  font-variant-numeric: lining-nums;
  letter-spacing: -0.02em;
  color: transparent;
  background:
    linear-gradient(100deg, rgba(255, 250, 232, 0) 40%, rgba(255, 250, 232, 0.75) 49%, rgba(255, 250, 232, 0) 58%) 120% 0 / 250% 100% no-repeat,
    linear-gradient(172deg, #fff4d0 0%, #f2cf8a 22%, #c08a3a 48%, #f3d494 70%, #8a5a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 3px 1.5px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 24px rgba(239, 186, 104, 0.34));
  animation: it-gleam 9s ease-in-out infinite;
}

/* a master number stands in a ring of light */
.bk-numerology .card.numeral.it-master::before,
.bk-numerology .card.numeral.it-master::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(239, 200, 136, 0.62);
  box-shadow:
    inset 0 0 7cqw rgba(239, 186, 104, 0.2),
    0 0 6cqw rgba(239, 186, 104, 0.22);
  pointer-events: none;
}

.bk-numerology .card.numeral.it-master::after {
  width: 80%;
  border-color: rgba(239, 200, 136, 0.22);
  box-shadow: none;
}

/* ---- the covers: the thing itself large in candlelight ---- */
.bk-oracle .it-cover .it-card {
  width: min(23rem, 30vw, calc((100svh - var(--consent-h, 0px)) * 0.38));
}

.bk-iching .it-cover .it-card {
  width: min(25rem, 32vw, calc((100svh - var(--consent-h, 0px)) * 0.52));
}

.bk-numerology .it-cover .it-card {
  width: min(28rem, 34vw, calc((100svh - var(--consent-h, 0px)) * 0.6));
}

.bk-oracle .it-card .card,
.bk-oracle .it-face .card {
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.42),
    0 1px 1px rgba(0, 0, 0, 0.5);
}

.bk-oracle .it-card .card::after {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, rgba(255, 240, 210, 0) 42%, rgba(255, 240, 210, 0.26) 50%, rgba(255, 240, 210, 0) 58%);
  translate: -70% 0;
  animation: rd-glint 6.5s 1.4s ease-in-out infinite;
  pointer-events: none;
}

.bk-oracle .it-card .card {
  overflow: hidden;
}

/* the character of a hexagram, brushed large beside how it is said */
.it-han b {
  margin-right: 0.15em;
  font: 400 1.7em/1 "Songti TC", "Songti SC", "STSong", "Noto Serif CJK TC", "Noto Serif CJK SC", "Source Han Serif", serif;
  vertical-align: -0.18em;
  color: transparent;
  background: linear-gradient(172deg, #fff4d0 0%, #f2cf8a 30%, #c08a3a 62%, #f3d494 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8));
}

.it-trigrams dd {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.it-cover .it-trigrams + .it-keys {
  margin-top: 0.9rem;
}

.it-mastered {
  font-style: normal;
  letter-spacing: 0.04em;
}

/* ---- the I Ching: the Image, the changing lines, the pair ---- */
.it-image > .jr-fit {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(1.8rem, 4.6vw, 4rem);
  max-width: 64rem;
}

.it-image > .jr-fit > .bk-title {
  grid-column: 2;
  grid-row: 2;
  font: italic 400 clamp(1.375rem, 2vw, 1.75rem) / 1.2 var(--display);
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.it-split {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  display: grid;
  gap: 1.5rem;
}

.it-split > span {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: center;
}

.it-split .it-tri {
  width: min(100%, 9rem);
  filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 14px rgba(239, 186, 104, 0.3));
}

.it-split small {
  font: italic 400 1.0625rem/1.25 var(--display);
  color: var(--gold);
}

.it-quote {
  position: relative;
  grid-column: 2;
  grid-row: 3;
  margin: 0.7rem 0 0;
}

.it-quote::before {
  content: "“";
  position: absolute;
  left: -0.6em;
  top: -0.06em;
  font: 400 4.4rem/1 var(--display);
  color: rgba(217, 169, 91, 0.4);
  pointer-events: none;
}

.it-quote p {
  font: italic 400 clamp(1.5rem, 2.6vw, 2.4rem) / 1.32 var(--display);
  color: var(--bone);
  text-wrap: pretty;
  text-shadow: 0 0 34px rgba(239, 190, 110, 0.18);
}

/* the changing lines: each line with its place, counted from the bottom, and a light that climbs them as the coins are cast */
.it-count {
  position: relative;
}

.it-count .card.hexagram {
  width: 80%;
  margin: 0;
}

.it-count ol {
  position: absolute;
  inset: 0 0 0 auto;
  width: 14%;
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  row-gap: 7.6%;
  align-items: center;
  margin: 0;
  padding: 3.2% 0;
  list-style: none;
  font: italic 400 1.0625rem/1 var(--display);
  color: var(--gold);
  text-align: center;
}

@keyframes it-wake {
  0%,
  14%,
  100% {
    filter: none;
  }
  6% {
    filter: brightness(1.5);
  }
}

@keyframes it-wake-n {
  0%,
  14%,
  100% {
    color: var(--gold);
    text-shadow: none;
  }
  6% {
    color: #fff1cf;
    text-shadow: 0 0 10px rgba(255, 214, 140, 0.9);
  }
}

.it-wake i {
  animation:
    it-gleam 8s ease-in-out infinite,
    it-wake 7.2s ease-in-out infinite;
  animation-delay: calc(var(--n, 0) * 0.16s), calc(var(--n, 0) * 0.9s);
}

.it-count li {
  animation: it-wake-n 7.2s ease-in-out infinite;
}

.it-count li:nth-child(1) {
  animation-delay: 4.5s;
}

.it-count li:nth-child(2) {
  animation-delay: 3.6s;
}

.it-count li:nth-child(3) {
  animation-delay: 2.7s;
}

.it-count li:nth-child(4) {
  animation-delay: 1.8s;
}

.it-count li:nth-child(5) {
  animation-delay: 0.9s;
}

/* a hexagram and its pair, the way between them, and how the one becomes the other */
.it-twins > .jr-fit {
  max-width: 54rem;
  text-align: center;
}

.it-pairing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.6rem, 3vw, 2.4rem);
  max-width: 40rem;
  margin: 1.3rem auto 0;
}

.it-this,
.it-that {
  display: block;
  padding: 1rem 0.8rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--bone);
  text-decoration: none;
}

.it-that {
  border-color: rgba(217, 169, 91, 0.3);
  background: linear-gradient(160deg, rgba(60, 36, 62, 0.42), rgba(20, 10, 22, 0.36));
  transition:
    border-color 0.3s,
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.4s;
}

.it-that:hover,
.it-that:focus-visible {
  border-color: rgba(239, 200, 136, 0.7);
  translate: 0 -3px;
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.8);
}

.it-pairing .rd-face {
  display: block;
  width: min(100%, 12rem, 26svh);
  margin: 0 auto;
}

.it-pairing .card {
  margin: 0;
}

.it-pairing b {
  display: block;
  margin-top: 0.75rem;
  font: 400 1.3125rem/1.2 var(--display);
  overflow-wrap: anywhere;
}

.it-this b {
  color: var(--gold-bright);
}

.it-pairing b + span {
  display: block;
  margin-top: 0.15rem;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--gold);
}

.it-swap svg {
  display: block;
  width: clamp(2.2rem, 4.6vw, 3.4rem);
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(239, 186, 104, 0.4));
}

.it-rel {
  max-width: 36rem;
  margin: 1.1rem auto 0;
  font: italic 400 clamp(1.1875rem, 1.7vw, 1.4rem) / 1.4 var(--display);
  text-wrap: balance;
}

/* hexagrams and numbers on either side: not as tall as a card, so the three may stand larger */
.bk-iching .it-tiles,
.bk-numerology .it-tiles {
  align-items: center;
  max-width: min(46rem, 110svh);
}

.bk-iching .it-tiles li:not(.it-here) .rd-face,
.bk-numerology .it-tiles li:not(.it-here) .rd-face {
  margin-inline: 12%;
}

/* ---- the oracle: what the painting shows, and the question it leaves you with ---- */
.it-show > .jr-fit {
  grid-template-columns: minmax(0, min(24rem, calc((100svh - var(--consent-h, 0px) - 250px) * 0.596))) minmax(0, 1fr) minmax(0, 1fr);
}

.it-scene {
  font: italic 400 clamp(1.3125rem, 2vw, 1.75rem) / 1.42 var(--display);
  color: var(--bone);
  text-wrap: pretty;
}

.it-ask > .jr-fit {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 52rem;
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 62%, rgba(239, 186, 104, 0.13), rgba(239, 186, 104, 0) 72%),
    linear-gradient(160deg, rgba(34, 19, 42, 0.66), rgba(16, 8, 18, 0.6));
}

.it-ask .it-face {
  order: 1;
  width: min(9.5rem, 22svh);
}

.it-ask .bk-title {
  order: 2;
  margin-top: 1.1rem;
  font: italic 400 1.25rem/1.25 var(--display);
  color: var(--gold);
  letter-spacing: 0.02em;
}

.it-q {
  order: 3;
  margin: 0.6rem 0 0;
}

.it-q p {
  font: italic 400 clamp(2rem, 3.7vw, 3.25rem) / 1.18 var(--display);
  color: var(--bone);
  text-wrap: balance;
  text-shadow:
    0 0 40px rgba(239, 190, 110, 0.28),
    0 2px 14px rgba(10, 4, 12, 0.9);
}

.it-q::before,
.it-q::after {
  content: "";
  display: block;
  width: 7rem;
  height: 1px;
  margin: 0 auto 1rem;
  background: linear-gradient(90deg, rgba(217, 169, 91, 0), rgba(239, 200, 136, 0.85), rgba(217, 169, 91, 0));
}

.it-q::after {
  margin: 1rem auto 0;
}

/* two cards read with this one: room for both pictures */
.it-two-up .it-duo {
  --w: clamp(5rem, 8.4vw, 7.6rem);
}

.it-two-up .it-pairs a {
  padding: 1rem 1.2rem 1rem 1rem;
}

/* where the screen is wide the second card lies beside the first */
.it-two-up > .jr-fit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.2rem;
  max-width: 60rem;
}

.it-two-up > .jr-fit > .bk-title {
  grid-column: 1 / -1;
}

.it-two-up .it-pairs {
  grid-template-columns: minmax(0, 1fr);
}

.it-two-up .bk-part .it-pairs {
  margin-top: 1.1rem;
}

/* ---- numerology: strengths beside challenges ---- */
.it-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(1rem, 3vw, 2.6rem);
}

.it-sides ul {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.it-sides li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-top: 1px solid rgba(217, 169, 91, 0.2);
  line-height: 1.3;
}

.it-sides li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.95em;
  width: 0.46rem;
  height: 0.46rem;
  rotate: 45deg;
  background: linear-gradient(135deg, #fff1cf, #d9a95b 55%, #7a531c);
  box-shadow: 0 0 8px rgba(239, 200, 136, 0.6);
}

.it-down li::before {
  background: linear-gradient(135deg, #c7b6c9, #6d5673 55%, #2a1a30);
  box-shadow: 0 0 6px rgba(150, 120, 170, 0.45);
}

.it-down {
  padding-left: clamp(1rem, 3vw, 2.6rem);
  border-left: 1px solid rgba(217, 169, 91, 0.3);
}

.it-sides {
  column-gap: 0;
}

.it-sides > .it-up {
  padding-right: clamp(1rem, 3vw, 2.6rem);
}

.it-master-mark i {
  background: none;
  border: 1.5px solid #efc888;
  box-shadow:
    0 0 0 3px rgba(239, 200, 136, 0.16),
    0 0 12px rgba(239, 200, 136, 0.6);
}

/* ---- a phone: each page fills the screen, and the picture, the lines or the number takes the room the words leave ---- */
.bk-oracle {
  --ratio: 0.5964;
  --face-max: 19rem;
}

.bk-iching {
  --ratio: 1.111;
  --face-max: 15rem;
}

.bk-numerology {
  --ratio: 1.25;
  --face-max: 17rem;
}

@media (max-width: 860px) {
  .it-fill :is(.it-faced, .it-ask, .it-image) > .jr-fit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
  }

  .bk-item.it-fill .jr-page:not(.bk-tight) .it-face.bk-spare {
    flex: 1 1 0;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: var(--face-min, 8.5rem);
    margin: 0 0 0.7rem;
    container-type: size;
  }

  .bk-item.it-fill .jr-page.bk-snug .it-face.bk-spare {
    --face-min: 5rem;
  }

  .bk-item.it-fill .bk-spare .card {
    width: min(100cqw, calc(100cqh * var(--ratio)), var(--face-max));
    margin: 0 auto;
  }

  .it-fill .bk-spare .card.hexagram,
  .it-fill .bk-spare .card.numeral {
    box-shadow: none;
  }

  .it-fill .it-faced > .jr-fit > .it-body {
    flex: none;
  }

  /* the Image: the two trigrams side by side above the words */
  .it-image > .jr-fit > .bk-title {
    text-align: center;
  }

  .bk-item.it-fill .jr-page:not(.bk-tight) .it-face.it-split.bk-spare {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9cqw;
  }

  .it-split > span {
    gap: 0.35rem;
  }

  .it-split .it-tri {
    width: min(34cqw, calc((100cqh - 2.2rem) * 1.6), 8rem);
  }

  .it-quote {
    margin-top: 0.4rem;
  }

  .it-quote::before {
    left: -0.1em;
    top: -0.38em;
    font-size: 3.6rem;
  }

  .it-quote p {
    font-size: 1.3125rem;
    line-height: 1.32;
  }

  .it-count .card.hexagram {
    width: calc(min(100cqw, calc(100cqh * var(--ratio)), var(--face-max)) * 0.8);
  }

  .it-count {
    width: auto;
  }

  .bk-item.it-fill .jr-page:not(.bk-tight) .it-face.it-count {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .it-count ol {
    position: static;
    width: auto;
    height: calc(min(100cqw, calc(100cqh * var(--ratio)), var(--face-max)) * 0.72);
    padding: 0 0 0 0.9rem;
    row-gap: 0;
    font-size: 1rem;
  }

  .it-scene {
    font-size: 1.25rem;
    line-height: 1.38;
  }

  .it-ask .bk-title {
    margin-top: 0.4rem;
    font-size: 1.125rem;
  }

  .it-ask .it-face {
    width: 100%;
  }

  .it-q p {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .it-q::before {
    margin-bottom: 0.6rem;
  }

  .it-q::after {
    margin-top: 0.6rem;
  }

  .it-pairing {
    gap: 0.4rem;
    margin-top: 0.8rem;
  }

  .it-this,
  .it-that {
    padding: 0.7rem 0.4rem 0.6rem;
  }

  .it-pairing .rd-face {
    width: min(100%, 9rem, 17svh);
  }

  .it-pairing b {
    margin-top: 0.5rem;
    font-size: 1.125rem;
  }

  .it-pairing b + span {
    font-size: 1rem;
  }

  .it-swap svg {
    width: 1.9rem;
  }

  .it-rel {
    margin-top: 0.8rem;
    font-size: 1.125rem;
  }

  .it-sides li {
    padding: 0.38rem 0 0.38rem 1.05rem;
  }

  .it-sides > .it-up {
    padding-right: 0.8rem;
  }

  .it-down {
    padding-left: 0.8rem;
  }

  .it-two-up .it-duo {
    --w: min(4.6rem, 10svh);
  }

  .bk-iching .it-tiles,
  .bk-numerology .it-tiles {
    max-width: min(100%, 90svh);
  }
}

/* a phone: the pages of pictures fill the screen too */
@media (max-width: 860px) {
  .it-fill :is(.it-ring, .it-two-up, .it-twins) > .jr-fit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
  }

  .it-fill .it-tiles {
    width: 100%;
  }

  /* a card read with this one: the two pictures large, what they say together beneath them */
  .it-fill .it-two-up .it-pairs {
    flex: 1 1 auto;
    align-content: center;
  }

  .it-fill .it-two-up .it-pairs a {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 1rem;
    padding: 1.1rem 0.9rem 1rem;
    text-align: center;
  }

  .it-fill .it-two-up .it-duo {
    --w: min(8rem, calc((100svh - var(--consent-h, 0px)) * 0.17 - var(--consent-h, 0px) * 0.12));
    padding-right: calc(var(--w) * 0.1);
  }

  .it-fill .it-two-up .it-with b {
    font-size: 1.375rem;
  }
}

/* long names break where the language allows, not inside a word */
.it-fill :is(.it-with b, .it-pairing b, .it-tiles b) {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* beside the picture on a short screen, a long name wraps inside its column rather than pushing it off the page */
.it-fill .it-cover .bk-words {
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* a tall phone: this one large, the two on either side beneath it */
@media (max-width: 860px) and (min-height: 740px) {
  .it-fill .it-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "here here" "prev next";
    align-items: end;
    row-gap: 1.3rem;
    max-width: min(100%, 26rem);
  }

  .it-fill .it-tiles li:nth-child(1) {
    grid-area: prev;
  }

  .it-fill .it-tiles li:nth-child(2) {
    grid-area: here;
  }

  .it-fill .it-tiles li:nth-child(3) {
    grid-area: next;
  }

  .it-fill .it-tiles .it-here .rd-face {
    display: block;
    width: min(48%, calc((100svh - var(--consent-h, 0px)) * 0.17 - var(--consent-h, 0px) * 0.25));
    margin-inline: auto;
  }

  .bk-iching.it-fill .it-tiles .it-here .rd-face,
  .bk-numerology.it-fill .it-tiles .it-here .rd-face {
    width: min(62%, calc((100svh - var(--consent-h, 0px)) * 0.26));
  }

  .it-fill .it-tiles li:not(.it-here) .rd-face {
    margin-inline: 22%;
  }

  .bk-iching.it-fill .it-tiles li:not(.it-here) .rd-face,
  .bk-numerology.it-fill .it-tiles li:not(.it-here) .rd-face {
    margin-inline: 14%;
  }

  .it-fill .it-pairing .rd-face {
    width: min(100%, 10rem, 20svh);
  }
}

/* a tall phone: the thing itself stands large on the cover */
@media (max-width: 760px) {
  .bk-oracle .it-cover .it-card {
    width: min(46vw, 24svh);
  }

  .bk-iching .it-cover .it-card {
    width: min(56vw, 24svh);
  }

  .bk-numerology .it-cover .it-card {
    width: min(64vw, 28svh);
  }

  .it-han b {
    font-size: 1.5em;
  }

  .it-trigrams dd {
    gap: 0.45rem;
  }

  .it-trigrams .it-tri {
    width: 1.8rem;
  }
}

@media (max-width: 760px) and (min-height: 740px) {
  .bk-oracle .it-cover .it-card {
    width: min(58vw, calc((100svh - var(--consent-h, 0px)) * 0.3 - var(--consent-h, 0px) * 0.4));
  }

  .bk-iching .it-cover .it-card {
    width: min(66vw, calc((100svh - var(--consent-h, 0px)) * 0.28));
  }

  .bk-numerology .it-cover .it-card {
    width: min(84vw, calc((100svh - var(--consent-h, 0px)) * 0.42));
  }

  /* the candle behind a figure this large stays within the screen */
  .it-fill .it-cover .it-card::before {
    inset: -12% -8%;
  }
}

@media (max-width: 760px) and (max-height: 700px) {
  .bk-oracle .it-cover .it-card,
  .bk-iching .it-cover .it-card,
  .bk-numerology .it-cover .it-card {
    width: 100%;
  }

  .it-pairing .rd-face {
    width: min(100%, 8rem, calc((100svh - var(--consent-h, 0px)) * 0.22));
  }

  .it-cover .it-trigrams {
    gap: 0.35rem 1rem;
    padding-top: 0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bk-iching .hexagram i,
  .bk-numerology .card.numeral span,
  .it-wake i,
  .it-count li,
  .bk-oracle .it-card .card::after {
    animation: none;
  }
}

/* ---- the scene kept bright: each pane carries its own darkness and throws a soft shadow on the painting round it ---- */
.bk-item .bk-leaf > .jr-fit {
  background: linear-gradient(160deg, rgba(32, 18, 40, 0.74), rgba(14, 7, 16, 0.68));
  box-shadow:
    inset 0 0 0 5px rgba(23, 13, 25, 0.25),
    inset 0 0 0 6px rgba(217, 169, 91, 0.13),
    0 30px 60px -30px rgba(0, 0, 0, 0.85),
    0 0 90px 24px rgba(12, 6, 14, 0.42);
}

/* on a wide screen the brightest part of the painting lies behind the pane: a denser glass there */
@media (min-width: 861px) {
  .bk-item .bk-leaf > .jr-fit {
    background: linear-gradient(160deg, rgba(32, 18, 40, 0.8), rgba(14, 7, 16, 0.76));
  }
}

/* the oracle's painting is the brightest of them: its pane is the densest */
.bk-oracle .bk-leaf > .jr-fit {
  background: linear-gradient(160deg, rgba(32, 18, 40, 0.84), rgba(14, 7, 16, 0.8));
}

/* the small print stays readable over the brighter scene */
.bk-item .it-fine {
  color: #dccfb7;
}

/* the words of a cover stand in a pool of shadow, and the golden button with them, so they read over a bright hand */
.bk-item .it-cover .bk-words::before,
.bk-item .it-cover .bk-lede::before,
.bk-item .it-cover .bk-open::before {
  content: "";
  position: absolute;
  inset: -0.8rem -1.6rem;
  z-index: -1;
  border-radius: 2.5rem;
  background: rgba(14, 7, 16, 0.5);
  filter: blur(24px);
  pointer-events: none;
}

.bk-item .it-cover .bk-open::before {
  inset: -1.6rem -1.4rem;
  background: radial-gradient(closest-side, rgba(14, 7, 16, 0.7), rgba(14, 7, 16, 0));
}

.bk-item .it-cover .bk-open .button {
  box-shadow:
    0 0 0 1px rgba(255, 236, 200, 0.4),
    0 10px 26px -6px rgba(0, 0, 0, 0.9);
}

/* a wide screen: the picture and the words as one block in the middle, not the words running to the right edge */
@media (min-width: 861px) {
  .bk-item .it-cover > .jr-fit {
    grid-template-columns: auto minmax(0, 38rem);
    justify-content: center;
  }

  /* a hexagram and a number are drawn larger than a card's column allows: they are wider than they are tall */
  .bk-iching .it-faced:not(.bk-tight) > .jr-fit,
  .bk-numerology .it-faced:not(.bk-tight) > .jr-fit {
    grid-template-columns: minmax(0, min(24rem, calc((100svh - var(--consent-h, 0px) - 300px) * 0.72))) minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* a large screen: the open page has presence, a larger pane, larger pictures and type */
@media (min-width: 1200px) and (min-height: 800px) {
  .bk-item .bk-leaf > .jr-fit {
    padding: clamp(2.2rem, 3.6vh, 3rem) clamp(2.6rem, 3.4vw, 3.6rem);
  }

  .bk-item .bk-title {
    font-size: clamp(2.75rem, 3.2vw, 3.25rem);
  }

  .bk-iching .it-faced:not(.bk-tight) > .jr-fit,
  .bk-numerology .it-faced:not(.bk-tight) > .jr-fit {
    grid-template-columns: minmax(0, min(28rem, calc((100svh - var(--consent-h, 0px) - 300px) * 0.76))) minmax(0, 1fr) minmax(0, 1fr);
  }

  .it-image > .jr-fit {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  }

  .it-two-up > .jr-fit {
    max-width: 66rem;
  }

  .it-two-up .it-duo {
    --w: clamp(6rem, 8.4vw, 8.6rem);
  }
}

/* the cover's small lines carry their own shadow where a bright card or hand lies behind them */
.bk-item .it-cover .bk-words {
  text-shadow: 0 1px 2px rgba(10, 5, 12, 0.85), 0 0 14px rgba(10, 5, 12, 0.9);
}

.bk-item .it-cover .bk-words .it-han b {
  text-shadow: none;
}

/* a tall phone: the two cards read together, the pictures large and what they say beneath, on a pane no taller than
   what it holds, in the middle of the scene */
@media (max-width: 860px) and (min-height: 740px) {
  .it-fill .it-two-up > .jr-fit {
    min-height: 0;
  }

  .it-fill .it-two-up .it-pairs a {
    gap: 1.3rem;
  }

  .it-fill .it-two-up .it-duo {
    --w: min(11rem, calc(48vw - 1.8rem), calc((100svh - var(--consent-h, 0px)) * 0.21 - var(--consent-h, 0px) * 0.14));
  }
}

/* a phone: the pool of shadow under the cover's words stays within the screen */
@media (max-width: 760px) {
  .bk-item .it-cover .bk-words::before,
  .bk-item .it-cover .bk-lede::before {
    inset: -0.6rem 0;
  }
}

/* the heading reads as what is searched for (worker/itempages.ts): the name large, the rest a small line beside it */
.it-h1 .it-name,
.it-h1 .it-sub {
  display: block;
}

.it-h1 .it-sub {
  margin: 0.2rem 0;
  font-family: var(--text);
  font-size: clamp(0.875rem, 1.3vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.3;
  color: var(--gold-bright);
  text-shadow: 0 1px 12px rgba(10, 4, 12, 0.95);
}

/* on a desk the small lines of a cover are read from further away: larger, brighter, in a deeper pool of shadow */
@media (min-width: 861px) {
  .bk-item .it-cover .bk-words::before,
  .bk-item .it-cover .bk-lede::before {
    background: rgba(14, 7, 16, 0.66);
  }

  .bk-item .it-cover .bk-crumbs {
    font-size: 1.125rem;
  }

  .bk-item .it-facts dt {
    font-size: 1.1875rem;
    color: var(--gold-bright);
  }

  .bk-item .it-facts dt,
  .bk-item .it-facts dd {
    text-shadow: 0 1px 12px rgba(10, 4, 12, 0.95);
  }
}

/* ---- ITEMS-END ---- */

/* ---- PHUB-BEGIN ---- the page of all items of a practice (practiceHub in worker/practicepages.ts): /rune-meanings,
        /lenormand-cards, /oracle-cards, /i-ching-hexagrams, /numerology-numbers. Its tables lie up to six tiles to a
        page, one row on a wide screen and two rows of three on a phone, each picture as large as the height allows; a
        table that would leave its pictures too small is cut in two by journal.js (data-split). Under .ph only. ---- */
.ph {
  --svh: calc(100svh - var(--consent-h, 0px));
  --ratio: 1.68; /* how much taller than wide a face is drawn: a card, a hexagram, a number */
  --shade: rgba(14, 7, 16, 0.76); /* behind a word that stands on the painting */
}

.ph-runes {
  --ratio: 1.45; /* a stone, with the room round it */
}

/* the painting stays in sight on every page: only its edges are darkened, for the menu above and the buttons below;
   the words are kept legible by a shade of their own, not by darkening the whole scene */
.ph .rd-film::after {
  background:
    radial-gradient(95% 80% at 50% 52%, rgba(18, 9, 20, 0.08), rgba(18, 9, 20, 0.46)),
    linear-gradient(to bottom, rgba(18, 9, 20, 0.72), rgba(18, 9, 20, 0) 22%, rgba(18, 9, 20, 0) 78%, rgba(18, 9, 20, 0.78));
}

.rd.ph.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.12);
}

/* a pool of shadow behind a block of words */
.ph .rd-table .jr-heading,
.ph .rd-whole > .jr-fit {
  position: relative;
  isolation: isolate;
}

.ph .rd-table .jr-heading::before,
.ph .rd-whole > .jr-fit::before {
  content: "";
  position: absolute;
  inset: -0.9rem -2.2rem;
  z-index: -1;
  border-radius: 2.5rem;
  background: radial-gradient(closest-side, rgba(14, 7, 16, 0.8), rgba(14, 7, 16, 0.6) 60%, rgba(14, 7, 16, 0));
  pointer-events: none;
}

.ph .rd-whole > .jr-fit::before {
  inset: -2.4rem -3rem;
}

/* a rune on its tile is cut into a river stone and the cut filled with gold leaf, as on the rune's own page */
.ph-runes .card.stone {
  container-type: inline-size;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 28% 14%, rgba(255, 236, 205, 0.24), transparent 52%),
    radial-gradient(90% 80% at 76% 96%, rgba(0, 0, 0, 0.66), transparent 62%),
    linear-gradient(155deg, #62574d, #2e2723 58%, #151210);
}

.ph-runes .card.stone span {
  color: transparent;
  background: linear-gradient(168deg, #fff3cc 0%, #f1cd8b 26%, #b47d2b 54%, #f5d595 76%, #8a5a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0.03em #e4b96b;
  text-shadow: none;
  font-size: 50cqw;
  filter: drop-shadow(0 -1px 0.5px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 0 rgba(255, 236, 200, 0.4)) drop-shadow(0 0 10px rgba(239, 200, 136, 0.45));
  padding: 0.12em 0.2em;
}

/* a number or a hexagram lies on a lacquered tablet in a double frame of gold, its figures and lines cut from the
   same gold leaf as on the item's own page */
.ph-numerology .card.numeral,
.ph-iching .card.hexagram {
  background:
    radial-gradient(120% 70% at 30% 8%, rgba(255, 226, 170, 0.2), transparent 55%),
    radial-gradient(90% 60% at 50% 100%, rgba(0, 0, 0, 0.5), transparent 70%),
    linear-gradient(165deg, #3c2346, #1d1022 60%, #120a15);
  outline: 1px solid rgba(232, 190, 115, 0.75);
  outline-offset: -7%;
  box-shadow:
    inset 0 0 0 3px rgba(18, 9, 20, 0.9),
    inset 0 0 0 4px rgba(217, 169, 91, 0.45),
    inset 0 1px 0 5px rgba(255, 236, 200, 0.08),
    0 0 0 1px rgba(239, 200, 136, 0.4),
    0 18px 30px -8px rgba(0, 0, 0, 0.85),
    0 0 46px rgba(239, 180, 100, 0.16);
}

/* a number's tablet is squarer than a card, so its figure fills it */
.ph-numerology {
  --ratio: 1.3;
}

.ph-numerology .card.numeral {
  aspect-ratio: 4 / 5;
}

.ph-numerology .card.numeral span {
  padding: 0 0.04em;
  font: 400 66cqw / 1 var(--display);
  font-variant-numeric: lining-nums;
  letter-spacing: -0.02em;
  color: transparent;
  background:
    linear-gradient(100deg, rgba(255, 250, 232, 0) 40%, rgba(255, 250, 232, 0.75) 49%, rgba(255, 250, 232, 0) 58%) 120% 0 / 250% 100% no-repeat,
    linear-gradient(172deg, #fff4d0 0%, #f2cf8a 22%, #c08a3a 48%, #f3d494 70%, #8a5a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 3px 1.5px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 20px rgba(239, 186, 104, 0.4));
}

.ph-iching .hexagram i {
  border-radius: 1.5px;
  background:
    linear-gradient(100deg, rgba(255, 250, 232, 0) 40%, rgba(255, 250, 232, 0.7) 49%, rgba(255, 250, 232, 0) 58%) 120% 0 / 250% 100% no-repeat,
    linear-gradient(180deg, #fff6d8 0%, #f2cf8a 15%, #d39f4c 38%, #8e5b1f 58%, #d8ab5f 80%, #a8722c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 238, 0.85),
    inset 0 -1px 1px rgba(60, 30, 5, 0.75),
    0 2px 4px rgba(0, 0, 0, 0.6);
}

.ph-iching .hexagram i.yin {
  -webkit-mask: linear-gradient(90deg, #000 0 41%, transparent 41% 59%, #000 59%);
  mask: linear-gradient(90deg, #000 0 41%, transparent 41% 59%, #000 59%);
}

/* the cover: its words stand in a soft pool of shadow, so they read over the brightest part of the painting */
.ph .rd-cover .jr-fit {
  position: relative;
  isolation: isolate;
}

.ph .rd-cover .jr-fit::before {
  content: "";
  position: absolute;
  inset: -1.5rem -2.5rem;
  z-index: -1;
  border-radius: 3rem;
  background: radial-gradient(closest-side, rgba(14, 7, 16, 0.74), rgba(14, 7, 16, 0.5) 62%, rgba(14, 7, 16, 0));
  pointer-events: none;
}

.ph .rd-cover .when {
  font-size: 1.125rem;
  color: var(--gold-bright);
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

.ph .rd-cover .opening {
  max-width: 40rem;
  font-size: clamp(1.125rem, 1.45vw, 1.375rem);
  color: var(--bone);
  text-shadow: 0 1px 14px rgba(10, 4, 12, 0.95);
}

/* a table */
.ph .rd-table > .jr-fit {
  max-width: 88rem;
}

.ph .rd-table .jr-heading {
  max-width: 58rem;
}

.ph .rd-table h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.75rem);
  line-height: 1.08;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.8);
}

.ph .rd-table .jr-heading p {
  margin-top: 0.45rem;
  font-size: 1.0625rem;
  color: #d8cbb4;
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

.ph .ph-spread {
  --g: clamp(14px, 2vw, 32px);
  /* the width a picture may have for the row to stand on the screen with the heading, the number and the name */
  --tw: calc((var(--svh) - 410px) / var(--ratio));
  margin-top: clamp(16px, 3.4vh, 40px);
  gap: clamp(14px, 2.4vh, 24px) var(--g);
}

.ph .ph-spread li {
  flex: 0 0 max(64px, min(14rem, var(--tw), calc((100% - (var(--cols) - 1) * var(--g)) / var(--cols))));
}

.ph .ph-spread .card {
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.3),
    0 18px 30px -8px rgba(0, 0, 0, 0.85),
    0 0 44px rgba(239, 180, 100, 0.12);
}

.ph .ph-spread .card.stone {
  box-shadow:
    inset 0 2px 3px rgba(255, 240, 215, 0.22),
    inset 0 -10px 22px rgba(0, 0, 0, 0.6),
    0 22px 30px -10px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(239, 180, 100, 0.14);
}

.ph .ph-spread em,
.ph .ph-spread strong {
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

/* the number: a lining numeral in a small ring of gold, above the name */
.ph .ph-spread em {
  display: table;
  min-width: 2em;
  margin: 0.8rem auto 0.35rem;
  padding: 0.05em 0.5em;
  border: 1px solid rgba(217, 169, 91, 0.6);
  border-radius: 999px;
  background: rgba(14, 7, 16, 0.9); /* gold on this is 10:1 or better even over white paint */
  font: 500 1rem/1.4 var(--text);
  font-style: normal;
  font-variant-numeric: lining-nums;
  color: var(--gold-bright);
  text-shadow: none;
}

/* the name, on a shade of its own so it reads over any part of the painting */
.ph .ph-spread strong {
  display: table;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.18em 0.6em 0.24em;
  border-radius: 0.8em;
  background: rgba(14, 7, 16, 0.9); /* the name on this is 13:1 or better even over white paint */
  box-shadow: 0 0 14px 4px rgba(14, 7, 16, 0.45);
  font: 400 1.1875rem/1.2 var(--display);
  color: #f3e8d4;
}

@media (hover: hover) {
  .ph .ph-spread a:hover .rd-face {
    translate: 0 -10px;
    filter: drop-shadow(0 0 26px rgba(217, 169, 91, 0.45));
  }
}

.ph .ph-spread a:focus-visible .rd-face {
  translate: 0 -10px;
  filter: drop-shadow(0 0 26px rgba(217, 169, 91, 0.45));
}

.ph .ph-spread a {
  display: block;
  color: var(--bone);
  text-align: center;
  text-decoration: none;
}

/* a phone: two rows of three, or one row once journal.js has cut the table for a short screen */
@media (max-width: 760px) {
  .ph .rd-table h2 {
    font-size: 1.5rem;
  }

  .ph .rd-table .jr-heading p {
    font-size: 0.9375rem;
    line-height: 1.35;
  }

  .ph .ph-spread {
    --g: 10px;
    --tw: calc((var(--svh) - 290px - var(--mrows, 2) * 44px) / var(--mrows, 2) / var(--ratio));
    margin-top: 14px;
    gap: 12px var(--g);
  }

  /* no more to a row than the table asks for (--mcols), however small the tiles are drawn */
  .ph .ph-spread {
    --tile: max(48px, min(9rem, var(--tw)));
    max-width: calc(var(--mcols) * var(--tile) + (var(--mcols) - 1) * var(--g));
    margin-inline: auto;
  }

  .ph .ph-spread li {
    flex-basis: min(var(--tile), calc((100% - (var(--mcols) - 1) * var(--g)) / var(--mcols)));
  }

  .ph .ph-spread em {
    display: none;
  }

  .ph .ph-spread strong {
    margin-top: 0.4rem;
    padding: 0.14em 0.45em 0.18em;
    font-size: 0.9375rem;
    line-height: 1.15;
    box-shadow: 0 0 10px 3px rgba(14, 7, 16, 0.4);
  }
}

/* a short phone: the line that says what to do gives its room to the pictures */
@media (max-width: 760px) and (max-height: 700px) {
  .ph .rd-table .jr-heading p {
    display: none;
  }

  .ph .ph-more p.tools {
    gap: 0.2rem;
    margin-top: 0.8rem;
  }

  .ph .ph-more p.fine {
    margin-top: 0.8rem;
  }
}

/* the other pages of meanings: on a wide screen they lie under the way into a reading (data-join), without a title */
.ph .bk-part .jr-heading {
  display: none;
}

.ph .ph-more .tools a,
.ph .rd-whole .bk-part .tools a {
  text-shadow: 0 1px 10px rgba(10, 4, 12, 0.95);
}

.ph .ph-more .fine,
.ph .rd-whole .bk-part .fine {
  color: #d8cbb4;
}

.ph .rd-whole .bk-part .fine {
  margin-top: 1.6rem;
}

@media (max-width: 760px) {
  .ph .ph-more .tools {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.1rem;
  }

  .ph .ph-more .fine {
    margin-top: 1rem;
  }
}

/* ---- PHUB-END ---- */

/* a page that cannot be fitted at the least size words may have (journal.js) scrolls within itself, never the screen */
.jr-page.jr-over {
  overflow-y: auto;
  align-items: start;
}

/* ---- LP-BEGIN ---- the pages that draw one card (landingPage in worker/cards.ts): /yes-or-no-tarot,
        /tarot-card-of-the-day, /love-tarot-reading and /one-card-tarot. Each is one screen: the shared book over the
        film of the table. Its cover is the deck lying face down, or the card that was drawn, turned over.
        Everything here is under .lp, the class only those pages carry. ---- */

/* the table is lit: the film stays clear behind the cover, so the candles burn at its corners */
.lp .rd-film::after {
  background:
    radial-gradient(72% 60% at 50% 50%, rgba(18, 9, 20, 0.36), rgba(18, 9, 20, 0.58)),
    linear-gradient(to bottom, rgba(18, 9, 20, 0.8), rgba(18, 9, 20, 0) 24%, rgba(18, 9, 20, 0) 76%, rgba(18, 9, 20, 0.86));
}

.lp.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.34);
}

.lp :is(a, button):focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: 4px;
}

/* the cover: the deck or the card on one side, the words on the other */
.lp-cover > .jr-fit {
  /* the card is sized by the room the book has: the screen, less the bar that asks about counting visits */
  --room: calc(100svh - var(--consent-h, 0px));
  --w: min(21rem, 28vw, calc(var(--room) * 0.4));
  max-width: 66rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto auto auto 1fr;
  column-gap: clamp(2.2rem, 6vw, 6rem);
  text-align: left;
}

.lp-deck,
.lp-card {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  width: var(--w);
}

.lp-words {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  container-type: inline-size;
}

/* the words stand over the shadow the deck throws, not under it */
.lp-words,
.lp-say,
.lp-act {
  position: relative;
  z-index: 1;
}

.lp-say {
  grid-column: 2;
  grid-row: 3;
  margin: 1.1rem 0 0;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.75);
  text-wrap: pretty;
}

.lp-act {
  grid-column: 2;
  grid-row: 4;
  margin: 1.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.7rem;
}

.lp-cover h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4.7vw, 4.5rem);
  overflow-wrap: break-word;
}

/* the way on to the next page, at the end of the words that are continued there */
.lp-say .lp-on {
  margin: -0.7em 0;
  padding: 0.7em 0;
  font-style: italic;
  white-space: nowrap;
  color: var(--gold-bright);
}

.lp-on:not(.button)::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin: 0 0.15em 0.08em 0.4em;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  rotate: 45deg;
  transition: translate 0.3s;
}

.lp-on:not(.button):hover::after {
  translate: 4px 0;
}

.lp-act a:not(.button) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-style: italic;
  font-size: 1.1875rem;
  color: var(--gold-bright);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

/* ---- before the draw: the deck, face down on the velvet ---- */

/* a pile is larger than a card: its lower cards lie askew, so it is given a little less of the screen */
.lp-ready .lp-cover > .jr-fit {
  --w: min(21rem, 28vw, calc(var(--room) * 0.37));
}

.lp-deck {
  position: relative;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* candlelight pooled on the cloth under the deck */
.lp-deck::before,
.lp-card::before {
  content: "";
  position: absolute;
  inset: -22% -34%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(239, 180, 110, 0.3), rgba(217, 140, 80, 0.1) 55%, rgba(217, 169, 91, 0));
  pointer-events: none;
}

.lp-stack {
  position: relative;
  display: block;
  aspect-ratio: 560 / 939;
  transform: perspective(1300px) rotateX(calc(7deg + var(--ty, 0) * -8deg)) rotateY(calc(var(--tx, 0) * 10deg)) rotate(-3deg);
  transition: transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* cards that have slipped a little out of true, lower in the pile */
.lp-stack i {
  position: absolute;
  inset: 0;
  border-radius: 4.5% / 2.7%;
  background: #2a1420 url("/cards/back.webp") center / cover no-repeat;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65);
}

.lp-stack i:nth-child(1) {
  translate: 5.5% 5.4%;
  rotate: 5deg;
  filter: brightness(0.5);
}

.lp-stack i:nth-child(2) {
  translate: -3.5% 4.4%;
  rotate: -3.5deg;
  filter: brightness(0.6);
}

.lp-stack i:nth-child(3) {
  translate: 2.6% 3.6%;
  rotate: 1.8deg;
  filter: brightness(0.7);
}

/* the pile itself: the edges of the cards under the top one, and the shadow the whole deck throws */
.lp-stack i:nth-child(4) {
  translate: 0 2.2%;
  filter: brightness(0.8);
  box-shadow:
    0 1px 0 #cdb991,
    0 2px 0 #7d6748,
    0 3px 0 #d6c39c,
    0 4px 0 #84704f,
    0 5px 0 #cbb68d,
    0 6px 0 #6f5b40,
    0 7px 0 #c2ad85,
    0 8px 0 #5b4a34,
    0 calc(var(--w) * 0.07) calc(var(--w) * 0.1) -4px rgba(0, 0, 0, 0.85),
    0 calc(var(--w) * 0.12) calc(var(--w) * 0.2) -10px rgba(0, 0, 0, 0.7);
}

.lp-stack .card {
  position: relative;
  display: block;
  margin: 0;
  rotate: none;
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.22),
    0 1px 0 #d9c7a2,
    0 2px 0 #8a7453,
    0 3px 0 #d6c39c,
    0 5px 9px rgba(0, 0, 0, 0.6),
    0 0 70px rgba(217, 169, 91, 0.16);
  transition:
    translate 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    rotate 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    scale 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.55s;
}

/* a slow glint of candlelight crosses the top card, and the card that was drawn */
.lp-stack .card::after,
.lp-front::after {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, rgba(255, 240, 210, 0) 42%, rgba(255, 240, 210, 0.28) 50%, rgba(255, 240, 210, 0) 58%);
  translate: -70% 0;
  animation: lp-glint 6.5s 1.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lp-glint {
  0%,
  55% {
    translate: -70% 0;
  }

  100% {
    translate: 70% 0;
  }
}

/* the top card rises to the hand: under the pointer, and when the button that draws it is reached */
.lp-deck:hover .card,
.lp-cover:has(.lp-act .button:is(:hover, :focus-visible)) .lp-stack .card {
  translate: 1.5% -5%;
  rotate: 2.5deg;
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.4),
    0 22px 30px -6px rgba(0, 0, 0, 0.75),
    0 0 90px rgba(239, 200, 136, 0.34);
}

/* pressed: it leaves the deck while the page it is turned over on is fetched (public/pages.js) */
.lp-going .lp-stack .card {
  translate: 6% -16%;
  rotate: 7deg;
  scale: 1.05;
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.5),
    0 40px 50px -8px rgba(0, 0, 0, 0.7),
    0 0 110px rgba(239, 200, 136, 0.45);
}

/* ---- after the draw: the card, turned over ---- */

.lp-card {
  position: relative;
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 14deg)) rotateX(calc(var(--ty, 0) * -10deg));
  transition: transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  animation: lp-float 7s 2.2s ease-in-out infinite;
}

.lp-card::before {
  inset: -16% -30%;
  background: radial-gradient(closest-side, rgba(239, 200, 136, 0.46), rgba(239, 200, 136, 0.12) 55%, rgba(239, 200, 136, 0));
  animation: lp-glow 2.6s 0.9s ease-out both;
}

.lp-flip {
  position: relative;
  transform-style: preserve-3d;
  animation: lp-turn 1.5s 0.3s cubic-bezier(0.3, 0.1, 0.2, 1) both;
}

.lp-flip .card {
  position: relative;
  margin: 0;
  rotate: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.2),
    0 1px 1px rgba(0, 0, 0, 0.5),
    0 30px 44px -10px rgba(0, 0, 0, 0.8),
    0 0 80px rgba(217, 169, 91, 0.2);
}

.lp-flip .lp-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

.lp-flip img {
  height: 100%;
  object-fit: cover;
}

.lp-flip img.rev,
.lp-thumb img.rev {
  rotate: 180deg;
}

/* it lies face down, is lifted from the table, turned in the hand and set down again */
@keyframes lp-turn {
  0% {
    transform: perspective(1200px) translateY(0) rotateY(180deg) rotate(3deg) scale(0.9);
  }

  30% {
    transform: perspective(1200px) translateY(-7%) rotateY(168deg) rotate(1deg) scale(1.03);
  }

  74% {
    transform: perspective(1200px) translateY(-3%) rotateY(-7deg) rotate(0deg) scale(1.04);
  }

  100% {
    transform: perspective(1200px) translateY(0) rotateY(0deg) rotate(0deg) scale(1);
  }
}

@keyframes lp-glow {
  0% {
    opacity: 0;
  }

  45% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

@keyframes lp-float {
  50% {
    translate: 0 -9px;
  }
}

/* "Draw another card" pressed: this one is turned face down again while the next is fetched */
.lp-going .lp-flip {
  animation: lp-away 0.6s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes lp-away {
  to {
    transform: perspective(1200px) translateY(-4%) rotateY(180deg) rotate(3deg) scale(0.94);
  }
}

/* the words come up once the card has turned; before a draw they are simply there with the deck */
.lp-shown .lp-words,
.lp-shown .lp-say,
.lp-shown .lp-act {
  animation: lp-say 0.9s 1.25s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.lp-shown .lp-say {
  animation-delay: 1.45s;
}

.lp-shown .lp-act {
  animation-delay: 1.65s;
}

.lp-ready .lp-cover > .jr-fit {
  animation: lp-say 1.1s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes lp-say {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

/* once a card lies there the page's own name is a line above it, and the card's name is what is read */
.lp-shown .lp-cover h1 {
  font: italic 1.1875rem / 1.3 var(--text);
  color: var(--gold);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

.lp-shown .lp-cover .when {
  margin: 0.2rem 0 0;
  font-size: 1.0625rem;
  color: var(--gold);
  text-align: left;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

.lp .lp-name {
  margin: 0.55rem 0 0;
  font: 400 clamp(2.3rem, 4.5vw, 4.1rem) / 1.04 var(--display);
  color: var(--bone);
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.75);
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* the card of the day keeps its name as a heading: it is what the visitor came for */
.lp-daily.lp-shown .lp-cover h1 {
  font: 400 clamp(1.5rem, 2.3vw, 2.1rem) / 1.1 var(--display);
  color: var(--gold-bright);
}

/* yes, no or maybe: the answer is the largest thing on the page, in gilt, and the card that gave it is named under it */
.lp-yesno .lp-name {
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
}

.lp-answer {
  display: block;
  width: fit-content;
  /* room for the tail of a J and the swash of a Y: gilt is painted only inside the box */
  margin: -0.04em 0 0.02em -0.14em;
  padding: 0.04em 0.1em 0.12em 0.14em;
  /* never wider than the column it stands in: --n is the number of letters in the word (worker/cards.ts) */
  font-size: min(clamp(4.6rem, 10vw, 8.2rem), calc(100cqi / (var(--n, 3) * 0.54)));
  line-height: 0.98;
  color: var(--gold-bright);
  text-shadow: none;
  filter: drop-shadow(0 3px 20px rgba(0, 0, 0, 0.7));
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .lp-answer {
    background: linear-gradient(176deg, #fff3d4 8%, #f0cb8b 36%, #c08a3e 66%, #f1d298 92%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .lp-answer.lp-no {
    background-image: linear-gradient(176deg, #f6dccb 8%, #dca189 38%, #a85f4c 68%, #e0ab93 92%);
  }

  .lp-answer.lp-maybe {
    background-image: linear-gradient(176deg, #fbf6ec 8%, #d9cfe0 38%, #9d91b4 68%, #e3dbe9 92%);
  }
}

/* ---- the pages after the cover ---- */

.lp-leaf .bk-title {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(217, 169, 91, 0.3);
  color: var(--gold-bright);
}

.lp-leaf p {
  margin-top: 0.9rem;
  font-size: clamp(1.125rem, 1.5vw, 1.34rem);
  line-height: 1.55;
  text-wrap: pretty;
}

/* a leaf: the card that was drawn, or the back of the deck, stands beside the words */
.lp-leaf > .jr-fit {
  max-width: 58rem;
  display: grid;
  grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(1.4rem, 3.4vw, 3rem);
}

.lp-thumb {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
}

.lp-thumb .card {
  margin: 0;
  rotate: none;
}

.lp-leaf .bk-title {
  grid-column: 2;
  grid-row: 2;
}

.lp-body {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
}

.lp-leaf .lp-links {
  font-size: 1.125rem;
}

.lp-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--gold-bright);
}

.lp-offer .again {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.6rem;
}

.lp-offer .card-alt {
  color: var(--bone);
}

.lp .lp-near {
  margin-top: 1.5rem;
  gap: 0.2rem 1.7rem;
}

.lp-near a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 1.125rem;
  color: var(--bone);
}

.lp-last .fine {
  margin-top: 1.1rem;
}

.lp-foot {
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.5rem;
  font-size: 0.9375rem;
}

.lp-foot a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--dim);
}

/* ---- a phone: the deck or the card stands beside the name, and the words run under both ---- */
@media (max-width: 760px) {
  .lp .lp-cover > .jr-fit {
    --w: min(36vw, calc(var(--room) * 0.2));
    grid-template-columns: var(--w) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 1.1rem;
    align-items: center;
  }

  .lp-deck,
  .lp-card {
    grid-row: 1;
  }

  .lp-words {
    grid-row: 1;
  }

  .lp-say {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 1.05rem;
    font-size: 1.0625rem;
    line-height: 1.5;
  }

  .lp-act {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 1rem;
  }

  .lp-act .button:only-child {
    flex: 1 1 auto;
  }

  .lp-cover h1 {
    font-size: clamp(1.9rem, 8.6vw, 2.5rem);
    line-height: 1.04;
  }

  .lp-shown .lp-cover h1 {
    font-size: 1.0625rem;
  }

  .lp-daily.lp-shown .lp-cover h1 {
    font-size: 1.3rem;
  }

  .lp-shown .lp-cover .when {
    font-size: 1rem;
  }

  .lp .lp-name {
    margin-top: 0.4rem;
    font-size: clamp(1.6rem, 7.4vw, 2.1rem);
  }

  .lp-yesno .lp-name {
    font-size: 1.3rem;
  }

  .lp-answer {
    font-size: min(clamp(3.2rem, 15vw, 4.2rem), calc(100cqi / (var(--n, 3) * 0.54)));
  }

  .lp-leaf > .jr-fit {
    grid-template-columns: 3.6rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.9rem;
    align-items: center;
  }

  .lp-thumb {
    grid-row: 1;
  }

  .lp-leaf .bk-title {
    grid-row: 1;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .lp-body {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0.7rem;
    border-top: 1px solid rgba(217, 169, 91, 0.3);
  }

  .lp-leaf p {
    margin-top: 0.65rem;
    font-size: 1.0625rem;
    line-height: 1.47;
  }

  .lp-leaf .lp-links {
    margin-top: 0.3rem;
    font-size: 1.0625rem;
  }

  .lp .lp-near {
    margin-top: 0.9rem;
    gap: 0 1.3rem;
  }

  .lp-near a {
    font-size: 1.0625rem;
  }
}

/* a short phone: less air between the lines, before anything has to shrink */
@media (max-width: 760px) and (max-height: 720px) {
  .lp.lp-ready .lp-cover > .jr-fit {
    --w: min(34vw, calc(var(--room) * 0.19));
  }

  .lp-say {
    margin-top: 0.75rem;
  }

  .lp-act {
    margin-top: 0.75rem;
  }

  .lp-last .synthesis {
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.42;
  }

  .lp .lp-near {
    margin-top: 0.4rem;
  }

  .lp-near a,
  .lp-foot a {
    min-height: 40px;
  }

  .lp-last .fine {
    margin-top: 0.4rem;
    font-size: 0.875rem;
  }

  .lp-foot {
    margin-top: 0;
  }

  .lp-leaf .lp-links {
    margin-top: 0.15rem;
  }
}

/* a tall phone has room for a larger card */
@media (max-width: 760px) and (min-height: 780px) {
  .lp .lp-cover > .jr-fit {
    --w: min(42vw, calc(var(--room) * 0.235));
  }
}

/* the cards a page without a card of its own lays on the cloth: the spread it offers, or the card that was drawn */
.lp-fan {
  --cw: clamp(4.4rem, 7vw, 6.4rem);
  position: relative;
  width: calc(var(--cw) * (1 + (var(--n) - 1) * 0.62));
  height: calc(var(--cw) * 1.68 + var(--cw) * 0.12 * (var(--n) - 1));
  margin: 0 auto 1.3rem;
}

/* candlelight pooled under them */
.lp-fan::before {
  content: "";
  position: absolute;
  inset: -18% -40%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(239, 180, 110, 0.26), rgba(217, 140, 80, 0.08) 58%, rgba(217, 169, 91, 0));
  pointer-events: none;
}

.lp-fan .card {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--cw);
  margin: 0 0 0 calc(var(--cw) / -2);
  rotate: none;
  transform-origin: 50% 210%;
  transform: rotate(calc(var(--i) * 10deg));
  box-shadow:
    0 0 0 1px rgba(239, 200, 136, 0.24),
    0 1px 1px rgba(0, 0, 0, 0.5),
    0 14px 22px -6px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(217, 169, 91, 0.16);
}

.lp-fan .card img {
  display: block;
  width: 100%;
  height: auto;
}

.lp-fan img.rev {
  rotate: 180deg;
}

/* a card alone is held larger, and tilted a little, as a card set down by hand */
.lp-fan.lp-lone {
  --cw: clamp(5.4rem, 8.4vw, 7.6rem);
}

.lp-lone .card {
  transform: rotate(-2.5deg);
  transform-origin: 50% 50%;
}

@media (max-width: 760px) {
  .lp-fan {
    --cw: 3.6rem;
    margin-bottom: 0.9rem;
  }

  .lp-fan.lp-lone {
    --cw: 4.6rem;
  }
}

/* a short phone keeps its room for the words: the spread is smaller, and the last page has none */
@media (max-width: 760px) and (max-height: 720px) {
  .lp-fan,
  .lp-fan.lp-lone {
    --cw: 3rem;
    margin-bottom: 0.6rem;
  }

  .lp-last .lp-fan {
    display: none;
  }
}

/* the shortest phones keep every line for the words: the offer has no spread either */
@media (max-width: 760px) and (max-height: 660px) {
  .lp-fan {
    display: none;
  }
}

/* with scripts off the book lies open as one long page, and the cover needs no room kept for a menu's second line */
@media (scripting: none) {
  .lp-cover > .jr-fit {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-card,
  .lp-card::before,
  .lp-flip,
  .lp-going .lp-flip,
  .lp-stack .card::after,
  .lp-front::after,
  .lp-shown .lp-words,
  .lp-shown .lp-say,
  .lp-shown .lp-act,
  .lp-ready .lp-cover > .jr-fit {
    animation: none;
  }

  .lp-flip .lp-back {
    display: none;
  }

  .lp-stack,
  .lp-stack .card,
  .lp-card {
    transition: none;
  }

  .lp-deck:hover .card,
  .lp-cover:has(.lp-act .button:is(:hover, :focus-visible)) .lp-stack .card,
  .lp-going .lp-stack .card {
    translate: none;
    rotate: none;
    scale: none;
  }
}
/* ---- LP-END ---- */

/* ---- BIRTH-BEGIN ---- the birth card's own pages (worker/birthpages.ts, /birth-card/the-magician): the painting kept
        in sight behind the open book, each pane carrying its own darkness, and presence on a large screen. Everything
        here is under .bk-birth, the class only that book carries. ---- */

/* the paler words of the book are a step brighter, since the scene behind the pane is no longer drawn down */
.bk-birth {
  --dim: #d9ccb6;
}

.bk-birth .bc-shade ul {
  color: #ddd0bb;
}

/* the painting stays in sight: a band at the top and the foot for the menu and the turning buttons, and a soft edge */
.bk-birth .rd-film::after {
  background:
    linear-gradient(to bottom, rgba(18, 9, 20, 0.74), rgba(18, 9, 20, 0) 19%, rgba(18, 9, 20, 0) 76%, rgba(18, 9, 20, 0.8)),
    radial-gradient(125% 95% at 50% 48%, rgba(18, 9, 20, 0.04), rgba(18, 9, 20, 0.18) 62%, rgba(18, 9, 20, 0.46));
}

.bk-birth.opened .rd-film::after {
  background-color: rgba(18, 9, 20, 0.08);
}

/* a pane of denser glass that throws a soft shadow on the painting round it */
.bk-birth .bk-leaf > .jr-fit,
.bk-birth .bk-last .card-go {
  background: linear-gradient(160deg, rgba(32, 18, 40, 0.82), rgba(14, 7, 16, 0.78));
  box-shadow:
    inset 0 0 0 5px rgba(23, 13, 25, 0.25),
    inset 0 0 0 6px rgba(217, 169, 91, 0.13),
    0 30px 60px -30px rgba(0, 0, 0, 0.85),
    0 0 90px 24px rgba(12, 6, 14, 0.42);
}

/* the cover's words, the small print under the last page and the golden button stand in a pool of shadow */
.bk-birth .bk-cover .bk-words::before,
.bk-birth .bk-cover .bk-lede::before,
.bk-birth .bk-cover .bk-open::before,
.bk-birth .bk-last .card-note::before {
  content: "";
  position: absolute;
  inset: -0.8rem -1.6rem;
  z-index: -1;
  border-radius: 2.5rem;
  background: rgba(14, 7, 16, 0.72);
  filter: blur(20px);
  pointer-events: none;
}

.bk-birth .bk-via {
  color: var(--gold-bright);
}

.bk-birth .bk-cover .bk-open::before {
  inset: -1.6rem -1.4rem;
  background: radial-gradient(closest-side, rgba(14, 7, 16, 0.72), rgba(14, 7, 16, 0));
}

.bk-birth .bk-last .card-note {
  position: relative;
  z-index: 1;
  color: var(--bone);
}

.bk-birth .bk-cover .bk-open .button {
  box-shadow:
    0 0 0 1px rgba(255, 236, 200, 0.4),
    0 0 0 4px rgba(14, 7, 16, 0.55),
    0 10px 26px -6px rgba(0, 0, 0, 0.9);
}

.bk-birth .bk-cover .bk-words {
  text-shadow: 0 1px 2px rgba(10, 5, 12, 0.85), 0 0 14px rgba(10, 5, 12, 0.9);
}

/* a screen wider than it is tall: the upright painting is shown whole and sharp at the right, at its own height, and
   the rest of the screen is the same scene turned about and drawn soft, so nothing is stretched past its pixels */
@media (min-width: 861px) and (min-aspect-ratio: 1/1) {
  .bk-birth .rd-film::before {
    content: "";
    position: absolute;
    inset: -60px;
    background: url("/media/ways/birth.webp") 50% 55% / cover no-repeat;
    filter: blur(26px) brightness(0.8) saturate(1.15);
    transform: scaleX(-1);
  }

  .bk-birth .rd-film img,
  .bk-birth .rd-film video {
    left: auto;
    right: 0;
    width: auto;
    max-width: none;
    aspect-ratio: 900 / 1195;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 24%);
    mask-image: linear-gradient(to right, transparent, #000 24%);
  }

  /* the picture and the words of the cover as one block in the middle */
  .bk-birth .bk-cover > .jr-fit {
    grid-template-columns: auto minmax(0, 36rem);
    justify-content: center;
  }

  /* a page's words never run longer than a comfortable line */
  .bk-birth .bk-faced > .jr-fit {
    grid-template-columns: minmax(0, 15.5rem) minmax(0, 29em);
    justify-content: center;
    width: max-content;
    max-width: 100%;
  }
}

/* a large screen: the open page has presence, a larger pane, a larger card and larger type */
@media (min-width: 1200px) and (min-height: 800px) {
  .bk-birth {
    --face: min(20rem, calc((100svh - var(--consent-h, 0px) - 380px) * 0.6));
  }

  .bk-birth .bk-leaf > .jr-fit {
    max-width: 74rem;
    padding: clamp(2.2rem, 3.6vh, 3rem) clamp(2.6rem, 3.4vw, 3.6rem);
    font-size: 1.25rem;
  }

  .bk-birth .bk-title {
    font-size: clamp(2.75rem, 3.2vw, 3.25rem);
  }

  .bk-birth .bk-leaf h3 {
    font-size: 1.375rem;
  }

  .bk-birth .bk-faced > .jr-fit {
    grid-template-columns: minmax(0, var(--face)) minmax(0, 29em);
  }

  .bk-birth .bc-face .card {
    max-height: none;
  }

  .bk-birth .bc-lead {
    font-size: 1.3125rem;
  }

  .bk-birth .bc-pair {
    font-size: 1.25rem;
  }

  .bk-birth .bc-lesson p,
  .bk-birth .bc-ask p {
    font-size: 1.625rem;
  }

  .bk-birth .bc-note {
    font-size: 1.1875rem;
  }

  .bk-birth .bc-sides ul {
    font-size: 1.375rem;
  }

  .bk-birth .bc-split {
    width: 12.5rem;
  }

  .bk-birth .bk-number .bc-number h3 {
    font-size: 2rem;
  }

  .bk-birth .bc-traits em {
    font-size: 1.25rem;
  }

  .bk-birth .bc-traits li {
    font-size: 1.125rem;
  }

  .bk-birth .bk-sum .bc-sum {
    font-size: 1.375rem;
  }

  .bk-birth .bc-stars {
    max-width: 52rem;
  }

  .bk-birth .bc-stars li {
    font-size: 1.25rem;
  }

  .bk-birth .bc-stars strong {
    font-size: 1.5rem;
  }

  .bk-birth .bc-thumbs .card {
    width: 6.4rem;
  }

  .bk-birth .card-grid {
    --tile: min(14rem, 25svh);
  }

  .bk-birth .card-grid b {
    font-size: 1.25rem;
  }

  .bk-birth .card-grid span {
    font-size: 1rem;
  }

  .bk-birth .bk-cover .bk-card {
    width: min(26rem, 30vw, calc((100svh - var(--consent-h, 0px) - 250px) * 0.58));
  }

  .bk-birth .bk-cover > .jr-fit {
    grid-template-columns: auto minmax(0, 38rem);
  }

  .bk-birth .bk-last > .jr-fit {
    max-width: 50rem;
  }

  .bk-birth .bk-last .card-go h2 {
    font-size: 2.5rem;
  }

  .bk-birth .bk-last .card-go p {
    font-size: 1.25rem;
  }
}

/* a tall phone: the card on its pages a little larger, and the gifts and the shadow read across their card */
@media (max-width: 760px) and (min-height: 740px) {
  .bk-birth .jr-page:not(.bk-snug) .bk-spare .card {
    width: min(10.5rem, calc((100svh - var(--consent-h, 0px)) * 0.2));
  }

  .bk-birth .bc-sides .bc-split {
    display: block;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: min(8.5rem, calc((100svh - var(--consent-h, 0px)) * 0.17));
    margin-bottom: 0.3rem;
  }

  .bk-birth .bc-sides .bc-gifts {
    grid-column: 1;
    grid-row: 2;
  }

  .bk-birth .bc-sides .bc-shade {
    grid-column: 2;
    grid-row: 2;
  }
}

/* a phone: the pools of shadow stay within the screen, and a date worked through is set under its date, not beside it,
   so the long sum never runs back over the date */
@media (max-width: 760px) {
  .bk-birth .bk-cover .bk-words::before,
  .bk-birth .bk-cover .bk-lede::before,
  .bk-birth .bk-last .card-note::before {
    inset: -0.6rem 0;
    border-radius: 1.2rem;
    background: rgba(14, 7, 16, 0.8);
    filter: blur(12px);
  }

  .bk-birth .bk-cover .bk-open::before {
    inset: -1.2rem 0;
  }
}

@media (max-width: 860px) {
  .bk-birth .bc-sum {
    display: block;
  }
}
/* ---- BIRTH-END ---- */

/* ---- BIRTHHUB-BEGIN ---- the birth card page itself (worker/pages.ts birthCardPage, /birth-card): the form for the
        date, and the six pages of the reading once it is given. Everything here is under .stage-birth, the class
        only that page carries. ---- */

/* the paler words a step brighter, since the painting behind them is no longer drawn down */
.stage-birth {
  --dim: #d9ccb6;
}

/* the date field belongs to the page: dark glass, a gold rim, the calendar mark in gold and a gold ring when chosen */
.stage-birth input[type="date"] {
  color-scheme: dark;
  border: 1px solid rgba(217, 169, 91, 0.42);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(36, 20, 44, 0.92), rgba(14, 7, 16, 0.9));
  color: var(--bone);
  font-variant-numeric: lining-nums tabular-nums;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 200, 0.07),
    0 10px 24px -14px rgba(0, 0, 0, 0.9);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.stage-birth input[type="date"]:hover {
  border-color: rgba(217, 169, 91, 0.7);
}

.stage-birth input[type="date"]:focus-visible {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow:
    0 0 0 3px rgba(217, 169, 91, 0.38),
    0 0 22px rgba(217, 169, 91, 0.25),
    inset 0 1px 0 rgba(255, 236, 200, 0.07);
}

.stage-birth input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.9;
  filter: invert(78%) sepia(35%) saturate(620%) hue-rotate(352deg) brightness(96%);
}

.stage-birth input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.stage-birth input[type="date"]::-webkit-datetime-edit-day-field:focus,
.stage-birth input[type="date"]::-webkit-datetime-edit-month-field:focus,
.stage-birth input[type="date"]::-webkit-datetime-edit-year-field:focus {
  border-radius: 3px;
  background: rgba(217, 169, 91, 0.32);
  color: #fff6e6;
}

.stage-birth .keep input[type="checkbox"] {
  accent-color: var(--gold);
}

/* a narrow phone with the cards shown: the date beside the golden button is read whole. A touch on the field opens the
   phone's own date picker, so the small calendar mark gives way, and the button's seal is a little smaller */
@media (max-width: 400px) {
  .stage-birth.stage-found .birthcard .row input[type="date"] {
    padding-inline: 0.5rem;
    font-size: 1rem;
  }

  .stage-birth.stage-found input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
  }

  :root body .stage-birth.stage-found .birthcard form.signin button[type="submit"] {
    gap: 0.4em;
  }

  :root body .stage-birth.stage-found .birthcard form.signin button[type="submit"][data-art]::before {
    width: 2.1em;
    height: 2.1em;
  }
}

/* the words of the form and the heading stand clear of the painting */
.stage-birth .when,
.stage-birth h1,
.stage-birth .lede,
.stage-birth form.signin > label[for],
.stage-birth .keep,
.stage-birth .bc-method,
.stage-birth .bc-tabs,
.stage-birth .bc-foot {
  text-shadow:
    0 1px 2px rgba(10, 5, 12, 0.9),
    0 0 14px rgba(10, 5, 12, 0.85);
}

/* a phone, before the date is given: the star card shines at the top, and the words below stand in deeper shade */
@media (max-width: 860px) {
  .stage-birth:not(.stage-found) .stage-art i {
    background:
      linear-gradient(to bottom, rgba(18, 9, 20, 0.86) 0, rgba(18, 9, 20, 0.12) 15%, rgba(18, 9, 20, 0.08) 29%, rgba(18, 9, 20, 0.6) 37%, rgba(18, 9, 20, 0.88) 45%, rgba(18, 9, 20, 0.94) 60%, rgba(18, 9, 20, 0.96) 100%),
      radial-gradient(70% 30% at 50% 26%, rgba(255, 190, 110, 0.16), rgba(255, 190, 110, 0) 70%);
  }
}

/* ---- the reading: the painting in full light behind it, the pages on a pane of denser glass ---- */

.stage-birth.stage-found .stage-art {
  filter: none;
}

/* a band of shade at the top for the menu and the heading, and at the foot for the turning buttons; the middle open */
.stage-birth.stage-found .stage-art i {
  background:
    linear-gradient(to bottom, rgba(18, 9, 20, 0.86), rgba(18, 9, 20, 0.76) 22%, rgba(18, 9, 20, 0.56) 30%, rgba(18, 9, 20, 0.14) 40%, rgba(18, 9, 20, 0.06) 50%, rgba(18, 9, 20, 0.06) 80%, rgba(18, 9, 20, 0.82)),
    radial-gradient(125% 95% at 50% 48%, rgba(18, 9, 20, 0), rgba(18, 9, 20, 0.12) 62%, rgba(18, 9, 20, 0.4));
}

/* a phone: the heading, the date and the tabs take the upper part of the screen, so the shade there reaches down to the
   tabs; the painting glows round the pane and through it below */
@media (max-width: 860px) {
  .stage-birth.stage-found .stage-art i {
    background:
      linear-gradient(to bottom, rgba(18, 9, 20, 0.88), rgba(18, 9, 20, 0.8) 30%, rgba(18, 9, 20, 0.66) 40%, rgba(18, 9, 20, 0.12) 54%, rgba(18, 9, 20, 0.06) 82%, rgba(18, 9, 20, 0.84)),
      radial-gradient(70% 30% at 70% 12%, rgba(255, 190, 110, 0.14), rgba(255, 190, 110, 0) 70%);
  }
}

/* the pages: a pane of denser glass that throws a soft shadow on the painting round it */
.stage-birth .bc-panels {
  border-color: rgba(217, 169, 91, 0.38);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(32, 18, 40, 0.84), rgba(14, 7, 16, 0.8));
  box-shadow:
    inset 0 0 0 5px rgba(23, 13, 25, 0.25),
    inset 0 0 0 6px rgba(217, 169, 91, 0.13),
    0 30px 60px -30px rgba(0, 0, 0, 0.85),
    0 0 90px 24px rgba(12, 6, 14, 0.42);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  /* a sideways swipe turns the page (pages.js) and is not taken by the browser as a pan */
  touch-action: pan-y;
}

.stage-birth .bc-turn {
  background-color: rgba(18, 9, 20, 0.55);
}

/* a screen wider than it is tall: the upright painting whole and sharp at the right, at its own height, and the rest
   of the screen the same scene turned about and drawn soft, as on the birth cards' own pages */
@media (min-width: 861px) and (min-aspect-ratio: 1/1) {
  .stage-birth.stage-found .stage-art::before {
    content: "";
    position: absolute;
    inset: -60px;
    background: url("/media/ways/birth.webp") 50% 55% / cover no-repeat;
    filter: blur(26px) brightness(0.8) saturate(1.15);
    transform: scaleX(-1);
  }

  .stage-birth.stage-found .stage-art img,
  .stage-birth.stage-found .stage-art video {
    left: auto;
    right: 0;
    width: auto;
    max-width: none;
    aspect-ratio: 900 / 1195;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 24%);
    mask-image: linear-gradient(to right, transparent, #000 24%);
  }
}

/* ---- the reading on a wide screen: one calm header. The heading and the date stand on one line; under the date, two
        quiet lines of options with the same edges; under them all, the tabs. ---- */
@media (min-width: 861px) {
  .stage-birth.stage-found .stage-fit.birthcard {
    max-width: 68rem;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "when row"
      "title keep"
      "title method"
      "book book";
    column-gap: 2.5rem;
    align-items: center;
  }

  /* the form's own pieces take their places in the header; it still sends them all */
  .stage-birth.stage-found .birthcard form.signin {
    display: contents;
  }

  .stage-birth.stage-found .birthcard .when {
    margin: 0;
    font-size: 1rem;
  }

  .stage-birth.stage-found .birthcard h1 {
    align-self: end;
    line-height: 1.05;
  }

  .stage-birth.stage-found .birthcard .row {
    grid-area: row;
    display: flex;
    gap: 0.75rem;
  }

  .stage-birth.stage-found .birthcard .row input {
    flex: 1 1 auto;
    width: 0;
    min-width: 10.5rem;
  }

  .stage-birth.stage-found .birthcard .keep {
    grid-area: keep;
    margin: 0.55rem 0 0;
    font-size: 0.875rem;
    line-height: 1.3;
  }

  .stage-birth.stage-found .birthcard .bc-method {
    grid-area: method;
    justify-content: flex-start;
    margin: 0.3rem 0 0;
    font-size: 0.875rem;
    align-self: end;
  }

  .stage-birth.stage-found .birthcard .status {
    grid-column: 1 / -1;
  }

  .stage-birth.stage-found .birthcard .bc-book {
    margin-top: 0.7rem;
  }

  /* the card on a page is never taller than the room the pane has under the header, so its words can stand beside it */
  .stage-birth .bc-face .card {
    max-height: min(52svh, calc(100svh - var(--consent-h, 0px) - 400px));
  }
}

/* a phone with the cards shown: the line of links beside the heading folds onto two short lines, so the heading keeps
   room for its longest word and is never broken inside it; a word still too long is hyphenated in its own language */
@media (max-width: 560px) {
  .stage-birth.stage-found .birthcard .when {
    max-width: 10.5rem;
    text-align: right;
    line-height: 1.3;
  }

  .stage-birth.stage-found .birthcard h1 {
    -webkit-hyphens: auto;
    hyphens: auto;
  }
}

/* the form before the date is given: how to count stands on the same left edge as everything above it */
@media (min-width: 861px) {
  .stage-birth:not(.stage-found) .bc-method {
    justify-content: flex-start;
  }
}

/* the form on a short wide screen: a little less air round it, so the whole of it stands at full size with the bar
   that asks about counting visits showing, and no word has to shrink */
@media (min-width: 861px) and (max-height: 800px) {
  .stage-birth:not(.stage-found) .when {
    font-size: 1.0625rem;
    line-height: 1.3;
  }

  .stage-birth:not(.stage-found) h1 {
    font-size: clamp(2.5rem, 4.4vw, 4.2rem);
    line-height: 1.02;
  }

  .stage-birth:not(.stage-found) form.signin {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
  }
}

/* ---- the tabs: their full names where all six fit on the line; where they do not, pages.js marks the book .bc-short
        and each tab shows its one-word name instead, so no name is ever cut. The full name stays for a screen reader. ---- */
.stage-birth .bc-ts {
  display: none;
}

.stage-birth .bc-short .bc-tl {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage-birth .bc-short .bc-ts {
  display: inline;
}

/* a phone: the six one-word names spread evenly across the whole line */
@media (max-width: 860px) {
  .stage-birth .bc-short .bc-tabs {
    justify-content: space-between;
    gap: 0.5rem;
  }

  .stage-birth .bc-short .bc-tabs button {
    font-size: 1.125rem;
  }
}

/* a phone: the gifts and the shadow, and the two halves of a pair, stand one under the other at a reading width
   rather than in two narrow columns; a long page goes on to a second leaf (pages.js) */
@media (max-width: 560px) {
  .stage-birth .bc-sides {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .stage-birth .bc-gifts {
    padding: 0 0 0.75rem;
    border-right: 0;
    border-bottom: 1px solid rgba(217, 169, 91, 0.35);
  }

  .stage-birth .bc-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* a short phone while the bar that asks about counting visits takes the foot of the screen: the line under the book
   keeps to the arrows and Share, so it stays one line and the book keeps the room; the link returns with the bar gone */
@media (max-width: 560px) and (max-height: 720px) {
  body:has(> .consent) .stage-birth .bc-foot a {
    display: none;
  }
}

/* a leaf that begins part-way through a page begins clean: no rule or gap above its first words (pages.js puts the
   pieces of the leaves before it away as .bc-off) */
.stage-birth .bc-paged .bc-off + :not(.bc-off),
.stage-birth .bc-paged h2.bc-drop + :not(.bc-off) {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* a leaf stands in the middle of its pane, so one that ends short never reads as an empty box; the intro put away to
   make room under a heading (pages.js squeeze) stays away in leaves */
.stage-birth .bc-paged .bc-panel {
  align-content: safe center;
}

.stage-birth .bc-paged .bc-drop {
  display: none !important;
}

/* while the book is measured, every change of size is made at once (pages.js fitBook) */
.stage-birth .bc-measure,
.stage-birth .bc-measure * {
  transition: none !important;
}

/* a page drawn closer, so that a heading and what it heads go on one leaf, or a short last leaf joins the one before */
.stage-birth .bc-paged .bc-panel.bc-tight {
  padding-block: 0.7rem;
}

.stage-birth .bc-paged .bc-tight :is(.bc-facts, .bc-pair, .bc-sides, .bc-lesson, .bc-ask, .bc-meet, .bc-round) {
  margin-top: 0.6rem;
}

.stage-birth .bc-paged .bc-tight :is(.bc-facts, .bc-lesson, .bc-ask, .bc-meet, .bc-round) {
  padding-top: 0.55rem;
}

.stage-birth .bc-paged .bc-tight .bc-lead {
  margin-top: 0.4rem;
}

.stage-birth .bc-paged .bc-tight .bc-stars {
  row-gap: 0.55rem;
}

@media (min-width: 861px) {
  .stage-birth .bc-paged .bc-tight .bc-ribbon {
    --track: 3.3rem;
    margin-top: 0.4rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-years li {
    padding-top: calc(var(--track) + 0.3rem);
  }

  .stage-birth .bc-paged .bc-tight .bc-years .card {
    width: min(100%, 3.4rem);
  }

  .stage-birth .bc-paged .bc-tight .bc-years .now .card {
    width: min(100%, 4.1rem);
  }

  .stage-birth .bc-paged .bc-tight .bc-yr {
    margin-top: 0.25rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-thumbs .card {
    width: 3.8rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-split {
    width: 5.6rem;
  }

  .stage-birth .bc-paged .bc-tight h2 {
    font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  }

  .stage-birth .bc-paged .bc-tight .bc-sides {
    margin-top: 0.5rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-sides ul {
    font-size: 1.125rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-lesson p {
    font-size: 1.25rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-sides li + li {
    margin-top: 0.45rem;
  }
}

/* a short wide screen: the row of years smaller still, so the two notes about it share its leaf */
@media (min-width: 861px) and (max-height: 800px) {
  .stage-birth .bc-paged .bc-tight .bc-ribbon {
    --track: 2.3rem;
    margin-top: 0.2rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-years .card {
    width: min(100%, 2.9rem);
  }

  .stage-birth .bc-paged .bc-tight .bc-years .now .card {
    width: min(100%, 3.4rem);
  }

  .stage-birth .bc-paged .bc-tight .bc-round {
    margin-top: 0.4rem;
  }

  .stage-birth .bc-paged .bc-six.bc-tight {
    padding-block: 0.5rem;
  }

  .stage-birth .bc-paged .bc-six.bc-tight h2 {
    font-size: 1.6rem;
  }

  .stage-birth .bc-paged .bc-six.bc-tight .bc-round {
    margin-top: 0.15rem;
    padding-top: 0.35rem;
    font-size: 0.9375rem;
  }

  .stage-birth .bc-paged .bc-six.bc-tight .bc-ribbon {
    --track: 2rem;
  }
}

/* a phone: the card of the page shown again beside the words of a last leaf that ends short (pages.js), even on the
   page that otherwise goes without it */
@media (max-width: 860px) {
  .stage-birth .bc-paged .bc-panel .bc-face.bc-again {
    display: block;
  }

  .stage-birth .bc-paged .bc-tight .bc-figure {
    font-size: 3.2rem;
  }
}

@media (max-width: 860px) {
  .stage-birth .bc-paged .bc-panel.bc-tight {
    padding: 0.55rem 0.8rem;
  }

  .stage-birth .bc-paged .bc-tight h2 {
    font-size: 1.375rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-face {
    width: 4.6rem;
    margin-right: 0.75rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-ribbon {
    --track: 2.8rem;
    margin-top: 0.4rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-years li {
    padding-top: calc(var(--track) + 0.3rem);
  }

  .stage-birth .bc-paged .bc-tight .bc-sides {
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .stage-birth .bc-paged .bc-tight .bc-gifts {
    padding-bottom: 0.5rem;
  }
}

/* the "2/3" of a page laid out in leaves stands small and raised against its own tab's name */
.stage-birth .bc-tabs button[data-leaf]::after {
  margin-left: 0.14em;
  vertical-align: 0.55em;
  font-size: 0.8125rem;
  line-height: 1;
}

/* a narrow phone: the one-word names a size smaller, with a clear gap between each */
@media (max-width: 400px) {
  .stage-birth .bc-short .bc-tabs {
    gap: 0.7rem;
  }

  .stage-birth .bc-short .bc-tabs button {
    font-size: 1.0625rem;
  }
}

/* a phone with the cards shown: the line of links stands on its own line above the heading, so the heading keeps the
   whole width and stays on one line; the date has the room of the row, and the button that asks again goes without
   its seal */
@media (max-width: 560px) {
  .stage-birth.stage-found .stage-fit.birthcard {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "when"
      "title"
      "form"
      "book";
  }

  .stage-birth.stage-found .birthcard .when {
    max-width: none;
    margin: 0 0 0.15rem;
    text-align: left;
  }

  .stage-birth.stage-found .bc-all-short {
    white-space: nowrap;
  }

  :root body .stage-birth.stage-found .birthcard form.signin button[type="submit"][data-art]::before {
    display: none;
  }

  :root body .stage-birth.stage-found .birthcard form.signin button[type="submit"] {
    padding-inline: 1.15em;
  }
}

/* ---- a phone with the cards shown: remembering the date and how to count fold behind one quiet line under the date
        (pages.js marks the form data-fold), so the book has their height; a touch opens them, and a way of counting
        chosen there is sent at once ---- */
.stage-birth .bc-opts-open {
  display: none;
}

/* the two options stand where they always did: their wrapper takes no box of its own */
.stage-birth .bc-opts {
  display: contents;
}

@media (max-width: 560px) {
  :root body .stage-birth.stage-found .birthcard form.signin .bc-opts-open:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    width: auto;
    min-height: 34px;
    margin: 0.2rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--dim);
    font: italic 0.9375rem/1.2 var(--text);
    letter-spacing: normal;
    text-transform: none;
    text-shadow:
      0 1px 2px rgba(10, 5, 12, 0.9),
      0 0 14px rgba(10, 5, 12, 0.85);
    cursor: pointer;
  }

  :root body .stage-birth.stage-found .birthcard form.signin .bc-opts-open::before {
    display: none;
  }

  /* a small gold chevron, turned up while the options are open */
  :root body .stage-birth.stage-found .birthcard form.signin .bc-opts-open::after {
    content: "";
    width: 0.42em;
    height: 0.42em;
    margin-top: -0.2em;
    border-right: 1.5px solid var(--gold);
    border-bottom: 1.5px solid var(--gold);
    transform: rotate(45deg);
    transition: transform 0.2s;
  }

  :root body .stage-birth.stage-found .birthcard form.signin .bc-opts-open[aria-expanded="true"]::after {
    margin-top: 0.2em;
    transform: rotate(-135deg);
  }

  :root body .stage-birth.stage-found .birthcard form[data-fold]:not(.bc-opts-on) :is(.keep, .bc-method) {
    display: none !important;
  }

  /* opened, they stand on a leaf of glass laid over the top of the book, so nothing below moves; they show even while
     the bar that asks about counting visits stands at the foot */
  .stage-birth.stage-found .birthcard form[data-fold] {
    position: relative;
  }

  .stage-birth.stage-found .birthcard form[data-fold].bc-opts-on .bc-opts {
    display: block;
    position: absolute;
    z-index: 5;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.2rem;
    padding: 0.35rem 0.9rem 0.6rem;
    border: 1px solid rgba(217, 169, 91, 0.42);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(36, 20, 44, 0.97), rgba(14, 7, 16, 0.97));
    box-shadow: 0 22px 44px -16px rgba(0, 0, 0, 0.95);
  }

  :root body .stage-birth.stage-found .birthcard form[data-fold].bc-opts-on .keep {
    display: flex !important;
    margin: 0;
  }

  :root body .stage-birth.stage-found .birthcard form[data-fold].bc-opts-on .bc-method {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
  }

  .stage-birth.stage-found .birthcard form[data-fold].bc-opts-on .bc-method label {
    display: flex;
    align-items: center;
    min-height: 40px;
  }

  /* the control above already says "How to count" */
  .stage-birth.stage-found .birthcard form[data-fold] .bc-method legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ---- a phone's leaf with room to spare: the card the page is about, drawn large above its words, as tall as the room
        left (pages.js paginate sets --art-h for each leaf) ---- */
.stage-birth .bc-art {
  display: none;
}

@media (max-width: 860px) {
  .stage-birth .bc-paged .bc-art.bc-art-on,
  .stage-birth .bc-paged .bc-art[data-also] {
    display: block;
    grid-column: 1 / -1;
    float: none;
    height: var(--art-h, 0px);
    margin: 0 0 0.9rem;
    text-align: center;
  }

  /* a short pane: the card stands beside the words instead, and they run round it */
  .stage-birth .bc-paged .bc-panel:has(> .bc-art.bc-art-side:not(.bc-off)) {
    display: block;
  }

  .stage-birth .bc-paged .bc-panel:has(> .bc-art.bc-art-side:not(.bc-off)) * {
    clear: none;
  }

  .stage-birth .bc-paged .bc-panel:has(> .bc-art.bc-art-side:not(.bc-off)) .bc-sum {
    min-width: 0;
  }

  /* the page's own card in the corner of a leaf with room to spare, drawn larger (pages.js) */
  .stage-birth .bc-paged .bc-panel > .bc-face[style*="--face-w"] {
    width: var(--face-w);
  }

  /* the small cards of the constellation, drawn larger on a leaf with room for them (pages.js) */
  .stage-birth .bc-paged .bc-stars > li[style*="--thumb"] .bc-thumbs .card {
    width: var(--thumb);
  }

  .stage-birth .bc-paged .bc-tight > .bc-art {
    margin-bottom: 0.55rem;
  }

  .stage-birth .bc-paged .bc-art.bc-art-side {
    float: left;
    margin: 0.1rem 0.9rem 0.3rem 0;
    text-align: left;
  }

  .stage-birth .bc-art img {
    display: inline-block;
    width: auto;
    height: 100%;
    aspect-ratio: 560 / 939;
    border-radius: 7px;
    box-shadow:
      0 0 0 1px rgba(217, 169, 91, 0.5),
      0 0 0 4px rgba(23, 13, 25, 0.55),
      0 18px 36px -14px rgba(0, 0, 0, 0.9),
      0 0 46px 6px rgba(255, 190, 110, 0.13);
  }
}

/* ---- BIRTHHUB-END ---- */
