:root{
  --paper:#f4efe6;
  --paper-2:#eee5d8;
  --ink:#352f39;
  --muted:#746a76;
  --plum:#5a465f;
  --plum-deep:#403248;
  --lav:#cfc3d6;
  --gold:#b99a65;
  --line:rgba(70,54,75,.18);
  --card:rgba(255,252,247,.72);
  --shadow:0 24px 70px rgba(57,45,61,.10);
  --radius:28px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  color:var(--ink);
  background:
    radial-gradient(circle at 18% 14%,rgba(209,193,218,.34),transparent 29%),
    radial-gradient(circle at 82% 28%,rgba(233,215,179,.30),transparent 25%),
    linear-gradient(160deg,var(--paper),#f8f4ed 55%,var(--paper-2));
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang TC","Noto Sans TC",sans-serif;
  overflow-x:hidden;
}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
.shell{width:min(1040px,calc(100% - 36px));margin-inline:auto;position:relative;z-index:2}
.ambient{position:fixed;border-radius:50%;filter:blur(80px);opacity:.2;pointer-events:none;z-index:0}
.ambient-a{width:310px;height:310px;background:#bba7c5;top:-80px;right:-70px}
.ambient-b{width:260px;height:260px;background:#d8c296;bottom:8%;left:-110px}
.topbar{height:82px;display:flex;align-items:center;justify-content:space-between}
.brand{border:0;background:none;color:var(--ink);display:flex;align-items:center;gap:10px;font-family:"Iowan Old Style",Baskerville,Georgia,serif;font-size:18px;letter-spacing:.02em;padding:0}
.brand-moon{font-size:24px;color:var(--gold)}
.view{display:none;animation:fade .45s ease both}
.view.active{display:block}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.hero{min-height:calc(100vh - 155px);padding:54px 0 70px;text-align:center;max-width:760px;margin-inline:auto}
.eyebrow,.step-label,.micro{font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:var(--gold);font-weight:700}
.moon-orbit{width:170px;height:170px;margin:34px auto 28px;position:relative;border:1px solid rgba(185,154,101,.28);border-radius:50%;animation:float 6s ease-in-out infinite}
.moon-disc{position:absolute;width:98px;height:98px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle at 35% 30%,#fffefb,#e7ddcf 55%,#cfc1c5);box-shadow:0 12px 35px rgba(74,61,80,.18),inset -10px -8px 22px rgba(82,65,89,.12)}
.orbit-dot{width:9px;height:9px;border-radius:50%;background:var(--gold);position:absolute;top:9px;left:80px;box-shadow:0 0 18px rgba(185,154,101,.75)}
@keyframes float{50%{transform:translateY(-8px)}}
h1,h2,h3{font-family:"Iowan Old Style",Baskerville,Georgia,"Times New Roman",serif;font-weight:500;margin:0}
h1{font-size:clamp(42px,7vw,72px);line-height:1.06;letter-spacing:-.035em}
h2{font-size:clamp(34px,5vw,54px);line-height:1.12;text-align:center;margin:10px 0 28px}
h3{font-size:25px;line-height:1.2}
.lede{font-size:17px;line-height:1.8;max-width:660px;margin:24px auto;color:var(--muted)}
.hero-actions,.inline-actions,.ai-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.hero-actions{margin-top:30px}
button.primary,button.secondary,button.ghost,.ai-btn{
  border-radius:999px;padding:14px 22px;border:1px solid transparent;transition:.22s ease;min-height:48px
}
.primary{background:var(--plum-deep);color:#fff;border-color:var(--plum-deep)!important;box-shadow:0 10px 28px rgba(64,50,72,.18)}
.primary:hover{transform:translateY(-1px);box-shadow:0 14px 34px rgba(64,50,72,.24)}
.secondary,.ai-btn{background:rgba(255,255,255,.54);color:var(--plum-deep);border-color:var(--line)!important;backdrop-filter:blur(12px)}
.secondary:hover,.ai-btn:hover{background:rgba(255,255,255,.78)}
.ghost{background:transparent;color:var(--muted);border-color:var(--line)!important}
.ghost:hover{color:var(--ink);background:rgba(255,255,255,.32)}
.small{padding:8px 13px!important;min-height:auto!important;font-size:13px}
.compact{padding:10px 16px!important;min-height:42px!important}
.wide{width:min(360px,100%);display:block;margin:22px auto 0}
.mini-note{font-size:12px;color:var(--muted);margin-top:24px;letter-spacing:.04em}
.panel-wrap{padding:42px 0 80px;max-width:860px;margin-inline:auto}
.step-label{text-align:center}
.card-panel{background:var(--card);border:1px solid rgba(255,255,255,.72);box-shadow:var(--shadow);border-radius:var(--radius);backdrop-filter:blur(16px);padding:28px}
.form-card{max-width:690px;margin:0 auto}
label{display:block;font-size:13px;color:var(--muted);margin-bottom:18px}
input,textarea,select{width:100%;margin-top:8px;background:rgba(255,255,255,.56);border:1px solid var(--line);border-radius:16px;color:var(--ink);padding:14px 15px;outline:none;transition:.2s}
input:focus,textarea:focus,select:focus{border-color:rgba(90,70,95,.5);box-shadow:0 0 0 4px rgba(90,70,95,.08)}
textarea{resize:vertical;line-height:1.6}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.center-note{text-align:center;color:var(--muted);margin-top:-12px}
.deck-stage{height:320px;display:grid;place-items:center;position:relative;margin:16px 0}
.deck-card{width:172px;height:272px;border-radius:18px;position:absolute;border:1px solid rgba(255,255,255,.72);box-shadow:0 26px 50px rgba(50,39,57,.18);background:
  radial-gradient(circle at 50% 42%,rgba(255,255,255,.12) 0 3%,transparent 3.5%),
  repeating-radial-gradient(circle at 50% 50%,transparent 0 10px,rgba(236,220,194,.12) 11px 12px),
  linear-gradient(145deg,#47384f,#6a526e);overflow:hidden
}
.deck-card:after{content:"☾";position:absolute;inset:15px;border:1px solid rgba(230,211,177,.5);border-radius:13px;display:grid;place-items:center;color:#e2cfa5;font-size:48px;font-family:Georgia,serif}
.back-1{transform:rotate(-7deg) translate(-14px,4px)}
.back-2{transform:rotate(5deg) translate(14px,2px)}
.back-3{animation:deckBreath 2.8s ease-in-out infinite}
@keyframes deckBreath{50%{transform:translateY(-6px) rotate(.5deg)}}
#drawView .primary{display:block;margin:0 auto}
.cards-row{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin:30px 0 34px}
.tarot-card{aspect-ratio:2/3.35;perspective:1000px;min-width:0}
.tarot-inner{height:100%;width:100%;border-radius:18px;position:relative;background:linear-gradient(160deg,#fffdf8,#ede4d6);border:1px solid rgba(86,69,91,.18);box-shadow:0 18px 40px rgba(64,50,72,.12);overflow:hidden;padding:13px;display:flex;flex-direction:column;justify-content:space-between;animation:cardRise .7s cubic-bezier(.2,.8,.2,1) both}
@keyframes cardRise{from{opacity:0;transform:translateY(25px) rotateY(9deg)}to{opacity:1;transform:none}}
.tarot-inner.reversed{transform:rotate(180deg)}
.tarot-frame{position:absolute;inset:9px;border:1px solid rgba(185,154,101,.45);border-radius:12px;pointer-events:none}
.tarot-top,.tarot-bottom{font-size:10px;letter-spacing:.10em;text-transform:uppercase;color:var(--gold);z-index:1}
.tarot-bottom{text-align:right}
.tarot-symbol{font-family:Georgia,serif;font-size:clamp(34px,5vw,60px);color:var(--plum);align-self:center;margin-top:10px;line-height:1}
.tarot-name{text-align:center;z-index:1;padding:0 4px}
.tarot-name strong{display:block;font-family:"Iowan Old Style",Baskerville,Georgia,serif;font-size:clamp(16px,2vw,22px);font-weight:500;line-height:1.05}
.tarot-name span{display:block;font-size:10px;color:var(--muted);margin-top:7px}
.prompt-panel,.import-panel{margin-top:22px}
.prompt-head{display:flex;justify-content:space-between;gap:16px;align-items:start;margin-bottom:12px}
#promptOutput{min-height:250px;background:rgba(248,245,239,.68);font-size:13px}
.ai-actions{justify-content:flex-start;margin-top:14px}
.ai-btn{font-weight:600}
.fineprint{font-size:12px;line-height:1.6;color:var(--muted)}
.status{font-size:13px;color:var(--plum);min-height:20px;margin-top:12px}
.today-card{max-width:640px;margin:0 auto 24px;background:linear-gradient(145deg,rgba(255,252,247,.88),rgba(238,229,216,.82));border:1px solid rgba(255,255,255,.82);border-radius:36px;box-shadow:var(--shadow);padding:52px 40px;text-align:center;position:relative;overflow:hidden}
.today-card:before{content:"☾";position:absolute;right:18px;top:2px;font-family:Georgia,serif;font-size:110px;color:rgba(90,70,95,.06)}
.today-date{font-size:12px;letter-spacing:.18em;color:var(--gold);text-transform:uppercase;margin-bottom:18px}
.today-quote{font-family:"Iowan Old Style",Baskerville,Georgia,serif;font-size:clamp(24px,4vw,38px);line-height:1.5}
#todayView .secondary,#historyView .secondary{display:block;margin:0 auto}
.history-list{display:grid;gap:14px;margin:20px 0 30px}
.history-item{background:var(--card);border:1px solid rgba(255,255,255,.7);border-radius:22px;padding:20px;box-shadow:0 12px 30px rgba(57,45,61,.07)}
.history-item h4{margin:0 0 8px;font-family:"Iowan Old Style",Baskerville,Georgia,serif;font-size:22px;font-weight:500}
.history-item p{margin:0;color:var(--muted);font-size:13px;line-height:1.6}
.footer{padding:18px 0 28px;text-align:center;color:var(--muted);font-size:11px;letter-spacing:.08em}
.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,18px);background:var(--plum-deep);color:#fff;border-radius:999px;padding:11px 17px;font-size:13px;opacity:0;pointer-events:none;transition:.25s;z-index:20;box-shadow:0 12px 28px rgba(40,30,45,.25)}
.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:760px){
  .shell{width:min(100% - 24px,680px)}
  .topbar{height:70px}
  .hero{padding-top:34px}
  h1{font-size:48px}
  .moon-orbit{width:140px;height:140px;margin-top:26px}
  .moon-disc{width:82px;height:82px}
  .cards-row{grid-template-columns:repeat(2,1fr);gap:12px}
  .cards-row .tarot-card:last-child:nth-child(odd){grid-column:1 / -1;width:calc(50% - 6px);justify-self:center}
  .tarot-inner{min-height:250px}
  .form-grid{grid-template-columns:1fr}
  .prompt-head{flex-direction:column}
  .prompt-head .secondary{width:100%}
  .today-card{padding:44px 24px}
  .card-panel{padding:22px}
}
@media(max-width:420px){
  h1{font-size:40px}
  h2{font-size:36px}
  .lede{font-size:15px}
  .hero-actions{flex-direction:column}
  .hero-actions button{width:100%}
  .tarot-inner{min-height:220px}
}

/* v1.1 · hands-on shuffle & draw ritual */
.deck-stage.interactive{touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab}
.deck-stage.interactive:active{cursor:grabbing}
.back-4{transform:rotate(1deg) translate(0,-2px)}
.deck-stage.shuffle-left .back-4{animation:shuffleLeft .58s cubic-bezier(.2,.8,.2,1)}
.deck-stage.shuffle-right .back-4{animation:shuffleRight .58s cubic-bezier(.2,.8,.2,1)}
.deck-stage.shuffle-left .back-2{animation:shuffleLeftSoft .58s cubic-bezier(.2,.8,.2,1)}
.deck-stage.shuffle-right .back-2{animation:shuffleRightSoft .58s cubic-bezier(.2,.8,.2,1)}
@keyframes shuffleLeft{0%{transform:translate(0,-2px) rotate(1deg)}45%{transform:translate(-128px,-12px) rotate(-12deg)}100%{transform:translate(0,-2px) rotate(1deg)}}
@keyframes shuffleRight{0%{transform:translate(0,-2px) rotate(1deg)}45%{transform:translate(128px,-12px) rotate(12deg)}100%{transform:translate(0,-2px) rotate(1deg)}}
@keyframes shuffleLeftSoft{0%,100%{transform:rotate(5deg) translate(14px,2px)}45%{transform:rotate(1deg) translate(-46px,10px)}}
@keyframes shuffleRightSoft{0%,100%{transform:rotate(5deg) translate(14px,2px)}45%{transform:rotate(9deg) translate(58px,10px)}}
.shuffle-count{text-align:center;color:var(--gold);font-size:12px;letter-spacing:.06em;margin:-8px 0 18px}
.shuffle-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}
.shuffle-actions button:disabled,.wide:disabled{opacity:.38;cursor:not-allowed;transform:none!important;box-shadow:none}
.select-wrap{max-width:1040px}
.selection-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:920px;margin:0 auto 14px;color:var(--muted);font-size:13px}
.card-spread{display:flex;gap:0;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:30px max(22px,calc((100vw - 1040px)/2)) 38px;margin:0 calc(50% - 50vw);scrollbar-width:none;-webkit-overflow-scrolling:touch}
.card-spread::-webkit-scrollbar{display:none}
.spread-card{position:relative;flex:0 0 76px;height:134px;border:0;background:none;padding:0;margin-left:-24px;scroll-snap-align:center;transition:transform .28s ease,margin .28s ease;filter:drop-shadow(0 12px 18px rgba(49,37,56,.12))}
.spread-card:first-child{margin-left:0}
.spread-card:hover{transform:translateY(-10px);z-index:4}
.spread-card.selected{transform:translateY(-24px) rotate(-1deg);margin-right:18px;z-index:7}
.spread-card-inner{position:absolute;inset:0;border-radius:11px;background:linear-gradient(145deg,#493950,#6a526e);border:1px solid rgba(255,255,255,.7);box-shadow:inset 0 0 0 5px rgba(225,203,163,.08);display:flex;align-items:center;justify-content:center;color:#dfcda8;overflow:hidden}
.spread-card-inner:before{content:"";position:absolute;inset:6px;border:1px solid rgba(226,205,166,.45);border-radius:8px;background:repeating-radial-gradient(circle at 50% 50%,transparent 0 8px,rgba(239,221,190,.07) 9px 10px)}
.spread-moon{font-family:Georgia,serif;font-size:28px;position:relative;z-index:1}
.spread-no{position:absolute;bottom:7px;right:8px;font-size:8px;letter-spacing:.08em;opacity:.55;z-index:1}
.pick-order{position:absolute;top:-9px;right:-8px;width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:var(--paper);border:1px solid rgba(185,154,101,.6);color:var(--plum-deep);font-size:11px;font-weight:700;z-index:9;box-shadow:0 6px 14px rgba(57,45,61,.14)}
.chosen-tray{display:flex;justify-content:center;gap:10px;margin:3px auto 18px;min-height:80px}
.chosen-slot{width:46px;height:70px;border:1px dashed rgba(90,70,95,.24);border-radius:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:rgba(90,70,95,.42);font-size:10px;transition:.25s}
.chosen-slot.filled{background:linear-gradient(145deg,#4a3a51,#665069);border-style:solid;border-color:rgba(226,205,166,.55);color:#e1cfa9;box-shadow:0 8px 18px rgba(57,45,61,.13)}
.chosen-slot b{font-family:Georgia,serif;font-size:18px;font-weight:400;line-height:1;margin-top:5px}
@media(max-width:760px){
  .deck-stage{height:300px}
  .spread-card{flex-basis:70px;height:124px;margin-left:-22px}
  .card-spread{padding-top:34px;padding-bottom:34px}
  .selection-meta{padding:0 4px}
}
@media(max-width:420px){
  .shuffle-actions{flex-direction:column}
  .shuffle-actions button{width:100%}
  .spread-card{flex-basis:64px;height:114px;margin-left:-21px}
  .chosen-slot{width:42px;height:64px}
}

/* v1.2 · visible hands-on shuffle ritual */
.ritual-wrap{max-width:940px}
.ritual-note{max-width:680px;margin-left:auto;margin-right:auto;line-height:1.75}
.deck-stage.interactive{
  height:390px;
  margin:8px auto 10px;
  touch-action:pan-y;
  user-select:none;
  -webkit-user-select:none;
  cursor:grab;
  overflow:visible;
  isolation:isolate;
}
.deck-stage.interactive:active{cursor:grabbing}
.visual-deck{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  z-index:3;
  pointer-events:none;
}
.shuffle-card{
  position:absolute;
  width:178px;
  height:284px;
  border-radius:19px;
  border:1px solid rgba(255,255,255,.78);
  background:
    radial-gradient(circle at 50% 42%,rgba(255,255,255,.12) 0 3%,transparent 3.5%),
    repeating-radial-gradient(circle at 50% 50%,transparent 0 10px,rgba(236,220,194,.12) 11px 12px),
    linear-gradient(145deg,#44364c,#6d5571);
  box-shadow:0 20px 42px rgba(50,39,57,.12);
  will-change:transform;
  backface-visibility:hidden;
  transform-origin:50% 82%;
}
.shuffle-card-frame{
  position:absolute;
  inset:14px;
  border:1px solid rgba(230,211,177,.48);
  border-radius:13px;
}
.shuffle-card-frame:before,
.shuffle-card-frame:after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  border:1px solid rgba(226,205,166,.22);
  border-radius:50%;
  transform:translate(-50%,-50%);
}
.shuffle-card-frame:before{width:74px;height:74px}
.shuffle-card-frame:after{width:104px;height:104px}
.shuffle-card-moon{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:#e2cfa5;
  font-family:Georgia,serif;
  font-size:50px;
  text-shadow:0 2px 14px rgba(226,207,165,.16);
}
.shuffle-aura{
  position:absolute;
  left:50%;
  top:50%;
  width:255px;
  height:255px;
  border-radius:50%;
  transform:translate(-50%,-48%) scale(calc(.96 + var(--drag-progress,0)*.08));
  background:radial-gradient(circle,rgba(209,193,218,.30),rgba(209,193,218,.06) 50%,transparent 72%);
  filter:blur(7px);
  opacity:calc(.55 + var(--drag-progress,0)*.4);
  transition:opacity .18s ease;
  z-index:1;
  pointer-events:none;
}
.drag-guide{
  position:absolute;
  left:50%;
  bottom:4px;
  transform:translateX(-50%);
  width:min(330px,88%);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:13px;
  color:var(--muted);
  font-size:12px;
  letter-spacing:.05em;
  opacity:.82;
  z-index:5;
  pointer-events:none;
  transition:opacity .2s ease,transform .2s ease;
}
.drag-guide span{color:var(--gold);font-size:18px;font-family:Georgia,serif}
.drag-guide b{font-weight:500}
.deck-stage.dragging .drag-guide,
.deck-stage.shuffling .drag-guide{opacity:.2;transform:translateX(-50%) translateY(4px)}
.deck-stage.shuffling .shuffle-aura{animation:auraPulse .82s ease-in-out}
@keyframes auraPulse{
  0%,100%{opacity:.55;transform:translate(-50%,-48%) scale(.96)}
  45%{opacity:1;transform:translate(-50%,-48%) scale(1.12)}
}
.shuffle-count{margin:0 0 10px;font-size:12px;min-height:20px}
.shuffle-dots{height:13px;display:flex;justify-content:center;align-items:center;gap:6px;margin:0 0 18px}
.shuffle-dot{width:5px;height:5px;border-radius:50%;background:var(--gold);box-shadow:0 0 9px rgba(185,154,101,.25);animation:dotIn .28s ease both}
@keyframes dotIn{from{opacity:0;transform:scale(.4)}to{opacity:.85;transform:scale(1)}}
.ritual-actions{display:flex;justify-content:center}
.ritual-actions .primary{min-width:min(360px,100%);margin:0}
.ritual-fineprint{text-align:center;margin:13px auto 0;max-width:520px}

/* The 78-card row now visibly unfolds when the spread opens. */
.spread-card{animation:spreadIn .48s cubic-bezier(.2,.75,.2,1) both;animation-delay:min(calc(var(--spread-i) * 7ms),420ms)}
@keyframes spreadIn{
  from{opacity:0;transform:translateX(-28px) translateY(18px) rotate(-4deg)}
  to{opacity:1;transform:none}
}
.spread-card.selected{animation:none}

@media(max-width:760px){
  .deck-stage.interactive{height:365px}
  .shuffle-card{width:164px;height:262px;border-radius:17px}
  .shuffle-card-frame{inset:13px}
  .shuffle-card-moon{font-size:46px}
}
@media(max-width:420px){
  .deck-stage.interactive{height:350px}
  .shuffle-card{width:154px;height:246px}
  .drag-guide{bottom:2px;font-size:11px;gap:9px}
  .ritual-actions .primary{width:100%}
}

@media(prefers-reduced-motion:reduce){
  .shuffle-aura,.shuffle-dot,.spread-card{animation:none!important}
}

/* v1.3 · stronger visible shuffle + all 78 cards on one screen */
.deck-stage.interactive{
  height:430px;
}
.visual-deck{
  overflow:visible;
}
.shuffle-card{
  box-shadow:0 22px 44px rgba(50,39,57,.14);
}
.deck-stage.dragging .shuffle-card,
.deck-stage.shuffling .shuffle-card{
  box-shadow:0 28px 54px rgba(50,39,57,.18);
}
.deck-stage.shuffling .shuffle-aura{
  animation:auraPulseStrong 1.12s ease-in-out;
}
@keyframes auraPulseStrong{
  0%,100%{opacity:.55;transform:translate(-50%,-48%) scale(.96)}
  34%{opacity:1;transform:translate(-50%,-48%) scale(1.26)}
  67%{opacity:.82;transform:translate(-50%,-48%) scale(1.12)}
}

/* Compact 78-card field: 6 rows × 13 cards with intentional overlap. */
.card-spread{
  position:relative;
  display:block;
  width:min(100%,940px);
  height:clamp(400px,105vw,520px);
  margin:8px auto 16px;
  padding:0;
  overflow:visible;
  overscroll-behavior:auto;
  scroll-snap-type:none;
  border-radius:30px;
  background:
    radial-gradient(circle at 50% 44%,rgba(207,195,214,.16),transparent 56%),
    linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,0));
}
.spread-card{
  position:absolute;
  width:min(72px,14.85%);
  aspect-ratio:2/3.35;
  height:auto;
  min-width:0;
  margin:0;
  padding:0;
  border:0;
  background:none;
  filter:drop-shadow(0 8px 12px rgba(49,37,56,.10));
  transform:rotate(var(--spread-rot,0deg));
  transform-origin:50% 92%;
  transition:transform .22s ease,filter .22s ease;
  animation:spreadFieldIn .5s cubic-bezier(.2,.75,.2,1) both;
  animation-delay:min(calc(var(--spread-i) * 5ms),360ms);
  touch-action:manipulation;
}
.spread-card:first-child{margin-left:0}
.spread-card:hover{
  transform:translateY(-10px) rotate(var(--spread-rot,0deg)) scale(1.04);
  filter:drop-shadow(0 14px 18px rgba(49,37,56,.15));
}
.spread-card.selected{
  transform:translateY(-20px) rotate(var(--spread-rot,0deg)) scale(1.08);
  margin-right:0;
  filter:drop-shadow(0 18px 24px rgba(49,37,56,.23));
  animation:none;
}
.spread-card-inner{
  border-radius:10px;
  box-shadow:
    inset 0 0 0 4px rgba(225,203,163,.08),
    0 0 0 1px rgba(255,255,255,.18);
}
.spread-card-inner:before{inset:5px;border-radius:7px}
.spread-moon{font-size:clamp(17px,4.7vw,27px);opacity:.9}
.spread-no{
  top:5px;
  left:5px;
  right:auto;
  bottom:auto;
  font-size:clamp(6px,1.7vw,8px);
  line-height:1;
  opacity:.78;
  padding:2px 3px;
  border-radius:4px;
  background:rgba(54,41,61,.30);
  color:#eadcbf;
}
.pick-order{
  top:-10px;
  right:-8px;
  width:27px;
  height:27px;
  font-size:11px;
}
@keyframes spreadFieldIn{
  from{opacity:0;transform:translate(-24px,18px) rotate(-6deg) scale(.94)}
  to{opacity:1;transform:rotate(var(--spread-rot,0deg)) scale(1)}
}

@media(max-width:760px){
  .deck-stage.interactive{height:405px}
  .card-spread{
    width:100%;
    height:clamp(395px,108vw,455px);
    margin-top:4px;
  }
  .spread-card{
    width:14.9%;
  }
}
@media(max-width:420px){
  .deck-stage.interactive{height:390px}
  .shuffle-card{width:150px;height:240px}
  .card-spread{
    height:clamp(390px,108vw,425px);
    border-radius:24px;
  }
  .spread-card.selected{
    transform:translateY(-15px) rotate(var(--spread-rot,0deg)) scale(1.10);
  }
  .pick-order{width:24px;height:24px;top:-8px;right:-7px}
}

@media(prefers-reduced-motion:reduce){
  .spread-card{animation:none!important}
}


/* ===== v1.4 · Stable full-deck selection field =====
   Keep each tap target in a fixed grid cell. The card artwork may overlap,
   but its visual overflow never becomes the hit area of a neighbouring card. */
.card-spread{
  display:grid;
  grid-template-columns:repeat(13,minmax(0,1fr));
  grid-template-rows:repeat(6,minmax(0,1fr));
  gap:0;
  width:min(100%,940px);
  height:clamp(390px,52vw,500px);
  padding:28px 0;
  overflow:visible;
  isolation:isolate;
  touch-action:manipulation;
}
.spread-card{
  position:relative;
  left:auto!important;
  top:auto!important;
  width:auto;
  height:auto;
  min-width:0;
  min-height:0;
  margin:0!important;
  padding:0;
  transform:none!important;
  filter:none;
  overflow:visible;
  z-index:auto!important;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
  -webkit-user-select:none;
  animation:spreadCellIn .24s ease both;
  animation-delay:min(calc(var(--spread-i) * 2ms),140ms);
}
.spread-card-inner{
  inset:auto;
  left:50%;
  top:50%;
  width:clamp(36px,96%,70px);
  height:auto;
  aspect-ratio:2/3.35;
  transform:translate(-50%,-50%) rotate(var(--spread-rot,0deg));
  transform-origin:50% 82%;
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease,opacity .18s ease;
  pointer-events:none;
}
.spread-card.selected{
  z-index:40!important;
}
.spread-card.selected .spread-card-inner{
  transform:translate(-50%,calc(-50% - 4px)) rotate(var(--spread-rot,0deg)) scale(1.035);
  box-shadow:
    inset 0 0 0 4px rgba(225,203,163,.12),
    0 0 0 2px rgba(185,154,101,.72),
    0 11px 18px rgba(49,37,56,.18);
  filter:saturate(1.08) brightness(1.035);
}
.spread-card.selected .spread-card-inner:after{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:7px;
  border:1px solid rgba(244,225,186,.78);
  pointer-events:none;
}
.spread-card:hover{transform:none!important;filter:none!important}
.pick-order{
  top:2px;
  right:2px;
  width:24px;
  height:24px;
  z-index:80;
  pointer-events:none;
  box-shadow:0 5px 12px rgba(57,45,61,.16);
}
.spread-no,.spread-moon{pointer-events:none}
@keyframes spreadCellIn{
  from{opacity:0;transform:translateY(7px) scale(.97)}
  to{opacity:1;transform:none}
}
@media(hover:hover) and (pointer:fine){
  .spread-card:not(.selected):hover .spread-card-inner{
    transform:translate(-50%,calc(-50% - 3px)) rotate(var(--spread-rot,0deg)) scale(1.025);
    box-shadow:inset 0 0 0 4px rgba(225,203,163,.08),0 8px 16px rgba(49,37,56,.13);
  }
}
@media(max-width:620px){
  .card-spread{
    grid-template-columns:repeat(10,minmax(0,1fr));
    grid-template-rows:repeat(8,minmax(0,1fr));
    height:clamp(360px,112vw,440px);
    padding:24px 0;
  }
  .spread-card-inner{width:clamp(34px,108%,48px)}
  .pick-order{width:21px;height:21px;top:1px;right:1px;font-size:10px}
}
@media(max-width:390px){
  .card-spread{height:390px;padding:22px 0}
  .spread-card-inner{width:clamp(33px,112%,44px)}
}
@media(prefers-reduced-motion:reduce){
  .spread-card{animation:none!important}
  .spread-card-inner{transition:none!important}
}


/* v1.5 gentle arc spread override */

#cardSpread.card-spread{
  position:relative !important;
  display:block !important;
  width:min(100%, 1000px) !important;
  height:clamp(520px, 69vw, 720px) !important;
  margin:18px auto 6px !important;
  padding:14px 0 8px !important;
  overflow:visible !important;
  isolation:isolate;
}
#cardSpread .spread-card{
  position:absolute !important;
  left:calc(var(--x) * 1%) !important;
  top:calc(var(--y) * 1%) !important;
  width:44px !important;
  height:126px !important;
  transform:translate(-50%, -50%) !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  overflow:visible !important;
  z-index:auto !important;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  animation:spreadArcIn .28s ease both;
  animation-delay:min(calc(var(--spread-i) * 2ms), 140ms);
}
#cardSpread .spread-card-inner{
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  width:122px !important;
  aspect-ratio:2 / 3.35;
  border-radius:11px;
  transform:translate(-50%, -50%) rotate(var(--spread-rot,0deg)) !important;
  transform-origin:50% 88%;
  background:linear-gradient(160deg, rgba(255,251,245,.98), rgba(239,232,221,.96));
  border:1px solid rgba(86,69,91,.13);
  box-shadow:0 12px 22px rgba(57,45,61,.10), inset 0 0 0 1px rgba(255,255,255,.58);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease, opacity .18s ease;
  pointer-events:none;
}
#cardSpread .spread-card-inner::before{
  content:'';
  position:absolute;
  inset:6px;
  border:1px solid rgba(185,154,101,.28);
  border-radius:8px;
}
#cardSpread .spread-card.selected{
  z-index:90 !important;
}
#cardSpread .spread-card.selected .spread-card-inner{
  transform:translate(-50%, calc(-50% - 6px)) rotate(var(--spread-rot,0deg)) scale(1.032) !important;
  box-shadow:0 16px 26px rgba(49,37,56,.14), 0 0 0 2px rgba(185,154,101,.68), inset 0 0 0 1px rgba(255,255,255,.7);
  filter:saturate(1.05) brightness(1.03);
}
#cardSpread .spread-card.selected .spread-card-inner::after{
  content:'';
  position:absolute;
  inset:3px;
  border:1px solid rgba(244,225,186,.84);
  border-radius:9px;
}
#cardSpread .spread-moon{
  position:absolute;
  left:50%;
  top:52%;
  transform:translate(-50%, -50%);
  font-family:Georgia,serif;
  font-size:clamp(22px, 3.3vw, 30px);
  line-height:1;
  color:rgba(185,154,101,.82);
  opacity:.95;
  pointer-events:none;
}
#cardSpread .spread-no{
  position:absolute;
  top:7px;
  left:8px;
  font-size:9px;
  letter-spacing:.06em;
  line-height:1;
  opacity:.78;
  color:rgba(74,61,80,.62);
  background:rgba(255,255,255,.64);
  border:1px solid rgba(185,154,101,.16);
  border-radius:999px;
  padding:3px 5px;
  pointer-events:none;
}
#cardSpread .pick-order{
  top:-6px;
  right:-4px;
  width:24px;
  height:24px;
  z-index:120;
  box-shadow:0 6px 12px rgba(57,45,61,.16);
}
@keyframes spreadArcIn{
  from{opacity:0; transform:translate(-50%, calc(-50% + 8px)) scale(.98) !important;}
  to{opacity:1; transform:translate(-50%, -50%) scale(1) !important;}
}
@media(hover:hover) and (pointer:fine){
  #cardSpread .spread-card:not(.selected):hover .spread-card-inner{
    transform:translate(-50%, calc(-50% - 4px)) rotate(var(--spread-rot,0deg)) scale(1.022) !important;
    box-shadow:0 14px 24px rgba(49,37,56,.12), inset 0 0 0 1px rgba(255,255,255,.62);
  }
}
@media(max-width:760px){
  #cardSpread.card-spread{
    height:clamp(470px, 122vw, 620px) !important;
    width:min(100%, 760px) !important;
  }
  #cardSpread .spread-card{
    width:34px !important;
    height:104px !important;
  }
  #cardSpread .spread-card-inner{
    width:84px !important;
  }
  #cardSpread .spread-moon{font-size:22px;}
  #cardSpread .spread-no{font-size:8px; padding:2px 4px;}
  #cardSpread .pick-order{width:22px;height:22px;top:-5px;right:-5px;font-size:10px;}
}
@media(max-width:430px){
  #cardSpread.card-spread{
    height:540px !important;
  }
  #cardSpread .spread-card{
    width:29px !important;
    height:96px !important;
  }
  #cardSpread .spread-card-inner{
    width:72px !important;
  }
  #cardSpread .pick-order{width:20px;height:20px;font-size:10px;top:-4px;right:-4px;}
}
@media(prefers-reduced-motion:reduce){
  #cardSpread .spread-card{animation:none !important;}
  #cardSpread .spread-card-inner{transition:none !important;}
}


