/* =========================================================
   Tarot Wheel · Arcana Wheel
   A hand-built celestial tarot experience
   ========================================================= */

:root {
  --bg: #07080f;
  --bg-deep: #05060b;
  --bg-soft: #0b0d17;
  --panel: #0f101a;
  --panel-soft: #12131f;
  --ink: #f0e9db;
  --ink-soft: #d9d2c5;
  --muted: #aaa49a;
  --muted-dim: #827c72;
  --gold: #d3b171;
  --gold-bright: #f0d8a2;
  --gold-deep: #8d6c39;
  --gold-line: rgba(211, 177, 113, 0.2);
  --gold-glow: rgba(211, 177, 113, 0.14);
  --violet: #7f70c8;
  --rose: #c68a98;
  --teal: #6eaaa5;
  --sage: #9aa96d;
  --serif: "Cormorant Garamond", "Times New Roman", "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: "Avenir Next", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1320px;
  --wheel-size: clamp(470px, 44vw, 680px);
  --header-h: 84px;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(211, 177, 113, 0.35) #080910;
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(63, 51, 95, 0.25), transparent 65%),
    radial-gradient(ellipse 50% 40% at 90% 28%, rgba(70, 46, 67, 0.11), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open,
body.drawer-open {
  overflow: hidden;
}

::selection {
  background: rgba(211, 177, 113, 0.28);
  color: var(--gold-bright);
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #080910;
}
::-webkit-scrollbar-thumb {
  background: rgba(211, 177, 113, 0.25);
  border-radius: 20px;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

h1, h2, h3, h4, p, blockquote, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 500;
  padding: 12px 20px;
  background: var(--gold);
  color: #0a0b12;
  font-size: 13px;
  transition: top 0.25s;
}
.skip-link:focus {
  top: 16px;
}

.container {
  width: min(calc(100% - 64px), var(--container));
  margin-inline: auto;
}

.anchor-target {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

/* =========================================================
   Atmosphere
   ========================================================= */

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.page-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(3, 4, 8, 0.55) 115%);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

/* =========================================================
   Type & shared elements
   ========================================================= */

.serif {
  font-family: var(--serif);
}

.eyebrow,
.section-kicker,
.panel-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow__line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.eyebrow__no {
  margin-left: auto;
  color: var(--muted-dim);
  letter-spacing: 0.16em;
}

.section-kicker span {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0;
}

.panel-kicker {
  color: var(--muted-dim);
  font-size: 8.5px;
  letter-spacing: 0.24em;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 52px;
  padding: 0 25px;
  border: 1px solid transparent;
  border-radius: 1px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.11em;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background 0.35s, color 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  transition: transform 0.35s var(--ease);
}
.btn:hover svg {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(1px);
}

.btn--gold {
  background: linear-gradient(135deg, #e7c987 0%, #c7a05e 55%, #a98245 100%);
  color: #0a0a0f;
  box-shadow: 0 10px 35px rgba(180, 139, 73, 0.14);
}
.btn--gold::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(10, 10, 15, 0.2);
  pointer-events: none;
}
.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 45px rgba(190, 148, 80, 0.24);
  background: linear-gradient(135deg, #f1d99e 0%, #d5ad68 55%, #b58c4c 100%);
}

.btn--ghost {
  border-color: rgba(211, 177, 113, 0.24);
  color: var(--ink-soft);
  background: rgba(211, 177, 113, 0.025);
}
.btn--ghost:hover {
  border-color: rgba(211, 177, 113, 0.5);
  background: rgba(211, 177, 113, 0.07);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

.btn--line {
  min-height: 44px;
  padding: 0 19px;
  border-color: rgba(211, 177, 113, 0.3);
  color: var(--gold-bright);
  font-size: 11px;
}
.btn--line:hover {
  background: rgba(211, 177, 113, 0.08);
  border-color: rgba(211, 177, 113, 0.6);
}

.text-btn {
  position: relative;
  padding: 3px 0;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.text-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.35);
  transform-origin: left;
  opacity: 0.5;
  transition: transform 0.4s var(--ease), opacity 0.4s;
}
.text-btn:hover::after {
  transform: scaleX(1);
  opacity: 1;
}
.text-btn--muted {
  color: var(--muted);
  font-size: 10px;
}
.text-btn.is-armed {
  color: #d3a1ab;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.3s;
}
.round-btn svg {
  width: 18px;
  height: 18px;
}
.round-btn:hover {
  border-color: rgba(211, 177, 113, 0.55);
  color: var(--gold-bright);
  background: rgba(211, 177, 113, 0.06);
  transform: rotate(90deg);
}
.round-btn:focus-visible,
.icon-btn:focus-visible,
.btn:focus-visible,
.filter-chip:focus-visible,
.hub-btn:focus-visible,
.text-btn:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}
.modal__close:focus-visible,
#historyClose:focus-visible {
  outline: 1px solid rgba(240, 216, 162, 0.55);
  outline-offset: 2px;
}

