#local-study{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:5px clamp(12px,2vw,30px);background:#342c25;color:#fff0d1;border-bottom:1px solid #857057;font-size:.8rem}
#local-study>span{font-weight:bold}#local-study small{display:inline-block;margin-left:12px;color:#e8d8ba;font-weight:normal}#local-study>div{display:flex;gap:5px}#local-study button{min-height:44px;padding:5px 12px;border-radius:4px;font-size:.8rem;color:#fff0d1;background:#44392d}#local-study button[aria-pressed=true]{background:#e7bd62;color:#30231a;border-color:#f8d98e}
.study-interface{--ink:#302c25;--muted:#655b4a;--paper:#f2e8d3;--dark:#352f27;--gold:#e7bd62;color:#302c25;background:#e5dac4;color-scheme:light}
.study-interface button{color:#443927;background:#f4e8d0;border-color:#aa9978}.study-interface button:hover:not(:disabled){background:#e2cfaa}.study-interface .primary{background:#e7bd62;color:#30231a;border-color:#ae843d}.study-interface .primary:hover:not(:disabled){background:#f5d383}.study-interface .wordmark.small{background:none;border:0}.study-interface dialog{--ink:#f7ecd4;--muted:#d3c3a9;background:#29221d;color:#f7ecd4}.study-interface .game-card:has(.skill-slot.legal){outline:2px solid #e7bd62;outline-offset:4px}
.study-interface #topbar{background:#f6efdf;border-color:#ac9b7c;padding:8px 24px;min-height:65px}.study-interface #topbar .quiet{color:#453a2a}.study-interface .room-code{color:#68502c}.study-interface .connection{color:#365a37}.study-interface .connection.offline{color:#893622}.study-interface .flag{background:#fff8e9}.study-interface .flag.active{border-color:#80602e}.study-interface .icon-button{background:#f0e3c9;color:#403528}.study-interface :focus-visible{outline-color:#286375}
.study-interface .game-layout{max-width:1780px;grid-template-columns:minmax(0,1fr) 220px;gap:20px;padding:16px 24px 32px}.study-interface .table-zone{grid-column:1;grid-row:1;padding-bottom:0}.study-interface .players-strip{grid-column:2;grid-row:1;position:sticky;top:12px;display:flex;flex-direction:column;align-items:stretch;padding-top:0;gap:8px;max-height:calc(100dvh - 25px);overflow:auto;scrollbar-width:thin}
.study-interface .player-summary{padding:10px;background:#f5ebd7;border-radius:5px;border:1px solid #b6a78a;box-shadow:none;gap:10px}.study-interface .player-summary.local-player{background:#fff5da;outline:2px solid #8e7139;outline-offset:-2px}.study-interface .player-summary strong{font-size:.94rem}.study-interface .player-summary span{color:#655744;font-size:.76rem}.study-interface .mini-portrait{width:44px;height:55px;border-radius:4px;background:#dfcda9}.study-interface .mini-dice span{box-shadow:0 1px 0 #8c7b5c}.study-interface .mini-dice span.committed{outline:2px solid #5a4a32}.study-interface .offline-label{color:#893622!important}
.study-interface .match-heading{margin:0 0 8px;min-height:48px}.study-interface .match-heading h1{font-size:clamp(1.4rem,2vw,1.9rem)}.study-interface .match-heading span{color:#655744}.study-interface .table-tools .quiet{color:#4c3c25;background:#f4e9d0;border:1px solid #b2a083}.study-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px;padding:6px 0;border-block:1px solid #b5a58a}.study-controls[hidden],.study-score[hidden]{display:none}.study-action-note{display:flex;align-items:center;gap:8px;font-size:.82rem}.study-action-note>svg{flex:0 0 28px}.study-small-controls{display:flex;gap:4px;flex-shrink:0}.study-small-controls button{background:#f7edda;color:#443927;border:1px solid #a6977a;border-radius:3px;min-width:44px;padding:6px 9px;font-size:.79rem}.study-small-controls button[aria-pressed=true]{background:#40594b;color:#fff2d5}.study-small-controls button:hover:not(:disabled){background:#e4d4b5}
.study-interface .play-guide{background:#f8f1e3;border:0;border-radius:3px;margin:8px 0 10px;padding:8px 10px}.study-interface .guide-goal strong{color:#344b3e;font-size:.92rem}.study-interface .guide-goal>span{color:#655744}.study-interface .guide-flow{color:#655744}.study-interface .guide-flow small{color:#514633}.study-interface .guide-flow i{color:#365a37}.study-interface .guide-match{background:#e5d3ad}.study-interface .guide-role{width:32px;height:39px}
.study-interface .dungeon-table{display:flex;flex-direction:column;gap:18px;padding:22px 24px;background:linear-gradient(#30483cf2,#30483cf2),url('/assets/dungeon.webp') center/cover;border:8px solid #8a6b44;border-radius:9px;box-shadow:0 3px 0 #5b4530,0 8px 15px #4e3b222e;perspective:1200px}.study-interface .card-lane{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:12px;order:0}.study-interface .sorcerer-lane{order:0}.study-interface .dragon-track{order:1;max-width:none;min-height:58px;width:100%;margin:0;align-self:center}.study-interface .hero-lane{order:2}.study-interface .dragon-track.no-dragon{min-height:28px}.study-interface .lane-label{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:9px;margin:0;padding:12px 8px;background:none;border:0;text-shadow:none;font-size:1.3rem;color:#fff0d1}.study-interface .lane-label>span{font-size:.76rem;line-height:1.5;max-width:100%;text-align:left;margin:0;color:#e2dcc9}.study-interface .your-lane .lane-label::after{content:'Your side';font-family:TableSans,sans-serif;font-size:.7rem;color:#fff4ce;border:1px solid #dfc387;padding:4px 6px;border-radius:3px}.study-interface:lang(fr) .your-lane .lane-label::after{content:'Votre camp'}
.study-interface .lane-cards{display:grid;grid-template-columns:repeat(3,minmax(0,var(--study-card,176px)));justify-content:center;gap:15px;max-width:none;width:100%;margin:0}.study-interface .lane-cards>.game-card{width:100%;min-height:0;aspect-ratio:2/3}.study-interface .sealed-deck{display:none}.study-interface .game-card{box-shadow:2px 4px 0 #172c23,4px 7px 8px #10221966;border-radius:7px}.study-interface .card-heading{background:#f4e8ce;color:#312a20;height:50px;border-radius:6px 6px 0 0;border-bottom:1px solid #ad9671}.study-interface .inspect{color:#433727;background:#fff5df;border:1px solid #b2a181;min-height:44px;min-width:44px}.study-interface .card-progress>span{background:#3e4d41;color:#f6eacd}.study-interface .card-progress .in-progress{background:#e7bd62;color:#30231a}.study-interface .card-progress .progress-sorcerer i{color:#e0daef}.study-interface .afflicted-name{color:#fff0ce}.study-interface .dragon-step{background:#f2e7ce;color:#403523;border-color:#b6a17a}.study-interface .dragon-step.current{background:#e7bd62;color:#30231a}.study-interface .soul-count,.study-interface .life-count{color:#fff3d8;background:#263b30}
.study-interface .table-feedback{background:#f8f0df;border:1px solid #b9a786;border-radius:4px;padding:8px 11px;min-height:64px;margin:12px 0}.study-interface .table-feedback strong{color:#3f4f37}.study-interface .table-feedback p{color:#655744}.study-interface .cue-flow>b{color:#77531f}.study-interface .extra-zone,.study-interface .extra-zone:has(.extra-cards>.game-card:only-child){float:none;position:static;max-width:none;width:100%;padding:0;margin:12px 0}.study-interface .extra-zone h2{font-size:1rem;color:#54452d}.study-interface .extra-cards{display:flex;gap:12px;overflow-x:auto;padding:6px 2px 14px}.study-interface .extra-cards>.game-card{width:150px;min-width:150px;min-height:225px}
.study-interface .tray,.study-interface .extra-zone:has(.extra-cards>.game-card:only-child)+.tray{position:sticky;bottom:8px;margin:12px 0 0;width:100%;max-width:none;padding:10px 14px;border:1px solid #ad9671;background:#f7eedc;box-shadow:0 -3px 13px #302c251c;border-radius:6px;z-index:30}.study-interface .tray-head{min-height:40px}.study-interface .tray-character{width:32px;height:38px}.study-interface .tray-head strong{font-size:.85rem;color:#3f3526}.study-interface .tray-head p{color:#655744;font-size:.75rem}.study-interface .tray-actions{justify-content:flex-end;gap:8px;margin-top:5px}.study-interface .tray-actions .secondary{background:#f1e1c1;color:#493923;border-color:#a8936c}.study-interface .toss-hint{color:#655744;font-size:.75rem;margin:5px 0;max-width:100%}.study-interface .toss-hint>svg{width:22px;height:22px}.study-interface .die-caption{color:#3c3226}.study-interface .table-die .die-caption{background:#fff0d5f5;color:#30231a}.study-interface .dice-row{height:88px;max-width:620px}.study-interface .dice-row:not(:has(.die-button:not(.table-die))){height:0}.study-interface .owned-items .text-button{color:#544126}
.study-score{background:#f5ebd7;border:1px solid #b6a78a;border-radius:5px;color:#463b2b;font-size:.8rem}.study-score summary{cursor:pointer;min-height:44px;padding:12px 10px;list-style-position:inside;font-weight:bold}.study-score summary>span{float:right;font-variant-numeric:tabular-nums}.study-score>div{padding:0 12px 12px}.study-score h3{font-size:.98rem;margin:14px 0 5px}.study-score p{font-size:.78rem;line-height:1.5}.study-score-footnote{border-top:1px solid #bdad8e;padding-top:10px;margin-top:12px;color:#655744}.study-score summary:focus-visible{outline-offset:-4px}
#study-tooltip{position:fixed;z-index:250;width:min(330px,calc(100vw - 16px));padding:12px 14px;background:#fff5df;color:#352c20;border:1px solid #8e7953;border-radius:5px;box-shadow:0 5px 16px #19140f4d;pointer-events:auto;font-size:.84rem;line-height:1.5}#study-tooltip[hidden]{display:none}#study-tooltip strong{font-size:.92rem}#study-tooltip p{margin-top:6px}.study-help [data-study-tip]{cursor:help}.study-help .skill-slot,.study-help .inspect{outline:2px dotted #e7bd62;outline-offset:2px}.study-interface .skill-slot.legal{outline:3px solid #bdda8c}.study-interface .skill-slot.drag-over{outline:4px solid #8bc977}
.study-interface .menu-line,.study-interface .menu-intro,.study-interface .entry-hint{color:#5a4930}.study-interface .menu-copy label,.study-interface .lobby label{color:#3c3226}.study-interface .menu-copy .text-button{color:#5a3c23}.study-interface .lobby-heading p,.study-interface .scenario-picker p,.study-interface .empty-seat{color:#655744}.study-interface .lobby-start p{color:#4c3c25}.study-interface .lobby .secondary{background:#e5d4b1;color:#453725}.study-interface .lobby .text-button{color:#5a3c23}.study-interface dialog{color:#f7ecd4}.study-interface .menu input,.study-interface .lobby select{color:#30231a;background:#fff6e4}.study-interface .results{color:#30231a}
@media(min-width:1600px){.study-interface .lane-cards{gap:24px;grid-template-columns:repeat(3,minmax(0,calc(var(--study-card,176px) + 16px)))}}
@media(max-width:1159px){.study-interface .game-layout{display:flex;flex-direction:column;padding:12px 16px;gap:12px}.study-interface .players-strip{position:static;flex-direction:row;flex-wrap:wrap;overflow:visible;max-height:none;gap:8px}.study-interface .player-summary{flex:1 1 160px}.study-score{flex:1 1 190px;align-self:flex-start}.study-interface .dungeon-table{padding:20px 16px}.study-interface .lane-cards{gap:12px}.study-interface .card-lane{grid-template-columns:100px minmax(0,1fr);gap:8px}.study-interface .table-zone{width:100%}}
@media(max-width:780px){
  #local-study{padding:5px 10px}#local-study small{display:block;margin:1px 0 0;font-size:.68rem}.study-interface #topbar{padding:7px 12px}
  .study-interface .card-lane{display:block}.study-interface .lane-label{flex-direction:row;align-items:center;justify-content:space-between;margin:0 0 8px;padding:0;font-size:1.1rem}.study-interface .lane-label>span{max-width:50%;font-size:.71rem;text-align:right}.study-interface .your-lane .lane-label::after{display:none}
  .study-controls{flex-wrap:wrap;gap:6px}.study-small-controls{width:auto;margin-left:auto}.study-action-note{font-size:.77rem}
  .study-interface .lane-cards{grid-template-columns:repeat(3,minmax(0,var(--study-card,176px)))}
  .study-interface .game-layout{padding:10px}.study-interface .play-guide{margin-top:5px}.study-interface .guide-flow{display:none}
}
@media(max-width:560px){#local-study{flex-wrap:wrap;gap:4px}#local-study>span{display:flex;gap:8px;align-items:center;font-size:.74rem}#local-study small{font-size:.67rem;margin:0}#local-study>div{width:100%}#local-study button{flex:1;font-size:.74rem}.study-interface .players-strip{flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px}.study-interface .player-summary{flex:0 0 142px;padding:7px;gap:6px}.study-interface .mini-portrait{width:30px;height:39px}.study-interface .player-summary strong{font-size:.76rem}.study-interface .player-summary span{font-size:.66rem}.study-interface .mini-dice svg{width:17px;height:17px}.study-interface .study-score{flex:0 0 190px;max-width:85vw}.study-interface .study-score[open]{min-width:220px}.study-interface .game-layout{padding:8px;gap:7px}.study-interface .match-heading{margin-bottom:5px}.study-interface .match-heading h1{font-size:1.2rem}.study-interface .match-heading span{font-size:.73rem}.study-controls{margin-bottom:5px;padding:4px 0}.study-small-controls{width:100%;justify-content:flex-end;gap:4px}.study-small-controls button{padding:6px 8px}.study-action-note{font-size:.73rem}.study-interface .dungeon-table{padding:14px 8px;border-width:5px;gap:12px}.study-interface .lane-cards{display:flex;overflow-x:auto;justify-content:flex-start;gap:12px;scroll-snap-type:x mandatory;padding:0 3px 14px}.study-interface .lane-cards>.game-card,.study-interface .lane-cards>.game-card:nth-child(3){flex:0 0 var(--study-card,176px);width:var(--study-card,176px);min-width:var(--study-card,176px);min-height:calc(var(--study-card,176px)*1.5)}.study-interface .lane-label>span{max-width:62%}.study-interface .lane-tabs{margin:5px 0}.study-interface .lane-tabs button{background:#e9dabc;color:#493923;border-color:#ac9974}.study-interface .lane-tabs button[aria-pressed=true]{background:#415b49;color:#fff1d2;border-color:#415b49}.study-interface .table-zone{padding-bottom:290px}.study-interface .tray,.study-interface .extra-zone:has(.extra-cards>.game-card:only-child)+.tray{position:fixed;left:6px;right:6px;bottom:5px;width:auto;padding:8px;margin:0}.study-interface .tray-actions{justify-content:center}.study-interface .tray-head p{display:none}.study-interface .tray-head{gap:8px}.study-interface .tray-head strong{font-size:.75rem}.study-interface .toss-hint{font-size:.68rem}.study-interface .table-feedback{min-height:60px;padding:7px}.study-interface .extra-zone h2{font-size:.87rem}.study-interface .dragon-track{min-height:48px}.study-interface .dragon-track.no-dragon{min-height:26px}.study-interface .table-tools button{background:#f4e9d0}.study-interface .specialty{padding:2px 4px}.shared-die-name{width:64px;left:-32px;font-size:10px}.study-interface .dice-row{height:82px}}
@media(prefers-reduced-motion:reduce){.shared-flat-face{animation:none!important}}
.study-interface .players-strip{min-width:0;width:100%;max-width:100%;align-self:stretch}.study-interface .mini-portrait{display:block}.study-interface .wordmark.small{color:#dd6b39}
.study-interface button:not(.skill-slot):not(.wordmark){border-color:#8a7654}.study-interface .flag.active{border-color:#80602e}
.study-interface .game-layout[data-study-side=heroes] .hero-lane{order:0}.study-interface .game-layout[data-study-side=heroes] .sorcerer-lane{order:2}
.study-interface .die-button{background:transparent;border-color:transparent!important}.study-interface .die-button:hover:not(:disabled){background:#e7bd6220}.study-interface .die-button.selected-die{border-color:#80602e!important;background:#e7bd6220}
.study-help .table-die{pointer-events:none;opacity:.2}.study-help #table-dice-surface{opacity:.2}
.study-interface .mini-dice span{color:#30231a}.study-interface .dark-dice .mini-dice span,.study-interface .game-layout[data-study-side=sorcerer] .tray .flat-face{color:#fff2d7}
.study-interface .table-die:focus-visible,.study-interface .dragon-track:focus-visible{outline:3px solid #ffe39a;outline-offset:3px}.study-interface .skill-slot:focus-visible{outline:3px solid #ffe39a;outline-offset:3px;box-shadow:0 0 0 6px #30231a}
@media(min-width:1160px){
  .study-interface .tray,.study-interface .extra-zone:has(.extra-cards>.game-card:only-child)+.tray{display:grid;grid-template-columns:minmax(175px,.8fr) minmax(160px,1fr) minmax(240px,1.1fr);gap:5px 12px;align-items:center}
  .study-interface .tray-head{grid-column:1;grid-row:1}.study-interface .dice-row{grid-column:2;grid-row:1;width:100%}.study-interface .tray-actions{grid-column:3;grid-row:1;margin:0}.study-interface .toss-hint{grid-column:1/-1;grid-row:2;margin:0}.study-interface .owned-items{grid-column:1/-1}
}
@media(max-width:560px){
  .study-interface .players-strip{align-items:flex-start}.study-interface .study-score[open]{max-height:245px;overflow-y:auto}.study-interface .study-score summary{position:sticky;top:0;background:#f5ebd7}
  .study-action-note{display:none}
  .shared-die-name{top:24px;width:58px;left:-29px}.shared-flat-face{width:40px;height:40px;left:-20px;top:-20px;padding:3px}
}