/* v1.7 — single long arc fan with horizontal browsing */

#selectView.select-wrap{max-width:1180px;}
#selectView .selection-meta{max-width:1040px;}
#fanScroller.fan-scroller{
  position:relative;
  width:100%;
  max-width:1180px;
  margin:4px auto 0;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-x;
  scrollbar-width:none;
  cursor:grab;
  border-radius:30px;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 4%,#000 96%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 4%,#000 96%,transparent 100%);
}
#fanScroller.fan-scroller:active{cursor:grabbing;}
#fanScroller.fan-scroller::-webkit-scrollbar{display:none;}
#fanScroller .card-spread{
  position:relative !important;
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  max-width:none !important;
  overflow:visible !important;
  isolation:isolate;
  touch-action:pan-x;
}
#fanScroller .spread-card{
  position:absolute !important;
  width:var(--fan-hit-w) !important;
  height:var(--fan-card-h) !important;
  min-width:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  transform:translate(-50%,-50%) !important;
  overflow:visible !important;
  cursor:pointer;
  touch-action:pan-x;
  -webkit-tap-highlight-color:transparent;
  animation:fanCardIn .34s ease both !important;
  animation-delay:min(calc(var(--spread-i) * 2ms),150ms) !important;
}
#fanScroller .spread-card-inner{
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  width:var(--fan-card-w) !important;
  height:var(--fan-card-h) !important;
  aspect-ratio:auto !important;
  transform:translate(-50%,-50%) rotate(var(--spread-rot,0deg)) !important;
  transform-origin:50% 88%;
  border-radius:12px;
  background:linear-gradient(160deg,rgba(255,252,247,.98),rgba(239,232,221,.97));
  border:1px solid rgba(86,69,91,.12);
  box-shadow:0 11px 21px rgba(57,45,61,.095),inset 0 0 0 1px rgba(255,255,255,.58);
  transition:transform .19s ease,box-shadow .19s ease,filter .19s ease;
  pointer-events:none;
}
#fanScroller .spread-card-inner::before{
  content:'';
  position:absolute;
  inset:7px;
  border:1px solid rgba(185,154,101,.31);
  border-radius:9px;
}
#fanScroller .spread-card.selected{z-index:500 !important;}
#fanScroller .spread-card.selected .spread-card-inner{
  transform:translate(-50%,calc(-50% - 14px)) rotate(var(--spread-rot,0deg)) scale(1.025) !important;
  box-shadow:0 19px 30px rgba(49,37,56,.17),0 0 0 2px rgba(185,154,101,.72),inset 0 0 0 1px rgba(255,255,255,.75);
  filter:saturate(1.05) brightness(1.025);
}
#fanScroller .spread-card.selected .spread-card-inner::after{
  content:'';
  position:absolute;
  inset:3px;
  border:1px solid rgba(244,225,186,.9);
  border-radius:10px;
}
#fanScroller .spread-moon{
  position:absolute;
  left:50%;
  top:52%;
  transform:translate(-50%,-50%);
  font-family:Georgia,serif;
  font-size:clamp(22px,3vw,32px);
  line-height:1;
  color:rgba(185,154,101,.85);
  opacity:.95;
  pointer-events:none;
}
#fanScroller .spread-no{
  position:absolute;
  top:7px;
  left:8px;
  right:auto;
  bottom:auto;
  font-size:8px;
  line-height:1;
  letter-spacing:.04em;
  color:rgba(74,61,80,.48);
  background:rgba(255,255,255,.62);
  border:1px solid rgba(185,154,101,.15);
  border-radius:999px;
  padding:3px 5px;
  opacity:.78;
  pointer-events:none;
}
#fanScroller .pick-order{
  position:absolute;
  top:-8px;
  right:-12px;
  width:25px;
  height:25px;
  z-index:900;
  pointer-events:none;
  box-shadow:0 6px 14px rgba(57,45,61,.16);
}
.fan-scroll-hint{
  text-align:center;
  color:rgba(90,70,95,.56);
  font-size:12px;
  letter-spacing:.08em;
  margin:2px auto 20px;
  user-select:none;
}
@keyframes fanCardIn{
  from{opacity:0;transform:translate(-50%,calc(-50% + 12px)) scale(.985)}
  to{opacity:1;transform:translate(-50%,-50%) scale(1)}
}
@media(hover:hover) and (pointer:fine){
  #fanScroller .spread-card:not(.selected):hover .spread-card-inner{
    transform:translate(-50%,calc(-50% - 7px)) rotate(var(--spread-rot,0deg)) scale(1.018) !important;
    box-shadow:0 15px 25px rgba(49,37,56,.13),inset 0 0 0 1px rgba(255,255,255,.65);
  }
}
@media(max-width:820px){
  #fanScroller.fan-scroller{border-radius:22px;}
  #fanScroller .spread-moon{font-size:24px;}
  #fanScroller .pick-order{width:23px;height:23px;top:-7px;right:-10px;font-size:10px;}
  .fan-scroll-hint{margin-top:0;}
}
@media(max-width:430px){
  #fanScroller .spread-no{font-size:7px;padding:2px 4px;top:6px;left:6px;}
  #fanScroller .pick-order{width:21px;height:21px;top:-5px;right:-9px;}
}
@media(prefers-reduced-motion:reduce){
  #fanScroller .spread-card{animation:none !important;}
  #fanScroller .spread-card-inner{transition:none !important;}
}


