/* A single table for recreating a position and playing the current hand. */
.table-surface{border-radius:10px;transition:background .2s;padding:8px}
.table-surface.is-fantasy{background:#372052}
.table-controls{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:116px}
.table-mode{display:flex;align-self:flex-start;gap:0;border:1px solid #414148;border-radius:9px;overflow:hidden}
.table-mode button{border:0;border-radius:0;padding:12px 25px;background:#242424}
.study-page #tableSurface .table-mode button.active{background:#f0cf6a;color:#1a1a1a;font-weight:800}
.position-map{position:relative;width:160px;height:114px;border:2px solid #424247;border-radius:48%;flex-shrink:0}
.position-chip{position:absolute;border-radius:50%!important;width:43px;height:43px;padding:0;font-size:12px;background:#29292e;border:2px solid #616168}
.position-chip.front{left:50%;bottom:-5px;transform:translateX(-50%)}
.position-chip.opposite{left:50%;top:-5px;transform:translateX(-50%)}
.position-chip.upper-left{left:-3px;top:1px}.position-chip.upper-right{right:-3px;top:1px}
.study-page #tableSurface .position-map .position-chip.hero{color:#1a1a1a;background:#f0cf6a;border-color:#f0cf6a;font-weight:800}
.fantasy-controls{display:flex;align-items:center;gap:10px;align-self:flex-start;min-width:105px}
.fl-switch{display:flex;align-items:center;gap:8px;cursor:pointer;position:relative}
.fl-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:1}
.fl-switch .switch-track{display:block;width:52px;height:30px;background:#45454c;border-radius:20px;margin:0;position:relative}
.switch-track:after{content:'';width:24px;height:24px;border-radius:50%;background:white;position:absolute;left:3px;top:3px;transition:transform .15s}
.fl-switch input:checked+.switch-track{background:#7645ba}.fl-switch input:checked+.switch-track:after{transform:translateX(22px)}
.fl-switch input:focus-visible+.switch-track{outline:2px solid #f0cf6a;outline-offset:3px}.fl-switch input:disabled{cursor:not-allowed}
.table-status{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:10px 0 22px;font-size:12px;color:#b3b3b8}.table-status strong{color:#f0cf6a}
.table-workspace{display:grid;grid-template-columns:minmax(310px,.95fr) minmax(0,1.35fr);gap:32px}
.table-board-area,.table-deck-panel{min-width:0}.table-deck-panel{align-self:start;position:sticky;top:16px;background:#161616;border:1px solid #303035;padding:18px;border-radius:12px;margin-top:120px}
.table-board-heading{display:flex;gap:10px;justify-content:space-between;margin:12px 0}.table-board-heading button{font-size:12px}.table-board-heading .active{color:#f0cf6a;border-color:#887637}
.table-board-area h2{font-size:19px;margin-bottom:5px}.table-board-area #tableBoardNote{margin-top:5px}
.opponent-previews{display:flex;justify-content:flex-end;gap:9px;min-height:116px}.opponent-preview{display:flex;flex-direction:column;gap:4px;padding:10px 13px;background:#131313;border:1px solid #38383e;min-width:130px;text-align:left}
.opponent-preview.active{border-color:#f0cf6a}.opponent-preview small{font-size:10px;color:#b3b3b8}.mini-row{display:flex;gap:3px}
.study-page .opponent-preview .playing-card,.mini-row i{display:inline-flex;width:15px;height:20px;font-size:13px;border-radius:2px!important}.mini-row i{background:#2b2b30;border:1px solid #3b3b43}
.table-board-row{display:flex;align-items:center;gap:12px;padding:10px;margin:7px 0;background:#131313;border:1px solid #38383e;border-radius:9px;min-height:81px}
.table-row-label{width:45px;flex:0 0 45px;font-size:11px;color:#b3b3b8}.table-board-row .row-cards{display:flex;gap:7px;flex-wrap:nowrap}
.study-page #tableSurface .table-board-row .playing-card,.study-page #tableSurface .table-board-row .slot,.study-page #tableSurface .table-hand .playing-card{width:42px;height:58px;font-size:34px;min-width:0}
.study-page #tableSurface .slot{font-size:22px;color:#676671;background:#202020;border:1px dashed #55555e}
.study-page #studyDiscards.fantasy-discards{flex-wrap:nowrap;gap:7px}
.study-page #tableSurface #studyDiscards.fantasy-discards>.playing-card,.study-page #tableSurface #studyDiscards .fantasy-discard-slot{width:38px;height:50px;min-width:38px;flex:0 0 38px}
.study-page #tableSurface #studyDiscards .fantasy-discard-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0;color:#b3b3b8;line-height:1}
.fantasy-discard-slot .discard-rank{font-size:11px;font-weight:700}.fantasy-discard-slot .discard-count{font-size:14px}
.study-page #tableSurface #studyDiscards .fantasy-discard-slot:disabled{opacity:1;color:#676671}
.study-page #tableSurface .playing-card.locked{opacity:.6}.hand-heading{display:flex;justify-content:space-between;margin:20px 0 10px}.table-hand{border:1px solid #3a3a40;border-radius:8px;background:#131313;padding:10px;gap:7px;min-height:81px}
.study-page #tableSurface .table-hand .hand-slot{min-width:42px;max-width:120px;width:auto;padding:7px;font-size:11px}
.table-drop.armed{border-color:#7a9ebb!important;box-shadow:inset 0 0 0 1px #7a9ebb}.table-drop.drop-hover{outline:2px solid #f0cf6a;outline-offset:2px;background:#302c1b!important}
.study-page #tableSurface .playing-card.table-draggable{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.table-draggable *{pointer-events:none}
.table-drag-ghost{position:fixed!important;z-index:10000;pointer-events:none!important;transform:translate(-50%,-70%) rotate(-5deg)!important;width:44px!important;height:60px!important;font-size:34px!important;opacity:.95;box-shadow:0 10px 28px #0009}
#cardPicker{display:block;max-width:none;margin:16px 0}.table-deck-row{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:4px;margin-bottom:7px}.table-joker-cell{min-width:0}
.study-page #cardPicker .playing-card{width:100%;height:auto;aspect-ratio:32/45;max-width:none;min-height:0;font-size:clamp(17px,2.5vw,36px);min-width:0;padding:0;position:relative}
.study-page .playing-card .card-rank{font-size:inherit;line-height:1}.study-page .playing-card .card-rank--ten{font-size:inherit;transform:scaleX(.82)}
#cardPicker button:disabled{opacity:.14}#cardPicker .paid-card{opacity:.55}.card-lock{position:absolute;right:1px;bottom:1px;font-size:9px;color:#fdfdfd;background:#382051;border-radius:2px;line-height:1}
#deckInstruction{color:#f0cf6a;min-height:36px}#pastCardSection{margin:15px 0}#tableMessage:empty{display:none}#startPlacement{width:100%;margin:5px 0 15px}
.study-page .study-workspace{grid-template-columns:1fr}.study-page .study-workspace>aside{width:100%}
@media(max-width:1000px){.table-workspace{grid-template-columns:minmax(285px,1fr) minmax(0,1fr);gap:18px}.table-deck-panel{padding:12px}.table-deck-row{gap:3px}.study-page #cardPicker .playing-card{font-size:23px}.study-page #tableSurface .table-board-row .playing-card,.study-page #tableSurface .table-board-row .slot{width:36px;height:51px;font-size:30px}.table-board-row{gap:7px;padding:8px}.table-board-row .row-cards{gap:4px}.table-row-label{width:34px;flex-basis:34px}}
@media(max-width:760px){.table-surface{padding:0}.table-controls{gap:10px;min-height:100px}.table-mode button{padding:10px 14px;font-size:12px}.position-map{width:100px;height:94px}.position-chip{width:35px;height:35px;font-size:10px}.fantasy-controls{min-width:75px;flex-direction:column;gap:6px}.fl-switch{gap:5px;font-size:11px}.fl-switch .switch-track{width:44px;height:27px}.switch-track:after{width:21px;height:21px}.fl-switch input:checked+.switch-track:after{transform:translateX(17px)}.table-workspace{display:flex;flex-direction:column;gap:12px}.table-deck-panel{position:static;margin-top:0;order:0;width:100%}.table-board-area{order:1}.opponent-previews{min-height:100px;justify-content:flex-end}.table-status{gap:8px;margin:10px 0 12px;font-size:11px}.table-deck-row{gap:3px;margin-bottom:6px}.study-page #cardPicker .playing-card{font-size:clamp(15px,4.25vw,28px)}.table-deck-panel h2{font-size:17px;margin-bottom:5px}#deckInstruction{font-size:11px;margin:7px 0;min-height:0}.table-deck-panel>p:last-child{font-size:10px;margin-bottom:0}#cardPicker{margin:12px 0}.table-board-row{min-height:72px}.study-page #tableSurface .table-board-row .playing-card,.study-page #tableSurface .table-board-row .slot{width:40px;height:55px;font-size:32px}.table-board-row .row-cards{gap:5px}.table-row-label{width:40px;flex-basis:40px}.table-board-heading{margin-top:10px}.hand-heading{margin-top:16px}#returnToDeck{font-size:11px;padding:7px}.opponent-preview{min-width:120px}.card-lock{font-size:7px}}
@media(max-width:380px){.study-page #tableSurface .table-board-row .playing-card,.study-page #tableSurface .table-board-row .slot{width:34px;height:48px;font-size:28px}.table-row-label{width:30px;flex-basis:30px}.table-mode button{padding:9px 10px}.table-deck-row{gap:2px}.table-deck-panel{padding:9px}}

/* Fixed seat selector. Seat identity never changes geometric position. */
.table-controls{display:grid;grid-template-columns:1fr minmax(200px,440px) 1fr;align-items:center;gap:28px;min-height:170px}
.table-mode{justify-self:start}.fantasy-controls{justify-self:end}
.position-map{width:100%;height:138px;border:3px solid #2b2b2f;border-radius:999px;background:#161619;margin:19px 0}
.position-chip{width:49px;height:49px;border:2px solid #48484e;background:#202020;color:#f2f2f4;font-weight:800;font-size:13px;box-shadow:none}
.position-chip.front{bottom:-25px}.position-chip.opposite{top:-25px}
.position-chip.upper-left{left:12%;top:-20px}.position-chip.upper-right{right:12%;top:-20px}
.study-page #tableSurface .position-map .position-chip.hero{color:white;background:#202020;border-color:#f0cf6a;box-shadow:0 0 0 1px #f0cf6a}
.position-chip:focus-visible{outline:2px solid #f0cf6a;outline-offset:4px}
#verificationResults .move-groups{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#verificationResults .playing-card{width:27px;height:38px;font-size:23px}
.owner-access{margin:12px 0;font-size:12px;color:#b3b3b8}.owner-access button{font-size:12px;padding:7px 12px}.owner-access strong{color:#00c3a7}.owner-access p{margin:8px 0}
@media(max-width:900px){.table-controls{grid-template-columns:1fr 1fr;gap:10px;min-height:220px}.table-mode{grid-column:1;grid-row:1}.fantasy-controls{grid-column:2;grid-row:1}.position-map{grid-column:1/3;grid-row:2;justify-self:center;width:min(100%,400px);height:120px;margin:26px 0}.position-chip{width:46px;height:46px;font-size:12px}.position-chip.front{bottom:-24px}.position-chip.opposite{top:-24px}.fantasy-controls{flex-direction:row}}

.stack-controls{background:#18181b;padding:14px;border:1px solid #38383c;border-radius:12px;margin:16px 0}.stack-controls strong,.stack-controls small{display:block}.stack-controls small{color:#adb8ca;margin-top:8px}.stack-fields{display:flex;gap:16px;margin-top:10px;flex-wrap:wrap}.stack-fields label{display:flex;align-items:center;gap:10px}.stack-fields input{width:100px;font:inherit;padding:8px;border-radius:8px;background:#27272b;color:#fdfdfd;border:1px solid #49494e}

.stack-controls>label{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;font-size:12px}.stack-controls select{font:inherit;max-width:100%;padding:8px;border-radius:7px}.stack-controls input:disabled,.stack-controls select:disabled{opacity:1;color:#dcdcdc;-webkit-text-fill-color:#dcdcdc}

.position-chip:disabled{opacity:1;cursor:default}
.table-row-content{min-width:0;display:flex;flex-direction:column;gap:6px}
.study-page .row-royalty{color:var(--accent,#f0cf6a);font-size:12px;font-weight:800;line-height:1.35}
.study-page .opponent-preview .row-royalty{font-size:9px;max-width:155px}
.fantasy-tools{margin:8px 0 12px;padding:10px;background:#21192c;border:1px solid #68438c;border-radius:9px}
.fantasy-sort{display:flex;gap:8px;margin-bottom:9px}.fantasy-sort button,.fantasy-categories button{font-size:12px;padding:7px 9px}
.fantasy-categories{display:flex;flex-wrap:wrap;gap:5px}.study-page .fantasy-tools button.active{color:#f0cf6a;border-color:#f0cf6a;background:#403522}
.fantasy-tools p{margin:9px 0 3px}.fantasy-selected{display:inline-flex;gap:4px;padding:9px 5px;touch-action:none;cursor:grab;user-select:none}
.study-page .fantasy-selected .playing-card{width:32px;height:44px;font-size:27px}.fantasy-selected *{pointer-events:none}
