/* Free reading (/read/): on top of site.css. Soft, physical motion; cards are 9:16 like the app. */

#view { overflow-x: clip; min-height: 70vh; padding: 48px 20px 80px; max-width: 1080px; margin: 0 auto; }
.read-loading { text-align: center; color: var(--text-secondary); padding: 120px 0; font-family: var(--serif); font-size: 20px; }
.read-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.read-head h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin: 12px 0 14px; }
.read-head h1 span { color: var(--primary); font-style: italic; }
.read-head p { color: var(--text-secondary); font-size: 17px; }
.read-back {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer;
  color: var(--primary); font: 600 14px/1 -apple-system, BlinkMacSystemFont, sans-serif; padding: 8px 0; margin-bottom: 8px;
}
.read-back:hover { color: var(--primary-light); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border-radius: 14px; padding: 14px 26px; font: 500 16px/1.2 -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.01em; text-decoration: none; border: 1px solid transparent;
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--primary); color: var(--on-primary); }
.btn-gold:hover { background: var(--primary-light); color: var(--on-primary); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--elevated); color: var(--text); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── HOME ── */
.daily {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 36px;
  max-width: 820px; margin: 0 auto 56px; cursor: pointer; text-align: left; color: inherit; font: inherit; width: 100%;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s;
}
.daily:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0,0,0,0.4); }
.daily .tarot-card { width: 150px; }
.daily h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.15; margin: 8px 0 10px; }
.daily p { color: var(--text-secondary); font-size: 16px; margin-bottom: 18px; }
.daily .glow { box-shadow: 0 0 0 1px rgba(204,177,123,.45), 0 0 48px rgba(204,177,123,.22), 0 24px 60px rgba(0,0,0,.55); }

.ask-title { text-align: center; font-family: var(--serif); font-weight: 400; font-size: 28px; margin-bottom: 22px; }
.ask-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; max-width: 1000px; margin: 0 auto; }
.ask-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px 20px;
  text-align: left; cursor: pointer; color: var(--text); font: inherit;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), border-color 0.2s, background 0.2s;
}
.ask-tile:hover { transform: translateY(-3px); border-color: rgba(204,177,123,.5); background: var(--surface-solid); }
.ask-tile .ico { font-size: 22px; color: var(--primary); display: block; margin-bottom: 12px; }
.ask-tile b { display: block; font-family: var(--serif); font-weight: 400; font-size: 20px; margin-bottom: 4px; }
.ask-tile small { color: var(--text-secondary); font-size: 14px; }

/* ── INTENTION ── */
.intent { max-width: 620px; margin: 0 auto; }
.intent h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.23em; text-transform: uppercase;
  color: var(--primary); margin: 32px 0 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); border-radius: 999px;
  padding: 9px 16px; font: 500 14px/1 -apple-system, BlinkMacSystemFont, sans-serif; cursor: pointer; transition: all 0.2s;
}
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px;
  color: var(--text); font: 400 16px/1.4 -apple-system, BlinkMacSystemFont, sans-serif; cursor: pointer; transition: all 0.2s;
}
.choice::before {
  content: ""; flex: 0 0 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--text-light); transition: all 0.2s;
}
.choice[aria-checked="true"] { border-color: rgba(204,177,123,.7); background: var(--surface-solid); }
.choice[aria-checked="true"]::before { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 45%, transparent 52%); }
.choice small { display: block; color: var(--text-secondary); font-size: 13px; }
.choice.locked { cursor: default; opacity: 0.75; border-style: dashed; }
.choice.locked::before { content: "✦"; border: 0; color: var(--primary); text-align: center; line-height: 18px; font-size: 13px; }
.choice.locked a { color: var(--primary); }
.intent .btn-row { margin-top: 36px; }

