/* Tarot round 2: the weighted card turn, the three-card spread, the reading journal.
   Sits on top of daily-card.css (Raven's card) and school.css (the live skin). Owned by the core app. */

/* ---------- the turn: lift, turn over, land ---------- */
.sm-tarot .scene{position:relative}
.sm-tarot .tc{transition:none;will-change:transform}
.sm-tarot .tc.flip.is-rev{transform:rotateY(180deg) rotateZ(180deg)}
.sm-tarot .tc[disabled]{cursor:default;opacity:1}
.sm-tarot .tc[aria-busy=true]{cursor:progress}
.sm-tarot .tc.is-turning{animation:sm-turn 1.15s both}
.sm-tarot .tc.is-turning.is-rev{animation-name:sm-turn-rev}
@keyframes sm-turn{
  0%{transform:translate3d(0,0,0) rotateX(0) rotateY(0);animation-timing-function:cubic-bezier(.3,0,.2,1)}
  24%{transform:translate3d(0,-26px,70px) rotateX(9deg) rotateY(-7deg);animation-timing-function:cubic-bezier(.55,0,.3,1)}
  70%{transform:translate3d(0,-20px,70px) rotateX(4deg) rotateY(180deg);animation-timing-function:cubic-bezier(.6,0,.8,.45)}
  88%{transform:translate3d(0,3px,0) rotateX(-1deg) rotateY(180deg);animation-timing-function:cubic-bezier(.2,.6,.3,1)}
  100%{transform:translate3d(0,0,0) rotateX(0) rotateY(180deg)}
}
@keyframes sm-turn-rev{
  0%{transform:translate3d(0,0,0) rotateX(0) rotateY(0) rotateZ(0);animation-timing-function:cubic-bezier(.3,0,.2,1)}
  24%{transform:translate3d(0,-26px,70px) rotateX(9deg) rotateY(-7deg) rotateZ(0);animation-timing-function:cubic-bezier(.55,0,.3,1)}
  70%{transform:translate3d(0,-20px,70px) rotateX(4deg) rotateY(180deg) rotateZ(180deg);animation-timing-function:cubic-bezier(.6,0,.8,.45)}
  88%{transform:translate3d(0,3px,0) rotateX(-1deg) rotateY(180deg) rotateZ(180deg);animation-timing-function:cubic-bezier(.2,.6,.3,1)}
  100%{transform:translate3d(0,0,0) rotateX(0) rotateY(180deg) rotateZ(180deg)}
}
/* the soft shadow under the card: it spreads and fades while the card is in the air */
.sm-tarot .shadow{position:absolute;left:8%;right:8%;bottom:-16px;height:30px;border-radius:50%;pointer-events:none;background:radial-gradient(closest-side,rgba(0,0,0,.9),rgba(0,0,0,0));opacity:.6;filter:blur(2px)}
html.sm-day .sm-tarot .shadow{background:radial-gradient(closest-side,rgba(30,51,38,.45),rgba(30,51,38,0))}
.sm-tarot .scene.is-turning .shadow{animation:sm-shadow 1.15s both}
@keyframes sm-shadow{
  0%{opacity:.6;transform:scale(1);filter:blur(2px)}
  24%{opacity:.25;transform:translateY(12px) scale(.84,.7);filter:blur(8px)}
  70%{opacity:.28;transform:translateY(10px) scale(.86,.72);filter:blur(8px)}
  88%{opacity:.75;transform:scale(1.04);filter:blur(1px)}
  100%{opacity:.6;transform:scale(1);filter:blur(2px)}
}
.sm-tarot .tc.is-turning .face{box-shadow:0 26px 40px rgba(0,0,0,.55),0 0 0 1px var(--ap-rule)!important}
.sm-tarot .is-arriving{animation:sm-arrive .7s cubic-bezier(.3,.6,.3,1) both}
@keyframes sm-arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

.sm-tarot .tarot-row{justify-content:center}
.sm-tarot .tarot-row[hidden]{display:none}
body.sm-skin .sm-s.sm-daily .sm-tarot .tarot-more{text-align:center;margin:22px auto 0;max-width:none}

/* ---------- guest: the last few pulls ---------- */
.sm-tarot .tarot-recent,.sm-journal .tarot-recent{margin:30px auto 0;padding:20px 0 0;border-top:1px solid var(--ap-line)}
.tarot-recent .sec{font:500 13px/1.3 "Archivo Narrow",sans-serif;letter-spacing:.18em;text-transform:uppercase;color:var(--ap-mute);margin:0 0 12px}
.tarot-recent ul{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-wrap:wrap;gap:12px 22px}
.tarot-recent li{display:flex;gap:10px;align-items:center;margin:0}
.tarot-recent img{width:40px;height:67px;object-fit:cover;border:1px solid var(--ap-line2);flex:none}
.tarot-recent b{display:block;font:500 17px/1.15 "Cormorant Garamond",Georgia,serif;letter-spacing:.06em;text-transform:uppercase;color:var(--ap-head)}
.tarot-recent i{display:block;font:500 12px/1.3 "Archivo Narrow",sans-serif;font-style:normal;letter-spacing:.14em;text-transform:uppercase;color:var(--ap-mute)}

