#zh-games{--ink:#482b42;--pink:#a31c66;--rose:#ea418e;--cream:#fff9fb;--line:#ebd2df}
#zh-games *{box-sizing:border-box}
#zh-games button,#zh-games select,#zh-games input{font:inherit}
#zh-games button{cursor:pointer}
#zh-games button:disabled{cursor:not-allowed;opacity:.4}
#zh-games h1{font-size:35px;line-height:1.2;color:#8b1e5d;margin:0 0 12px}
#zh-games .subtitle{font-size:19px;margin:0}
#zh-games .section{margin-top:26px}
#zh-games .section h2{font-size:26px;color:#8e1658;margin:0 0 13px}
#zh-games .panel{padding:18px;background:#fff;border:1px solid var(--line);border-radius:16px}
#zh-games .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#zh-games .gamecard{background:white;border:1px solid var(--line);border-radius:16px;padding:19px 16px;min-width:0;display:flex;flex-direction:column;align-items:start;gap:8px}
#zh-games .gamecard .symbol{font-size:37px}
#zh-games .gamecard h3{font-size:22px;margin:0;color:var(--pink)}
#zh-games .gamecard p{margin:0 0 6px;font-size:17px;flex:1}
#zh-games .btn{border:0;border-radius:12px;background:#dd3e8a;color:white;padding:10px 14px;font-weight:800;min-height:44px;font-size:16px}
#zh-games .btn.alt{background:#773367}
#zh-games .btn.outline{background:#fff;border:1px solid #b14b86;color:#8a1b56}
#zh-games .btn.small{font-size:15px;min-height:36px;padding:5px 10px}
#zh-games .actions{display:flex;flex-wrap:wrap;gap:7px}
#zh-games select{width:100%;padding:10px;border:1px solid #d7a7c3;border-radius:10px;margin:5px 0 14px;background:white}
#zh-games .game-list{display:grid;gap:9px}
#zh-games .gameentry{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;border:1px solid var(--line);border-radius:12px;padding:13px}
#zh-games .gameentry strong{display:block}
#zh-games .muted{font-size:15px;color:#685d68}
#zh-games .alert{border:1px solid #dba7c5;background:#fff1f9;border-radius:12px;padding:10px 15px;margin:10px 0}
#zh-games .hidden{display:none!important}
#zh-games .board8{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:100%;margin:auto;aspect-ratio:1;max-width:630px;border:5px solid #855d53;border-radius:6px;overflow:hidden}
#zh-games .sq{border:0;border-radius:0;display:flex;align-items:center;justify-content:center;font-size:clamp(16px,2.3vw,40px);min-width:0;aspect-ratio:1;line-height:1}
#zh-games .sq.light{background:#f5dec3}
#zh-games .sq.dark{background:#b98387}
#zh-games .sq.selected{outline:4px solid #ffec64;outline-offset:-4px}
#zh-games .sq.piece-white{text-shadow:0 1px 3px #333}
#zh-games .sq.piece-black{text-shadow:0 1px 2px white}
#zh-games .board3{display:grid;grid-template-columns:repeat(3,1fr);max-width:400px;margin:auto;gap:5px}
#zh-games .board3 button{aspect-ratio:1;border:1px solid #ad7088;background:#fff2f8;color:#a42568;font-size:clamp(38px,6vw,75px);font-weight:900}
#zh-games .bgboard{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:3px;background:#925c54;padding:6px;border-radius:9px;max-width:750px;margin:auto}
#zh-games .bgpoint{min-width:0;aspect-ratio:0.72;border:1px solid #763f3e;background:#fff0dd;padding:2px;font-size:12px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-weight:800}
#zh-games .bgpoint:nth-child(odd){background:#e9bcc4}
#zh-games .bgpoint.selected{outline:3px solid gold;outline-offset:-3px}
#zh-games .bgpieces{font-size:clamp(12px,1.5vw,24px)}
#zh-games .wordboard{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:1px;background:#9b6685;padding:3px;max-width:720px;margin:auto}
#zh-games .wordcell{border:0;min-width:0;aspect-ratio:1;background:#f5e9d8;font-size:clamp(9px,.9vw,17px);font-weight:800;padding:0;color:#483027}
#zh-games .wordcell.filled{background:#f1bd67}
#zh-games .wordcell.pending{background:#fce788}
#zh-games .wordcell.center-star{background:#eecee0}
#zh-games .tile{display:inline-flex;justify-content:center;align-items:center;background:#f4c977;border:1px solid #ad8543;border-radius:7px;min-width:38px;min-height:41px;padding:5px 9px;font-weight:900;color:#4e301e}
#zh-games .tile.selected{background:#f4e45c;outline:3px solid #e16e83}
#zh-games .rack{display:flex;gap:7px;flex-wrap:wrap;margin:14px 0}
#zh-games .cards{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
#zh-games .playing-card{border:2px solid #d6b1c6;border-radius:8px;background:#fff;width:64px;height:87px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:900;font-size:22px;line-height:1.15}
#zh-games .playing-card.red{color:#c5243f}
#zh-games .playing-card.selected{outline:4px solid #f7ce48}
#zh-games .status{background:#fbf1f7;border-left:5px solid #aa3683;padding:13px 17px;margin:13px 0;border-radius:8px}
#zh-games .controls{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}
#zh-games .help{font-size:16px;color:#5f4d60}
@media (max-width:1100px){}
@media (max-width:700px){#zh-games .grid{grid-template-columns:1fr}
#zh-games .panel{padding:12px}
#zh-games h1{font-size:29px}
#zh-games .section h2{font-size:24px}
#zh-games .sq{font-size:clamp(24px,8vw,37px)}
#zh-games .wordcell{font-size:clamp(9px,2.5vw,15px)}
#zh-games .bgpieces{font-size:15px}
#zh-games .bgpoint{font-size:9px}}
#zh-games,#zh-games .panel,#zh-games .gamecard,#zh-games .gameentry,#zh-games .status,#zh-games select{
    font-size: 18px;
}
#zh-games .subtitle,#zh-games .gamecard p,#zh-games .panel p,#zh-games .help,#zh-games .muted{
    font-size: 18px;
    line-height: 1.6;
}
#zh-games .gamecard h3{
    font-size: 22px;
    line-height: 1.3;
}
#zh-games .section h2{
    font-size: 26px;
    line-height: 1.3;
}
#zh-games .btn,#zh-games .btn.small{
    font-size: 18px;
    line-height: 1.3;
    min-height: 46px;
    padding: 10px 14px;
}
#zh-games select{
    min-height: 48px;
    line-height: 1.4;
}
#zh-games .gamecard{
    gap: 12px;
}
#zh-games .actions{
    gap: 9px;
}
@media  (max-width: 1100px) {}
@media  (max-width: 700px) {#zh-games .grid{
        grid-template-columns: 1fr;
    }