/* Reveal on scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal--delay-1 { transition-delay: 0.08s !important; }
.reveal--delay-2 { transition-delay: 0.16s !important; }
.reveal--delay-3 { transition-delay: 0.24s !important; }
.reveal--delay-4 { transition-delay: 0.32s !important; }

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  transition: background 0.45s, border-color 0.45s, backdrop-filter 0.45s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(7, 8, 15, 0.76);
  border-bottom-color: rgba(211, 177, 113, 0.1);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.site-header.menu-open {
  background: rgba(7, 8, 15, 0.96);
  border-bottom-color: rgba(211, 177, 113, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  width: min(calc(100% - 64px), 1440px);
  height: var(--header-h);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
}
.brand__mark {
  width: 36px;
  height: 36px;
  color: var(--gold);
  flex: 0 0 auto;
  transition: transform 0.9s var(--ease);
}
.brand:hover .brand__mark {
  transform: rotate(90deg);
}
.brand__mark svg {
  width: 100%;
  height: 100%;
}
.brand__type {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.brand__type strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.25;
  color: var(--ink);
}
.brand__type small {
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.27em;
  color: var(--gold);
  opacity: 0.75;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
  margin-right: 6px;
}
.desktop-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  transition: color 0.3s;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%) scale(0);
  transition: transform 0.35s var(--ease);
}
.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--gold-bright);
}
.desktop-nav a.is-active::after {
  transform: translateX(-50%) scale(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.icon-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold-line);
  background: rgba(211, 177, 113, 0.04);
}
.icon-sound-off,
#soundToggle[aria-pressed="false"] .icon-sound-on {
  display: none;
}
#soundToggle[aria-pressed="false"] .icon-sound-off {
  display: block;
}
.history-count {
  position: absolute;
  top: 2px;
  right: 0;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--gold);
  color: #0a0b12;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
}
.menu-btn span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink-soft);
  transition: transform 0.35s var(--ease), width 0.35s;
}
.menu-btn span:last-child {
  width: 65%;
  margin-left: auto;
}
.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] span:last-child {
  width: 100%;
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(211, 177, 113, 0.12);
  background: rgba(8, 9, 16, 0.97);
  backdrop-filter: blur(22px);
  padding: 16px 32px 28px;
}
.mobile-menu[hidden] {
  display: none;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
}
.mobile-menu a {
  display: flex;
  align-items: baseline;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(211, 177, 113, 0.09);
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.mobile-menu a span {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.15em;
}
.mobile-menu > p {
  margin-top: 22px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.3em;
}

.mobile-break {
  display: none;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 46px) 0 82px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  right: -180px;
  top: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 93, 168, 0.11), transparent 66%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: -200px;
  bottom: -320px;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 111, 80, 0.06), transparent 65%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 3vw, 54px);
}

.hero__copy {
  position: relative;
  z-index: 3;
  max-width: 570px;
}
.hero__title {
  margin-top: 27px;
  font-family: var(--serif);
  font-size: clamp(48px, 5.2vw, 79px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.015em;
  color: var(--ink);
}
.hero__title-accent {
  position: relative;
  display: inline-block;
  background: linear-gradient(100deg, #f3dfb3 5%, #cda967 45%, #eed7a3 74%, #b18b4e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__title-accent::after {
  content: "鉁?;
  position: absolute;
  top: -0.08em;
  right: -0.78em;
  font-family: var(--sans);
  font-size: 0.16em;
  color: var(--gold);
  opacity: 0.8;
}
.hero__title-dot {
  color: var(--gold);
}
.hero__lead {
  max-width: 455px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 14px;
  line-height: 2.05;
  letter-spacing: 0.02em;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero__meta {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 43px;
  padding-top: 22px;
  border-top: 1px solid rgba(211, 177, 113, 0.14);
  max-width: 440px;
}
.hero__meta li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 24px;
  border-left: 1px solid rgba(211, 177, 113, 0.12);
}
.hero__meta li:first-child {
  padding-left: 0;
  border-left: 0;
}
.hero__meta li:last-child {
  padding-right: 0;
}
.hero__meta strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--gold-bright);
}
.hero__meta span {
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 27px;
  display: flex;
  align-items: center;
  gap: 13px;
  transform: translateX(-50%);
  color: var(--muted-dim);
  font-size: 7.5px;
  letter-spacing: 0.28em;
}
.hero__scroll i {
  position: relative;
  display: block;
  width: 34px;
  height: 1px;
  overflow: hidden;
  background: rgba(211, 177, 113, 0.2);
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  animation: scrollLine 2.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

.hero__watermark {
  position: absolute;
  left: 50%;
  bottom: -2.6vw;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(120px, 20vw, 310px);
  line-height: 0.8;
  letter-spacing: 0.16em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(211, 177, 113, 0.055);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}

.hero__orbital {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.orbit {
  position: absolute;
  border: 1px solid rgba(211, 177, 113, 0.055);
  border-radius: 50%;
}
.orbit--1 {
  width: 86vw;
  height: 86vw;
  max-width: 1200px;
  max-height: 1200px;
  left: 52%;
  top: 48%;
  transform: translate(-50%, -50%);
}
.orbit--2 {
  width: 63vw;
  height: 63vw;
  max-width: 890px;
  max-height: 890px;
  left: 52%;
  top: 48%;
  transform: translate(-50%, -50%);
  border-style: dashed;
  opacity: 0.7;
}
.orbit--3 {
  width: 102vw;
  height: 102vw;
  max-width: 1440px;
  max-height: 1440px;
  left: 52%;
  top: 48%;
  transform: translate(-50%, -50%);
  opacity: 0.45;
}
.orbit-star {
  position: absolute;
  color: var(--gold);
  opacity: 0.35;
  font-size: 11px;
}
.orbit-star--1 { top: 17%; right: 9%; animation: starPulse 5s ease-in-out infinite; }
.orbit-star--2 { bottom: 24%; left: 4%; font-size: 8px; animation: starPulse 7s ease-in-out 1s infinite; }
.orbit-star--3 { top: 32%; left: 1%; font-size: 6px; animation: starPulse 6s ease-in-out 2s infinite; }
@keyframes starPulse {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 0.7; transform: scale(1.3); }
}

.hero__visual {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

/* =========================================================
   Wheel
   ========================================================= */

.wheel-stage {
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  margin: 12px auto 28px;
  flex: 0 0 auto;
}

.wheel-aura {
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(137, 111, 196, 0.12), transparent 58%),
    radial-gradient(circle at 50% 50%, rgba(211, 177, 113, 0.07), transparent 70%);
  filter: blur(22px);
  animation: auraBreathe 8s ease-in-out infinite;
}
@keyframes auraBreathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}

.zodiac-ring {
  position: absolute;
  inset: -7.5%;
  border-radius: 50%;
  pointer-events: none;
  animation: zodiacSpin 140s linear infinite;
}
.zodiac-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(211, 177, 113, 0.12);
  border-radius: 50%;
}
.zodiac-ring::after {
  content: "";
  position: absolute;
  inset: 4.2%;
  border: 1px dashed rgba(211, 177, 113, 0.15);
  border-radius: 50%;
}
.zodiac-ring span {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(211, 177, 113, 0.55);
  font-family: var(--serif);
  font-size: 15px;
  font-variant-emoji: text;
  transform-origin: center center;
}
@keyframes zodiacSpin {
  to { transform: rotate(360deg); }
}

.wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: rotate(0deg);
  transition: transform 5.2s cubic-bezier(0.11, 0.72, 0.08, 1);
  will-change: transform;
}
.wheel-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(211, 177, 113, 0.32);
  box-shadow:
    inset 0 0 0 7px rgba(211, 177, 113, 0.028),
    inset 0 0 0 8px rgba(211, 177, 113, 0.12),
    inset 0 0 80px rgba(3, 4, 8, 0.75),
    0 0 50px rgba(211, 177, 113, 0.05);
}
.wheel-rim::before {
  content: "";
  position: absolute;
  inset: 3.2%;
  border-radius: 50%;
  border: 1px dashed rgba(211, 177, 113, 0.2);
}
.wheel-ticks {
  position: absolute;
  inset: 1.1%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(211, 177, 113, 0.45) 0deg 0.28deg,
    transparent 0.28deg 4.615deg
  );
  -webkit-mask: radial-gradient(circle, transparent 0 47.8%, #000 48% 50%, transparent 50.2%);
  mask: radial-gradient(circle, transparent 0 47.8%, #000 48% 50%, transparent 50.2%);
  opacity: 0.65;
}
.wheel-cards {
  position: absolute;
  inset: 0;
}

.wheel-card {
  --angle: 0deg;
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--wheel-size) * 0.114);
  height: calc(var(--wheel-size) * 0.184);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--wheel-size) * -0.378));
  perspective: 700px;
  z-index: 2;
  transition: transform 0.5s var(--ease);
}
.wheel-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--ease);
}
.wheel-stage.is-face-up .wheel-card__inner {
  transform: rotateY(180deg);
}
.wheel-stage.is-face-up .wheel-card.is-picked .wheel-card__inner {
  transform: rotateY(180deg);
}
.wheel-card.is-revealed .wheel-card__inner {
  transform: rotateY(180deg);
}
.wheel-card__side {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  border-radius: 2px;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.45));
}
.wheel-card__side--front {
  transform: rotateY(180deg);
}
.wheel-card .tarot-face {
  filter: sepia(0.18) brightness(0.86) contrast(1.06);
}
.wheel-card.is-picked .tarot-face {
  filter: brightness(1.02) contrast(1.02);
}
.wheel-card.is-picked {
  z-index: 4;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--wheel-size) * -0.378)) scale(1.14);
  cursor: pointer;
}
.wheel-card.is-picked .wheel-card__side {
  box-shadow: 0 0 0 1px var(--gold-bright), 0 0 22px rgba(240, 216, 162, 0.4);
}

