/* Both ledges scroll together only when grouped gaps need more room on a phone. */
.rack{overflow-x:auto;overflow-y:hidden}.rack-row{min-width:calc(var(--columns,15) * 32px)}
.drag-source{opacity:.35!important}.touch-ghost{opacity:.9;user-select:none;touch-action:none}.game-expanded{overflow:hidden}
/* Allocate the screen from the rack upwards: all four discards remain visible. */
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table){
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto minmax(0,1fr) auto auto auto auto auto!important;
  grid-template-areas:'heading' 'table' 'clock' 'racktitle' 'rack' 'review' 'controls';
  gap:8px!important;width:100%;height:var(--play-height,100dvh)!important;min-height:0;
  padding:12px 20px!important;overflow:hidden!important;box-sizing:border-box;
  --rack-tile-height:clamp(38px,7.2dvh,64px);
}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table-heading{grid-area:heading;margin:0!important;min-height:27px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) #table{grid-area:table;height:100%!important;min-height:0!important;margin:0!important;box-shadow:0 3px 0 #c6b899}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .rack-top{grid-area:racktitle;margin:3px 0 0!important;min-height:17px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) #rack{grid-area:rack;width:100%;max-width:none!important;min-height:0!important;padding:5px 6px 0!important;margin:0!important;align-self:start}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .rack-row{height:auto!important;min-height:0!important;margin-bottom:5px;padding:4px 3px 7px!important;border-bottom-width:7px!important;gap:4px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .rack-slot{min-height:var(--rack-tile-height)!important;height:var(--rack-tile-height)}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) #rack .tile{height:var(--rack-tile-height)!important;font-size:clamp(23px,3.5dvh,32px);max-width:52px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) #rack .tile.turned{font-size:9px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) #reviewPanel{grid-area:review;min-height:0;max-height:25dvh;overflow:auto;margin:0;padding:10px 14px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .controls{grid-area:controls;margin:0!important;gap:6px;align-self:end}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .controls button{padding:9px 12px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .bottom-tip,.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table-logo,.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table-note{display:none!important}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table-center{inset:60px 18% 60px!important}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .draw-area{gap:22px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .turn-message{margin-top:12px;font-size:11px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .player.pos2{top:14px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .player.pos0{bottom:16px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table .player.pos1{right:16px;top:42%}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table .player.pos3{left:16px;top:42%}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .discard-zone{width:47px;height:64px;padding:4px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .discard-zone .tile{width:35px;height:52px;flex-basis:35px;font-size:27px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .discard-zone.pos0{right:12px;bottom:16px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .discard-zone.pos1{right:12px;top:16px;left:auto;bottom:auto}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .discard-zone.pos2{left:12px;top:16px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .discard-zone.pos3{left:12px;bottom:16px;right:auto;top:auto}
@media(max-width:640px){
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table){padding:8px!important;gap:6px!important;--rack-tile-height:clamp(38px,6.6dvh,54px)}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .controls button{padding:8px 7px;font-size:10px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table-center{inset:62px 16% 55px!important}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .player .avatar{width:30px;height:30px;font-size:13px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table .player.pos1{right:7px}.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table .player.pos3{left:7px}
}
@media(max-height:520px) and (orientation:landscape){
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table){
  grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)!important;
  grid-template-rows:25px 30px minmax(0,1fr) auto auto auto!important;
  grid-template-areas:'heading heading' 'table racktitle' 'table rack' 'table review' 'table controls' 'clock clock';
  padding:6px 10px!important;gap:6px 12px!important;--rack-tile-height:clamp(32px,10dvh,44px);
 }
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .rack-row{padding-bottom:5px!important;border-bottom-width:5px!important}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .controls{flex-wrap:wrap}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .controls button{font-size:9px;padding:7px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .table-center{inset:60px 16% 50px!important}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .player .avatar{width:26px;height:26px;font-size:12px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .player .pdetail{font-size:8px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .discard-zone{width:37px;height:51px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .discard-zone .tile{width:27px;height:41px;font-size:22px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .indicator .tile{height:43px;width:30px;flex-basis:30px;font-size:24px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .tile-back{height:43px;width:31px;font-size:20px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .indicator{height:43px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .turn-message{font-size:9px;margin-top:7px}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .tiny{font-size:6px;margin-bottom:4px}
}
/* Empty outlines use the same footprint as a tile, not the entire grid cell. */
#rack{--tile-width:49px;--tile-height:63px}
#rack .rack-slot{height:var(--tile-height);min-height:var(--tile-height)!important}
#rack .tile{height:var(--tile-height)!important;max-width:var(--tile-width)!important}
#rack .rack-slot.empty{border:0!important;background:none!important;box-shadow:none!important}
#rack .rack-slot.empty:before{inset:auto!important;left:50%!important;top:0!important;transform:translateX(-50%);width:min(100%,var(--tile-width));height:100%;box-sizing:border-box;border:1px solid #a38250a0;border-radius:5px;background:linear-gradient(110deg,#f5e4c530,#7956270d);box-shadow:inset 0 1px 3px #66451b22}
#rack .rack-slot.empty:after{bottom:6px}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) #rack{--tile-width:52px;--tile-height:var(--rack-tile-height)}
.turn-progress{width:220px;max-width:52%;margin-left:auto;flex-shrink:0}
.turn-progress-label{display:flex;justify-content:space-between;gap:12px;font-size:10px;line-height:1.5;color:#809079;margin-bottom:4px}.turn-progress-label b{color:var(--turn-color);font-size:11px}
.turn-progress-track{height:5px;background:#dfe5d8;border-radius:9px;overflow:hidden}.turn-progress-track>span{height:100%;display:block;background:var(--turn-color);border-radius:9px;transition:width .25s linear}
.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .rack-top{min-height:30px!important}
#indicator{pointer-events:none;user-select:none;height:44px!important}
#indicator .indicator-tile{width:29px!important;height:44px!important;flex-basis:29px!important;font-size:24px!important;cursor:default;box-shadow:0 2px 0 #b9b59e;opacity:.88}
#indicator .indicator-tile:after{left:12px;font-size:6px;bottom:4px}
#pile .tile-back{width:44px!important;height:62px!important;font-size:25px!important}
#modal{padding-top:34px}.modal-close{position:absolute;right:12px;top:10px;width:28px;height:28px;border:0;border-radius:50%;padding:0;display:grid;place-items:center;background:#f0f3ec;color:#71836e;font-size:22px;font-weight:400;line-height:1}.modal-close:hover{background:#e0e8db}
@media(max-width:1180px){#rack{--tile-height:56px}}
@media(max-width:640px){#rack{--tile-height:54px;--tile-width:47px}.turn-progress{width:155px;max-width:48%}.turn-progress-label{font-size:8px;gap:5px}.turn-progress-label b{font-size:10px}}
/* Normal desktop play: table | live activity | scoresheet. */
@media(min-width:1050px){
 body.in-game{height:100dvh;overflow:hidden}
 body.in-game main{max-width:none;margin-left:76px;padding:16px 20px 12px;height:var(--play-height,100dvh);display:flex;flex-direction:column;overflow:hidden}
 body.in-game .rail{width:76px;padding-top:20px}
 body.in-game header{flex:0 0 auto;margin-bottom:16px;min-height:60px}
 body.in-game h1{font-size:23px;margin-top:5px}
 body.in-game .workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 200px 235px;gap:15px;align-items:stretch}
 body.in-game .sidebar{display:contents}
 body.in-game .game-column{grid-column:1;grid-row:1;min-width:0;min-height:0}
 body.in-game .game-column.compact-table:not(:fullscreen):not(.fullscreen-fallback){height:100%!important;padding:0!important;--rack-tile-height:clamp(38px,6.3dvh,59px);gap:7px!important}
 body.in-game .event-card{grid-column:2;grid-row:1;display:flex;flex-direction:column;height:100%;min-height:0;padding:16px 12px}
 body.in-game .event-list{flex:1;min-height:0;max-height:none;overflow:auto}
 body.in-game .score-card{grid-column:3;grid-row:1;min-height:0;height:100%;overflow:auto}
 body.in-game .multipliers,body.in-game .side-footer,body.in-game footer{display:none}
 body.in-game .event-item{gap:7px}.event-text{min-width:0}
 body.in-game .paper-score{min-height:calc(100% - 30px);display:flex;flex-direction:column}
 body.in-game .paper-grid{flex:1}
 body.in-game .header-right{gap:12px}
 body.in-game .card-title h2{font-size:12px}
}
@media(min-width:1500px){body.in-game .workspace{grid-template-columns:minmax(0,1fr) 235px 265px;gap:18px}}
/* Final control placement and language-invariant dimensions. */
.turn-progress{grid-area:clock;width:100%!important;max-width:none!important;margin:0!important;padding:3px 1px 1px;min-height:31px}
.turn-progress-label{font-size:11px!important;line-height:17px;margin-bottom:5px!important}.turn-progress-label b{font-size:13px!important;min-width:43px;text-align:right}
.turn-progress-track{height:7px!important}.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) #turnProgress{grid-area:clock}
.rack-top #rackHint{display:none!important}.rack-tools{margin-left:auto;display:grid;grid-template-columns:180px 138px;gap:7px;align-items:center;flex-shrink:0}
.rack-tools .sort-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.rack-tools button{height:32px;padding:6px 7px;font-size:10px;line-height:18px;white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}
.rack-tools #declare{width:100%}.rack-top{align-items:center!important;min-height:34px!important}.controls{justify-content:flex-end}.controls .spacer{flex:1}
.tile .tile-number{position:absolute;inset:0 0 8px;display:grid;place-items:center;line-height:1;font-variant-numeric:lining-nums tabular-nums;pointer-events:none;text-align:center}
.tile:not(.seen):after{left:50%!important;transform:translateX(-50%)!important}
#indicator{pointer-events:auto!important;height:auto!important;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:default}
#indicator .indicator-tile{position:relative;display:block!important;pointer-events:none;border-radius:4px;box-shadow:none!important;border-color:#c6ccb9!important}
#indicator .tile-number{inset:0 0 7px!important}.indicator-note{display:block;font:6px 'DM Sans',sans-serif;text-transform:uppercase;letter-spacing:.8px;color:#aec3ae;white-space:nowrap}
.draw-area>div:first-child{display:flex;align-items:center;flex-direction:column;min-width:55px}
.tile-back.closed-tile{position:relative;background-color:#d7e0cc;background-image:repeating-linear-gradient(45deg,transparent 0 4px,#37634a10 4px 5px);color:transparent;border-color:#e9ebdf}
.tile-back.closed-tile:before{content:'';position:absolute;inset:5px;border:1px solid #829b7466;border-radius:2px;pointer-events:none}
.stock-label{font-size:8px;letter-spacing:1px;color:#e1e8d7;font-weight:700;line-height:12px;white-space:nowrap}
#pile{min-width:75px;gap:5px}#pileCount{font-size:8px;line-height:11px;min-height:11px}#drawHint{white-space:nowrap}
.event-item{display:grid!important;grid-template-columns:33px minmax(0,1fr);height:82px;min-height:82px;gap:10px!important;padding:9px 2px!important;align-items:center;flex-shrink:0}
.event-text{text-align:center;font-size:11px;line-height:16px;display:flex;flex-direction:column;justify-content:center;min-height:48px;overflow-wrap:anywhere}.event-text small{line-height:14px;margin-top:3px}
.event-item .tile,.event-item .tile-back,.event-item .event-symbol{justify-self:center}.event-time{display:none!important}
.pair-badge{display:inline-block;margin-top:3px;border-radius:12px;padding:2px 7px;color:#f5dfa0;background:#173b2cd9;border:1px solid #d4bd7380;font-size:9px;font-weight:700;letter-spacing:.5px;white-space:nowrap}
.available-discard{animation:available-tile 1.3s ease-in-out infinite;border-color:#f2d278!important;background:#dcc78d22;cursor:grab}.available-discard:after{color:#f5e7ae!important}
@keyframes available-tile{0%,100%{box-shadow:0 0 0 1px #edcf8055,0 0 8px #edcf8030}50%{box-shadow:0 0 0 3px #edcf80aa,0 0 20px #edcf8077}}
.hand-indicator{font-size:6px!important;letter-spacing:.1px!important;padding-top:9px!important}.tile.turned.hand-indicator:after{content:'◇';font-size:22px;color:#6a8f67}
.review-actions>span small{display:block;font-size:10px;line-height:15px;color:#8c947d;margin-top:5px}.review-actions>span b{white-space:nowrap}
.review-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}.review-modes button{height:62px;min-width:0;padding:8px 10px;text-align:left;background:white}
.review-modes button span{display:block;font-size:11px;color:#8b957f;margin-bottom:5px}.review-modes button b{font-size:15px;white-space:nowrap}.review-modes button.selected{background:#eaf2e6;border-color:#648660;box-shadow:inset 0 0 0 1px #648660}
.review-heading{min-height:42px}.review-panel p{min-height:34px;margin:8px 0;line-height:17px}.review-actions{min-height:47px;align-items:center}.review-actions button{min-width:180px;height:38px;white-space:nowrap}
body.in-game .header-right #connection{width:100px;white-space:nowrap;text-align:center}body.in-game .header-right #share{width:150px;height:36px;white-space:nowrap}
body.in-game .table-heading .pill{min-width:83px;text-align:center}body.in-game .paper-head{height:27px;flex-shrink:0}body.in-game .card-title{height:22px;flex-shrink:0}
@media(max-width:700px){.rack-top{flex-wrap:wrap;row-gap:6px}.rack-tools{width:100%;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}.rack-tools button{font-size:9px;height:29px;padding:5px 3px}.review-actions button{min-width:0;width:100%}.review-modes button b{font-size:12px}.event-item{height:82px!important}.tile.turned.hand-indicator{font-size:5px!important}}
@media(prefers-reduced-motion:reduce){.available-discard{animation:none;box-shadow:0 0 0 2px #edcf80aa}.turn-progress-track>span{transition:none}}
.bot-level{display:block;margin:10px 0 14px;font-size:9px;letter-spacing:.6px}.bot-level select{display:block;width:100%;height:35px;margin-top:6px;border:1px solid var(--line);border-radius:7px;padding:6px 10px;background:#fafbf6;color:var(--ink);font:12px 'DM Sans',sans-serif;letter-spacing:0}
/* Top navigation replaces the old left rail on every device. */
.rail,body.in-game .rail{position:relative!important;inset:auto!important;flex-direction:row;width:100%!important;height:54px;padding:6px 20px!important;gap:12px;border-right:0;border-bottom:1px solid var(--line);justify-content:flex-start}
.rail .brand{font-size:34px;line-height:38px;letter-spacing:-3px;margin-right:20px}.rail .brand span,.rail .rail-bottom{display:none}
.rail .nav{width:35px;height:34px;margin:0;font-size:21px}.rail .nav.active{border-radius:7px}
main{margin-left:0!important}.take-control{padding:6px 10px;font-size:10px;background:#f8edce;border-color:#d4b66b;white-space:nowrap;height:30px}
body.in-game main{margin-left:0!important;height:calc(var(--play-height,100dvh) - 54px)!important;padding:10px 14px 8px;display:flex;flex-direction:column;overflow:hidden;max-width:none}
body.in-game header{margin-bottom:10px;min-height:55px;flex-shrink:0}
body.in-game .workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:stretch}
body.in-game .game-column.compact-table:not(:fullscreen):not(.fullscreen-fallback){height:100%!important;padding:0!important;gap:6px!important;--rack-tile-height:clamp(36px,6dvh,58px)}
body.in-game .sidebar{display:none}body.in-game footer{display:none}
.fullscreen-flow{display:none}.score-shortcut,.flow-shortcut{font-size:10px;padding:6px 10px;height:28px;white-space:nowrap}.flow-shortcut{display:none}.activity-modal-list{max-height:70dvh;overflow:auto}
.game-column:is(:fullscreen,.fullscreen-fallback){grid-template-columns:minmax(0,1fr) 220px!important;grid-template-areas:'heading heading' 'table flow' 'clock flow' 'racktitle flow' 'rack flow' 'review flow' 'controls flow'}
.game-column:is(:fullscreen,.fullscreen-fallback) .fullscreen-flow{grid-area:flow;display:flex;flex-direction:column;min-height:0;padding:13px 11px;margin:0;overflow:hidden}
.game-column:is(:fullscreen,.fullscreen-fallback) .fullscreen-flow-list{max-height:none;min-height:0;flex:1;overflow:auto}
.game-column:is(:fullscreen,.fullscreen-fallback) .fullscreen-flow .card-title{height:22px;flex-shrink:0}
@media(min-width:1050px){
 body.in-game .workspace{grid-template-columns:minmax(0,1fr) 200px 235px;gap:15px}
 body.in-game .sidebar{display:contents}
 body.in-game .event-card{grid-column:2;grid-row:1;height:100%;min-height:0}
 body.in-game .score-card{grid-column:3;grid-row:1;height:100%;min-height:0}
}
@media(min-width:1500px){body.in-game .workspace{grid-template-columns:minmax(0,1fr) 235px 265px;gap:18px}}
@media(max-width:1049px){
 body.in-game header{min-height:40px;margin-bottom:8px}body.in-game h1{font-size:19px;line-height:24px;white-space:nowrap}body.in-game header .eyebrow{font-size:7px}
 body.in-game .header-right{gap:7px}body.in-game .header-right #connection,body.in-game .header-right .avatar{display:none}
 body.in-game .header-right #share{width:122px;font-size:10px;height:32px;padding:5px}
 .game-column.compact-table .rack-row{gap:3px;padding:3px 2px 5px!important;border-bottom-width:5px!important;margin-bottom:4px}
 .game-column.compact-table #rack .tile{font-size:24px}.game-column.compact-table .table-center{inset:48px 15% 48px!important}
 .game-column.compact-table .player .avatar{width:28px;height:28px;font-size:12px}
}
@media(max-width:700px){
 .rail,body.in-game .rail{height:46px;padding:4px 10px!important;gap:9px}.rail .brand{font-size:29px;margin-right:14px}.rail .nav{height:31px;width:31px}
 body.in-game main{height:calc(var(--play-height,100dvh) - 46px)!important;padding:7px 7px 6px}
 body.in-game header{min-height:37px;margin-bottom:7px}body.in-game h1{font-size:16px;max-width:calc(100vw - 150px);overflow:hidden;text-overflow:ellipsis}
 body.in-game header .eyebrow{display:none}.header-right .subtle,body.in-game .header-right #share{display:grid!important;place-items:center;width:32px!important;min-width:32px;font-size:0!important;padding:0!important}.header-right .subtle:first-letter{font-size:16px}
 body.in-game .header-right #share:before{content:'↗';font-size:17px}.header-right .subtle:first-letter{font-size:0}
 .game-column:is(:fullscreen,.fullscreen-fallback,.compact-table){gap:5px!important;--rack-tile-height:clamp(34px,5.7dvh,47px)!important}
 .game-column:is(:fullscreen,.fullscreen-fallback){grid-template-columns:minmax(0,1fr)!important;grid-template-areas:'heading' 'table' 'clock' 'racktitle' 'rack' 'review' 'controls'}
 .game-column:is(:fullscreen,.fullscreen-fallback) .fullscreen-flow{display:none}.flow-shortcut{display:block}
 .table-heading{font-size:10px}.table-heading .muted{font-size:8px;margin-left:5px}.table-tools{gap:4px!important}.table-heading .pill{font-size:7px;min-width:54px!important;padding:5px 6px}
 .score-shortcut,.flow-shortcut{font-size:8px;height:25px;padding:4px 5px}.fullscreen-btn{padding:5px}
 .rack-top{flex-wrap:wrap!important;row-gap:3px;min-height:0!important}.rack-top>div:first-child{font-size:10px}
 .rack-tools{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);height:27px;gap:4px}.rack-tools button{height:27px;line-height:15px;font-size:8px}
 .controls button{padding:7px 12px!important;font-size:9px}.turn-progress{min-height:26px;padding-top:0}.turn-progress-label{font-size:9px!important;line-height:13px;margin-bottom:4px!important}.turn-progress-label b{font-size:10px!important}.turn-progress-track{height:5px!important}
 .take-control{height:25px;font-size:8px;padding:4px 7px}.review-modes{gap:5px}.review-modes button{height:48px;padding:5px}.review-modes button b{font-size:11px}
}

#pile,#pile *,.discard-zone,.discard-zone *{user-select:none;-webkit-user-select:none;-webkit-user-drag:none;touch-action:none}

/* Pre-game is a dedicated welcome and waiting screen, without a dummy table. */
.lobby-intro{display:none}
/* One consistent top bar: navigation left, account actions right. */
.rail,body.in-game .rail{display:flex!important;box-sizing:border-box;flex-wrap:nowrap;min-height:60px;height:60px;padding:9px 20px!important;gap:10px}
.rail .brand{flex-shrink:0;margin-right:14px}
.rail .header-right{margin-left:auto!important;display:flex!important;align-items:center;justify-content:flex-end;gap:10px;flex:0 0 auto;min-width:0}
.rail .nav.rules-nav,body:not(.in-game) .rail #rulesNav{display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;min-width:112px;height:36px;flex-shrink:0;font-size:12px;line-height:18px;white-space:nowrap;padding:8px 12px;margin:0;border-radius:8px}
.rail .header-right #share,.rail .header-right #leaveGame{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;width:auto!important;min-width:0;height:36px;min-height:36px;padding:8px 12px!important;font-size:11px!important;line-height:18px;white-space:nowrap;margin:0;box-sizing:border-box}
.rail .header-right #share:before{display:none!important;content:none!important}
.rail .header-right #share:first-letter{font-size:inherit!important}
.rail .header-right #leaveGame[hidden]{display:none!important}
.rail .header-right .lang-switch{height:36px;box-sizing:border-box;margin:0}
.rail .header-right .avatar{width:36px;height:36px;min-width:36px;flex:0 0 36px;display:flex;align-items:center;justify-content:center;font-size:15px}
body:not(.in-game) .rail #rulesNav{display:inline-flex!important}
main>header:has(>div:only-child){display:none!important}
.rules-guide{padding:4px 0}
dialog[data-context=rules]{width:min(760px,calc(100vw - 28px));max-width:760px;padding:32px;box-sizing:border-box;border-radius:22px}
.rules-guide h2{font-size:30px;letter-spacing:-.8px;margin:10px 0}
.rules-lead{color:#809087;margin:0 0 22px}
.rules-stats{display:grid;grid-template-columns:repeat(3,1fr);background:#f2f5ee;border-radius:12px;padding:16px;gap:10px}
.rules-stats>span{display:flex;flex-direction:column;gap:4px;color:#7c8d80;font-size:11px;text-align:center}
.rules-stats b{font-size:22px;color:#245448}
.rules-colours{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0 24px}
.rules-colours>span{display:flex;justify-content:space-between;gap:4px;align-items:center;padding:10px;border:1px solid #e4e8df;border-radius:9px;font-size:11px;color:var(--rule-colour)}
.rules-sections{display:grid;grid-template-columns:1fr 1fr;gap:22px 26px}
.rules-sections>section{display:flex;gap:12px;align-items:flex-start}
.rule-number{font-size:11px;color:#9b855d;background:#f5f0e5;padding:6px;border-radius:6px;font-weight:700}
.rules-guide h3{margin:2px 0 7px;font-size:15px;color:#224f43}
.rules-guide section p{margin:0;color:#75877e;font-size:12px;line-height:1.8}
.rules-scoring{background:#f2f5ee;padding:20px;border-radius:12px;margin-top:26px}
.rules-scoring>div{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.rules-scoring>div>span{background:white;border-radius:8px;padding:12px;font-size:12px;display:flex;flex-direction:column;gap:6px}
.rules-scoring b{font-size:18px;color:#245448}
.rules-footnote{font-size:11px;color:#8a978b;line-height:1.7;margin-bottom:0}
.room-created>label{display:none}
.room-created .bot-level{display:none}
.waiting-seats{display:grid;gap:8px;margin:16px 0}
.waiting-seat{display:flex;align-items:center;gap:11px;padding:10px;border:1px dashed #dce3d7;border-radius:11px;background:#fafbf8}
.waiting-seat.occupied{border-style:solid;background:white}
.seat-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#edf1e6;color:#53745c;font-size:16px;flex-shrink:0}
.waiting-seat b{font-size:12px;color:#355747}.waiting-seat small{display:block;font-size:10px;color:#9ba994;margin-top:4px}
.seat-check{margin-left:auto;color:#65916d}.waiting-pulse{margin-left:auto;width:6px;height:6px;background:#bcc8b4;border-radius:50%;animation:waitingPulse 2s ease-in-out infinite}
@keyframes waitingPulse{50%{opacity:.25}}
.waiting-status{display:flex;align-items:center;justify-content:center;gap:7px;color:#8a9982;font-size:11px;padding:4px}
#hostActions{margin-top:12px;padding-top:12px;border-top:1px solid #e5e9de}#hostActions small{display:block;text-align:center;line-height:1.7;margin-top:9px;color:#929e89}
#hostActions button{display:flex;justify-content:center;align-items:center;min-height:44px}
@media(max-width:700px){
 .rail,body.in-game .rail{min-height:56px;height:auto;padding:8px 10px!important;gap:6px;flex-wrap:wrap}
 .rail .brand{margin-right:5px}.rail .nav:not(.rules-nav){display:none!important}
 .rail .nav.rules-nav,body:not(.in-game) .rail #rulesNav{min-width:0;font-size:10px;padding:7px 8px}
 .rail .header-right{gap:6px;flex:1 1 auto;margin-left:auto!important}
 .rail .header-right #connection{display:none}
 .rail .header-right #share{font-size:10px!important;padding:7px 8px!important;max-width:135px;overflow:hidden;text-overflow:ellipsis}
 .rail .header-right #leaveGame{font-size:10px!important;padding:7px 8px!important}
 .rail .header-right .avatar{width:30px;height:30px;min-width:30px;flex-basis:30px;font-size:13px}
 .rules-sections{grid-template-columns:1fr;gap:20px}
 dialog[data-context=rules]{padding:25px 18px}.rules-guide h2{font-size:24px}
 .rules-colours{grid-template-columns:1fr 1fr}.rules-scoring{padding:15px}
}
.leave-game{white-space:nowrap;border:1px solid #dec9bf;background:transparent;color:#945d49;border-radius:8px;padding:9px 12px;font-size:11px;min-height:36px;flex-shrink:0}
.leave-game:hover{background:#f4eae4}
.leave-game[hidden]{display:none!important}
@media(max-width:700px){.leave-game{padding:7px 9px;font-size:10px;min-height:34px}}
body:not(.in-game) .game-column,body:not(.in-game) .sidebar>:not(#lobby){display:none!important}
body:not(.in-game) .workspace{display:grid!important;grid-template-columns:minmax(0,420px) minmax(300px,390px);justify-content:center;align-items:center;gap:clamp(28px,7vw,110px);min-height:calc(100dvh - 220px);padding:36px 20px}
body:not(.in-game) .lobby-intro{display:flex;flex-direction:column;align-items:flex-start;gap:18px}
.lobby-monogram{font:700 clamp(90px,10vw,150px)/1 Georgia,serif;color:#19483e;letter-spacing:-12px;margin-left:-7px}
.lobby-intro h2{font-size:clamp(30px,3.3vw,46px);line-height:1.12;letter-spacing:-1.5px;margin:0;color:#173f38}
.lobby-intro p{max-width:310px;font-size:16px;line-height:1.8;color:#75877e;margin:0}
body:not(.in-game) .sidebar{display:block!important;width:auto;min-width:0}
body:not(.in-game) #lobby{padding:30px;border-radius:22px;box-shadow:0 12px 40px #173f3808;width:100%;box-sizing:border-box}
body:not(.in-game) #lobby h2{font-size:24px}
body:not(.in-game) #lobby input,body:not(.in-game) #lobby select{font-size:16px;min-height:44px}
body:not(.in-game) .rail .nav,body:not(.in-game) .rail-bottom{display:none}
body:not(.in-game) footer{margin-top:12px}
.whatsapp-button{background:#216b47;color:#fff;border:1px solid #216b47;border-radius:10px;min-height:46px;font-weight:650;display:block;margin:14px 0}
.whatsapp-button:hover{background:#195336}
.whatsapp-button[hidden],.waiting-room[hidden]{display:none!important}
.copy-invite{margin-top:10px;min-height:44px}
.waiting-room{padding:16px 0;margin-bottom:8px}
.waiting-code{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px;background:#f2f5ee;border-radius:10px}
.waiting-code strong{font-size:22px;letter-spacing:3px;color:#19483e}
.waiting-code span,.waiting-room small{color:#7c8d80;font-size:12px}
.waiting-players{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 10px}
.waiting-players>span{display:flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid #e0e6dc;border-radius:20px;font-size:13px}
body.in-game .waiting-room,body.in-game .lobby-intro{display:none}
@media(max-width:700px){
 body:not(.in-game) .workspace{grid-template-columns:minmax(0,420px);gap:22px;min-height:0;padding:20px 4px 30px}
 body:not(.in-game) .lobby-intro{align-items:center;text-align:center;gap:10px}
 body:not(.in-game) .lobby-monogram{font-size:74px;letter-spacing:-7px}
 body:not(.in-game) .lobby-intro h2{font-size:28px}
 body:not(.in-game) .lobby-intro p{font-size:14px;line-height:1.6}
 body:not(.in-game) #lobby{padding:22px}
 body:not(.in-game) header>div:first-child{display:none}
 body:not(.in-game) header{justify-content:flex-end;margin-bottom:0;min-height:48px}
 body:not(.in-game) #share{display:none}
}

/* Final responsive overrides shared by lobby and game. */
.rack-top{flex-wrap:wrap}
.control-reclaim{display:none;width:100%;flex:0 0 100%;justify-content:center;align-items:center;margin:3px 0}
.control-reclaim:has(#takeControl:not([hidden])){display:flex}
.control-reclaim #takeControl{margin:0 auto;min-width:140px;min-height:32px;height:auto;text-align:center;display:inline-flex;justify-content:center;align-items:center;padding:7px 16px;border-radius:9px}
.control-reclaim #takeControl[hidden]{display:none!important}
body .table-center .decision-reopen{flex-direction:column;gap:4px;animation:decisionPulse 1.5s ease-in-out infinite}
.decision-reopen small{display:block;font-size:10px;font-weight:700;line-height:13px;color:#8e7236}
@keyframes decisionPulse{50%{opacity:.65;box-shadow:0 0 14px #f8df83aa}}
@media(prefers-reduced-motion:reduce){body .table-center .decision-reopen{animation:none}}
.watch-invite{border-top:1px solid var(--line);padding-top:15px;margin-top:20px}.watch-invite h3{font-size:15px}.watch-invite p{font-size:12px}
body.spectating .rack-tools,body.spectating .controls,body.spectating #takeControl,body.spectating .decision-reopen,body.spectating .review-panel{display:none!important}
body.spectating #rackTitle:after{content:' · İzleyici';color:#9a875f;font-size:10px}html[lang=en] body.spectating #rackTitle:after{content:' · Spectator'}
dialog[data-context=round-result]{width:min(540px,calc(100% - 20px));max-width:540px;padding:28px 22px;box-sizing:border-box}
.round-summary{text-align:center}.round-summary h2{font-size:20px;margin:10px 0 18px}.round-summary h3{font-size:16px;margin:20px 0 10px}
.round-summary .result-scorepaper{margin:0 auto;width:100%;max-width:430px;text-align:left}
.round-summary .paper-grid tbody td{height:19px!important;padding:2px 0!important}.round-summary .paper-head{font-size:14px}.round-summary .paper-head>span{display:none}
.round-summary .actions{justify-content:center!important;margin-top:12px!important}
.round-summary #next{min-width:170px;min-height:44px;justify-content:center;border-radius:10px;font-size:13px}
.next-round-timer{max-width:290px;margin:16px auto 0}.next-round-timer b{font-size:11px;color:#9a875f}.next-round-timer .decision-progress{margin-top:8px}
dialog[data-context=scoresheet] .paper-head{background:white;padding-top:38px}
dialog[data-context=scoresheet] .modal-close{background:white;border:1px solid #d9e0d5;color:#385a48;font-size:24px;font-weight:600;box-shadow:0 1px 5px #183c3515;top:6px;right:7px;width:29px;height:29px}
.decision-progress{height:5px;overflow:hidden;background:#edf0e7;border-radius:8px;margin:16px 0 0;width:100%}
.decision-progress>span{display:block;height:100%;width:100%;background:#b89a5e;border-radius:inherit;transition:width .25s linear}
#connection{display:none!important}
body .rail,body.in-game .rail{align-items:center!important}
body .rail .brand{height:40px!important;align-items:center!important;align-self:center!important;margin:0 10px 0 0!important;padding:0!important;position:static!important;transform:none!important;color:#245c48!important}
body .rail .brand strong{color:#245c48!important;line-height:40px!important;display:block}
body .rail .brand span{color:#245c48!important;line-height:40px!important;display:block!important;margin:0!important;padding:0!important}
.draw-area>.tiny,.draw-area>div>.tiny,#drawHint,.stock-label,.indicator-note,.table-center .turn-message,.table-center .table-logo{display:none!important}
.draw-area{align-items:center!important;justify-content:center!important;gap:18px!important;margin:0!important}
#indicator{height:58px!important;gap:0!important}
#indicator .indicator-tile{width:39px!important;height:58px!important;flex-basis:39px!important;font-size:30px!important;opacity:1!important;background:#f4f0d9!important;border:1px solid #d9d1b7!important;box-shadow:0 2px 0 #b4b097!important}
#indicator .tile-number{inset:0 0 10px!important}
#indicator .indicator-tile:after{content:''!important;width:6px;height:6px;border-radius:50%;background:currentColor;left:calc(50% - 3px)!important;bottom:7px!important;opacity:.6}
#pile{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;width:43px!important;min-width:43px!important;height:62px!important;padding:0!important;gap:0!important;opacity:1!important}
#pile .tile-back{position:absolute!important;inset:0;width:43px!important;height:62px!important;box-sizing:border-box;border:3px solid #ebe1b6!important;background:#e6d69d!important;background-image:none!important;border-radius:5px;box-shadow:0 2px 0 #a69f72!important}
#pile .tile-back:before{inset:3px!important;border-color:#c4b679!important}
#pileCount{position:relative!important;z-index:1;display:flex!important;align-items:center;justify-content:center;width:100%;height:100%;font:bold italic 20px Georgia!important;line-height:1!important;color:#344234!important;letter-spacing:0!important;pointer-events:none}
#pile:not(:disabled){filter:drop-shadow(0 0 4px #c7ed65);outline:1px solid #d5f186;outline-offset:3px;border-radius:5px}
.discard-zone:after{display:none!important}
.player .pdetail{font-size:9px!important;display:flex;align-items:center;gap:4px;margin-top:5px}
.player .pair-badge{margin:0;padding:3px 9px;border:1px solid #ead99c;background:#f3e5af;color:#5a4c24;border-radius:7px;font-size:9px;letter-spacing:.7px;box-shadow:0 2px 6px #092b2520}
.sound-toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:36px;flex:0 0 32px;padding:6px;border-radius:8px;background:transparent;border:1px solid var(--line);color:#416554}
body .table-center .decision-reopen{position:relative;z-index:4;display:inline-flex;justify-content:center;align-items:center;width:auto;max-width:100%;min-height:34px;margin:10px auto 0;padding:7px 14px;font-size:11px;box-shadow:0 2px 10px #092b2826;border:1px solid #cdb780;background:#fff8df;border-radius:18px;color:#66552e;pointer-events:auto}
body .table-center .decision-reopen[hidden]{display:none!important}
.return-countdown{font-size:24px;font-weight:700;color:#a07c42}
dialog[data-context=scoresheet]{padding:0!important;width:min(440px,calc(100% - 12px));max-width:calc(100% - 12px);max-height:calc(100dvh - 12px);height:min(760px,calc(100dvh - 12px));overflow:hidden;border-radius:12px;box-sizing:border-box}
.modal-close{z-index:10}
dialog[data-context=scoresheet] #modalContent,dialog[data-context=scoresheet] .history-paper{height:100%;width:100%;max-width:none;margin:0;padding:0}
dialog[data-context=scoresheet] .paper-score{display:flex;flex-direction:column;height:100%;width:100%;box-sizing:border-box;margin:0;padding:0!important;border:0;border-radius:0;box-shadow:none}
dialog[data-context=scoresheet] .paper-head{margin:0;padding:42px 12px 10px}
dialog[data-context=scoresheet] .paper-head>span{display:none}
dialog[data-context=scoresheet] .paper-meta{padding:0 12px 8px}
dialog[data-context=scoresheet] .paper-grid{height:100%;min-height:0;flex:1;margin:0}
dialog[data-context=scoresheet] .paper-grid td{height:auto!important;padding:0!important}
dialog[data-context=scoresheet] .paper-grid th{height:32px}
dialog[data-context=scoresheet] .paper-grid tfoot td{height:40px!important}
body .rail .header-right #rulesNav,body:not(.in-game) .rail .header-right #rulesNav{display:inline-flex!important;align-items:center;justify-content:center;width:36px!important;min-width:36px!important;height:36px!important;padding:8px!important;flex:0 0 36px;border:1px solid var(--line);box-sizing:border-box;border-radius:8px}
.rail .header-right #rulesNav svg{display:block;position:static;flex-shrink:0}
.edit-name{font-size:11px;padding:6px 0;color:#547660;border:0;background:none;align-self:flex-end;text-decoration:underline;text-underline-offset:3px}
.edit-name[hidden]{display:none!important}
body .rail .header-right #share,body.in-game .rail .header-right #share{display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:auto!important;min-width:78px!important;height:36px!important;padding:7px 10px!important;font-size:11px!important;line-height:18px!important}
body .rail .header-right #share svg{display:block!important;position:static!important;width:14px!important;height:14px!important;flex:0 0 14px!important;align-self:center!important;margin:0!important;transform:none!important}
body .rail .header-right #share span{display:block!important;position:static!important;font-size:inherit!important;line-height:18px!important;align-self:center!important;margin:0!important;transform:none!important}
.rail .header-right #language{appearance:none;-webkit-appearance:none;box-sizing:border-box;width:58px!important;min-width:58px!important;flex:0 0 58px;padding:7px 22px 7px 10px!important;font-size:11px!important;line-height:20px;text-align:left;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23345649' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center}
body.in-waiting-room .lobby-intro{display:none!important}
body.in-waiting-room .workspace{grid-template-columns:minmax(0,440px)!important;align-items:start!important;min-height:0!important;padding-top:30px!important}
.room-created #guestLogin{display:none!important}
.rail .header-right{margin-left:auto!important;justify-content:flex-end!important}
.rail .header-right #share{display:inline-flex!important;font-size:11px!important;width:auto!important;height:36px;align-items:center;justify-content:center;line-height:18px;padding:8px 12px!important}
.rail .header-right #share:before{content:none!important;display:none!important}
.rail .header-right #share:first-letter{font-size:inherit!important}
.rail #rulesNav{font-size:12px!important;white-space:nowrap!important;line-height:18px!important;width:auto!important;flex-shrink:0}
.guest-login .round-select,.guest-login .bot-level,.guest-login #create,.guest-login .join,.guest-login #hostActions{display:none!important}
#guestLogin{margin-top:16px;min-height:44px}
#guestLogin[hidden]{display:none!important}
.decision-reopen{border-color:#b79a60;background:#fbf6e8;color:#765d29;white-space:nowrap;font-size:11px;padding:8px 12px;margin-left:auto}
.decision-reopen[hidden]{display:none!important}
.result-scorepaper{margin:18px 0;max-width:440px}.result-scorepaper .paper-score{box-sizing:border-box;width:100%}
@media(max-width:700px){
 .rail,body.in-game .rail{flex-wrap:nowrap!important;min-height:54px;gap:5px}
 .rail .brand{font-size:27px!important;margin-right:0!important}
 .rail .header-right{flex:0 1 auto!important;margin-left:auto!important;gap:4px!important}
 .rail .header-right #share{gap:4px;max-width:none}
 .rail .header-right #share svg{width:13px;height:13px;flex-shrink:0}
 .rail .header-right .lang-switch{width:43px;padding:5px!important;font-size:10px!important}
 .rail .header-right #leaveGame{font-size:9px!important;padding:6px!important}
 body.in-waiting-room .workspace{padding-top:12px!important}
 body.in-waiting-room #lobby{padding:18px}
 body.in-waiting-room .waiting-seat{padding:7px 9px}
 body.in-waiting-room .waiting-seats{gap:6px;margin:12px 0}
 body.in-waiting-room .waiting-room{padding:8px 0}
 .rail .header-right{gap:5px!important}
 .rail .header-right #share{font-size:10px!important;padding:7px 8px!important;width:auto!important;min-width:0;max-width:none}
 .rail .header-right .avatar{display:none!important}
 .rail #rulesNav{font-size:10px!important;padding:7px 5px!important}
 .game-column .rack,.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .rack{overflow:hidden!important;width:100%!important;max-width:100%!important;box-sizing:border-box;--tile-w:clamp(15px,5.5vw,27px)}
 .game-column .rack-row,.game-column:is(:fullscreen,.fullscreen-fallback,.compact-table) .rack-row{min-width:0!important;width:100%!important;box-sizing:border-box;grid-template-columns:repeat(var(--columns,13),minmax(0,1fr))!important;gap:2px!important;padding-left:0!important;padding-right:0!important}
 .game-column .rack-slot,.game-column .rack-slot.empty{width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box;height:43px!important;min-height:43px!important}
 .game-column .rack .tile{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box;height:43px!important;font-size:clamp(15px,4.8vw,22px)!important;border-radius:3px}
 .game-column .rack .tile.turned{font-size:4px!important;letter-spacing:0!important;padding-top:7px!important;border-width:2px}
 .game-column .rack .tile.turned:after{font-size:12px!important}
 .game-column .rack .tile .tile-number{line-height:1!important}
 .decision-reopen{width:100%;margin-left:0;min-height:30px;font-size:10px}
}

/* Brand and fixed bottom signature. */
body .rail .brand{display:inline-flex!important;align-items:baseline;gap:5px;color:#19483e!important;text-decoration:none;letter-spacing:0!important;margin-right:8px!important;white-space:nowrap}
body .rail .brand strong{font:700 34px/1 Georgia,serif;letter-spacing:-3px;color:inherit}
body .rail .brand span{display:inline!important;font:600 13px/1.2 'DM Sans',sans-serif!important;letter-spacing:0!important;color:inherit}
body footer,body.in-game footer{position:fixed!important;bottom:0;left:0;right:0;z-index:12;display:flex!important;justify-content:space-between;align-items:center;box-sizing:border-box;height:28px;margin:0!important;padding:0 18px!important;border-top:1px solid #dfe5d8;background:#f4f5f0;color:#6d8676;font-size:9px;letter-spacing:.4px;gap:10px}
body:not(.in-game) main{padding-bottom:40px!important}
body.in-game main{height:calc(var(--play-height,100dvh) - 88px)!important}
body.game-expanded footer{display:none!important}
@media(max-width:700px){body .rail .brand{gap:3px;margin-right:0!important}body .rail .brand strong{font-size:27px}body .rail .brand span{font-size:10px!important}body footer{padding:0 10px!important;font-size:8px;height:26px}body.in-game main{height:calc(var(--play-height,100dvh) - 80px)!important}body .rail .header-right #share,body.in-game .rail .header-right #share{min-width:64px!important;padding:7px 6px!important;font-size:10px!important}}

/* Match every table tile to the actual rack tile, including responsive rack widths. */
body #indicator .indicator-tile,body #pile .tile-back,body .game-column .table .discard-zone .tile,body .event-item .tile,body .event-item .tile-back{width:var(--match-tile-width,40px)!important;min-width:var(--match-tile-width,40px)!important;max-width:var(--match-tile-width,40px)!important;height:var(--match-tile-height,58px)!important;min-height:var(--match-tile-height,58px)!important;flex-basis:var(--match-tile-width,40px)!important;box-sizing:border-box}
body #indicator .indicator-tile,body .game-column .table .discard-zone .tile:not(.turned),body .event-item .tile:not(.turned){font-size:var(--match-tile-font,28px)!important}
body #indicator{height:var(--match-tile-height,58px)!important}
body #pile{width:var(--match-tile-width,40px)!important;min-width:var(--match-tile-width,40px)!important;height:var(--match-tile-height,58px)!important}
body .game-column .table .discard-zone{width:calc(var(--match-tile-width,40px) + 10px)!important;height:calc(var(--match-tile-height,58px) + 10px)!important;box-sizing:border-box;display:flex;align-items:center;justify-content:center}
body .event-item{grid-template-columns:calc(var(--match-tile-width,40px) + 4px) minmax(0,1fr)!important;min-height:calc(var(--match-tile-height,58px) + 20px)!important}
body #table::after{content:'81 Okey';position:absolute;bottom:5px;left:50%;transform:translateX(-50%);color:#d7e6cf;opacity:.09;font:600 14px Georgia,serif;letter-spacing:3px;pointer-events:none;white-space:nowrap}

/* Compact typography for all scoresheets. */
body .paper-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;font:400 11px/1.35 'DM Sans',sans-serif!important;letter-spacing:0!important;background:white;padding:12px!important;margin:0!important;border-bottom:1px solid #dce0d3}
body .paper-room{display:flex;flex-direction:column;gap:3px;min-width:0}
body .paper-room span{font:400 9px/1.3 'DM Sans',sans-serif!important;text-decoration:none!important;color:#81917e;white-space:nowrap}
body .paper-room strong{font:700 12px/1.3 'DM Sans',sans-serif!important;letter-spacing:1px!important;white-space:nowrap;color:#325744}
body .paper-time{display:flex;flex-direction:column;gap:3px;text-align:right;white-space:nowrap}
body .paper-time span{font:400 10px/1.3 'DM Sans',sans-serif!important;text-decoration:none!important;color:#81917e}
body .paper-time b{font:600 11px/1.3 'DM Sans',sans-serif!important;color:#325744}
body dialog[data-context=scoresheet] .paper-head{padding:12px 48px 12px 12px!important;flex-shrink:0;min-height:58px;box-sizing:border-box}
body .rail .brand .brand-emblem{display:flex!important;align-items:center;justify-content:center;width:35px;height:35px;line-height:35px!important;background:#245c48;color:#fff!important;border-radius:9px;font:800 24px/35px Manrope,sans-serif!important;letter-spacing:-2px!important;box-sizing:border-box;padding-right:2px!important}
body .rail .brand .brand-word{font:700 12px/1.2 'DM Sans',sans-serif!important;letter-spacing:1.4px!important;color:#245c48!important;line-height:35px!important}
body .rail .brand{gap:7px!important}
.lobby-share-actions{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:8px;margin-top:15px}.lobby-share-actions[hidden]{display:none!important}
.lobby-share-actions .whatsapp-button{margin:0;min-width:0;font-size:10px!important;min-height:44px}
.copy-room-button{font-size:11px;min-height:44px;border-radius:10px;white-space:nowrap;color:#365f48;background:#f6f8f1;border:1px solid #d4dfcb}
body .event-item{height:auto!important;gap:13px!important;margin:0 0 8px!important;padding:11px!important;border:1px solid #e8ece2!important;border-radius:12px;background:#f8faf5;text-align:left!important;align-items:center!important}
body .event-text{text-align:left!important;font-size:11px!important;line-height:1.6!important;min-width:0;color:#355444}
body .event-text b{display:block!important;font-size:12px!important;font-weight:700;color:#264f3f}
body .event-text small{text-align:left!important;margin-top:4px;font-size:9px!important;color:#92a18a}
body .event-finish{border-color:#d9c98a!important;background:#fbf7e7!important}
.activity-heading{display:flex;align-items:center;justify-content:space-between;padding-right:28px;margin-bottom:18px;gap:12px}.activity-heading h2{margin:7px 0 0;font-size:22px}
.activity-live{display:flex;align-items:center;gap:5px;font-size:9px;letter-spacing:1px;color:#699070}.activity-live i{width:6px;height:6px;background:#6b9b76;border-radius:50%}
dialog[data-context=activity]{width:min(500px,calc(100% - 24px));padding:26px 18px 16px;box-sizing:border-box}.activity-modal-list{max-height:65dvh!important;padding-right:4px}
.rack .tile.just-drawn{outline:2px solid #e1bc59;outline-offset:1px;animation:drawnGlow 1.8s ease-in-out infinite}
@keyframes drawnGlow{50%{box-shadow:0 0 11px 2px #e5cf6caa}}
.seat-progress{display:none;position:absolute;background:#e2eacf29;border-radius:4px;overflow:hidden;pointer-events:none}
.player.active .seat-progress{display:block}.seat-progress i{display:block;width:100%;height:100%;background:var(--p);transition:transform .25s linear;border-radius:inherit}
.player.pos0 .seat-progress,.player.pos2 .seat-progress{width:90px;height:4px;left:50%;transform:translateX(-50%)}
.player.pos0 .seat-progress{bottom:-7px}.player.pos2 .seat-progress{top:-7px}
.player.pos0 .seat-progress i,.player.pos2 .seat-progress i{transform:scaleX(var(--seat-remaining,1));transform-origin:left}
.player.pos1 .seat-progress,.player.pos3 .seat-progress{width:4px;height:70px;top:0}
.player.pos1 .seat-progress{right:-9px}.player.pos3 .seat-progress{left:-9px}
.player.pos1 .seat-progress i,.player.pos3 .seat-progress i{transform:scaleY(var(--seat-remaining,1));transform-origin:top}
.bot-speed{height:36px;max-width:145px;font-size:10px;color:#4e7059;background:#f8faf5;border:1px solid #dce4d5;border-radius:8px;padding:5px 7px}.bot-speed[hidden]{display:none!important}
@media(max-width:700px){body .rail .brand .brand-word{display:none!important}.bot-speed{max-width:64px;font-size:9px;padding:3px;height:34px}body .rail .brand .brand-emblem{width:30px;height:32px;font-size:22px!important;line-height:32px!important}.player.pos1 .seat-progress,.player.pos3 .seat-progress{height:54px}.player.pos0 .seat-progress,.player.pos2 .seat-progress{width:66px}}
@media(prefers-reduced-motion:reduce){.rack .tile.just-drawn{animation:none}}

body #table::after{top:auto!important;right:auto!important;bottom:5px!important;left:50%!important;width:auto!important;height:auto!important;border:0!important;border-radius:0!important;inset-block-start:auto!important}
body .paper-head{height:auto!important;min-height:52px!important;flex-shrink:0!important;position:relative!important;box-sizing:border-box!important}
body .paper-score{overflow:hidden}.paper-head .paper-room,.paper-head .paper-time{position:static!important;float:none!important}

body .game-column .table .player.pos1{right:17px!important}body .game-column .table .player.pos3{left:17px!important}
body .game-column .table .player.pos1 .seat-progress{right:-9px!important;left:auto!important;top:0!important;width:5px!important;min-height:54px;height:100%!important;max-height:80px;background:#d9e5cf55;z-index:4}
body .game-column .table .player.pos3 .seat-progress{left:-9px!important;right:auto!important;top:0!important;width:5px!important;min-height:54px;height:100%!important;max-height:80px;background:#d9e5cf55;z-index:4}

.pair-confirm{text-align:center}.pair-confirm h2{font-size:21px;margin:15px 0}.pair-confirm-icon{display:flex;justify-content:center;gap:5px;margin:20px 0}.pair-confirm-icon i{display:grid;place-items:center;width:30px;height:43px;font:bold 25px Georgia;color:#d5a234;background:#fbf6df;border:1px solid #ddd1ad;border-radius:5px;box-shadow:0 2px 0 #c6ba9b}.pair-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.pair-options span{display:flex;flex-direction:column;gap:5px;border:1px solid #e2e8dc;background:#f8faf4;border-radius:10px;padding:12px;font-size:11px;color:#86967c}.pair-options b{font-size:23px;color:#38634a}.pair-confirm>p{font-size:12px;max-width:330px;margin:15px auto}.pair-confirm #confirmPair{min-width:180px;min-height:42px;border-radius:10px}

body .game-column .table .player.pos0 .seat-progress{top:-12px!important;bottom:auto!important;left:50%!important;width:110px!important;height:4px!important;background:#d9e5cf44;transform:translateX(-50%)}
body #table::after{content:'81 OKEY'!important;bottom:80px!important;top:auto!important;right:auto!important;left:50%!important;transform:translateX(-50%)!important;width:max-content!important;height:auto!important;font:800 clamp(54px,11vw,150px)/1 Manrope,sans-serif!important;letter-spacing:5px!important;opacity:.045!important;color:#e0edd5!important;border:0!important;z-index:0}
body #table #players,body #table #discardZones,body #table .table-center{z-index:1}

/* Attached player progress tracks and correctly sized modal numerals. */
body .game-column .table .player.pos0,body .game-column .table .player.pos2{padding-bottom:12px!important;box-sizing:content-box}
body .game-column .table .player.pos0 .seat-progress,body .game-column .table .player.pos2 .seat-progress{top:auto!important;bottom:0!important;left:50%!important;transform:translateX(-50%)!important;width:100%!important;max-width:120px!important;height:4px!important;background:#d9e5cf44}
body .decision-tile .tile,body .history-tiles .tile{width:var(--match-tile-width,40px)!important;min-width:var(--match-tile-width,40px)!important;max-width:var(--match-tile-width,40px)!important;height:var(--match-tile-height,58px)!important;flex-basis:var(--match-tile-width,40px)!important;font-size:var(--match-tile-font,26px)!important;box-sizing:border-box;padding:0!important;position:relative;overflow:hidden}
body .decision-tile .tile .tile-number,body .history-tiles .tile .tile-number{position:absolute!important;inset:0 0 9px!important;display:flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;text-align:center!important;font-size:inherit!important;letter-spacing:-.5px}