#zh-games .gamecard p,#zh-games .help,#zh-games .muted,#zh-games .subtitle{
        font-size: 18px;
    }
#zh-games .btn,#zh-games .btn.small{
        font-size: 18px;
        min-height: 46px;
    }}
#zh-games .laf-manual-btn{font-size:18px!important;min-height:46px!important;line-height:1.3!important;white-space:normal}
#zh-games .laf-active-manual-row{display:flex;justify-content:flex-end;margin:0 0 14px}
#zh-games .laf-manual-dialog{border:1px solid #e2accb;border-radius:18px;padding:0;width:min(760px,calc(100vw - 24px));max-height:min(88vh,920px);color:#482b42;background:#fff;box-shadow:0 20px 70px #38213255}
#zh-games .laf-manual-dialog::backdrop{background:#22102999}
#zh-games .laf-manual-heading{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff4fa;border-bottom:1px solid #e8c5d9;padding:16px 20px;z-index:1}
#zh-games .laf-manual-heading h2{margin:0;font-size:26px;color:#901950;line-height:1.2}
#zh-games .laf-manual-scroll{padding:18px 24px 25px;overflow-y:auto;max-height:calc(88vh - 76px);font-size:18px;line-height:1.65}
#zh-games .laf-manual-scroll h3{font-size:21px;color:#8f205b;margin:22px 0 9px}
#zh-games .laf-manual-scroll h3:first-child{margin-top:8px}
#zh-games .laf-manual-scroll ul{margin:0;padding-left:26px}
#zh-games .laf-manual-scroll li{margin:0 0 10px}
#zh-games .laf-manual-scroll p{margin:0 0 14px;font-size:18px}
#zh-games .laf-manual-tip{border-left:4px solid #df478c;background:#fff2f9;padding:11px 15px;border-radius:8px;margin-top:23px}
@media (max-width:700px){#zh-games .laf-manual-dialog{max-height:90vh}
#zh-games .laf-manual-heading{padding:12px 14px}
#zh-games .laf-manual-heading h2{font-size:23px}
#zh-games .laf-manual-scroll{padding:16px;max-height:calc(90vh - 70px)}
#zh-games .laf-manual-scroll,#zh-games .laf-manual-scroll p{font-size:18px}}
#zh-games .gamecard .actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  width:100%;gap:8px;align-items:stretch;
}
#zh-games .gamecard .actions > button{
  display:flex;justify-content:center;align-items:center;text-align:center;
  width:100%;min-width:0;height:62px;min-height:62px;max-height:62px;
  padding:7px 8px;font-size:16px!important;line-height:1.2!important;
  white-space:normal;overflow-wrap:normal;
}
#zh-games .gamecard .actions > .laf-manual-btn{min-height:62px!important;height:62px!important;font-size:16px!important;}
#zh-games .laf-results-dialog{border:1px solid #e2accb;border-radius:18px;padding:0;width:min(740px,calc(100vw - 24px));max-height:88vh;background:white;color:#482b42;box-shadow:0 20px 65px #38213255}
#zh-games .laf-results-dialog::backdrop{background:#22102999}
#zh-games .laf-results-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:15px 19px;background:#fff4fa;border-bottom:1px solid #e8c5d9}
#zh-games .laf-results-heading h2{margin:0;font-size:24px;color:#901950}
#zh-games .laf-results-scroll{max-height:calc(88vh - 84px);overflow-y:auto;padding:18px;font-size:18px;line-height:1.5}
#zh-games .laf-results-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:17px}
#zh-games .laf-results-stat{text-align:center;background:#fff7fb;border:1px solid #eccddd;border-radius:12px;padding:12px 5px}
#zh-games .laf-results-stat strong{display:block;color:#92245e;font-size:27px;line-height:1.25}
#zh-games .laf-results-stat span{display:block;font-size:15px}
#zh-games .laf-results-scroll h3{color:#8e1658;font-size:20px;margin:19px 0 7px}
#zh-games .laf-results-progress{padding:13px;border:1px solid #e7c3d7;border-radius:12px;background:#fff9fc}
#zh-games .laf-results-compare{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:9px}
#zh-games .laf-results-compare div{border-radius:9px;background:white;padding:10px;text-align:center;border:1px solid #edd7e1}
#zh-games .laf-results-compare strong{font-size:26px;display:block;color:#941b59}
#zh-games .laf-results-list{list-style:none;margin:8px 0 0;padding:0}
#zh-games .laf-results-list li{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #f0dce7;padding:9px 3px;font-size:17px}
#zh-games .laf-results-list b.win{color:#126c39}
#zh-games .laf-results-list b.loss{color:#a42845}
#zh-games .laf-results-list b.draw{color:#7a5768}
#zh-games .laf-results-footnote{color:#6c5d68;font-size:15px}
@media (max-width:700px){#zh-games .laf-results-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
#zh-games .laf-results-heading{padding:12px}
#zh-games .laf-results-scroll{padding:13px}
#zh-games .gamecard .actions > button,#zh-games .gamecard .actions > .laf-manual-btn{height:62px!important;min-height:62px!important;max-height:62px!important;font-size:15px!important}
#zh-games .laf-results-compare strong{font-size:23px}}
#zh-games .gamecard{
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
}
#zh-games .gamecard > .symbol{
    grid-column: 1;
    grid-row: 1;
    width: 52px;
    line-height: 1.25;
    align-self: center;
}
#zh-games .gamecard > h3{
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    align-self: center;
}
#zh-games .gamecard > p{
    grid-column: 1 / -1;
    grid-row: 2;
}
#zh-games .gamecard > .actions{
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    align-self: end;
}
#zh-games .chess-captured{max-width:630px;margin:16px auto;padding:15px;background:#fff;border:1px solid #ebd2df;border-radius:14px}
#zh-games .chess-captured-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:8px 0;font-size:17px}
#zh-games .chess-captured-row strong{min-width:180px;color:#8b1e5d}
#zh-games .chess-captured-pieces{font-size:30px;line-height:1.4;letter-spacing:4px}
#zh-games .laf-backgammon-board{
 display:grid;
 grid-template-columns:repeat(6,minmax(0,1fr)) 24px repeat(6,minmax(0,1fr));
 grid-template-rows:repeat(2,155px);
 gap:0;
 width:100%;
 max-width:750px;
 margin:18px auto;
 padding:10px;
 background:#e8bf84;
 border:9px solid #78442c;
 border-radius:12px;
 box-shadow:0 6px 18px #482b4240;
}
#zh-games .laf-bg-point{
 position:relative;
 display:block;
 min-width:0;
 min-height:0;
 border:0;
 border-radius:0;
 padding:0;
 background:transparent;
 overflow:hidden;
 cursor:pointer;
 opacity:1!important;
}
#zh-games .laf-bg-point::before{
 content:"";
 position:absolute;
 inset:0;
 background:#9c4770;
}
#zh-games .laf-bg-point:nth-child(even)::before{background:#f8e9cc}
#zh-games .laf-bg-point.top::before{clip-path:polygon(0 0,100% 0,50% 96%)}
#zh-games .laf-bg-point.bottom::before{clip-path:polygon(50% 4%,100% 100%,0 100%)}
#zh-games .laf-bg-point.selected{
 outline:4px solid #ffd400;
 outline-offset:-4px;
 z-index:3;
}
#zh-games .laf-bg-bar{
 display:flex;
 align-items:center;
 justify-content:center;
 background:#78442c;
 color:#fff;
 font-size:11px;
 font-weight:bold;
 writing-mode:vertical-rl;
 letter-spacing:2px;
}
#zh-games .laf-bg-stack{
 position:absolute;
 left:0;
 right:0;
 display:flex;
 flex-direction:column;
 align-items:center;
 z-index:2;
 pointer-events:none;
}
#zh-games .laf-bg-point.top .laf-bg-stack{top:5px}
#zh-games .laf-bg-point.bottom .laf-bg-stack{bottom:5px;flex-direction:column-reverse}
#zh-games .laf-bg-checker{
 display:block;
 width:clamp(16px,4vw,30px);
 height:clamp(16px,4vw,30px);
 max-width:90%;
 flex-shrink:0;
 border-radius:50%;
 border:2px solid #fff8;
 box-shadow:0 2px 3px #0005;
}
#zh-games .laf-bg-checker+.laf-bg-checker{margin-top:-8px}
#zh-games .laf-bg-checker.red{background:#c51b4e}
#zh-games .laf-bg-checker.black{background:#292333}
#zh-games .laf-bg-count{
 position:relative;
 z-index:3;
 color:#fff;
 background:#532d45;
 border-radius:8px;
 padding:0 5px;
 font-size:13px;
 font-weight:bold;
}
#zh-games .laf-bg-number{
 position:absolute;
 left:0;
 right:0;
 text-align:center;
 z-index:2;
 font-size:11px;
 font-weight:bold;
 color:#33232b;
 pointer-events:none;
}
#zh-games .laf-bg-point.top .laf-bg-number{bottom:2px}
#zh-games .laf-bg-point.bottom .laf-bg-number{top:2px}
@media (max-width:700px){#zh-games .laf-backgammon-board{
  grid-template-columns:repeat(6,minmax(0,1fr)) 15px repeat(6,minmax(0,1fr));
  grid-template-rows:repeat(2,115px);
  border-width:5px;
  padding:5px;
 }
