/* English unified flow inside the existing WordPress reading dialog. */
#ritual-dialog{position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;padding:0;border:0;border-radius:0;overscroll-behavior:contain}
#ritual-dialog #cat-tarot-ritual{max-width:none;min-height:100dvh;padding-top:52px}
#cat-tarot-ritual .rt-header,#cat-tarot-ritual .rt-header-actions{display:contents}
#cat-tarot-ritual .rt-header .rt-brand,#cat-tarot-ritual .rt-header [data-action=motion],#cat-tarot-ritual .rt-moonband{display:none}
#cat-tarot-ritual .rt-close-reading{position:fixed;top:max(10px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:120;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:11px;border:1px solid #c9b78d50;border-radius:50%;background:#211d2bf2;color:#e9dcc6;box-shadow:none;transition:background .2s,border-color .2s,transform .2s}
#cat-tarot-ritual .rt-close-reading svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
#cat-tarot-ritual .rt-close-reading:hover{background:#393044;border-color:#d5bd88;transform:rotate(90deg)}
#cat-tarot-ritual .rt-close-reading:focus-visible{outline:2px solid #ead19e;outline-offset:3px}
#cat-tarot-ritual .rt-main{max-width:1000px;margin-inline:auto}
#cat-tarot-ritual .rt-motion-controls{position:fixed;top:10px;right:68px;z-index:110}
#cat-tarot-ritual .rt-reading-preferences{text-align:center;margin-top:22px}
/* Keep motion recovery reachable after the header is hidden. */
#cat-tarot-ritual .rt-footer [data-action=motion]{display:inline-flex;align-items:center;justify-content:center;min-height:44px}
@media(prefers-reduced-motion:no-preference){
 #cat-tarot-ritual:not(.rt-paused) .rt-primary:not(:disabled){position:relative;isolation:isolate;overflow:hidden;transition:box-shadow .3s,background-color .3s,translate .3s}
 #cat-tarot-ritual:not(.rt-paused) .rt-primary:not(:disabled):after{content:'';display:block;position:absolute;inset:-100%;pointer-events:none;z-index:-1;background:linear-gradient(115deg,transparent 42%,#fff7df80 50%,transparent 58%);animation:ritual-button-light 4.8s ease-in-out infinite}
 #cat-tarot-ritual:not(.rt-paused) .rt-primary:not(:disabled):hover{box-shadow:0 0 24px #ccb99440;translate:0 -2px}
}
@keyframes ritual-button-light{0%,25%{transform:translateX(-45%)}70%,100%{transform:translateX(45%)}}
@media(prefers-reduced-motion:reduce){#cat-tarot-ritual .rt-close-reading{transition:none}#cat-tarot-ritual .rt-close-reading:hover{transform:none}}
#cat-tarot-ritual .birth-fields{padding:0;margin:0;border:0;min-width:0;text-align:left}
#cat-tarot-ritual .birth-fields legend{font-size:16px;color:#f3ebdd;margin-bottom:10px}
#cat-tarot-ritual .birth-date-parts{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:12px}
#cat-tarot-ritual .birth-date-parts label{display:flex;flex-direction:column;gap:6px;font-size:14px;color:#cbbfd2}
#cat-tarot-ritual .birth-date-parts input{min-width:0;width:100%;height:52px;box-sizing:border-box;padding:10px 12px;font-size:18px;line-height:1.3;border:1px solid #938274;border-radius:3px;background:#201c2b;color:#fff5e5;text-align:center}
#cat-tarot-ritual .birth-date-parts input:focus-visible{outline:2px solid #ead19e;outline-offset:3px}
#cat-tarot-ritual .east-birth-form{width:100%;max-width:390px;gap:18px}
#cat-tarot-ritual .east-birth-form>.rt-primary{width:100%;margin:0}
#cat-tarot-ritual .east-fine{font-size:14px;line-height:1.5}
#cat-tarot-ritual .unified-progress{font-size:12px;letter-spacing:.04em;flex-wrap:wrap;gap:12px 24px}
#cat-tarot-ritual .unified-birth-art{width:170px;height:170px}
#cat-tarot-ritual .rich-reading{max-width:760px;margin-inline:auto}
#cat-tarot-ritual .rich-reading p{font-size:17px;line-height:1.7;overflow-wrap:anywhere}
#cat-tarot-ritual .rich-reading h2{font-size:clamp(30px,4vw,44px);line-height:1.1}
#cat-tarot-ritual .rich-reading h3{font-size:27px;line-height:1.2}
#cat-tarot-ritual .rt-face-name{overflow-wrap:anywhere}
#cat-tarot-ritual .rt-result-product{overflow:visible}
#cat-tarot-ritual .rt-header-actions{flex-wrap:wrap}
@media(max-width:760px){
 #cat-tarot-ritual .rt-header{flex-wrap:wrap;gap:4px 12px}
 #cat-tarot-ritual .rt-header-actions{min-width:0;gap:0 12px}
 #cat-tarot-ritual .rt-header-actions .rt-icon-text{width:auto!important;white-space:normal;max-width:100%;overflow-wrap:anywhere}
 #cat-tarot-ritual .rt-footer>div{flex-wrap:wrap;justify-content:center}
 #ritual-dialog #cat-tarot-ritual[data-screen=reading]{padding-bottom:calc(180px + env(safe-area-inset-bottom))}
 #ritual-dialog{scroll-padding-block:130px 180px}
 /* The image provider sets auto height !important for 9:16 assets. Constrain
    the complete photo to the space above the dock, without cropping it. */
 #ritual-dialog #cat-tarot-ritual .rt-result-photo{height:clamp(200px,calc(100svh - 280px),520px)!important;max-height:none!important;aspect-ratio:auto!important;object-fit:contain!important}
 #cat-tarot-ritual .unified-birth-art{width:135px;height:135px;margin:0 auto 8px}
 #cat-tarot-ritual[data-screen=birth] .rt-main{padding-block:16px}
 #cat-tarot-ritual[data-screen=birth] .rt-lead{margin-bottom:8px}
 #cat-tarot-ritual[data-screen=birth] h1{font-size:30px;max-width:18ch;margin-inline:auto}
 #cat-tarot-ritual .unified-progress{margin-bottom:12px}
 #cat-tarot-ritual .rt-picked-slots>div{height:84px}
 #cat-tarot-ritual .rt-card-grid{width:clamp(216px,calc((100svh - 300px)*.78),320px)}
 #cat-tarot-ritual .rt-reveal-touch{width:clamp(108px,calc((100svh - 440px)*.625),180px)}
 #cat-tarot-ritual[data-screen=reading] .unified-progress{display:none}
 #cat-tarot-ritual .rich-heading{gap:14px}
 #cat-tarot-ritual .rich-reading p{font-size:16px;line-height:1.65}
 #cat-tarot-ritual .rich-reading h2{font-size:32px}
 #cat-tarot-ritual .rich-reading h3{font-size:26px}
 #cat-tarot-ritual .rt-story-cards{min-width:0;grid-template-columns:repeat(3,minmax(0,1fr))}
 #cat-tarot-ritual .rt-story-cards figure{min-width:0}
 #cat-tarot-ritual .rt-story-cards figcaption{overflow-wrap:anywhere}
}
@media(max-width:760px) and (max-height:680px){
 #cat-tarot-ritual[data-screen=draw] .rt-main{padding-top:12px}
 #cat-tarot-ritual[data-screen=draw] .unified-progress{margin-bottom:8px}
 #cat-tarot-ritual[data-screen=draw] .rt-lead{margin-bottom:8px}
 #cat-tarot-ritual[data-screen=draw] .rt-lead .rt-eyebrow{margin:0 0 6px}
 #cat-tarot-ritual[data-screen=draw] h1{font-size:28px;margin:0;line-height:1.1}
 #cat-tarot-ritual[data-screen=draw] .rt-picked-slots{margin-bottom:8px}
 #cat-tarot-ritual[data-screen=draw] .rt-picked-slots>div{height:70px;padding:4px;gap:2px}
 #cat-tarot-ritual[data-screen=draw] .rt-slot-card,#cat-tarot-ritual[data-screen=draw] .rt-picked-slots>div>.rt-slot-card{width:28px;height:44.8px}
 #cat-tarot-ritual[data-screen=draw] .rt-picked-slots p{margin:0;line-height:1.2}
 #cat-tarot-ritual[data-screen=draw] .rt-card-grid{padding-block:0;gap:8px}
 #cat-tarot-ritual[data-screen=birth] h1{font-size:27px}
 #cat-tarot-ritual[data-screen=birth] .rt-intro{font-size:15px}
 #cat-tarot-ritual .unified-birth-art{width:92px;height:92px}
 #cat-tarot-ritual .east-birth-form{gap:12px}
 #cat-tarot-ritual .birth-date-parts input{height:48px}
}