/* ── DRAW ── */
.draw-hint { text-align: center; color: var(--text-secondary); min-height: 48px; margin: -12px auto 12px; max-width: 520px; font-size: 15px; }
.draw-hint { scroll-margin-top: 84px; }
.draw-hint b { color: var(--text); font-weight: 500; }
.spread { position: relative; margin: 0 auto; }
.slot {
  position: absolute; transform: translate(-50%, -50%); aspect-ratio: 9 / 16;
  border: 1.5px dashed rgba(204,177,123,.35); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: rgba(204,177,123,.6);
  font-family: var(--serif); font-size: 20px; transition: border-color 0.3s;
}
.slot.next { border-color: var(--primary); box-shadow: 0 0 28px rgba(204,177,123,.18); }
.slot-label {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light);
}
.flip { position: absolute; inset: 0; perspective: 1200px; cursor: pointer; }
.flip-inner {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(.3,1.25,.4,1);
}
.flip.revealed .flip-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 10px; overflow: hidden; background: var(--surface-solid);
  box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(204,177,123,.35);
}
.face img, .face video { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-front { transform: rotateY(180deg); }
.flip:not(.revealed):hover .flip-inner { transform: translateY(-4px); }

.fan { position: relative; height: 170px; margin: 20px auto 0; max-width: 760px; touch-action: manipulation; }
.fan-card {
  position: absolute; top: 0; left: 50%; width: 74px; aspect-ratio: 9 / 16; padding: 0; border: 0; background: none;
  border-radius: 8px; cursor: pointer;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), opacity 0.3s;
}
.fan-card img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block;
  box-shadow: 0 8px 20px rgba(0,0,0,.45), 0 0 0 1px rgba(204,177,123,.3);
}
.fan-card.taken { opacity: 0; pointer-events: none; }
.fan.done .fan-card { opacity: 0; pointer-events: none; }
.flying { position: fixed; z-index: 50; pointer-events: none; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.55); }
.flying img { width: 100%; height: 100%; object-fit: cover; display: block; }
.draw-actions { margin-top: 28px; }

/* ── READING ── */
.reading { scroll-margin-top: 72px; max-width: 720px; margin: 64px auto 0; opacity: 0; transform: translateY(16px); transition: opacity 0.8s, transform 0.8s cubic-bezier(.2,.8,.2,1); }
.reading.shown { opacity: 1; transform: none; }
.reading-title { text-align: center; margin-bottom: 28px; }
.reading-title h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 38px); line-height: 1.2; margin-top: 8px; }
.reading-title q { display: block; color: var(--text-secondary); font-family: var(--serif); font-style: italic; font-size: 19px; margin-top: 10px; quotes: "“" "”"; }
.reading p { font-size: 17px; line-height: 1.7; color: var(--text); }
.reading .lead { font-family: var(--serif); font-size: 20px; line-height: 1.6; }
.answer-badge { text-align: center; margin: 8px 0 26px; }
.answer-badge b { display: block; font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1; color: var(--primary); }
.answer-badge p { color: var(--text-secondary); margin-top: 10px; }
.callout {
  background: var(--surface); border: 1px solid rgba(204,177,123,.45); border-radius: 18px; padding: 20px 22px; margin: 22px 0;
}
.callout h4, .reading h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.23em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 10px;
}
.reading h3 { margin: 44px 0 14px; }
.card-section { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--border); }
.card-section:first-of-type { border-top: 0; }
.card-section button { padding: 0; border: 0; background: none; cursor: zoom-in; align-self: start; }
.card-section .tarot-card { width: 96px; border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.45), 0 0 0 1px rgba(204,177,123,.3); }
.card-section .pos { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-light); }
.card-section h4 { font-family: var(--serif); font-weight: 400; font-size: 23px; margin: 2px 0 8px; }
.card-section p + p { margin-top: 10px; color: var(--text-secondary); }
.reading .together p + p, .reading .guidance p + p { margin-top: 12px; }
.closing { font-family: var(--serif); font-style: italic; font-size: 21px !important; text-align: center; margin: 44px 0 0; color: var(--primary-light) !important; }
.deeper { margin-top: 32px; }
.deeper summary { cursor: pointer; color: var(--primary); font-size: 15px; font-weight: 500; list-style: none; text-align: center; }
.deeper summary::-webkit-details-marker { display: none; }
.deeper p { margin-top: 12px; color: var(--text-secondary); }
.disclaimer { font-size: 14px !important; color: var(--text-light) !important; text-align: center; margin-top: 24px; }
.upsell {
  margin-top: 48px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px 24px;
}
.upsell h4 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin-bottom: 8px; }
.upsell p { color: var(--text-secondary) !important; font-size: 15px !important; margin-bottom: 20px; }
.daily-note { text-align: center; color: var(--text-secondary); font-size: 15px; margin-top: 18px; }