.card-back {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid rgba(211, 177, 113, 0.63);
  background:
    radial-gradient(circle at 50% 42%, rgba(211, 177, 113, 0.14), transparent 48%),
    repeating-linear-gradient(45deg, transparent 0 5px, rgba(211, 177, 113, 0.045) 5px 5.5px),
    repeating-linear-gradient(-45deg, transparent 0 5px, rgba(211, 177, 113, 0.035) 5px 5.5px),
    linear-gradient(145deg, #1a1730, #0a0b15 60%, #12101e);
  box-shadow: inset 0 0 0 3px #090a12, inset 0 0 0 4px rgba(211, 177, 113, 0.28);
}
.card-back::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(211, 177, 113, 0.28);
  border-radius: 50%;
}
.card-back::after {
  content: "";
  position: absolute;
  width: 46%;
  aspect-ratio: 1;
  border: 1px solid rgba(211, 177, 113, 0.42);
  transform: rotate(45deg);
  background:
    radial-gradient(circle at center, rgba(211, 177, 113, 0.18), transparent 62%);
}
.card-back__star {
  position: relative;
  z-index: 2;
  color: var(--gold-bright);
  font-family: var(--serif);
  line-height: 1;
  text-shadow: 0 0 14px rgba(240, 216, 162, 0.55);
}
.card-back__mini .card-back__star {
  font-size: calc(var(--wheel-size) * 0.036);
}
.card-back__corner {
  position: absolute;
  z-index: 2;
  color: var(--gold);
  font-size: 6px;
  letter-spacing: 0.1em;
  opacity: 0.65;
}
.card-back__corner--tl { top: 8%; left: 10%; }
.card-back__corner--br { bottom: 8%; right: 10%; transform: rotate(180deg); }

.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 33%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.hub-btn {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #191a2a 0%, #0c0d17 48%, #070810 78%);
  border: 1px solid rgba(211, 177, 113, 0.42);
  box-shadow:
    inset 0 0 0 7px rgba(7, 8, 15, 0.9),
    inset 0 0 0 8px rgba(211, 177, 113, 0.17),
    inset 0 0 42px rgba(211, 177, 113, 0.07),
    0 0 40px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.45s, border-color 0.45s, transform 0.45s var(--ease);
  outline: none;
}
.hub-btn:hover,
.hub-btn:focus-visible {
  border-color: rgba(240, 216, 162, 0.8);
  box-shadow:
    inset 0 0 0 7px rgba(7, 8, 15, 0.9),
    inset 0 0 0 8px rgba(211, 177, 113, 0.28),
    inset 0 0 60px rgba(211, 177, 113, 0.13),
    0 0 55px rgba(211, 177, 113, 0.14);
}
.hub-btn:disabled {
  cursor: wait;
}
.hub-btn__ring {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  border: 1px dashed rgba(211, 177, 113, 0.23);
  animation: hubSpin 38s linear infinite;
}
.hub-btn__ring::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  transform: translateX(-50%);
}
@keyframes hubSpin {
  to { transform: rotate(360deg); }
}
.hub-btn__inner {
  position: absolute;
  inset: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(211, 177, 113, 0.12);
}
.hub-btn__moon {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: clamp(24px, 3.1vw, 42px);
  line-height: 1;
  text-shadow: 0 0 22px rgba(240, 216, 162, 0.4);
  transition: transform 0.8s var(--ease);
}
.hub-btn:hover .hub-btn__moon {
  transform: rotate(-16deg) scale(1.06);
}
.hub-btn__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 10px;
}
.hub-btn__label strong {
  font-family: var(--serif);
  font-size: clamp(15px, 1.65vw, 22px);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--ink);
  line-height: 1.3;
}
.hub-btn__label small {
  color: var(--gold);
  font-size: 6.5px;
  letter-spacing: 0.24em;
  opacity: 0.7;
}
.hub-btn__hint {
  margin-top: 8px;
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.wheel-pointer {
  position: absolute;
  left: 50%;
  top: -2.4%;
  z-index: 9;
  width: 26px;
  height: calc(var(--wheel-size) * 0.115);
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(240, 216, 162, 0.35));
}
.wheel-pointer__gem {
  position: absolute;
  left: 50%;
  top: 0;
  width: 13px;
  height: 13px;
  background: linear-gradient(135deg, #f5e3b9, #b88f4f);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 0 3px rgba(7, 8, 15, 0.8), 0 0 18px rgba(240, 216, 162, 0.55);
  animation: gemGlow 3.4s ease-in-out infinite;
}
.wheel-pointer__stem {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 1px;
  height: calc(100% - 12px);
  background: linear-gradient(180deg, rgba(240, 216, 162, 0.9), rgba(211, 177, 113, 0.1));
  transform: translateX(-50%);
}
.wheel-pointer__stem::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(240, 216, 162, 0.7);
}
@keyframes gemGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(7, 8, 15, 0.8), 0 0 12px rgba(240, 216, 162, 0.35); }
  50% { box-shadow: 0 0 0 3px rgba(7, 8, 15, 0.8), 0 0 24px rgba(240, 216, 162, 0.7); }
}

.wheel-stage.is-spinning .wheel-pointer__gem {
  animation: gemTick 0.18s ease-in-out infinite alternate;
}
@keyframes gemTick {
  from { transform: translateX(-50%) rotate(45deg) translateY(0); }
  to { transform: translateX(-50%) rotate(45deg) translateY(3px); }
}
.wheel-stage.is-settling .hub-btn__label strong {
  color: var(--gold-bright);
}

.wheel-hint {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  color: var(--muted-dim);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  white-space: nowrap;
  transition: color 0.4s, opacity 0.4s;
}
.wheel-stage.is-spinning .wheel-hint {
  color: var(--gold);
  opacity: 0.9;
}

/* =========================================================
   Marquee
   ========================================================= */

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 15px 0;
  border-top: 1px solid rgba(211, 177, 113, 0.11);
  border-bottom: 1px solid rgba(211, 177, 113, 0.11);
  background: rgba(9, 10, 17, 0.5);
}
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.marquee::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg), transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 27px;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee__track span {
  color: rgba(211, 177, 113, 0.58);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.22em;
  white-space: nowrap;
}
.marquee__track i {
  color: rgba(211, 177, 113, 0.3);
  font-size: 8px;
  font-style: normal;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* =========================================================
   Sections
   ========================================================= */

.section {
  position: relative;
  padding: clamp(88px, 10vw, 138px) 0;
}
.section-head {
  margin-bottom: 54px;
}
.section-head__row {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 0.58fr);
  align-items: end;
  gap: 40px;
  margin-top: 22px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(37px, 4.2vw, 58px);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: 0.015em;
}
.section-head h2 em {
  font-style: normal;
  background: linear-gradient(100deg, #f1dcae, #c7a15e 55%, #e7cb93);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-head__row > p {
  max-width: 430px;
  padding-bottom: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.95;
  letter-spacing: 0.02em;
}

/* =========================================================
   Oracle
   ========================================================= */

.oracle {
  border-bottom: 1px solid rgba(211, 177, 113, 0.09);
}
.oracle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 55px;
  background: linear-gradient(transparent, rgba(211, 177, 113, 0.35));
}