/* v1.7 geometry correction: fixed arc carousel */
#fanScroller .spread-card{
  left:var(--fan-x) !important;
  top:var(--fan-y) !important;
  z-index:var(--fan-z) !important;
}
#fanScroller .spread-card.selected{z-index:500 !important;}



/* v1.8 — compact fan spacing, larger reveal cards, tap-to-shuffle */
#drawView .deck-stage.interactive.tap-shuffle{
  touch-action:manipulation !important;
  cursor:pointer !important;
}
#drawView .deck-stage.interactive.tap-shuffle:active{cursor:pointer !important;}
#drawView .drag-guide span{font-size:14px;}
#drawView .shuffle-actions.ritual-actions{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
#drawView .shuffle-actions.ritual-actions .secondary,
#drawView .shuffle-actions.ritual-actions .primary{
  min-width:220px;
  margin:0;
}
#drawView .shuffle-card{transition:none !important;}
#drawView .deck-stage.shuffling{pointer-events:none;}

#selectView .fan-scroll-hint{
  margin:-2px auto 7px !important;
}
#selectView .chosen-tray{
  margin:0 auto 10px !important;
  min-height:72px;
}
#selectView #revealBtn{
  margin-top:10px !important;
}

#resultView.panel-wrap{
  max-width:1080px;
}
#resultView .cards-row{
  gap:18px;
  margin:26px 0 38px;
}
#resultView .tarot-symbol{
  font-size:clamp(58px,6.6vw,88px);
  margin-top:4px;
}
#resultView .tarot-name strong{
  font-size:clamp(19px,2.15vw,25px);
}
#resultView .tarot-inner{
  padding:15px;
}
@media(max-width:820px){
  #drawView .deck-stage.interactive{height:390px;}
  #drawView .shuffle-actions.ritual-actions .secondary,
  #drawView .shuffle-actions.ritual-actions .primary{min-width:190px;}
  #selectView .fan-scroll-hint{margin-top:-4px !important;}
  #resultView .tarot-symbol{font-size:clamp(54px,10vw,78px);}
}
@media(max-width:520px){
  #drawView .shuffle-actions.ritual-actions{flex-direction:column;}
  #drawView .shuffle-actions.ritual-actions .secondary,
  #drawView .shuffle-actions.ritual-actions .primary{width:100%;min-width:0;}
  #resultView .cards-row{gap:12px;}
}


