:root{font-family:-apple-system,BlinkMacSystemFont,Noto Sans CJK SC,sans-serif;color:#eaf2e8;background:#101b18}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,textarea,select{font:inherit}button{border:0;border-radius:6px;color:#edf7f0;background:#244738;padding:8px 12px;cursor:pointer}button:hover:not(:disabled){background:#34654c}button:disabled{cursor:default;opacity:.45}button.primary{color:#153424;background:#a9d8ad;border-color:#a9d8ad;font-weight:700}button.primary:hover:not(:disabled){background:#c2edc4}.topbar{min-height:60px;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;background:#14251e}.topbar strong{font-size:19px;letter-spacing:.04em}#stop-game{margin-left:auto;color:#f4eedf;background:#5a3d38}#stop-game:hover{background:#754e46}#stop-game[hidden]{display:none}.layout{padding:20px;max-width:940px;margin:auto}.play-area{min-width:0}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:14px}.toolbar label{display:inline-flex;align-items:center;gap:5px;color:#b4c8b9;font-size:12px}.toolbar select{padding:7px 8px;border:0;border-radius:6px;color:#edf7f0;background:#244738}.table{position:relative;width:min(100%,850px);min-width:760px;aspect-ratio:1;margin:0 auto;overflow:hidden;border:12px solid #543d2a;border-radius:16px;background:radial-gradient(circle at center,#287055,#1c5b43 73%,#174c38);box-shadow:inset 0 0 0 3px #91704a,inset 0 0 36px #0b3528,0 16px 35px #07120f}.table.empty{display:grid;place-items:start center;padding-top:6%}.table.paused:after{content:"对局已暂停";position:absolute;z-index:12;inset:0;display:grid;place-items:center;color:#f3e2ad;background:#071a156e;font-size:24px;font-weight:700;cursor:pointer}.empty-message{color:#d5e5d6}.rule-picker{width:min(88%,560px);display:grid;gap:12px;padding:24px;border-radius:10px;background:#142e26eb;box-shadow:0 12px 32px #09251ba8}.rule-picker h2{margin:0 0 3px;color:#f3e2ad;font-size:20px;text-align:center}.rule-option{padding:11px;border-radius:6px;background:#214334}.rule-option-row{display:flex;gap:7px}.rule-choice{flex:1;min-width:0;padding:9px 12px;text-align:left;font-size:17px;font-weight:700;background:#305843}.rule-choice[aria-pressed=true]{color:#1c3426;background:#e8c980}.rule-choice[aria-pressed=true]:hover{background:#f3dda5}.rule-info{width:39px;padding:0;color:#e8c980;background:#305843;font-size:19px;line-height:1}.rule-option p{margin:8px 1px 0;overflow:hidden;color:#c5d9c8;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.setup-controls{display:grid;gap:12px;margin-top:4px;padding-top:15px;background:linear-gradient(#567664,#567664) top / 100% 1px no-repeat}.round-choices{display:flex;align-items:center;gap:7px}.round-choices span{width:38px;color:#c5d9c8;font-size:13px}.round-choices button{min-width:72px;background:#305843}.round-choices button[aria-pressed=true]{color:#1c3426;background:#e8c980;font-weight:700}.round-choices button[aria-pressed=true]:hover{background:#f3dda5}.start-choices{display:grid;grid-template-columns:1fr 1fr;gap:9px}.start-choices button{min-height:42px}.rule-dialog{width:min(96vw,1100px);max-height:min(84vh,800px);padding:0;overflow:auto;border:0;border-radius:8px;color:#f4eedf;background:#172a25;box-shadow:0 18px 45px #081913d9}.rule-dialog::backdrop{background:#071b16bf}.rule-dialog-top{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 17px;background:#304b3c}.rule-dialog-top h2{margin:0;font-size:18px}.rule-dialog-top button{padding:0 7px;border:0;background:transparent;font-size:25px;line-height:1}.rule-dialog-content{padding:15px 20px 20px;font-size:14px;line-height:1.65}.rule-dialog-content p{margin:0 0 12px;color:#efd99e}.rule-dialog-content ul{display:grid;gap:10px;margin:0;padding-left:20px}.rule-yaku-section{margin-top:22px;padding-top:12px;background:linear-gradient(#526d5c,#526d5c) top / 100% 1px no-repeat}.rule-yaku-section h3{margin:0 0 8px;font-size:16px}.rule-yaku-scroll{overflow-x:auto}.rule-yaku-table{min-width:880px;width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0 3px;font-size:12px}.rule-yaku-table th,.rule-yaku-table td{padding:7px 8px;border:0;text-align:left;vertical-align:top}.rule-yaku-table thead th{color:#efd99e;background:#304b3c}.rule-yaku-table tbody th,.rule-yaku-table tbody td{background:#20392e}.rule-yaku-table tbody tr:nth-child(2n) th,.rule-yaku-table tbody tr:nth-child(2n) td{background:#274335}.rule-yaku-table th:first-child{width:44px;color:#efd99e}.rule-yaku-table td span{display:block}.rule-yaku-section p{margin:10px 0 0;color:#c5d9c8;font-size:12px}.seat{position:absolute;z-index:2}.seat-0,.seat-2{left:0;width:100%;height:13%}.seat-0{bottom:0}.seat-2{top:0}.seat-1,.seat-3{top:0;width:13%;height:100%}.seat-1{left:0}.seat-3{right:0}.rack{position:absolute;display:flex;align-items:end;justify-content:space-between;white-space:nowrap}.seat-0 .rack{left:3%;right:14%;bottom:12%}.seat-2 .rack{left:14%;right:14%;top:12%;transform:rotate(180deg)}.seat-1 .rack{top:3%;left:50%;width:620%;transform:rotate(90deg);transform-origin:top left}.seat-3 .rack{top:3%;right:50%;width:620%;transform:rotate(-90deg);transform-origin:top right}.hand,.melds,.meld{display:flex;align-items:end;gap:1px}.melds{flex-direction:row-reverse;gap:7px}.meld-cell{position:relative;display:inline-flex;align-items:end;flex:none}.meld-cell.called{width:49px;height:37px}.meld-cell.called>.tile:first-child{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-90deg)}.meld-cell .added-tile{position:absolute;z-index:2;top:-34px;left:50%;transform:translate(-50%) rotate(-90deg);transform-origin:center;box-shadow:0 2px 3px #09281eaa}.target-meld .added-tile{border-color:#ffe18e;box-shadow:0 0 0 3px #ffe18e,0 0 18px #ffe18e}.tile{display:inline-flex;flex:none;align-items:center;justify-content:center;width:37px;height:49px;padding:2px;border:1px solid #c7c6ad;border-radius:3px;background:linear-gradient(135deg,#fffdf0,#e5dfc8);box-shadow:2px 2px #a5a284,2px 3px 3px #0a241766}.tile img{display:block;width:100%;height:100%;object-fit:contain;-webkit-user-select:none;user-select:none}.tile.red{border-color:#dc9a86}.tile.back{padding:0;border-color:#832c2d;background:#c43332}.tile.back img{object-fit:cover}.tile.drawn{margin-left:9px}.seat-1 .tile,.seat-2 .tile,.seat-3 .tile{width:28px;height:38px}.seat-1 .meld-cell.called,.seat-2 .meld-cell.called,.seat-3 .meld-cell.called{width:38px;height:28px}.seat-1 .added-tile,.seat-2 .added-tile,.seat-3 .added-tile{top:-28px}.hand-slot{display:inline-flex;align-items:end}.hand .pending-arrival .tile{visibility:hidden}.hand-slot.related .tile,.hand-tile.related .tile{border-color:#edcc68;box-shadow:0 0 0 3px #ffe192,0 0 15px #f6da79;transform:translateY(-9px)}.hand-tile{display:inline-flex;flex:none;align-items:end;padding:0;border:0;border-radius:3px;background:transparent;cursor:pointer}.hand-tile:disabled{opacity:1;cursor:default}.hand-tile:hover:not(:disabled),.hand-tile:focus-visible{background:transparent}.hand-tile .tile{pointer-events:none;transition:transform .12s ease,box-shadow .12s ease}.hand-tile:hover:not(:disabled) .tile,.hand-tile:focus-visible .tile{transform:translateY(-12px);border-color:#e8cd80;box-shadow:0 0 0 2px #f5df99,2px 8px 8px #09281eaa}.hand-tile:focus-visible{outline:0}.hand-tile:active .tile{transform:translateY(-6px)}.river{position:absolute;z-index:1;display:flex;gap:3px}.river-row{display:flex;gap:2px}.river-cell{position:relative;display:block;flex:none;width:27px;height:37px;filter:drop-shadow(2px 2px 1px #092b2099)}.river-cell .tile{position:absolute;top:50%;left:50%;width:27px;height:37px;padding:1px;border-color:#c5bea8;background:#f3efdf;box-shadow:none;transform:translate(-50%,-50%) rotate(var(--tile-turn, 0deg)) perspective(500px) rotateX(8deg)}.river-cell.pending-arrival .tile{visibility:hidden}.river-cell .tile.riichi{--tile-turn: -90deg}.river-0{left:calc(50% - 107px);top:calc(50% + 120px);flex-direction:column}.river-2{right:calc(50% - 107px);bottom:calc(50% + 120px);flex-direction:column-reverse}.river-2 .river-row{flex-direction:row-reverse}.river-2 .tile{--tile-turn: 180deg}.river-2 .tile.riichi{--tile-turn: 90deg}.river-1{right:calc(50% + 120px);top:calc(50% - 107px);flex-direction:row-reverse}.river-3{left:calc(50% + 120px);bottom:calc(50% - 107px);flex-direction:row}.river-1 .river-row,.river-3 .river-row{width:37px;flex-direction:column}.river-3 .river-row{flex-direction:column-reverse}.river-1 .river-cell,.river-3 .river-cell{width:37px;height:27px}.river-1 .tile{--tile-turn: 90deg}.river-1 .tile.riichi{--tile-turn: 0deg}.river-3 .tile{--tile-turn: -90deg}.river-3 .tile.riichi{--tile-turn: 180deg}.river-cell.call-target .tile{border-color:#ffe18e;box-shadow:0 0 0 3px #ffe18e,0 0 18px #ffe18e}.table-callout{position:absolute;z-index:9;padding:4px 15px;border:1px solid #f4d58b;border-radius:4px;color:#221d12;background:#f4d58b;box-shadow:0 3px 10px #102b21aa;font-size:22px;font-weight:800;pointer-events:none}.callout-0{bottom:15%;left:50%;transform:translate(-50%)}.callout-1{top:50%;left:14%;transform:translateY(-50%)}.callout-2{top:15%;left:50%;transform:translate(-50%)}.callout-3{top:50%;right:14%;transform:translateY(-50%)}.center{position:absolute;z-index:3;top:50%;left:50%;width:230px;height:220px;transform:translate(-50%,-50%);border-radius:4px;background:#1b2f2a;text-align:center;box-shadow:inset 0 0 0 3px #4a6451,0 5px 12px #0d271c}.center-core{position:absolute;top:50%;left:50%;width:126px;transform:translate(-50%,-50%);font-size:11px;line-height:1.45}.score{position:absolute;display:flex;gap:4px;align-items:center;justify-content:center;padding:3px 4px;border-radius:3px;color:#c5d9c8;font-size:11px;line-height:1.2;white-space:nowrap}.score b{color:#f3e9cc;font-variant-numeric:tabular-nums}.score-name{display:flex;flex-direction:column;align-items:center;gap:2px}.riichi-stick{display:block;width:29px;height:5px;border:1px solid #bfae85;border-radius:3px;background:#e6dcc0;box-shadow:0 1px 2px #091c16}.riichi-stick:after{content:"";display:block;width:5px;height:5px;margin:-1px auto;border-radius:50%;background:#ba3934}.score.current{color:#f3e9cc;background:#3d5943}.score-0,.score-2{left:50%;transform:translate(-50%)}.score-0{bottom:5px}.score-2{top:5px}.score-1,.score-3{top:50%;width:49px;flex-direction:column;transform:translateY(-50%)}.score-1{left:3px}.score-3{right:3px}.round{font-size:19px;font-weight:700;color:#f3e2ad}.center-count{margin:4px 0;color:#e6f2dd;font-variant-numeric:tabular-nums}.dora{display:flex;justify-content:center;margin-top:7px}.indicator-rack{display:flex;align-items:center;gap:3px}.dora .tile{width:20px;height:27px;padding:1px}.table-actions{position:absolute;z-index:5;right:8%;bottom:12%;left:8%;display:flex;flex-direction:column;align-items:center;gap:5px;pointer-events:none}.table-actions:empty{display:none}.action-list{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;pointer-events:auto}.action-list button{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-color:#b1a675;background:#253f32ed;font-size:12px}.meld-actions .action-list{gap:8px}.meld-actions .action-list button{min-width:60px;min-height:46px;justify-content:center;padding:9px 12px;font-size:16px;font-weight:700}.choice-tiles{display:inline-flex;gap:1px}.choice-tiles .tile{width:17px;height:23px;padding:1px;box-shadow:none}.meld-actions .choice-tiles .tile{width:23px;height:31px}.auto-controls{position:absolute;z-index:5;left:16%;bottom:16%;display:flex;gap:4px}.auto-controls button{min-width:30px;padding:5px 7px;border-color:#9a9772;background:#18382ddc;font-size:12px}.auto-controls button[aria-pressed=true]{color:#193525;border-color:#f4d58b;background:#f4d58b;font-weight:700}.reopen-result{position:absolute;z-index:6;top:16%;left:50%;transform:translate(-50%);border-color:#d1b878;background:#1a3b2ff2}.win-overlay{position:absolute;z-index:8;inset:0;display:flex;align-items:center;justify-content:center;padding:3% 5%;pointer-events:none}.win-panel{width:min(100%,560px);overflow:auto;max-height:100%;border-radius:5px;color:#f4eedf;background:#172a25f5;box-shadow:0 10px 34px #081913bd;pointer-events:auto}.win-panel-top{position:sticky;z-index:1;top:0;display:flex;align-items:center;justify-content:space-between;padding:6px 11px;background:#304b3c;font-size:13px;font-weight:700}.close-result{padding:0 7px;border:0;color:#f4eedf;background:transparent;font-size:24px;line-height:1}.win-card{padding:10px 13px 12px;border-top:1px solid #66816d}.win-heading{display:flex;align-items:baseline;gap:10px;font-size:13px}.win-heading strong{font-size:16px}.win-hand{display:flex;align-items:end;flex-wrap:wrap;gap:1px;margin:11px 0}.win-hand>.tile,.win-melds .tile{width:25px;height:34px;padding:1px}.win-melds{display:inline-flex;flex-direction:row-reverse;align-items:end;gap:5px;margin-left:9px}.win-melds .meld-cell.called{width:34px;height:25px}.win-melds .added-tile{top:-25px}.win-fu{display:grid;gap:3px;padding-bottom:8px;font-size:12px}.win-fu>div{display:flex;justify-content:space-between;gap:14px}.win-fu b{color:#efd99e;white-space:nowrap}.win-detail{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:8px 0;border-top:1px solid #526d5c}.win-breakdown{min-width:0}.win-yaku{display:grid;gap:3px;font-size:12px}.win-fu+.win-yaku{padding-top:8px;border-top:1px solid #526d5c}.win-yaku>div{display:flex;justify-content:space-between;gap:14px}.win-yaku b{color:#efd99e;white-space:nowrap}.win-totals{display:grid;align-content:start;gap:4px;color:#cbd9c8;font-size:11px;white-space:nowrap}.win-totals .tile{width:20px;height:27px;padding:1px;box-shadow:none}.win-panel-footer{position:sticky;bottom:0;padding:9px 13px 12px;border-top:1px solid #66816d;background:#172a25}.confirm-result{width:100%;padding:12px;border-color:#e8c980;color:#1c3426;background:#e8c980;font-size:16px;font-weight:700}.confirm-result:hover:not(:disabled){background:#f3dda5}.win-payments{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,auto);gap:4px;padding-top:8px;border-top:1px solid #526d5c;font-size:11px}.win-payments .payment{display:flex;flex-direction:column;gap:2px;min-width:0;padding:5px;border-radius:3px;background:#274335;text-align:center}.payment-0{grid-area:3 / 2}.payment-1{grid-area:2 / 1}.payment-2{grid-area:1 / 2}.payment-3{grid-area:2 / 3}.payment-summary{grid-area:2 / 2;display:flex;flex-direction:column;align-self:center;gap:3px;padding:3px;text-align:center}.win-payments .payment-summary strong{font-size:12px;white-space:normal}.win-payments .payment-summary b{color:#f7d989;font-size:17px;white-space:nowrap}.win-payments b{font-size:13px}.win-payments strong{color:#e9eee1;font-size:12px;font-variant-numeric:tabular-nums}.win-payments .positive{color:#7cc6ff}.win-payments .negative{color:#ff8b86}.result{margin:14px 0 0;min-height:24px;display:flex;flex-wrap:wrap;gap:10px;align-items:baseline;color:#f3e2ad;font-size:14px}.result span{color:#cbdcce}.sidebar{display:flex;flex-direction:column;gap:16px}.panel{border:1px solid #385749;border-radius:9px;background:#182a23;padding:16px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.panel h2{margin:0;font-size:16px}.minor-buttons{display:flex;gap:5px}.minor-buttons button{padding:4px 8px;font-size:12px}.panel p{margin:9px 0 13px;color:#b4c8b9;line-height:1.5;font-size:12px}textarea{width:100%;min-height:235px;resize:vertical;padding:10px;border:1px solid #506f5e;border-radius:6px;outline:0;color:#e9f3e9;background:#102017;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace}textarea:focus,input:focus{border-color:#a9d8ad}.error{color:#ffb5a8;font-size:12px;min-height:18px}.rule-summary{margin-top:7px;color:#eddaa6;font-size:12px;line-height:1.4}details{border-top:1px solid #385749;padding-top:10px;font-size:12px}summary{cursor:pointer;color:#d7e6d9}code{color:#eddaa6;font-size:11px}.batch-controls{display:flex;flex-wrap:wrap;align-items:end;gap:7px}.batch-controls label{color:#b4c8b9;font-size:12px}input[type=number]{display:block;width:72px;margin-top:4px;padding:7px;border:1px solid #506f5e;border-radius:5px;color:#e9f3e9;background:#102017}.batch-status{margin-top:11px;min-height:19px;color:#d5e5d6;font-size:12px}table{border-collapse:collapse;width:100%;margin-top:9px;font-size:12px}th,td{padding:6px 4px;border-bottom:1px solid #355044;text-align:right}th:first-child,td:first-child{text-align:left}th{color:#c5dbca}.footnote{margin-bottom:0!important}footer{max-width:940px;margin:0 auto 20px;padding:0 20px;color:#8aab94;font-size:11px}footer a{color:#bcd8bd}@media(max-width:760px){.topbar{padding:12px}.layout{padding:10px}.play-area{overflow-x:auto}}
