.tarot-app {
  --tg: #d9bb79;
  --ti: #f2e8d5;
  max-width: 1320px;
  margin: auto;
  padding: 32px 24px 60px;
  color: var(--ti);
}
.tarot-app [hidden] {
  display: none !important;
}
.tarot-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.tarot-heading h1 {
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1.1;
  margin: 8px 0 12px;
  font-weight: 400;
}
.tarot-heading p {
  margin: 0;
  color: #b8becc;
}
.tarot-app .eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--tg);
  text-transform: uppercase;
}
.tarot-app button,
.tarot-app input,
.tarot-app select {
  font: inherit;
}
.tarot-app button {
  cursor: pointer;
}
.tarot-app button:disabled {
  cursor: default;
}
.tarot-app :focus-visible {
  outline: 2px solid #f1d597;
  outline-offset: 5px;
}
.tarot-settings {
  border: 1px solid #d9bb7930;
  background: #0d1727;
  border-radius: 12px;
  padding: 18px 22px;
  position: relative;
  z-index: 2;
}
.tarot-spreads {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.tarot-spreads button {
  border: 1px solid transparent;
  background: transparent;
  color: #b9bdc7;
  padding: 10px 8px;
  border-radius: 6px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tarot-spreads button span {
  font:
    26px Georgia,
    serif;
  color: #ac9366;
}
.tarot-spreads button[aria-pressed="true"] {
  border-color: #d9bb7977;
  background: linear-gradient(120deg, #d9bb7921, transparent);
  color: #f5e8cc;
}
.tarot-settings > [data-spread-hint] {
  margin: 12px 0 18px;
  font-size: 13px;
  color: #b9bdc7;
}
.tarot-inputs {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 190px 165px auto;
  gap: 16px;
  align-items: end;
}
.tarot-app label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #dfd2b8;
}
.tarot-app label > span {
  font-size: 11px;
  color: #949cac;
}
.tarot-app input:not([type="checkbox"]),
.tarot-app select {
  width: 100%;
  min-width: 0;
  padding: 12px;
  color: #f5e8cc;
  border: 1px solid #b89a593e;
  background: #09101d;
  border-radius: 5px;
}
.tarot-app .tarot-check {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 44px;
  gap: 8px;
}
.tarot-check input {
  accent-color: #d9bb79;
  width: 17px;
  height: 17px;
}
.tarot-app .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #d9bb7966;
  border-radius: 30px;
  padding: 12px 19px;
  background: #111e30;
  color: #ecdcbb;
  font-size: 13px;
  min-height: 44px;
  white-space: normal;
  text-decoration: none;
}
.tarot-app .btn.primary {
  color: #111925;
  background: linear-gradient(120deg, #f0d9a5, #bea16a);
  border-color: #ecd19c;
}
.tarot-app .btn.ghost {
  background: transparent;
}
.tarot-app .btn:hover {
  filter: brightness(1.15);
}
.tarot-app button:disabled {
  opacity: 0.5;
}
.tarot-table {
  position: relative;
  isolation: isolate;
  min-height: 520px;
  padding: 30px 24px 36px;
  margin: 20px 0 32px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #b99b573b;
  background:
    radial-gradient(ellipse at 50% 55%, #24384175, transparent 62%),
    radial-gradient(ellipse at 45% 90%, #9883571b, transparent 58%), #080f1a;
  box-shadow:
    inset 0 0 100px #0008,
    0 20px 60px #0003;
}
.tarot-table:after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid #d4b77b18;
  border-radius: 12px;
  pointer-events: none;
  z-index: -1;
}
.tarot-orbit {
  position: absolute;
  width: 700px;
  max-width: 85%;
  aspect-ratio: 1;
  border: 1px solid #c9aa6420;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg 14.8deg,
    #cfad6d28 14.9deg 15deg
  );
  mask-image: radial-gradient(
    circle,
    transparent 55%,
    #000 55.4%,
    #000 57%,
    transparent 57.3%,
    transparent 68%,
    #000 68.5%
  );
  animation: tarot-orbit 140s linear infinite;
}
.tarot-status {
  text-align: center;
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: #d6c4a3;
  margin: 0 0 28px;
  min-height: 24px;
}
.tarot-stack {
  height: 190px;
  width: 126px;
  margin: 20px auto 32px;
  position: relative;
  perspective: 700px;
}
.tarot-stack i {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid #d5b670;
  background: #0c1525 url("/assets/tarot/major-a.png") 100% 100%/400% 300%;
  box-shadow: 0 15px 30px #0008;
}
.tarot-stack i:nth-child(1) {
  transform: rotate(-9deg) translate(-9px, 1px);
}
.tarot-stack i:nth-child(2) {
  transform: rotate(7deg) translate(7px, 0);
}
.is-shuffling .tarot-stack i {
  animation: tarot-shuffle 0.4s ease-in-out infinite alternate;
}
.is-shuffling .tarot-stack i:nth-child(2) {
  animation-delay: -0.2s;
}
.is-shuffling .tarot-stack i:nth-child(3) {
  animation-delay: -0.1s;
}
.has-started:not(.is-shuffling) .tarot-stack {
  display: none;
}
.is-shuffling .tarot-stack {
  display: block;
}
.tarot-fan {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 20px 15px 35px;
  scrollbar-color: #ac915c #101a2c;
  scrollbar-width: thin;
  max-width: 100%;
  margin-bottom: 28px;
  min-height: 173px;
}
.tarot-back {
  flex: 0 0 79px;
  aspect-ratio: 2/3;
  position: relative;
  background: #0b1728 url("/assets/tarot/major-a.png") 100% 100%/400% 300%;
  border: 1px solid #c7a967;
  border-radius: 5px;
  margin-right: -56px;
  box-shadow: -4px 6px 10px #0009;
  transition:
    transform 0.22s,
    box-shadow 0.22s,
    opacity 0.25s;
  transform-origin: bottom center;
  color: #e2c58b;
}
.tarot-back:last-child {
  margin-right: 0;
}
.tarot-back span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
}
.tarot-back:hover,
.tarot-back:focus-visible {
  transform: translateY(-14px) rotate(-3deg);
  box-shadow: 0 0 22px #e2c68c80;
  z-index: 2;
}
.tarot-back.is-picked {
  opacity: 0.13;
  transform: translateY(25px);
  pointer-events: none;
}
.tarot-layout {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1120px;
  margin: auto;
}
.tarot-slot {
  position: relative;
  width: clamp(115px, 15vw, 165px);
  aspect-ratio: 2/3;
  border: 1px dashed #d9bb7945;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 42px;
}
.tarot-slot-number {
  font:
    28px Georgia,
    serif;
  color: #d9bb7955;
}
.tarot-slot-name {
  position: absolute;
  top: calc(100% + 10px);
  left: -10px;
  right: -10px;
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  color: #b9ac96;
}
.tarot-slot.has-card {
  border: 0;
}
.tarot-revealed {
  width: 100%;
  height: 100%;
  border: 1px solid #d8ba72;
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 25px #0009;
  background: #101927;
  padding: 0;
  animation: tarot-reveal 0.75s cubic-bezier(0.16, 0.8, 0.25, 1) both;
  transition:
    box-shadow 0.3s,
    translate 0.3s;
}
.tarot-revealed:hover {
  translate: 0 -5px;
  box-shadow: 0 0 30px #d9bb7960;
}
.tarot-revealed:after {
  content: "";
  position: absolute;
  inset: -50%;
  background: linear-gradient(
    120deg,
    transparent 40%,
    #fff4 48%,
    transparent 55%
  );
  transform: translateX(-100%);
  animation: tarot-shine 1.2s 0.25s ease-out;
}
.tarot-art {
  position: absolute;
  inset: 0;
  display: block;
  background-image: var(--sheet);
  background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%);
  background-position: var(--x) var(--y);
  background-repeat: no-repeat;
}
.tarot-art.is-inverted {
  transform: rotate(180deg);
}
.tarot-card-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 4px 8px;
  background: linear-gradient(transparent, #060d18 45%);
  font:
    clamp(13px, 1.4vw, 18px) Georgia,
    serif;
  color: #f1dcad;
  line-height: 1.2;
}
.tarot-card-caption small {
  font: 8px system-ui;
  letter-spacing: 0.1em;
  display: block;
  margin-top: 5px;
  color: #baa681;
}
.tarot-table-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.tarot-layout[data-spread="celtic"] {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, auto);
  max-width: 850px;
  gap: 20px 32px;
  align-items: center;
}
.tarot-layout[data-spread="celtic"] .tarot-slot {
  width: 100%;
  max-width: 130px;
  justify-self: center;
}
.tarot-layout[data-spread="celtic"] [data-slot="0"] {
  grid-area: 2/2;
}
.tarot-layout[data-spread="celtic"] [data-slot="1"] {
  grid-area: 2/3;
}
.tarot-layout[data-spread="celtic"] [data-slot="2"] {
  grid-area: 1/2;
}
.tarot-layout[data-spread="celtic"] [data-slot="3"] {
  grid-area: 3/2;
}
.tarot-layout[data-spread="celtic"] [data-slot="4"] {
  grid-area: 2/1;
}
.tarot-layout[data-spread="celtic"] [data-slot="5"] {
  grid-area: 2/4;
}
.tarot-layout[data-spread="celtic"] [data-slot="6"] {
  grid-area: 4/5;
}
.tarot-layout[data-spread="celtic"] [data-slot="7"] {
  grid-area: 3/5;
}
.tarot-layout[data-spread="celtic"] [data-slot="8"] {
  grid-area: 2/5;
}
.tarot-layout[data-spread="celtic"] [data-slot="9"] {
  grid-area: 1/5;
}
.tarot-reading {
  max-width: 1040px;
  margin: 0 auto 35px;
  scroll-margin-top: 20px;
}
.tarot-reading h2,
.tarot-guide h2 {
  font:
    clamp(28px, 3vw, 42px) Georgia,
    serif;
  margin: 10px 0 20px;
}
.tarot-question {
  font:
    italic 23px Georgia,
    serif;
  border-left: 2px solid #d9bb79;
  padding: 12px 20px;
  overflow-wrap: anywhere;
}
.tarot-summary {
  border-top: 1px solid #d9bb7940;
  border-bottom: 1px solid #d9bb7940;
  padding: 15px 0;
  margin-bottom: 30px;
  line-height: 1.8;
  color: #c7cbd2;
}
.tarot-summary p:first-child {
  color: #eee0c6;
  font-size: 19px;
}
.tarot-interpretations {
  display: grid;
  gap: 20px;
}
.tarot-interpretations article {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 25px;
  padding: 24px;
  background: #111c2c;
  border: 1px solid #b89a592c;
  border-radius: 10px;
  break-inside: avoid;
}
.tarot-mini {
  position: relative;
  width: 110px;
  height: 165px;
  border-radius: 5px;
  overflow: hidden;
}
.tarot-interpretations h3 {
  font:
    26px Georgia,
    serif;
  margin: 8px 0 15px;
}
.tarot-interpretations h3 small {
  font: 11px system-ui;
  display: inline-block;
  color: #ceb782;
  margin-left: 10px;
}
.tarot-interpretations p {
  line-height: 1.8;
  color: #c6cbd5;
  font-size: 14px;
}
.tarot-interpretations .tarot-context {
  color: #929eaf;
  font-size: 13px;
}
.tarot-app details {
  line-height: 1.8;
}
.tarot-app summary {
  cursor: pointer;
  color: #d7c397;
  font-size: 13px;
}
.tarot-reading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}
.tarot-bottom {
  max-width: 1040px;
  margin: 25px auto;
  color: #929dad;
  font-size: 13px;
}
.tarot-bottom > details {
  padding: 18px 0;
  border-top: 1px solid #c9aa632b;
}
.tarot-bottom a {
  color: #e0c58c;
  text-decoration: underline;
}
.tarot-history-item {
  display: block;
  width: 100%;
  padding: 16px;
  margin: 8px 0;
  text-align: left;
  color: #decca9;
  border: 1px solid #b89a593c;
  background: #0c1525;
  border-radius: 6px;
}
.tarot-history-item span {
  display: block;
  color: #9aa6b8;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.tarot-guide {
  width: min(1100px, 95vw);
  max-height: 88vh;
  background: #0c1525;
  color: #ede1c9;
  border: 1px solid #c0a46c;
  border-radius: 14px;
  padding: 28px;
}
.tarot-guide::backdrop {
  background: #02060dcc;
  backdrop-filter: blur(8px);
}
.tarot-guide header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.tarot-guide label {
  display: inline-grid;
  min-width: 210px;
  margin: 8px 15px 20px 0;
}
.tarot-catalog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.tarot-catalog article {
  border-top: 1px solid #b89a5939;
  padding-top: 20px;
}
.tarot-guide-art {
  position: relative;
  width: 150px;
  aspect-ratio: 2/3;
  margin: 0 auto 15px;
  border-radius: 7px;
  overflow: hidden;
}
.tarot-catalog h3 {
  font:
    23px Georgia,
    serif;
}
.tarot-catalog p {
  font-size: 13px;
  color: #bcc4d0;
  line-height: 1.75;
}
.tarot-embed {
  background: #080f1c;
  margin: 0;
  color: #f1e8d7;
  font-family: system-ui, sans-serif;
}
.tarot-embed .tarot-app {
  padding: 20px;
}
.tarot-embed .tarot-heading h1 {
  font-size: 36px;
}
.tarot-embed .tarot-bottom {
  font-size: 12px;
}
@keyframes tarot-orbit {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes tarot-shuffle {
  to {
    transform: translateX(90px) rotate(15deg);
  }
}
@keyframes tarot-reveal {
  0% {
    transform: perspective(800px) rotateY(95deg) translateY(-20px);
    filter: brightness(2);
  }
  100% {
    transform: perspective(800px) rotateY(0);
    filter: brightness(1);
  }
}
@keyframes tarot-shine {
  to {
    transform: translateX(100%);
  }
}
@media (max-width: 1100px) {
  .tarot-inputs {
    grid-template-columns: 1fr 180px;
  }
  .tarot-spreads {
    gap: 3px;
  }
  .tarot-spreads button {
    font-size: 12px;
    gap: 6px;
  }
  .tarot-app .tarot-check {
    align-self: center;
  }
  .tarot-catalog {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .tarot-app {
    padding: 22px 14px;
  }
  .tarot-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .tarot-heading > .btn {
    padding: 10px;
    font-size: 11px;
    max-width: 105px;
  }
  .tarot-heading p {
    font-size: 13px;
  }
  .tarot-settings {
    padding: 14px;
  }
  .tarot-spreads {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .tarot-spreads button {
    display: block;
    padding: 8px 6px;
  }
  .tarot-spreads button span {
    display: block;
    font-size: 21px;
    margin-bottom: 4px;
  }
  .tarot-inputs {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .tarot-inputs > label:first-child {
    grid-column: 1/-1;
  }
  .tarot-inputs > .btn {
    grid-column: 1/-1;
  }
  .tarot-table {
    padding: 24px 14px;
    min-height: 450px;
  }
  .tarot-layout {
    gap: 20px 15px;
  }
  .tarot-slot {
    width: calc((100% - 30px) / 3);
    max-width: 140px;
  }
  .tarot-layout[data-spread="daily"] .tarot-slot {
    width: 180px;
    max-width: 180px;
  }
  .tarot-layout[data-spread="celtic"] {
    display: flex;
    gap: 20px 15px;
  }
  .tarot-layout[data-spread="celtic"] .tarot-slot {
    width: calc((100% - 30px) / 3);
    max-width: 140px;
  }
  .tarot-interpretations article {
    grid-template-columns: 70px 1fr;
    gap: 15px;
    padding: 17px 12px;
  }
  .tarot-mini {
    width: 70px;
    height: 105px;
  }
  .tarot-interpretations h3 {
    font-size: 23px;
  }
  .tarot-interpretations h3 small {
    display: block;
    margin: 8px 0;
  }
  .tarot-guide {
    padding: 18px;
  }
  .tarot-catalog {
    grid-template-columns: 1fr;
  }
  .tarot-guide label {
    display: grid;
    min-width: 0;
    margin-right: 0;
  }
  .tarot-guide-art {
    width: 180px;
  }
  .tarot-status {
    font-size: 12px;
  }
  .tarot-slot-name {
    font-size: 10px;
  }
  .tarot-card-caption {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tarot-app *,
  .tarot-app *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body.printing-tarot {
    background: white !important;
    color: #17202c !important;
  }
  body.printing-tarot > header,
  body.printing-tarot > footer,
  body.printing-tarot .view:not(#tarot),
  body.printing-tarot .tarot-heading,
  body.printing-tarot .tarot-settings,
  body.printing-tarot .tarot-table,
  body.printing-tarot .tarot-bottom,
  body.printing-tarot .tarot-reading-actions,
  body.printing-tarot dialog {
    display: none !important;
  }
  body.printing-tarot #tarot,
  body.printing-tarot .tarot-reading {
    display: block !important;
  }
  body.printing-tarot .tarot-app {
    padding: 0;
    max-width: none;
    color: #17202c;
  }
  body.printing-tarot .tarot-reading * {
    color: #17202c !important;
  }
  body.printing-tarot .tarot-interpretations article {
    background: white;
    border-color: #bbb;
    break-inside: avoid;
  }
  body.printing-tarot .tarot-art {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Accommodate the sixth destination without squeezing the brand. */
.header nav {
  gap: clamp(12px, 1.6vw, 26px);
  flex-wrap: wrap;
  justify-content: center;
}
.header nav a {
  white-space: nowrap;
}

.tarot-conclusion{margin-top:32px;padding:28px clamp(18px,4vw,40px);border:1px solid #d9bb7955;border-radius:12px;background:linear-gradient(125deg,#d9bb7915,#101c2c);break-inside:avoid}.tarot-conclusion h2{font-size:clamp(26px,3vw,36px)}.tarot-conclusion>p:not(.eyebrow){color:#d6d8df;line-height:1.9;font-size:16px;max-width:78ch}.tarot-conclusion>p:last-child{color:#f0dec0}
