.tarot-page {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #1f1715 0%, #2b211c 310px, #f6efe4 620px, #fbfaf7 100%);
  color: #251f2b;
}

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

.tarot-page-shell {
  position: relative;
  isolation: isolate;
  min-width: 0;
  max-width: 100%;
  padding: 56px 0 52px;
}

body.tarot-page main.tarot-page-shell {
  overflow: hidden;
}

.tarot-page-shell::before,
.tarot-page-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tarot-page-shell::before {
  z-index: -2;
  background-image:
    url("/images/tarot-webp/The%20High%20Priestess.webp"),
    url("/images/tarot-webp/The%20Star.webp"),
    url("/images/tarot-webp/The%20Sun.webp"),
    url("/images/tarot-webp/back%20side%205.webp");
  background-repeat: no-repeat;
  background-size:
    clamp(150px, 17vw, 250px) auto,
    clamp(140px, 15vw, 220px) auto,
    clamp(150px, 16vw, 236px) auto,
    clamp(220px, 30vw, 420px) auto;
  background-position:
    calc(100% - 6vw) 72px,
    4vw 214px,
    calc(100% + 42px) 430px,
    52% -210px;
  filter: blur(5px) saturate(1.14);
  opacity: 0.3;
  transform: scale(1.03);
}

.tarot-page-shell::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(31, 23, 21, 0.72) 0%, rgba(31, 23, 21, 0.18) 320px, rgba(246, 239, 228, 0) 620px);
}

.tarot-page-shell > .container {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}

.tarot-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.tarot-intro {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  padding: 34px 36px;
  margin-bottom: 24px;
  border: 1px solid rgba(244, 201, 123, 0.28);
  border-radius: 8px;
  background: #221915;
  box-shadow: 0 24px 60px rgba(18, 14, 20, 0.26);
}

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

.tarot-intro::before {
  inset: -44px -30px -52px 42%;
  background-image:
    url("/images/tarot-webp/The%20Star.webp"),
    url("/images/tarot-webp/The%20Moon.webp"),
    url("/images/tarot-webp/back%20side%205.webp");
  background-repeat: no-repeat;
  background-size:
    170px auto,
    166px auto,
    132px auto;
  background-position:
    34% 16px,
    79% 80px,
    4% 142px;
  filter: saturate(1.18) contrast(1.04) drop-shadow(0 24px 34px rgba(0, 0, 0, 0.34));
  opacity: 0.72;
}

.tarot-intro::after {
  inset: 0;
  background:
    linear-gradient(90deg, #221915 0%, rgba(34, 25, 21, 0.96) 36%, rgba(34, 25, 21, 0.58) 62%, rgba(34, 25, 21, 0.18) 100%);
}

.tarot-intro > * {
  position: relative;
  z-index: 1;
}

.tarot-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid rgba(246, 201, 120, 0.42);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.08);
  color: #f4c978;
  font-size: 0.82rem;
  font-weight: 900;
}

.tarot-intro h1 {
  margin: 14px 0 10px;
  color: #fffaf1;
  font-size: 2.45rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  word-break: keep-all;
}

.tarot-intro p {
  max-width: 720px;
  margin: 0;
  color: #eadfce;
  font-size: 1.02rem;
  line-height: 1.7;
  word-break: keep-all;
}

.tarot-panel,
.tarot-result > section,
.tarot-safety-message {
  border: 1px solid rgba(213, 197, 171, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(35, 27, 20, 0.12);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.tarot-panel {
  min-width: 0;
  max-width: 100%;
  padding: 20px;
}

.tarot-section-title {
  margin: 0 0 12px;
  color: #111827;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.35;
}

.tarot-section-help {
  margin: -2px 0 14px;
  color: #536174;
  font-size: 0.94rem;
  line-height: 1.65;
  word-break: keep-all;
}

.tarot-question-input {
  width: 100%;
  min-height: 104px;
  padding: 14px 15px;
  border: 1px solid #cfc3b2;
  border-radius: 8px;
  resize: vertical;
  background: rgba(255, 253, 248, 0.92);
  color: #251f2b;
  line-height: 1.6;
}

.tarot-question-input[readonly] {
  background: rgba(248, 244, 236, 0.86);
  color: #7a7167;
  cursor: default;
}

.tarot-question-input.has-value {
  background: rgba(255, 253, 248, 0.96);
  color: #251f2b;
}

.tarot-question-input:focus {
  border-color: #9b5c46;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(155, 92, 70, 0.16);
}

.tarot-category-head {
  margin-bottom: 10px;
}

.tarot-category-head h3 {
  margin: 0;
  color: #111827;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.35;
}

.tarot-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 8px;
}

.tarot-category-button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #d6c8b5;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  color: #3b332b;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body[data-locale="en"] .tarot-category-button {
  min-height: 48px;
  font-size: 0.86rem;
}