#zh-games .laf-bg-checker{border-width:1px}
#zh-games .laf-bg-bar{font-size:9px}}
#zh-games .board3 button:disabled{opacity:1!important}
#zh-games .board3 button.ttt-winner{
 background:#ffe36b!important;
 color:#8b1655!important;
 box-shadow:inset 0 0 0 5px #dba522;
}
#zh-games .ttt-result{
 margin:20px auto;
 padding:18px;
 text-align:center;
 background:#fff4b8;
 border:2px solid #e3b43c;
 border-radius:14px;
 color:#83144f;
 font-size:26px;
 font-weight:900;
}
#zh-games .gin-frozen-area{
 margin:16px 0;
 padding:14px;
 border:2px solid #d5ad37;
 border-radius:14px;
 background:#fff8dc;
}
#zh-games .gin-frozen-area>strong{display:block;margin-bottom:10px;color:#80561c}
#zh-games .gin-frozen-group{
 display:flex;
 align-items:center;
 flex-wrap:wrap;
 gap:7px;
 margin:8px 0;
}
#zh-games .gin-locked-card{
 background:#fff0b8!important;
 border-color:#c7a22f!important;
 box-shadow:0 0 0 2px #f0d36a;
 opacity:1!important;
}
#zh-games{--ink:#3b240e;--pink:#8d3500;--rose:#b86224;--cream:#fff5df;--line:#e2c7a3;color:var(--ink)}
#zh-games .gamecard,#zh-games .panel{background:#fff5df;color:var(--ink);border-color:var(--line)}
#zh-games .gamecard img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px}
#zh-games h1,#zh-games h2,#zh-games h3{color:inherit}
#zh-games .gamecard h3{color:#843500}
#zh-games .gamecard .actions{display:flex;flex-wrap:wrap}
#zh-games .gamecard .actions>.zh-unified-button{width:auto;flex:1 1 140px;max-width:100%;white-space:normal}
#zh-games .zh-unified-button:disabled{opacity:.4!important;cursor:not-allowed}
#zh-games #message{position:sticky;top:0;z-index:5;background:#fff5df;color:#482b20}
#zh-games .laf-manual-heading,#zh-games .laf-results-heading{background:#fff5df}
#zh-games .laf-manual-heading h2,#zh-games .laf-results-heading h2{color:#843500}
#zh-games .laf-bg-point.top{display:flex;min-height:0;padding:0}
#zh-games .hidden{display:none!important}