/* v1.9 — tighter arc spacing and larger chosen slots */
#selectView .fan-scroll-hint{margin:-18px auto 8px !important;}
#selectView .chosen-tray{margin:-4px auto 12px !important; min-height:106px !important; gap:14px !important;}
#selectView .chosen-slot{width:62px !important; height:96px !important; border-radius:12px !important; font-size:12px !important;}
#selectView .chosen-slot b{font-size:23px !important; margin-top:7px !important;}
#selectView #revealBtn{margin-top:8px !important;}
@media(max-width:820px){
  #selectView .fan-scroll-hint{margin:-22px auto 8px !important;}
  #selectView .chosen-tray{margin:-6px auto 10px !important; min-height:98px !important; gap:12px !important;}
  #selectView .chosen-slot{width:58px !important; height:90px !important;}
  #selectView .chosen-slot b{font-size:21px !important;}
}
@media(max-width:430px){
  #selectView .fan-scroll-hint{margin:-16px auto 6px !important; font-size:11px !important;}
  #selectView .chosen-tray{margin:-4px auto 8px !important; min-height:86px !important; gap:10px !important;}
  #selectView .chosen-slot{width:52px !important; height:80px !important; font-size:11px !important;}
  #selectView .chosen-slot b{font-size:18px !important; margin-top:5px !important;}
}