.tarot-category-button:hover,
.tarot-category-button:focus {
  border-color: #b9934a;
  background: #fff8eb;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(185, 147, 74, 0.14);
}

.tarot-category-button.is-active {
  border-color: #8f4c3b;
  background: #8f4c3b;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(143, 76, 59, 0.18);
}

.tarot-question-picker {
  margin-top: 15px;
}

.tarot-question-picker[hidden] {
  display: none;
}

.tarot-question-picker-head,
.tarot-question-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tarot-question-picker-head h3,
.tarot-question-editor-head label {
  margin: 0;
  color: #111827;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.35;
}

.tarot-question-picker-head span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 8px;
  background: #f4ead7;
  color: #7b4a1d;
  font-size: 0.78rem;
  font-weight: 900;
}

.tarot-question-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tarot-question-option {
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid #d9cbb7;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  color: #332c25;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
  word-break: keep-all;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tarot-question-option:hover,
.tarot-question-option:focus {
  border-color: #b9934a;
  background: #fff9ec;
  outline: 0;
  box-shadow: 0 10px 22px rgba(70, 52, 16, 0.12);
  transform: translateY(-1px);
}

.tarot-question-option.is-active {
  border-color: #0f766e;
  background: #eefaf6;
  color: #0f5d57;
}

.tarot-question-editor {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(218, 203, 179, 0.86);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.74);
}

.tarot-question-editor-head button {
  border: 0;
  background: transparent;
  color: #8f4c3b;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.tarot-question-editor p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.55;
  word-break: keep-all;
}

.tarot-emphasis {
  color: #8f4c3b;
  font-weight: 900;
}

.tarot-card-draw-area {
  position: relative;
}

.tarot-card-draw-area[hidden] {
  display: none;
}

.tarot-safety-inline {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #ead7b7;
  border-radius: 8px;
  background: #fff8eb;
  color: #7a5318;
  font-size: 0.9rem;
  line-height: 1.55;
}

.tarot-draw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 14px;
}

.tarot-progress-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(185, 147, 74, 0.28);
  background: #fff8eb;
  color: #6f4a1d;
  font-size: 0.9rem;
  font-weight: 900;
}

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

.tarot-card-pick {
  display: block;
  position: relative;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  text-align: center;
  will-change: transform, opacity, filter;
}

.tarot-card-pick-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 825 / 1425;
  border: 1px solid rgba(218, 198, 164, 0.9);
  border-radius: 8px;
  background: #211814;
  box-shadow: 0 10px 18px rgba(35, 27, 20, 0.16);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tarot-card-pick-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.04) 0%, rgba(15, 118, 110, 0.24) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.tarot-card-pick img,
.tarot-result-card-media img,
.tarot-mini-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tarot-card-pick:hover .tarot-card-pick-frame,
.tarot-card-pick:focus .tarot-card-pick-frame {
  border-color: #d9b461;
  box-shadow: 0 14px 26px rgba(70, 52, 16, 0.2);
  transform: translateY(-2px);
}

.tarot-card-pick:focus {
  outline: 0;
}

.tarot-card-pick.is-selected .tarot-card-pick-frame {
  border-color: #0f766e;
  box-shadow:
    0 0 0 3px rgba(15, 118, 110, 0.28),
    0 18px 34px rgba(15, 118, 110, 0.3);
  transform: translateY(-3px);
}

.tarot-card-pick.is-selected .tarot-card-pick-frame::after {
  opacity: 1;
}

.tarot-deck-grid.is-dealing .tarot-card-pick {
  animation: tarot-card-spread 680ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
  animation-delay: var(--deal-delay, 0ms);
}

.tarot-card-draw-area.is-shuffling .tarot-deck-grid,
.tarot-card-draw-area.is-reading .tarot-deck-grid {
  pointer-events: none;
}

.tarot-card-draw-area.is-shuffling .tarot-card-pick {
  animation: tarot-card-shuffle 680ms cubic-bezier(0.22, 0.72, 0.24, 1) both;
  animation-delay: var(--shuffle-delay, 0ms);
}

