:root{color:#17211d;background:#f7f8f6;font-family:Inter,Noto Sans SC,PingFang SC,Microsoft YaHei,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:15px;line-height:1.45}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;-webkit-font-smoothing:antialiased;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}button,input,select,textarea{font:inherit}button{color:inherit}.loading-shell,.app-shell{min-height:100vh;min-height:100svh}.loading-shell{display:grid;place-items:center;gap:12px;color:#426057}.app-shell{display:grid;grid-template-rows:54px auto minmax(0,1fr) auto;background:#f7f8f6}.app-shell.module-mode{grid-template-rows:54px 76px 1fr}.app-shell.play-mode{display:block;min-height:100vh;min-height:100svh}.topbar,.contextbar,.history{border-bottom:1px solid #e1e6e1;background:#fffffff5}.topbar{display:flex;align-items:center;min-width:0}.brand{display:flex;align-items:center;gap:10px;width:232px;height:100%;padding:0 22px;border-right:1px solid #e1e6e1;font-size:18px}.brand-mark{display:grid;place-items:center;width:28px;height:28px;border:1px solid #e5e8e4;border-radius:6px;color:#d63730;background:#fff}.nav-tabs{display:flex;align-items:center;height:100%;min-width:0}.nav-tabs button{height:100%;padding:0 25px;border:0;border-bottom:2px solid transparent;background:transparent;color:#2c3431;cursor:pointer}.nav-tabs button.active{border-bottom-color:#008b7c;color:#007b70;font-weight:700}.top-actions{display:flex;align-items:center;gap:14px;margin-left:auto;padding:0 18px;color:#4b5854;white-space:nowrap}.sync-dot{width:8px;height:8px;border-radius:50%;background:#00a884;box-shadow:0 0 0 3px #00a8841a}.account-select,select,input,textarea{border:1px solid #dce3dd;border-radius:5px;background:#fff;color:#1f2d28;outline:none}.account-select{min-width:96px;padding:8px 12px}.contextbar{display:flex;align-items:center;gap:18px;padding:0 20px}.context-group{display:flex;align-items:center;gap:10px}.context-label,.muted{color:#6f7a76}.divider{width:1px;height:32px;background:#e1e6e1}.game-picker select{width:232px;height:40px;padding:0 12px;font-weight:700}.context-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:0 14px;border:1px solid #dce3dd;border-radius:5px;background:#fff;cursor:pointer}.btn.primary{border-color:#008f82;background:#008f82;color:#fff;font-weight:700}.btn.icon-only{width:38px;padding:0}.btn.wide{width:100%}.status-pill{display:inline-flex;align-items:center;gap:8px;color:#00806f;font-weight:700}.square-stop{width:14px;height:14px;border:2px solid #ff4f45;border-radius:3px}.toast{position:fixed;top:66px;right:22px;z-index:10;box-sizing:border-box;width:min(360px,calc(100vw - 32px));max-width:360px;padding:11px 14px;border:1px solid #d8e1dc;border-radius:6px;background:#fff;color:#26312d;font-weight:800;box-shadow:0 12px 30px #3f4a4524}.error-toast{border-color:#f3c6c3;background:#fff5f3;color:#a52b23}.success-toast{border-color:#9dd8cd;background:#effbf8;color:#00766b}.workbench{display:grid;grid-template-columns:minmax(430px,.9fr) minmax(620px,1.1fr);grid-template-rows:auto minmax(360px,1fr);gap:10px;min-height:0;padding:10px}.surface{border:1px solid #e1e6e1;border-radius:7px;background:#fff}.module-page{display:grid;align-content:start;gap:12px;padding:12px;min-height:0}.module-header{display:flex;align-items:center;justify-content:space-between;min-height:76px;padding:18px;border:1px solid #e1e6e1;border-radius:7px;background:#fff}.module-header h1{margin:0 0 4px;font-size:22px}.module-header p{margin:0;color:#6f7a76}.module-grid{display:grid;gap:12px}.module-grid.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.module-card{padding:18px}.module-card h2{margin:0 0 14px;font-size:17px}.management-table,.settlement-list,.report-table{display:grid}.management-row,.settlement-row,.report-row,.settings-row,.ranking-row{display:grid;align-items:center;min-height:48px;border-bottom:1px solid #edf0ed}.management-row{grid-template-columns:1fr 90px 100px;gap:12px}.management-row div{display:grid;gap:3px}.management-row span,.settings-row span{color:#697571}.status-chip{display:inline-flex;align-items:center;justify-content:center;width:fit-content;min-width:66px;padding:4px 9px;border-radius:999px;background:#f0f2f1;color:#6a7470;font-size:13px}.status-chip.active{background:#e4f7f2;color:#008175;font-weight:800}.settlement-row{grid-template-columns:42px 1fr auto;gap:10px}.zero-check{margin-top:14px;padding:10px 12px;border-radius:6px;background:#f7faf8;color:#008175;font-weight:800}.ended-game-callout{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;margin-top:12px;padding:12px;border:1px solid #dce9e3;border-radius:6px;background:#fbfdfb;color:#56635e}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.player-admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.player-admin-card{display:grid;grid-template-columns:50px 1fr auto;align-items:center;gap:12px;padding:16px}.player-admin-card .avatar{width:46px;height:46px}.player-admin-card h2{margin:0 0 3px;font-size:17px}.player-admin-card p{margin:0;color:#6f7a76}.admin-edit{display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 10px;border:1px solid #dce3dd;border-radius:5px;background:#fff;color:#40504a;cursor:pointer}.admin-actions{grid-column:2 / -1;display:flex;align-items:center;gap:8px}.admin-persona-picker{grid-column:1 / -1;margin-top:2px}.stat-card{display:grid;gap:6px;padding:18px}.stat-card span{color:#697571}.stat-card strong{font-size:28px}.metric-row{display:grid;grid-template-columns:70px 1fr 42px;align-items:center;gap:12px;min-height:42px}.metric-row div{height:8px;border-radius:999px;background:#eef2ef;overflow:hidden}.metric-row i{display:block;height:100%;border-radius:inherit;background:#008f82}.ranking-row{grid-template-columns:28px 42px 1fr auto;gap:10px}.ranking-row em{font-style:normal;font-weight:800}.report-panel{padding:18px}.report-title{display:flex;align-items:center;justify-content:space-between;padding-bottom:14px;border-bottom:1px solid #edf0ed}.report-title span{color:#6f7a76}.report-row{grid-template-columns:70px 86px minmax(180px,1fr) 80px minmax(180px,1fr);gap:12px}.settings-row{grid-template-columns:1fr auto;gap:12px}.players-panel,.ledger-panel,.entry-panel{min-height:0}.entry-panel{grid-column:1;grid-row:1 / span 2}.players-panel{grid-column:2;grid-row:1}.ledger-panel{grid-column:2;grid-row:2}.players-panel,.entry-panel{padding:16px}.panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.panel-title h2,.history-title h2{margin:0;font-size:17px;line-height:1.2}.panel-title button,.table-action,.history-row button{border:0;background:transparent;color:#55635f;cursor:pointer}.player-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:18px}.player-ledger-card{position:relative;display:grid;gap:12px;min-height:148px;padding:13px;overflow:hidden;border:1px solid #e2e8e2;border-radius:8px;background:radial-gradient(circle at 88% 18%,rgba(214,35,35,.08),transparent 28%),linear-gradient(180deg,#fff,#fbfdfb);box-shadow:0 10px 24px #26342f12}.player-ledger-card:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#d62323}.player-ledger-card.loss{background:radial-gradient(circle at 88% 18%,rgba(7,128,68,.08),transparent 28%),linear-gradient(180deg,#fff,#fbfdfb)}.player-ledger-card.loss:before{background:#078044}.player-card-top{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center;min-width:0}.player-card-top .avatar{width:40px;height:40px}.player-card-top strong{display:block;overflow:hidden;color:#22302b;font-size:15px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.player-card-role{display:inline-flex;align-items:center;min-height:20px;margin-top:4px;padding:0 8px;border-radius:4px;background:#eef5f1;color:#62716c;font-size:12px;font-weight:700}.player-card-score{display:flex;align-items:flex-end;justify-content:space-between;gap:10px}.player-card-score span{color:#6a7671;font-size:12px}.player-card-score strong{font-size:28px;line-height:1;letter-spacing:0}.player-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:9px;border-top:1px solid #edf0ed;color:#73807b;font-size:12px}.avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;color:#fff;font-weight:800;overflow:hidden;border:2px solid rgba(255,255,255,.9);box-shadow:0 2px 8px #27343024}.avatar svg,.avatar img{display:block}.avatar img{width:100%;height:100%;object-fit:cover;transform:scale(1.08)}.marker-teal{background:#2cb7af}.marker-green{background:#35bf84}.marker-blue{background:#5488e8}.marker-orange{background:#f39a18}.marker-violet{background:#835ce8}.marker-red{background:#dc5148}.marker-sky{background:#63a7e8}.marker-amber{background:#f0b333}.marker-slate{background:#59645f}.positive{color:#d62323}.negative{color:#078044}.summary-box{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}.summary-item{display:grid;gap:6px;min-height:64px;padding:10px 11px;border:1px solid #e4e9e5;border-radius:8px;background:#fbfdfb}.summary-item span{color:#687570;font-size:12px;font-weight:700}.summary-item strong{color:#26312d;font-size:18px;line-height:1}.summary-item.balance-check{border-color:#dfe9e5;background:#f6fbf9}.ledger-panel{display:grid;grid-template-rows:60px 1fr;overflow:hidden}.type-filter{display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid #edf0ed}.type-filter button,.segmented button{height:34px;min-width:64px;border:1px solid transparent;border-radius:5px;background:#f2f4f2;cursor:pointer}.type-filter button.active,.segmented button.active{border-color:#008f82;background:#008f82;color:#fff;font-weight:700}.type-filter span{margin-left:auto;color:#626f6a}.ledger-table{overflow:auto;padding:0 16px 16px}.ledger-head,.ledger-row{display:grid;grid-template-columns:68px 78px minmax(92px,1fr) 72px 70px minmax(110px,1fr) 30px;align-items:center;column-gap:8px}.ledger-head{position:sticky;top:0;z-index:1;height:42px;border-bottom:1px solid #e6ebe6;background:#fff;color:#66736f;font-size:13px}.ledger-row{min-height:70px;border-bottom:1px solid #edf0ed}.ledger-empty{display:grid;place-items:center;min-height:130px;border-bottom:1px solid #edf0ed;color:#71807a;font-weight:700}.timeline-dot{position:relative;padding-left:22px}.timeline-dot:before{content:"";position:absolute;left:2px;top:50%;width:10px;height:10px;border:2px solid #17211d;border-radius:50%;transform:translateY(-50%);background:#fff}.event-chip{display:inline-flex;justify-content:center;width:fit-content;min-width:60px;padding:5px 11px;border-radius:5px;font-weight:700}.chip-hu{border:1px solid #f5c8cb;background:#fff0f1;color:#db2d3e}.chip-wang_diao,.chip-dui_dui_hu{border:1px solid #c9ece4;background:#effbf8;color:#008175}.chip-wang_chuang{border:1px solid #f0c9c3;background:#fff3f0;color:#c83d2d}.chip-dian_gang{border:1px solid #c9dff6;background:#eef7ff;color:#1d72c7}.chip-gong_gang{border:1px solid #f5d3b6;background:#fff5eb;color:#df6d13}.chip-an_gang{border:1px solid #d9cdf4;background:#f5f1ff;color:#744fc6}.note-text{overflow:hidden;color:#3e4b47;text-overflow:ellipsis;white-space:nowrap}.entry-panel{overflow:auto}.focus-ledger-strip{display:none}.focus-ledger-card{min-width:0}.note-field{display:contents}.form-actions{display:grid;gap:0}.settlement-stage{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:14px;align-items:start;margin-bottom:12px}.receiver-side{grid-column:1}.event-side{grid-column:2}.event-side .field-label,.receiver-side .field-label{margin-top:0}.segmented{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:20px}.settlement-stage .segmented{grid-template-columns:1fr;grid-auto-rows:minmax(0,1fr);gap:9px;height:430px;margin-bottom:0}.segmented button{position:relative;display:grid;justify-items:center;gap:5px;height:auto;min-height:150px;padding:10px 8px 12px;border:1px solid #ded8cd;border-radius:9px;background:#fbfaf7;color:#26312d;cursor:pointer;overflow:hidden;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}.segmented button:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;opacity:.9;transition:opacity .16s ease}.segmented button:after{content:"";position:absolute;left:-28%;top:-55%;width:70%;height:170%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.42),transparent);transform:rotate(18deg) translate(-120%)}.event-image-button{isolation:isolate}.event-image-button:before{z-index:0}.event-image-button:after{z-index:0}.event-image-button.active:before{opacity:1}.event-image-button.active:after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.58),transparent),radial-gradient(circle,rgba(255,255,255,.34),transparent 55%)}.event-image-button.active{transform:translate(4px)}.event-image-button.active::marker{content:""}.segmented button:hover{transform:translateY(-2px) scale(1.01);box-shadow:0 12px 24px #25312d1c}.segmented button:hover:after,.segmented button.active:after{animation:event-shine .9s ease}.segmented button:active{transform:translateY(1px) scale(.97)}.segmented button strong,.segmented button small,.event-art,.event-copy,.event-selected-badge{position:relative;z-index:1}.segmented button strong{font-size:18px;line-height:1}.segmented button small{color:#60706a;font-size:11px;line-height:1.1}.event-art{display:grid;place-items:center;width:132px;height:86px;margin-bottom:4px}.event-art img{width:100%;height:100%;object-fit:contain;transform-origin:50% 80%;transition:transform .18s ease,filter .18s ease}.event-image-button:hover .event-art img{transform:translateY(-3px) scale(1.06)}.event-image-button:active .event-art img{transform:translateY(2px) scale(.96)}.event-hu:before{background:radial-gradient(circle at 82% 20%,rgba(255,214,92,.52),transparent 24%),linear-gradient(145deg,#fff7f0,#ffe3df)}.event-wang_diao:before{background:radial-gradient(circle at 82% 20%,rgba(0,143,130,.24),transparent 24%),linear-gradient(145deg,#f2fffb,#dff5ee)}.event-wang_chuang:before{background:radial-gradient(circle at 75% 18%,rgba(214,35,35,.22),transparent 24%),linear-gradient(145deg,#fff5f2,#ffe3dc)}.event-dui_dui_hu:before{background:radial-gradient(circle at 25% 28%,rgba(99,167,232,.22),transparent 24%),linear-gradient(145deg,#f4fbff,#e4f2fb)}.event-dian_gang:before{background:radial-gradient(circle at 72% 28%,rgba(240,179,51,.54),transparent 22%),linear-gradient(145deg,#fffaf0,#f7efe0)}.event-gong_gang:before{background:radial-gradient(circle at 24% 28%,rgba(0,143,130,.18),transparent 22%),linear-gradient(145deg,#f3fbf8,#e5f4ee)}.event-an_gang:before{background:radial-gradient(circle at 74% 28%,rgba(164,134,232,.32),transparent 24%),linear-gradient(145deg,#f5f3fb,#ebe8f5)}.segmented button.event-image-button.active{border-color:#008f82;background:linear-gradient(90deg,rgba(0,143,130,.14),transparent 42%),#f8fffc;color:#26312d;box-shadow:inset 5px 0 #008f82,inset 0 0 0 2px #008f8233,0 14px 28px #005f5533}.event-image-button.active .event-art{animation:event-pop .42s ease}.event-image-button.active .event-art img{filter:drop-shadow(0 9px 10px rgba(0,95,85,.2)) saturate(1.12);transform:translateY(-4px) scale(1.1)}.event-image-button.active strong{color:#006f65}.event-image-button.active small{color:#008175;font-weight:800}.settlement-stage .event-image-button.active{transform:translate(3px) scale(1.01)}.settlement-stage .event-image-button.active:before{box-shadow:inset 0 0 0 999px #ffffff14}.settlement-stage .event-image-button.active:after{animation:event-shine .9s ease}.settlement-stage .segmented button{grid-template-columns:60px minmax(0,1fr);grid-template-rows:1fr;justify-items:start;align-items:center;column-gap:10px;min-height:0;padding:10px 11px;text-align:left}.settlement-stage .event-art{width:42px;height:42px;margin-bottom:0}.settlement-stage .event-copy{display:grid;align-content:center;gap:4px;min-width:0}.settlement-stage .segmented button strong{display:block;overflow:hidden;font-size:15px;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.settlement-stage .segmented button small{display:block;overflow:visible;max-width:100%;font-size:clamp(10px,.86vw,12px);line-height:1.15;overflow-wrap:anywhere;white-space:normal}.event-selector{display:grid;gap:8px}.event-category-row{display:grid;grid-template-columns:1fr;gap:7px}.event-category-button,.event-subtype-button{-moz-appearance:none;appearance:none;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;position:relative;display:grid;align-content:center;min-width:0;border:1px solid #d9e2dc;border-radius:8px;color:#26312d;cursor:pointer;overflow:hidden;text-align:center;transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease}.event-category-button{gap:3px;min-height:92px;padding:8px 6px;background:radial-gradient(circle at 82% 14%,rgba(0,143,130,.08),transparent 30%),linear-gradient(180deg,#fbfffd,#eef7f3)}.event-category-button strong,.event-subtype-button strong,.event-category-button small,.event-subtype-button small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.event-category-button strong{font-size:var(--fit-font-size, 18px);line-height:1}.event-category-button small{color:#66736f;font-size:10px;font-weight:700}.event-category-button.active{border-color:#005f55;background:radial-gradient(circle at 82% 14%,rgba(255,224,138,.34),transparent 30%),linear-gradient(180deg,#009481,#006f65);color:#fff;box-shadow:inset 0 0 0 2px #ffffff4d,0 10px 18px #005f552e}.event-category-button.active small{color:#ffffffdb}.event-category-button.compact-label{place-items:center}.event-category-button.compact-label strong{font-size:var(--fit-font-size, 22px)}.event-subtype-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.event-modal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.event-modal-grid .event-subtype-button{min-height:96px}.event-subtype-button{gap:5px;min-height:82px;padding:9px 6px;background:radial-gradient(circle at 86% 12%,rgba(214,35,35,.08),transparent 28%),linear-gradient(180deg,#fffdfa,#f7f4ed)}.event-subtype-button:hover{transform:translateY(-1px);border-color:#9bcfc5;box-shadow:0 9px 16px #2a3d3617}.event-subtype-button:active{transform:translateY(1px) scale(.98)}.event-subtype-button strong{font-size:16px;line-height:1}.event-subtype-button small{color:#6b7873;font-size:11px;font-weight:700}.event-subtype-button>span{justify-self:center;padding:2px 6px;border-radius:999px;background:#ffe08a;color:#453400;font-size:10px;font-weight:900;line-height:1}.event-subtype-button.active{border-color:#005f55;background:radial-gradient(circle at 84% 14%,rgba(255,224,138,.34),transparent 28%),linear-gradient(180deg,#e1f7f1,#ccefe7);color:#004f47;box-shadow:inset 0 0 0 2px #005f5547,0 10px 20px #005f5526}.event-subtype-button.active strong{color:#003f39}.event-subtype-button.active small{color:#005f55}.event-selected-badge{position:absolute;top:7px;right:7px;display:inline-flex;align-items:center;height:18px;padding:0 6px;border-radius:4px;background:#008f82;color:#fff;font-size:11px;font-weight:900;box-shadow:0 5px 10px #005f5529}@keyframes event-shine{0%{transform:rotate(18deg) translate(-120%)}to{transform:rotate(18deg) translate(230%)}}@keyframes event-pop{0%,to{transform:scale(1)}45%{transform:scale(1.08) rotate(-2deg)}}.field-label{margin:15px 0 8px;color:#3d4b46;font-weight:700}.payer-button-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.payer-button{display:grid;grid-template-columns:34px 1fr;grid-template-rows:18px 16px;align-items:center;column-gap:8px;min-height:58px;padding:8px 10px;border:1px solid #dce3dd;border-radius:7px;background:#fff;color:#25312d;cursor:pointer;text-align:left;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease}.payer-button:hover:not(:disabled){border-color:#9bcfc5;background:#f6fbf9}.payer-button .avatar{grid-row:1 / 3;width:30px;height:30px}.payer-button span{overflow:hidden;font-weight:800;line-height:1;text-overflow:ellipsis;white-space:nowrap}.payer-button small{color:#6c7873;font-size:12px}.payer-button.selected{border-color:#008f82;background:#e8f7f3;color:#006f65;box-shadow:inset 0 0 0 1px #008f822e,0 8px 18px #005f5514}.payer-button.selected small{color:#00776c;font-weight:800}.payer-button:disabled{border-color:#e3e8e4;background:#f5f7f6;color:#9aa4a0;cursor:not-allowed;opacity:.72}.entry-panel select,.entry-panel textarea{width:100%;padding:10px 11px}.mahjong-picker{position:relative;width:100%;max-width:min(430px,calc(100vw - 52px));aspect-ratio:1 / 1;height:auto;margin-inline:auto;margin-bottom:4px;border:1px solid #d9e2dc;border-radius:8px;background:radial-gradient(circle at 50% 46%,rgba(0,143,130,.16),transparent 33%),linear-gradient(180deg,#f7faf8,#eef5f1);overflow:hidden}.mahjong-picker:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(rgba(39,56,50,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(39,56,50,.035) 1px,transparent 1px);background-size:22px 22px;pointer-events:none}.table-glow{position:absolute;left:50%;top:50%;width:68%;height:68%;border-radius:50%;background:radial-gradient(circle,rgba(0,143,130,.2),transparent 66%);transform:translate(-50%,-50%);animation:table-glow-pulse 4.8s ease-in-out infinite}.mahjong-table{position:absolute;left:50%;top:50%;display:grid;place-items:center;width:44%;aspect-ratio:1;border:10px solid #386f62;border-radius:16px;background:radial-gradient(circle at 30% 22%,rgba(255,255,255,.55),transparent 31%),linear-gradient(135deg,#c9eadf,#70b9a8 55%,#4a9b8c);box-shadow:inset 0 0 0 5px #ffffff57,inset 0 0 0 16px #00544a21,0 18px 34px #14504633;transform:translate(-50%,-50%);animation:table-breath 4.8s ease-in-out infinite}.table-aura-ring,.table-sheen{position:absolute;pointer-events:none}.table-aura-ring{top:-22px;right:-22px;bottom:-22px;left:-22px;z-index:0;border:2px solid rgba(255,224,138,.42);border-radius:24px;background:radial-gradient(circle at 50% 50%,rgba(255,224,138,.18),transparent 52%),radial-gradient(circle at 50% 50%,rgba(0,143,130,.26),transparent 68%);box-shadow:0 0 20px #ffcd5333,0 0 34px #008f8238}.table-sheen{top:8px;right:8px;bottom:8px;left:8px;z-index:1;border-radius:13px;background:linear-gradient(115deg,transparent 18%,rgba(255,255,255,.34) 44%,transparent 62%),radial-gradient(circle at 26% 18%,rgba(255,255,255,.5),transparent 24%);mix-blend-mode:screen}.table-outer-rail{position:absolute;top:-17px;right:-17px;bottom:-17px;left:-17px;z-index:2;border:8px solid #d7b276;border-radius:22px;background:transparent;box-shadow:inset 0 0 0 1px #784a162e,0 8px 18px #4f34121f}.table-felt-lines{position:absolute;top:18px;right:18px;bottom:18px;left:18px;z-index:2;border:1px solid rgba(0,91,82,.18);border-radius:11px}.table-felt-lines span{position:absolute;background:#005b5221}.table-felt-lines span:nth-child(1),.table-felt-lines span:nth-child(2){left:50%;width:1px;height:100%}.table-felt-lines span:nth-child(1){transform:rotate(45deg)}.table-felt-lines span:nth-child(2){transform:rotate(-45deg)}.table-felt-lines span:nth-child(3),.table-felt-lines span:nth-child(4){left:0;top:50%;width:100%;height:1px}.table-felt-lines span:nth-child(4){transform:rotate(90deg)}.table-corners span{position:absolute;z-index:3;width:16px;height:16px;border:3px solid rgba(255,255,255,.62);border-radius:5px}.table-corners span:nth-child(1){left:12px;top:12px}.table-corners span:nth-child(2){right:12px;top:12px}.table-corners span:nth-child(3){right:12px;bottom:12px}.table-corners span:nth-child(4){left:12px;bottom:12px}.table-core{position:relative;z-index:2;display:grid;justify-items:center;gap:4px;color:#075f56;text-align:center}.discard-pool{display:grid;grid-template-columns:repeat(3,20px);gap:4px;margin-top:5px}.discard-pool i{display:grid;place-items:center;width:20px;height:25px;border:1px solid #d5ded9;border-radius:4px;background:linear-gradient(180deg,#fff,#edf4f0);color:#d62323;font-style:normal;font-size:11px;font-weight:800;box-shadow:0 4px 8px #30443d14;animation:discard-tap 3.4s ease-in-out infinite}.discard-pool i:nth-child(2){color:#078044;animation-delay:.4s}.discard-pool i:nth-child(3){color:#26312d;animation-delay:.8s}.discard-pool i:nth-child(4){color:#078044;animation-delay:1.2s}.discard-pool i:nth-child(5){color:#26312d;animation-delay:1.6s}.discard-pool i:nth-child(6){color:#078044;animation-delay:2s}.dice-pair{position:absolute;left:50%;top:-8px;display:flex;gap:5px;transform:translate(-50%)}.dice-pair i{display:grid;place-items:center;width:18px;height:18px;border:1px solid rgba(47,68,61,.16);border-radius:5px;background:#fff;color:#d62323;font-style:normal;font-size:10px;font-weight:900;box-shadow:0 4px 8px #2c3d371a;animation:dice-wiggle 3.8s ease-in-out infinite}.dice-pair i:nth-child(2){color:#078044;animation-delay:.24s}.table-status{display:grid;justify-items:center;gap:1px;padding:5px 8px;border-radius:8px;background:#ffffff6b;box-shadow:inset 0 0 0 1px #ffffff5c}.table-status span{font-weight:800}.table-status small{color:#42645d;font-size:12px}.tile-wall{position:absolute;top:-45px;right:-45px;bottom:-45px;left:-45px;pointer-events:none}.tile-wall span{position:absolute;border:1px solid #d8e0dc;border-radius:5px;background:repeating-linear-gradient(90deg,rgba(0,0,0,.04) 0 1px,transparent 1px 12px),linear-gradient(180deg,#fff,#eef5f1);box-shadow:0 5px 10px #2f453e14;animation:wall-shuffle 4.6s ease-in-out infinite}.tile-wall span:nth-child(1),.tile-wall span:nth-child(3){left:50%;width:136px;height:17px;transform:translate(-50%)}.tile-wall span:nth-child(1){top:0}.tile-wall span:nth-child(3){bottom:0}.tile-wall span:nth-child(2),.tile-wall span:nth-child(4){top:50%;width:17px;height:136px;transform:translateY(-50%)}.tile-wall span:nth-child(2){right:0}.tile-wall span:nth-child(4){left:0}.seat-button{position:absolute;display:grid;grid-template-columns:46px minmax(0,1fr);grid-template-rows:34px 20px 14px;align-items:center;column-gap:8px;width:36%;min-height:92px;padding:10px;border:1px solid #dce3dd;border-radius:8px;background:radial-gradient(circle at 88% 14%,rgba(0,143,130,.08),transparent 32%),#fff;color:#25312d;cursor:pointer;text-align:left;touch-action:none;-webkit-user-select:none;user-select:none;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;animation:player-idle 3.2s ease-in-out infinite}.player-portrait{position:relative;grid-column:1;grid-row:1 / 3;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:linear-gradient(180deg,#f4f8f6,#e6efeb);box-shadow:inset 0 0 0 1px #26312d14}.player-portrait:after{content:"";position:absolute;left:12px;right:12px;bottom:-5px;height:8px;border-radius:50%;background:#26312d1a}.seat-button .avatar{width:40px;height:40px;font-size:14px}.seat-info{grid-column:2;grid-row:1;min-width:0}.seat-info>strong{display:block;overflow:hidden;max-width:100%;line-height:1;text-overflow:ellipsis;white-space:nowrap}.seat-button small{display:block;margin-top:5px;color:#7a8581;font-size:12px}.seat-score{grid-column:2;grid-row:2 / 4;display:block;min-width:0;padding-top:4px;font-weight:900;text-align:right}.seat-score strong{display:block;overflow:hidden;max-width:100%;font-size:16px;line-height:1;text-overflow:ellipsis;white-space:nowrap}.seat-chips{grid-column:1;grid-row:3;display:flex;gap:2px;justify-self:end}.seat-chips i{width:9px;height:9px;border:1px solid rgba(214,35,35,.18);border-radius:50%;background:#ffe8e5;box-shadow:0 2px 3px #5a39191a}.seat-chips i:nth-child(2){background:#fff1bf;transform:translateY(3px)}.seat-chips i:nth-child(3){background:#dff3ed;transform:translateY(1px)}.hand-tiles{grid-column:1 / 4;display:flex;gap:4px;align-items:center;justify-content:center;align-self:end;padding-top:4px}.hand-tiles i{width:21px;height:13px;border:1px solid #d7dfda;border-radius:3px;background:linear-gradient(180deg,#fff,#edf4f0);box-shadow:0 2px 5px #2c3d3714;animation:hand-sort 2.7s ease-in-out infinite}.hand-tiles i:nth-child(2){animation-delay:.16s}.hand-tiles i:nth-child(3){animation-delay:.32s}.hand-tiles i:nth-child(4){animation-delay:.48s}.seat-button.north{top:4%;left:50%;transform:translate(-50%);animation-delay:0s}.seat-button.east{top:50%;right:4%;transform:translateY(-50%);animation-delay:.45s}.seat-button.south{bottom:4%;left:50%;transform:translate(-50%);animation-delay:.9s}.seat-button.west{top:50%;left:4%;transform:translateY(-50%);animation-delay:1.35s}.seat-button.active{border-color:#005f55;background:radial-gradient(circle at 86% 16%,rgba(255,224,138,.36),transparent 30%),linear-gradient(180deg,#e1f7f1,#ccefe7);color:#004f47;outline:3px solid rgba(0,143,130,.24);outline-offset:2px;box-shadow:inset 0 0 0 2px #005f5557,inset 0 -4px #005f551f,0 14px 28px #005f552e}.seat-button.active:before{content:"✓";position:absolute;top:6px;right:6px;z-index:2;display:grid;place-items:center;width:20px;height:20px;border-radius:999px;background:#005f55;color:#fff;font-size:14px;font-weight:900;line-height:1}.seat-button.active small{color:#005f55;font-weight:800}.seat-button.active .seat-info>strong{color:#003f39}.seat-button.active .seat-info{padding-right:24px}.seat-button.drop-target{border-style:dashed;border-color:#00a58f;background:#f0fbf8}.seat-button.drop-target:after{content:"松手换位";position:absolute;right:7px;top:7px;padding:2px 6px;border-radius:999px;background:#008f82;color:#fff;font-size:10px;font-weight:900;line-height:1.1}.seat-button.paying{border-color:#e4bb4d;background:radial-gradient(circle at 80% 20%,rgba(245,181,36,.18),transparent 34%),#fff9e9;box-shadow:0 12px 24px #946e1929}.seat-button.paying.north{animation:pay-north .82s ease-in-out}.seat-button.paying.east{animation:pay-east .82s ease-in-out}.seat-button.paying.south{animation:pay-south .82s ease-in-out}.seat-button.paying.west{animation:pay-west .82s ease-in-out}.seat-button.receiving{border-color:#d62323;background:radial-gradient(circle at 80% 20%,rgba(214,35,35,.15),transparent 34%),#fff1f1;box-shadow:inset 0 0 0 1px #d6232329,0 12px 26px #d623231f}.seat-button:active{cursor:grabbing}.seat-hint{margin-top:8px;color:#6a7671;font-size:13px}.money-arc{--sx: 0;--sy: 0;--tx: 0;--ty: 0;position:absolute;left:50%;top:50%;z-index:7;display:inline-flex;align-items:center;gap:4px;color:#d79b11;pointer-events:none;animation:money-flight 1.26s cubic-bezier(.18,.82,.18,1) forwards;filter:drop-shadow(0 8px 8px rgba(86,69,18,.16))}.coin{display:grid;place-items:center;width:22px;height:22px;border:1px solid rgba(144,101,0,.16);border-radius:50%;background:linear-gradient(180deg,#ffe99d,#f0b52d);color:#8f6400;font-style:normal;font-size:12px;font-weight:900;box-shadow:inset 0 2px #ffffff6b,0 5px 10px #61440c29;animation:coin-spin .42s linear infinite}.coin-b{margin-left:-12px;animation-delay:.08s}.coin-c{width:26px;height:16px;margin-left:-12px;border-radius:4px;background:linear-gradient(180deg,#ffe4e4,#f7b8b8);transform:rotate(-10deg);animation:bill-flutter .52s ease-in-out infinite}.money-arc b{padding:2px 5px;border-radius:999px;background:#fff5cf;color:#8f6400;font-size:11px}.from-north{--sx: 0;--sy: -172}.from-east{--sx: 172;--sy: 0}.from-south{--sx: 0;--sy: 172}.from-west{--sx: -172;--sy: 0}.to-north{--tx: 0;--ty: -172}.to-east{--tx: 172;--ty: 0}.to-south{--tx: 0;--ty: 172}.to-west{--tx: -172;--ty: 0}@keyframes money-flight{0%{opacity:0;transform:translate(calc(var(--sx) * 1px),calc(var(--sy) * 1px)) scale(.7)}18%{opacity:1}48%{transform:translate(calc((var(--sx) + var(--tx)) * .5px),calc((var(--sy) + var(--ty)) * .5px - 34px)) scale(1.04) rotate(-8deg)}72%{opacity:1}to{opacity:0;transform:translate(calc(var(--tx) * 1px),calc(var(--ty) * 1px)) scale(1.24) rotate(12deg)}}@keyframes table-glow-pulse{0%,to{opacity:.68;transform:translate(-50%,-50%) scale(.96)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.04)}}@keyframes table-breath{0%,to{box-shadow:inset 0 0 0 5px #ffffff57,inset 0 0 0 16px #00544a21,0 18px 34px #14504633}50%{box-shadow:inset 0 0 0 5px #ffffff70,inset 0 0 0 16px #00544a33,0 22px 40px #1450463d}}@keyframes dice-wiggle{0%,82%,to{transform:rotate(0)}88%{transform:rotate(-8deg) translateY(-2px)}94%{transform:rotate(7deg)}}@keyframes coin-spin{0%{transform:rotateY(0) translateY(0)}50%{transform:rotateY(180deg) translateY(-3px)}to{transform:rotateY(360deg) translateY(0)}}@keyframes bill-flutter{0%,to{transform:rotate(-10deg) translateY(0)}50%{transform:rotate(8deg) translateY(-4px)}}@keyframes wall-shuffle{0%,to{transform:translate(-50%)}50%{transform:translate(calc(-50% + 2px))}}.tile-wall span:nth-child(2),.tile-wall span:nth-child(4){animation-name:wall-shuffle-vertical}@keyframes wall-shuffle-vertical{0%,to{transform:translateY(-50%)}50%{transform:translateY(calc(-50% + 2px))}}@keyframes discard-tap{0%,86%,to{transform:translateY(0) rotate(0)}92%{transform:translateY(-4px) rotate(-3deg)}}@keyframes hand-sort{0%,to{transform:translateY(0)}45%{transform:translateY(-2px)}}@keyframes player-idle{0%,to{filter:none}50%{filter:brightness(1.015)}}@keyframes pay-north{0%,to{transform:translate(-50%)}45%{transform:translate(-50%) translateY(10px) scale(.98)}}@keyframes pay-east{0%,to{transform:translateY(-50%)}45%{transform:translateY(-50%) translate(-10px) scale(.98)}}@keyframes pay-south{0%,to{transform:translate(-50%)}45%{transform:translate(-50%) translateY(-10px) scale(.98)}}@keyframes pay-west{0%,to{transform:translateY(-50%)}45%{transform:translateY(-50%) translate(10px) scale(.98)}}.persona-row{display:grid;grid-template-columns:86px 1fr;align-items:start;gap:10px;margin-top:8px}.persona-row span{color:#53605c;font-weight:700}.persona-menu{display:grid;gap:8px}.persona-trigger{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:10px;min-height:46px;padding:5px 10px;border:1px solid #dce3dd;border-radius:6px;background:#fff;color:#2d3a35;cursor:pointer;text-align:left}.persona-trigger .avatar{width:34px;height:34px}.persona-trigger strong{font-size:14px}.persona-trigger small{color:#008175;font-weight:800}.persona-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:8px;border:1px solid #dce3dd;border-radius:6px;background:#f8faf8}.persona-picker button{display:grid;justify-items:center;gap:4px;min-height:70px;padding:6px 4px;border:1px solid #dce3dd;border-radius:6px;background:#fff;color:#33413c;cursor:pointer}.persona-picker button .avatar{width:38px;height:38px}.persona-picker button small{font-size:11px;line-height:1}.persona-picker button.active{border-color:#008f82;background:#e9f7f4;box-shadow:inset 0 0 0 1px #008f822e}.stepper{display:grid;grid-template-columns:1fr 38px 70px 38px;align-items:center;margin-bottom:8px;border:1px solid #dce3dd;border-radius:5px;overflow:hidden}.stepper span{padding-left:12px;color:#596762}.stepper button,.stepper input{height:36px;border:0;border-left:1px solid #dce3dd;border-radius:0;background:#fff;text-align:center}.fixed-rule-row,.fixed-multiplier-row{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;margin-bottom:8px;padding:10px 12px;border:1px solid #dce3dd;border-radius:5px;background:#f8faf8}.fixed-rule-row span,.fixed-multiplier-row span{color:#596762}.fixed-rule-row strong,.fixed-multiplier-row strong{color:#006f65;font-size:18px}.fixed-rule-row small,.fixed-multiplier-row small{grid-column:1 / 3;color:#7a8581;font-size:12px}.fixed-multiplier-row{border-color:#ead6a2;background:#fffaf0}.fixed-multiplier-row strong{color:#a46a00}.code-choice-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:7px;margin-bottom:8px}.code-choice-row button{position:relative;-moz-appearance:none;appearance:none;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;display:grid;align-content:center;gap:4px;justify-items:center;min-height:58px;padding:8px 6px;border:1px solid #d8e1dc;border-radius:8px;background:radial-gradient(circle at 84% 18%,rgba(0,143,130,.08),transparent 30%),linear-gradient(180deg,#fbfffd,#eef7f3),#eef7f3;color:#26312d;cursor:pointer;overflow:hidden;isolation:isolate;box-shadow:inset 0 -3px #26312d0a,0 4px 10px #2a3d360d;transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease}.code-choice-row button:focus{outline:none}.code-choice-row button:focus-visible{border-color:#005f55;box-shadow:inset 0 -3px #008f821a,0 0 0 3px #008f8229,0 8px 16px #005f5517}.code-choice-row button:before{content:"";position:absolute;inset:6px auto 6px 6px;width:3px;border-radius:999px;background:#d62323;opacity:.72}.code-choice-row button:after{content:"";position:absolute;top:5px;right:5px;z-index:2;opacity:0;transform:translateY(-2px);transition:opacity .16s ease,transform .16s ease}.code-choice-row button:hover:not(:disabled){transform:translateY(-1px);border-color:#9bcfc5;background:radial-gradient(circle at 84% 18%,rgba(0,143,130,.12),transparent 30%),linear-gradient(180deg,#fbfffd,#e6f5f0),#e6f5f0;box-shadow:inset 0 -3px #008f8214,0 8px 16px #005f5517}.code-choice-row button:active:not(:disabled){transform:translateY(0);border-color:#008f82;background:radial-gradient(circle at 82% 18%,rgba(0,143,130,.14),transparent 28%),linear-gradient(180deg,#f8fffc,#e9f7f3),#e9f7f3}.code-choice-row button.active{border-color:#005f55;background:radial-gradient(circle at 18% 18%,rgba(255,255,255,.2),transparent 30%),linear-gradient(180deg,#009481,#006f65);color:#fff;box-shadow:inset 0 0 0 2px #ffffff6b,inset 0 -4px #002c272e,0 10px 22px #005f5538;transform:translateY(-1px)}.code-choice-row button.active:focus-visible,.code-choice-row button.active:active{border-color:#005f55;background:radial-gradient(circle at 18% 18%,rgba(255,255,255,.2),transparent 30%),linear-gradient(180deg,#009481,#006f65);color:#fff}.code-choice-row button.active:before{inset:6px auto 6px 6px;width:5px;background:#ffe08a;opacity:1}.code-choice-row button.active:after{content:"已选";padding:2px 5px;border-radius:999px;background:#ffe08a;color:#453400;font-size:10px;font-weight:900;line-height:1.1;opacity:1;transform:translateY(0)}.code-choice-row button:disabled{border-color:#e3e8e4;background:#f5f7f6;color:#9aa4a0;cursor:not-allowed;box-shadow:none;opacity:.7}.code-choice-row button:disabled:before{background:#c7cfca;opacity:.8}.code-copy{position:relative;z-index:1;display:grid;align-content:center;gap:3px;min-width:0;text-align:center}.code-copy strong,.code-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-choice-row button.code-zero{border-color:#cfded8;background:radial-gradient(circle at 82% 18%,rgba(0,143,130,.12),transparent 28%),linear-gradient(135deg,rgba(0,143,130,.08),transparent 40%),#f7fbf9}.code-choice-row button.code-zero:active:not(:disabled){border-color:#008f82;background:radial-gradient(circle at 82% 18%,rgba(0,143,130,.18),transparent 28%),linear-gradient(135deg,rgba(0,143,130,.14),transparent 40%),#e9f7f3}.code-choice-row button.code-zero:before{background:#008f82}.code-choice-row button.code-zero .code-copy strong{color:#00776c}.code-choice-row button.code-zero .code-copy small{color:#66736f}.code-choice-row button.code-full{border-color:#efc3ba;background:radial-gradient(circle at 82% 16%,rgba(214,35,35,.2),transparent 30%),linear-gradient(135deg,rgba(214,35,35,.1),transparent 46%),#fff7f3}.code-choice-row button.code-full:active:not(:disabled){border-color:#d62323;background:radial-gradient(circle at 82% 16%,rgba(214,35,35,.26),transparent 30%),linear-gradient(135deg,rgba(214,35,35,.16),transparent 46%),#fff0eb}.code-choice-row button.code-full:before{background:#d62323;width:4px;opacity:.9}.code-choice-row button.code-full .code-copy strong{color:#b51f1a}.code-choice-row button.code-full .code-copy small{color:#8f574f}.code-choice-row button.code-zero.active{border-color:#005f55;background:radial-gradient(circle at 18% 18%,rgba(255,255,255,.22),transparent 30%),linear-gradient(180deg,#009481,#006f65)}.code-choice-row button.code-full.active{border-color:#005f55;background:radial-gradient(circle at 18% 18%,rgba(255,255,255,.22),transparent 30%),linear-gradient(180deg,#009481,#006f65);box-shadow:inset 0 0 0 2px #ffffff6b,inset 0 -4px #002c272e,0 10px 22px #005f5538}.code-choice-row button.code-full.active .code-copy strong{color:#fff}.code-choice-row .code-copy strong{color:#26312d;font-size:16px;line-height:1}.code-choice-row .code-copy small{color:#6b7873;font-size:12px;font-weight:700}.code-choice-row em{position:absolute;top:5px;right:5px;z-index:2;padding:1px 5px;border-radius:4px;background:#d62323;color:#fff;font-size:10px;font-style:normal;font-weight:900}.code-choice-row button.active em{right:auto;left:14px;background:#ffffff38;color:#fff}.code-choice-row button.active .code-copy small{color:#ffffffe6;font-weight:800}.code-choice-row button.active .code-copy strong{color:#fff}.code-choice-row button.active,.code-choice-row button.active:hover,.code-choice-row button.active:focus,.code-choice-row button.active:focus-visible,.code-choice-row button.active:active,.code-choice-row button.code-zero.active,.code-choice-row button.code-zero.active:hover,.code-choice-row button.code-zero.active:focus,.code-choice-row button.code-zero.active:active,.code-choice-row button.code-full.active,.code-choice-row button.code-full.active:hover,.code-choice-row button.code-full.active:focus,.code-choice-row button.code-full.active:active{border-color:#005f55;background:radial-gradient(circle at 18% 18%,rgba(255,255,255,.22),transparent 30%),linear-gradient(180deg,#009481,#006f65);color:#fff;box-shadow:inset 0 0 0 2px #ffffff6b,inset 0 -4px #002c272e,0 10px 22px #005f5538}.code-choice-row button.active .code-copy strong,.code-choice-row button.active .code-copy small,.code-choice-row button.code-zero.active .code-copy strong,.code-choice-row button.code-zero.active .code-copy small,.code-choice-row button.code-full.active .code-copy strong,.code-choice-row button.code-full.active .code-copy small{color:#fff}@media(hover:none){.code-choice-row button:hover:not(.active):not(:disabled){transform:none;border-color:#d8e1dc;background:radial-gradient(circle at 84% 18%,rgba(0,143,130,.08),transparent 30%),linear-gradient(180deg,#fbfffd,#eef7f3),#eef7f3}.code-choice-row button.active{transform:translateY(-1px)}}.rule-formula{margin:2px 0 8px;color:#7a8581;font-size:12px}.total-line{display:flex;justify-content:space-between;padding:7px 0;color:#53605c}.total-line strong{color:#03823d}textarea{min-height:62px;resize:vertical}.submit{margin:16px 0 8px}.history{margin:0 10px 10px;overflow:hidden}.history-title{display:flex;align-items:center;min-height:62px;padding:0 16px;border-bottom:1px solid #edf0ed}.history-filters{display:flex;align-items:center;gap:10px;margin-left:auto}.history-filters label{display:flex;align-items:center;gap:8px;color:#58645f}.history-filters input{height:36px;padding:0 10px}.history-table{padding:4px 16px 10px}.history-row{display:grid;grid-template-columns:230px 76px 240px 110px 72px 72px 72px;align-items:center;min-height:42px;border-bottom:1px solid #edf0ed;color:#4b5854}.history-row button{display:inline-flex;align-items:center;gap:5px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:grid;place-items:center;background:#141d1a47}.modal{width:420px;padding:22px;border-radius:8px;background:#fff;box-shadow:0 18px 60px #131c1838}.modal h3{margin:0 0 8px;font-size:20px}.modal p{margin:0 0 18px;color:#63706b}.modal-field{display:grid;gap:6px;margin-top:12px}.modal-field span{color:#53605c;font-weight:700}.rule-mode-row{display:grid;gap:8px}.rule-mode-row button{min-height:42px;padding:8px 10px;border:1px solid #dce3dd;border-radius:6px;background:#fff;color:#26312d;cursor:pointer;text-align:left}.rule-mode-row button.active{border-color:#008f82;background:#e8f7f3;color:#006f65;font-weight:800}.modal input{width:100%;height:42px;padding:0 12px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.play-mode .workbench{display:block;min-height:100vh;min-height:100svh;padding:8px;overflow:hidden}.play-mode .players-panel,.play-mode .ledger-panel{display:none}.play-mode .entry-panel{display:grid;grid-template-rows:auto auto minmax(0,1fr);height:calc(100vh - 16px);height:calc(100svh - 16px);padding:10px;overflow:hidden}.play-mode .panel-title{min-height:34px;margin-bottom:8px}.play-mode .panel-title h2{font-size:18px}.play-mode .panel-title button{min-height:32px;padding:0 10px;border:1px solid #dce3dd;border-radius:5px;background:#fff}.play-mode .focus-ledger-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:8px}.play-mode .focus-ledger-card{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:42px;padding:6px 8px;border:1px solid #e1e8e3;border-radius:7px;background:#fbfdfb}.play-mode .focus-ledger-card .avatar{width:28px;height:28px}.play-mode .focus-ledger-card span{overflow:hidden;color:#35423d;font-size:13px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.play-mode .focus-ledger-card strong{font-size:16px}.play-mode .entry-panel form{--play-table-size: min(490px, 72vh, 48vw);display:grid;grid-template-columns:minmax(350px,.92fr) minmax(118px,.34fr) minmax(250px,.65fr);grid-auto-rows:min-content;gap:0 10px;min-height:0;overflow:hidden}.play-mode .settlement-stage{display:contents}.play-mode .event-side{grid-column:2;grid-row:1 / span 12}.play-mode .receiver-side{grid-column:1;grid-row:1 / span 12;justify-self:stretch;min-width:0}.play-mode .entry-panel form>:not(.settlement-stage){grid-column:3}.play-mode .entry-panel form>.form-actions{grid-column:3}.play-mode .settlement-stage{margin-bottom:8px}.play-mode .settlement-stage .segmented{height:var(--play-table-size);min-height:0}.play-mode .event-selector{grid-template-rows:minmax(0,1fr);height:var(--play-table-size);min-height:0}.play-mode .event-category-row{grid-auto-rows:minmax(0,1fr);height:100%}.play-mode .event-category-button{min-height:0;padding:6px 4px}.play-mode .event-category-button strong{font-size:var(--fit-font-size, 16px)}.play-mode .event-category-button.compact-label strong{font-size:var(--fit-font-size, 20px)}.play-mode .event-category-button small{font-size:9px}.play-mode .event-subtype-grid{grid-auto-rows:minmax(0,1fr);min-height:0}.play-mode .event-subtype-button{min-height:0;padding:6px 4px}.play-mode .event-subtype-button strong{font-size:14px}.play-mode .event-subtype-button small{font-size:10px}.play-mode .event-image-button.active{transform:none}.play-mode .mahjong-picker{width:var(--play-table-size);max-width:var(--play-table-size)}.play-mode .seat-button{grid-template-columns:40px minmax(0,1fr);grid-template-rows:auto auto;width:40%}.play-mode .hand-tiles{display:none}.play-mode .seat-info>strong{overflow:hidden;font-size:14px;text-overflow:ellipsis;white-space:nowrap}.play-mode .seat-button small{overflow:visible;text-overflow:clip;white-space:nowrap}.play-mode .seat-score{grid-column:2;grid-row:2;padding-top:2px;text-align:left}.play-mode .seat-score strong{min-width:0;font-size:15px}.play-mode .field-label{margin:8px 0 6px}.play-mode .payer-button-row,.play-mode .code-choice-row{gap:6px}.play-mode .payer-button{min-height:48px;padding:7px 8px}.play-mode .fixed-rule-row,.play-mode .fixed-multiplier-row{margin-bottom:6px;padding:7px 10px}.play-mode .code-choice-row button{gap:2px;min-height:48px;padding:5px}.play-mode .code-copy{gap:2px}.play-mode .code-choice-row .code-copy strong{font-size:14px}.play-mode .code-choice-row .code-copy small{font-size:11px}.play-mode .rule-formula{margin-bottom:4px}.play-mode .total-line{padding:4px 0}.play-mode .note-field{display:none}.play-mode .submit{margin:8px 0 6px}.play-mode .form-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.play-mode .form-actions .btn{width:100%;margin:0}@media(max-width:1100px){.app-shell{grid-template-rows:auto auto minmax(0,1fr) auto}.topbar,.contextbar,.history-title,.history-filters{flex-wrap:wrap;height:auto}.brand{width:100%;height:54px}.nav-tabs{height:54px;padding:0 14px 7px;overflow-x:auto}.nav-tabs button{height:47px;flex:0 0 auto}.workbench{grid-template-columns:1fr;grid-template-rows:auto;align-content:start}.players-panel,.ledger-panel,.entry-panel{grid-column:auto;grid-row:auto}.entry-panel{order:1}.players-panel{order:2}.ledger-panel{order:3}.player-card-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.settlement-stage{grid-template-columns:minmax(0,1fr) minmax(158px,.32fr)}.contextbar{align-items:stretch;padding-block:10px}.context-actions{width:100%;margin-left:0;overflow-x:auto;padding-bottom:2px}.ledger-panel{min-height:420px}.history{max-width:calc(100vw - 20px)}.history-table{overflow-x:auto}.history-row{grid-template-columns:1fr 80px;row-gap:6px;padding:10px 0}.history-row span,.history-row button{grid-column:auto}.play-mode .entry-panel{overflow:auto}.play-mode .entry-panel form{--play-table-size: min(490px, calc(100vw - 288px) );grid-template-columns:minmax(112px,.32fr) minmax(340px,.92fr) minmax(236px,.62fr)}.play-mode .settlement-stage .segmented{height:var(--play-table-size);min-height:0}.play-mode .mahjong-picker{width:var(--play-table-size);max-width:var(--play-table-size)}}@media(min-width:761px)and (max-width:1180px){.play-mode .entry-panel{padding:8px}.play-mode .panel-title{min-height:30px;margin-bottom:6px}.play-mode .panel-title h2{font-size:17px}.play-mode .panel-title button{min-height:30px}.play-mode .focus-ledger-strip{gap:6px;margin-bottom:6px}.play-mode .focus-ledger-card{grid-template-columns:26px minmax(0,1fr) auto;gap:5px;min-height:36px;padding:4px 6px}.play-mode .focus-ledger-card .avatar{width:24px;height:24px}.play-mode .focus-ledger-card span{font-size:12px}.play-mode .focus-ledger-card strong{font-size:14px}.play-mode .entry-panel form{--play-table-size: min(430px, calc(100svh - 170px) , calc(100vw - 490px) );grid-template-columns:var(--play-table-size) minmax(108px,.28fr) minmax(300px,1fr);gap:0 8px}.play-mode .settlement-stage .segmented{gap:6px;height:var(--play-table-size)}.play-mode .settlement-stage .segmented button{grid-template-columns:1fr;grid-template-rows:20px auto;align-content:center;justify-items:center;min-height:0;padding:4px 5px;text-align:center}.play-mode .settlement-stage .event-art{width:18px;height:18px}.play-mode .settlement-stage .segmented button strong{font-size:13px;line-height:1}.play-mode .settlement-stage .segmented button small{display:block;font-size:clamp(9px,1.05vw,11px);line-height:1.05}.play-mode .event-copy{justify-items:center}.play-mode .mahjong-picker{width:var(--play-table-size);max-width:var(--play-table-size)}.play-mode .field-label{margin:6px 0 5px}.play-mode .payer-button-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.play-mode .payer-button{grid-template-columns:28px minmax(0,1fr);grid-template-rows:15px 14px;min-height:42px;padding:5px 7px;column-gap:6px}.play-mode .payer-button .avatar{grid-row:1 / 3;width:26px;height:26px}.play-mode .payer-button span,.play-mode .payer-button small{display:block;max-width:100%;line-height:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;writing-mode:horizontal-tb}.play-mode .payer-button span{font-size:13px}.play-mode .payer-button small{font-size:11px}.play-mode .fixed-rule-row,.play-mode .fixed-multiplier-row{margin-bottom:5px;padding:5px 8px}.play-mode .fixed-rule-row small,.play-mode .fixed-multiplier-row small,.play-mode .rule-formula{display:none}.play-mode .code-choice-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-bottom:5px}.play-mode .code-choice-row button{min-height:42px;padding:4px 5px}.play-mode .code-choice-row .code-copy strong{font-size:13px}.play-mode .code-choice-row .code-copy small{font-size:10px}.play-mode .total-line{padding:3px 0;font-size:13px}.play-mode .submit{margin:6px 0 4px}.play-mode .form-actions .btn{min-height:34px}}@media(max-width:760px){:root{font-size:14px}.app-shell,.app-shell.module-mode{display:block;min-height:100svh}.topbar{align-items:stretch}.brand{padding:0 14px;font-size:16px}.nav-tabs{width:100%;height:52px;padding:0 12px 7px;border-top:1px solid #edf0ed}.nav-tabs button{flex:0 0 auto;height:44px;min-width:86px;padding:0 14px}.top-actions{width:100%;min-height:48px;margin-left:0;padding:8px 12px;gap:10px;overflow-x:auto}.top-actions .sync-dot,.top-actions>svg{flex:0 0 auto}.contextbar{gap:10px;padding:10px 12px}.context-group{width:100%;align-items:stretch}.context-label,.divider,.contextbar>.muted{display:none}.context-group.game-picker{display:grid;grid-template-columns:minmax(0,1fr) 42px}.game-picker select{width:100%}.status-pill{min-height:34px}.context-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow:visible}.context-actions .btn{min-width:0;padding-inline:10px}.workbench{gap:8px;padding:8px}.players-panel,.entry-panel{padding:12px}.panel-title{margin-bottom:12px}.player-card-grid,.player-admin-grid,.module-grid.two,.stats-grid{grid-template-columns:1fr}.player-ledger-card{min-height:116px}.summary-box{grid-template-columns:repeat(2,minmax(0,1fr))}.settlement-stage{grid-template-columns:1fr;gap:10px}.receiver-side{grid-column:1;order:1}.event-side{grid-column:1;order:2}.settlement-stage .segmented{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;height:auto}.settlement-stage .segmented button{grid-template-columns:48px minmax(0,1fr);min-height:82px;padding:8px;column-gap:8px}.settlement-stage .event-art{width:48px;height:48px}.settlement-stage .segmented button strong{font-size:16px}.event-selected-badge{top:5px;right:5px;height:16px;padding-inline:5px;font-size:10px}.mahjong-picker{max-width:min(430px,calc(100vw - 40px));min-width:0}.mahjong-table{width:40%;border-width:8px;border-radius:14px}.table-outer-rail{top:-13px;right:-13px;bottom:-13px;left:-13px;border-width:6px}.table-felt-lines{top:14px;right:14px;bottom:14px;left:14px}.table-status{max-width:100px;padding:4px 6px}.table-status span,.table-status small{overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}.tile-wall{top:-35px;right:-35px;bottom:-35px;left:-35px}.tile-wall span:nth-child(1),.tile-wall span:nth-child(3){width:112px;height:14px}.tile-wall span:nth-child(2),.tile-wall span:nth-child(4){width:14px;height:112px}.discard-pool{grid-template-columns:repeat(3,17px);gap:3px}.discard-pool i{width:17px;height:21px;font-size:10px}.seat-button{grid-template-columns:36px minmax(0,1fr);grid-template-rows:28px 18px 10px;column-gap:6px;width:40%;min-height:74px;padding:7px;border-radius:7px}.player-portrait{width:36px;height:36px}.player-portrait:after,.seat-chips{display:none}.seat-button .avatar{width:32px;height:32px}.seat-info>strong{font-size:13px}.seat-button small{margin-top:3px;font-size:11px}.hand-tiles{gap:3px;padding-top:2px}.hand-tiles i{width:16px;height:9px}.seat-button.north{top:3%}.seat-button.east{right:2.5%}.seat-button.south{bottom:3%}.seat-button.west{left:2.5%}.seat-hint{font-size:12px}.payer-button-row,.code-choice-row{grid-template-columns:repeat(2,minmax(0,1fr))}.payer-button{min-height:54px}.ledger-panel{grid-template-rows:auto 1fr;min-height:360px}.type-filter{gap:8px;padding:10px 12px;overflow-x:auto}.type-filter button{flex:0 0 auto;min-width:58px}.type-filter span{flex:0 0 auto}.ledger-table{padding:0 12px 12px}.ledger-head{display:none}.ledger-row{grid-template-columns:1fr auto;gap:6px 10px;min-height:0;padding:11px 0}.ledger-row .timeline-dot{grid-column:1}.ledger-row .event-chip,.ledger-row .table-action{justify-self:end}.ledger-row .note-text,.ledger-row strong{grid-column:1 / 3}.note-text{white-space:normal}.history{margin:0 8px 8px;max-width:calc(100vw - 16px)}.history-title{align-items:stretch;padding:12px;gap:10px}.history-filters{display:grid;grid-template-columns:1fr;width:100%;margin-left:0}.history-filters label{display:grid;gap:5px}.history-filters input{width:100%}.history-row{grid-template-columns:1fr}.module-page{padding:8px}.module-header,.report-title,.ended-game-callout{display:grid;grid-template-columns:1fr;gap:12px;align-items:start}.module-header{min-height:0;padding:14px}.module-header h1{font-size:20px}.report-panel,.module-card,.stat-card{padding:14px}.management-row,.report-row,.player-admin-card{grid-template-columns:1fr;gap:7px;padding:10px 0}.admin-actions,.admin-persona-picker{grid-column:1}.persona-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.modal-backdrop{align-items:end;padding:10px}.modal{width:100%;max-width:460px;max-height:calc(100svh - 20px);overflow:auto;padding:18px}.modal-actions{display:grid;grid-template-columns:1fr 1fr}.play-mode .workbench{padding:6px}.play-mode .entry-panel{height:calc(100svh - 12px);padding:10px}.play-mode .entry-panel form{--play-table-size: min(268px, calc(100vw - 142px) , 34svh);grid-template-columns:minmax(0,1fr) 104px;gap:0 8px}.play-mode .event-side{grid-column:2;grid-row:1}.play-mode .receiver-side{grid-column:1;grid-row:1}.play-mode .entry-panel form>:not(.settlement-stage){grid-column:1 / -1}.play-mode .focus-ledger-strip{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.play-mode .focus-ledger-card{grid-template-columns:1fr;justify-items:center;gap:2px;min-height:58px;padding:5px 3px;text-align:center}.play-mode .focus-ledger-card .avatar{display:none}.play-mode .focus-ledger-card span{max-width:100%;font-size:12px}.play-mode .focus-ledger-card strong{font-size:15px}.play-mode .settlement-stage .segmented{grid-template-columns:1fr;gap:5px;height:var(--play-table-size)}.play-mode .settlement-stage .segmented button{grid-template-columns:22px minmax(0,1fr);min-height:42px;padding:3px 5px;column-gap:4px}.play-mode .settlement-stage .event-art{width:20px;height:20px}.play-mode .settlement-stage .segmented button strong{font-size:13px}.play-mode .event-selected-badge,.play-mode .seat-hint{display:none}.play-mode .settlement-stage .segmented button small{display:block;font-size:9px;line-height:1}.play-mode .mahjong-picker{width:var(--play-table-size);max-width:var(--play-table-size)}.play-mode .seat-button{grid-template-columns:28px minmax(0,1fr);grid-template-rows:30px;width:44%;min-height:48px;padding:5px;column-gap:5px}.play-mode .seat-button .avatar{width:26px;height:26px}.play-mode .player-portrait{width:28px;height:28px}.play-mode .seat-button small{display:none}.play-mode .seat-info>strong{min-width:0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.play-mode .field-label{margin:7px 0 5px}.play-mode .payer-button{grid-template-columns:1fr;grid-template-rows:1fr auto;justify-items:center;min-height:48px;padding:5px 4px;text-align:center}.play-mode .payer-button .avatar{display:none}.play-mode .payer-button span{max-width:100%;font-size:12px}.play-mode .payer-button small{font-size:11px}.play-mode .payer-button-row,.play-mode .code-choice-row{grid-template-columns:repeat(auto-fit,minmax(70px,1fr))}.play-mode .fixed-rule-row small,.play-mode .rule-formula{display:none}.play-mode .total-line{font-size:13px}.play-mode .form-actions{grid-column:1 / -1}.play-mode .form-actions .btn{min-height:36px}}@media(max-width:760px)and (max-height:760px){.play-mode .workbench{padding:4px}.play-mode .entry-panel{grid-template-rows:auto auto minmax(0,1fr);height:calc(100svh - 8px);padding:7px}.play-mode .panel-title{min-height:28px;margin-bottom:4px}.play-mode .panel-title h2{font-size:16px}.play-mode .panel-title button{min-height:28px;padding-inline:8px}.play-mode .focus-ledger-strip{gap:4px;margin-bottom:4px}.play-mode .focus-ledger-card{min-height:34px;padding:3px 2px}.play-mode .focus-ledger-card span{font-size:11px}.play-mode .focus-ledger-card strong{font-size:13px}.play-mode .entry-panel form{--play-table-size: min(214px, calc(100vw - 136px) , 31svh);gap:0 7px}.play-mode .field-label{margin:4px 0 3px;font-size:13px}.play-mode .settlement-stage .segmented{gap:4px}.play-mode .settlement-stage .segmented button{grid-template-columns:1fr;justify-items:center;min-height:0;padding:3px 4px;text-align:center}.play-mode .event-copy{display:flex;align-items:center;justify-content:center;gap:4px;width:100%;min-width:0}.play-mode .settlement-stage .event-art{display:none}.play-mode .settlement-stage .segmented button strong{flex:0 0 auto;font-size:11px;line-height:1}.play-mode .settlement-stage .segmented button small{flex:0 1 auto;min-width:0;font-size:8.5px;line-height:1;overflow:visible;white-space:nowrap}.play-mode .seat-button{grid-template-columns:24px minmax(0,1fr);grid-template-rows:26px;min-height:42px;padding:4px}.play-mode .seat-button .avatar{width:23px;height:23px}.play-mode .player-portrait{width:25px;height:25px}.play-mode .seat-info>strong{font-size:11px}.play-mode .payer-button-row{gap:4px}.play-mode .payer-button{min-height:38px;padding:3px 4px}.play-mode .payer-button span{font-size:11px}.play-mode .payer-button small{font-size:10px}.play-mode .fixed-rule-row,.play-mode .fixed-multiplier-row{grid-template-columns:1fr auto;margin-bottom:4px;padding:4px 8px}.play-mode .fixed-rule-row span,.play-mode .fixed-multiplier-row span{font-size:12px}.play-mode .fixed-rule-row strong,.play-mode .fixed-multiplier-row strong{font-size:16px}.play-mode .code-choice-row{gap:4px;margin-bottom:4px}.play-mode .code-choice-row button{min-height:36px;padding:3px 4px}.play-mode .code-choice-row .code-copy strong{font-size:12px}.play-mode .code-choice-row .code-copy small{font-size:10px}.play-mode .code-choice-row button.active:after{display:none}.play-mode .code-choice-row em{display:none}.play-mode .total-line{padding:2px 0;font-size:12px}.play-mode .submit{margin:4px 0 3px}.play-mode .form-actions{gap:4px}.play-mode .form-actions .btn{min-height:32px}}@media(max-width:360px){.settlement-stage .segmented button{min-height:68px}.mahjong-table{width:36%}.seat-button{width:43%;min-height:68px}.seat-button.east{right:1.5%}.seat-button.west{left:1.5%}.payer-button-row,.code-choice-row,.fixed-rule-row,.fixed-multiplier-row{grid-template-columns:1fr}.fixed-rule-row small,.fixed-multiplier-row small{grid-column:1}}@media(max-width:760px)and (max-height:600px){.play-mode .entry-panel form{--play-table-size: min(190px, calc(100vw - 130px) , 29svh)}.play-mode .settlement-stage .segmented button{grid-template-columns:1fr;min-height:0;padding-inline:3px;text-align:center}.play-mode .settlement-stage .event-art{display:none}.play-mode .settlement-stage .segmented button strong{font-size:10px}.play-mode .settlement-stage .segmented button small{font-size:7px}.play-mode .seat-button{min-height:36px}.play-mode .payer-button{min-height:34px}.play-mode .code-choice-row button{min-height:32px}.play-mode .total-line{display:none}.play-mode .submit{margin-top:3px}}@media(max-width:760px)and (max-height:600px){.play-mode .event-selector,.play-mode .event-category-row,.play-mode .event-subtype-grid{gap:4px}.play-mode .event-category-button{min-height:0;padding:3px}.play-mode .event-category-button strong{font-size:var(--fit-font-size, 13px)}.play-mode .event-category-button.compact-label strong{font-size:var(--fit-font-size, 15px)}.play-mode .event-category-button small{display:none}.play-mode .event-subtype-button{gap:2px;padding:3px}.play-mode .event-subtype-button strong{font-size:11px}.play-mode .event-subtype-button small{font-size:8px}.event-subtype-button>span{display:none}}.seat-button,.payer-button,.code-choice-row button,.player-ledger-card,.focus-ledger-card{min-width:0;overflow:hidden}.seat-button{grid-template-rows:minmax(0,auto) auto}.seat-info,.seat-score,.payer-button span,.payer-button small,.code-copy,.code-copy strong,.code-copy small,.player-card-top>div,.player-card-top strong,.player-card-role,.focus-ledger-card span{min-width:0;max-width:100%}.seat-info{align-self:end}.seat-info>strong{display:block;min-width:0;max-width:100%;overflow:hidden;line-height:1.05;text-overflow:ellipsis;white-space:nowrap}.seat-score{align-self:start;padding-top:3px;line-height:1}.seat-score>strong{display:block;min-width:0;max-width:100%;overflow:hidden;font-variant-numeric:tabular-nums;line-height:1;text-overflow:ellipsis;white-space:nowrap}.payer-button span,.payer-button small,.code-copy strong,.code-copy small,.focus-ledger-card span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.play-mode .seat-info>strong{overflow:hidden;text-overflow:ellipsis}.play-mode .seat-score{grid-column:2;grid-row:2}@media(max-width:760px)and (max-height:600px){.play-mode .seat-score>strong{font-size:12px}.play-mode .seat-info>strong{font-size:10.5px}.play-mode .player-portrait{align-self:center}}@media(max-width:760px){html,body{background:#eef3f0}body{overscroll-behavior-y:contain}.app-shell{padding-bottom:max(10px,env(safe-area-inset-bottom));background:#eef3f0}.topbar{position:sticky;top:0;z-index:8;display:grid;grid-template-columns:1fr;background:#fffffffa;box-shadow:0 8px 24px #26342f14}.brand{width:100%;height:48px;padding:0 12px;border-right:0}.brand-mark{width:30px;height:30px}.brand strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-actions{position:absolute;top:5px;right:8px;width:auto;min-height:38px;padding:0;background:transparent;overflow:visible}.top-actions>span:not(.sync-dot),.top-actions>svg,.top-actions .btn{display:none}.top-actions .sync-dot{align-self:center}.account-select{min-width:82px;max-width:112px;height:34px;padding:0 8px;border-radius:8px;font-size:13px}.nav-tabs{height:48px;padding:0 10px 8px;gap:7px;scrollbar-width:none}.nav-tabs::-webkit-scrollbar,.type-filter::-webkit-scrollbar,.player-card-grid::-webkit-scrollbar,.context-actions::-webkit-scrollbar{display:none}.nav-tabs button{height:38px;min-width:auto;padding:0 13px;border:1px solid #dde6e0;border-radius:999px;background:#f8fbf9;font-size:13px;white-space:nowrap}.nav-tabs button.active{border-color:#008f82;background:#008f82;color:#fff}.contextbar{display:grid;gap:8px;margin:8px;padding:10px;border:1px solid #dbe4de;border-radius:10px;background:#fff}.contextbar>.context-group:first-child{display:none}.context-group.game-picker{grid-template-columns:minmax(0,1fr) 40px;gap:8px}.game-picker select{height:42px;border-radius:8px;font-size:14px}.contextbar .status-pill{justify-self:start;min-height:28px;padding:0 10px;border-radius:999px;background:#eaf8f4;font-size:13px}.context-actions{display:flex;gap:8px;padding-bottom:1px;overflow-x:auto}.context-actions .btn{flex:0 0 auto;min-height:40px;border-radius:8px;white-space:nowrap}.context-actions .btn:nth-last-child(-n+2){display:none}.workbench{display:flex;flex-direction:column;gap:10px;padding:0 8px 8px}.surface{border-color:#dbe4de;border-radius:10px;box-shadow:0 8px 22px #26342f0f}.entry-panel{order:1;padding:12px;overflow:visible}.players-panel{order:2;padding:12px}.ledger-panel{order:3}.panel-title{min-height:36px;margin-bottom:10px}.panel-title h2,.history-title h2{font-size:18px}.panel-title button{min-height:34px;padding:0 10px;border:1px solid #dce3dd;border-radius:8px;background:#fff}.settlement-stage{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.receiver-side{order:1;width:100%;min-width:0}.event-side{order:2;width:100%;min-width:0}.field-label{margin:13px 0 7px;font-size:14px}.receiver-side .field-label,.event-side .field-label{margin-top:0}.event-category-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.event-category-button{min-height:66px;border-radius:10px}.event-category-button.compact-label strong{font-size:var(--fit-font-size, 20px)}.mahjong-picker{width:100%;max-width:390px;border-radius:12px}.seat-button{width:43%;min-height:68px;border-radius:10px}.seat-button.north{top:2.5%}.seat-button.south{bottom:2.5%}.seat-button.east{right:2%}.seat-button.west{left:2%}.payer-button-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.payer-button{min-height:58px;border-radius:10px}.fixed-rule-row,.fixed-multiplier-row,.code-choice-row button{border-radius:10px}.code-choice-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.code-choice-row button{min-height:56px}.total-line{align-items:center;min-height:34px;padding:6px 0;font-size:14px}textarea{min-height:56px;border-radius:10px}.form-actions{position:sticky;bottom:max(8px,env(safe-area-inset-bottom));z-index:6;display:grid;grid-template-columns:minmax(0,1fr) 104px;gap:8px;margin:12px -4px 0;padding:8px 4px 4px;background:linear-gradient(180deg,#fff0,#fff 28%)}.form-actions .btn{min-height:46px;margin:0;border-radius:10px}.form-actions .btn:not(.primary){font-size:13px}.player-card-grid{display:flex;gap:10px;margin:0 -12px 12px;padding:0 12px 2px;overflow-x:auto;scroll-snap-type:x mandatory}.player-ledger-card{flex:0 0 min(76vw,282px);min-height:120px;scroll-snap-align:start}.summary-box{grid-template-columns:repeat(4,minmax(92px,1fr));margin:0 -12px;padding:0 12px 2px;overflow-x:auto}.summary-item{min-height:58px;border-radius:10px}.type-filter{position:static;z-index:4;padding:10px;border-bottom:1px solid #edf0ed;background:#fff}.type-filter button{min-height:34px;border-radius:999px}.ledger-table{padding:0 12px 12px;overflow:visible}.ledger-row{position:relative;display:grid;grid-template-columns:1fr auto;gap:7px 10px;margin-top:10px;padding:12px;border:1px solid #e4eae5;border-radius:10px;background:#fff}.ledger-row>span:nth-child(3),.ledger-row>span:nth-child(4){grid-column:1 / 3;color:#53605c}.ledger-row>span:nth-child(3):before{content:"付：";color:#89938f}.ledger-row>span:nth-child(4):before{content:"收：";color:#89938f}.ledger-row strong{grid-column:1;grid-row:4;font-size:18px}.ledger-row .note-text{grid-column:1 / 3;color:#66736f;font-size:13px}.ledger-row .table-action{position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:34px;height:34px;border:1px solid #edf0ed;border-radius:8px;background:#fbfdfb}.timeline-dot{padding-left:18px}.timeline-dot:before{width:8px;height:8px}.history{margin:0 8px 8px;border-radius:10px}.history-title{display:grid;grid-template-columns:1fr}.history-filters{gap:8px}.module-page{padding:8px}.module-header{border-radius:10px}.module-header .btn,.ended-game-callout .btn{width:100%}.player-admin-card,.stat-card,.module-card,.report-panel{border-radius:10px}.modal-backdrop{place-items:end center;padding:10px}.modal{border-radius:14px}}@media(max-width:420px){.brand strong{max-width:calc(100vw - 156px)}.context-actions .btn{padding-inline:9px}.mahjong-picker{width:100%;max-width:100%}.seat-button{width:44%;min-height:62px;padding:6px}.seat-button small,.hand-tiles{display:none}.code-choice-row{grid-template-columns:repeat(2,minmax(0,1fr))}.form-actions{grid-template-columns:minmax(0,1fr) 92px}}@media(max-width:760px){.play-mode .entry-panel{display:block;height:calc(100svh - 8px);min-height:0;padding:7px;overflow:auto}.play-mode .entry-panel form{display:block;overflow:visible}.play-mode .settlement-stage{display:grid;grid-template-columns:minmax(0,1fr) 86px;align-items:stretch;gap:6px;margin-bottom:5px}.play-mode .receiver-side,.play-mode .event-side,.play-mode .entry-panel form>:not(.settlement-stage),.play-mode .entry-panel form>.form-actions{grid-column:auto;grid-row:auto}.play-mode .receiver-side{grid-column:1;grid-row:1;order:initial}.play-mode .event-side{grid-column:2;grid-row:1;order:initial;display:grid;min-width:0}.play-mode .panel-title{min-height:28px;margin-bottom:4px}.play-mode .panel-title h2{font-size:16px}.play-mode .panel-title button{min-height:28px;padding:0 8px}.play-mode .field-label{margin:4px 0 3px;font-size:12px;line-height:1.1}.play-mode .receiver-side>.field-label,.play-mode .event-side>.field-label{display:none}.play-mode .mahjong-picker{width:100%;max-width:100%;margin-bottom:0}.play-mode .event-selector,.play-mode .event-category-row{height:100%;min-height:0}.play-mode .event-category-row{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:6px}.play-mode .settlement-stage .segmented{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));height:100%}.play-mode .settlement-stage .segmented button{grid-template-columns:1fr;align-content:center;justify-items:center;min-height:0;padding:6px 4px;border-radius:8px;text-align:center}.play-mode .settlement-stage .event-art{display:grid;width:24px;height:24px}.play-mode .event-copy{display:grid;justify-items:center}.play-mode .settlement-stage .segmented button strong{font-size:13px}.play-mode .settlement-stage .segmented button small{font-size:9px;line-height:1}.play-mode .event-category-button small{display:none}.play-mode .seat-button{grid-template-columns:26px minmax(0,1fr);grid-template-rows:24px auto;min-height:42px;padding:4px}.play-mode .seat-button.east,.play-mode .seat-button.west{grid-template-columns:1fr;grid-template-rows:26px auto auto;justify-items:center;align-content:center;row-gap:2px;width:26%;min-height:78px;padding:5px 4px;text-align:center}.play-mode .seat-button.east{right:1.5%}.play-mode .seat-button.west{left:1.5%}.play-mode .player-portrait{width:26px;height:26px}.play-mode .seat-button .avatar{width:24px;height:24px}.play-mode .seat-info>strong,.play-mode .seat-score>strong{font-size:11px}.play-mode .seat-button.east .player-portrait,.play-mode .seat-button.west .player-portrait{grid-column:1;grid-row:1}.play-mode .seat-button.east .seat-info,.play-mode .seat-button.west .seat-info{grid-column:1;grid-row:2;align-self:center;width:100%}.play-mode .seat-button.east .seat-score,.play-mode .seat-button.west .seat-score{grid-column:1;grid-row:3;padding-top:0;text-align:center}.play-mode .payer-button-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.play-mode .payer-button{grid-template-columns:1fr;grid-template-rows:auto auto;justify-items:center;min-height:38px;padding:4px 3px;text-align:center}.play-mode .payer-button span{font-size:11px}.play-mode .payer-button small{font-size:10px;line-height:1}.play-mode .fixed-rule-row,.play-mode .fixed-multiplier-row{grid-template-columns:1fr auto;min-height:32px;margin-bottom:4px;padding:5px 8px}.play-mode .fixed-rule-row span,.play-mode .fixed-multiplier-row span{font-size:12px}.play-mode .fixed-rule-row strong,.play-mode .fixed-multiplier-row strong{font-size:15px}.play-mode .fixed-rule-row small,.play-mode .fixed-multiplier-row small,.play-mode .rule-formula,.play-mode .note-field{display:none}.play-mode .code-choice-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-bottom:3px}.play-mode .code-choice-row button{min-height:36px;padding:3px 4px}.play-mode .code-choice-row .code-copy strong{font-size:12px}.play-mode .code-choice-row .code-copy small{font-size:9px}.play-mode .total-line{min-height:24px;padding:2px 0;font-size:12px}.play-mode .form-actions{position:static;grid-template-columns:minmax(0,1fr) 82px;gap:5px;margin:4px 0 0;padding:0;background:transparent}.play-mode .form-actions .btn{min-height:34px;border-radius:8px;font-size:12px}}
