/* The chess stage owns its layout; ordinary location/HUD styles do not apply. */
html body[data-game='palace'].game-shell #game.game-page.shuanglu-page {
 display:grid;grid-template-rows:minmax(0,1fr);gap:0;padding:0;
 background:radial-gradient(ellipse at top,#fff9e8,#e4cda7);color:#493c2b;isolation:isolate;
}
#game.shuanglu-page button {font:inherit;color:inherit;border:1px solid rgba(175,147,100,.5);border-radius:8px;background:rgba(255,249,237,.76);padding:5px 12px;margin:0;min-height:32px;cursor:pointer;box-shadow:0 2px 8px rgba(79,57,29,.09);}
#game.shuanglu-page button:disabled {opacity:.5;cursor:default;}
#game.shuanglu-page button:focus-visible {outline:2px solid #967142;outline-offset:2px;}
#game.shuanglu-page .sl-header {display:flex;gap:10px;align-items:center;min-width:0;margin:0;padding:0 38px 0 0;border:0;min-height:0;width:auto;height:auto;box-sizing:border-box;}
#game.shuanglu-page .sl-header h2 {font-size:18px;margin:0 auto 0 0;white-space:nowrap;}
#game.shuanglu-page .sl-header>small {min-width:0;max-width:37%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#game.shuanglu-page small {font-size:12px;}
#game.shuanglu-page .sl-field {position:relative;display:block;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;container-type:size;background:image-set(url('/public/assets/ui/character-frames/Chessboard-01.webp?v=bf5ee643e80e') type('image/webp'),url('../../public/assets/ui/character-frames/Chessboard-01.png') type('image/png')) center/108% 126% no-repeat;}
#game.shuanglu-page .sl-point {position:absolute;left:calc(1.4% + var(--column) * 7.02% + var(--half) * 13.176%);top:3.5%;width:7.02%;height:39%;display:flex;align-items:center;flex-direction:column;min-width:0;min-height:0;padding:0;border:0;border-radius:3px;background:transparent;isolation:isolate;}
#game.shuanglu-page .sl-bottom {top:auto;bottom:3.5%;flex-direction:column-reverse;}
#game.shuanglu-page .sl-number {height:clamp(17px,2.8cqh,22px);flex:none;align-self:center;min-width:clamp(17px,2.8cqh,24px);padding-inline:3px;border:1px solid #d1af7459;border-radius:4px;background:#261407b5;font:clamp(11px,1.15cqw,16px)/clamp(17px,2.8cqh,22px) serif;color:#ffe8b6;text-shadow:0 1px 2px #1f1008;box-shadow:0 1px 3px #1e100660;}
#game.shuanglu-page .sl-home-zhu .sl-number {color:#ffccaa;}
#game.shuanglu-page .sl-home-qing .sl-number {color:#bcf3d3;}
#game.shuanglu-page .sl-stack {position:relative;display:block;flex:1;width:100%;min-height:0;}
#game.shuanglu-page .sl-horse {position:absolute;left:50%;top:calc(min(var(--i),7) * min(13px,2.7cqh));transform:translateX(-50%);width:clamp(24px,min(4.1cqw,7.4cqh),48px);height:clamp(24px,min(4.1cqw,7.4cqh),48px);background-position:center;background-size:contain;background-repeat:no-repeat;filter:drop-shadow(0 2px 1px #180d0890);pointer-events:none;}
#game.shuanglu-page .sl-bottom .sl-horse {top:auto;bottom:calc(min(var(--i),7) * min(13px,2.7cqh));}
#game.shuanglu-page .sl-zhu.sl-horse {background-image:image-set(url('/public/assets/ui/character-frames/red-01.webp?v=c4f574811a3d') type('image/webp'), url('../../public/assets/ui/character-frames/red-01.png') type('image/png'));}
#game.shuanglu-page .sl-qing.sl-horse {background-image:image-set(url('/public/assets/ui/character-frames/green-01.webp?v=6961d138b2b8') type('image/webp'), url('../../public/assets/ui/character-frames/green-01.png') type('image/png'));}
#game.shuanglu-page .sl-zhu.sl-count {background:#a73e31;color:#fff4d7;}
#game.shuanglu-page .sl-qing.sl-count {background:#205b60;color:#edfbef;}
#game.shuanglu-page .sl-count {position:absolute;right:-2px;top:20px;z-index:2;min-width:15px;height:17px;border:1px solid #f8e8ba;border-radius:4px;font:bold 12px/15px sans-serif;text-align:center;box-shadow:0 1px 3px #412f1d80;}
#game.shuanglu-page .sl-bottom .sl-count {top:auto;bottom:20px;}
#game.shuanglu-page .sl-selected {outline:3px solid #d99d27;outline-offset:-3px;}
#game.shuanglu-page .sl-target {background:#ffeab44d;box-shadow:inset 0 0 0 3px #b67a0b;}
#game.shuanglu-page .sl-dice {display:flex;gap:4px;align-items:center;margin-right:auto;min-width:0;}
#game.shuanglu-page .sl-dice button {padding:2px 5px;min-height:30px;font-size:13px;}
#game.shuanglu-page .sl-die-face {font:32px/1 sans-serif;color:#7b3026;}
#game.shuanglu-page .sl-overlay {position:absolute;inset:0;z-index:10;background:#3b2b2255;display:grid;place-items:center;padding:12px;}
#game.shuanglu-page .sl-paper {background:#fff6e0;border:4px double #96754c;box-shadow:0 6px 30px #30201060;padding:16px 20px;width:min(540px,94%);max-height:100%;overflow:auto;box-sizing:border-box;font-size:14px;}
#game.shuanglu-page .sl-menu {display:flex;flex-direction:column;gap:10px;width:min(390px,80%);max-width:390px;max-height:min(440px,90%);padding:15px 18px;background:#fff6e4;border:2px solid #a88757;border-radius:12px;box-shadow:0 8px 24px #25160969,inset 0 0 0 3px #fffaeb;overflow:auto;}
#game.shuanglu-page .sl-menu h3 {text-align:center;font-size:18px;font-weight:600;margin:0 0 4px;}
#game.shuanglu-page .sl-menu>button {min-height:36px;font-size:15px;padding:5px 12px;}
#game.shuanglu-page .sl-menu>label {display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:15px;padding:3px 4px;}
#game.shuanglu-page .sl-menu select {width:auto;min-width:100px;min-height:32px;padding:4px 9px;border:1px solid rgba(156,114,62,.53);border-radius:7px;color:#503a25;background:#fff7e7;font-size:14px;}
#game.shuanglu-page .sl-confirm {width:min(380px,85%);max-width:380px;border-radius:10px;}
#game.shuanglu-page .sl-paper h3,#game.shuanglu-page .sl-paper h4 {margin:4px 0;}
#game.shuanglu-page .sl-paper p {margin:8px 0;line-height:1.6;}