.tarot-card-draw-area.is-reading .tarot-card-pick:not(.is-selected) {
  opacity: 0.42;
  transform: scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.tarot-card-draw-area.is-reading .tarot-card-pick.is-selected .tarot-card-pick-frame {
  animation: tarot-reading-pulse 1050ms ease-in-out infinite;
  animation-delay: var(--shuffle-delay, 0ms);
}

.tarot-card-draw-area.is-reading .tarot-card-pick.is-selected .tarot-card-pick-frame::after {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 232, 166, 0.24) 0%, rgba(255, 232, 166, 0) 42%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.08) 0%, rgba(15, 118, 110, 0.26) 100%);
}

.tarot-reading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 248, 235, 0.34), rgba(255, 248, 235, 0) 34%),
    rgba(17, 24, 39, 0.18);
  backdrop-filter: blur(1px);
  pointer-events: none;
}

.tarot-reading-backdrop[hidden] {
  display: none;
}

.tarot-reading-veil {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 208px;
  height: 208px;
  padding: 24px;
  border: 1px solid rgba(185, 147, 74, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 242, 198, 0.92), rgba(255, 252, 246, 0.96) 54%, rgba(255, 247, 232, 0.94) 100%);
  color: #463013;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
  box-shadow:
    0 24px 58px rgba(35, 27, 20, 0.26),
    0 0 54px rgba(244, 201, 120, 0.34);
  transform: translate(-50%, -50%);
}

.tarot-reading-veil[hidden] {
  display: none;
}

.tarot-reading-veil::before {
  content: "";
  position: absolute;
  inset: -16px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(244, 201, 120, 0.34), rgba(244, 201, 120, 0));
  animation: tarot-soft-glow 1400ms ease-in-out infinite;
}

.tarot-reading-orbit {
  position: relative;
  width: 54px;
  height: 54px;
  border: 3px solid rgba(185, 147, 74, 0.22);
  border-top-color: #b9934a;
  border-radius: 50%;
  animation: tarot-orbit 840ms linear infinite;
}

.tarot-reading-orbit::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f4c978;
  box-shadow: 0 0 14px rgba(244, 201, 120, 0.88);
}

@keyframes tarot-card-spread {
  0% {
    opacity: 0.72;
    filter: blur(3px) saturate(0.86) brightness(0.9);
    transform: translate3d(var(--spread-x, 0), var(--spread-y, 0), 0) scale(0.58) rotate(var(--card-sway, 0deg));
  }
  18% {
    opacity: 0.96;
  }
  76% {
    opacity: 1;
    filter: blur(0) saturate(1.04) brightness(1.02);
    transform: translate3d(0, 0, 0) scale(1.018) rotate(0deg);
  }
  100% {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

@keyframes tarot-card-shuffle {
  0% {
    opacity: 1;
    filter: saturate(1);
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
  36% {
    opacity: 0.96;
    filter: saturate(1.08) brightness(1.03);
    transform: translate3d(var(--card-drift-half, 0), -8px, 0) scale(0.97) rotate(var(--card-sway, 0deg));
  }
  74% {
    opacity: 0.84;
    filter: saturate(0.88) brightness(0.92);
    transform: translate3d(var(--spread-x, 0), var(--spread-y, 0), 0) scale(0.58) rotate(var(--card-sway-back, 0deg));
  }
  100% {
    opacity: 0.12;
    filter: blur(2px) saturate(0.8) brightness(0.88);
    transform: translate3d(var(--spread-x, 0), var(--spread-y, 0), 0) scale(0.52) rotate(0deg);
  }
}

@keyframes tarot-reading-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(15, 118, 110, 0.28),
      0 18px 34px rgba(15, 118, 110, 0.3);
    transform: translateY(-3px);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(244, 201, 120, 0.28),
      0 0 28px rgba(244, 201, 120, 0.36),
      0 22px 38px rgba(15, 118, 110, 0.24);
    transform: translateY(-6px);
  }
}

@keyframes tarot-soft-glow {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes tarot-orbit {
  to {
    transform: rotate(360deg);
  }
}

.tarot-card-selected-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #0f766e;
  color: #fffdf8;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

.tarot-user-info {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(213, 197, 171, 0.68);
}

.tarot-user-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tarot-user-info-head h3 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
}

.tarot-user-info-head span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f4ead7;
  color: #7b4a1d;
  font-size: 0.76rem;
  font-weight: 900;
}

