/* One current task per viewport; long reading stays in an optional sheet. */
.tarot-desk-mode .topbar,.tarot-desk-mode .page-foot{display:none}
.tarot-desk-mode .prototype-note{min-height:32px}
.tarot-desk-mode #main{margin:0 auto;min-height:0;height:calc(100dvh - 48px);max-width:1000px}
.tarot-desk-mode .tarot-flow,.reading-desk{height:100%;min-height:0;display:flex;flex-direction:column;gap:12px;padding-bottom:12px}
.desk-flow-head,.desk-result-head{display:flex;align-items:center;gap:16px;min-height:52px;flex:none}
.desk-flow-head h1{font-size:23px;font-weight:500;flex:1;margin:0}
.desk-flow-head .back,.desk-result-head .back{margin:0;font-size:13px;min-height:44px;display:flex;align-items:center}
.desk-flow-head .text-button{font-size:11px;min-height:44px}
.desk-draw-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;font-size:12px;flex:none}
.desk-draw-meta>span:last-child{color:var(--muted);font-size:11px}
.desk-spread-switch{font-size:15px;text-align:left;padding:8px 0;color:var(--accent);min-height:44px}
.desk-flow-progress{display:flex;gap:22px;font-size:11px;color:var(--muted);flex:none;margin-bottom:2px}
.desk-flow-progress [aria-current]{color:var(--accent);border-bottom:1px solid;padding-bottom:5px}
.tarot-desk-mode .tarot-flow>.tarot-table{flex:1;min-height:0;margin:0;padding:20px;display:flex;flex-direction:column;justify-content:center}
.desk-shuffle .shuffle-stack{flex:1;min-height:100px;max-height:360px;margin:0;width:100%}
.desk-shuffle .shuffle-card{top:50%;margin-top:-103px}
.desk-shuffle-actions{display:flex;flex-direction:column;align-items:center;gap:6px;flex:none;padding:12px 0}
.desk-shuffle-actions>.table-button{width:min(100%,280px);font-size:16px;min-height:48px}
.desk-shuffle-actions>div{display:flex;gap:20px}
.table-button.quiet{border:0;background:none;color:#ddd5bd;min-height:44px;font-size:12px;padding:8px}
.tarot-desk-mode .tarot-under{display:none}
.tarot-desk-mode .pick-tray{flex:none;padding-block:28px 12px;gap:6px}
.tarot-desk-mode .pick-slot{flex-basis:54px;gap:0}
.tarot-desk-mode .pick-slot-card{width:30px;height:50px;font-size:16px}
.tarot-desk-mode .pick-slot-label{display:none}
.tarot-desk-mode .pick-slot-card .source-number{font-size:10px;top:-22px}
.tarot-desk-mode .pick-slot-card .tarot-back-art b{font-size:13px}
.tarot-desk-mode .deck-rail{flex:none;min-height:220px}
.tarot-desk-mode .pick-table .table-caption{flex:none}
.tarot-desk-mode .deck-instruction{flex:none;margin-top:auto;padding-top:12px}
.tarot-desk-mode .deck-meta{margin-bottom:auto}
.tarot-desk-mode .table-line{margin:10px 0;font-size:13px;flex:none}
.tarot-desk-mode .table-actions{flex:none;margin:10px 0 0}
.tarot-desk-mode .cut-piles{margin:auto 0;flex:1;align-items:center}
.tarot-desk-mode .desk-legacy-setup{overflow:auto;min-height:0}
.desk-result-head>div{flex:1;min-width:0}
.desk-result-head h1{font-size:22px;line-height:1.5;margin:0;font-weight:500}
.desk-result-head small{font-size:10px;color:var(--muted)}
.desk-result-head .back{width:32px;font-size:22px}
.desk-result-head>.text-button{min-height:44px;padding-inline:8px}
.desk-question{display:flex;align-items:center;gap:14px;text-align:left;min-height:36px;max-height:60px;font-size:13px;color:var(--accent);overflow:hidden;flex:none;line-height:1.6}
.desk-question>span{font-size:10px;white-space:nowrap;color:var(--muted);margin-left:auto}
.desk-tabs{display:flex;border-bottom:1px solid var(--line);flex:none;gap:24px}
.desk-tabs button{font-size:13px;min-height:44px;border-bottom:2px solid transparent;padding:8px 0;color:var(--muted)}
.desk-tabs [aria-pressed=true]{border-color:var(--accent);color:var(--ink)}
.desk-card-view{display:flex;flex-direction:column;gap:12px;flex:1;min-height:0}
.desk-board-viewport{position:relative;overflow:hidden;min-height:0;flex:1;background:var(--table,#303d31);border-radius:5px;border:1px solid #53604b}
.desk-board-fit{position:absolute;left:50%;top:50%;transform-origin:center}
.desk-board-fit .spread-board{margin:0!important;width:max-content;max-width:none;gap:12px 22px}
.desk-board-fit .layout-grid{grid-template-columns:repeat(3,var(--card-width));gap:12px 22px}
.desk-board-fit .slot-label,.desk-board-fit .slot-card-name{display:none}
.desk-board-fit .layout-celtic{gap:8px 20px}
.desk-board-fit .layout-celtic .slot-2{transform:translate(8px,25px)}
.desk-board-fit .table-card{opacity:.82;transition:opacity .15s,outline-color .15s}
.desk-board-fit .desk-selected .table-card{outline:3px solid #ead5a1;outline-offset:4px;opacity:1}
.desk-board-fit .numbered-card .source-number{font-size:12px}
.desk-card-strip{display:flex;gap:8px;overflow-x:auto;flex:none;padding:2px 0 4px;scrollbar-width:none;scroll-snap-type:x proximity}
.desk-card-strip::-webkit-scrollbar{display:none}
.desk-card-strip button{display:flex;align-items:center;gap:6px;white-space:nowrap;min-height:42px;border-bottom:1px solid transparent;color:var(--muted);font-size:12px;padding:6px 10px;scroll-snap-align:center}
.desk-card-strip button span{font-family:Georgia,serif;font-size:13px}
.desk-card-strip [aria-pressed=true]{color:var(--accent);background:#e5ded2;border-radius:3px}
.desk-focus-card{display:grid;grid-template-columns:80px minmax(0,1fr);gap:18px;flex:none;animation:desk-content-in .16s ease-out}
.desk-focus-image{padding:0;align-self:start;min-width:0}
.desk-focus-image img{display:block;width:100%;height:auto;border-radius:3px}
.desk-focus-image span{font-size:10px;color:var(--muted);line-height:2.3}
.desk-focus-card .desk-position{font:11px/1.5 var(--serif);color:var(--muted);margin:0 0 3px}
.desk-focus-card h2{font-size:21px;line-height:1.5;font-weight:500;margin:0 0 7px}
.desk-focus-card h2 small{font:11px var(--serif);color:var(--accent);margin-left:8px;white-space:nowrap}
.desk-focus-card .desk-card-copy{font:14px/1.85 var(--serif);margin:0;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.desk-focus-card .text-button{font-size:12px;min-height:40px;color:var(--accent)}
.desk-tab-content{flex:1;min-height:0;display:flex;flex-direction:column;gap:18px}
.desk-tab-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;flex:none}
.desk-tab-actions button{font-size:12px;min-height:44px;padding:10px 16px}
.desk-scroll{overflow:auto;min-height:0;flex:1;overscroll-behavior:contain;padding-bottom:15px}
.desk-scroll h3{font-size:14px;font-weight:500;margin:0 0 10px}
.desk-record{padding:16px 0;border-bottom:1px solid var(--line)}
.desk-record small{font:11px/1.7 var(--serif);color:var(--muted)}
.desk-record p{font:14px/1.8 var(--serif);white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 0}
.desk-empty{font-size:13px;color:var(--muted);padding:20px 0}
.desk-background{border-top:1px solid var(--line);margin-top:22px;padding-top:10px}
.desk-background summary{font-size:12px;cursor:pointer;min-height:44px;padding-block:12px}
#dialog[data-desk]{max-width:640px;width:calc(100% - 32px);max-height:90dvh;padding:0;overflow:hidden}
#dialog[data-desk] #dialog-content{display:flex;flex-direction:column;max-height:90dvh;min-height:0}
#dialog[data-desk] .dialog-head{flex:none;align-items:center;gap:16px;border-bottom:1px solid var(--line);padding:16px 24px}
#dialog[data-desk] .dialog-head h2{font-size:22px}
#dialog[data-desk] .dialog-head .close{width:44px;height:44px;padding:0;min-height:44px;font-size:27px}
#dialog[data-desk] .dialog-body{overflow:auto;min-height:0;padding:20px 24px 24px;overscroll-behavior:contain}
#dialog[data-desk] label,#dialog[data-desk] summary{font-size:13px;line-height:1.8}
#dialog[data-desk] input,#dialog[data-desk] textarea,#dialog[data-desk] select{font-size:16px}
#dialog[data-desk] textarea{min-height:110px}
#dialog[data-desk] summary{cursor:pointer;min-height:44px;padding:8px 0}
#dialog[data-desk] .form-stack{gap:16px}
#dialog[data-desk] .form-row{gap:12px}
#dialog[data-desk] .form-row label{min-width:0}
#dialog[data-desk] .form-row input{min-width:0;width:100%}
#dialog[data-desk] [hidden]{display:none!important}
#dialog[data-desk] .tarot-credits{font-size:12px}
.desk-spread-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.desk-spread-choices button{border:1px solid var(--line);padding:12px 5px;min-height:68px;border-radius:4px}
.desk-spread-choices strong{display:block;font-size:13px;font-weight:400;line-height:1.5}
.desk-spread-choices small{display:block;font:10px/1.8 var(--serif);color:var(--muted)}
.desk-spread-choices [aria-pressed=true]{border-color:var(--accent);background:#e7e1d6;color:var(--accent)}
.desk-config-preview{margin:16px 0;border-block:1px solid var(--line);padding:14px 0}
.desk-config-preview h3{font-size:17px;font-weight:500;margin:0 0 5px}
.desk-config-preview p{font-size:12px;line-height:1.7;margin:0 0 6px;color:var(--muted)}
.desk-position-preview{font-family:var(--serif)!important;font-size:11px!important}
.desk-custom-positions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px;max-height:180px;overflow:auto}
.desk-custom-positions input{padding:8px;min-height:40px}
.desk-config-preview>label{display:flex;align-items:center;gap:12px}
.desk-config-preview input[name=count]{width:85px;min-height:40px;padding:6px}
.desk-orient{display:flex;gap:20px;border:0;margin:14px 0;padding:0;flex-wrap:wrap}
.desk-orient legend{font-size:11px;color:var(--muted);margin-bottom:8px}
.desk-orient label{display:flex!important;align-items:center;gap:7px;font-size:13px}
.desk-orient input{width:18px!important;min-height:18px!important;accent-color:var(--accent);margin:0}
.desk-meaning-title{display:flex;gap:20px;align-items:center;margin:20px 0}
.desk-meaning-title img{width:66px;height:114px;object-fit:contain;border-radius:3px}
.desk-meaning-title p{font:12px/1.8 var(--serif);color:var(--muted);margin:0 0 6px}
.desk-meaning-title h3{font-size:24px;font-weight:500;margin:0 0 9px}
.desk-meaning-title small{font:12px/1.7 var(--serif);color:var(--accent)}
.desk-meaning-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:10px}
.desk-meaning-tabs button{min-height:40px;padding:7px 11px;font-size:13px;color:var(--muted)}
.desk-meaning-tabs [aria-pressed=true]{background:#e5ded2;border-radius:3px;color:var(--accent)}
.desk-meaning-text{font:16px/2 var(--serif);min-height:140px;padding-top:20px;animation:desk-content-in .16s ease-out}
.desk-meaning-text p{margin:0}
.desk-meaning-links{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:20px;font-size:12px}
.desk-meaning-links a,.desk-meaning-links button{min-height:44px;display:flex;align-items:center;color:var(--accent)}
.desk-more{display:grid;gap:12px}
.desk-more>.secondary{text-align:left;padding:12px;font-size:13px}
@keyframes desk-content-in{from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:none}}
@keyframes desk-sheet-in{from{transform:translateY(22px);opacity:.6}to{transform:none;opacity:1}}
@media(min-width:900px){.desk-card-view{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-rows:auto 1fr;gap:24px}.desk-card-view>.desk-board-viewport{grid-row:1/3}.desk-focus-card{grid-template-columns:95px minmax(0,1fr);align-self:start}.desk-focus-card .desk-card-copy{-webkit-line-clamp:unset}.desk-focus-card h2{font-size:24px}.desk-focus-card .desk-card-copy{font-size:16px}.tarot-desk-mode .tarot-flow{max-width:700px;margin:auto}.reading-desk{gap:18px}}
@media(max-width:620px){
 .tarot-desk-mode .workspace{padding:0 16px 68px}
 .tarot-desk-mode .prototype-note{min-height:30px}
 .tarot-desk-mode #main{height:calc(100dvh - 98px - env(safe-area-inset-bottom,0px))}
 .tarot-desk-mode .tarot-flow,.reading-desk{gap:8px;padding-bottom:10px}
 .desk-flow-head,.desk-result-head{min-height:52px}
 .desk-flow-head h1{font-size:22px}.desk-result-head h1{font-size:20px}
 .desk-tabs{gap:24px}.desk-tabs button{font-size:13px}
 .desk-card-view{gap:7px}.desk-focus-card{gap:14px;grid-template-columns:72px minmax(0,1fr)}
 .desk-focus-card h2{font-size:21px}.desk-focus-card .desk-card-copy{font-size:14px;line-height:1.8}
 .tarot-desk-mode .tarot-flow>.tarot-table{padding:16px}
 .tarot-desk-mode .shuffle-stack{height:auto;max-height:280px}
 .tarot-desk-mode .shuffle-card{top:50%;margin-top:-90px}
 .desk-draw-meta{min-height:38px}.desk-flow-progress{margin-bottom:8px}
 #dialog[data-desk]{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;border-radius:16px 16px 0 0;border-bottom:0;animation:desk-sheet-in .18s ease-out}
 #dialog[data-desk] .dialog-head{padding:12px 20px}.dialog-head h2{font-size:20px}
 #dialog[data-desk] .dialog-body{padding:16px 20px calc(20px + env(safe-area-inset-bottom,0px))}
}
@media(max-height:720px) and (max-width:620px){
 .desk-focus-card{grid-template-columns:54px minmax(0,1fr);gap:12px}.desk-focus-card .desk-card-copy{-webkit-line-clamp:3;font-size:13px;line-height:1.7}
 .desk-focus-card h2{font-size:18px;margin-bottom:4px}.desk-focus-card .desk-position{font-size:10px}
 .desk-result-head,.desk-flow-head{min-height:44px}.desk-result-head h1{font-size:18px}.desk-question{min-height:28px;max-height:42px;font-size:12px}
 .desk-tabs button{min-height:40px}.desk-card-strip button{min-height:38px;font-size:11px}
 .tarot-desk-mode .tarot-flow>.tarot-table{padding:12px}.tarot-desk-mode .deck-rail{min-height:180px;padding-top:35px;padding-bottom:12px}.tarot-desk-mode .deck-card{height:125px;flex-basis:74px;width:74px;margin-right:-37px}
 .tarot-desk-mode .pick-tray{padding-top:24px}.tarot-desk-mode .pick-slot-card{width:23px;height:39px}
 .tarot-desk-mode .deck-card-number{top:-26px}.tarot-desk-mode .shuffle-card{width:82px;height:141px;left:calc(50% - 41px);margin-top:-70px}
 .desk-shuffle-actions{padding:6px 0;gap:0}.desk-flow-progress{margin-bottom:0}
}
@media(prefers-reduced-motion:reduce){.desk-focus-card,.desk-meaning-text,#dialog[data-desk]{animation:none}.desk-board-fit .table-card{transition:none}}
.desk-question>.desk-question-text{color:inherit;font-size:inherit;white-space:normal;margin-left:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;flex:1}
.desk-card-question{display:block;width:100%;flex:none;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;background:transparent;text-align:left;padding:9px 0;min-width:0;color:var(--ink)}
.desk-question-label{display:flex;align-items:center;justify-content:space-between;gap:12px}
.desk-question-label small{font:11px/1.6 var(--serif);color:var(--muted)}
.desk-question-label>span{font:11px/1.6 var(--serif);color:var(--accent)}
.desk-question-value{display:block;font:13px/1.7 var(--serif);margin-top:3px;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.desk-question-value.is-empty{color:var(--muted)}
.desk-card-question:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.desk-notes-view{gap:12px}.desk-notes-view>.section-heading{flex:none;margin:0}.desk-notes-view>.section-heading h2{font-size:16px}
.desk-tabs [data-rel-drop-reflection].is-over{color:var(--accent);background:var(--paper);outline:1px dashed var(--accent);outline-offset:-3px}
.desk-question-history summary{font:12px/1.8 var(--serif);color:var(--muted);cursor:pointer}

/* Keep the spread as the main surface; read the full card in its sheet. */
.desk-card-view{display:flex;flex-direction:column;gap:8px}
.desk-focus-compact{display:flex;align-items:center;gap:12px;min-height:78px;border-top:1px solid var(--line);padding-top:7px}
.desk-card-peek{flex:1;min-width:0;text-align:left;display:flex;flex-direction:column;gap:3px;padding:0;min-height:70px;justify-content:center}
.desk-card-peek .desk-position{font-size:10px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.desk-peek-title{font-size:22px;line-height:1.4;font-weight:500}
.desk-peek-title small{font:11px var(--serif);color:var(--accent);margin-left:8px}
.desk-peek-keywords{font:12px/1.5 var(--serif);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.desk-peek-actions{display:flex;gap:14px;flex:none;align-items:center}
.desk-peek-actions .text-button{min-height:44px;font-size:12px;color:var(--accent)}
@media(max-width:620px){.desk-focus-compact{gap:10px}.desk-peek-actions{gap:10px}.desk-peek-title{font-size:21px}}
@media(max-width:620px) and (max-height:720px){.desk-question.is-empty{display:none}.desk-card-peek{min-height:63px}.desk-focus-compact{min-height:70px}.desk-peek-title{font-size:19px}.desk-peek-keywords{font-size:11px}}
@media(min-width:900px){.desk-focus-compact{align-self:stretch;min-height:86px}.desk-peek-title{font-size:24px}.desk-peek-keywords{font-size:13px}.desk-peek-actions{gap:26px}}

/* A single continuous fan: its arc follows the viewport as the deck moves. */
/* Keep touches on the green selection table from scrolling the page. Each
   nested scroll surface keeps native horizontal panning and pinch zoom. */
.pick-table,.pick-table .pick-tray,.pick-table .deck-rail,.pick-table .free-deck{touch-action:pan-x pinch-zoom}
.free-pick-table .free-deck .deck-card{touch-action:none}
.deck-rail,.tarot-desk-mode .deck-rail{
 --fan-width:92px;--fan-height:158px;--fan-step:34px;
 position:relative;flex:none;padding:58px calc(50% - var(--fan-width)/2) 55px;
 min-height:0;height:calc(var(--fan-height) + 113px);margin:0;overflow-x:auto;overflow-y:hidden;
}
.deck-rail .deck-card,.tarot-desk-mode .deck-rail .deck-card{
 width:var(--fan-width);flex:0 0 var(--fan-width);height:var(--fan-height);
 margin-right:calc(var(--fan-step) - var(--fan-width));
 transform:translateY(var(--fan-rise,0px)) rotate(var(--fan-angle,0deg));
 transform-origin:50% 85%;transition:opacity .16s;
 touch-action:pan-x pinch-zoom;
}
.deck-rail .deck-card:last-child{margin-right:0}
.deck-rail .deck-card.picked{opacity:.14;pointer-events:none}
.deck-rail .deck-card .tarot-back-art{box-shadow:0 1px 3px #101e1a38}
.deck-rail .deck-card-number{left:50%;top:-29px;font-size:11px}
.deck-rail .deck-card:focus-visible{outline:2px solid #ead5a1;outline-offset:4px}
@media(hover:hover){.deck-rail .deck-card:not(:disabled):hover{transform:translateY(calc(var(--fan-rise,0px) - 9px)) rotate(var(--fan-angle,0deg))}}
@media(max-width:620px){.deck-rail,.tarot-desk-mode .deck-rail{--fan-width:84px;--fan-height:144px;--fan-step:29px}}
@media(max-width:620px) and (max-height:720px){
 .deck-rail,.tarot-desk-mode .deck-rail{--fan-width:70px;--fan-height:120px;--fan-step:25px;padding-top:38px;padding-bottom:43px;height:201px}
 .deck-rail .deck-card-number{top:-25px;font-size:10px}
}
@media(max-width:620px) and (max-height:600px){
 .tarot-desk-mode .tarot-flow>.pick-table{justify-content:flex-start}
 .tarot-desk-mode .pick-table .table-caption{padding-bottom:0;line-height:15px}
 .tarot-desk-mode .pick-tray{padding-top:24px;padding-bottom:5px}
 .tarot-desk-mode .pick-slot-card{height:31px;width:19px}
 .tarot-desk-mode .deck-instruction{margin-top:0;padding-top:7px}
 .tarot-desk-mode .deck-rail{--fan-width:64px;--fan-height:110px;--fan-step:23px;padding-top:32px;padding-bottom:32px;height:174px}
 .tarot-desk-mode .deck-meta{flex:none;margin:0;padding-top:4px;line-height:14px;font-size:9px}
 .tarot-desk-mode .deck-meta #deck-range{font-size:10px;line-height:14px}
}

/* Full current pool, with independent scatter / crossing / gathering paths. */
.shuffle-stack{contain:layout paint}
.shuffle-stack .shuffle-card{transform:translate(var(--rest-x),var(--rest-y)) rotate(var(--rest-r));transform-origin:center;backface-visibility:hidden}
.shuffle-stack.is-shuffling .shuffle-card{animation:tarot-hand-shuffle 1450ms cubic-bezier(.4,0,.3,1) var(--delay) both}
@keyframes tarot-hand-shuffle{
 0%,100%{transform:translate(var(--rest-x),var(--rest-y)) rotate(var(--rest-r))}
 24%{transform:translate(var(--sx),var(--sy)) rotate(var(--sr))}
 53%{transform:translate(var(--mx),var(--my)) rotate(var(--mr))}
 77%{transform:translate(var(--tx),var(--ty)) rotate(var(--tr))}
}
@media(prefers-reduced-motion:reduce){.shuffle-stack.is-shuffling .shuffle-card{animation:none;will-change:auto}.deck-rail .deck-card{transition:none}}

/* Card overlap belongs to the table, never to the page's fixed navigation. */
.tarot-table{isolation:isolate;overflow:hidden}.deck-rail{isolation:isolate;z-index:0}
/* Free draws share one 360 × 300 board in every stage. */
.tarot-desk-mode #main:has(.free-pick-table){height:auto}
.tarot-desk-mode .tarot-flow:has(.free-pick-table){height:auto}
.tarot-desk-mode .tarot-flow>.free-pick-table{flex:none;justify-content:flex-start;gap:8px}
.free-help{font:12px/1.6 var(--serif);color:var(--table-muted,#b4b9a3);margin:0}
.free-canvas{position:relative;flex:none;height:clamp(210px,calc(100dvh - 510px),320px);min-height:0;background:var(--table,#303d31);border:1px solid #53604b;border-radius:5px;overflow:hidden;touch-action:none}
.free-board-fit{position:absolute;left:50%;top:50%;transform-origin:center}
.free-board{position:relative;width:360px;height:300px;min-height:0;touch-action:none}
.free-board-card{position:absolute;width:62px;height:106px;transform:translate(-50%,-50%);z-index:2;touch-action:none;cursor:grab}
.free-board-card .table-card{display:block;width:62px;height:106px;padding:0;touch-action:none;cursor:inherit;user-select:none;-webkit-user-select:none}
.free-board-card .table-card:not(:disabled):hover{transform:none}
.free-board-card .table-card img,.free-board-card .tarot-back-art{pointer-events:none;user-select:none;-webkit-user-select:none}
.free-card-number{position:absolute;top:-20px;left:50%;transform:translateX(-50%);font:12px/16px Georgia,serif;color:#ead5a1;pointer-events:none}
.free-deck{display:flex;flex:none;gap:0;overflow-x:auto;overflow-y:hidden;padding:36px 18px 8px;scrollbar-width:none;isolation:isolate;touch-action:pan-x pinch-zoom}
.free-deck .deck-card{position:relative;flex:0 0 58px;width:58px;height:98px;margin-right:-28px;z-index:1;touch-action:none}
.free-deck .deck-card-number{left:50%;top:-27px;font-size:11px}
.free-deck .deck-card:hover,.free-deck .deck-card:focus-visible{z-index:3;transform:none}
.free-deck .deck-card.picked{opacity:.18;pointer-events:none}
.free-drag-ghost{transform:translate(-50%,-50%);opacity:.9;margin:0!important;padding:0!important;touch-action:none}
.free-drag-origin{opacity:.25}
.layout-free{display:none}
@media(max-width:620px){.free-deck .deck-card{flex-basis:48px;width:48px;height:82px;margin-right:-23px}.tarot-desk-mode .free-deck .deck-card-number{top:-27px}.free-help{font-size:11px}}
.tarot-desk-mode #main{height:calc(100dvh - 52px);min-height:530px}
@media(max-width:620px){.tarot-desk-mode #main{height:calc(100dvh - 120px - env(safe-area-inset-bottom,0px));min-height:500px}.tarot-desk-mode .records-sync{flex-wrap:nowrap}}

/* Drawing is a full web viewport. Reading a saved result keeps the journal shell. */
body.tarot-immersive-mode{background:var(--table,#303d31);color:var(--table-ink,#eee6cf)}
body.tarot-immersive-mode .sidebar,body.tarot-immersive-mode .page-foot{display:none}
body.tarot-immersive-mode .workspace{display:flex;flex-direction:column;margin:0;padding:0;width:100%;max-width:none;height:100dvh;min-height:0}
body.tarot-immersive-mode .prototype-note{flex:none;min-height:26px;padding:2px 24px;color:var(--table-muted)}
body.tarot-immersive-mode #main,body.tarot-immersive-mode #main:has(.free-pick-table){flex:1;width:100%;height:auto;min-height:0;max-width:none;margin:0}
body.tarot-immersive-mode .tarot-flow,body.tarot-immersive-mode .tarot-flow:has(.free-pick-table){height:100%;min-height:0;max-width:none;margin:0;padding:12px max(28px,env(safe-area-inset-right,0px)) max(22px,env(safe-area-inset-bottom,0px)) max(28px,env(safe-area-inset-left,0px));gap:0}
body.tarot-immersive-mode .desk-flow-head{min-height:48px;gap:24px}
.desk-flow-head .desk-flow-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body.tarot-immersive-mode .desk-flow-head .back{min-width:70px;color:var(--table-ink);font-size:13px}
body.tarot-immersive-mode .desk-flow-head>.text-button{min-width:70px;text-align:right;color:var(--table-muted);font-size:12px}
body.tarot-immersive-mode .desk-flow-progress{flex:1;justify-content:center;align-items:center;gap:24px;margin:0;color:var(--table-muted);font-size:13px}
body.tarot-immersive-mode .desk-flow-progress span{padding:7px 0;border-bottom:1px solid transparent}
body.tarot-immersive-mode .desk-flow-progress [aria-current]{color:var(--table-ink);border-color:#cbb993}
body.tarot-immersive-mode .desk-draw-meta{min-height:42px;gap:14px;font-size:13px;color:var(--table-ink);padding:0 0 4px}
body.tarot-immersive-mode .desk-draw-meta>span:last-child{color:var(--table-muted);font-size:12px;white-space:nowrap}
body.tarot-immersive-mode .desk-spread-switch{color:var(--table-ink);font-size:14px;min-height:42px;padding:5px 0}
.desk-season-deadline{font:10px/1.5 var(--serif);color:var(--table-muted);margin:0 0 8px;flex:none}
body.tarot-immersive-mode .tarot-flow>.tarot-table,body.tarot-immersive-mode .tarot-flow>.free-pick-table{flex:1;min-height:0;margin:0;padding:8px 0 0;border:0;border-radius:0;box-shadow:none;background:transparent}
body.tarot-immersive-mode .tarot-table:before{display:none}
body.tarot-immersive-mode .tarot-table>.table-caption{flex:none;justify-content:flex-end;min-height:20px;padding:0 0 6px;font-size:11px}
body.tarot-immersive-mode .tarot-table>.table-caption>span:first-child{display:none}
body.tarot-immersive-mode .shuffle-stack{flex:1;width:100%;max-width:none;min-height:100px;max-height:none;height:auto;margin:0}
body.tarot-immersive-mode .shuffle-card{width:156px;height:267px;left:calc(50% - 78px);top:50%;margin-top:-134px}
body.tarot-immersive-mode .desk-shuffle-actions{padding:10px 0 0;gap:6px;margin-top:auto}
body.tarot-immersive-mode .desk-shuffle-actions>.table-button{width:min(100%,300px);font-size:16px;min-height:48px}
body.tarot-immersive-mode .table-line{margin:8px 0;font-size:13px;min-height:25px;flex:none}
body.tarot-immersive-mode .shuffle-table>.table-line{min-height:25px;margin:0}
body.tarot-immersive-mode .shuffle-table>.table-actions{margin-top:14px}
body.tarot-immersive-mode .shuffle-table>.table-note{display:none}
body.tarot-immersive-mode .table-actions{margin:12px 0 0;gap:12px;flex:none}
body.tarot-immersive-mode .cut-piles{min-height:0;margin:0;align-items:center;gap:clamp(28px,7vw,110px)}
body.tarot-immersive-mode .cut-pile{width:clamp(76px,10vw,124px);height:auto;aspect-ratio:124/215;flex:none}
body.tarot-immersive-mode .pick-tray{margin:0;padding:28px 0 12px;gap:10px;flex:none}
body.tarot-immersive-mode .pick-slot{flex-basis:60px}
body.tarot-immersive-mode .pick-slot-card{width:42px;height:71px;font-size:17px}
body.tarot-immersive-mode .deck-instruction{margin-top:auto;padding-top:20px}
body.tarot-immersive-mode .deck-instruction h2{font-size:17px}
body.tarot-immersive-mode .deck-rail{--fan-width:110px;--fan-height:190px;--fan-step:42px;height:303px;padding-top:58px;padding-bottom:55px}
body.tarot-immersive-mode .deck-meta{margin:0 0 auto;flex:none;font-size:11px}
body.tarot-immersive-mode .desk-board-viewport,body.tarot-immersive-mode .free-canvas{border:0;border-radius:0;background:transparent}
body.tarot-immersive-mode .tarot-flow>.free-pick-table{gap:8px;justify-content:flex-start}
body.tarot-immersive-mode .free-canvas{height:auto;min-height:100px;flex:1}
body.tarot-immersive-mode .free-help{font-size:11px;color:var(--table-muted)}
body.tarot-immersive-mode .free-deck{padding-inline:0;border-top:1px solid #b3ac872b;padding-top:34px}
body.tarot-immersive-mode .free-deck .deck-card{width:64px;flex-basis:64px;height:109px;margin-right:-31px}
body.tarot-immersive-mode .tarot-flow>.tarot-credits{display:none}
body.tarot-immersive-mode #main button:focus-visible,body.tarot-immersive-mode #main a:focus-visible{outline-color:#ead5a1}
@media(min-width:900px){body.tarot-immersive-mode .tarot-flow{padding-inline:clamp(36px,5vw,100px)}body.tarot-immersive-mode .desk-draw-meta{padding-top:4px}body.tarot-immersive-mode .free-help{font-size:12px}}
@media(max-width:620px){
 body.tarot-immersive-mode .tarot-flow,body.tarot-immersive-mode .tarot-flow:has(.free-pick-table){padding:4px max(16px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
 body.tarot-immersive-mode .desk-flow-head{min-height:44px;gap:10px}
 body.tarot-immersive-mode .desk-flow-head .back{min-width:50px;font-size:12px}
 body.tarot-immersive-mode .desk-flow-head>.text-button{min-width:50px;font-size:10px}
 body.tarot-immersive-mode .desk-flow-progress{gap:16px;font-size:12px}
 body.tarot-immersive-mode .desk-draw-meta{min-height:38px;font-size:12px;padding:0}
 body.tarot-immersive-mode .desk-spread-switch{font-size:13px;min-height:38px;padding:4px 0}
 body.tarot-immersive-mode .desk-draw-meta>span:last-child{font-size:10px}
 body.tarot-immersive-mode .shuffle-card{width:128px;height:219px;left:calc(50% - 64px);margin-top:-110px}
 body.tarot-immersive-mode .desk-shuffle-actions{padding-top:8px;gap:4px}
 body.tarot-immersive-mode .desk-shuffle-actions>.table-button{width:min(100%,280px);font-size:15px;min-height:48px}
 body.tarot-immersive-mode .pick-tray{padding-top:26px;padding-bottom:10px;gap:6px}
 body.tarot-immersive-mode .pick-slot{flex-basis:42px}
 body.tarot-immersive-mode .pick-slot-card{width:34px;height:58px;font-size:16px}
 body.tarot-immersive-mode .deck-instruction{padding-top:12px}
 body.tarot-immersive-mode .deck-instruction h2{font-size:16px}
 body.tarot-immersive-mode .deck-rail{--fan-width:94px;--fan-height:162px;--fan-step:33px;height:264px;padding-top:48px;padding-bottom:54px}
 body.tarot-immersive-mode .deck-rail .deck-card-number{top:-29px;font-size:11px}
 body.tarot-immersive-mode .free-deck .deck-card{width:54px;flex-basis:54px;height:92px;margin-right:-26px}
 body.tarot-immersive-mode .table-actions>.table-button{font-size:12px;min-height:46px;padding:10px 15px}
 body.tarot-immersive-mode .free-pick-table>.table-actions{margin-top:2px}
}
@media(max-height:620px){
 body.tarot-immersive-mode .tarot-flow,body.tarot-immersive-mode .tarot-flow:has(.free-pick-table){padding-top:0;padding-bottom:max(10px,env(safe-area-inset-bottom,0px))}
 body.tarot-immersive-mode .desk-flow-head{min-height:44px}
 body.tarot-immersive-mode .desk-draw-meta{min-height:34px}
 body.tarot-immersive-mode .desk-spread-switch{min-height:34px;padding:2px 0}
 body.tarot-immersive-mode .shuffle-card{width:100px;height:171px;left:calc(50% - 50px);margin-top:-86px}
 body.tarot-immersive-mode .desk-shuffle-actions{gap:0;padding-top:4px}
 body.tarot-immersive-mode .pick-tray{padding-top:25px;padding-bottom:5px}
 body.tarot-immersive-mode .pick-slot{flex-basis:34px}
 body.tarot-immersive-mode .pick-slot-card{width:25px;height:43px}
 body.tarot-immersive-mode .deck-instruction{padding-top:8px}
 body.tarot-immersive-mode .deck-rail{--fan-width:82px;--fan-height:141px;--fan-step:29px;height:216px;padding-top:36px;padding-bottom:39px}
 body.tarot-immersive-mode .deck-meta{padding-top:4px;font-size:10px;line-height:14px}
 body.tarot-immersive-mode .deck-meta #deck-range{font-size:10px;line-height:14px}
 body.tarot-immersive-mode .free-deck .deck-card{width:44px;flex-basis:44px;height:75px;margin-right:-21px}
 body.tarot-immersive-mode .free-deck{padding-top:29px;padding-bottom:4px}
 body.tarot-immersive-mode .table-line{min-height:21px;margin:4px 0;font-size:12px}
 body.tarot-immersive-mode .table-actions{margin-top:6px}
}
@media(max-height:460px) and (min-width:621px){
 body.tarot-immersive-mode .desk-draw-meta{position:absolute;top:8px;left:50%;transform:translateX(-50%);max-width:44%;min-height:32px}
 body.tarot-immersive-mode .desk-flow-progress{visibility:hidden}
 body.tarot-immersive-mode .tarot-flow>.tarot-table{padding-top:0}
 body.tarot-immersive-mode .desk-shuffle{position:relative;padding-bottom:0}
 body.tarot-immersive-mode .desk-shuffle-actions{position:absolute;right:0;bottom:0;width:220px}
 body.tarot-immersive-mode .desk-shuffle .shuffle-stack{width:calc(100% - 230px)}
 body.tarot-immersive-mode .desk-shuffle>.table-line{width:calc(100% - 230px)}
 body.tarot-immersive-mode .pick-table:not(.free-pick-table)>.table-caption{position:absolute;top:0;right:0}
 body.tarot-immersive-mode .pick-tray{padding-top:22px;padding-bottom:0}
 body.tarot-immersive-mode .pick-slot-card{width:20px;height:34px}
 body.tarot-immersive-mode .deck-instruction{padding-top:0}
 body.tarot-immersive-mode .deck-instruction h2{font-size:13px}
 body.tarot-immersive-mode .deck-rail{--fan-width:68px;--fan-height:117px;--fan-step:25px;height:181px;padding-top:30px;padding-bottom:34px}
 body.tarot-immersive-mode .cut-pile{width:70px}
 body.tarot-immersive-mode .free-pick-table{display:grid!important;grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:auto auto minmax(0,1fr) auto;column-gap:18px!important}
 body.tarot-immersive-mode .free-pick-table>.table-caption{grid-column:2;grid-row:1}
 body.tarot-immersive-mode .free-help{grid-column:2;grid-row:2}
 body.tarot-immersive-mode .free-canvas{grid-column:1;grid-row:1/5;min-height:0;height:100%}
 body.tarot-immersive-mode .free-deck{grid-column:2;grid-row:3;align-self:end}
 body.tarot-immersive-mode .free-pick-table>.table-actions{grid-column:2;grid-row:4}
}

/* A constant status row avoids moving the table when account saving changes. */
body.tarot-immersive-mode .tarot-flow>.tarot-table,body.tarot-immersive-mode .tarot-flow>.free-pick-table{padding-top:44px}
@media(max-height:460px) and (min-width:621px){body.tarot-immersive-mode .tarot-flow>.tarot-table,body.tarot-immersive-mode .tarot-flow>.free-pick-table{padding-top:36px}}

/* The spread catalogue grows only when requested; current selection stays close to confirmation. */
#desk-config-form{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(260px,1fr);gap:28px;align-items:start}
#dialog #desk-config-form{display:block}
.desk-config-library,.desk-config-selection{min-width:0}
.desk-config-selection{position:sticky;top:18px}
.desk-spread-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.desk-spread-choices button{padding:16px 14px;text-align:left;min-height:84px}
.desk-spread-choices strong{font-size:16px;line-height:1.65;text-wrap:balance}
.desk-spread-choices small{font-size:12px;margin-top:4px}
.desk-spread-more{margin-top:12px}
.desk-spread-more summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;min-height:46px;font-size:14px;color:var(--accent);border-bottom:1px solid var(--line);list-style:none}
.desk-spread-more summary::-webkit-details-marker{display:none}
.desk-spread-more summary:after{content:'＋';margin-left:12px}
.desk-spread-more[open] summary:after{content:'−'}
.desk-spread-more summary span{margin-left:auto;color:var(--muted);font-size:12px}
.desk-spread-more .desk-spread-choices{margin-top:12px}
.desk-config-preview{margin:0 0 20px;padding:0 0 20px;border-top:0}
.desk-config-preview h3{font-size:23px;margin-bottom:12px}
.desk-config-preview p{font-size:14px;line-height:1.85}
.desk-config-preview .desk-config-caption{font-size:12px;letter-spacing:.08em;margin-bottom:8px}
.desk-config-selection .desk-orient{font-size:14px;margin-bottom:20px}
#dialog .desk-config-selection{margin-top:24px;position:static}
.desk-layout-control{display:flex;justify-content:flex-end;margin:0 0 8px}
.desk-layout-control button{font-size:13px;min-height:36px}
.desk-single-preview{--card-width:132px}
@media(min-width:900px) and (min-height:600px){
 body.tarot-immersive-mode .deck-rail{--fan-width:134px;--fan-height:230px;--fan-step:60px;height:358px;padding-top:64px;padding-bottom:64px}
 body.tarot-immersive-mode .deck-rail .deck-card-number{left:28px;font-size:13px}
 body.tarot-immersive-mode .free-deck .deck-card{width:82px;flex-basis:82px;height:140px;margin-right:-37px}
}
@media(max-width:900px){#desk-config-form{grid-template-columns:1fr;gap:24px}.desk-config-selection{position:static}}
@media(max-width:620px){.desk-spread-choices strong{font-size:15px}.desk-spread-choices button{padding:13px 12px;min-height:82px}.desk-config-preview h3{font-size:21px}.desk-config-selection .primary{min-height:48px;font-size:15px}.desk-single-preview{--card-width:128px}}
/* A catalogue has a page title; draw steps start after a spread is chosen. */
.tarot-flow:has(.desk-legacy-setup) .desk-flow-head{margin-bottom:24px}
.tarot-flow:has(.desk-legacy-setup) .desk-flow-title{display:block;position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal;font-size:28px;line-height:1.5;margin:0 auto 0 12px}
.tarot-flow:has(.desk-legacy-setup) .desk-flow-progress,.tarot-flow:has(.desk-legacy-setup)>.desk-draw-meta{display:none}
@media(max-width:620px){.tarot-flow:has(.desk-legacy-setup) .desk-flow-title{font-size:24px}.tarot-flow:has(.desk-legacy-setup) .desk-flow-head{gap:10px;margin-bottom:20px}}