#game.shuanglu-page .sl-last-land::after {content:'';position:absolute;inset:2px;border:2px dashed #d59a21;pointer-events:none;}
#game.shuanglu-page .sl-flying {z-index:12;pointer-events:none;}
#game.shuanglu-page.sl-rolling .sl-die-face {animation:sl-dice .15s ease-in-out infinite alternate;}
@keyframes sl-dice {from{transform:rotate(-12deg) translateY(-2px);}to{transform:rotate(12deg) translateY(2px);}}

body:has(#game.shuanglu-page) #stage-fullscreen {top:8px;bottom:auto;right:8px;width:30px;height:30px;min-width:30px;min-height:30px;padding:5px;}
html body[data-game='palace'].game-shell #game.game-page.shuanglu-page[data-sl-view='lobby'] {
 display:block;padding:0;color:#493d30;
 background:image-set(url('/public/assets/backgrounds/locations/文澜阁.webp?v=883f2aca0e67') type('image/webp'), url('/public/assets/backgrounds/locations/文澜阁.png') type('image/png')) center / cover no-repeat;
 font-family:'Noto Serif CJK SC','Songti SC','STSong','SimSun',serif;
}
#game.shuanglu-page[data-sl-view='lobby'] .sl-header {
 position:absolute;top:clamp(12px,3cqh,28px);left:clamp(18px,3cqw,42px);right:clamp(18px,3cqw,42px);
 z-index:2;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0;min-height:40px;
}
#game.shuanglu-page[data-sl-view='lobby'] .sl-header h2 {
 color:#f8e6c3;text-shadow:0 2px 5px #27170c,0 0 12px #342113;
 font-size:var(--font-heading);font-weight:600;margin:0;
}
#game.shuanglu-page[data-sl-view='lobby'] .sl-header>button {
 min-height:36px;min-width:80px;background:rgba(251,244,227,.94);
 border:1px solid #b29a6f;border-radius:9px;
 box-shadow:inset 0 0 0 2px #fff9eb,0 2px 8px #34201054;
 padding:5px 14px;font-size:var(--font-body);
}
#game.shuanglu-page .sl-lobby {
 position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;
 gap:clamp(9px,1.8cqh,15px);
 padding:clamp(66px,12cqh,92px) clamp(20px,3cqw,36px) clamp(14px,3cqh,26px);
 box-sizing:border-box;min-height:0;overflow:hidden;
}
#game.shuanglu-page .sl-lobby-choices {
 display:flex;flex-direction:column;justify-content:center;gap:clamp(9px,2cqh,17px);
 width:min(46%,420px);min-width:250px;
}
#game.shuanglu-page .sl-lobby-choices>button.palace-choice {
 width:100%;min-height:clamp(39px,6cqh,53px);
 font-size:var(--font-body);font-weight:500;letter-spacing:.06em;
}
#game.shuanglu-page .sl-lobby-variants {
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(7px,1.5cqw,14px);
 width:min(82%,820px);min-width:0;
}
#game.shuanglu-page .sl-lobby-variants>button.sl-variant {
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
 min-width:0;min-height:clamp(58px,12cqh,86px);padding:6px 9px;
 border:1px solid #bba47d;border-radius:10px;
 background:rgba(252,244,226,.92);box-shadow:0 3px 10px #22150d4d;
 font-size:clamp(15px,1.7cqw,22px);font-weight:600;letter-spacing:.07em;
}
#game.shuanglu-page .sl-lobby-variants>button.sl-variant small {
 display:block;min-width:0;font-size:clamp(10px,1.05cqw,13px);
 line-height:1.35;font-weight:400;letter-spacing:0;text-align:center;
 white-space:normal;overflow-wrap:anywhere;
}
#game.shuanglu-page .sl-lobby-variants>button.sl-variant.sl-selected {
 border-color:#8c6031;box-shadow:inset 0 0 0 2px #b68b52,0 4px 12px #22150d65;
 background:#f6dfb5;color:#4e2f1a;
}
#game.shuanglu-page .sl-variant-summary {
 display:block;max-width:85%;padding:4px 14px;border-radius:8px;
 background:rgba(251,241,219,.92);color:#543b26;text-align:center;
 text-shadow:none;font-size:clamp(11px,1.1cqw,14px);
}
#game.shuanglu-page .sl-lobby-people {
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:clamp(6px,1.5cqh,13px) clamp(12px,2cqw,22px);
 width:min(70%,680px);max-height:100%;min-width:0;overflow:auto;align-content:start;
 padding:clamp(16px,3cqh,28px) clamp(20px,3cqw,40px);
 box-sizing:border-box;border:1px solid rgba(192,159,105,.72);border-radius:15px;
 background:rgba(249,240,222,.9);box-shadow:0 8px 24px #20150e77,inset 0 0 0 3px #fff9e9a3;
}
#game.shuanglu-page .sl-lobby-people h3 {
 grid-column:1/-1;text-align:center;margin:0 0 clamp(4px,1.5cqh,12px);
 font-size:clamp(17px,2vw,24px);font-weight:600;color:#543f2d;
}
#game.shuanglu-page .sl-lobby-people>button.sl-person-option {
 display:flex;align-items:center;justify-content:center;min-height:clamp(34px,5.5cqh,47px);
 padding:4px 8px;min-width:0;white-space:nowrap;word-break:keep-all;
 border:0;border-bottom:1px solid rgba(139,101,55,.33);border-radius:4px;
 background:rgba(255,250,238,.4);box-shadow:none;
 font-size:clamp(14px,1.5vw,19px);font-weight:500;letter-spacing:.04em;color:#4a3523;
}
#game.shuanglu-page .sl-lobby-people>button.sl-person-option:hover,
#game.shuanglu-page .sl-lobby-people>button.sl-person-option:focus-visible {
 background:rgba(246,221,175,.62);border-bottom-color:#997042;
}
#game.shuanglu-page .sl-lobby-people p {grid-column:1/-1;text-align:center;margin:7px 0;}
#game.shuanglu-page .sl-stake-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px;}
#game.shuanglu-page .sl-stake-choices>button {min-width:0;width:100%;}
#game.shuanglu-page .sl-stake-choices.sl-talk-only {grid-template-columns:minmax(0,1fr);max-width:300px;margin-inline:auto;}
#game.shuanglu-page .sl-gift-choice {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px;}
#game.shuanglu-page .sl-gift-choice label {font-size:12px;display:flex;flex-direction:column;gap:4px;min-width:0;}
#game.shuanglu-page .sl-gift-choice select {min-width:0;max-width:100%;font:13px serif;min-height:32px;}
#game.shuanglu-page .sl-gift-choice>button {grid-column:1/-1;}
#game.shuanglu-page .sl-error {color:#9b3025;}
@media(max-width:760px){
 #game.shuanglu-page .sl-lobby {padding:58px 14px 10px;}
 #game.shuanglu-page .sl-lobby-choices {width:min(68%,410px);min-width:0;}
 #game.shuanglu-page .sl-lobby-variants {width:min(96%,740px);gap:6px;}
 #game.shuanglu-page .sl-lobby-variants>button.sl-variant {min-height:55px;padding:4px 5px;font-size:14px;}
 #game.shuanglu-page .sl-lobby-variants>button.sl-variant small {font-size:10px;}
 #game.shuanglu-page .sl-lobby-people {width:min(90%,630px);padding:10px 15px;gap:5px 10px;}
 #game.shuanglu-page .sl-lobby-people h3 {margin:0 0 3px;font-size:17px;}
 #game.shuanglu-page .sl-lobby-people>button.sl-person-option {font-size:14px;min-height:34px;}
}