/* ── DIALOGS ── */
.read-dialog {
  margin: auto; border: 1px solid var(--border); border-radius: 24px; background: var(--surface-solid); color: var(--text);
  padding: 0; max-width: min(860px, calc(100vw - 32px)); width: 100%; max-height: calc(100dvh - 32px);
}
.read-dialog::backdrop { background: rgba(6, 10, 8, 0.78); backdrop-filter: blur(6px); }
.read-dialog[open] { animation: rise 0.45s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(0.98); } }
.dialog-close {
  position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--elevated); color: var(--text); font-size: 18px; cursor: pointer;
}
.card-detail { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 32px; padding: 32px; }
.card-detail .tarot-card { width: 100%; }
.card-detail .tarot-card video, .card-detail .tarot-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-detail h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.15; margin-bottom: 10px; }
.keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.keywords span { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-secondary); }
.card-detail h4 { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary); margin: 18px 0 6px; }
.card-detail p { color: var(--text-secondary); font-size: 15px; line-height: 1.65; }

.deck-dialog .deck-preview { padding: 32px 0 28px; }
.deck-preview header { padding: 0 32px; margin-bottom: 22px; }
.deck-preview h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; }
.deck-preview header p { color: var(--text-secondary); font-size: 15px; margin-top: 6px; }
.preview-strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 32px 16px; }
.preview-strip figure { flex: 0 0 min(220px, 58vw); scroll-snap-align: center; text-align: center; }
.preview-strip .tarot-card { width: 100%; border-radius: 12px; }
.preview-strip .tarot-card video, .preview-strip .tarot-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-strip figcaption { margin-top: 10px; font-size: 13px; color: var(--text-secondary); font-family: var(--mono); letter-spacing: 0.06em; }
.deck-preview .locked-note { padding: 8px 32px 0; text-align: center; color: var(--text-secondary); font-size: 15px; }
.deck-preview .locked-note b { color: var(--primary); font-weight: 500; }

/* ── DECK GRID ── */
.deck-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -32px 0 32px; }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 16px; }
.deck-tile { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: center; }
.deck-tile .tarot-card { border-radius: 10px; transition: transform 0.35s cubic-bezier(.2,.8,.2,1); position: relative; }
.deck-tile:hover .tarot-card { transform: translateY(-4px) rotate(-1deg); }
.deck-tile span { display: block; margin-top: 10px; font-size: 13px; color: var(--text-secondary); font-family: var(--mono); letter-spacing: 0.04em; }
.deck-tile .badge {
  position: absolute; top: 8px; left: 8px; z-index: 1; font: 600 10px/1 -apple-system, sans-serif; letter-spacing: .06em; text-transform: uppercase;
  background: var(--primary); color: var(--on-primary); padding: 5px 8px; border-radius: 999px; margin: 0;
}
.read-app-cta { display: flex; justify-content: center; margin-top: 48px; }
.read-app-cta .btn-appstore { text-decoration: none; }

@media (max-width: 640px) {
  #view { padding: 28px 16px 64px; }
  .daily { grid-template-columns: 92px 1fr; padding: 20px 18px; gap: 18px; margin-bottom: 40px; border-radius: 22px; }
  .daily .tarot-card { width: 92px; }
  .daily h2 { font-size: 22px; margin: 4px 0 6px; }
  .daily p { font-size: 14px; margin-bottom: 12px; }
  .daily .btn { padding: 10px 16px; font-size: 15px; }
  .read-head { margin-bottom: 28px; }
  .ask-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ask-tile { padding: 16px 14px; }
  .ask-tile b { font-size: 17px; }
  .ask-tile small { font-size: 13px; }
  .card-section { grid-template-columns: 72px 1fr; gap: 14px; }
  .card-section .tarot-card { width: 72px; }
  .card-detail { grid-template-columns: 1fr; padding: 24px 20px; gap: 22px; }
  .card-detail .tarot-card { width: 62%; margin: 0 auto; }
  .fan { height: 150px; }
  .fan-card { width: 56px; }
  .deck-grid { grid-template-columns: repeat(3, 1fr); gap: 16px 10px; }
  .deck-tile span { font-size: 11px; }
  .preview-strip, .deck-preview header, .deck-preview .locked-note { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01s !important; animation-duration: 0.01s !important; }
}

/* The combined interpretation is primary; card meanings are an optional reference. */
.reading-prose > p + p { margin-top: 22px; }
.card-details { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 20px; }
.card-details > summary { cursor: pointer; color: var(--primary); font-size: 16px; padding: 8px 0; }
.detail-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-top: 14px; margin-bottom: 6px; }