.oracle-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 22px;
}

.daily-panel,
.spread-panel {
  position: relative;
  padding: 33px;
  border: 1px solid rgba(211, 177, 113, 0.14);
  background:
    radial-gradient(ellipse at 10% 0%, rgba(105, 84, 148, 0.09), transparent 56%),
    linear-gradient(145deg, rgba(18, 19, 32, 0.88), rgba(10, 11, 19, 0.9));
  overflow: hidden;
}
.daily-panel {
  display: flex;
  flex-direction: column;
}
.daily-panel::before,
.spread-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(211, 177, 113, 0.055);
  pointer-events: none;
}
.daily-panel::after,
.spread-panel::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -130px;
  top: -130px;
  border: 1px solid rgba(211, 177, 113, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.panel-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 21px;
  border-bottom: 1px solid rgba(211, 177, 113, 0.11);
}
.panel-head h3 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.06em;
}
.spread-badge {
  padding: 5px 10px;
  border: 1px solid rgba(211, 177, 113, 0.17);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.daily-body {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  flex: 1;
  padding: 26px 0;
}
.daily-reflection {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding-top: 18px;
  border-top: 1px solid rgba(211, 177, 113, 0.11);
}
.daily-reflection > span {
  color: var(--gold);
  font-size: 9px;
  line-height: 1.9;
}
.daily-reflection p {
  color: var(--muted-dim);
  font-size: 9px;
  line-height: 1.85;
  letter-spacing: 0.02em;
}
.daily-reflection strong {
  display: inline-block;
  margin-right: 5px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.08em;
}
.daily-card-shell {
  position: relative;
  aspect-ratio: 2 / 3;
  perspective: 1100px;
  cursor: pointer;
}
.daily-card-shell:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}
.daily-card {
  width: 100%;
  height: 100%;
}
.daily-card-shell .flip-card {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}
.daily-card__glow {
  position: absolute;
  inset: 6% -14%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(211, 177, 113, 0.16), transparent 68%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity 0.9s;
}
.daily-card-shell.is-revealed .daily-card__glow {
  opacity: 1;
}
.daily-content {
  min-width: 0;
}
.daily-date {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.daily-moon {
  margin-top: 6px;
  color: var(--muted-dim);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}
.daily-content h4 {
  margin-top: 19px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.daily-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.9;
}
.daily-content .keyword-row {
  margin-top: 13px;
}
.daily-content .btn {
  margin-top: 17px;
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.keyword-chip {
  padding: 4px 9px;
  border: 1px solid rgba(211, 177, 113, 0.18);
  color: var(--gold);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.spread-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 27px;
  perspective: 1200px;
}
.spread-slot {
  min-width: 0;
}
.spread-slot__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}
.spread-slot__label i {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.04em;
  opacity: 0.8;
}
.spread-card {
  position: relative;
  aspect-ratio: 2 / 3;
  perspective: 1000px;
}
.spread-card .flip-card {
  width: 100%;
  height: 100%;
}
.spread-card.is-shuffling {
  animation: shuffleCard 0.6s var(--ease) infinite alternate;
}
.spread-card.is-shuffling:nth-child(2) {
  animation-delay: 0.08s;
}
@keyframes shuffleCard {
  from { transform: translateY(0) rotate(-1.5deg); }
  to { transform: translateY(-5px) rotate(1.5deg); }
}
.spread-slot__caption {
  margin-top: 11px;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.4s;
}
.spread-slot__caption.is-revealed {
  color: var(--gold-bright);
}
.spread-slot__keywords {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.spread-summary {
  min-height: 40px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(211, 177, 113, 0.1);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}
.spread-summary strong {
  color: var(--gold);
  font-weight: 500;
}
.spread-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.spread-actions .btn {
  min-height: 46px;
  font-size: 10.5px;
}

/* =========================================================
   Tarot card faces
   ========================================================= */

.flip-card {
  width: 100%;
  height: 100%;
  perspective: 1100px;
}
.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1s var(--ease);
}
.flip-card.is-flipped .flip-card__inner {
  transform: rotateY(180deg);
}
.flip-card__side {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-card__side--front {
  transform: rotateY(180deg);
}

.tarot-face {
  --art-paper: #ebe0c6;
  --art-paper-2: #d9c7a2;
  --art-ink: #34291f;
  --art-gold: #99702f;
  --art-accent: #966c2d;
  --art-accent-soft: #e4cfa4;
  --art-red: #8f3f30;
  --art-blue: #3f6877;
  --art-green: #58673b;
  --art-sky: #c9a25b;
  --art-robe: #b18a4c;
  --accent: #966c2d;
  --accent-rgb: 150, 108, 45;
  --paper: var(--art-paper);
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2px;
  border: 3px solid #211a1c;
  background:
    radial-gradient(ellipse at 22% 12%, rgba(255, 252, 238, 0.75), transparent 40%),
    radial-gradient(ellipse at 75% 78%, rgba(126, 92, 48, 0.08), transparent 55%),
    repeating-linear-gradient(92deg, rgba(91, 68, 35, 0.022) 0 1px, transparent 1px 3px),
    linear-gradient(150deg, #f2e9d4 0%, var(--art-paper) 45%, #e7d8b8 100%);
  box-shadow:
    inset 0 0 0 1px rgba(120, 88, 43, 0.55),
    inset 0 0 0 5px rgba(248, 241, 222, 0.5),
    inset 0 0 0 6px rgba(131, 98, 49, 0.38),
    inset 0 0 30px rgba(96, 67, 29, 0.1),
    0 9px 22px rgba(0, 0, 0, 0.35);
  isolation: isolate;
  color: var(--art-ink);
}
.tarot-face::before {
  content: "";
  position: absolute;
  inset: 4.1%;
  z-index: 4;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  pointer-events: none;
}
.tarot-face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(78, 55, 25, 0.5), transparent),
    radial-gradient(1px 1px at 72% 12%, rgba(78, 55, 25, 0.35), transparent),
    radial-gradient(1px 1px at 87% 38%, rgba(78, 55, 25, 0.28), transparent),
    radial-gradient(1px 1px at 20% 73%, rgba(78, 55, 25, 0.3), transparent),
    radial-gradient(1px 1px at 66% 83%, rgba(78, 55, 25, 0.3), transparent),
    radial-gradient(1px 1px at 43% 47%, rgba(78, 55, 25, 0.2), transparent);
  pointer-events: none;
}
.tarot-face--major {
  --art-paper: #ecdfc0;
  --art-paper-2: #dbc69b;
  --accent: #966c2d;
  --accent-rgb: 150, 108, 45;
  --art-accent: #966c2d;
  --art-accent-soft: #e6cfa0;
  --art-sky: #c79a4b;
  --art-robe: #b18a4c;
}
.tarot-face--wands {
  --art-paper: #eeddbe;
  --art-paper-2: #e2c69d;
  --accent: #a44929;
  --accent-rgb: 164, 73, 41;
  --art-accent: #a44929;
  --art-accent-soft: #ecc9a2;
  --art-red: #923923;
  --art-sky: #c97e4c;
  --art-robe: #b96f4c;
}
.tarot-face--cups {
  --art-paper: #e7e3d0;
  --art-paper-2: #d2cfb3;
  --accent: #396a75;
  --accent-rgb: 57, 106, 117;
  --art-accent: #396a75;
  --art-accent-soft: #cbded8;
  --art-blue: #386e80;
  --art-sky: #6f9c96;
  --art-robe: #6d9994;
}
.tarot-face--swords {
  --art-paper: #e9e5d8;
  --art-paper-2: #d3cec1;
  --accent: #464f73;
  --accent-rgb: 70, 79, 115;
  --art-accent: #464f73;
  --art-accent-soft: #d0d2dd;
  --art-sky: #858dad;
  --art-robe: #7e85a8;
}
.tarot-face--pentacles {
  --art-paper: #eae4ca;
  --art-paper-2: #d9d1a9;
  --accent: #64652d;
  --accent-rgb: 100, 101, 45;
  --art-accent: #64652d;
  --art-accent-soft: #dbdab0;
  --art-green: #5c6935;
  --art-sky: #9b984f;
  --art-robe: #929252;
}

.tarot-face__top {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 5px;
  padding: 4.2% 6.5% 0;
  color: var(--accent);
}
.tarot-face__corner {
  justify-self: start;
  font-family: var(--serif);
  font-size: clamp(9px, 0.9vw, 12px);
  line-height: 1;
  font-variant-emoji: text;
  opacity: 0.85;
}
.tarot-face__numeral {
  padding: 1px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  border-radius: 20px;
  background: rgba(250, 244, 227, 0.35);
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(8px, 0.78vw, 11px);
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  white-space: nowrap;
}
.tarot-face__star {
  justify-self: end;
  color: var(--accent);
  font-size: clamp(5px, 0.5vw, 7px);
  opacity: 0.7;
}
.tarot-face__art {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 1.8% 5.4% 0.8%;
  padding: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}
.tarot-face__art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 24px rgba(80, 52, 20, 0.2);
  background-image:
    radial-gradient(1px 1px at 22% 31%, rgba(84, 58, 25, 0.3), transparent),
    radial-gradient(1px 1px at 68% 18%, rgba(84, 58, 25, 0.22), transparent),
    radial-gradient(1px 1px at 82% 67%, rgba(84, 58, 25, 0.25), transparent),
    radial-gradient(1px 1px at 36% 79%, rgba(84, 58, 25, 0.22), transparent);
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.tarot-art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: saturate(1.08) contrast(1.035);
}
.tarot-face__caption {
  position: relative;
  z-index: 3;
  padding: 0 6% 5.2%;
  text-align: center;
}
.tarot-face__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 3px;
  color: var(--accent);
  opacity: 0.62;
}
.tarot-face__rule::before,
.tarot-face__rule::after {
  content: "";
  width: 22%;
  height: 1px;
  background: currentColor;
}
.tarot-face__rule span {
  font-size: 4.5px;
  letter-spacing: 0.1em;
}
.tarot-face__name {
  display: block;
  overflow: hidden;
  color: var(--art-ink);
  font-family: var(--serif);
  font-size: clamp(10px, 1.08vw, 15px);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tarot-face__en {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: clamp(4.5px, 0.48vw, 6.5px);
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.9;
}

/* Compact faces inside the wheel */
.tarot-face--wheel {
  border-width: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(120, 88, 43, 0.5),
    inset 0 0 0 3px rgba(248, 241, 222, 0.42),
    0 4px 10px rgba(0, 0, 0, 0.38);
}
.tarot-face--wheel::before {
  inset: 5%;
}
.tarot-face--wheel .tarot-face__top {
  padding: 4.8% 4.5% 0;
}
.tarot-face--wheel .tarot-face__corner,
.tarot-face--wheel .tarot-face__star,
.tarot-face--wheel .tarot-face__rule,
.tarot-face--wheel .tarot-face__en {
  display: none;
}
.tarot-face--wheel .tarot-face__numeral {
  padding: 0;
  border: 0;
  background: none;
  font-size: clamp(6px, 0.55vw, 8px);
  opacity: 0.9;
}
.tarot-face--wheel .tarot-face__art {
  margin: 1.4% 3.6% 0.4%;
  padding: 0;
}
.tarot-face--wheel .tarot-face__caption {
  padding: 0 3% 3.8%;
}
.tarot-face--wheel .tarot-face__name {
  font-size: clamp(7px, 0.62vw, 9.5px);
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.3s;
}
.wheel-card:hover .tarot-face--wheel .tarot-face__name,
.wheel-card.is-picked .tarot-face--wheel .tarot-face__name {
  opacity: 1;
}

/* minors: pips & court */
.pips {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 4px;
  width: 78%;
  padding: 9% 0;
}
.pips svg {
  width: clamp(10px, 1.35vw, 19px);
  height: clamp(10px, 1.35vw, 19px);
  color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.25));
}
.pips[data-count="1"] svg {
  width: clamp(38px, 4.2vw, 60px);
  height: clamp(38px, 4.2vw, 60px);
}
.pips[data-count="2"] { width: 54%; }
.pips[data-count="2"] svg { width: clamp(20px, 2.2vw, 31px); height: clamp(20px, 2.2vw, 31px); }
.pips[data-count="3"] { width: 68%; }
.pips[data-count="4"] { width: 56%; }
.pips[data-count="5"] { width: 68%; }
.pips[data-count="6"] { width: 58%; }
.pips[data-count="7"] { width: 68%; }
.pips[data-count="8"] { width: 62%; }
.pips[data-count="9"] { width: 68%; }
.pips[data-count="10"] { width: 64%; }