/* Magnified artwork is 108% wide and 126% tall so the ornamental wood,
   rather than the source image's beige margins, reaches the stage edges.
   The 24 playable columns above are transformed with the same horizontal
   scale so touches still land on the corresponding physical board lanes. */
/* Full-screen chessboard: status and interaction live on the wood, never in a side panel. */
#game.shuanglu-page[data-sl-view='board'] {display:block;padding:0;overflow:hidden;}
#game.shuanglu-page .sl-board-controls {
 position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:6;
 display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;
 max-width:48%;pointer-events:none;
}
#game.shuanglu-page .sl-board-controls>* {pointer-events:auto;}
#game.shuanglu-page .sl-board-controls>button[data-sl-roll] {
 border:1px solid #bd965a;border-radius:8px;
 background:rgba(247,225,188,.93);box-shadow:0 2px 9px #24130c88;
 color:#4f3520;
 min-width:clamp(88px,12cqw,156px);min-height:clamp(38px,7cqh,55px);
 font-size:clamp(16px,2.1cqw,25px);letter-spacing:.14em;
}
#game.shuanglu-page .sl-board-controls>button[data-sl-roll]:hover {background:#fff1cc;}
#game.shuanglu-page .sl-board-controls .sl-dice {
 display:flex;align-items:center;justify-content:center;gap:6px;margin:0;flex-wrap:wrap;
 padding:5px 9px;border-radius:8px;background:rgba(248,232,198,.88);box-shadow:0 2px 10px #26190d44;
}
#game.shuanglu-page .sl-board-controls .sl-dice button {min-width:28px;min-height:30px;padding:3px 7px;}
#game.shuanglu-page .sl-board-controls .sl-error {
 max-width:280px;background:#fff5dbec;color:#902b22;border-radius:6px;padding:4px 8px;text-align:center;
}
/* Low-chrome scoreboard in the clear central area of the board. */
#game.shuanglu-page .sl-hud {
 position:absolute;z-index:5;top:35%;right:9.2%;
 display:flex;flex-direction:column;align-items:flex-start;gap:clamp(5px,1.5cqh,13px);
 text-align:left;
 color:#f7e4bb;text-shadow:0 2px 5px #1b0c06,0 0 10px #160d09;
 pointer-events:none;
}
#game.shuanglu-page .sl-round {
 font-size:clamp(14px,1.6cqw,21px);font-weight:600;line-height:1.4;
 white-space:nowrap;margin:0 0 clamp(3px,1cqh,8px);
}
#game.shuanglu-page .sl-score {
 display:grid;grid-template-columns:max-content max-content;align-items:baseline;justify-content:start;column-gap:9px;
 padding:0;border:0;background:none;box-shadow:none;white-space:nowrap;
 color:inherit;min-height:0;
}
#game.shuanglu-page .sl-score>span {font-size:clamp(11px,1.2cqw,16px);line-height:1.35;}
#game.shuanglu-page .sl-score>strong {
 font-size:clamp(14px,1.7cqw,22px);font-weight:500;line-height:1.25;
 color:#fff1cb;font-variant-numeric:tabular-nums;
}
#game.shuanglu-page .sl-hud .sl-score.sl-target {
 pointer-events:auto;cursor:pointer;min-height:34px;align-items:center;
 border:1px solid #e7ba62;border-radius:6px;background:#62431cad;
 padding:3px 8px;box-shadow:0 0 10px #e6b35683;
}
#game.shuanglu-page .sl-hud .sl-menu-trigger {
 position:static;align-self:flex-start;pointer-events:auto;
 min-width:0;min-height:32px;margin-top:clamp(2px,.6cqh,6px);
 padding:3px 0;border:0;border-radius:0;background:transparent;box-shadow:none;
 color:inherit;text-shadow:inherit;text-align:left;
 font-size:clamp(14px,1.45cqw,19px);cursor:pointer;
}
#game.shuanglu-page .sl-hud .sl-menu-trigger:hover {
 background:transparent;color:#fff4d4;text-decoration:underline;
}
/* Bar count is a read-only marker; reentry targets are selected automatically. */
#game.shuanglu-page .sl-bar {
 position:absolute;left:50%;z-index:7;transform:translateX(-50%);
 display:flex;align-items:center;justify-content:center;white-space:nowrap;
 min-height:27px;padding:2px 9px;border:1px solid #b3925b;border-radius:6px;
 background:rgba(46,28,15,.85);box-shadow:0 2px 8px #2112068f;
 color:#f4dfb2;font-size:clamp(12px,1.15cqw,15px);
 pointer-events:none;
}
#game.shuanglu-page .sl-bar.sl-selected {border-color:#f1c878;box-shadow:0 0 0 2px #e6b35688,0 2px 8px #2112068f;}
#game.shuanglu-page .sl-bar.sl-bar-choice {pointer-events:auto;cursor:pointer;}
#game.shuanglu-page .sl-bar.sl-bar-choice:hover {background:rgba(94,61,26,.92);}
#game.shuanglu-page .sl-bar-qing {top:29%;}
#game.shuanglu-page .sl-bar-zhu {bottom:29%;}
#game.shuanglu-page .sl-board-controls>button[data-sl-undo] {
 min-height:27px;font-size:12px;background:rgba(255,249,232,.78);
 border:1px solid rgba(150,113,66,.6);box-shadow:none;
}
@media(max-height:410px) {
 #game.shuanglu-page .sl-hud {gap:5px;}

 #game.shuanglu-page .sl-horse {width:clamp(22px,4cqw,36px);height:clamp(22px,4cqw,36px);}
}
/* First-use guidance sits above the board; it never shifts pieces or the HUD. */
#game.shuanglu-page .sl-guide-overlay {
 position:absolute;inset:0;z-index:9;background:rgba(30,17,9,.24);
}
#game.shuanglu-page .sl-guide-route {
 position:absolute;inset:0;width:100%;height:100%;pointer-events:none;
 color:#efbc73;filter:drop-shadow(0 2px 3px #1c100aca);
}
#game.shuanglu-page .sl-guide-card {
 position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
 box-sizing:border-box;width:min(370px,58%);padding:12px 17px;
 border:2px solid #b18a55;border-radius:11px;
 background:rgba(255,246,225,.97);box-shadow:0 6px 22px #1b0c08ad;
 text-align:center;color:#533b25;font-size:clamp(12px,1.3cqw,15px);
}
#game.shuanglu-page .sl-guide-card h3 {margin:0 0 5px;font-size:clamp(15px,1.6cqw,19px);font-weight:600;}
#game.shuanglu-page .sl-guide-card p {margin:0 0 9px;line-height:1.5;}
#game.shuanglu-page .sl-guide-card button {min-width:96px;min-height:31px;background:#f2dcaf;border-color:#bd965a;}
@media(max-height:410px){
 #game.shuanglu-page .sl-guide-card {padding:8px 12px;width:min(340px,59%);}
 #game.shuanglu-page .sl-guide-card h3 {margin-bottom:3px;}
 #game.shuanglu-page .sl-guide-card p {margin-bottom:5px;line-height:1.35;}
}