/* ---------- hidden mark: the small star ---------- */
.sm-daily .sm-star{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;margin:-6px 0 -8px 4px;vertical-align:middle;color:var(--ap-line2);transition:color .4s}
.sm-daily .sm-star:hover,.sm-daily .sm-star:focus-visible{color:var(--ap-soft)}
.sm-daily .sm-star svg{width:11px;height:11px}

/* ---------- the three-card spread ---------- */
.sm-tarot .spread{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,3vw,34px);max-width:42rem;margin:14px auto 30px}
.sm-tarot .spread .scene{width:100%;perspective:900px}
.sm-tarot .spread .tc[aria-disabled=true]{cursor:default}
.sm-tarot .spread .tc[aria-disabled=true] .back{opacity:.55}
.sm-tarot .spread .tc:not(.flip):not([aria-disabled=true]) .back{box-shadow:inset 0 0 0 8px #0A0A09,inset 0 0 0 9px #8A8172,0 0 0 1px var(--ap-rule)!important}
body.sm-skin .sm-s.sm-daily .spread .back .hint{font-family:"Cormorant Garamond",Georgia,serif!important;font-size:22px!important;letter-spacing:.12em!important;bottom:10px}
.sm-tarot .spread .back .moon{width:42%}
.sm-tarot .slot .pos{margin:20px 0 0;padding:0;text-align:center;font:500 13px/1.3 "Archivo Narrow",sans-serif;letter-spacing:.18em;text-transform:uppercase;color:var(--ap-mute);max-width:none}
.sm-tarot .readings{display:grid;gap:0;max-width:34rem;margin:0 auto}
.sm-tarot .readings .reading{padding:26px 0 8px;border-top:1px solid var(--ap-line)}
.sm-tarot .readings .reading:first-child{border-top:0;padding-top:4px}
@media (max-width:480px){
  .sm-tarot .spread{gap:10px}
  body.sm-skin .sm-s.sm-daily .spread .back .hint{font-size:17px!important;bottom:6px}
  .sm-tarot .slot .pos{font-size:11px!important;letter-spacing:.1em}
  .sm-tarot .spread .shadow{bottom:-10px;height:18px}
}

/* ---------- the reading journal ---------- */
.sm-journal .jr-months{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:28px 0 8px;padding:12px 0;border-top:1px solid var(--ap-line2);border-bottom:1px solid var(--ap-line)}
.sm-journal .jr-months h2{margin:0;padding:0;text-align:center;font-size:clamp(1.4rem,4vw,1.9rem)!important}
.sm-journal .jr-months a{font:500 12.5px/1 "Archivo Narrow",sans-serif;letter-spacing:.18em;text-transform:uppercase;color:var(--ap-ink);text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.sm-journal .jr-months a[rel=prev]:before{content:"\2190\00a0"}
.sm-journal .jr-months a[rel=next]{justify-self:end}
.sm-journal .jr-months a[rel=next]:after{content:"\00a0\2192"}
.sm-journal .sec,.sm-journal .lab{font:500 13px/1.3 "Archivo Narrow",sans-serif!important;letter-spacing:.18em!important;text-transform:uppercase;color:var(--ap-mute)!important;margin:0 0 10px;padding:0}
.sm-journal .jr-month{margin:22px 0 10px}
.sm-journal .jr-suits{margin:0 0 14px;padding:0;display:grid;gap:8px}
.sm-journal .jr-suit{display:grid;grid-template-columns:9.5rem 1fr;gap:12px;align-items:center}
.sm-journal .jr-suit dt{font:500 13px/1.2 "Archivo Narrow",sans-serif!important;letter-spacing:.14em!important;text-transform:uppercase!important;color:var(--ap-soft)!important;margin:0}
.sm-journal .jr-suit dd{margin:0;display:flex;align-items:center;gap:10px}
.sm-journal .jr-bar{flex:1;height:8px;background:var(--ap-raise);border:1px solid var(--ap-line);position:relative}
.sm-journal .jr-bar i{position:absolute;left:0;top:0;bottom:0;background:var(--ac,var(--ria-gold));min-width:0}
.sm-journal .jr-suit b{font:600 14px/1 "Archivo Narrow",sans-serif;color:var(--ap-ink);min-width:1.6em;text-align:right}
.sm-journal .jr-suit[data-s=Major]{--ac:var(--ria-gold,#C89A3D)}
.sm-journal .jr-suit[data-s=wands]{--ac:var(--ria-ember,#E86A22)}
.sm-journal .jr-suit[data-s=cups]{--ac:var(--ria-aqua,#57C7D4)}
.sm-journal .jr-suit[data-s=swords]{--ac:var(--ria-bone,#F1ECE2)}
.sm-journal .jr-suit[data-s=pents]{--ac:var(--ria-sage,#A5A979)}
html.sm-day .sm-journal .jr-suit[data-s=swords]{--ac:var(--ria-bronze,#5C5745)}
.sm-journal .jr-suit.is-top dt{color:var(--ap-ink)!important}
body.sm-skin .sm-s.sm-journal .jr-sum{font-size:19px!important;margin:6px 0 10px}
.sm-journal .jr-majors{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:baseline;margin:0;padding:0;max-width:none}
.sm-journal .jr-majors .lab{margin:0 6px 0 0;flex-basis:100%}
.sm-journal .jr-major{font:500 17px/1.3 "Cormorant Garamond",Georgia,serif;letter-spacing:.06em;text-transform:uppercase;color:var(--ap-head);padding:2px 10px;border:1px solid var(--ap-line2)}
.sm-journal .jr-major i{font-style:normal;color:var(--ap-mute);font-size:14px}
.sm-journal .jr-day{margin:30px 0 0;padding:22px 0 0;border-top:1px solid var(--ap-line2);position:relative}
.sm-journal .jr-day:before{content:"";position:absolute;left:0;right:0;top:2px;border-top:1px solid var(--ap-line)}
.sm-journal .jr-day h3{margin:0 0 14px!important;padding:0;font-size:clamp(1.25rem,3.6vw,1.6rem)!important}
.sm-journal .jr-three{margin-top:18px}
.sm-journal .jr-pull{display:grid;grid-template-columns:80px 1fr;gap:18px;align-items:start;margin:0 0 18px}
.sm-journal .jr-pull img{width:80px;height:133px;object-fit:cover;border:1px solid var(--ap-line2);display:block}
.sm-journal .jr-pull p{margin:0;padding:0;max-width:none}
.sm-journal .jr-pull .lab{margin-bottom:4px}
.sm-journal .jr-name{font:500 22px/1.1 "Cormorant Garamond",Georgia,serif;letter-spacing:.07em;text-transform:uppercase;color:var(--ap-head)}
body.sm-skin .sm-s.sm-journal .jr-pull .kw{font:500 13px/1.4 "Archivo Narrow",sans-serif!important;letter-spacing:.12em;text-transform:uppercase;color:var(--ap-mute)!important;margin:4px 0 8px}
body.sm-skin .sm-s.sm-journal .jr-msg{font:18px/1.5 "IM Fell English",Georgia,serif!important;color:var(--ap-soft)}
.sm-journal .jr-note{margin:12px 0 0}
.sm-journal .jr-note label{display:block;font:500 12px/1.3 "Archivo Narrow",sans-serif;letter-spacing:.18em;text-transform:uppercase;color:var(--ap-mute);margin:0 0 6px}
.sm-journal .jr-note textarea{display:block;width:100%;box-sizing:border-box;min-height:64px;padding:10px 12px;background:var(--ap-field);color:var(--ap-ink);border:1px solid var(--ap-line2);border-radius:0;font:18px/1.45 "IM Fell English",Georgia,serif;resize:vertical}
.sm-journal .jr-note textarea::placeholder{color:var(--ap-mute);opacity:.8}
.sm-journal .jr-note textarea:focus-visible{outline:3px solid var(--ria-aqua,#57C7D4);outline-offset:2px}
.sm-journal .jr-save{display:flex;align-items:center;gap:14px;margin-top:8px}
body.sm-skin .sm-s.sm-journal .jr-save .btn{min-height:40px;padding:8px 16px!important;font-size:12.5px!important}
.sm-journal .jr-saved{font:500 12px/1 "Archivo Narrow",sans-serif;letter-spacing:.18em;text-transform:uppercase;color:var(--ap-soft)}
.sm-journal .row{margin-top:30px}
@media (max-width:480px){
  .sm-journal .jr-suit{grid-template-columns:7.2rem 1fr;gap:8px}
  .sm-journal .jr-pull{grid-template-columns:60px 1fr;gap:14px}
  .sm-journal .jr-pull img{width:60px;height:100px}
}

/* the live skin dresses every button in a section; hidden marks stay bare */
body .sm-s[class*=" sm-"] button.sm-mark{background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;letter-spacing:0}
body.sm-skin .sm-s[class*=" sm-"] .tarot-recent p.sec{font:500 13px/1.3 "Archivo Narrow",sans-serif!important;letter-spacing:.18em!important;text-transform:uppercase!important;color:var(--ap-mute)!important;margin:0 0 12px!important}
body.sm-skin .sm-s[class*=" sm-"] .jr-note label{font:500 12px/1.3 "Archivo Narrow",sans-serif!important;letter-spacing:.18em!important;text-transform:uppercase!important;color:var(--ap-mute)!important;margin:0 0 6px!important}
