/* Reviewed spread geometry: layout rotation and drawn orientation remain separate. */
.t-spread-map{position:relative;width:min(100%,calc(55dvh * var(--map-ratio)));aspect-ratio:var(--map-ratio);margin:14px auto 32px;isolation:isolate;color:#795731}
.t-spread-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.t-spread-lines polyline{fill:none;stroke:currentColor;stroke-width:.25;stroke-dasharray:1 1;opacity:.3}
:is(.tarot-room,.t-spread-summary) .t-map-card{position:absolute;width:var(--map-card-width);padding:0;border:0;background:none;color:inherit;transform:translate(-50%,-50%);box-shadow:none;overflow:visible;border-radius:2px;aspect-ratio:1/1.54}
.t-map-face{position:absolute;inset:0;display:grid;place-items:center;border:1px solid #b1945c;border-radius:3px;background:#36263d url('/assets/tarot/card-back-hexagram-v3.9a342328704a.webp') center/100% 100%;box-shadow:1px 3px 5px #4b2d2438;rotate:var(--layout-angle);overflow:hidden;box-sizing:border-box}
.t-map-face>span{font-size:18px;color:#ddc48e}.t-map-face img{display:block;width:100%;height:100%;object-fit:cover}.t-map-face img.reversed{transform:rotate(180deg)}
.t-map-number{position:absolute;left:-6px;top:-6px;min-width:18px;height:18px;padding:0 2px;box-sizing:border-box;border-radius:50%;border:1px solid #b3955e;background:#eee1c4;color:#634529;font:11px/16px Georgia,serif;z-index:1}
.t-map-card>small{position:absolute;left:50%;top:100%;transform:translateX(-50%);margin-top:3px;font-size:10px;line-height:1.2;white-space:nowrap;max-width:150%;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.tarot-room .t-map-card:hover{transform:translate(-50%,-50%);filter:drop-shadow(0 0 2px #fff)}
.tarot-room .t-map-card:focus-visible{outline:2px solid #986d39;outline-offset:5px}
.t-map-celtic-cross .t-map-card:nth-of-type(2)>small{left:120%;top:45%;transform:none}
.t-map-wheel,.t-map-year-wheel,.t-map-mandala{margin-bottom:36px}
.t-spread-choice{margin:20px 0 10px;border-block:1px solid #a88a5666;padding:16px 0}.t-spread-choice h4{margin:6px 0}.t-spread-choice .t-spread-map{width:min(100%,calc(240px * var(--map-ratio)));margin-block:15px 28px}.t-spread-choice .t-map-card>small{font-size:9px}
#t-spread-options{font-size:12px;color:#795731;margin:15px 0}#t-spread-options summary{cursor:pointer;min-height:32px}#t-spread-options select{display:block;width:100%;margin:8px 0 14px;background:#f0e2c7;color:#593f2b;border:1px solid #ae9167;padding:10px;font:inherit}
.t-reading-card-nav{overflow-x:auto;justify-content:flex-start;scrollbar-width:thin;flex-wrap:nowrap}.t-reading-card-nav .t-quiet{flex:0 0 auto;padding:8px 12px;white-space:nowrap}
.t-current-card{min-height:230px;touch-action:pan-y}.t-current-card .t-reading-card{width:100%;grid-template-columns:minmax(90px,24%) 1fr}.t-current-card .t-reading-face{width:100%;max-width:175px;justify-self:center}.t-current-card .t-position-meaning{font-size:12px;color:#886a45;border-bottom:1px solid #ab8f5b44;padding-bottom:12px}.t-card-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #a88b5844;padding-top:10px}.t-card-pager>span{font:12px Georgia,serif;color:#876340}
.t-spread-dialog{box-sizing:border-box;width:min(860px,94vw);max-width:94vw;max-height:92dvh;padding:28px 24px 20px;overflow:auto}.t-spread-dialog h2{font-size:24px}.t-spread-dialog>p{font-size:13px}.t-spread-dialog .t-spread-map{width:min(100%,calc(62dvh * var(--map-ratio)))}
/* On the perspective table the same shape is shown as a compact complete layout.
   A flat, enlarged view and a next-card action keep dense spreads operable on phones. */
.tarot-room[data-spread-layout]{--spread-board-height:min(24dvh,210px)}
.tarot-room[data-spread-layout][data-step=reveal] .t-table-content .t-spread{inset:0 auto auto 50%;width:calc(var(--spread-board-height) * var(--spread-ratio));height:var(--spread-board-height);max-width:96%;margin:0;transform:translateX(-50%);z-index:90}
.tarot-room[data-spread-layout][data-step=reveal] .t-table-content .t-spread .t-slot{width:var(--spread-card-width);height:auto;aspect-ratio:1/1.54;padding:0;transform:translate(-50%,-50%);display:block}
.tarot-room[data-spread-layout][data-step=reveal] .t-table-content .t-spread .t-slot-card{display:block;width:100%;height:100%;aspect-ratio:1/1.54;rotate:var(--layout-angle);box-sizing:border-box}
.tarot-room[data-spread-layout][data-step=reveal] .t-table-content .t-spread .t-slot small{position:absolute;top:100%;left:50%;transform:translateX(-50%);font-size:8px;white-space:nowrap;margin-top:2px;max-width:120%;overflow:hidden;text-overflow:ellipsis;line-height:1.2}
@media(max-width:650px){
 .tarot-room .t-reading-tabs>button{font-size:11px;padding-inline:3px;letter-spacing:0}.t-current-card .t-reading-card{grid-template-columns:82px 1fr;gap:14px}.t-current-card .t-reading-card p{font-size:14px;line-height:1.85}.t-current-card .t-position-meaning{font-size:11px!important}.t-reading-card-nav .t-quiet{padding:8px 9px;font-size:11px!important}.t-spread-map{width:min(100%,calc(49dvh * var(--map-ratio)));margin-block:16px 28px}.t-map-card>small{font-size:8px}.t-map-number{min-width:16px;height:16px;line-height:14px;font-size:10px;left:-4px;top:-4px}.t-spread-dialog{padding:24px 15px 18px}.t-spread-dialog h2{font-size:20px}.t-spread-choice .t-spread-map{width:min(100%,calc(210px * var(--map-ratio)))}
 .tarot-room[data-spread-layout]{--spread-board-height:min(23dvh,165px)}.tarot-room.story-room[data-step=reveal] .t-main>.t-actions{gap:6px}.tarot-room.story-room[data-step=reveal] .t-main>.t-actions button{font-size:11px;padding:8px;letter-spacing:0}
}
.t-spread-dialog .t-spread-map{color:#dfc796}.t-spread-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px;list-style:none;padding:0;margin:24px 0 8px}.t-spread-legend>li{min-width:0}.tarot-room .t-position-link{display:flex;align-items:center;gap:10px;min-height:44px;width:100%;padding:7px 0;border:0;border-bottom:1px solid #a88a5638;background:none;box-shadow:none;text-align:left;color:inherit;font-size:12px;letter-spacing:0}.t-position-link>b{display:grid;place-items:center;flex:none;width:22px;height:22px;border:1px solid #a88a5688;border-radius:50%;font:12px Georgia,serif}.t-position-link small{display:block;font-size:10px;opacity:.8;margin-top:4px}.t-position-link>span{overflow-wrap:anywhere}
@media(max-width:650px){.t-spread-legend{gap:3px 12px}.t-map-card>small{font-size:10px}.t-spread-choice .t-map-card>small{font-size:9px}.t-spread-legend .t-position-link{font-size:11px}}
@media(max-width:650px){.tarot-room .t-draw-controls>button{display:block}}
.t-map-celtic-cross .t-map-card:nth-of-type(2)>small{display:none}.t-map-celtic-cross .t-map-card:nth-of-type(1)>small{top:110%;max-width:180%}.t-spread-choice .t-spread-legend{margin-top:18px}.t-spread-choice .t-position-link{min-height:32px;font-size:11px}

/* Wrap according to the open page's width, including the narrower archive notebook. */
.t-reading-with-summary {
 display:flex; flex-wrap:wrap; align-items:flex-start; gap:20px 26px;
 text-align:start; width:100%; box-sizing:border-box;
}
.t-reading-with-summary > :first-child { flex:2 1 23rem; min-width:0 }
.t-reading-with-summary > .t-follow-message { max-width:100% }
.t-spread-summary {
 flex:1 1 16rem; min-width:0; box-sizing:border-box; padding:18px;
 border:1px solid #ab8b575e; border-radius:3px 6px 3px 2px;
 background:linear-gradient(110deg,#efe2c5,#e6d5b3); color:#4b3523;
 overflow-wrap:anywhere; text-shadow:none; letter-spacing:normal;
}
.t-summary-heading > span,.t-summary-reason > strong {
 color:#755432; font-size:12px; line-height:1.6; font-weight:600; letter-spacing:.06em;
}
.t-summary-heading h3 {
 margin:3px 0 0; padding:0; border:0; box-shadow:none; color:#4a3422;
 font-family:inherit; font-size:20px; line-height:1.45; letter-spacing:.04em;
}
.t-summary-heading h3::before { content:none }
.t-spread-summary p {
 margin:5px 0 0; color:#604832; font-family:inherit; font-size:13px;
 line-height:1.75; text-indent:0; white-space:normal; letter-spacing:normal;
}
.t-summary-reason { margin-top:12px; padding-inline-start:10px; border-inline-start:2px solid #a7814f }
.t-spread-summary .t-spread-map { width:min(100%,calc(235px * var(--map-ratio))); margin:14px auto 12px }
.t-spread-summary .t-map-card > small { display:none }
.t-spread-summary .t-map-number {
 min-width:15px; height:15px; left:-3px; top:-3px;
 font:10px/13px Georgia,serif; text-align:center;
}
.t-summary-ordered { display:grid; grid-template-columns:repeat(auto-fit,minmax(45px,1fr)); gap:8px; margin:16px 0 }
.t-summary-ordered figure { margin:0; text-align:center; font-size:11px }
.t-summary-ordered img { display:block; width:100%; max-width:66px; margin:auto; border-radius:2px }
.t-summary-ordered img.reversed { transform:rotate(180deg) }
.t-summary-positions { border-top:1px solid #a482535e }
.t-summary-positions summary { min-height:38px; padding:8px 0; box-sizing:border-box; cursor:pointer; font-size:14px; font-weight:600 }
.t-summary-positions summary:focus-visible { outline:2px solid #82562e; outline-offset:2px }
.t-summary-positions ol { padding-inline-start:1.7em; margin:0; font-size:13px; line-height:1.6 }
.t-summary-positions li { padding:6px 0 7px 2px; border-top:1px solid #ac8d602f }
.t-summary-positions li::marker { color:#795730; font-family:Georgia,serif }
.t-summary-positions li > span { display:block; color:#705233; font-size:12px }
.t-summary-positions li p { margin:2px 0 0; font-size:12px }
.tarot-room[data-step=letter] .t-main > .t-reading-with-summary { min-height:0; overflow:auto; padding:4px 6px 20px }
.tarot-room[data-step=letter] .t-main > .t-reading-with-summary .t-letter { box-sizing:border-box; width:100% }
@media (max-width:650px) {
 .t-reading-with-summary { gap:16px }
 .t-spread-summary { padding:14px }
 .t-summary-positions summary { min-height:44px }
}
