.game-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 30px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--line);
}

.game-sections a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafaf7;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.game-sections a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.game-sections a[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.tarot-shell { padding-bottom: 58px; }
.tarot-header nav { margin-left: auto; }
.tarot-page [hidden] { display: none !important; }

.tarot-intro { margin: 34px 0 22px; }

.tarot-intro h1 {
  font-size: clamp(34px, 4.7vw, 58px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -.065em;
}

.tarot-intro p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 16px;
}

.tarot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tarot-tile {
  display: grid;
  grid-template-columns: minmax(116px, 42%) minmax(0, 1fr) auto;
  align-items: center;
  min-height: 188px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafaf7;
  transition: border-color .18s, background .18s;
}

.tarot-tile:hover {
  border-color: var(--blue);
  background: white;
}

.tarot-tile-art {
  position: relative;
  display: grid;
  align-self: stretch;
  min-height: 178px;
  place-items: center;
  overflow: hidden;
  background: #f2dedb;
}

.tarot-tile[data-theme="money"] .tarot-tile-art { background: #f0e6c8; }
.tarot-tile[data-theme="daily"] .tarot-tile-art { background: #f4e4c7; }
.tarot-tile[data-theme="career"] .tarot-tile-art { background: #dce5f3; }
.tarot-tile[data-theme="study"] .tarot-tile-art { background: #e6def1; }
.tarot-tile[data-theme="people"] .tarot-tile-art { background: #d9e9df; }

.tarot-tile-back,
.tarot-tile-art img {
  width: 86px;
  height: 147px;
  border: 2px solid #fff9e7;
  border-radius: 5px;
  box-shadow: 0 6px 12px #26223630;
}

.tarot-tile-back {
  position: absolute;
  background: #3e4380;
  transform: translate(-21px, 1px) rotate(-17deg);
}

.tarot-tile-art img {
  position: relative;
  object-fit: cover;
  transform: translate(15px, 0) rotate(9deg);
  transition: transform .2s ease;
}

.tarot-tile:hover img { transform: translate(15px, -3px) rotate(7deg); }
.tarot-tile-copy { display: grid; gap: 5px; padding: 16px; }
.tarot-tile-copy strong { font-size: clamp(20px, 3vw, 28px); letter-spacing: -.05em; word-break: keep-all; overflow-wrap: anywhere; }
.tarot-tile-copy > span { color: var(--muted); font-size: 14px; word-break: keep-all; overflow-wrap: anywhere; }
.tarot-tile-arrow { margin-right: 18px; color: var(--blue); font-size: 24px; }

.tarot-sources {
  margin-top: 24px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #545c55;
  font-size: 13px;
}

.tarot-sources summary { cursor: pointer; font-weight: 700; }
.tarot-sources p { margin-top: 10px; }
.tarot-sources a { color: var(--blue); text-decoration: underline; }
.tarot-sources ul { padding-left: 19px; margin: 8px 0 0; }

.tarot-play { max-width: 800px; margin: 0 auto; }
.tarot-play-intro { text-align: center; }

.tarot-stage {
  min-width: 0;
  padding: clamp(16px, 4vw, 36px);
  border: 1px solid #dfd7dd;
  border-radius: 11px;
  background: #f7eef0;
  text-align: center;
}

[data-tarot-theme="money"] .tarot-stage {
  border-color: #dfd7bd;
  background: #f8f1de;
}

[data-tarot-theme="daily"] .tarot-stage { border-color: #e4d4b5; background: #fcf2de; }
[data-tarot-theme="career"] .tarot-stage { border-color: #d3ddeb; background: #edf3fb; }
[data-tarot-theme="study"] .tarot-stage { border-color: #dcd2e8; background: #f4eff9; }
[data-tarot-theme="people"] .tarot-stage { border-color: #cfdfd3; background: #edf6ef; }
.tarot-daily-note { margin-top: 17px; color: #59584f; font-size: 14px; }

.tarot-pick-title { margin: 0 0 16px; font-size: 17px; font-weight: 750; }

.tarot-hand {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2.5vw, 20px);
  max-width: 450px;
  margin: 0 auto;
}

.tarot-choice {
  display: block;
  min-width: 0;
  border-radius: 8px;
  transition: transform .18s ease;
}

.tarot-choice:not(:disabled):hover { transform: translateY(-7px); }

.tarot-back {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 0.6;
  border: 2px solid #e9d7aa;
  border-radius: 8px;
  background: #303874;
  color: #efe2b6;
  box-shadow: 0 6px 0 #242b5c, 0 9px 12px #30274020;
}

.tarot-back::before,
.tarot-back::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.tarot-back::before {
  inset: 7%;
  border: 1px solid #e9d7aa96;
  border-radius: 5px;
}

.tarot-back::after {
  width: 54%;
  aspect-ratio: 1;
  border: 1px solid #e9d7aa96;
  transform: rotate(45deg);
}

.tarot-back-star { font-size: clamp(25px, 5vw, 56px); }
.tarot-status { margin: 15px 0 8px; color: #58594e; font-size: 14px; }

.tarot-result {
  display: grid;
  grid-template-columns: minmax(128px, 180px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 36px);
  align-items: start;
  text-align: left;
  animation: tarot-reveal .24s ease-out both;
}

@keyframes tarot-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tarot-result-figure { justify-self: center; }

.tarot-result-figure img {
  height: auto;
  border: 1px solid #c7bda5;
  border-radius: 5px;
  box-shadow: 0 7px 16px #2c243525;
}

.tarot-result-figure figcaption {
  margin-top: 8px;
  color: #5b5e56;
  text-align: center;
  font-size: 11px;
  text-decoration: underline;
}

.tarot-card-english { color: #575d65; font-size: 13px; }

.tarot-result h2 {
  margin: 3px 0 8px;
  font-size: clamp(30px, 4vw, 43px);
  letter-spacing: -.055em;
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.tarot-card-keyword { color: #3445aa; font-size: 14px; font-weight: 750; }
.tarot-reading {
  margin-top: 15px;
  font-size: 15px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-align: left;
}

.tarot-reading-title {
  margin: 0 0 7px;
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -.025em;
}

.tarot-reading > p + p { margin-top: 9px; }
.tarot-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 17px; }

.tarot-primary {
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 6px;
  background: var(--blue);
  color: white;
  font-weight: 700;
}

.tarot-primary:hover { background: #203fcf; }
.tarot-secondary { color: #253ea2; font-weight: 700; padding: 10px 0; }
.tarot-secondary:hover, .tarot-play-footer a:hover { text-decoration: underline; }
.tarot-play-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; color: #565e58; font-size: 14px; }

@media (max-width: 690px) {
  .tarot-grid { grid-template-columns: 1fr; gap: 11px; }
  .tarot-tile { min-height: 140px; }
  .tarot-tile-art { min-height: 140px; }
  .tarot-tile-back, .tarot-tile-art img { width: 66px; height: 112px; }
  .tarot-intro { margin-top: 23px; }
  .game-sections { margin-bottom: 20px; }
  .game-sections a { padding: 8px 12px; font-size: 13px; }
  .tarot-result { grid-template-columns: 110px minmax(0, 1fr); gap: 15px; }
  .tarot-result-figure { align-self: start; }
}

@media (max-width: 480px) {
  .tarot-header, .tarot-header .header-inner { height: auto; min-height: 68px; }
  .tarot-header .header-inner { flex-wrap: nowrap; }
  .tarot-result { grid-template-columns: 1fr; text-align: center; }
  .tarot-result-figure { width: 120px; }
  .tarot-result-actions { justify-content: center; }
  .tarot-tile-copy { padding: 12px; }
  .tarot-tile-copy > span { font-size: 13px; }
  .tarot-tile-arrow { margin-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .tarot-tile, .tarot-tile-art img, .tarot-choice { transition: none; }
  .tarot-result { animation: none; }
}
