.tarot-page {
  width: 100%;
  box-sizing: border-box;
  padding: 24px 22px 28px;
  color: #4f3a30;
  background:
    radial-gradient(circle at 82% 12%, rgba(231, 178, 90, 0.24), transparent 30%),
    radial-gradient(circle at 16% 78%, rgba(255, 255, 255, 0.68), transparent 34%),
    linear-gradient(135deg, #fff8ea 0%, #fff1d7 52%, #f7dca7 100%);
  border: 1px solid rgba(219, 177, 109, 0.50);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 16px 42px rgba(144, 92, 41, 0.12);
}

.tarot-page * {
  box-sizing: border-box;
}

.tarot-hero {
  max-width: 900px;
  margin: 0 auto 18px;
  text-align: center;
}

.tarot-eyebrow {
  margin: 0 0 5px !important;
  color: #b2622f !important;
  font-size: 12px !important;
  line-height: 1.4em !important;
  text-transform: uppercase;
  letter-spacing: 2.4px;
}

.tarot-hero h1 {
  margin: 0 0 8px !important;
  color: #3f2059 !important;
  font-size: 36px !important;
  line-height: 1.12em !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

.tarot-intro {
  max-width: 680px;
  margin: 0 auto !important;
  color: #6a4d3c !important;
  font-size: 16px !important;
  line-height: 1.55em !important;
}

.tarot-layout {
  display: grid;
  grid-template-columns: minmax(210px, 252px) minmax(680px, 1040px);
  max-width: 1320px;
  gap: 18px;
  align-items: start;
  margin: 0 auto;
}

.tarot-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.tarot-spread-button {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 10px 13px;
  border: 1px solid rgba(203, 162, 94, 0.46);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 246, 226, 0.62));
  color: #4e3426;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.80), 0 8px 18px rgba(123, 82, 38, 0.10);
}

.tarot-spread-button:hover {
  border-color: rgba(181, 103, 45, 0.62);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.90), rgba(255, 236, 200, 0.78));
}

.tarot-spread-button.is-active {
  position: relative;
  border-color: rgba(181, 103, 45, 0.84);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(249, 219, 163, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 24px rgba(132, 83, 34, 0.14);
}

.tarot-spread-button.is-active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(#d88b3a, #8f4a22);
}

.tarot-spread-button span {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
  line-height: 1.2em;
  font-weight: 700;
}

.tarot-spread-button small {
  display: block;
  color: #81604d;
  font-size: 11px;
  line-height: 1.3em;
}

.tarot-stage {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 18px 18px;
  border: 1px solid rgba(203, 162, 94, 0.48);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 253, 247, 0.90), rgba(255, 240, 209, 0.78));
  box-shadow: 0 16px 38px rgba(117, 76, 34, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.tarot-stage-top {
  text-align: center;
}

.tarot-stage h2 {
  margin: 0 0 5px !important;
  color: #3f2059 !important;
  font-size: 26px !important;
  line-height: 1.25em !important;
  text-shadow: none !important;
}

.tarot-stage p {
  color: #6a4d3c !important;
  font-size: 14px !important;
  line-height: 1.45em !important;
}

.tarot-ritual {
  width: min(100%, 620px);
  margin: 12px auto 8px;
  text-align: center;
  color: #6a4a34;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55em;
  font-style: italic;
}

.tarot-ritual span {
  display: inline-block;
  padding: 6px 16px;
  border-top: 1px solid rgba(191, 132, 56, 0.24);
  border-bottom: 1px solid rgba(191, 132, 56, 0.24);
}

.tarot-board {
  display: grid;
  width: 100%;
  max-width: 100%;
  gap: 22px;
  justify-content: center;
  align-items: start;
  margin: 14px auto 0;
}

.tarot-board[data-count="1"] { grid-template-columns: minmax(320px, 390px); }
.tarot-board[data-count="3"] { grid-template-columns: repeat(3, minmax(205px, 260px)); }
.tarot-board[data-count="4"] { grid-template-columns: repeat(4, minmax(165px, 205px)); }
.tarot-board[data-count="5"],
.tarot-board[data-count="6"] { grid-template-columns: repeat(3, minmax(185px, 230px)); }
.tarot-board[data-count="10"] { grid-template-columns: repeat(5, minmax(126px, 158px)); }

.tarot-slot {
  display: grid;
  width: 100%;
  max-width: 100%;
  gap: 6px;
  justify-items: center;
  min-width: 0;
}

.tarot-position {
  min-height: 30px;
  color: #7b4a2c;
  font-size: 11px;
  line-height: 1.25em;
  text-align: center;
  font-weight: 700;
}

.tarot-card-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3.38;
  border: 0;
  border-radius: 9px;
  background: transparent;
  perspective: 900px;
  overflow: visible;
}

button.tarot-card-shell {
  display: block;
  appearance: none;
  padding: 0;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 180ms ease;
}

button.tarot-card-shell:hover {
  transform: translateY(-2px);
}

button.tarot-card-shell:focus {
  outline: none;
}

button.tarot-card-shell:focus .tarot-card-face {
  box-shadow: 0 0 0 3px rgba(127, 61, 132, 0.14), 0 14px 28px rgba(93, 57, 28, 0.20);
}