.court {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
}
.court::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px dashed rgba(var(--accent-rgb), 0.18);
  border-radius: 50%;
}
.court svg {
  width: 54%;
  height: 54%;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.25));
}
.court__crown {
  position: absolute;
  top: -1%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 25%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: #0a0b13;
  color: var(--gold-bright);
  font-size: clamp(8px, 0.85vw, 12px);
  line-height: 1;
}

/* =========================================================
   Library
   ========================================================= */

.library {
  background:
    radial-gradient(ellipse 55% 35% at 85% 0%, rgba(91, 73, 128, 0.09), transparent 65%),
    linear-gradient(180deg, rgba(8, 9, 16, 0.35), rgba(8, 9, 16, 0.7));
  border-bottom: 1px solid rgba(211, 177, 113, 0.09);
}
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 18px 0;
  border-top: 1px solid rgba(211, 177, 113, 0.12);
  border-bottom: 1px solid rgba(211, 177, 113, 0.12);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 390px;
  max-width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid rgba(211, 177, 113, 0.22);
  transition: border-color 0.3s;
}
.search-box:focus-within {
  border-color: rgba(211, 177, 113, 0.65);
}
.search-box svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--gold);
}
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.search-box input::placeholder {
  color: var(--muted-dim);
}
.search-box kbd {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(211, 177, 113, 0.18);
  border-radius: 2px;
  color: var(--muted-dim);
  font-family: var(--sans);
  font-size: 8px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.filter-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid rgba(211, 177, 113, 0.12);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.filter-chip span {
  color: var(--muted-dim);
  font-family: var(--serif);
  font-size: 9px;
}
.filter-chip:hover {
  border-color: rgba(211, 177, 113, 0.35);
  color: var(--ink-soft);
}
.filter-chip.is-active {
  border-color: rgba(211, 177, 113, 0.55);
  background: rgba(211, 177, 113, 0.08);
  color: var(--gold-bright);
}
.filter-chip.is-active span {
  color: var(--gold);
}

.library-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0 20px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.13em;
}
.library-meta__hint {
  text-align: right;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}