/* v2.0 — compact fan layout + reliable first/last card hit area */
#fanScroller #cardSpread.card-spread{
  height:var(--fan-stage-h,310px) !important;
}
#selectView .fan-scroll-hint{
  margin:-8px auto 4px !important;
}
#selectView .chosen-tray{
  margin:0 auto 8px !important;
  min-height:112px !important;
  gap:12px !important;
}
#selectView .chosen-slot{
  width:68px !important;
  height:105px !important;
  border-radius:13px !important;
  font-size:12px !important;
}
#selectView .chosen-slot b{
  font-size:25px !important;
  margin-top:7px !important;
}
#selectView #revealBtn{
  margin-top:6px !important;
}
#fanScroller.fan-scroller{
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,.18) 0,#000 2.5%,#000 97.5%,rgba(0,0,0,.18) 100%) !important;
  mask-image:linear-gradient(90deg,rgba(0,0,0,.18) 0,#000 2.5%,#000 97.5%,rgba(0,0,0,.18) 100%) !important;
}
#fanScroller .spread-card{
  touch-action:pan-x !important;
}
@media(max-width:820px){
  #fanScroller #cardSpread.card-spread{height:var(--fan-stage-h,260px) !important;}
  #selectView .fan-scroll-hint{margin:-10px auto 4px !important;}
  #selectView .chosen-tray{min-height:102px !important;gap:11px !important;margin:0 auto 7px !important;}
  #selectView .chosen-slot{width:62px !important;height:96px !important;}
  #selectView .chosen-slot b{font-size:22px !important;}
}
@media(max-width:430px){
  #fanScroller #cardSpread.card-spread{height:var(--fan-stage-h,220px) !important;}
  #selectView .fan-scroll-hint{margin:-8px auto 3px !important;}
  #selectView .chosen-tray{min-height:88px !important;gap:9px !important;margin:0 auto 6px !important;}
  #selectView .chosen-slot{width:54px !important;height:83px !important;font-size:11px !important;}
  #selectView .chosen-slot b{font-size:19px !important;margin-top:5px !important;}
}


/* v2.3 — physical edge spacers for exact first/last-card centering */
#fanScroller .fan-track{
  position:relative;
  display:flex;
  flex-flow:row nowrap;
  align-items:flex-start;
  width:max-content;
  min-width:max-content;
  margin:0;
  padding:0;
  overflow:visible;
}
#fanScroller .fan-edge-spacer{
  display:block;
  flex:0 0 auto;
  min-width:0;
  pointer-events:none;
  opacity:0;
}
#fanScroller #cardSpread.card-spread{
  flex:0 0 auto !important;
  position:relative !important;
  overflow:visible !important;
}


/* v2.4 — Safari-safe end runway */
#fanScroller.fan-scroller{
  scroll-snap-type:none !important;
  overflow-anchor:none !important;
}
#fanScroller .fan-track,
#fanScroller #cardSpread.card-spread,
#fanScroller .fan-edge-spacer{
  scroll-snap-align:none !important;
  overflow-anchor:none !important;
}


/* v2.6 — guide page */
.top-actions{display:flex;align-items:center;gap:8px;}
.guide-wrap{max-width:980px;}
.guide-intro{
  max-width:720px;
  margin:-10px auto 30px;
  text-align:center;
  color:var(--muted);
  font-size:15px;
  line-height:1.85;
}
.guide-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin:0 0 20px;
}
.guide-card{position:relative;padding:28px 26px 25px;min-height:190px;overflow:hidden;}
.guide-card:after{
  content:'☾';
  position:absolute;
  right:15px;
  bottom:-24px;
  font-family:Georgia,serif;
  font-size:92px;
  color:rgba(90,70,95,.045);
  pointer-events:none;
}
.guide-no{font-family:Georgia,serif;font-size:12px;letter-spacing:.16em;color:var(--gold);margin-bottom:12px;}
.guide-card h3,.guide-detail h3{margin-bottom:12px;}
.guide-card p,.guide-detail p{margin:0;color:var(--muted);font-size:14px;line-height:1.8;}
.guide-detail{margin-top:16px;padding:28px;}
.guide-detail p+p{margin-top:12px;}
.mechanism-details{margin-top:18px;border-top:1px solid var(--line);padding-top:15px;}
.mechanism-details summary{cursor:pointer;color:var(--plum-deep);font-size:13px;font-weight:650;list-style:none;}
.mechanism-details summary::-webkit-details-marker{display:none;}
.mechanism-details summary:after{content:'＋';float:right;color:var(--gold);font-weight:400;}
.mechanism-details[open] summary:after{content:'－';}
.mechanism-details p{margin-top:12px;font-size:13px;}
.guide-home{display:block;margin:28px auto 0;}
@media(max-width:680px){
  .top-actions{gap:4px;}
  .top-actions .ghost.small{padding:7px 10px!important;font-size:12px;}
  .guide-grid{grid-template-columns:1fr;gap:12px;}
  .guide-card{min-height:0;padding:24px 22px;}
  .guide-detail{padding:24px 22px;}
  .guide-intro{font-size:14px;margin-bottom:24px;}
}
@media(max-width:390px){
  .brand span:last-child{font-size:16px;}
  .top-actions .ghost.small{padding:7px 8px!important;font-size:11px;}
}
\n\n/* v2.7 · Daily love-letter prompt generator */\n.love-entry{border-color:rgba(185,154,101,.35)!important;}\n.love-wrap{max-width:780px;}\n.love-intro{max-width:690px;}\n.love-form{max-width:690px;margin:0 auto;}\n.love-prompt-panel{max-width:760px;margin:24px auto 0;}\n.hidden-field{display:none;}\n.hidden-field.show{display:block;animation:fade .3s ease both;}\n#lovePromptOutput{min-height:440px;background:rgba(248,245,239,.68);font-size:13px;}\n@media(max-width:680px){\n  .love-wrap .form-grid{grid-template-columns:1fr;}\n  #lovePromptOutput{min-height:520px;}\n}\n
.prompt-count{margin-top:8px;text-align:right;font-size:.78rem;letter-spacing:.04em;opacity:.68}.prompt-count.over-limit{font-weight:700;opacity:1}


/* v2.7.3 · Love-letter import, preview & local save */
.love-return-divider{display:flex;align-items:center;justify-content:center;margin:34px auto 22px;color:rgba(137,104,128,.55);font-size:14px;}
.love-return-divider::before,.love-return-divider::after{content:"";height:1px;width:min(180px,28vw);background:linear-gradient(90deg,transparent,rgba(185,154,101,.38));margin:0 14px;}
.love-return-divider::after{background:linear-gradient(90deg,rgba(185,154,101,.38),transparent);}
.love-return-panel,.love-preview-panel{max-width:760px;margin:0 auto 24px;}
.love-return-panel h3{margin:7px 0 8px;}
.love-return-copy{margin-bottom:14px;}
#loveLettersInput{min-height:280px;background:rgba(248,245,239,.68);font-size:13px;margin-bottom:12px;}
.love-preview-count{font-size:13px;color:var(--plum);white-space:nowrap;}
.love-letters-preview{margin-top:16px;border-top:1px solid rgba(185,154,101,.22);}
.love-month-title{text-align:center;padding:18px 12px;color:var(--plum);font-family:Georgia,'Times New Roman',serif;font-size:17px;letter-spacing:.03em;}
.love-letter-row{display:grid;grid-template-columns:92px 1fr;gap:14px;padding:13px 4px;border-top:1px solid rgba(185,154,101,.14);font-size:13px;line-height:1.65;}
.love-letter-row.missing{opacity:.55;}
.love-letter-date{font-weight:600;color:var(--plum);white-space:nowrap;}
.love-letter-row.missing .love-letter-text{font-style:italic;color:var(--muted);}
.love-save-actions{margin-top:18px;}
@media(max-width:560px){.love-letter-row{grid-template-columns:1fr;gap:3px}.love-letter-date{font-size:12px}.love-preview-panel .prompt-head{align-items:flex-start;gap:8px}}

/* Dearly v2.8 brand */
.brand-logo{width:34px;height:28px;object-fit:cover;object-position:center;mix-blend-mode:multiply;opacity:.92}
.brand-name{font-family:Georgia,'Times New Roman',serif;letter-spacing:.06em}
.hero-brand-logo{display:block;width:min(430px,78vw);height:auto;margin:0 auto -10px;mix-blend-mode:multiply}
.history-section{margin:0 0 28px}
.history-section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:0 0 12px}
.history-section-head h3{margin:0;font-size:1.15rem;font-weight:500}
.history-section-head span{font-size:.78rem;letter-spacing:.12em;color:var(--muted)}
.history-love-card{position:relative;overflow:hidden}
.history-love-card::before{content:'💌';position:absolute;right:18px;top:14px;opacity:.18;font-size:2rem}
.history-love-card .history-letter-preview{margin-top:10px;padding-top:10px;border-top:1px solid rgba(184,151,90,.18);line-height:1.75;color:var(--ink)}
.history-love-card .history-letter-meta{font-size:.88rem;color:var(--muted)}
.history-empty{padding:18px 0;color:var(--muted)}
@media(max-width:640px){.hero-brand-logo{width:min(350px,88vw)}.brand-logo{width:30px;height:25px}}

/* Dearly v2.9 */
.hero h1{font-family:"Kaiti TC","BiauKai","DFKai-SB","STKaiti","Iowan Old Style",serif;font-weight:400;letter-spacing:.055em}
.today-stack{display:grid;gap:20px;max-width:680px;margin:0 auto 26px}
.today-stack .today-card{max-width:none;width:100%;margin:0;padding:38px 34px}
.today-stack .today-card:before{content:none}
.today-stack h3{margin:8px 0 12px;font-size:1.25rem}
.today-letter-meta{font-size:.82rem;color:var(--muted);margin-bottom:16px;letter-spacing:.03em}
.today-stack .today-quote{font-size:clamp(20px,3.2vw,30px);line-height:1.65}
.today-love-card{background:linear-gradient(145deg,rgba(255,251,244,.94),rgba(244,235,218,.84))}
.today-tarot-card{background:linear-gradient(145deg,rgba(255,252,247,.90),rgba(239,232,220,.84))}
.footer{line-height:1.7;text-align:center;color:var(--muted);font-size:.78rem;letter-spacing:.02em}
.footer-tagline{font-family:"Iowan Old Style",Baskerville,Georgia,serif;font-style:italic;color:rgba(105,91,79,.78)}
@media(max-width:560px){.today-stack .today-card{padding:30px 22px}}

/* v2.9.2 — borderless Dearly hero */
.hero-brand-logo{
  width:min(470px,82vw);
  margin:0 auto -18px;
  mix-blend-mode:normal;
  filter:saturate(.9) contrast(1.04);
}
.hero h1{
  font-family:"YuKyokasho","Yu Kyokasho","HanziPen TC","Hannotate TC","Kaiti TC","BiauKai","DFKai-SB",serif;
  font-weight:400;
  letter-spacing:.075em;
  line-height:1.34;
  color:#4b414a;
}
@media(max-width:640px){
  .hero-brand-logo{width:min(380px,90vw);margin-bottom:-12px}
  .hero h1{letter-spacing:.045em;line-height:1.38}
}