.tarot-card-flip {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 780ms cubic-bezier(0.22, 0.70, 0.20, 1);
}

.tarot-card-shell.is-revealed .tarot-card-flip {
  transform: rotateY(180deg);
}

.tarot-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid rgba(173, 119, 50, 0.52);
  border-radius: 9px;
  overflow: hidden;
  background: #fffaf0;
  box-shadow: 0 11px 22px rgba(93, 57, 28, 0.17);
  backface-visibility: hidden;
}

.tarot-card-face-front {
  transform: rotateY(180deg);
}

.tarot-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.tarot-card-name {
  min-height: 34px;
  color: #3f2059;
  font-size: 12px;
  line-height: 1.2em;
  text-align: center;
  font-weight: 700;
}

.tarot-card-name.is-hidden {
  color: #8a684f;
  font-weight: 600;
}

.tarot-hint {
  min-height: 20px;
  margin: 10px 0 0 !important;
  color: #6a4d3c !important;
  text-align: center;
  font-style: italic;
}

.tarot-actions {
  display: flex;
  gap: 9px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tarot-action {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid rgba(168, 94, 38, 0.56);
  border-radius: 999px;
  background: linear-gradient(145deg, #ffffff, #f2ca82 54%, #b7682e);
  color: #3d2415;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(111, 68, 29, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.tarot-action:hover {
  box-shadow: 0 10px 22px rgba(111, 68, 29, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.tarot-meaning {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(191, 132, 56, 0.20);
}

.tarot-meaning h3 {
  margin: 0 0 8px !important;
  color: #3f2059 !important;
  font-size: 18px !important;
  line-height: 1.25em !important;
}

.tarot-meaning-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.tarot-meaning-item {
  padding: 12px 14px;
  border-left: 3px solid #b2622f;
  background: rgba(255, 248, 233, 0.72);
  color: #5d4333;
  font-size: 14px;
  line-height: 1.55em;
}

.tarot-meaning-item strong {
  display: block;
  margin-bottom: 4px;
  color: #3f2059;
}

.tarot-note {
  max-width: 1010px;
  margin: 18px auto 0;
  padding: 18px 20px;
  border-left: 4px solid #b2622f;
  background: rgba(255, 248, 233, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.tarot-note h2 {
  margin: 0 0 8px !important;
  color: #3f2059 !important;
  font-size: 20px !important;
  line-height: 1.25em !important;
}

.tarot-note p {
  margin: 0 0 8px !important;
  color: #6a4d3c !important;
  font-size: 14px !important;
  line-height: 1.5em !important;
}

.tarot-seo {
  max-width: 1010px;
  margin: 20px auto 0;
  color: #563f32;
}

.tarot-seo h2 {
  margin: 0 0 10px !important;
  color: #3f2059 !important;
  font-size: 22px !important;
  line-height: 1.25em !important;
}

.tarot-seo h3 {
  margin: 0 0 7px !important;
  color: #5a2d6f !important;
  font-size: 17px !important;
  line-height: 1.25em !important;
}

.tarot-seo p,
.tarot-seo li {
  color: #624735 !important;
  font-size: 15px !important;
  line-height: 1.62em !important;
}

.tarot-seo a {
  color: #0070aa;
  font-weight: 700;
}

.tarot-seo-answer,
.tarot-seo-columns,
.tarot-faq {
  padding: 20px 22px;
  border: 1px solid rgba(203, 162, 94, 0.42);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 10px 26px rgba(117, 76, 34, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.tarot-seo-answer p:last-child,
.tarot-faq p:last-child {
  margin-bottom: 0 !important;
}

.tarot-seo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.tarot-seo-grid article {
  padding: 15px 16px;
  border-left: 3px solid #b2622f;
  border-radius: 8px;
  background: rgba(255, 248, 233, 0.82);
}

.tarot-seo-grid p {
  margin: 0 !important;
  font-size: 14px !important;
}

.tarot-seo-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 14px;
}

.tarot-seo-columns ol {
  margin: 0 0 0 20px;
}

.tarot-seo-columns li {
  margin-bottom: 6px;
}

.tarot-faq h3 {
  margin-top: 15px !important;
}

@media screen and (max-width: 980px) {
  .tarot-layout {
    grid-template-columns: 1fr;
    max-width: 820px;
  }

  .tarot-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tarot-seo-grid,
  .tarot-seo-columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 560px) {
  .tarot-page {
    padding: 18px 10px 22px;
  }

  .tarot-hero h1 {
    font-size: 30px !important;
  }

  .tarot-intro {
    font-size: 15px !important;
  }

  .tarot-picker,
  .tarot-board,
  .tarot-board[data-count] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tarot-board[data-count="1"] {
    grid-template-columns: minmax(0, min(76vw, 280px));
  }

  .tarot-stage {
    padding: 14px 10px 16px;
  }

  .tarot-board {
    gap: 12px;
    overflow: visible;
  }

  .tarot-card-shell {
    max-width: min(100%, calc(100vw - 44px));
  }

  .tarot-seo-answer,
  .tarot-seo-columns,
  .tarot-faq {
    padding: 16px 14px;
  }

  .tarot-seo-grid,
  .tarot-seo-columns {
    grid-template-columns: 1fr;
  }
}