.library-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 3px;
  text-align: left;
  transition: transform 0.5s var(--ease), filter 0.5s;
  animation: cardIn 0.7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
.library-card .tarot-face {
  aspect-ratio: 2 / 3;
  height: auto;
}
.library-card:hover,
.library-card:focus-visible {
  transform: translateY(-8px);
  outline: none;
  filter: brightness(1.08);
}
.library-card::after {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border: 1px solid transparent;
  transition: border-color 0.35s, box-shadow 0.35s;
  pointer-events: none;
}
.library-card:hover::after,
.library-card:focus-visible::after {
  border-color: rgba(211, 177, 113, 0.28);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.library-empty {
  padding: 70px 20px;
  text-align: center;
}
.library-empty > span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 35px;
  opacity: 0.6;
}
.library-empty h3 {
  margin-top: 13px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
}
.library-empty p {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 11px;
}
.library-more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.library-more .btn {
  min-width: 220px;
}

/* =========================================================
   Guide
   ========================================================= */

.guide {
  position: relative;
  overflow: hidden;
}
.guide::after {
  content: "鈽?;
  position: absolute;
  right: -2%;
  top: 8%;
  color: transparent;
  -webkit-text-stroke: 1px rgba(211, 177, 113, 0.06);
  font-family: var(--serif);
  font-size: 380px;
  line-height: 1;
  pointer-events: none;
}
.guide__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(50px, 8vw, 120px);
  align-items: start;
}
.guide__intro {
  position: relative;
  z-index: 2;
}
.guide__intro h2 {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: clamp(42px, 4.8vw, 65px);
  font-weight: 400;
  line-height: 1.23;
  letter-spacing: 0.01em;
}
.guide__intro h2 em {
  font-style: normal;
  color: var(--gold-bright);
}
.guide__lead {
  max-width: 410px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 2.05;
}
.guide blockquote {
  position: relative;
  margin-top: 45px;
  padding: 22px 0 0 31px;
  border-top: 1px solid rgba(211, 177, 113, 0.18);
  border-left: 1px solid rgba(211, 177, 113, 0.18);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.9;
  letter-spacing: 0.05em;
}
.guide blockquote > span {
  position: absolute;
  left: -7px;
  top: 23px;
  padding: 4px 0;
  background: var(--bg);
  color: var(--gold);
  font-size: 27px;
  line-height: 1;
}

.guide__steps {
  position: relative;
  z-index: 2;
  padding-top: 9px;
}
.step {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 18px;
  padding: 28px 0;
  border-top: 1px solid rgba(211, 177, 113, 0.13);
}
.step:last-of-type {
  border-bottom: 1px solid rgba(211, 177, 113, 0.13);
}
.step__no {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.08em;
}
.step h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.step p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.95;
}
.guide__note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 25px;
  padding: 16px 18px;
  border: 1px solid rgba(211, 177, 113, 0.11);
  background: rgba(211, 177, 113, 0.025);
}
.guide__note span {
  color: var(--gold);
  font-size: 10px;
  line-height: 1.8;
}
.guide__note p {
  color: var(--muted-dim);
  font-size: 9.5px;
  line-height: 1.8;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid rgba(211, 177, 113, 0.13);
  background: linear-gradient(180deg, rgba(9, 10, 17, 0.2), rgba(5, 6, 11, 0.85));
}
.footer__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 44px;
  padding: 55px 0 45px;
}
.brand--footer .brand__type strong {
  font-size: 23px;
}
.footer__motto {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.08em;
  text-align: center;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px 24px;
  padding-top: 9px;
}
.footer__links a {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}
.footer__links a:hover {
  color: var(--gold-bright);
}
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 0 25px;
  border-top: 1px solid rgba(211, 177, 113, 0.08);
  color: var(--muted-dim);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

/* =========================================================
   Modal
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
}
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 9, 0.82);
  backdrop-filter: blur(15px) saturate(0.85);
  -webkit-backdrop-filter: blur(15px) saturate(0.85);
}
.modal__dialog {
  position: relative;
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 46px;
  border: 1px solid rgba(211, 177, 113, 0.22);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(105, 84, 148, 0.14), transparent 52%),
    linear-gradient(145deg, #121320 0%, #0b0c15 62%, #090a12 100%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
  transform: translateY(20px) scale(0.985);
  transition: transform 0.55s var(--ease);
}
.modal.is-open .modal__dialog {
  transform: none;
}
.modal__dialog::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(211, 177, 113, 0.07);
  pointer-events: none;
}
.modal__close {
  position: absolute;
  right: 17px;
  top: 17px;
  z-index: 5;
  background: rgba(9, 10, 17, 0.7);
}
.modal__content {
  position: relative;
  z-index: 2;
}

.reading-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}
.reading-card-wrap {
  position: relative;
}
.reading-card-wrap::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(211, 177, 113, 0.15), transparent 67%);
  filter: blur(18px);
}
.reading-card-wrap .tarot-face {
  position: relative;
  z-index: 2;
  aspect-ratio: 2 / 3;
  height: auto;
  box-shadow:
    inset 0 0 0 1px rgba(120, 88, 43, 0.55),
    inset 0 0 0 5px rgba(248, 241, 222, 0.5),
    inset 0 0 0 6px rgba(131, 98, 49, 0.38),
    0 0 0 1px rgba(211, 177, 113, 0.45),
    0 28px 70px rgba(0, 0, 0, 0.5);
  animation: readingCardIn 0.9s var(--ease) both;
}
@keyframes readingCardIn {
  from { opacity: 0; transform: rotateY(-16deg) translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.reading-copy {
  min-width: 0;
}
.reading-type {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.reading-type::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.reading-title {
  margin-top: 13px;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.02em;
}
.reading-en {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.reading-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 19px;
}
.orientation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(211, 177, 113, 0.4);
  background: rgba(211, 177, 113, 0.08);
  color: var(--gold-bright);
  font-size: 9px;
  letter-spacing: 0.12em;
}
.orientation-badge.is-reversed {
  border-color: rgba(198, 138, 152, 0.4);
  background: rgba(198, 138, 152, 0.08);
  color: #dbaab4;
}
.meta-chip {
  padding: 5px 9px;
  border: 1px solid rgba(211, 177, 113, 0.12);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}
.reading-imagery {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 1px solid rgba(211, 177, 113, 0.34);
  background: rgba(211, 177, 113, 0.04);
}
.reading-imagery__label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 8.5px;
  letter-spacing: 0.16em;
}
.reading-imagery__label svg {
  width: 13px;
  height: 13px;
}
.reading-imagery p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.95;
}
.reading-meaning {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(211, 177, 113, 0.14);
}
.reading-meaning__label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 8.5px;
  letter-spacing: 0.18em;
}
.reading-meaning__label svg {
  width: 12px;
  height: 12px;
}
.reading-meaning p {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0.015em;
}
.reading-keywords {
  margin-top: 17px;
}
.reading-quote {
  margin-top: 21px;
  padding: 14px 16px;
  border-left: 1px solid rgba(211, 177, 113, 0.32);
  background: rgba(211, 177, 113, 0.03);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}
.reading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}
.reading-actions .btn {
  min-height: 45px;
  font-size: 10.5px;
}
.reading-footnote {
  margin-top: 17px;
  color: var(--muted-dim);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

/* Library detail modal */
.detail-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}
.detail-layout .tarot-face {
  aspect-ratio: 2 / 3;
  height: auto;
  box-shadow:
    inset 0 0 0 1px rgba(120, 88, 43, 0.55),
    inset 0 0 0 5px rgba(248, 241, 222, 0.5),
    inset 0 0 0 6px rgba(131, 98, 49, 0.38),
    0 0 0 1px rgba(211, 177, 113, 0.45),
    0 28px 70px rgba(0, 0, 0, 0.5);
}
.detail-title {
  margin-top: 13px;
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 52px);
  font-weight: 400;
  line-height: 1.15;
}
.detail-en {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}
.meaning-block {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid rgba(211, 177, 113, 0.13);
}
.meaning-block__head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-size: 8.5px;
  letter-spacing: 0.17em;
}
.meaning-block__head i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.meaning-block--reversed .meaning-block__head {
  color: #d3a1ab;
}
.meaning-block p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.95;
}