/* Dearly v3.0 — editorial stationery home */
body{
  background:
    radial-gradient(ellipse at 50% 18%,rgba(255,252,244,.98) 0 28%,rgba(248,239,224,.70) 58%,transparent 78%),
    radial-gradient(circle at 13% 20%,rgba(220,202,211,.20),transparent 25%),
    radial-gradient(circle at 88% 22%,rgba(231,203,153,.18),transparent 28%),
    linear-gradient(145deg,#f7f0e7,#fbf6ed 52%,#efe5d8);
}
.topbar{height:76px;z-index:8}
.brand{gap:12px}
.brand-logo{width:42px;height:36px;object-fit:contain;opacity:1;filter:sepia(.12) saturate(1.2) contrast(1.12)}
.brand-name{
  font-family:"Snell Roundhand","Apple Chancery","Segoe Script","URW Chancery L",cursive;
  font-size:25px;font-weight:500;letter-spacing:.015em;color:#8e7049;
}
.top-actions .ghost{background:rgba(255,251,244,.30);border-color:rgba(169,132,76,.24)!important;color:#756557}
.dear-hero{
  position:relative;isolation:isolate;overflow:visible;
  max-width:980px;min-height:calc(100vh - 125px);padding:22px 28px 54px;
  display:none;
}
.dear-hero.active{display:block}
.hero-inner{position:relative;z-index:3;max-width:780px;margin:0 auto}
.hero-rule{display:flex;align-items:center;justify-content:center;gap:22px;width:min(500px,78%);margin:0 auto 7px;color:#b48d54}
.hero-rule span{height:1px;flex:1;background:linear-gradient(90deg,transparent,rgba(180,141,84,.48))}
.hero-rule span:last-child{background:linear-gradient(90deg,rgba(180,141,84,.48),transparent)}
.hero-rule b{font-weight:400;font-size:13px}
.dear-hero .eyebrow{color:#a67f49;letter-spacing:.28em;font-size:11px}
.dear-hero .hero-brand-logo{width:min(470px,70vw);margin:-2px auto -26px;position:relative;z-index:2;filter:saturate(.95) contrast(1.08)}
.dear-hero h1{
  position:relative;z-index:4;margin:0 auto;
  font-family:"YuMincho","Hiragino Mincho ProN","Songti TC","STSong","Noto Serif TC",serif;
  font-size:clamp(46px,6.5vw,78px);font-weight:400;line-height:1.28;letter-spacing:.07em;
  color:#9a7445;
  text-shadow:0 1px 0 rgba(255,255,255,.5);
}
.dear-hero .lede{max-width:690px;margin:24px auto 0;font-family:"YuMincho","Hiragino Mincho ProN","Songti TC",serif;font-size:15px;line-height:1.9;color:#74695f;letter-spacing:.035em}
.dear-hero .hero-actions{margin-top:26px;gap:16px}
.dear-hero .hero-actions button{min-width:190px;padding:13px 22px;box-shadow:0 12px 30px rgba(88,64,69,.08)}
.dear-hero .hero-actions .primary{background:#49384d;border-color:#49384d!important}
.dear-hero .hero-actions .secondary{background:rgba(255,252,246,.66);border-color:rgba(175,137,82,.27)!important;color:#705d4b}
.dear-hero .hero-actions button span{margin-left:9px;color:#b28b52}
.bottom-rule{margin:30px auto 5px;width:min(430px,68%)}
.dear-hero .mini-note{margin-top:8px;color:#887a6d;letter-spacing:.08em;font-size:11px;line-height:1.8;text-wrap:balance}
.dear-orbit{position:absolute;z-index:1;pointer-events:none;border:1px solid rgba(190,145,78,.22);border-radius:50%;transform:rotate(-9deg)}
.orbit-one{width:115%;height:53%;left:-8%;top:26%}
.orbit-two{width:92%;height:39%;left:5%;top:35%;transform:rotate(12deg);border-color:rgba(190,145,78,.14)}
.dear-star{position:absolute;z-index:2;color:rgba(184,137,69,.72);font-style:normal;text-shadow:0 0 18px rgba(212,169,97,.35);pointer-events:none}
.star-a{font-size:27px;left:8%;top:34%}.star-b{font-size:38px;right:5%;top:37%}.star-c{font-size:23px;left:18%;bottom:22%}.star-d{font-size:25px;right:16%;bottom:25%}
@media(max-width:700px){
  .topbar{height:68px}.brand-logo{width:36px;height:31px}.brand-name{font-size:22px}
  .dear-hero{padding:24px 4px 44px;min-height:calc(100vh - 110px)}
  .hero-rule{width:74%;gap:13px}.dear-hero .eyebrow{font-size:9px;letter-spacing:.21em}
  .dear-hero .hero-brand-logo{width:min(390px,90vw);margin:4px auto -18px}
  .dear-hero h1{font-size:clamp(38px,11vw,58px);letter-spacing:.035em;line-height:1.32}
  .dear-hero .lede{font-size:14px;line-height:1.85;padding:0 15px;margin-top:19px}
  .dear-hero .hero-actions{flex-direction:column;align-items:center;gap:10px;margin-top:22px}
  .dear-hero .hero-actions button{width:min(330px,92%);min-width:0}
  .orbit-one{width:125%;left:-12%;top:27%;height:47%}.orbit-two{width:110%;left:-5%;top:34%;height:36%}
  .star-a{left:1%;top:34%}.star-b{right:0;top:40%}.star-c{left:4%;bottom:26%}.star-d{right:3%;bottom:28%}
  .bottom-rule{margin-top:24px}
}

/* Dearly v3.0.2 — readable, rich champagne-gold header mark.
   The large hero artwork and home-screen icon are intentionally unchanged. */
.brand{gap:9px;align-items:center;color:#8c5c2f}
.brand-logo{
  width:48px;
  height:46px;
  flex:0 0 auto;
  object-fit:contain;
  opacity:1;
  filter:none;
  mix-blend-mode:normal;
}
.brand-name{
  font-family:"Snell Roundhand","Apple Chancery","Segoe Script","URW Chancery L",cursive;
  font-size:29px;
  font-weight:600;
  letter-spacing:0;
  color:#895a30;
  text-shadow:0 1px 0 rgba(255,250,237,.55);
}
.brand:hover .brand-name{color:#774a25}
.brand:focus-visible{outline:2px solid #9e6e3b;outline-offset:5px;border-radius:6px}
@media(max-width:700px){
  .brand{gap:7px}
  .brand-logo{width:41px;height:40px}
  .brand-name{font-size:25px}
}


/* Dearly v3.0.3 — simple clickable wordmark + daily-mail greeting */
.brand {
  gap:0;
  padding:7px 4px 7px 0;
  border-radius:6px;
  -webkit-tap-highlight-color:transparent;
}
.brand-name {
  display:inline-block;
  font-family:"Snell Roundhand","Apple Chancery","Segoe Script","URW Chancery L",cursive;
  font-size:31px;
  line-height:1.1;
  font-weight:600;
  color:#895a30;
}
.brand:hover .brand-name{color:#774a25}
.brand:active .brand-name{color:#69401e}
.dear-hero .hero-en-note {
  position:relative;
  z-index:4;
  margin:12px auto 0;
  font-family:"Iowan Old Style",Baskerville,Georgia,serif;
  font-style:italic;
  font-size:clamp(14px,1.5vw,17px);
  line-height:1.5;
  font-weight:400;
  letter-spacing:.045em;
  color:#9b7853;
}
.dear-hero .lede {margin-top:22px}
@media(max-width:700px) {
  .brand-name{font-size:27px}
  .brand{padding-block:9px}
  .dear-hero .hero-en-note{font-size:14px;margin-top:12px;letter-spacing:.02em}
  .dear-hero .lede{margin-top:19px}
}


/* Dearly v3.0.5 — 佮逸體不等寬 hand-lettered vector title.
   Only the home headline uses the requested handwriting; all other text is unchanged.
   Artwork is fixed glyph outlines, so no font download or device font installation is needed. */
.dear-hero h1.handwritten-title {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  line-height: 1;
}
.dear-hero .kahik-heading {
  display: block;
  width: min(448px, 92%);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.48));
}
.visually-hidden-title {
  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;
}
@media (max-width: 700px) {
  .dear-hero .kahik-heading {
    width: min(352px, 94%);
  }
}


/* Dearly v3.0.6 — homepage description only, in Noto Serif Traditional Chinese.
   Keep the 佮逸體 SVG heading, wordmark and all other UI typography unchanged. */
.dear-hero .lede {
  font-family: "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", serif;
  font-weight: 400;
}


/* Dearly v3.0.7 — iPhone / Safari full-page horizontal alignment fix.
   The two decorative gold orbits are intentionally wider than the hero.
   When allowed to overflow, their rotated bounds enlarge the full-page
   screenshot's capture canvas, leaving a blank strip on the right.
   Clip ONLY the home hero ornaments; keep the tarot fan independently
   scrollable and preserve its last-card centering runway. */
.dear-hero {
  overflow: hidden;
  width: 100%;
  max-width: 980px;
}
@media (max-width: 700px) {
  /* The off-screen fixed glow at right:-70px also expands iOS full-page capture. */
  .ambient { display: none; }
  .dear-hero {
    max-width: 100%;
    margin-inline: auto;
  }
  .dear-hero .hero-inner {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }
  .dear-hero .hero-actions {
    max-width: 100%;
  }
}


/* Dearly v3.0.8 — do not split「心靈小語」inside the mobile intro.
   The full sentence may still wrap normally at smaller viewport widths. */
.dear-hero .lede-keep { white-space: nowrap; }


/* Dearly v3.0.10 — illustrated installation guide + daily reader preferences */
#todayView .today-handwritten-heading {
  margin: 12px auto 22px;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.today-heading-art {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: min(620px,100%);
  max-width: 100%;
}
.today-heading-art img {
  display: block;
  width: min(520px,calc(100% - 46px));
  height: auto;
  flex: 0 1 auto;
  min-width: 0;
}
.today-title-heart {font-family:Georgia,"Times New Roman",serif;font-size: clamp(22px,3.1vw,30px);font-weight:400;line-height:1;color:#b18c5e;flex:none;letter-spacing:.02em;white-space:nowrap;}
#todayView #todayDate {margin: 0 auto 22px;line-height:1.6;}
.today-filter {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  max-width:560px;
  margin:0 auto 26px;
  padding:6px;
  border:1px solid rgba(174,142,99,.22);
  border-radius:999px;
  background:rgba(255,252,247,.46);
}
.today-filter-btn {
  font-size:14px;
  font-weight:500;
  color:#75695f;
  background:transparent;
  border:1px solid transparent;
  min-height:43px;
  border-radius:999px;
  white-space:nowrap;
  padding:9px 7px;
  transition:background .18s,color .18s,box-shadow .18s;
}
.today-filter-btn:hover {color:var(--plum-deep);background:rgba(255,255,255,.55)}
.today-filter-btn.is-current {
  background:#4b3b50;
  color:#fff;
  box-shadow:0 8px 16px rgba(64,50,72,.17);
}
.today-filter-btn:focus-visible, .install-tab:focus-visible {outline:3px solid #b99a65;outline-offset:2px;}
#todayView .today-card[hidden],.install-content[hidden] {display:none!important}

.install-guide {max-width:970px;margin:16px auto 0;}
.install-tabs {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  max-width:460px;
  padding:6px;
  background:rgba(236,226,213,.58);
  border-radius:999px;
  margin:24px auto 22px;
}
.install-tab {
  min-height:44px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#796c6b;
  font-size:14px;
  font-weight:600;
  padding:8px 12px;
}
.install-tab.is-current {background:#fffdf9;color:#49384d;box-shadow:0 6px 20px rgba(64,50,72,.09)}
.install-steps {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.install-step {
  background:linear-gradient(145deg,rgba(255,253,248,.82),rgba(249,242,232,.73));
  border:1px solid rgba(193,163,121,.2);
  border-radius:22px;
  padding:14px;
  min-width:0;
}
.install-step-visual {
  background:rgba(241,232,218,.57);
  border-radius:15px;
  border:1px solid rgba(185,154,101,.13);
  height:110px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#a57e4a;
  margin-bottom:15px;
  padding:10px 12px;
  overflow:hidden;
}
.install-glyph {font-family:Georgia,serif;color:#966f44;font-size:22px;letter-spacing:.03em;}
.mini-address {
  display:block;max-width:100%;font-size:10px;
  padding:7px 10px;border-radius:999px;
  color:#715e4d;background:#fffdf7;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.install-glyph-note {font-size:11px;letter-spacing:.08em;color:#887666;}
.install-dots {font-size:56px;line-height:.9;}
.install-share-icon {height:58px;color:#ac8657;}
.install-menu-line {
  display:flex;align-items:center;justify-content:center;gap:8px;
  max-width:100%;border-radius:12px;
  background:rgba(255,254,251,.94);
  padding:11px 13px;
  font-size:14px;
  color:#6f5c4d;
  white-space:nowrap;
}
.menu-symbol {font-size:21px;line-height:1;}
.install-mini-icon {font-size:25px;line-height:1;}
.install-confirm{font-size:12px;}
.toggle-on{width:24px;height:14px;border-radius:999px;background:#b99a65;position:relative}
.toggle-on:after{content:"";position:absolute;right:2px;top:2px;width:10px;height:10px;border-radius:50%;background:white}
.install-step strong {display:block;margin:0 0 8px;color:#4c4050;font-size:14px;font-weight:600;line-height:1.5;}
.install-step strong span {margin-right:7px;color:#b18c5e;font-family:Georgia,serif;font-size:12px;}
.guide-detail .install-step p {margin:0;font-size:12px;line-height:1.8;color:#796f70;}
.install-source {display:block;text-align:center;color:#81664b;font-size:13px;margin:18px auto 3px;text-underline-offset:4px;}
.guide-detail p.install-tip {margin-top:20px;padding-top:16px;border-top:1px solid rgba(185,154,101,.23);font-size:12px;line-height:1.9;}
@media(max-width:600px){
  #todayView .today-handwritten-heading{margin:12px auto 18px;}
  .today-heading-art{gap:2px;}
  .today-heading-art img{width:calc(100% - 70px);}
  .today-title-heart{font-size:22px;}
  .today-filter{gap:3px;padding:4px;margin-bottom:23px;}
  .today-filter-btn{font-size:clamp(10px,3.1vw,13px);padding:8px 3px;min-height:42px;}
  .install-steps{grid-template-columns:1fr;}
  .install-step{padding:14px;}
  .install-step-visual{height:99px;}
  .install-tabs{margin-top:20px;}
}

/* v3.0.11 — keep multi-line AI love letters readable in preview and Today. */
.love-letter-text{white-space:pre-line;overflow-wrap:anywhere;min-width:0;}
#todayLoveQuote{white-space:pre-line;overflow-wrap:anywhere;}


/* Dearly v3.0.14 — long love letters read like letters, not centered verse.
   Preserve the centered heading, author line and tarot note. */
#todayLoveQuote:not(.is-empty){
  max-width:36rem;
  margin:18px auto 0;
  text-align:left;
  font-size:clamp(19px,2.45vw,25px);
  line-height:1.85;
  letter-spacing:.015em;
  white-space:pre-line;
  overflow-wrap:break-word;
  word-break:normal;
  line-break:strict;
}
#todayLoveQuote.is-empty{text-align:center;}
@media(max-width:560px){
  #todayLoveQuote:not(.is-empty){
    margin-top:16px;
    font-size:clamp(17px,4.45vw,19px);
    line-height:1.88;
    letter-spacing:.01em;
  }
}

/* v3.1 · Tarot Studio (independent daily/free readings) */
.free-tarot-entry{display:block;margin:17px auto 0;padding:11px 20px;color:#8e704b;background:rgba(255,250,242,.65);border:1px solid rgba(180,141,84,.3);border-radius:999px;letter-spacing:.075em;font-weight:600;min-height:42px;box-shadow:0 8px 20px rgba(75,47,50,.055)}
.free-tarot-entry span{color:#b18b54;margin-left:8px}
.free-tarot-entry:hover,.free-tarot-entry:focus-visible{background:#fff8ec;outline-color:#af895c}
.free-tarot-wrap{max-width:950px}
.free-intro{text-align:center;color:var(--muted);line-height:1.85;max-width:650px;margin:-12px auto 30px;padding-inline:12px}
.free-settings{max-width:830px;margin:0 auto}
.free-setting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px}
.free-settings label[hidden],.free-results[hidden]{display:none!important}
.free-heart-control{display:flex;align-items:center;gap:10px;margin:4px 0 14px;font-size:15px;color:var(--ink);cursor:pointer}
.free-heart-control input{width:18px;height:18px;accent-color:#75617a;margin:0;flex:none}
.free-heart-control small{color:var(--muted);font-size:12px}
.free-help{font-size:13px;color:var(--muted);line-height:1.7;margin:10px 0 20px}
.free-action-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin:20px auto 12px}
.free-action-row button{min-width:120px}
.free-action-row button:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.free-cut-active{background:#f7edda!important;border-color:#b39257!important}
.free-deck-stage{height:180px;display:grid;place-items:center;position:relative;max-width:310px;margin:4px auto 0;pointer-events:none}
.free-deck-card{position:absolute;display:grid;place-items:center;font-size:31px;color:#e8cf9c;background:linear-gradient(145deg,#4b3d55,#6e5572);border:1px solid #ecd8b7;border-radius:12px;width:105px;height:160px;box-shadow:0 9px 25px rgba(54,39,60,.2);transition:transform .38s ease}
.free-deck-card:before{content:'';border:1px solid rgba(227,196,147,.48);inset:8px;position:absolute;border-radius:7px}
.free-deck-card.b1{transform:translateX(-8px) rotate(-9deg)}
.free-deck-card.b2{transform:translateX(9px) rotate(8deg)}
.free-deck-card.b3{transform:rotate(1deg)}
.free-shuffling .b1{transform:translate(-42px,-12px) rotate(-30deg)}
.free-shuffling .b2{transform:translate(45px,12px) rotate(28deg)}
.free-shuffling .b3{transform:translateY(-25px) rotate(-8deg)}
.free-status{text-align:center;color:#7f6c63;line-height:1.6;font-size:13px;min-height:42px;margin:2px auto 15px;max-width:680px}
.free-selection-row{max-width:820px;margin:12px auto;display:flex;justify-content:space-between;gap:10px;align-items:center;color:#5c4a5c;font-size:13px;flex-wrap:wrap}
#freeSelectionCount{font-weight:700}
#freeSelectionHint{color:var(--muted)}
.free-fan-scroller{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:none;-webkit-overflow-scrolling:touch;scrollbar-width:none;overflow-anchor:none;touch-action:pan-x;position:relative;border-radius:22px;background:linear-gradient(180deg,rgba(255,252,246,.23),rgba(230,218,195,.08));border:1px solid rgba(187,155,113,.16)}
.free-fan-scroller::-webkit-scrollbar{display:none}
.free-fan-track{display:flex;align-items:stretch;min-width:100%;position:relative;overflow:hidden}
.free-fan-spacer{height:1px;flex-shrink:0}
.free-fan-spread{height:270px;position:relative;flex:none;isolation:isolate}
.free-fan-card{position:absolute;top:0;border:0;background:none;padding:0;margin:0;min-width:0;overflow:visible;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.free-fan-face{pointer-events:none;position:absolute;width:var(--fw);height:var(--fh);top:var(--fy,75px);left:50%;transform:translate(-50%,-50%) rotate(var(--fr,0deg));transform-origin:center 76%;transition:transform .2s ease,filter .2s ease;border-radius:10px;box-shadow:0 7px 17px rgba(56,41,65,.2);border:1px solid rgba(242,214,172,.8);background:linear-gradient(135deg,#463750,#75637c);color:#e9d4af;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.free-fan-face:before{content:'';position:absolute;inset:6px;border:1px solid rgba(236,216,184,.57);border-radius:6px}
.free-fan-mark{font-size:25px;line-height:1}
.free-fan-number{font-size:9px;opacity:.65;letter-spacing:.1em}
.free-fan-card.chosen .free-fan-face{transform:translate(-50%,calc(-50% - 15px)) rotate(var(--fr,0deg)) scale(1.07);outline:2px solid #caa770;outline-offset:2px;filter:brightness(1.17)}
.free-fan-card:focus-visible .free-fan-face{outline:3px solid #f0c883;outline-offset:3px}
.free-swipe-note{text-align:center;color:var(--muted);font-size:12px;margin:10px auto 16px}
.free-picked-tray{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:830px;margin:8px auto 20px}
.free-pick-slot{border:1px dashed rgba(183,149,104,.48);border-radius:12px;padding:8px 10px;min-width:96px;text-align:center;font-size:12px;color:#9a8d83;background:rgba(252,248,242,.26)}
.free-pick-slot.is-picked{background:rgba(233,213,175,.31);border-style:solid;border-color:#bea277;color:#4e3c50}
.free-results{padding-top:25px;max-width:880px;margin-inline:auto;text-align:center}
.free-results h3{margin:9px 0 24px}
.free-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:12px;text-align:center}
.free-result-card{display:flex;flex-direction:column;align-items:center;gap:9px;border-radius:17px;background:rgba(255,252,248,.73);border:1px solid rgba(185,147,102,.21);box-shadow:0 10px 23px rgba(63,47,67,.07);padding:15px 8px 14px;min-width:0}
.free-position{font-size:11px;letter-spacing:.04em;color:#a2805d;min-height:28px}
.free-result-visual{display:grid;place-items:center;width:min(100%,104px);aspect-ratio:2/3;border:2px double rgba(228,199,156,.7);border-radius:8px;font-size:35px;color:#e8d9bf;background:linear-gradient(140deg,#55445f,#8b768c);box-shadow:0 8px 15px rgba(54,42,60,.18)}
.free-result-card strong{color:#493a4e;overflow-wrap:anywhere;font-size:14px}
.free-result-card small{font-size:12px;color:#887383}
.free-copy-panel{text-align:left;max-width:790px;margin:24px auto}
.free-copy-panel textarea{font-size:14px;min-height:300px}
.free-home-btn{display:block;margin:35px auto 0}
@media(max-width:630px){
  .free-tarot-wrap{padding-top:20px}
  .free-settings{padding:20px 16px}
  .free-setting-grid{grid-template-columns:1fr}
  .free-action-row{gap:8px}
  .free-action-row button{padding:12px 15px;min-width:0}
  .free-deck-stage{height:160px}
  .free-selection-row{justify-content:center;text-align:center}
  .free-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .free-copy-panel{padding:22px 16px}
  .free-picked-tray{gap:6px}
  .free-pick-slot{min-width:0;flex:1 0 27%;font-size:11px}
}
@media(prefers-reduced-motion:reduce){.free-fan-face,.free-deck-card{transition:none}}

/* v3.1.1 — AI reading prompt + original cards copy */
.free-reading-hint{margin:0 0 16px;color:var(--muted);font-size:13px;line-height:1.8}
.free-copy-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px}
.free-copy-actions button{min-width:0;white-space:normal}
@media(max-width:560px){.free-copy-actions{flex-direction:column;align-items:stretch}.free-copy-actions button{width:100%}}


/* Dearly v3.1.3 — four homepage CTA labels match the Noto Serif TC introduction. */
.dear-hero .hero-actions button,
.dear-hero #freeTarotEntry {
  font-family: "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", serif;
  font-weight: 700;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}

/* Dearly 3.2: same stationery identity across four interface languages */
.language-picker {display:flex;align-items:center;margin:0;}
.language-picker select {appearance:auto;-webkit-appearance:auto;color:#796042;background:rgba(255,251,244,.6);border:1px solid rgba(169,132,76,.26);border-radius:999px;padding:8px 7px;font-size:12px;line-height:1.2;min-width:66px;max-width:92px;font-family:Georgia,serif;cursor:pointer;}
.multilingual-hero-heading,.multilingual-today-heading {display:none;}
html[data-lang]:not([data-lang="zh"]) .kahik-heading {display:none!important;}
html[data-lang]:not([data-lang="zh"]) .multilingual-hero-heading {display:flex;flex-direction:column;align-items:center;gap:.15em;font-family:var(--locale-display-font,Georgia,serif);font-style:normal;font-weight:500;font-size:clamp(36px,5.8vw,77px);line-height:1.35;letter-spacing:.035em;color:#9b764b;text-align:center;padding:10px 3px 4px;}
html[data-lang="en"] .multilingual-hero-heading {font-style:italic;font-size:clamp(48px,7.2vw,94px);line-height:1.03;}
html[data-lang]:not([data-lang="zh"]) #todayView .today-heading-art{display:none!important;}
html[data-lang]:not([data-lang="zh"]) #todayLocalizedHeading {display:block;font-family:var(--locale-display-font,Georgia,serif);font-weight:500;line-height:1.4;color:#957047;font-size:clamp(26px,4.4vw,49px);text-align:center;}
html[data-lang="en"] #todayLocalizedHeading {font-style:italic;}
html[data-lang="en"]{--locale-display-font:'Cormorant Garamond',Georgia,serif;--locale-body-font:'Noto Serif TC',Georgia,serif}
html[data-lang="ja"]{--locale-display-font:'Noto Serif JP','Yu Mincho',serif;--locale-body-font:'Noto Serif JP','Yu Mincho',serif}
html[data-lang="ko"]{--locale-display-font:'Gowun Batang','Noto Serif KR',serif;--locale-body-font:'Noto Serif KR','Gowun Batang',serif}
html[data-lang]:not([data-lang="zh"]) .dear-hero .lede,
html[data-lang]:not([data-lang="zh"]) .dear-hero .hero-actions button,
html[data-lang]:not([data-lang="zh"]) .free-tarot-entry {font-family:var(--locale-body-font,'Noto Serif TC',serif)!important;}
html[data-lang]:not([data-lang="zh"]) .hero-en-note {font-family:'Cormorant Garamond',Georgia,serif;}
@media(max-width:600px){
 .topbar{gap:2px}.top-actions{gap:3px}
 .language-picker select{min-width:58px;max-width:78px;font-size:11px;padding:6px 2px}
 .top-actions .ghost.small{font-size:11px;padding:6px 7px!important}
 html[data-lang]:not([data-lang="zh"]) .multilingual-hero-heading{font-size:clamp(28px,8vw,44px);overflow-wrap:anywhere}
 html[data-lang="en"] .multilingual-hero-heading{font-size:clamp(41px,10vw,57px)}
}
@media(max-width:365px){.brand-name{font-size:20px!important}.top-actions .ghost.small{padding:6px 4px!important;font-size:10px}}


/* Dearly v3.2.1 — consistent navigation control alignment in all languages. */
.topbar .top-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.topbar .language-picker {
  display: flex;
  align-items: center;
  align-self: center;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.topbar .language-picker select,
.topbar .top-actions button.ghost.small {
  box-sizing: border-box;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  border-radius: 999px;
  font-size: 12px !important;
  line-height: 1.2 !important;
  vertical-align: middle;
  white-space: nowrap;
}
.topbar .language-picker select {
  width: auto;
  min-width: 74px;
  max-width: none;
  padding: 0 9px;
  flex: none;
}
.topbar .top-actions button.ghost.small {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0 14px !important;
  flex: none;
}
@media (max-width: 600px) {
  .topbar .top-actions { gap: 5px; }
  .topbar .language-picker select,
  .topbar .top-actions button.ghost.small {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 11px !important;
  }
  .topbar .language-picker select { min-width: 60px; padding: 0 4px; }
  .topbar .top-actions button.ghost.small { padding: 0 8px !important; }
}
@media (max-width: 365px) {
  .topbar .top-actions { gap: 3px; }
  .topbar .language-picker select { min-width: 56px; padding: 0 2px; }
  .topbar .top-actions button.ghost.small { padding: 0 6px !important; font-size: 10px !important; }
}

/* Dearly v3.2.2 — English hero lettering & localized UI consistency. */
html[data-lang="en"] .dear-hero .multilingual-hero-heading {
  font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive !important;
  font-style: normal;
  font-weight: 700;
  line-height: .98;
  letter-spacing: .005em;
  font-size: clamp(66px, 9.3vw, 124px);
  gap: .025em;
  padding-block: 4px 12px;
}
@media (max-width: 600px) {
  html[data-lang="en"] .dear-hero .multilingual-hero-heading {
    font-size: clamp(50px, 12.8vw, 76px);
    line-height: 1;
  }
}

/* Dearly v3.2.3: localized month text on top of the accessible native month picker.
   The invisible native input remains the full-size interactive target. */
.localized-month-field{position:relative;display:block;width:100%;height:65px;margin-top:8px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.56);transition:border-color .2s,box-shadow .2s;overflow:hidden;}
.localized-month-field:focus-within{border-color:rgba(90,70,95,.5);box-shadow:0 0 0 4px rgba(90,70,95,.08);}
.localized-month-field input[type="month"]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:0;opacity:0;cursor:pointer;z-index:2;}
.localized-month-field input[type="month"]:focus{box-shadow:none;outline:none;}
.localized-month-display{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:0 42px;color:var(--ink);font-size:15px;text-align:center;pointer-events:none;white-space:nowrap;z-index:1;}
.localized-month-field::after{content:'▾';position:absolute;top:50%;right:20px;transform:translateY(-50%);font-size:13px;color:var(--muted);pointer-events:none;z-index:1;}

/* v3.2.7 · backup and restore */
.backup-panel{max-width:860px;margin:26px auto 36px;}
.backup-panel h3{margin:9px 0 12px;font-size:clamp(23px,3vw,29px);}
.backup-description{font-size:14px;color:var(--muted);line-height:1.85;margin:0 0 21px;}
.backup-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:16px 0;}
.backup-actions button,.backup-file-trigger{font-size:14px;min-height:46px;}
.backup-file-trigger{border-radius:999px;padding:13px 20px;cursor:pointer;display:inline-flex;justify-content:center;align-items:center;width:auto;margin:0;}
#backupImportFile{position:absolute!important;width:1px;height:1px;padding:0;margin:0;opacity:0;overflow:hidden;clip-path:inset(50%);}
#backupImportFile:focus-visible + .backup-status{outline:2px solid var(--gold);}
.backup-status{font-size:13px;color:var(--plum-deep);line-height:1.7;min-height:1px;white-space:pre-wrap;}
.backup-status.is-error{color:#a3333a;}
.backup-review{border-top:1px solid rgba(185,154,101,.22);padding-top:19px;margin-top:20px;}
.backup-review[hidden]{display:none!important;}
.backup-review h4{font-size:19px;font-weight:600;margin:0 0 10px;}
.backup-review p{line-height:1.8;}
.backup-review label:not(.backup-checkbox){margin:12px 0 4px;font-size:14px;}
.backup-review select{max-width:100%;margin:8px 0 12px;}
.backup-checkbox{display:flex;align-items:flex-start;gap:10px;margin:12px 0;color:var(--ink);font-size:14px;line-height:1.7;}
.backup-checkbox input{width:19px;height:19px;flex:0 0 19px;margin:2px 0 0;accent-color:var(--plum-deep);}
.backup-privacy{margin:16px 0 0;padding-top:12px;border-top:1px solid rgba(185,154,101,.20);}
.backup-guide-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0;}
.backup-guide-steps>div{border:1px solid rgba(185,154,101,.23);border-radius:18px;padding:17px 15px;background:rgba(255,255,255,.3);}
.backup-guide-steps strong{font-size:14px;color:var(--plum-deep);}
.backup-guide-steps p{margin-top:9px!important;}
.backup-guide p.backup-guide-warning{margin:17px 0 20px;padding:12px 15px;border-left:3px solid var(--gold);background:rgba(185,154,101,.08);}
@media(max-width:680px){.backup-guide-steps{grid-template-columns:1fr;}.backup-panel{padding:24px 20px;}.backup-actions{flex-direction:column;align-items:stretch;}.backup-actions>*{width:100%;}.backup-file-trigger{width:100%;}}
