:root {
  --bg: #1c1430;
  --panel: #271d42;
  --line: #3d3063;
  --text: #ece6f5;
  --muted: #bcb2d4;
  --gold: #e9cf93;
  --gold-strong: #f3dca6;
  --button-text: #23183b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

h1, h2, h3, .logo { font-family: Georgia, "Times New Roman", serif; font-weight: normal; line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0 0 .6rem; color: var(--gold-strong); }
h2 { font-size: 1.55rem; margin: 2.4rem 0 .8rem; color: var(--gold); }
h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }

a { color: var(--gold-strong); }
a:hover { color: #fff; }
p { margin: 0 0 1rem; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header and footer */
.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.logo { font-size: 1.4rem; color: var(--text); text-decoration: none; }
.logo span { color: var(--gold); }
.links { display: flex; gap: 12px; font-size: .93rem; }
.links a, .langs a { text-decoration: none; }
.langs { margin-left: auto; display: flex; gap: 10px; font-size: .9rem; }
.langs span { color: var(--muted); }
.top-bot {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--gold);
  border-radius: 999px; color: var(--gold); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.top-bot:hover { background: var(--gold); color: var(--button-text); }
.top-bot-short { display: none; }
/* below the full width the sections and the long label no longer fit in one row */
@media (max-width: 1060px) { .top-bot-long { display: none; } .top-bot-short { display: inline; } }
.icon { flex: none; vertical-align: -3px; }
.bottom { margin-top: 64px; border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .9rem; }

/* Buttons and call to action */
.button {
  display: inline-block; padding: 12px 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: var(--button-text); font: inherit; font-weight: 600; text-decoration: none;
}
.button:hover { background: var(--gold-strong); color: var(--button-text); }
.cta { margin: 40px 0; padding: 24px; border: 1px solid var(--gold); border-radius: 14px; background: var(--panel); }
.cta h2 { margin-top: 0; }

/* Home page */
.intro { padding: 36px 0 8px; }
.group h2 { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px 14px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; text-decoration: none; font-size: .9rem; line-height: 1.3; }
.tile img { width: 100%; height: auto; aspect-ratio: 4 / 7; object-fit: cover; border-radius: 6px; transition: transform .15s; }
.tile:hover img { transform: translateY(-3px); }

/* Card of the day and yes or no */
.draw { margin: 28px 0; padding: 24px; border-radius: 14px; background: var(--panel); }
.draw h2 { margin-top: 0; }
.question input {
  display: block; width: 100%; max-width: 520px; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit;
}
.draw-result { display: flex; gap: 24px; margin-top: 20px; align-items: flex-start; }
.draw-result[hidden] { display: none; }
.draw-card img { width: 200px; height: auto; border-radius: 8px; transition: transform .4s; }
.draw-card img.is-reversed { transform: rotate(180deg); }
.draw-name { font-family: Georgia, serif; font-size: 1.4rem; color: var(--gold-strong); margin-bottom: .3rem; }
.draw-answer { font-size: 1.8rem; font-weight: 700; margin-bottom: .4rem; }
.draw-answer:empty { display: none; }
.draw-done { color: var(--muted); }

/* Spreads: the table, the deck, cards flying and turning over */
.spread-box {
  margin: 24px 0 8px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #3a2a63 0%, var(--panel) 55%, #211838 100%);
}
.spread-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.spread-controls .question { flex: 1 1 280px; max-width: 480px; }
.spread-controls .question input { margin: 0; max-width: none; }
.spread-deal:disabled { opacity: .6; cursor: default; }
.spread-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; margin-top: 26px; }
.card-back {
  border-radius: 8px; border: 1.5px solid var(--gold);
  background:
    radial-gradient(circle at 50% 50%, var(--gold) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, transparent 0 18%, rgba(233, 207, 147, .6) 19% 21%, transparent 22%),
    repeating-linear-gradient(45deg, rgba(233, 207, 147, .12) 0 1.5px, transparent 1.5px 8px),
    repeating-linear-gradient(-45deg, rgba(233, 207, 147, .12) 0 1.5px, transparent 1.5px 8px),
    #2b1e50;
  box-shadow: inset 0 0 0 3px #1c1430, inset 0 0 0 4px rgba(233, 207, 147, .45), 0 4px 14px rgba(0, 0, 0, .35);
}
.spread-deck { position: relative; width: 62px; aspect-ratio: 4 / 7; animation: float 3.2s ease-in-out infinite; }
.spread-deck span { position: absolute; inset: 0; }
.spread-deck span:nth-child(2) { transform: translate(3px, -3px); }
.spread-deck span:nth-child(3) { transform: translate(6px, -6px); }
.spread-deck.is-shuffling { animation: none; }
.spread-deck.is-shuffling span:nth-child(3) { animation: riffle-a .75s ease-in-out; }
.spread-deck.is-shuffling span:nth-child(2) { animation: riffle-b .75s ease-in-out; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes riffle-a {
  0%, 100% { transform: translate(6px, -6px); }
  30% { transform: translate(52px, -4px) rotate(10deg); }
  65% { transform: translate(-34px, -8px) rotate(-7deg); }
}
@keyframes riffle-b {
  0%, 100% { transform: translate(3px, -3px); }
  30% { transform: translate(-50px, 0) rotate(-10deg); }
  65% { transform: translate(36px, -5px) rotate(7deg); }
}

.spread-table { display: grid; justify-content: center; align-items: center; }
.slot {
  position: relative; width: var(--w); aspect-ratio: 4 / 7; display: grid; place-items: center;
  border: 1.5px dashed rgba(233, 207, 147, .4); border-radius: 8px; transition: border-color .3s;
}
.slot-number { font: 1.1rem Georgia, "Times New Roman", serif; color: rgba(233, 207, 147, .7); }
.layout-cross .slot-1:not(.has-card) { place-items: start center; padding-top: 6px; }  /* 2 lies across its middle */
.slot.has-card { border-color: transparent; }
.slot.has-card .slot-number {
  position: absolute; top: -8px; left: -8px; z-index: 3; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: var(--button-text); font: 700 .72rem system-ui, sans-serif;
}
.slot-name {
  position: absolute; top: 100%; left: -12px; right: -12px; margin-top: 8px;
  text-align: center; font-size: .85rem; line-height: 1.25; color: var(--muted);
}
.layout-row { --w: min(150px, 25vw); grid-template-columns: repeat(3, var(--w)); column-gap: clamp(12px, 5vw, 48px); padding-bottom: 46px; }
/* Celtic Cross: the cross on the left (2 lies across 1), the staff of four on the right, bottom to top. Each card
   takes two half-rows, so the cross sits in the middle of the staff. */
.layout-cross {
  --w: min(92px, 15.5vw); --vg: 10px;
  grid-template-columns: repeat(3, var(--w)) calc(var(--w) * .25) var(--w);
  grid-template-rows: repeat(8, calc(var(--w) * 7 / 8 + var(--vg) / 2)); column-gap: calc(var(--w) * .25);
}
.layout-cross .slot-1, .layout-cross .slot-2 { grid-area: 4 / 2 / 6 / 3; }
.layout-cross .slot-2 { transform: rotate(90deg) scale(.82); z-index: 2; }
.layout-cross .slot-3 { grid-area: 6 / 2 / 8 / 3; }
.layout-cross .slot-4 { grid-area: 4 / 1 / 6 / 2; }
.layout-cross .slot-5 { grid-area: 2 / 2 / 4 / 3; }
.layout-cross .slot-6 { grid-area: 4 / 3 / 6 / 4; }
.layout-cross .slot-7 { grid-area: 7 / 5 / 9 / 6; }
.layout-cross .slot-8 { grid-area: 5 / 5 / 7 / 6; }
.layout-cross .slot-9 { grid-area: 3 / 5 / 5 / 6; }
.layout-cross .slot-10 { grid-area: 1 / 5 / 3 / 6; }
.layout-cross .slot-2 .slot-number { transform: rotate(-90deg); }
/* Any other layout: every card stands where its grid-area puts it, on a grid of half-cards (spreads.py), so cards can
   stand half a card apart — the horseshoe, the two paths, the wheel of the year. The card gets as wide as the box
   allows, up to the spread's own width; the names under the cards need taller gaps. */
.layout-grid {
  --g: clamp(6px, 2vw, 14px); --vg: 10px;
  --w: min(var(--max-w, 110px), calc(2 * (min(100vw - 64px, 700px) + var(--g)) / var(--cols) - var(--g)));
  grid-template-columns: repeat(var(--cols), calc((var(--w) - var(--g)) / 2)); column-gap: var(--g);
  grid-template-rows: repeat(var(--rows), calc(var(--w) * 7 / 8 + var(--vg) / 2));
}
.layout-grid.has-labels { --g: clamp(10px, 3.5vw, 26px); --vg: 64px; padding-bottom: 14px; }

.flyer { position: absolute; z-index: 5; pointer-events: none; }
.flip {
  position: absolute; inset: 0; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer;
  perspective: 900px; animation: land .35s ease-out;
}
.flip-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3, .7, .2, 1); }
.flip:not(.is-open):hover .flip-inner, .flip:not(.is-open):focus-visible .flip-inner { transform: translateY(-5px) rotateY(12deg); }
.flip.is-open { cursor: zoom-in; }
/* A turned card tapped again: the card big, with its position, keywords and short meaning */
.card-zoom {
  width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--gold);
  border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.card-zoom[open] { animation: zoom-in .28s ease-out; }