/* Three-card modal summary (reading modal type) */
.three-reading {
  display: grid;
  gap: 20px;
}
.three-reading__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.three-reading__head h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
}
.three-reading__head p {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.three-reading__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.mini-reading {
  min-width: 0;
}
.mini-reading__label {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 8.5px;
  letter-spacing: 0.16em;
}
.mini-reading .tarot-face {
  aspect-ratio: 2 / 3;
  height: auto;
}
.mini-reading__name {
  margin-top: 10px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.03em;
}
.mini-reading__badge {
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.08em;
}

/* =========================================================
   History drawer
   ========================================================= */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  visibility: hidden;
  pointer-events: none;
}
.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}
.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 9, 0.74);
  opacity: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.45s;
}
.drawer.is-open .drawer__scrim {
  opacity: 1;
}
.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(450px, 100%);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(211, 177, 113, 0.18);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(105, 84, 148, 0.12), transparent 50%),
    #0b0c15;
  transform: translateX(100%);
  transition: transform 0.55s var(--ease);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.45);
}
.drawer.is-open .drawer__panel {
  transform: none;
}
.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 28px 24px;
  border-bottom: 1px solid rgba(211, 177, 113, 0.12);
}
.drawer__head h2 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  letter-spacing: 0.05em;
}
.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 28px;
}
.history-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  min-height: 300px;
  text-align: center;
}
.history-empty > span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 32px;
  opacity: 0.55;
}
.history-empty h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  color: var(--ink-soft);
}
.history-empty p {
  max-width: 250px;
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.8;
}
.history-item {
  padding: 17px 0;
  border-bottom: 1px solid rgba(211, 177, 113, 0.09);
}
.history-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.history-item__type {
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0.17em;
}
.history-item__time {
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.05em;
}
.history-item__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.history-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(211, 177, 113, 0.14);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.history-card i {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.05em;
  opacity: 0.8;
}
.history-card.is-reversed {
  color: #d3a1ab;
  border-color: rgba(198, 138, 152, 0.18);
}
.drawer__foot {
  padding: 20px 28px 26px;
  border-top: 1px solid rgba(211, 177, 113, 0.1);
}
.drawer__foot p {
  margin-top: 9px;
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.06em;
}