.tarot-user-info-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(130px, 0.55fr) minmax(180px, 0.75fr);
  gap: 10px;
  align-items: end;
}

.tarot-user-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tarot-user-fieldset legend,
.tarot-user-field > span {
  display: block;
  width: 100%;
  margin: 0 0 7px;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.35;
}

.tarot-radio-chip {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.tarot-radio-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tarot-radio-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #d6c8b5;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  color: #3b332b;
  font-size: 0.9rem;
  font-weight: 900;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tarot-radio-chip input:checked + span {
  border-color: #0f766e;
  background: #eefaf6;
  color: #0f5d57;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.tarot-radio-chip input:focus + span {
  border-color: #b9934a;
  box-shadow: 0 0 0 3px rgba(185, 147, 74, 0.16);
}

.tarot-user-field {
  min-width: 0;
  margin: 0;
}

.tarot-user-field input,
.tarot-user-field select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #d6c8b5;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  color: #251f2b;
  font-size: 0.9rem;
  font-weight: 800;
}

.tarot-user-field input::placeholder {
  color: #9a9186;
}

.tarot-user-field input:focus,
.tarot-user-field select:focus {
  border-color: #9b5c46;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(155, 92, 70, 0.15);
}

.tarot-consent-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid rgba(218, 203, 179, 0.82);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.68);
  color: #475569;
  cursor: pointer;
}

.tarot-consent-check input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: #0f766e;
}

.tarot-consent-check strong,
.tarot-consent-check small {
  display: block;
  word-break: keep-all;
}

.tarot-consent-check strong {
  color: #111827;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.4;
}

.tarot-consent-check small {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.tarot-consent-check a {
  color: #8f4c3b;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tarot-privacy-modal .modal-dialog {
  width: calc(100% - 24px);
  max-width: 920px;
}

.tarot-privacy-modal .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #fffaf4;
  box-shadow: 0 24px 64px rgba(18, 14, 20, 0.32);
}

.tarot-privacy-modal .modal-header {
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid rgba(213, 197, 171, 0.72);
  background: #221915;
  color: #fffaf1;
}

.tarot-privacy-modal .modal-title {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
}

.tarot-privacy-modal .close {
  color: #fffaf1;
  opacity: 0.86;
  text-shadow: none;
}

.tarot-privacy-modal .modal-body {
  padding: 0;
  background: #fffaf4;
}

.tarot-privacy-frame {
  display: block;
  width: 100%;
  height: min(76vh, 760px);
  border: 0;
  background: #fffaf4;
}

.tarot-consent-error {
  margin: 8px 0 0;
  color: #b42318;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.tarot-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tarot-action-row .btn {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 900;
}

.tarot-action-row .btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tarot-mini-spread {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 18px;
}

.tarot-mini-card {
  overflow: hidden;
  aspect-ratio: 825 / 1425;
  border: 1px solid #d9c6a1;
  border-radius: 8px;
  background: #211814;
}

.tarot-result {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  margin-top: 26px;
}

.tarot-result[hidden] {
  display: none;
}

.tarot-result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  padding: 22px;
}

.tarot-result-summary.is-good {
  background: linear-gradient(135deg, #effaf4 0%, rgba(255, 255, 255, 0.92) 64%);
  border-color: #b9e3d2;
}

.tarot-result-summary.is-medium {
  background: linear-gradient(135deg, #fff8eb 0%, rgba(255, 255, 255, 0.92) 64%);
  border-color: #ecd8ac;
}

.tarot-result-summary.is-low {
  background: linear-gradient(135deg, #fff1f1 0%, rgba(255, 255, 255, 0.92) 64%);
  border-color: #efc1c1;
}

.tarot-result-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #556070;
  font-size: 0.9rem;
  font-weight: 900;
}

.tarot-result-summary h2 {
  margin: 0;
  color: #111827;
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.25;
  word-break: keep-all;
}

.tarot-result-summary-copy {
  min-width: 0;
}

.tarot-outcome-card-line,
.tarot-energy-line {
  margin: 8px 0 0;
  color: #1f2937;
  font-weight: 800;
  line-height: 1.55;
  word-break: keep-all;
}

.tarot-outcome-card-line strong,
.tarot-energy-line strong {
  color: #7a5318;
  font-weight: 900;
}

.tarot-energy-line {
  color: #047857;
}

.tarot-question-summary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  color: #263241;
  font-weight: 800;
  line-height: 1.62;
  word-break: keep-all;
}

.tarot-question-summary-label {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(107, 77, 230, 0.1);
  color: #5a3fd0;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.tarot-question-summary-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tarot-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.tarot-score strong {
  color: #111827;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.tarot-score span {
  color: #64748b;
  font-weight: 800;
  line-height: 1;
}

.tarot-safety-message,
.tarot-final-answer,
.tarot-result-cta {
  padding: 18px 20px;
  color: #475569;
  line-height: 1.7;
}

.tarot-safety-message {
  border-color: #ead7b7;
  background: #fff8eb;
  color: #7a5318;
}

.tarot-result > section.tarot-share-panel {
  display: flex;
  justify-content: flex-end;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.tarot-kakao-share-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #fee500;
  color: #181600;
  font: inherit;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(35, 27, 20, 0.14);
  cursor: pointer;
}

.tarot-kakao-share-button:hover,
.tarot-kakao-share-button:focus {
  background: #f6dc00;
}

.tarot-final-answer h2,
.tarot-final-answer h3,
.tarot-result-cta h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 1.18rem;
  font-weight: 900;
}