.card-zoom::backdrop { background: rgba(8, 5, 18, .78); }
@keyframes zoom-in { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.card-zoom-body { display: flex; gap: 22px; align-items: flex-start; padding: 22px; }
.card-zoom-figure { flex: 0 0 220px; margin: 0; }
.card-zoom-figure img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.card-zoom-figure img.is-reversed { transform: rotate(180deg); }
.card-zoom-text h3 { margin: 2px 0 6px; font-size: 1.35rem; color: var(--gold-strong); }
.card-zoom-summary { margin: 10px 0 12px; line-height: 1.55; }
.card-zoom-close {
  position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(233, 207, 147, .12); color: var(--gold); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
@media (prefers-reduced-motion: reduce) { .card-zoom[open] { animation: none; } }
.flip.is-open .flip-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face-front { transform: rotateY(180deg); background: #efe4c8; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.face-front img { display: block; width: 100%; height: 100%; object-fit: cover; }
.face-front img.is-reversed { transform: rotate(180deg); }
.slot.is-revealed .flip { animation: glow 1.4s ease-out .35s; }
.flip.is-leaving { transition: opacity .3s, transform .3s; opacity: 0; transform: translateY(-14px) scale(.9); }
@keyframes land { from { transform: scale(1.04); } to { transform: none; } }
@keyframes glow {
  0% { box-shadow: 0 0 0 0 rgba(243, 220, 166, 0); }
  35% { box-shadow: 0 0 26px 6px rgba(243, 220, 166, .55); }
  100% { box-shadow: 0 0 0 0 rgba(243, 220, 166, 0); }
}

.spread-hint { margin: 22px 0 0; text-align: center; color: var(--muted); }
.link-button { padding: 0; border: 0; background: none; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; }
.spread-result { margin-top: 26px; }
.spread-question { text-align: center; color: var(--muted); }
.spread-question q { color: var(--text); font-style: italic; }
.spread-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.spread-item {
  display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(28, 20, 48, .6); animation: rise .5s ease-out both;
}
.spread-item img { display: block; width: 56px; height: auto; aspect-ratio: 4 / 7; object-fit: cover; border-radius: 4px; }
.spread-item img.is-reversed { transform: rotate(180deg); }
.spread-item-position { margin: 0; color: var(--gold); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.spread-item h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.spread-item h3 a { color: var(--text); }
.spread-item-keys { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.spread-next {
  max-width: 620px; margin: 26px auto 0; padding: 18px 20px; border: 1px solid var(--gold); border-radius: 14px;
  background: rgba(28, 20, 48, .6); text-align: center; animation: rise .5s ease-out both;
}
.spread-next p { margin: 0 0 14px; }
.spread-next .button { display: inline-flex; align-items: center; gap: 8px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.steps, .positions { padding-left: 0; list-style: none; }
.steps { counter-reset: step; }
.steps li { position: relative; padding: 0 0 12px 40px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--panel); border: 1px solid var(--gold); color: var(--gold); font-size: .85rem;
}
.positions li { padding: 4px 0 8px; border-top: 1px solid var(--line); }
.positions h3 { display: flex; align-items: center; gap: 10px; }
.position-number {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--button-text); font: 700 .85rem system-ui, sans-serif;
}

/* Card of the day: the deck, one place on the table, the reading for today */
.more { margin: 14px 0 0; }
.daily-box {
  margin: 24px 0 8px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #3a2a63 0%, var(--panel) 55%, #211838 100%);
}
.daily-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 8vw, 70px); }
.combo-slot.daily-slot { width: min(200px, 44vw); flex: none; }  /* .combo-slot below would stretch it to the full width */
.daily-slot .slot-number { font-size: 1.6rem; }
.daily-actions { margin: 22px 0 0; }
.daily-draw:disabled { opacity: .6; cursor: default; }
.daily-slot .flip:not(.is-open) { cursor: pointer; }
.daily-result { max-width: 640px; margin: 22px auto 0; text-align: left; animation: rise .5s ease-out both; }
.daily-name { text-align: center; }
.daily-parts { margin: 0; }
.daily-parts dt { margin-top: 14px; color: var(--gold); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.daily-parts dd { margin: 4px 0 0; }
.daily-done { text-align: center; }
.daily-channel { margin-top: 22px; padding: 18px 20px; border: 1px solid var(--gold); border-radius: 14px; background: rgba(28, 20, 48, .6); text-align: center; }
.daily-channel h3 { margin: 0 0 6px; }
.daily-channel p { margin: 0 0 14px; color: var(--muted); }

/* Card combinations: two places for cards, the result, the deck to pick from */
.combo-box {
  margin: 24px 0 8px; padding: 22px; border: 1px solid var(--line); border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0%, #3a2a63 0%, var(--panel) 55%, #211838 100%);
}
.combo-pair { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 5vw, 40px); }
.combo-place { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(150px, 34vw); }
.combo-slot {
  position: relative; width: 100%; aspect-ratio: 4 / 7; display: grid; place-items: center;
  border: 1.5px dashed rgba(233, 207, 147, .4); border-radius: 8px;
}
.combo-slot.has-card { border-color: transparent; }
.combo-slot.has-card .slot-number { display: none; }
.combo-slot.is-revealed .flip { animation: glow 1.4s ease-out .3s; }
.combo-name { margin: 0; min-height: 2.6em; text-align: center; color: var(--muted); font-size: .9rem; line-height: 1.3; }
.combo-plus { font: 2rem Georgia, "Times New Roman", serif; color: var(--gold); }
.combo-result { margin: 22px auto 0; max-width: 680px; text-align: center; }
.combo-result.is-shown { animation: rise .5s ease-out both; }
.combo-title { margin: 0 0 8px; font-size: 1.35rem; }
.combo-text { font-size: 1.1rem; color: var(--text); }
.combo-text.combo-missing { font-size: .95rem; color: var(--muted); }
.combo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; text-align: left; }
.combo-card-text { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(28, 20, 48, .6); }
.combo-card-text h3 { margin: 0 0 6px; font-size: 1.05rem; }
.combo-card-text p { margin: 0 0 4px; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.combo-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.combo-actions .button { display: inline-flex; align-items: center; gap: 8px; }
.button.ghost { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.button.ghost:hover { background: rgba(233, 207, 147, .12); color: var(--gold-strong); }
.combo-picker { margin-top: 24px; }
.combo-search { margin: 0 auto 14px; }
.combo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px 8px;
  max-height: 440px; overflow-y: auto; padding: 4px; -webkit-overflow-scrolling: touch;
}
.combo-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  color: var(--text); font: inherit; font-size: .78rem; line-height: 1.25; text-align: center; cursor: pointer;
}
.combo-card img { width: 100%; height: auto; aspect-ratio: 4 / 7; object-fit: cover; border-radius: 5px; transition: transform .15s, opacity .2s; }
.combo-card:hover img { transform: translateY(-3px); }
.combo-card.is-picked img { opacity: .35; }
.combos.combos-compact li { padding: 8px 0; }
.combos.combos-compact img { width: 48px; }
.combos-compact h4 { margin: 0 0 2px; font: 1rem Georgia, "Times New Roman", serif; }
.combos-compact p { margin: 0; }

/* All spreads as tabs at the top of a spread page */
.spread-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.spread-tabs a {
  display: flex; align-items: center; gap: 12px; padding: 9px 16px 9px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); color: var(--text); text-decoration: none; line-height: 1.25;
  transition: border-color .2s, transform .2s, background .2s;
}
.spread-tabs a:hover { border-color: var(--gold); color: var(--text); transform: translateY(-2px); }
.spread-tabs a[aria-current] { border-color: var(--gold); background: #3a2a63; box-shadow: inset 0 0 0 1px var(--gold); }
.spread-tabs .tab-label { display: flex; flex-direction: column; font-size: .95rem; }
.spread-tabs small { color: var(--muted); font-size: .78rem; }
.spread-tabs .tab-all { border-style: dashed; }
/* The guides: the guide's card beside its title, cards that illustrate a section, the list of the guides */
.guide-intro { display: flex; gap: 22px; align-items: center; }
.guide-cover { flex: none; width: 92px; height: auto; border-radius: 8px; box-shadow: 0 8px 26px rgba(0, 0, 0, .45); }
.guide-cards { margin: 14px 0 6px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.guide-list { list-style: none; padding: 0; margin: 24px 0 8px; display: grid; gap: 12px; }
.guide-list h2 { margin: 0 0 6px; font-size: 1.25rem; }
.guide-list h2 a { color: var(--gold-strong); text-decoration: none; }
.guide-pager { margin-top: 28px; }
/* The spreads section: the spreads by topic, each with its layout in miniature */
.spread-topic { margin-top: 28px; }
.spread-topic h2 { margin-bottom: 12px; }
.spread-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.spread-tile {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.spread-tile:hover { border-color: var(--gold); color: var(--text); transform: translateY(-2px); }
.spread-tile .mini { grid-row: 1 / 3; }
.spread-tile-name { font: 1.1rem Georgia, "Times New Roman", serif; color: var(--gold-strong); }
.spread-tile small { color: var(--muted); font-size: .8rem; }
.spread-tile-text { grid-column: 1 / 3; margin-top: 8px; color: var(--muted); font-size: .92rem; line-height: 1.4; }
/* A small picture of a spread's layout: the same grid as the table, in miniature */
.mini { flex: none; display: grid; justify-content: start; align-content: center; height: 34px; }
.mini i { display: block; width: var(--w); aspect-ratio: 4 / 7; border-radius: 2px; background: var(--gold); opacity: .85; }
.mini.layout-row { --w: 9px; column-gap: 2px; padding: 0; }
.mini.layout-cross { --w: 4px; --vg: 1px; }
.mini.layout-cross .slot-2 { opacity: 1; filter: brightness(.75); }
.mini.layout-grid { grid-template-columns: repeat(var(--cols), calc(var(--w) / 2)); grid-template-rows: repeat(var(--rows), calc(var(--w) * 7 / 8)); gap: 1px; padding: 0; }
.mini.layout-grid i { width: auto; }
.spread-tabs a:not([aria-current]) .mini i { opacity: .55; }

/* The destiny matrix: a date, the octagram and every position with its arcanum */
.matrix-box {
  margin: 24px 0 8px; padding: 22px; border: 1px solid var(--line); border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0%, #3a2a63 0%, var(--panel) 55%, #211838 100%);
}
.matrix-form { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 12px 16px; }
/* the personal matrix and the compatibility of a couple: two pages of one calculator */
.matrix-tabs { display: flex; gap: 6px; width: fit-content; margin: 18px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.matrix-tabs a { padding: 8px 18px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.matrix-tabs a[aria-current] { background: var(--gold); color: var(--button-text); font-weight: 600; }
.matrix-tabs a:not([aria-current]):hover { color: var(--gold-strong); }
.matrix-date { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.matrix-date legend { margin-bottom: 6px; padding: 0; color: var(--muted); font-size: .9rem; }
.matrix-date select, .matrix-date input {
  padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; color-scheme: dark;
}
.matrix-date input { width: 5.5em; }
.matrix-bot { margin: 18px auto 0; max-width: 640px; padding: 16px 18px; border: 1px solid var(--gold); border-radius: 14px; background: rgba(28, 20, 48, .6); text-align: center; }
.matrix-bot h3 { margin: 0 0 6px; color: var(--gold); }
.matrix-bot p { margin: 0 0 12px; color: var(--muted); }
.matrix-bot .button { display: inline-flex; align-items: center; gap: 8px; }
.matrix-error { margin: 12px 0 0; text-align: center; color: #f0a0a0; }
.matrix-result { margin-top: 22px; animation: rise .5s ease-out both; }
.matrix-title { margin: 0 0 10px; text-align: center; font-size: 1.25rem; }
.matrix-when { color: var(--gold); }
.matrix-chart { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
/* The birth cards: the sums the date went through, then the personality and soul cards side by side */
.birth-result { margin-top: 22px; animation: rise .5s ease-out both; }
.birth-result > h2 { margin: 0 0 6px; text-align: center; font-size: 1.25rem; }
.birth-when { color: var(--gold); }
.birth-steps { margin: 0 0 16px; text-align: center; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.birth-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.birth-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(28, 20, 48, .6); }
.birth-card-image { flex: 0 0 96px; }
.birth-card-image img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 8px 26px rgba(0, 0, 0, .45); }
.birth-role { margin: 0 0 2px; color: var(--gold); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.birth-card-text h3 { margin: 0 0 6px; font-size: 1.1rem; }
.birth-card-text p { margin: 0 0 8px; font-size: .95rem; }
.birth-meaning { max-width: 720px; margin: 18px auto 0; }
.birth-meaning h3 { margin: 0 0 8px; color: var(--gold); }
/* the banner that leads to the birth cards from the home page and the destiny matrix */
.promo {
  display: flex; align-items: center; gap: 16px; margin: 22px 0; padding: 14px 18px; border: 1px solid var(--gold);
  border-radius: 14px; background: rgba(28, 20, 48, .6); color: var(--muted); text-decoration: none;
}
.promo:hover { border-color: var(--gold-strong); }
.promo img { flex: none; width: 52px; height: auto; border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.promo strong { display: block; margin-bottom: 2px; color: var(--gold-strong); font-size: 1.1rem; }
.promo-go { margin-left: auto; color: var(--gold); font-size: 1.5rem; }
.matrix-outline { fill: none; stroke: #6b5c9e; stroke-width: 2; }
.matrix-outline.is-ancestral { stroke: #4e4380; stroke-dasharray: 6 5; }
.matrix-ray { stroke: #3d3063; stroke-width: 1.5; }
.matrix-money { stroke: #3e9c78; stroke-width: 2.5; }
.matrix-point { cursor: pointer; }
.matrix-point circle { stroke: rgba(255, 255, 255, .55); stroke-width: 2; transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.matrix-point:hover circle, .matrix-point:focus-visible circle { transform: scale(1.12); stroke: #fff; }
.matrix-point:focus { outline: none; }
.matrix-point text { fill: #fff; font-family: Georgia, "Times New Roman", serif; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.matrix-point.is-core circle { fill: var(--gold); }
.matrix-point.is-core text { fill: var(--button-text); }
.matrix-point.is-violet circle { fill: #7b5cc4; }
.matrix-point.is-blue circle { fill: #4f7fd6; }
.matrix-point.is-cyan circle { fill: #2f9fb8; }
.matrix-point.is-amber circle { fill: #c98a26; }
.matrix-point.is-orange circle { fill: #d0692f; }
.matrix-point.is-red circle { fill: #b9423f; }
.matrix-point.is-line circle { fill: #2a2050; stroke: var(--gold); }
.matrix-point.is-green circle { fill: #2f8f6a; }
.matrix-sign { fill: var(--gold); font: 700 22px Georgia, "Times New Roman", serif; text-anchor: middle; dominant-baseline: central; }
/* The chart builds itself: the lines draw, the points appear from the centre outwards, the centre glows, the money
   and love signs come last, then the positions below rise one after another. */
.matrix-chart .matrix-outline:not(.is-ancestral), .matrix-chart .matrix-ray, .matrix-chart .matrix-money {
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s ease-out forwards;
}
.matrix-chart .matrix-ray { animation-delay: .2s; }
.matrix-chart .matrix-money { animation-delay: 1.3s; }
.matrix-chart .matrix-outline.is-ancestral { opacity: 0; animation: fade .8s ease-out .35s forwards; }
.matrix-chart .matrix-point { transform-box: fill-box; transform-origin: center; opacity: 0;
  animation: pop .5s cubic-bezier(.34, 1.56, .64, 1) var(--delay, 0s) forwards; }
.matrix-chart .matrix-point.is-core circle { animation: halo 1.6s ease-in-out 1.6s 2; }
.matrix-chart .matrix-sign { opacity: 0; animation: fade .6s ease-out 1.8s forwards; }
.matrix-section { animation: rise .5s ease-out var(--delay, 0s) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
@keyframes halo { 50% { stroke: #fff; stroke-width: 7; filter: drop-shadow(0 0 10px rgba(233, 207, 147, .9)); } }
/* "Reduce motion": no drawing and no jumps; the points still fade in one after another, quicker */
@media (prefers-reduced-motion: reduce) {
  .matrix-chart .matrix-outline:not(.is-ancestral), .matrix-chart .matrix-ray, .matrix-chart .matrix-money {
    stroke-dasharray: none; animation: none;
  }
  .matrix-chart .matrix-outline.is-ancestral { opacity: 1; animation: none; }
  .matrix-chart .matrix-point { animation: fade .35s ease-out calc(var(--delay, 0s) * .5) forwards; }
  .matrix-chart .matrix-point.is-core circle { animation: none; }
  .matrix-chart .matrix-sign { animation-delay: .7s; }
  .matrix-section { animation: fade .4s ease-out both; }
}
.matrix-sections { margin-top: 18px; }
.matrix-section { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(28, 20, 48, .55); transition: border-color .3s, box-shadow .3s; }
.matrix-section.is-lit { animation: lit 1.6s ease-out; }
@keyframes lit { 0%, 40% { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(233, 207, 147, .45); } }
.matrix-section h3 { margin: 0 0 6px; color: var(--gold); }
.matrix-section p { margin: 0 0 12px; color: var(--muted); }
.matrix-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.matrix-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--panel);
  color: var(--text); text-decoration: none; line-height: 1.35; font-size: .9rem;
}
a.matrix-card:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); }
.matrix-card img { flex: none; width: 52px; height: auto; aspect-ratio: 4 / 7; border-radius: 4px; }
.matrix-words { display: flex; flex-direction: column; gap: 2px; }
.matrix-label { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.matrix-plus { color: #9fd8b7; }
.matrix-minus { color: #e7a9a9; }
.matrix-more { color: var(--gold); font-size: .85rem; }

.flip.is-appearing { animation: appear .4s ease-out both; }
@keyframes appear { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
/* "Reduce motion": no floating, shuffling or hover tilt; the cards still fade in and turn over, faster */
@media (prefers-reduced-motion: reduce) {
  .spread-deck, .spread-deck span { animation: none !important; }
  .flip-inner { transition-duration: .4s; }
  .flip:not(.is-open):hover .flip-inner, .flip:not(.is-open):focus-visible .flip-inner { transform: none; }
}

/* Angel numbers: the search, the grid of numbers and a number's page */
.angels-find {
  margin: 24px 0 8px; padding: 22px; border: 1px solid var(--line); border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0%, #3a2a63 0%, var(--panel) 55%, #211838 100%);
}
.angels-form { max-width: 520px; margin: 0 auto; text-align: center; }
.angels-form label { display: block; margin-bottom: 10px; font: 1.25rem Georgia, "Times New Roman", serif; color: var(--gold); }
.angels-row { display: flex; gap: 10px; }
.angels-row input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: 1.2rem Georgia, "Times New Roman", serif; letter-spacing: .08em;
}
.angels-error { margin: 12px 0 0; text-align: center; color: #f0a0a0; }
.angels-result { display: flex; gap: 20px; align-items: center; max-width: 560px; margin: 22px auto 0; }
.angels-result.is-shown { animation: rise .5s ease-out both; }
.angels-result-card { flex: 0 0 110px; }
.angels-result-card img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 8px 26px rgba(0, 0, 0, .45); }
.angels-result-text p { margin: 0 0 6px; }
.angels-result-number { font: 2rem Georgia, "Times New Roman", serif; color: var(--gold-strong); letter-spacing: .06em; line-height: 1.1; }
.angels-result-title { font-size: 1.05rem; }
.angels-result-keys { color: var(--muted); font-size: .92rem; }
.angels-result .button { margin-top: 8px; padding: 9px 18px; }
.angel-sum { color: var(--muted); font-size: .95rem; }
.angel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.angel-tile {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 16px 14px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text);
  transition: border-color .15s, transform .15s;
}
.angel-tile:hover { border-color: var(--gold); color: var(--text); transform: translateY(-2px); }
.angel-tile-number { font: 2rem Georgia, "Times New Roman", serif; color: var(--gold-strong); letter-spacing: .06em; line-height: 1.1; }
.angel-tile-short { font-size: .92rem; line-height: 1.4; }
.angel-tile-card { margin-top: auto; color: var(--muted); font-size: .82rem; }
.angel-grid-small { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.angel-grid-small .angel-tile { padding: 12px 14px; }
.angel-grid-small .angel-tile-number { font-size: 1.5rem; }
.arcana-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.arcana-row { display: flex; gap: 16px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.arcana-thumb { flex: 0 0 74px; }
.arcana-thumb img { width: 100%; height: auto; aspect-ratio: 4 / 7; object-fit: cover; border-radius: 5px; }
.arcana-text h3 { margin: 0 0 4px; font: 1.15rem Georgia, "Times New Roman", serif; }
.arcana-text h3 a { color: var(--gold-strong); text-decoration: none; }
.arcana-number { color: var(--muted); font-size: .95rem; margin-right: 4px; }
.arcana-keys { margin: 0 0 6px; color: var(--gold); font-size: .9rem; }
.arcana-text p:last-child { margin: 0; font-size: .95rem; line-height: 1.5; }
.arcana-suit { margin: 22px 0 30px; }
.arcana-suit h3 { margin: 0 0 6px; font: 1.3rem Georgia, "Times New Roman", serif; }
.arcana-suit h3 a { color: var(--gold-strong); }
.group h2 a { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--gold); }
.dream-tile-name { font: 1.3rem/1.2 Georgia, "Times New Roman", serif; color: var(--gold-strong); }
.angel-grid-small .dream-tile-name { font-size: 1.02rem; }
.angel-grid-small.dream-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.angel-grid + p { margin-top: 14px; }
.dream-head { margin-top: 20px; }
.dream-page h3 { margin: 22px 0 6px; font: 1.12rem Georgia, "Times New Roman", serif; color: var(--gold); }
.dream-bot { margin: 4px 0 28px; }
.angel-head { display: flex; gap: 28px; align-items: center; margin-top: 20px; }
.angel-number {
  flex: none; display: flex; align-items: center; justify-content: center; width: 168px; height: 168px; margin: 0;
  border: 1px solid var(--gold); border-radius: 50%; box-shadow: 0 0 0 6px rgba(233, 207, 147, .08), 0 0 40px rgba(233, 207, 147, .18);
  background: radial-gradient(circle, #3a2a63 0%, var(--panel) 70%);
  font: 3rem Georgia, "Times New Roman", serif; color: var(--gold-strong); letter-spacing: .04em;
}
.angel-number { animation: angel-glow 3.5s ease-in-out infinite alternate; }
@keyframes angel-glow { to { box-shadow: 0 0 0 10px rgba(233, 207, 147, .05), 0 0 64px rgba(233, 207, 147, .32); } }
@media (prefers-reduced-motion: reduce) { .angel-number { animation: none; } }
.angel-intro { flex: 1; min-width: 0; }
.lifepath-found { display: flex; gap: 24px; align-items: center; max-width: 760px; margin: 0 auto 18px; }
.lifepath-found .angel-number { width: 124px; height: 124px; font-size: 2.6rem; }
.lifepath-found-text { flex: 1; min-width: 0; }
.lifepath-found-text h3 { margin: 0 0 4px; font-size: 1.3rem; }
.lifepath-found-text p { margin: 0 0 10px; }
.lifepath-card { max-width: 760px; margin: 0 auto; }
.lifepath-page h3 { margin: 22px 0 6px; font: 1.12rem Georgia, "Times New Roman", serif; color: var(--gold); }
.lifepath-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.lifepath-columns h3 { margin: 0 0 4px; font: 1.12rem Georgia, "Times New Roman", serif; color: var(--gold); }
.lifepath-columns ul { margin: 0; padding-left: 1.2em; }
.lifepath-columns li { margin-bottom: 6px; }
.angel-keys { color: var(--gold); font-size: .95rem; }
.angel-tarot::after { content: ""; display: block; clear: both; }
.angel-card { float: right; width: 130px; margin: 0 0 12px 22px; }
.angel-card img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 8px 26px rgba(0, 0, 0, .45); }
.angel-message { padding: 4px 22px 10px; border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 12px 12px 0; }
.angel-message h2 { margin-top: 1.2rem; }
.angel-message p { font-size: 1.08rem; }

/* Card page */
.crumbs { margin: 20px 0 0; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.card-head { display: flex; gap: 32px; margin-top: 20px; align-items: flex-start; }
.card-figure { margin: 0; flex: 0 0 300px; }
.card-image { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
.card-intro { flex: 1; min-width: 0; }
.keywords { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 18px; }
.keywords dt { color: var(--gold); }
.keywords dd { margin: 0; }
.facts { border-collapse: collapse; width: 100%; font-size: .95rem; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 7px 10px 7px 0; border-top: 1px solid var(--line); }
.facts th { color: var(--muted); font-weight: normal; width: 34%; }
.notice { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px;
  padding: 10px 14px; }
.prices th { width: auto; color: inherit; }
.prices td { text-align: right; white-space: nowrap; font-weight: 600; }
.toc { margin: 32px 0 0; padding: 18px 24px; background: var(--panel); border-radius: 12px; }
.toc h2 { margin: 0 0 6px; font-size: 1.2rem; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.reversed-thumb { float: right; width: 96px; height: auto; margin: 0 0 12px 18px; border-radius: 6px; transform: rotate(180deg); }
.answers { font-size: 1.15rem; }
.combos { list-style: none; padding: 0; margin: 0; }
.combos li { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.combos img { width: 64px; height: auto; border-radius: 4px; }
.combos h3 { margin: 0 0 4px; font-size: 1.05rem; }
.combos p { margin: 0; }
details { border-top: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .lifepath-found { flex-direction: column; gap: 14px; text-align: center; }
  .lifepath-columns { grid-template-columns: 1fr; }
  .card-head { flex-direction: column; gap: 16px; }
  .card-figure { flex: none; width: 62%; max-width: 260px; margin: 0 auto; }
  .toc ol { columns: 1; }
  .draw-result { flex-direction: column; }
  .draw-card img { width: 160px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .top-row { gap: 10px 18px; padding-top: 10px; padding-bottom: 10px; }
  .links { flex-wrap: wrap; gap: 4px 12px; font-size: .9rem; }
  /* the three spreads in one row: picture above the name */
  .spread-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .spread-tabs a { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 10px 6px; text-align: center; }
  .spread-tabs .mini { justify-content: center; }
  .spread-tabs .tab-label { font-size: .8rem; }
  .spread-box { padding: 16px 14px; margin-left: -4px; margin-right: -4px; }
  /* first row: logo, languages, Telegram; second row: the sections */
  .langs { order: 1; margin-left: auto; }
  .top-bot { order: 2; padding: 6px 12px; }
  .top-bot-long { display: none; }
  .top-bot-short { display: inline; }
  .links { order: 3; flex-basis: 100%; }
  .matrix-box { padding: 16px 12px; margin-left: -4px; margin-right: -4px; }
  .card-zoom-body { flex-direction: column; align-items: center; gap: 14px; padding: 18px 16px; }
  .guide-intro { gap: 14px; }
  .guide-cover { width: 64px; }
  .card-zoom-figure { flex: none; width: 52%; max-width: 210px; }
  .card-zoom-text { align-self: stretch; }
  .matrix-cards { grid-template-columns: 1fr; }
  .birth-cards { grid-template-columns: 1fr; }
  .birth-card-image { flex-basis: 80px; }
  .angels-find { padding: 16px 12px; margin-left: -4px; margin-right: -4px; }
  .angels-row { flex-direction: column; }
  .angels-result { align-items: flex-start; gap: 14px; }
  .angels-result-card { flex-basis: 84px; }
  .angel-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .angel-tile { padding: 12px; }
  .angel-tile-number { font-size: 1.6rem; }
  .angel-grid-small { grid-template-columns: repeat(3, 1fr); }
  .angel-grid-small .angel-tile-number { font-size: 1.3rem; }
  .angel-head { flex-direction: column; gap: 16px; text-align: center; }
  .angel-number { width: 132px; height: 132px; font-size: 2.4rem; }
  .angel-card { width: 96px; margin-left: 14px; }
}

/* Printed (and saved as PDF, like the public offer the payment service asks for): black on white, the text only. */
@media print {
  body { background: #fff; color: #000; }
  header.top, .crumbs, footer.bottom { display: none; }
  .legal h1, .legal h2, .legal .lead { color: #000; }
  .legal p { break-inside: avoid; }
  a { color: #000; }
}