/* =========================================================
   Toast
   ========================================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 200;
  padding: 11px 18px;
  border: 1px solid rgba(211, 177, 113, 0.3);
  background: rgba(10, 11, 19, 0.94);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: var(--gold-bright);
  font-size: 10px;
  letter-spacing: 0.08em;
  transform: translate(-50%, 20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, transform 0.45s var(--ease), visibility 0.35s;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1240px) {
  :root { --wheel-size: clamp(440px, 45vw, 600px); }
  .hero__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
  .hero__title { font-size: clamp(46px, 5vw, 66px); }
  .hero__meta li { padding: 0 16px; }
  .card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .daily-body { grid-template-columns: 160px minmax(0, 1fr); gap: 22px; }
}

@media (max-width: 1060px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 72px);
    padding-bottom: 105px;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 46px;
  }
  .hero__copy { max-width: 700px; }
  .hero__title { font-size: clamp(52px, 8vw, 78px); }
  .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__meta { margin-inline: auto; justify-content: center; }
  .eyebrow { justify-content: center; }
  .eyebrow__no { display: none; }
  .hero__visual { width: 100%; }
  .wheel-stage { --wheel-size: clamp(460px, 72vw, 610px); }
  .hero__watermark { bottom: 22vw; opacity: 0.8; }
  .hero__scroll { display: none; }
  .section-head__row { grid-template-columns: 1fr; gap: 16px; }
  .section-head__row > p { max-width: 530px; }
  .oracle-grid { grid-template-columns: 1fr; }
  .daily-body { grid-template-columns: 160px minmax(0, 1fr); }
  .spread-stage { max-width: 560px; }
  .guide__grid { grid-template-columns: 1fr; gap: 55px; }
  .guide__lead { max-width: 560px; }
  .guide__intro h2 { font-size: clamp(42px, 6vw, 60px); }
  .guide::after { opacity: 0.6; }
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .library-toolbar { align-items: flex-start; flex-direction: column; gap: 7px; }
  .filter-row { justify-content: flex-start; }
  .search-box { width: 100%; }
}

@media (max-width: 820px) {
  .container { width: calc(100% - 40px); }
  .site-header__inner { width: calc(100% - 36px); }
  .desktop-nav { display: none; }
  .menu-btn { display: flex; }
  .mobile-menu:not([hidden]) { display: block; }
  .header-actions { margin-left: auto; }
  .brand__type strong { font-size: 18px; }
  .brand__type small { font-size: 6px; }
  .brand__mark { width: 32px; height: 32px; }

  .hero { padding-top: calc(var(--header-h) + 48px); padding-bottom: 82px; }
  .hero__title { font-size: clamp(42px, 10.8vw, 62px); }
  .hero__title-accent::after { right: -0.55em; }
  .hero__lead { font-size: 12.5px; line-height: 1.95; }
  .desktop-break { display: none; }
  .hero__meta { margin-top: 32px; width: 100%; max-width: 400px; }
  .hero__meta li { flex-direction: column; gap: 2px; padding: 0 16px; }
  .hero__meta strong { font-size: 23px; }
  .wheel-stage { --wheel-size: min(86vw, 540px); margin-bottom: 35px; }
  .zodiac-ring span { font-size: 11px; }
  .wheel-hint { font-size: 7.5px; bottom: -30px; }
  .wheel-pointer { width: 20px; }
  .wheel-pointer__gem { width: 10px; height: 10px; }
  .hub-btn__hint { font-size: 6.5px; }
  .hero__watermark { font-size: 28vw; bottom: 12vw; }

  .marquee { padding: 12px 0; }
  .section { padding: 82px 0; }
  .section-head { margin-bottom: 38px; }
  .section-head h2 { font-size: clamp(34px, 8vw, 46px); }
  .daily-panel, .spread-panel { padding: 24px; }
  .daily-panel::before, .spread-panel::before { inset: 5px; }
  .panel-head h3 { font-size: 24px; }
  .daily-body { grid-template-columns: 130px minmax(0, 1fr); gap: 20px; }
  .daily-content h4 { margin-top: 12px; font-size: 20px; }
  .daily-text { font-size: 10.5px; }
  .spread-stage { gap: 10px; }
  .spread-slot__label { font-size: 8.5px; }
  .spread-slot__caption { font-size: 11px; }
  .spread-slot__keywords { display: none; }
  .spread-summary { font-size: 10px; }
  .spread-actions { flex-wrap: wrap; }
  .spread-actions .btn { flex: 1 1 auto; }

  .library-meta { padding-top: 20px; }
  .library-meta__hint { display: none; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .filter-chip { padding: 6px 9px; font-size: 9px; }
  .filter-chip span { display: none; }
  .search-box kbd { display: none; }

  .guide blockquote { margin-top: 32px; font-size: 18px; }
  .step { grid-template-columns: 45px minmax(0, 1fr); gap: 14px; padding: 23px 0; }
  .step h3 { font-size: 21px; }
  .step p { font-size: 10.5px; }

  .footer__top { grid-template-columns: 1fr; gap: 28px; text-align: center; padding: 42px 0 35px; }
  .brand--footer { justify-content: center; }
  .footer__motto { order: 3; }
  .footer__links { justify-content: center; padding-top: 0; }
  .footer__bottom { flex-direction: column; gap: 6px; text-align: center; }

  .reading-layout { grid-template-columns: 1fr; gap: 30px; }
  .reading-card-wrap { width: min(200px, 56vw); margin-inline: auto; }
  .reading-copy { text-align: center; }
  .reading-type { justify-content: center; }
  .reading-type::before { display: none; }
  .reading-badges, .reading-keywords, .reading-actions { justify-content: center; }
  .reading-meaning, .reading-quote { text-align: left; }
  .reading-quote { border-left: 0; border-top: 1px solid rgba(211, 177, 113, 0.2); }
  .modal__dialog { padding: 40px 24px 28px; }
  .detail-layout { grid-template-columns: 1fr; gap: 26px; }
  .detail-layout > .tarot-face { width: min(200px, 56vw); margin-inline: auto; }
  .detail-copy { text-align: center; }
  .detail-meta { justify-content: center; }
  .meaning-block { text-align: left; }
  .reading-title { font-size: 43px; }
  .three-reading__grid { gap: 10px; }
  .three-reading__head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .site-header__inner { width: calc(100% - 28px); }
  .hero { padding-top: calc(var(--header-h) + 34px); padding-bottom: 65px; }
  .hero__grid { gap: 35px; }
  .hero__title { margin-top: 18px; font-size: clamp(38px, 11.4vw, 52px); line-height: 1.2; }
  .hero__title-accent::after { top: -0.2em; right: -0.35em; font-size: 0.14em; }
  .hero__lead { margin-top: 18px; font-size: 11.5px; padding: 0 6px; }
  .hero__actions { flex-direction: column; width: 100%; max-width: 310px; margin-top: 28px; }
  .hero__actions .btn { width: 100%; }
  .hero__meta { margin-top: 28px; }
  .hero__meta li { padding: 0 11px; }
  .hero__meta strong { font-size: 20px; }
  .hero__meta span { font-size: 8px; letter-spacing: 0.03em; }
  .wheel-stage { --wheel-size: min(88vw, 460px); }
  .wheel-card { width: calc(var(--wheel-size) * 0.108); height: calc(var(--wheel-size) * 0.176); }
  .hub-btn__moon { font-size: 25px; }
  .hub-btn__label { margin-top: 7px; }
  .hub-btn__label strong { font-size: 14px; }
  .hub-btn__label small { font-size: 5.5px; letter-spacing: 0.16em; }
  .hub-btn__hint { font-size: 6px; margin-top: 4px; }
  .hero__watermark { font-size: 34vw; bottom: 17vw; }

  .section { padding: 68px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head__row { margin-top: 15px; }
  .section-head h2 { font-size: 33px; }
  .title-line { display: block; }
  .mobile-break { display: block; }
  .section-head__row > p { font-size: 11px; }
  .section-kicker { font-size: 8.5px; letter-spacing: 0.2em; }
  .section-kicker span { width: 23px; height: 23px; font-size: 9px; }

  .daily-panel, .spread-panel { padding: 20px 17px; }
  .panel-head { align-items: center; gap: 8px; padding-bottom: 15px; }
  .panel-head h3 { font-size: 22px; }
  .panel-head .text-btn { font-size: 9.5px; }
  .spread-badge { display: none; }
  .daily-body { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding-top: 18px; }
  .daily-content h4 { font-size: 18px; margin-top: 10px; }
  .daily-text { font-size: 10px; line-height: 1.8; }
  .daily-date { font-size: 7.5px; }
  .daily-moon { font-size: 8px; }
  .daily-content .btn { min-height: 38px; padding: 0 12px; font-size: 9px; }
  .keyword-chip { padding: 3px 6px; font-size: 7.5px; }
  .spread-stage { gap: 8px; padding-top: 20px; }
  .spread-slot__label { margin-bottom: 7px; gap: 5px; }
  .spread-slot__caption { margin-top: 8px; font-size: 10px; }
  .spread-summary { margin-top: 13px; padding-top: 12px; }
  .spread-actions { flex-direction: column; }
  .spread-actions .btn { width: 100%; }

  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .library-toolbar { gap: 13px; padding: 13px 0; }
  .filter-row { gap: 5px; }
  .filter-chip { padding: 5px 8px; font-size: 8.5px; letter-spacing: 0.03em; }
  .library-meta { font-size: 8px; }
  .library-more .btn { width: 100%; }
  .tarot-face__top { padding-top: 9%; }
  .tarot-face__name { font-size: 13px; }
  .tarot-face__en { font-size: 6px; }
  .tarot-face__numeral { font-size: 10px; }
  .tarot-face__glyph { font-size: 36px; }
  .pips svg { width: 18px; height: 18px; }

  .guide__intro h2 { font-size: 38px; }
  .guide__lead { font-size: 11px; }
  .guide blockquote { font-size: 16px; padding-left: 23px; }
  .guide__steps { padding-top: 0; }

  .modal { padding: 10px; }
  .modal__dialog { max-height: calc(100vh - 20px); padding: 38px 18px 24px; }
  .modal__close { right: 10px; top: 10px; width: 36px; height: 36px; }
  .reading-layout { gap: 24px; }
  .reading-card-wrap { width: min(170px, 52vw); }
  .reading-title { font-size: 38px; }
  .reading-meaning p { font-size: 11.5px; }
  .reading-actions .btn { width: 100%; }
  .reading-quote { font-size: 11px; }
  .detail-layout { gap: 20px; }
  .detail-layout > .tarot-face { width: min(180px, 54vw); }
  .detail-title { font-size: 35px; }
  .three-reading__head h2 { font-size: 31px; }
  .three-reading__grid { gap: 7px; }
  .mini-reading__name { font-size: 13px; }
  .mini-reading__label { font-size: 7px; }
  .drawer__head { padding: 24px 20px 18px; }
  .history-list { padding: 6px 20px; }
  .drawer__foot { padding: 17px 20px 22px; }
  .toast { bottom: 18px; width: calc(100% - 32px); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
