/* GameBuro Bureau of Divination — v13 */
.tarot-page{width:min(var(--sc-width,1120px),calc(100% - 40px));margin:20px auto 58px;font-family:'Exo 2',sans-serif;color:var(--sc-text,#f1f5ec)}
.tarot-page *, .tarot-page *::before,.tarot-page *::after{box-sizing:border-box}
.tarot-page [hidden]{display:none!important}
.tarot-page .sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body.sc-site .tarot-page .tarot-generator{width:100%;max-width:none;margin:0;padding:26px 30px 24px;text-align:left;border-radius:0}
body.sc-site .tarot-page .tarot-header{height:auto;min-height:0;margin:0 0 18px;padding:0 0 16px;border:0}
.tarot-page .tarot-header h1{margin:5px 0 9px;font:950 clamp(27px,3.6vw,38px)/1.1 'Orbitron',sans-serif;text-transform:uppercase;letter-spacing:-.025em;color:var(--sc-text,#eff5ee);-webkit-text-fill-color:currentColor}
.tarot-page .tarot-header p{margin:0;max-width:850px;color:var(--sc-muted,#bbc6b9);font-size:13px;line-height:1.55}
.tarot-options-line{display:flex;justify-content:space-between;align-items:stretch;flex-wrap:wrap;gap:10px;margin:0 0 12px}
.tarot-tabs,.tarot-count-options{display:flex;align-items:stretch;border:1px solid var(--sc-line,#33412f);background:var(--sc-panel,#172017)}
.tarot-tabs button,.tarot-count-options button{min-height:41px;padding:7px 15px;border:0;border-right:1px solid var(--sc-line,#33412f);border-radius:0;background:transparent;color:var(--sc-muted,#c2ccbd);font:800 12px 'Exo 2',sans-serif;cursor:pointer}
.tarot-tabs button:last-child,.tarot-count-options button:last-child{border-right:0}
.tarot-tabs button.is-active{background:var(--sc-lime,#d5fa57);color:var(--sc-ink,#131b10)}
.tarot-count-options>span{display:flex;align-items:center;padding:0 13px;color:var(--sc-muted,#bfc7b5);font-size:11px;font-weight:700}
.tarot-count-options button{width:43px;padding:0;border-left:1px solid var(--sc-line,#33412f);border-right:0;color:var(--sc-text,#f1f5eb)}
.tarot-count-options button.is-active{background:var(--sc-raised,#263427);color:var(--sc-lime,#d5fa57)}
body.sc-site .tarot-page .tarot-generate-row{width:100%;max-width:none;margin:0;padding:0;border:0;display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:10px;align-items:stretch;background:transparent}
body.sc-site .tarot-page .tarot-generate-row .tarot-inputs{width:100%;min-width:0;max-width:none;display:flex;align-items:stretch;margin:0;padding:0}
.tarot-input-group{display:block;width:100%}
body.sc-site .tarot-page .tarot-input-group>input{display:block;width:100%;max-width:none;height:var(--sc-control,48px);min-height:var(--sc-control,48px);margin:0;padding:0 15px;border:1px solid var(--sc-line);border-radius:0;background:var(--sc-panel);color:var(--sc-text);outline:none;font:500 14px 'Exo 2',sans-serif}
.tarot-input-group>input:focus{border-color:var(--sc-lime)}.tarot-input-group>input::placeholder{color:#879487}
.tarot-random-desc{width:100%;margin:0;padding:0 16px;display:flex;align-items:center;color:var(--sc-muted);background:var(--sc-panel);border:1px solid var(--sc-line);font-size:13px}
body.sc-site .tarot-page .tarot-generate-row>button{width:100%;height:var(--sc-control,48px);min-height:var(--sc-control,48px);margin:0;padding:0 14px;border:1px solid var(--sc-lime);border-radius:0;background:var(--sc-lime);color:var(--sc-ink);font:950 12px 'Exo 2',sans-serif;letter-spacing:.025em;cursor:pointer}
body.sc-site .tarot-page .tarot-generate-row>button:hover:not(:disabled){background:#e2ff77}
.tarot-page button:disabled{cursor:default;opacity:.66}
.tarot-error{margin:12px 0 0;padding:9px 13px;color:#ffb9b0;border-left:3px solid #e07769;background:#e0776914;font-size:13px}
/* A single action in the ORIGINAL generator panel, not in a new detached box. */
body.sc-site .tarot-page .tarot-toolbar{display:flex;justify-content:center;align-items:center;gap:10px;width:100%;min-height:0;margin:12px 0 0;padding:0;border:0;background:transparent}
body.sc-site .tarot-page .tarot-toolbar[hidden]{display:none!important}
body.sc-site .tarot-page .tarot-toolbar .tarot-tool-save{width:auto;min-width:230px;min-height:46px;margin:0;padding:0 18px;border-radius:0;border:1px solid var(--sc-lime,#d5fa57);background:var(--sc-lime,#d5fa57);color:var(--sc-ink,#151c13);font:900 12px 'Exo 2',sans-serif;letter-spacing:.025em;cursor:pointer}
body.sc-site .tarot-page .tarot-toolbar .tarot-tool-save:hover:not(:disabled){background:#e2ff77}
/* Table canvas */
.tarot-workspace{margin:16px 0 0;border:1px solid var(--sc-line,#32402f);background:#111d16;overflow:hidden}
.tarot-review-link{padding:6px 10px;border:1px solid #52604a;background:#1a2920;color:#d5e6d2;font:800 11px 'Exo 2',sans-serif;cursor:pointer}
.tarot-felt{position:relative;min-height:440px;padding:27px 26px 30px;color:#f2ead9;background:radial-gradient(ellipse at 50% 3%,#325549,#193c32 48%,#09241d 100%);isolation:isolate;overflow:hidden}
.tarot-felt::before{content:"";position:absolute;inset:12px;border:1px solid #cbb68255;pointer-events:none}
.tarot-felt>.tarot-table-layout{position:relative;z-index:1;display:grid;grid-template-columns:164px minmax(0,1fr);align-items:start;gap:17px;min-height:320px}
.tarot-deck-area{display:flex;flex-direction:column;align-items:center;gap:15px;padding-top:38px;min-width:0}
.tarot-deck-stack{position:relative;flex:none;width:148px;height:263px;filter:drop-shadow(0 15px 18px #0008)}
.tarot-deck-stack i{display:block;position:absolute;inset:0;width:100%;height:100%;border:1px solid #dcc597;border-radius:5px;background:#173c35 url('/tarot/card-back.svg') center/100% 100% no-repeat;box-shadow:0 9px 20px #0007;transform-origin:50% 50%;backface-visibility:hidden}
.tarot-deck-stack i:nth-child(1){transform:translate(-4px,7px) rotate(-1deg)}.tarot-deck-stack i:nth-child(2){transform:translate(1px,6px) rotate(.5deg)}.tarot-deck-stack i:nth-child(3){transform:translate(-2px,5px) rotate(-.6deg)}.tarot-deck-stack i:nth-child(4){transform:translate(2px,4px) rotate(.7deg)}.tarot-deck-stack i:nth-child(5){transform:translate(-1px,3px) rotate(-.7deg)}.tarot-deck-stack i:nth-child(6){transform:translate(2px,2px) rotate(.5deg)}.tarot-deck-stack i:nth-child(7){transform:translate(-1px,1px) rotate(-.5deg)}.tarot-deck-stack i:nth-child(8){transform:translate(1px,0) rotate(.4deg)}.tarot-deck-stack i:nth-child(9){transform:translate(0,0)}
.tarot-deck-caption{margin-top:15px;color:#dac9a6;font:800 10px 'Exo 2',sans-serif;letter-spacing:.11em}
.tarot-table-content{min-width:0}
.tarot-idle,.tarot-shuffle{min-height:310px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.tarot-idle p{font-size:18px;font-weight:800;margin:0 0 8px}.tarot-idle small{font-size:12px;color:#d1dbc8}.tarot-shuffle p{font-size:17px;color:#eee0c3}
/* Deck packets use only the JavaScript animation timeline. */
.tarot-felt.is-shuffling .tarot-deck-stack{filter:drop-shadow(0 18px 20px #0008)}
/* This is a separate badge, never behind the moving deck. */
.tarot-shuffle{position:absolute;right:26px;bottom:24px;z-index:12;min-height:0;padding:12px 17px;border:1px solid #bda676;border-radius:4px;background:#0d3029ee;box-shadow:0 8px 22px #0007;pointer-events:none}
.tarot-shuffle p{margin:0;white-space:nowrap;color:#f3dfb5;font:700 13px 'Exo 2',sans-serif}

.tarot-spread{display:flex;align-items:flex-start;justify-content:center;gap:clamp(7px,1.1vw,13px);min-height:355px;padding:10px 0 0}
.tarot-slot{flex:0 1 auto;width:clamp(106px,19%,170px);min-width:0;display:flex;flex-direction:column;align-items:center;gap:9px;opacity:1;transform:none}
.tarot-spread.is-three .tarot-slot{width:clamp(146px,28%,219px)}
/* Keep every slot in the layout from frame one; only its own card travels. */
.tarot-slot:not(.is-placed)>.tarot-label{visibility:hidden}
.tarot-slot:not(.is-placed):not(.is-dealing)>.tarot-card-button{visibility:hidden}
.tarot-slot.is-placed>.tarot-label,.tarot-slot.is-placed>.tarot-card-button,
.tarot-slot.is-dealing>.tarot-card-button{visibility:visible}
.tarot-card-button{position:relative;display:block;width:100%;aspect-ratio:941/1672;padding:0;border:0;background:transparent;perspective:1400px;cursor:pointer}
.tarot-card-button.is-next{outline:2px solid #d9c98f80;outline-offset:4px}.tarot-card-button.is-selected{outline:1px solid #ecd39777;outline-offset:4px}
.tarot-page .tarot-card-button:disabled{opacity:1!important;filter:none}
/* Exact flip principle from /license/: static class and CSS 3D transition. */
.tarot-flip{position:relative;display:block;width:100%;height:100%;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;transform:rotateY(0deg);transition:transform 1150ms cubic-bezier(.3,.9,.35,1);will-change:transform}
.tarot-card-button.is-open .tarot-flip{transform:rotateY(180deg)}
.tarot-spread.is-restoring .tarot-flip{transition:none!important}
.tarot-face{position:absolute;inset:0;display:block;overflow:hidden;backface-visibility:hidden;-webkit-backface-visibility:hidden;border:1px solid #dfc997;border-radius:4px;background:#153931;box-shadow:0 8px 16px #0007}
.tarot-back{transform:rotateY(0deg) translateZ(1px);background:#133730 url('/tarot/card-back.svg') center/100% 100% no-repeat}
.tarot-front{transform:rotateY(180deg) translateZ(1px)}
.tarot-front img{width:100%;height:100%;display:block;object-fit:contain}
.tarot-label{min-height:28px;color:#d4cab0;text-align:center;font-size:11px;line-height:1.3;font-weight:700}
.tarot-interpretation{width:min(880px,100%);margin:4px auto 0;padding:22px 27px;border:1px solid #ac9665;border-radius:8px;background:linear-gradient(145deg,#20473c,#113129);box-shadow:inset 0 0 0 4px #0d2b24,inset 0 0 0 5px #907e56,0 14px 30px #0005;color:#efe4cb}
.tarot-interpretation-top{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;text-align:center;padding-bottom:10px;border-bottom:1px solid #ac956855}
.tarot-position{font:700 12px Georgia,serif;color:#d1bb8b}.tarot-interpret-status{font:400 11px Georgia,serif;color:#c9bea3}
.tarot-interpretation h3{margin:13px 0 10px;text-align:center;color:#f8ebcb;font:700 clamp(21px,2.6vw,27px)/1.2 Georgia,serif}
.tarot-card-text{max-width:760px;margin:0 auto;text-align:center;color:#eee4cf;font:400 clamp(14px,1.7vw,17px)/1.7 Georgia,serif;white-space:pre-wrap}
.tarot-reading-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:0}.tarot-reading-actions:has(button:not([hidden])){margin-top:17px}
.tarot-reading-actions button{min-height:36px;padding:7px 16px;border:1px solid #b6a071;border-radius:4px;background:#315247;color:#f4e6c4;font:700 12px 'Exo 2',sans-serif;cursor:pointer}
.tarot-reading-actions .tarot-primary{background:#dbc391;color:#18372b}
/* An illustrated folio: two broad text columns; the final (odd) card spans the page. */
.tarot-felt:has(.tarot-final:not([hidden]))>.tarot-table-layout{grid-template-columns:1fr}
.tarot-felt:has(.tarot-final:not([hidden])) .tarot-deck-area{display:none}
.tarot-final{width:100%;max-width:1160px;margin:0 auto}
.tarot-final-poster{position:relative;width:100%;margin:0 auto;padding:21px;background:radial-gradient(ellipse at 50% 0,#235246,#0e342c 69%,#09241f 100%);color:#ede1bd;border:4px double #bc9b60;box-shadow:0 18px 45px #0007}
.tarot-poster-inner{border:1px solid #987f52;padding:21px 24px 12px}
.tarot-poster-eyebrow{display:flex;align-items:center;justify-content:center;gap:12px;color:#d3bb86;letter-spacing:.13em;font:700 11px Georgia,serif;text-align:center}
.tarot-sigil{font-size:18px}
.tarot-poster-heading{text-align:center;margin:9px 0 13px;padding:0 8px 11px;border-bottom:1px solid #a88e5d}
.tarot-poster-heading h3{margin:5px 0;color:#f2e6c6;font:700 clamp(25px,3vw,35px)/1.2 Georgia,serif}
.tarot-poster-heading p{margin:0;color:#e2d5b5;font:italic 14px/1.5 Georgia,serif}
.tarot-poster-readings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:15px}
.tarot-poster-row{min-width:0;display:grid;grid-template-columns:clamp(130px,30%,187px) minmax(0,1fr);align-items:start;gap:18px;padding:15px;border-radius:6px;background:linear-gradient(115deg,#e9ddbd,#d3bf98);border:1px solid #a98c5b;color:#2d4138}
.tarot-poster-row:last-child:nth-child(odd){grid-column:auto;grid-template-columns:clamp(130px,30%,187px) minmax(0,1fr)}
.tarot-poster-row img{display:block;width:100%;height:100%;border:0;object-fit:contain;box-shadow:none}
.tarot-poster-row-copy{min-width:0}
.tarot-poster-row h4{margin:0 0 12px;color:#2b443a;font:700 clamp(15px,1.55vw,20px)/1.3 Georgia,serif;overflow-wrap:break-word}
.tarot-poster-row h4 small{display:block;margin:0 0 8px;color:#796343;font:700 11px/1.25 Georgia,serif}
.tarot-poster-row p{margin:0;color:#293f34;font:400 clamp(12px,1.18vw,14px)/1.57 Georgia,serif;white-space:pre-wrap;overflow-wrap:break-word}
.tarot-poster-verdict{display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:100%;margin:0;padding:22px 25px;text-align:center;border-radius:6px;border:1px solid #a68c5b;background:linear-gradient(135deg,#e5d6b1,#cfbb90);color:#294137}
.tarot-poster-verdict span{font:700 17px Georgia,serif;letter-spacing:.07em}
.tarot-poster-verdict p{text-align:left;margin:17px 0 0;color:#283f36;font:500 15px/1.65 Georgia,serif;white-space:pre-wrap;overflow-wrap:anywhere}
.tarot-poster-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:11px 0 0;padding:10px 0 2px;border-top:1px solid #8e7d59;color:#d1be91;font:700 11px Georgia,serif}
/* Identical content geometry to the SEO note in License, with no heading. */
.tarot-seo{width:min(var(--sc-copy),calc(100% - 40px));max-width:none;margin:26px auto 0;padding:17px 19px;border:1px solid var(--sc-line-soft);border-radius:0;background:rgba(13,18,12,.7);color:var(--sc-muted);font-size:13px;line-height:1.65;text-align:left}
.tarot-seo p{margin:0}
@media(max-width:800px){.tarot-page{width:calc(100% - 26px)}body.sc-site .tarot-page .tarot-generator{padding:20px 18px}.tarot-felt{padding:20px 13px}.tarot-felt>.tarot-table-layout{grid-template-columns:116px minmax(0,1fr);gap:12px}.tarot-deck-stack{width:108px;height:192px}.tarot-deck-area{padding-top:22px}.tarot-spread{min-height:275px;gap:5px}.tarot-slot{width:calc((100% - 20px)/5)}.tarot-spread.is-three .tarot-slot{width:min(29%,170px)}.tarot-label{font-size:9px}.tarot-poster-row{grid-template-columns:125px minmax(0,1fr);gap:12px;padding:12px}.tarot-poster-row:last-child:nth-child(odd){grid-template-columns:125px minmax(0,1fr)}.tarot-poster-row p{font-size:12px}}
@media(max-width:620px){body.sc-site .tarot-page .tarot-generate-row{grid-template-columns:1fr}body.sc-site .tarot-page .tarot-toolbar .tarot-tool-save{width:100%}.tarot-tabs{width:100%}.tarot-tabs button{flex:1 1 0;min-width:0;padding:8px 5px;font-size:10px}.tarot-count-options{width:100%}.tarot-count-options>span{margin-right:auto}.tarot-felt>.tarot-table-layout{grid-template-columns:1fr;gap:8px}.tarot-deck-area{gap:6px;padding:5px 0}.tarot-deck-stack{width:105px;height:187px}.tarot-deck-caption{font-size:9px}.tarot-idle,.tarot-shuffle{min-height:90px}.tarot-spread{min-height:0;padding-top:11px}.tarot-slot{width:calc((100% - 20px)/5)}.tarot-spread.is-three .tarot-slot{width:min(29%,160px)}.tarot-interpretation{padding:18px 17px}.tarot-poster-inner{padding:15px 13px 8px}.tarot-final-poster{padding:10px}.tarot-poster-readings{grid-template-columns:1fr;gap:9px}.tarot-poster-row,.tarot-poster-row:last-child:nth-child(odd){grid-column:auto;grid-template-columns:105px minmax(0,1fr);gap:14px}.tarot-poster-row h4{font-size:16px}.tarot-poster-row p{font-size:12px}.tarot-poster-verdict{padding:14px 16px}.tarot-poster-verdict p{font-size:13px}}

/* v12: keep the shuffle label outside of the center deck silhouette. */
@media(max-width:620px){.tarot-shuffle{left:12px;right:12px;bottom:10px;text-align:center;padding:8px 12px}.tarot-shuffle p{font-size:11px}}

/* v13: Bureau title and document header. */
.tarot-page .tarot-header h1{font-size:clamp(22px,2.75vw,31px);line-height:1.16;letter-spacing:-.025em}
.tarot-poster-meta{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 24px}
.tarot-poster-meta>span{color:#c6b284;font:700 11px Georgia,serif;letter-spacing:.08em}
@media(max-width:620px){.tarot-page .tarot-header h1{font-size:clamp(19px,5.9vw,26px)}.tarot-poster-meta>span{font-size:9px}}

.tarot-quota{font:500 12px/1.4 'Exo 2',sans-serif;color:#b9b7af;text-align:center;margin:7px 0 0}

/* Admin-configurable lettering: overlay follows both on-screen and 4K card image. */
.tarot-card-art,.tarot-poster-art{position:relative;display:block;width:100%;aspect-ratio:941/1672;overflow:hidden}
.tarot-card-art img,.tarot-poster-art img{width:100%;height:100%;display:block;object-fit:contain}
.tarot-front .tarot-card-art{height:100%}
/* The photo and SVG now fill exactly the same coordinate box. Draw the frame
   on a separate non-layout layer; never place a border on the photo itself. */
.tarot-poster-row .tarot-poster-art{box-shadow:0 7px 13px #0005}
.tarot-poster-row .tarot-poster-art::after{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;box-shadow:inset 0 0 0 2px #b5985e}
/* v24: vector title anchored in native card coordinates; zero dynamic font resizing. */
.tarot-card-art>.tarot-title-svg,.tarot-poster-art>.tarot-title-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;display:block;z-index:1}


/* v27: Naturally sized interpretation; slightly more compact table. */
.tarot-workspace{margin-top:16px}
.tarot-felt{min-height:720px;padding:29px 25px 32px}
.tarot-felt>.tarot-table-layout{grid-template-columns:185px minmax(0,1fr);gap:18px;min-height:655px}
.tarot-deck-area{gap:13px;padding-top:47px}
.tarot-deck-stack{width:166px;height:295px}
.tarot-deck-caption{margin-top:13px}
.tarot-table-content{min-height:655px}
.tarot-idle{min-height:655px}
/* Slots set the spread height naturally; the interpretation sits immediately below. */
.tarot-reading{display:flex;flex-direction:column;gap:5px;min-height:0}
.tarot-spread{flex:none;min-height:0;padding-top:10px;align-items:flex-start}
.tarot-interpretation{flex:none;min-height:235px;height:auto;margin:0 auto;padding:17px 23px;overflow:visible}
/* Keep a blank panel's space before the first flip, but show no empty frame. */
.tarot-page .tarot-reading .tarot-interpretation[hidden]{display:block!important;visibility:hidden;pointer-events:none}
.tarot-card-text{max-height:none;overflow:visible;scrollbar-width:auto}

/* One contextual action on the physical desk, beneath the deck. */
.tarot-deck-actions{width:100%;min-height:45px;margin:4px 0 0!important;justify-content:center}
.tarot-deck-actions .tarot-primary{min-height:42px;border-radius:3px;white-space:nowrap;font-size:16.5px}
/* Only the two end-of-reading actions remain in the original generator panel. */
body.sc-site .tarot-page .tarot-toolbar{flex-wrap:nowrap;gap:11px}
body.sc-site .tarot-page .tarot-toolbar .tarot-tool-review{display:inline-flex;align-items:center;justify-content:center;flex:0 1 220px;min-width:0;min-height:46px;margin:0;padding:0 15px;border:1px solid var(--sc-line,#4b6249);border-radius:0;background:var(--sc-panel,#18251b);color:var(--sc-text,#eaf2df);font:900 12px 'Exo 2',sans-serif;letter-spacing:.025em}
body.sc-site .tarot-page .tarot-toolbar .tarot-tool-review:hover{border-color:var(--sc-lime,#d5fa57)}
body.sc-site .tarot-page .tarot-toolbar .tarot-tool-save{flex:0 1 220px;min-width:0}
@media(max-width:800px){
 .tarot-felt{min-height:620px;padding:22px 16px 26px}
 .tarot-felt>.tarot-table-layout{grid-template-columns:135px minmax(0,1fr);gap:12px;min-height:560px}
 .tarot-deck-area{padding-top:28px;gap:9px}
 .tarot-deck-stack{width:122px;height:217px}
 .tarot-table-content,.tarot-idle{min-height:560px}
 .tarot-reading{min-height:0;gap:5px}
 .tarot-spread{min-height:0}
 .tarot-interpretation{min-height:230px;height:auto}
 .tarot-deck-actions .tarot-primary{font-size:15px}
}
@media(max-width:620px){
 .tarot-felt{min-height:825px;padding:18px 13px 23px}
 .tarot-felt>.tarot-table-layout{grid-template-columns:1fr;gap:10px;min-height:780px}
 .tarot-deck-area{padding:6px 0 0;gap:8px}
 .tarot-deck-stack{width:120px;height:213px}
 .tarot-deck-caption{margin-top:7px}
 .tarot-deck-actions{min-height:43px;margin:0!important}
 .tarot-table-content,.tarot-idle{min-height:485px}
 .tarot-reading{min-height:0;gap:5px}
 .tarot-spread{min-height:0;padding-top:10px}
 .tarot-interpretation{min-height:235px;height:auto;margin:0 auto;padding:14px 15px}
 body.sc-site .tarot-page .tarot-toolbar .tarot-tool-save{width:auto;flex:1 1 0}
 body.sc-site .tarot-page .tarot-toolbar .tarot-tool-review{flex:1 1 0;font-size:10.5px;padding:0 7px}
}
