/* Enchanted Grimoire: a parchment-and-ink storefront layer. */
:root {
  --grimoire-ink: #100d1b;
  --grimoire-ink-2: #1b1530;
  --grimoire-paper: #f6efdf;
  --grimoire-paper-soft: #e9dcc3;
  --grimoire-gold: #d8ad61;
  --grimoire-violet: #a78bfa;
  --grimoire-mint: #8ed8ba;
  --grimoire-shadow: 0 22px 60px rgba(5, 3, 14, .34);
}

body.theme-enchanted-grimoire {
  color: var(--grimoire-paper);
  background: radial-gradient(circle at 12% 0%, #2b1d4c 0, transparent 34rem), var(--grimoire-ink);
  background-attachment: fixed;
}
.theme-enchanted-grimoire #navbar { background: rgba(16,13,27,.78); border-bottom: 1px solid rgba(216,173,97,.25); backdrop-filter: blur(18px); }
.theme-enchanted-grimoire #navbar.scrolled { box-shadow: 0 12px 40px rgba(0,0,0,.28); }
.theme-enchanted-grimoire .nav-logo, .theme-enchanted-grimoire .footer-logo { color: var(--grimoire-gold); letter-spacing: .04em; }
.theme-enchanted-grimoire .nav-link:hover, .theme-enchanted-grimoire .nav-link.active { color: var(--grimoire-gold); }
.theme-enchanted-grimoire .hero { min-height: min(850px, 92vh); background: linear-gradient(135deg, rgba(16,13,27,.92), rgba(35,22,65,.72)); overflow: hidden; }
.theme-enchanted-grimoire .grimoire-stage { width: min(100%, 580px); height: 580px; position: relative; perspective: 1000px; }
.theme-enchanted-grimoire .grimoire-stage:after { content:''; position:absolute; inset:8%; z-index:0; border-radius:50%; background-image:linear-gradient(rgba(16,13,27,.25),rgba(16,13,27,.58)),var(--scene-artwork,none); background-position:center; background-size:cover; box-shadow:0 0 70px color-mix(in srgb,var(--scene-accent,#d8ad61) 28%,transparent); opacity:.72; pointer-events:none; transition:background-image .35s,box-shadow .35s; }
.theme-enchanted-grimoire .astral-deck { position:absolute; inset:0; display:grid; place-items:center; z-index:2; }
.theme-enchanted-grimoire .scene-product-deck { opacity:0; visibility:hidden; transform:translateY(-2.5rem) scale(.92); transition:opacity .35s ease,transform .45s ease,visibility .35s; pointer-events:none; }
.theme-enchanted-grimoire .scene-product-deck.is-active { opacity:1; visibility:visible; transform:translateY(-2.5rem) scale(1); pointer-events:auto; }
.theme-enchanted-grimoire .scene-empty-state { position:absolute; inset:auto 18% 6%; z-index:3; min-height:88px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:.35rem; padding:.75rem; text-align:center; color:var(--grimoire-paper); border:1px solid rgba(216,173,97,.35); border-radius:18px; background:linear-gradient(135deg,rgba(30,11,38,.88),rgba(16,13,27,.76)); backdrop-filter:blur(8px); }
.theme-enchanted-grimoire .scene-empty-state[hidden] { display:none; }
.theme-enchanted-grimoire .scene-empty-state span { color:var(--grimoire-gold); font-size:2rem; animation:grimoire-pulse 2s ease-in-out infinite; }
.theme-enchanted-grimoire .scene-empty-state small { color:var(--grimoire-paper-soft); }
.theme-enchanted-grimoire .astral-card { position:absolute; width:170px; height:270px; padding:12px; overflow:hidden; color:var(--grimoire-paper); border:2px solid var(--grimoire-gold); border-radius:14px; background:linear-gradient(150deg,#fbf0cf,#b88c45 40%,#241b3b 41%); box-shadow:0 24px 42px rgba(0,0,0,.48), inset 0 0 0 4px rgba(16,13,27,.7); transform:rotate(calc((var(--deck-index) - 2) * 10deg)) translateX(calc((var(--deck-index) - 2) * 70px)) translateY(calc(abs(var(--deck-index) - 2) * 12px)); transition:transform .35s ease, z-index .2s, filter .35s; }
.theme-enchanted-grimoire .astral-card:hover, .theme-enchanted-grimoire .astral-card:focus-visible { z-index:10; transform:translateY(-28px) rotate(0deg) scale(1.06); filter:brightness(1.12); }
.theme-enchanted-grimoire .astral-card img { width:100%; height:190px; object-fit:cover; border-radius:7px; display:block; position:relative; z-index:1; }
.theme-enchanted-grimoire .astral-card-frame { position:absolute; inset:7px; border:1px solid rgba(255,255,255,.62); border-radius:9px; pointer-events:none; z-index:2; }
.theme-enchanted-grimoire .astral-card-title { display:block; position:relative; z-index:3; margin-top:8px; font:600 .68rem Georgia,serif; line-height:1.2; }
.theme-enchanted-grimoire .astral-card-cta { display:block; position:relative; z-index:3; color:var(--grimoire-gold); font-size:.62rem; text-transform:uppercase; letter-spacing:.14em; margin-top:5px; }
.theme-enchanted-grimoire .grimoire-stage:before { position:absolute; inset:8%; display:grid; place-items:center; border-radius:50%; color:var(--grimoire-gold); font:700 1rem Georgia,serif; letter-spacing:.18em; opacity:0; transition:opacity .35s; pointer-events:none; }
.theme-enchanted-grimoire .stage-rituals:before { content:'RITUAL ALTAR'; opacity:.22; background:radial-gradient(circle,rgba(216,173,97,.18),transparent 65%); }
.theme-enchanted-grimoire .stage-rituals .scene-empty-state { inset:auto 20% 7%; min-height:92px; border-radius:18px; background:linear-gradient(135deg,rgba(30,11,20,.88),rgba(16,13,27,.78)); backdrop-filter:blur(8px); }
.theme-enchanted-grimoire .stage-spells:before { content:'SPELL SIGILS'; opacity:.8; background:conic-gradient(from 45deg,transparent,rgba(167,139,250,.22),transparent); }
.theme-enchanted-grimoire .stage-crystals:before { content:'CRYSTAL SANCTUARY'; opacity:.16; background:radial-gradient(circle,rgba(142,216,186,.18),transparent 68%); }
.theme-enchanted-grimoire .stage-divination:before { content:'DIVINATION SPREAD'; opacity:.8; border:1px solid rgba(216,173,97,.45); }
.theme-enchanted-grimoire .stage-library:before { content:'THE LIVING LIBRARY'; opacity:.42; border:1px solid rgba(216,173,97,.3); background:radial-gradient(circle,rgba(142,111,78,.2),transparent 68%); }
.theme-enchanted-grimoire .grimoire-stage #grimoire-canvas,.theme-enchanted-grimoire .grimoire-stage .scene-product-deck { transition:opacity .38s ease,filter .38s ease,transform .45s ease; }
.theme-enchanted-grimoire .grimoire-stage.is-transitioning #grimoire-canvas,.theme-enchanted-grimoire .grimoire-stage.is-transitioning .scene-product-deck { opacity:.08; filter:blur(8px) brightness(1.4); }
.theme-enchanted-grimoire .grimoire-stage.is-transitioning:after { opacity:1; filter:brightness(1.6); }
.theme-enchanted-grimoire .stage-tarot.is-transitioning:after { background-image:conic-gradient(from 90deg,transparent,rgba(216,173,97,.5),transparent,rgba(167,139,250,.42),transparent); }
.theme-enchanted-grimoire .stage-rituals.is-transitioning:after { background-image:radial-gradient(ellipse at 50% 80%,rgba(124,63,43,.7),transparent 62%),radial-gradient(circle,rgba(220,220,210,.25),transparent 70%); filter:blur(12px); }
.theme-enchanted-grimoire .stage-spells.is-transitioning:after { background-image:repeating-conic-gradient(from 45deg,rgba(155,120,209,.36) 0 4deg,transparent 4deg 22deg); }
.theme-enchanted-grimoire .stage-crystals.is-transitioning:after { background-image:conic-gradient(from 0deg,rgba(114,203,183,.4),rgba(216,173,97,.32),rgba(167,139,250,.42),rgba(114,203,183,.4)); clip-path:polygon(50% 0,92% 75%,50% 100%,8% 75%); }
.theme-enchanted-grimoire .stage-divination.is-transitioning:after { background-image:radial-gradient(circle,rgba(119,148,201,.48),rgba(28,20,47,.18) 45%,transparent 70%); filter:blur(9px); }
.theme-enchanted-grimoire .stage-library.is-transitioning:after { background-image:linear-gradient(105deg,transparent 20%,rgba(240,221,180,.55) 48%,transparent 72%); }
.theme-enchanted-grimoire .grimoire-stage:not(.stage-tarot) .astral-deck { transform:translateY(-2.5rem) scale(.78); filter:saturate(.75); }
.tarot-modal[hidden]{display:none}.tarot-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:1rem}.tarot-modal-backdrop{position:absolute;inset:0;background:rgba(5,3,12,.82);backdrop-filter:blur(10px)}.tarot-modal-card{position:relative;z-index:1;width:min(760px,94vw);padding:1.5rem;border:1px solid rgba(216,173,97,.55);border-radius:24px;background:#171020;box-shadow:0 30px 90px #000}.tarot-modal-close{position:absolute;right:1rem;top:1rem;width:44px;height:44px;border-radius:50%;color:#fff;border:1px solid rgba(255,255,255,.2);z-index:2}.tarot-modal-flip{display:grid;grid-template-columns:minmax(220px,.8fr) 1.2fr;gap:2rem;align-items:center;animation:card-reveal .55s ease}.tarot-modal-flip img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:16px;border:2px solid var(--grimoire-gold)}@keyframes card-reveal{from{opacity:0;transform:perspective(800px) rotateY(70deg)}to{opacity:1;transform:none}}.modal-open{overflow:hidden}
.shop-sort-form{display:flex;justify-content:flex-end;align-items:center;gap:.75rem;margin-bottom:1rem}.shop-sort-form .form-input{width:auto;min-width:190px}.shop-empty-state{padding:3rem;text-align:center}.shop-empty-state .magic-btn{margin-top:1rem}
body:not(.page-loaded) .product-card{position:relative;overflow:hidden}body:not(.page-loaded) .product-card:after{content:'';position:absolute;inset:0;background:linear-gradient(100deg,transparent,rgba(255,255,255,.08),transparent);animation:skeleton-sweep 1.2s infinite}@keyframes skeleton-sweep{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.theme-enchanted-grimoire #grimoire-canvas { position:relative; z-index:1; width:100%; height:100%; display:none; }
.theme-enchanted-grimoire .grimoire-fallback { height: 100%; }
.theme-enchanted-grimoire .hero:before { content: ''; position:absolute; inset: 8% 8% auto auto; width: 32rem; height: 32rem; border: 1px solid rgba(216,173,97,.28); border-radius: 50%; box-shadow: 0 0 0 42px rgba(216,173,97,.04), 0 0 0 84px rgba(216,173,97,.025); transform: rotate(18deg); pointer-events:none; }
.theme-enchanted-grimoire .hero-title { color: var(--grimoire-paper); font-family: Georgia, 'Times New Roman', serif; letter-spacing: -.035em; }
.theme-enchanted-grimoire .grimoire-book { max-width: 30rem; padding: 2.2rem 2.4rem; background: linear-gradient(105deg,#e9dcc3,#f8f0df 48%,#d6c4a2); color:#241a2d; border-radius: 5px 18px 18px 5px; box-shadow: 18px 22px 45px rgba(0,0,0,.35), inset -8px 0 0 rgba(75,43,38,.15); transform: perspective(900px) rotateY(7deg); }
.theme-enchanted-grimoire .hero-shell { align-items:center; }
.theme-enchanted-grimoire .hero-shell { grid-template-columns: minmax(320px, .78fr) minmax(520px, 1.22fr) !important; gap: 2rem; }
.theme-enchanted-grimoire .hero-shell { display:flex !important; flex-direction:row !important; flex-wrap:nowrap !important; align-items:center !important; }
.theme-enchanted-grimoire .hero-shell > .hero-copy { flex:0 0 38% !important; width:38% !important; }
.theme-enchanted-grimoire .hero-shell > .hero-visual { flex:1 1 62% !important; width:62% !important; min-width:0 !important; }
.theme-enchanted-grimoire .hero-shell > .hero-copy, .theme-enchanted-grimoire .hero-shell > .hero-visual { align-self:center; }
.theme-enchanted-grimoire .astral-deck { transform: translateY(-2.5rem); }
.theme-enchanted-grimoire .hero-scroll-indicator { left:40%; transform:translateX(-50%); }
.theme-enchanted-grimoire .hero-copy { grid-column:1; grid-row:1; }
.theme-enchanted-grimoire .hero-visual { grid-column:2; grid-row:1; min-height:580px; }
.theme-enchanted-grimoire .hero-copy { display:grid; align-content:center; }
.theme-enchanted-grimoire .hero-copy > .hero-eyebrow, .theme-enchanted-grimoire .hero-copy > .hero-title, .theme-enchanted-grimoire .hero-copy > .hero-sub, .theme-enchanted-grimoire .hero-copy > .btn-group, .theme-enchanted-grimoire .hero-copy > .hero-proof { display:none; }
.theme-enchanted-grimoire .grimoire-book { cursor:pointer; text-align:left; width:min(100%,390px); transition:transform .7s ease, filter .3s ease; }
.theme-enchanted-grimoire .grimoire-book:not(.is-open) { width:min(100%,350px); min-height:470px; background:linear-gradient(135deg,#281936,#6d4a50); color:#f6efdf; border:2px solid #d8ad61; border-left-width:12px; transform:perspective(900px) rotateY(-12deg) rotateZ(-2deg); display:grid; place-content:center; text-align:center; box-shadow:20px 28px 52px rgba(0,0,0,.5),inset 0 0 0 7px rgba(216,173,97,.18),inset 0 0 0 9px rgba(26,12,35,.85); }
.theme-enchanted-grimoire .grimoire-book:not(.is-open) { background-image:linear-gradient(135deg,rgba(22,12,34,.3),rgba(22,12,34,.86)), var(--cover-image, url('/images/grimoire-cover-default.png')), linear-gradient(135deg,#281936,#6d4a50); background-size:cover; background-position:center; }
.theme-enchanted-grimoire .grimoire-book:not(.is-open) > * { visibility:hidden; }
.theme-enchanted-grimoire .grimoire-book:not(.is-open) .grimoire-spread { display:none; }
.theme-enchanted-grimoire .grimoire-book:not(.is-open):before { content:attr(data-cover-title); white-space:pre-wrap; visibility:visible; font:700 clamp(1.5rem,3vw,2.35rem) Georgia,serif; letter-spacing:.12em; line-height:1.08; text-align:center; color:#f2d18a; text-shadow:0 2px 16px rgba(0,0,0,.7); }
.theme-enchanted-grimoire .grimoire-book:not(.is-open):after { content:attr(data-cover-subtitle); visibility:visible; display:block; margin-top:1rem; color:#f6efdf; font:500 .72rem Georgia,serif; letter-spacing:.2em; text-transform:uppercase; text-align:center; text-shadow:0 1px 10px rgba(0,0,0,.8); }
.theme-enchanted-grimoire .grimoire-book.is-open { cursor:default; }
.theme-enchanted-grimoire .grimoire-book.is-turning { animation:grimoire-open .9s cubic-bezier(.2,.8,.2,1); transform-origin:left center; }
@keyframes grimoire-open { 0%{transform:perspective(1000px) rotateY(-12deg)} 45%{transform:perspective(1000px) rotateY(-72deg) scale(.96)} 100%{transform:perspective(1000px) rotateY(7deg)} }
.theme-enchanted-grimoire .grimoire-stage { align-self:center; }
.theme-enchanted-grimoire .grimoire-book-mark { color:#7b5730; font-size:.68rem; letter-spacing:.22em; font-weight:700; }
.theme-enchanted-grimoire .grimoire-book h2 { margin:.7rem 0 .4rem; font:700 clamp(1.8rem,3vw,2.8rem) Georgia,serif; }
.theme-enchanted-grimoire .grimoire-book p { color:#66556a; line-height:1.6; }
.theme-enchanted-grimoire .grimoire-chapters { display:grid; gap:.25rem; margin:1.5rem 0; }
.theme-enchanted-grimoire .grimoire-chapter { display:flex; justify-content:space-between; padding:.78rem .3rem; border-bottom:1px solid rgba(74,48,47,.2); color:#3b2a43; font:600 1rem Georgia,serif; }
.theme-enchanted-grimoire .grimoire-chapter:hover, .theme-enchanted-grimoire .grimoire-chapter.active { color:#8c5b20; padding-left:.7rem; }
.theme-enchanted-grimoire .grimoire-chapter span { font: .65rem ui-monospace,monospace; opacity:.65; }
.theme-enchanted-grimoire .grimoire-page-number { color:#846d59; font: .65rem ui-monospace,monospace; letter-spacing:.12em; }
.theme-enchanted-grimoire .hero-shell > .hero-copy { flex-basis:48% !important; width:48% !important; }
.theme-enchanted-grimoire .hero-shell > .hero-visual { flex-basis:52% !important; width:52% !important; }
.theme-enchanted-grimoire .hero-scroll-indicator { left:49%; }
.theme-enchanted-grimoire .grimoire-book.is-open { width:min(100%,620px); max-width:620px; min-height:570px; padding:0; overflow:visible; border-radius:8px 18px 18px 8px; transform:perspective(1200px) rotateY(1deg); background:#eadbbd; box-shadow:0 32px 70px rgba(0,0,0,.48),9px 10px 0 #b99d73,13px 15px 0 #7b5b3c,inset 0 0 0 1px rgba(106,73,42,.22); }
.theme-enchanted-grimoire .grimoire-book.is-closing { animation:grimoire-close .72s cubic-bezier(.55,.05,.3,1); transform-origin:left center; }
@keyframes grimoire-close { 0%{transform:perspective(1100px) rotateY(1deg)} 55%{transform:perspective(1100px) rotateY(-68deg) scale(.96)} 100%{transform:perspective(1100px) rotateY(-12deg) rotateZ(-2deg);width:350px} }
.theme-enchanted-grimoire .grimoire-spread { display:grid; grid-template-columns:41% 59%; min-height:570px; border-radius:inherit; overflow:hidden; background:linear-gradient(90deg,#e2cfaa 0,#f7edda 39.5%,#bda783 40.5%,#f8efdc 42%,#ead8b6 100%); }
.theme-enchanted-grimoire .grimoire-toc { position:relative; z-index:2; padding:1.55rem 1.25rem 1.2rem; border-right:1px solid rgba(91,59,36,.25); box-shadow:inset -18px 0 28px rgba(79,49,30,.1); background-image:repeating-linear-gradient(0deg,transparent 0 27px,rgba(99,69,45,.025) 28px); }
.theme-enchanted-grimoire .grimoire-toc h2 { margin:.45rem 0 .25rem; font-size:1.65rem; }
.theme-enchanted-grimoire .grimoire-toc > p { margin:0; font-size:.78rem; line-height:1.45; }
.theme-enchanted-grimoire .grimoire-bookmark { position:absolute; z-index:5; top:calc(132px + var(--bookmark-position,0) * 43px); right:-8px; width:18px; height:58px; background:linear-gradient(90deg,#6f1632,#b63e5c); filter:drop-shadow(2px 3px 3px rgba(0,0,0,.25)); transition:top .48s cubic-bezier(.2,.8,.2,1); }
.theme-enchanted-grimoire .grimoire-bookmark:after { content:''; position:absolute; bottom:-10px; border-left:9px solid transparent; border-right:9px solid transparent; border-top:10px solid #a33451; }
.theme-enchanted-grimoire .grimoire-chapters { gap:0; margin:.9rem 0 .7rem; }
.theme-enchanted-grimoire .grimoire-chapter { width:100%; min-height:42px; align-items:center; border:0; border-bottom:1px solid rgba(74,48,47,.18); background:transparent; text-align:left; cursor:pointer; transition:color .2s,padding .2s,background .2s; }
.theme-enchanted-grimoire .grimoire-chapter-name { display:flex; align-items:center; gap:.45rem; }
.theme-enchanted-grimoire .grimoire-chapter-name i { width:1.05rem; color:#a56f2e; font-style:normal; text-align:center; }
.theme-enchanted-grimoire .grimoire-final-link { margin-top:.35rem; border-top:1px double rgba(74,48,47,.25); }
.theme-enchanted-grimoire .grimoire-page-stack { position:relative; min-width:0; overflow:hidden; background:radial-gradient(circle at 60% 25%,rgba(255,255,255,.55),transparent 38%),repeating-linear-gradient(0deg,transparent 0 29px,rgba(99,69,45,.026) 30px); box-shadow:inset 18px 0 30px rgba(67,43,25,.1); }
.theme-enchanted-grimoire .grimoire-leaf { position:absolute; inset:0; z-index:1; display:flex; flex-direction:column; justify-content:center; padding:1.75rem 1.75rem 3.1rem; opacity:0; visibility:hidden; transform:translateX(8px); color:#2b2032; background-image:linear-gradient(rgba(248,239,220,.89),rgba(234,216,182,.94)),var(--page-artwork,none); background-size:cover; background-position:center; }
.theme-enchanted-grimoire .grimoire-leaf.is-current { opacity:1; visibility:visible; transform:none; }
.theme-enchanted-grimoire .grimoire-leaf-ornament { align-self:center; display:grid; place-items:center; width:2.4rem; height:2.4rem; margin-bottom:.55rem; border:1px solid rgba(153,105,44,.45); border-radius:50%; color:#9a682d; font-size:1.2rem; }
.theme-enchanted-grimoire .grimoire-kicker { margin:0 0 .35rem !important; color:#986d3b !important; font:.65rem ui-monospace,monospace; letter-spacing:.18em; text-align:center; text-transform:uppercase; }
.theme-enchanted-grimoire .grimoire-leaf h3 { margin:0; color:#2c2033; font:700 clamp(1.55rem,2.2vw,2.25rem) Georgia,serif; line-height:1.05; text-align:center; }
.theme-enchanted-grimoire .grimoire-rule { width:5rem; height:1px; margin:1rem auto; background:linear-gradient(90deg,transparent,#a8793b,transparent); }
.theme-enchanted-grimoire .grimoire-description { margin:0 !important; color:#594b5b !important; font:1rem/1.72 Georgia,serif; text-align:left; }
.theme-enchanted-grimoire .grimoire-whisper { margin:1.15rem 0 0 !important; padding-top:.85rem; border-top:1px solid rgba(96,63,43,.15); color:#836b70 !important; font:italic .75rem/1.5 Georgia,serif; text-align:center; }
.theme-enchanted-grimoire .grimoire-keywords { display:flex; flex-wrap:wrap; justify-content:center; gap:.35rem; margin-top:.8rem; }
.theme-enchanted-grimoire .grimoire-keywords span { padding:.22rem .48rem; border:1px solid rgba(133,89,43,.24); border-radius:999px; color:#795a38; font:.58rem ui-monospace,monospace; letter-spacing:.06em; text-transform:uppercase; }
.theme-enchanted-grimoire .grimoire-product-count { margin:.55rem 0 0 !important; color:#907454 !important; font:.6rem ui-monospace,monospace; text-align:center; }
.theme-enchanted-grimoire .grimoire-page-cta { align-self:center; margin-top:.75rem; color:#6d451d; font:.62rem ui-monospace,monospace; letter-spacing:.08em; text-transform:uppercase; text-decoration:underline; text-underline-offset:4px; }
.theme-enchanted-grimoire .grimoire-turn-sheet { position:absolute; inset:0; z-index:8; visibility:hidden; transform-style:preserve-3d; backface-visibility:hidden; background:linear-gradient(90deg,#cdbb98,#f8efdc 12%,#ead8b6 100%); box-shadow:-16px 0 30px rgba(48,28,17,.22); pointer-events:none; }
.theme-enchanted-grimoire .grimoire-turn-sheet:after { content:''; position:absolute; inset:0; transform:rotateY(180deg); backface-visibility:hidden; background:linear-gradient(90deg,#ead8b6,#f8efdc 88%,#cdbb98); }
.theme-enchanted-grimoire .grimoire-turn-sheet.turn-forward { visibility:visible; transform-origin:left center; animation:grimoire-page-forward .62s cubic-bezier(.55,.04,.35,1); }
.theme-enchanted-grimoire .grimoire-turn-sheet.turn-back { visibility:visible; transform-origin:right center; animation:grimoire-page-back .62s cubic-bezier(.55,.04,.35,1); }
@keyframes grimoire-page-forward { 0%{transform:perspective(1100px) rotateY(0)} 50%{box-shadow:-28px 4px 35px rgba(38,21,12,.35)} 100%{transform:perspective(1100px) rotateY(-180deg)} }
@keyframes grimoire-page-back { 0%{transform:perspective(1100px) rotateY(0)} 50%{box-shadow:28px 4px 35px rgba(38,21,12,.35)} 100%{transform:perspective(1100px) rotateY(180deg)} }
.theme-enchanted-grimoire .grimoire-page-controls { position:absolute; left:1.1rem; right:1.1rem; bottom:.65rem; z-index:10; display:flex; justify-content:space-between; align-items:center; gap:.35rem; color:#806c5b; font:.65rem ui-monospace,monospace; }
.theme-enchanted-grimoire .grimoire-page-controls button { display:grid; place-items:center; width:38px; height:38px; border:1px solid rgba(107,70,38,.28); border-radius:50%; color:#684521; background:rgba(255,252,239,.46); cursor:pointer; }
.theme-enchanted-grimoire .grimoire-page-controls button:disabled { opacity:.28; cursor:default; }
.theme-enchanted-grimoire .grimoire-closing-page { text-align:center; background-image:linear-gradient(rgba(247,237,218,.78),rgba(234,216,182,.9)),var(--closing-artwork,none); background-size:cover; background-position:center; }
.theme-enchanted-grimoire .grimoire-closing-cta,.theme-enchanted-grimoire .grimoire-close-book { align-self:center; margin-top:.85rem; padding:.62rem .9rem; border:1px solid #9b713b; border-radius:999px; color:#5f3e1c; background:rgba(255,250,235,.52); font:.65rem ui-monospace,monospace; letter-spacing:.08em; text-transform:uppercase; }
.theme-enchanted-grimoire .grimoire-close-book { border:0; text-decoration:underline; cursor:pointer; background:transparent; }
.theme-enchanted-grimoire .stage-closing:before { content:'THE JOURNEY CONTINUES'; opacity:.55; border:1px solid rgba(216,173,97,.35); background:radial-gradient(circle,rgba(216,173,97,.15),transparent 68%); }
.theme-enchanted-grimoire .hero-title span { color: var(--grimoire-gold); text-shadow: 0 0 30px rgba(216,173,97,.2); }
.theme-enchanted-grimoire .hero-sub, .theme-enchanted-grimoire .section-sub { color: #cfc4b2; }
.theme-enchanted-grimoire .magic-btn-primary { color: var(--grimoire-ink); background: var(--grimoire-gold); box-shadow: 0 12px 28px rgba(216,173,97,.2); }
.theme-enchanted-grimoire .magic-btn-primary:hover { background: #f0c979; transform: translateY(-2px); }
.theme-enchanted-grimoire .magic-btn-outline { color: var(--grimoire-paper); border-color: rgba(216,173,97,.55); }
.theme-enchanted-grimoire .magic-btn-outline:hover { background: rgba(216,173,97,.12); border-color: var(--grimoire-gold); }
.theme-enchanted-grimoire .glass-card, .theme-enchanted-grimoire .grimoire-card { background: linear-gradient(145deg, rgba(42,31,67,.88), rgba(19,15,31,.88)); border: 1px solid rgba(216,173,97,.22); box-shadow: var(--grimoire-shadow); }
.theme-enchanted-grimoire .product-card, .theme-enchanted-grimoire .grimoire-card { transform: perspective(900px) rotateX(var(--grimoire-y, 0deg)) rotateY(var(--grimoire-x, 0deg)); transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease; }
.theme-enchanted-grimoire .product-card:hover, .theme-enchanted-grimoire .grimoire-card:hover { border-color: rgba(216,173,97,.7); box-shadow: 0 28px 70px rgba(4,2,12,.52); }
.theme-enchanted-grimoire .product-card-image { background: #241b3b; }
.theme-enchanted-grimoire .product-card-name, .theme-enchanted-grimoire .section-header h2 { font-family: Georgia, 'Times New Roman', serif; color: var(--grimoire-paper); }
.theme-enchanted-grimoire .product-price, .theme-enchanted-grimoire .text-primary { color: var(--grimoire-gold) !important; }
.theme-enchanted-grimoire .badge-new { background: var(--grimoire-gold); color: var(--grimoire-ink); }
.theme-enchanted-grimoire footer { background: #0b0912; border-top: 1px solid rgba(216,173,97,.2); }
.theme-enchanted-grimoire .form-input { color: var(--grimoire-paper); background: rgba(255,255,255,.06); border-color: rgba(216,173,97,.25); }
.theme-enchanted-grimoire :focus-visible { outline: 3px solid var(--grimoire-mint); outline-offset: 3px; }
.theme-enchanted-grimoire #magic-cursor { width:18px; height:18px; border:2px solid var(--grimoire-gold); background:rgba(216,173,97,.18); box-shadow:0 0 18px rgba(216,173,97,.8); }
.theme-enchanted-grimoire #magic-cursor:after { content:'✦'; position:absolute; left:-20px; top:-20px; color:var(--grimoire-gold); font-size:13px; text-shadow:0 0 10px var(--grimoire-gold); }
@media (max-width: 700px) {
  .theme-enchanted-grimoire .hero { min-height: 720px; }
  .theme-enchanted-grimoire .hero-shell { grid-template-columns:1fr !important; }
  .theme-enchanted-grimoire .hero-shell { display:flex !important; flex-direction:column !important; }
  .theme-enchanted-grimoire .hero-shell > .hero-copy, .theme-enchanted-grimoire .hero-shell > .hero-visual { width:100% !important; flex:1 1 auto !important; }
  .theme-enchanted-grimoire .astral-deck { transform:none; }
  .theme-enchanted-grimoire .hero-scroll-indicator { left:50%; }
  .theme-enchanted-grimoire .hero-copy, .theme-enchanted-grimoire .hero-visual { grid-column:1; grid-row:auto; }
  .theme-enchanted-grimoire .hero:before { width: 18rem; height: 18rem; right: -5rem; top: 12rem; }
  .theme-enchanted-grimoire .product-card { transform: none; }
  .theme-enchanted-grimoire .grimoire-stage { height: 390px; }
  .theme-enchanted-grimoire .grimoire-book { transform:none; padding:1.5rem; }
  .theme-enchanted-grimoire .grimoire-book.is-open { width:100%; min-height:430px; padding:0; }
  .theme-enchanted-grimoire .grimoire-spread { grid-template-columns:39% 61%; min-height:430px; }
  .theme-enchanted-grimoire .grimoire-toc { padding:1rem .7rem; }
  .theme-enchanted-grimoire .grimoire-toc h2 { font-size:1.2rem; }
  .theme-enchanted-grimoire .grimoire-toc > p { display:none; }
  .theme-enchanted-grimoire .grimoire-chapter { min-height:38px; padding:.55rem .15rem; font-size:.76rem; }
  .theme-enchanted-grimoire .grimoire-chapter:hover,.theme-enchanted-grimoire .grimoire-chapter.active { padding-left:.35rem; }
  .theme-enchanted-grimoire .grimoire-chapter-name { gap:.2rem; }
  .theme-enchanted-grimoire .grimoire-leaf { padding:1.4rem 1rem 3rem; }
  .theme-enchanted-grimoire .grimoire-leaf h3 { font-size:1.4rem; }
  .theme-enchanted-grimoire .grimoire-description { font-size:.82rem; line-height:1.52; }
  .theme-enchanted-grimoire .grimoire-whisper { display:none; }
  .theme-enchanted-grimoire .grimoire-book:not(.is-open) { min-height:220px; }
  .theme-enchanted-grimoire .astral-card { width:120px; height:190px; padding:8px; }
  .theme-enchanted-grimoire .astral-card img { height:128px; }
  .theme-enchanted-grimoire .astral-deck { transform:translateX(calc(var(--swipe-offset, 0) * 24px)); transition:transform .3s ease; touch-action:pan-y; }
  .tarot-modal-flip{grid-template-columns:1fr}.tarot-modal-flip img{max-height:45vh;width:auto;margin:auto}
}
@media (prefers-reduced-motion: reduce) {
  .theme-enchanted-grimoire .product-card, .theme-enchanted-grimoire .grimoire-card { transition: none; transform: none; }
}
