@font-face{font-family:TarotSerif;src:url('assets/tarot-serif.woff2') format('woff2');font-weight:700;font-display:swap}
#tarot{--tarot-perspective:.74;position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#f6e1b8;overflow:hidden;isolation:isolate}#tarot::backdrop{background:transparent}
.tarot-table{position:absolute;inset:0;z-index:-1;background:#202030 url('assets/tarot-table.webp') center/cover no-repeat;pointer-events:none}
#tarotBack,#tarotReset,#tarotPreviewClose{border:1px solid #d8b477;background:#30262d99;border-radius:26px;padding:9px 22px;color:#f7e4bd;font:700 15px/1.5 TarotSerif,SimSun,serif;cursor:pointer;transition:background .2s,box-shadow .2s,transform .2s}
#tarotBack:hover,#tarotReset:enabled:hover,#tarotPreviewClose:hover{background:#75553570;box-shadow:0 0 18px #d6a96525;transform:translateY(-2px)}#tarotBack:focus-visible,#tarotReset:focus-visible,#tarotPreviewClose:focus-visible{outline:2px solid #f7df9c;outline-offset:4px}
#tarotBack{position:absolute;top:2.5%;left:2%;z-index:100;padding:9px 22px}
.tarot-heading{position:absolute;display:block;top:5.5%;left:15%;right:15%;text-align:center;pointer-events:none;text-shadow:0 2px 8px #13101fbb}.tarot-heading h2{font:700 clamp(27px,2.9vw,49px)/1.4 TarotSerif,SimSun,serif;letter-spacing:.05em;margin:0}.tarot-heading h2:focus{outline:0}.tarot-heading p{font:400 clamp(14px,1.4vw,23px)/1.7 SimSun,serif;margin:12px 0 0;letter-spacing:.06em;color:#efe2cd}
.tarot-playfield{position:absolute;max-width:1780px;margin:0 auto;left:3.5%;right:3.5%;top:23%;bottom:15%;--card-w:95px;--slot-w:96px}
#tarotRing{position:absolute;inset:0;isolation:isolate}
#tarot .tarot-deck-card{position:absolute;left:var(--x);top:var(--y);width:var(--card-w);height:calc(var(--card-w)*1.5);padding:0;margin:0;border:0;border-radius:8px;background:transparent;box-shadow:none;display:block;transform:translate(-50%,-50%) scaleY(var(--tarot-perspective)) rotate(var(--angle));cursor:pointer;opacity:1;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.tarot-card-visual{display:block;width:100%;height:100%;border-radius:7%;outline:2px solid transparent;box-shadow:0 4px 7px #110b139c;transition:transform .22s ease,box-shadow .22s ease,outline-color .22s ease,filter .22s ease;will-change:transform}
.tarot-card-visual img{display:block;width:100%;height:100%;border-radius:7%;object-fit:fill;pointer-events:none;-webkit-user-drag:none;user-select:none}
#tarot .tarot-deck-card:enabled:hover,#tarot .tarot-deck-card:focus-visible{z-index:99!important;outline:0}
.tarot-deck-card:enabled:hover .tarot-card-visual,.tarot-deck-card:focus-visible .tarot-card-visual{transform:translateY(-9px) scale(1.035);outline-color:#f2cf83;box-shadow:0 0 0 1px #f1d198,0 0 20px #e5b86685,0 13px 15px #100b1499;filter:brightness(1.13)}
#tarot .tarot-deck-card.is-chosen{visibility:hidden;pointer-events:none}#tarot .tarot-deck-card:disabled:not(.is-chosen){cursor:default;opacity:.74}
.tarot-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center;z-index:90;pointer-events:none}
#tarotProgress{font:400 clamp(14px,1.5vw,25px)/1.5 SimSun,serif;margin:0 0 12px;color:#ffe9bc;letter-spacing:.035em;text-shadow:0 1px 7px #1b111c}
.tarot-slots{display:flex;justify-content:center;gap:clamp(10px,1.7vw,28px)}.tarot-slot{margin:0;width:var(--slot-w);pointer-events:auto}
.tarot-slot-frame{position:relative;width:var(--slot-w);height:calc(var(--slot-w)*1.5);border:1px dashed #c39b639c;border-radius:8px;background:#22182b16;display:grid;place-items:center;transition:border-color .25s,background .25s}.tarot-slot-frame>span{font-size:32px;color:#ba915969;pointer-events:none}.tarot-slot-frame.is-loading{background:#d4ad6920}.tarot-slot-frame.has-card{border-color:transparent;background:transparent}
.tarot-selected-card{display:block;width:100%;height:100%;padding:0;border:0;background:transparent;border-radius:8px;cursor:zoom-in;box-shadow:0 5px 12px #130c1b9c;transition:transform .2s,box-shadow .2s}.tarot-selected-card img{display:block;width:100%;height:100%;object-fit:fill;border-radius:8px;pointer-events:none}.tarot-selected-card:hover{transform:translateY(-3px);box-shadow:0 0 13px #ddba6e62,0 7px 12px #130c1b9c}.tarot-selected-card:focus-visible{outline:2px solid #f2cf83;outline-offset:4px}
.tarot-slot figcaption{font:400 clamp(11px,1vw,16px)/1.55 SimSun,serif;margin-top:9px;color:#f0dfbc;white-space:nowrap;text-shadow:0 1px 5px #231226}.tarot-card-name{display:block;font-family:TarotSerif,SimSun,serif;min-height:1.55em;color:#f5dfb1}
.tarot-footer{position:absolute;display:block;bottom:2.6%;left:5%;right:5%;text-align:center}.tarot-footer-actions{display:flex;justify-content:center;align-items:center;gap:20px;min-height:44px}#tarotHint{font:400 clamp(12px,1.1vw,18px)/1.7 SimSun,serif;margin:0;min-height:1.7em;color:#f2dfbb}#tarotReset{font-size:14px;padding:7px 20px}#tarotReset:disabled{opacity:.4;cursor:default}.tarot-footer-note{font:400 clamp(10px,.95vw,15px)/1.6 SimSun,serif;margin:10px 0 0;letter-spacing:.035em;color:#d9c7af}
.tarot-flight{position:fixed;z-index:200;pointer-events:none;perspective:1000px;transform:translate(-50%,-50%);border-radius:7%;will-change:transform,left,top,width,height}.tarot-flight-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d}.tarot-flight-face{position:absolute;inset:0;backface-visibility:hidden;overflow:hidden;border-radius:7%;box-shadow:0 6px 20px #17101b80}.tarot-flight-face img{display:block;width:100%;height:100%;object-fit:fill}.tarot-flight-front{transform:rotateY(180deg)}
#tarotPreview{max-width:94vw;width:365px;max-height:94dvh;padding:16px;border:1px solid #b69766;border-radius:16px;background:#272230;color:#f6dfb4;overflow:auto}#tarotPreview::backdrop{background:#100d1bd6}.tarot-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}#tarotPreviewTitle{font:700 25px/1.5 TarotSerif,SimSun,serif;margin:0}#tarotPreviewClose{font-size:12px;padding:7px 13px}#tarotPreviewImage{display:block;width:auto;max-width:100%;max-height:76dvh;border-radius:12px;margin:auto}
@media(max-width:700px){#tarot{--tarot-perspective:.94}#tarotBack{top:15px;left:15px;font-size:12px;padding:7px 16px}.tarot-heading{top:10.5%;left:10px;right:10px}.tarot-heading h2{font-size:clamp(23px,6vw,30px);letter-spacing:.02em}.tarot-heading p{font-size:13px;margin-top:8px;letter-spacing:.02em}.tarot-playfield{top:24%;bottom:18%;left:2%;right:2%}.tarot-slots{gap:10px}#tarotProgress{font-size:14px;margin-bottom:8px}.tarot-slot-frame{border-radius:5px}.tarot-slot-frame>span{font-size:22px}.tarot-slot figcaption{font-size:11px;margin-top:6px}.tarot-selected-card,.tarot-selected-card img{border-radius:5px}.tarot-footer{bottom:3%;left:10px;right:10px}.tarot-footer-actions{flex-direction:column;gap:7px}#tarotHint{font-size:12px;max-width:94%;margin:auto}#tarotReset{font-size:12px;padding:5px 18px}.tarot-footer-note{font-size:10px;margin-top:8px}.tarot-deck-card:enabled:hover .tarot-card-visual{transform:translateY(-5px) scale(1.025)}}
@media(min-width:701px) and (max-height:700px){.tarot-heading{top:4%}.tarot-heading h2{font-size:31px}.tarot-heading p{font-size:15px;margin-top:6px}.tarot-playfield{top:22%;bottom:19%}.tarot-footer{bottom:2%}.tarot-footer-note{margin-top:4px;font-size:11px}#tarotHint{font-size:14px}#tarotReset{font-size:12px;padding:5px 17px}}
@media(max-width:700px) and (max-height:650px){.tarot-heading{top:12%}.tarot-heading h2{font-size:24px}.tarot-heading p{font-size:12px}.tarot-playfield{top:27%;bottom:22%}.tarot-footer{bottom:2%}.tarot-footer-actions{gap:4px}.tarot-footer-note{margin-top:5px}}
@media(prefers-reduced-motion:reduce){.tarot-card-visual,.tarot-slot-frame,.tarot-selected-card,#tarotBack,#tarotReset,#tarotPreviewClose{transition:none!important}}