.tarot-final-answer p,
.tarot-result-cta p {
  margin: 0 0 12px;
}

.tarot-final-answer .tarot-energy-note {
  margin-top: 12px;
  color: #047857;
  font-size: 0.94rem;
  line-height: 1.7;
}

.tarot-result-grid {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tarot-result-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  grid-template-areas:
    "media head"
    "media body";
  gap: 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(213, 197, 171, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(35, 27, 20, 0.1);
}

.tarot-result-card.is-outcome {
  border-color: #b9934a;
  background: linear-gradient(135deg, #fffaf0 0%, rgba(255, 255, 255, 0.94) 58%);
}

.tarot-result-card-media {
  grid-area: media;
  overflow: hidden;
  aspect-ratio: 825 / 1425;
  border-radius: 8px;
  background: #211814;
}

.tarot-result-card-head {
  grid-area: head;
  min-width: 0;
}

.tarot-result-card-body {
  grid-area: body;
  min-width: 0;
}

.tarot-result-card-head h3 {
  margin: 4px 0 8px;
  color: #111827;
  font-size: 1.2rem;
  font-weight: 900;
}

.tarot-result-position {
  display: inline-flex;
  color: #0d7659;
  font-size: 0.88rem;
  font-weight: 900;
}

.tarot-result-role {
  color: #64748b;
  font-size: 0.94rem;
}

.tarot-result-card-body p {
  margin: 0 0 9px;
  color: #475569;
  line-height: 1.7;
}

.tarot-mini-grade {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4ead7;
  color: #694315;
  font-size: 0.82rem;
  font-weight: 900;
}

.tarot-result > section.tarot-result-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  border-color: rgba(244, 201, 123, 0.36);
  background: #221915;
  color: #f4ead7;
}

.tarot-result > section.tarot-result-cta::before {
  content: "";
  position: absolute;
  inset: -62px -24px -86px auto;
  width: 240px;
  background: url("/images/tarot-webp/The%20Sun.webp") center / contain no-repeat;
  filter: blur(1px) saturate(1.08);
  opacity: 0.13;
  pointer-events: none;
}

.tarot-result > section.tarot-result-cta > * {
  position: relative;
  z-index: 1;
}

.tarot-result > section.tarot-result-cta h2 {
  color: #fffaf1;
}

.tarot-result > section.tarot-result-cta p {
  color: #eadfce;
}

.tarot-result > section.tarot-result-cta .btn {
  border-color: #fffaf1;
  background: #fffaf1;
  color: #221915;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.tarot-result > section.tarot-result-cta .btn:hover,
.tarot-result > section.tarot-result-cta .btn:focus {
  border-color: #f4c978;
  background: #f4c978;
  color: #221915;
}

.tarot-result-cta .btn {
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 900;
}

@media (max-width: 991.98px) {
  .tarot-page-shell {
    padding-top: 54px;
  }

  .tarot-page-shell::before {
    background-size:
      170px auto,
      150px auto,
      160px auto,
      300px auto;
    background-position:
      calc(100% + 38px) 82px,
      -48px 238px,
      calc(100% + 64px) 520px,
      52% -180px;
    opacity: 0.22;
  }

  .tarot-intro {
    min-height: 220px;
  }

  .tarot-intro::before {
    left: 48%;
    opacity: 0.62;
  }

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

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

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

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

  .tarot-user-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tarot-user-fieldset {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .tarot-page-shell {
    padding: 46px 0 38px;
  }

  body.tarot-page .ko-site-navbar .navbar-collapse {
    max-height: calc(100vh - 76px);
    max-height: calc(100dvh - 76px);
    margin-top: 8px;
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .tarot-page-shell::before {
    display: none;
  }

  .tarot-page-shell::after {
    background:
      linear-gradient(180deg, rgba(31, 23, 21, 0.68) 0%, rgba(31, 23, 21, 0.12) 280px, rgba(246, 239, 228, 0) 560px);
  }

  .tarot-intro {
    min-height: 0;
    padding: 26px 22px;
  }

  .tarot-intro::before {
    inset: auto -58px -62px 26%;
    height: 280px;
    background-size:
      136px auto,
      126px auto,
      104px auto;
    background-position:
      43% 18px,
      88% 68px,
      13% 118px;
    opacity: 0.5;
  }

  .tarot-intro::after {
    background:
      linear-gradient(90deg, #221915 0%, rgba(34, 25, 21, 0.95) 52%, rgba(34, 25, 21, 0.58) 82%, rgba(34, 25, 21, 0.28) 100%);
  }

  .tarot-intro h1 {
    font-size: 1.92rem;
  }

  .tarot-panel {
    padding: 15px;
  }

  .tarot-category-grid {
    gap: 7px;
  }

  .tarot-category-button {
    min-height: 40px;
    font-size: 0.9rem;
  }

  .tarot-question-suggestion-grid {
    grid-template-columns: 1fr;
  }

  .tarot-question-picker-head,
  .tarot-question-editor-head {
    align-items: flex-start;
  }

  .tarot-question-option {
    min-height: 58px;
    font-size: 0.86rem;
  }

  .tarot-deck-grid {
    gap: 6px;
  }

  .tarot-card-selected-badge {
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    font-size: 0.68rem;
  }

  .tarot-user-info-head {
    align-items: flex-start;
  }

  .tarot-user-info-grid {
    grid-template-columns: 1fr;
  }

  .tarot-radio-chip span {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 0.86rem;
  }

  .tarot-result-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 17px;
  }

  .tarot-outcome-card-line,
  .tarot-energy-line,
  .tarot-question-summary-text,
  .tarot-final-answer p,
  .tarot-result-cta p {
    overflow-wrap: anywhere;
  }

  .tarot-question-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .tarot-question-summary-label {
    justify-self: start;
  }

  .tarot-score {
    justify-self: center;
    width: 92px;
    height: 92px;
  }

  .tarot-result-summary h2 {
    font-size: 1.45rem;
  }

  .tarot-result-card {
    grid-template-columns: minmax(76px, 94px) minmax(0, 1fr);
    grid-template-areas:
      "media head"
      "body body";
    gap: 12px;
    padding: 12px;
  }

  .tarot-result-card-media {
    width: 100%;
    max-width: 94px;
  }

  .tarot-result-card-head h3 {
    font-size: 1rem;
  }

  .tarot-result-role {
    font-size: 0.86rem;
  }

  .tarot-result-position,
  .tarot-mini-grade {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tarot-result-card-body p {
    font-size: 0.9rem;
    line-height: 1.62;
  }

  .tarot-result > section.tarot-result-cta {
    display: grid;
  }

  .tarot-result > section.tarot-share-panel {
    justify-content: stretch;
  }

  .tarot-kakao-share-button {
    width: 100%;
  }

  .tarot-result-cta .btn,
  .tarot-action-row .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
    line-height: 1.35;
  }

  .tarot-privacy-modal .modal-dialog {
    width: calc(100% - 16px);
    margin: 8px auto;
  }

  .tarot-privacy-frame {
    height: calc(100vh - 96px);
  }

  .tarot-reading-veil {
    width: 166px;
    height: 166px;
    padding: 18px;
    font-size: 0.98rem;
  }

  .tarot-reading-orbit {
    width: 44px;
    height: 44px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .tarot-deck-grid.is-dealing .tarot-card-pick,
  .tarot-card-draw-area.is-shuffling .tarot-card-pick,
  .tarot-card-draw-area.is-reading .tarot-card-pick.is-selected .tarot-card-pick-frame,
  .tarot-reading-veil::before,
  .tarot-reading-orbit {
    animation: none;
  }

  .tarot-card-pick,
  .tarot-card-pick-frame,
  .tarot-card-draw-area.is-reading .tarot-card-pick:not(.is-selected) {
    transition: none;
  }
}
