/* Original tabletop edition: ink, mineral pigment, silk portraits, and lacquer. */
:root{--bg:#ddd2b8;--ink:#302c24;--muted:#716551;--jade:#3b5141;--jade-light:#dedcc8;--line:#b3a181;--red:#8e3024;--gold:#b89a5c;--paper:#efe4cb;--serif:"STKaiti","KaiTi","Songti SC","Noto Serif CJK SC",serif}
body{background-color:var(--bg);background-image:repeating-linear-gradient(94deg,#4c352503 0 1px,transparent 1px 5px),repeating-linear-gradient(0deg,#fff4d60b 0 1px,transparent 1px 3px);color:var(--ink)}
.topbar{height:87px;padding:0 max(4%,calc((100vw - 1380px)/2));background:#272720;border:0;border-bottom:3px solid #8e784b;box-shadow:0 3px 0 #353127,0 7px 17px #31291e25;color:#f0dfb8;gap:20px}
.brand{font:700 26px/1.25 var(--serif);letter-spacing:4px}.brand small{margin-top:7px;color:#ad9b75;letter-spacing:3px}.seal{background:#892e25;color:#f1dec1;border:1px solid #c49668;outline:1px solid #6c251e;outline-offset:3px;border-radius:0;font-size:29px;transform:rotate(-3deg)}.top-actions{gap:22px}.topbar .text-button{color:#d7c9a9;font-size:12px}.topbar .connection{color:#acb294;font-size:10px}.topbar .text-button:hover{color:#fff0c8}
main{max-width:1480px;padding:0 5%}.welcome{min-height:calc(100vh - 158px);grid-template-columns:minmax(0,1.25fr) minmax(310px,.8fr);gap:8%;padding:44px 0 46px;position:relative}.intro{position:relative;min-width:0}.intro .eyebrow{font:12px var(--serif);color:#775f3e;letter-spacing:7px}.intro h1{font-family:var(--serif);font-size:clamp(42px,4.6vw,66px);font-weight:700;letter-spacing:8px;line-height:1.18;color:#2f3028;margin:22px 0 14px}.intro h1 span{display:block;margin:8px 0 0 72px;color:#6e2c25;font-size:.78em;letter-spacing:15px}.lead{font:14px/1.9 var(--serif);color:#6e614c}.intro-foot{color:#65583f;font-size:11px;letter-spacing:3px;margin-top:25px;gap:14px}.hero-generals{display:flex;align-items:center;justify-content:center;position:relative;isolation:isolate;margin:28px 0 0;max-width:570px;height:265px;padding:0 20px}.hero-general{position:relative;width:37%;aspect-ratio:1/1.18;padding:6px;background:#352e22;border:1px solid #ab8e55;box-shadow:inset 0 0 0 2px #4d3d29,0 12px 22px #30211640;flex:none;border-radius:2px;overflow:hidden}.hero-general .character-art{height:100%;width:100%;background-size:300% 200%}.hero-general.rear:first-child{transform:rotate(-10deg) translate(23px,8px);z-index:1}.hero-general.front{transform:translateY(-8px) rotate(-1deg);z-index:3;width:40%;box-shadow:0 17px 25px #2d211646}.hero-general.rear:nth-child(3){transform:rotate(10deg) translate(-23px,8px);z-index:2}.hero-general-name{position:absolute;right:12px;top:18px;writing-mode:vertical-rl;letter-spacing:5px;font:25px var(--serif);color:#f7e3b6;text-shadow:1px 2px 3px #19190b;background:#302b20d9;padding:12px 7px;border:1px solid #ac8c58}.hero-stamp{position:absolute;right:5px;bottom:5px;writing-mode:vertical-rl;font:19px var(--serif);letter-spacing:3px;color:#812a21;border:2px solid #812a21;padding:8px 4px;transform:rotate(7deg);z-index:4}
.character-art{display:block;background-image:url('/art/heroes-original.webp');background-size:300% 200%;background-repeat:no-repeat;aspect-ratio:1/1;background-color:#c9b592;overflow:hidden}.character-art.liubei{background-position:0 0}.character-art.sunquan{background-position:50% 0}.character-art.zhangjiao{background-position:100% 0}.character-art.caocao{background-position:0 100%}.character-art.guanyu{background-position:50% 100%}.character-art.diaochan{background-position:100% 100%}
.lobby-card{background:var(--paper);border:1px solid #ad9871;border-radius:1px;padding:36px;box-shadow:5px 5px 0 #c8b794,6px 6px 0 #9b8663,0 14px 25px #45361d16}.lobby-card:before{top:7px;bottom:7px;left:7px;right:7px;width:auto;height:auto;background:none;border:1px solid #c1ad85;pointer-events:none}.card-kicker{font:11px/1.8 var(--serif);color:#886d43;letter-spacing:4px}h2{font-family:var(--serif);font-size:29px;font-weight:700;letter-spacing:3px}.lobby-card h2{margin:11px 0}.lobby-card .muted{font-size:12px}.lobby-card form{margin-top:26px}.lobby-card label{font-size:12px;letter-spacing:2px}.primary,.secondary{border-radius:1px;min-height:44px;letter-spacing:1px;font-size:13px}.primary{background:#783329;border:1px solid #5e281e;box-shadow:inset 0 0 0 1px #bd93604d,0 2px 0 #50291c;color:#f5e6c8}.primary:hover:not(:disabled){background:#8e3d2e}.secondary{border-color:#8a7858;color:#584b37;background:#e8dbc0;box-shadow:inset 0 0 0 2px #f8eccd66}.secondary:hover:not(:disabled){background:#dbc8a4}.divider span{background:var(--paper);color:#8b785a}.privacy-note{font-size:10px;line-height:1.8;color:#897759}.lobby-card input{border-radius:0;background:#f7eedb;border-color:#b9a581}.lobby-card input::placeholder{color:#a29276}.site-footer{min-height:67px;color:#8b7a60;border-top:1px solid #aa967250;padding:15px 5%;font-size:10px}.site-footer>span:first-child{font:14px var(--serif);color:#65573e}
.room-heading{padding:27px 0 19px}.room-heading h1{font-family:var(--serif);font-size:23px;font-weight:700}.room-heading h1 span{font:600 18px ui-monospace,monospace;letter-spacing:2px}.room-heading .eyebrow{font-size:10px;color:#8d6e41}.waiting{border-radius:1px;background:var(--paper);border:1px solid #ac9671;padding:30px 34px;box-shadow:inset 0 0 0 5px #ede0c2,inset 0 0 0 6px #bdab85}.waiting-intro h2{font-size:28px}.roster{gap:12px;margin:24px 0}.roster-player{display:grid;grid-template-columns:60px 1fr;column-gap:12px;text-align:left;align-content:center;border-radius:0;padding:12px;border-color:#b49b70;background:#dfcfad;min-height:92px}.roster-portrait{width:60px;height:65px;grid-row:1/4;border:1px solid #8f7851;box-shadow:0 2px 4px #30251730}.roster-player .name{font-size:12px}.roster-character{font:18px var(--serif);font-weight:700;color:#5b3e27;letter-spacing:3px}.roster-player small{font-size:9px}.roster-player.empty{background:none;border-style:dashed;color:#9e8b69;display:flex;align-items:center;justify-content:center;gap:8px}.roster-player.empty .avatar{border-radius:0;width:26px;height:32px;background:none;color:#a99063;margin:0}.roster-player.empty small{display:none}
.character-selection{padding:22px 0 25px;margin:0 0 24px;border-block:1px solid #b8a37d}.character-selection-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.character-selection h3{font:700 23px/1.4 var(--serif);letter-spacing:2px;margin:3px 0}.character-selection-heading p{font:12px var(--serif);color:#7a4e2e}.character-choices{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.character-choice{position:relative;text-align:left;background:#d5c2a0;border:1px solid #a38a5e;padding:5px 5px 12px;min-width:0;box-shadow:0 3px 0 #a89470;color:#3c3021;overflow:hidden;border-radius:1px;transition:transform .18s,box-shadow .18s}.character-choice>.character-art{width:100%;filter:saturate(.8);border:1px solid #8e78564a}.character-choice:hover:not(:disabled){transform:translateY(-4px);box-shadow:0 7px 12px #5642262b}.character-choice.selected{border:2px solid #8f3b2b;padding:4px 4px 11px;background:#ebd7aa;box-shadow:0 3px 0 #733225,0 0 0 2px #f7edcc}.character-faction{position:absolute;left:10px;top:10px;background:#3d4335e8;border:1px solid #c9b17d;color:#f5e3b9;font:13px var(--serif);padding:5px 4px}.character-choice[data-character=sunquan] .character-faction{background:#773a28}.character-choice[data-character=caocao] .character-faction{background:#3a4652}.character-choice[data-character=zhangjiao] .character-faction,.character-choice[data-character=diaochan] .character-faction{background:#675237}.character-name{font:700 24px var(--serif);display:block;letter-spacing:5px;padding:11px 5px 3px}.character-title{font:10px var(--serif);color:#7c6341;letter-spacing:2px;padding-left:6px}.character-check{position:absolute;right:9px;bottom:14px;font:10px var(--serif);color:#79674b;writing-mode:vertical-rl;letter-spacing:2px}.character-choice.selected .character-check{background:#8f3427;color:#f5e5c0;padding:5px 3px;bottom:10px;right:7px}.character-note{font-size:11px;line-height:1.8;color:#877254;margin:15px 0 0}.waiting-footer{gap:24px;flex-wrap:wrap}.waiting-footer .toggle{font-size:11px}
.game-layout{grid-template-columns:minmax(0,1fr) 218px;gap:19px}.table-wrap{border-radius:2px;border:3px solid #4c3c28;box-shadow:0 6px 0 #352b20,0 14px 24px #30261930}.table-topline{background:#282b24;color:#d5c29b;padding:10px 16px;border-bottom:1px solid #8d794d;letter-spacing:2px}.mahjong-table{height:495px;background-color:#354a3b;background-image:repeating-linear-gradient(1deg,#f2db9903 0 1px,transparent 1px 3px),repeating-linear-gradient(92deg,#121c1306 0 1px,transparent 1px 5px);border:10px solid #443b29;box-shadow:inset 0 0 0 1px #ad945b88,inset 0 0 0 7px #28382d80,inset 0 0 45px #101b1590}.mahjong-table:after{content:'';position:absolute;inset:20px;border:1px solid #a6925a22;pointer-events:none}.table-decoration{font-family:var(--serif);font-size:130px;color:#b6ae7b0c;top:45%;letter-spacing:20px}.seat{max-width:110px;width:110px;color:#dfcfaa}.seat-portrait{width:72px;height:78px;margin:0 auto 5px;border:2px solid #b19a69;box-shadow:0 3px 6px #0e171f70;filter:saturate(.85)}.seat-character{font:700 17px var(--serif);letter-spacing:4px;color:#eddbaf}.seat-name{font-size:10px;color:#bab593;max-width:105px;margin-top:4px}.seat.active .seat-portrait{border-color:#edca7f;outline:2px solid #d2a44d66;outline-offset:3px;filter:none}.seat.active .seat-character{color:#f9d687}.seat.active .seat-name:before{color:#e6bd60}.seat-top{width:230px;max-width:230px;top:18px;display:grid;grid-template-columns:58px 1fr;gap:0 9px;text-align:left;transform:translateX(-50%)}.seat-top .seat-portrait{width:58px;height:68px;grid-column:1;grid-row:1/5;margin:0}.seat-top .seat-character,.seat-top .seat-name,.seat-top .role-badge,.seat-top .backs,.seat-top>small,.seat-top .seat-melds{grid-column:2;margin-left:0}.seat-top .seat-name{max-width:170px;margin-top:1px}.seat-top .role-badge{width:max-content;margin-top:3px}.seat-top .backs{max-width:160px;gap:2px;margin-top:7px;justify-content:flex-start}.seat-top .back{width:8px;height:12px;border-bottom-width:2px}.seat-top>small{position:absolute;right:0;bottom:0;font-size:9px;color:#a8a88a}.seat-left,.seat-right{top:139px}.seat-left{left:14px}.seat-right{right:14px}.seat .role-badge{border-radius:0;background:#25382d;border-color:#76806188;color:#c2c6a2;font-size:9px}.backs{gap:2px}.seat-left .backs,.seat-right .backs{max-width:91px;margin-top:7px}.back{width:9px;height:15px;background:#79906a;border-color:#a5b083;box-shadow:none;border-radius:1px}.seat-melds{max-width:108px;margin-top:4px;gap:5px}.seat-left .seat-melds,.seat-right .seat-melds{max-width:100px}.seat-melds .tile.mini{width:17px;min-width:17px;height:24px}.table-center{top:43%;width:270px;max-width:48%;padding:13px 7px;border-color:#b19c6555}.center-kicker{font:11px var(--serif);letter-spacing:6px;color:#a9af8d}#turn-label{font:14px/1.7 var(--serif);color:#f3dfb5;margin-top:8px}#table-note{color:#b1baa0;font-size:10px}#last-tile{margin:12px 0 7px}.discard-area{left:23%;right:23%;bottom:25px;max-height:116px;gap:6px 4px;padding:4px 1px 8px}.discard-area .tile.mini{width:23px;min-width:23px;height:32px}.own-area{padding:14px 16px 20px;background:#e7d7b5;border-top:5px solid #6f5b36}.own-player{gap:10px;justify-content:flex-start;margin-bottom:0;min-height:41px}.own-portrait{width:37px;height:40px;border:1px solid #927345}.own-name{font:700 15px var(--serif);letter-spacing:1px}.own-player .role-badge{margin-left:auto;border:1px solid #a57d4d;background:#dbc599;color:#643824;letter-spacing:2px;border-radius:0;font-size:11px;padding:3px 9px}.hand{padding-top:23px;padding-bottom:17px;gap:5px;min-height:105px}.tile{border-radius:3px;width:42px;min-width:42px;height:60px;box-shadow:inset 1px 1px 1px #ffffec,inset -1px -1px 2px #c4b381,0 3px 0 #bead81,0 6px 0 #406043,0 8px 5px #392b2030}.scroll-hint{font-size:10px;color:#8c7753;letter-spacing:.5px}.action-hint{color:#63553f;font-size:12px;line-height:1.75;margin:10px 0}.actions{gap:9px}.actions button{font-size:13px;padding:10px 18px;min-height:44px}.actions .danger{background:#f0dfbb;color:#8b3426}.tile-picker .tile.mini{padding:2px!important;min-height:0}.autoplay-controls{border-color:#b19a70!important;background:#ddcca9!important;border-radius:0!important}.autoplay-controls .autoplay-status{color:#67533c!important}
.info-card{border-radius:1px;background:#eaddbf;border:1px solid #a99269;box-shadow:inset 0 0 0 3px #f4e9cb45;padding:18px}.identity-info{padding-top:0;overflow:hidden}.general-display{margin:0 -18px 17px;position:relative;height:185px;background:#bca582;overflow:hidden;border-bottom:3px solid #8b7043}.general-portrait{width:100%;height:185px;filter:saturate(.8)}.general-display:after{content:'';position:absolute;inset:55% 0 0;background:linear-gradient(transparent,#27271ee8)}.general-heading{position:absolute;bottom:12px;left:17px;font:700 30px var(--serif);letter-spacing:6px;color:#f4dfb7;z-index:1}.general-title{position:absolute;bottom:15px;right:14px;writing-mode:vertical-rl;font:10px var(--serif);letter-spacing:2px;color:#d2bd8b;z-index:1}.general-faction{position:absolute;top:11px;left:11px;background:#394231d9;color:#e8d8ad;font:17px var(--serif);border:1px solid #b4a176;padding:6px}.info-card h3{font:700 25px var(--serif);letter-spacing:5px;margin:9px 0;color:#6e3525}.info-card p{font-size:12px;color:#6e624b;line-height:1.85}.info-card .skill-line{color:#746042;border-top-color:#bda780;font-size:11px;line-height:1.8}.log-card{max-height:290px}.log-card #game-log{font-size:11px;color:#7c6a4b}.log-card #game-log li{border-bottom:1px solid #c9b89670}.log-card #game-log li:first-child{color:#584229}
.identity-stage{background:#2d3228;border-bottom:4px solid #9b7d42;padding:35px 18px 42px;min-height:410px}.identity-stage h2{font:700 31px var(--serif);color:#e6d0a0;letter-spacing:5px}.identity-stage p{color:#b7ad8f}.identity-card{border-radius:2px;background:#423b29;box-shadow:0 6px 0 #161c15,inset 0 0 0 4px #2d3025,inset 0 0 0 5px #9c8754;color:#c9ad75;border-color:#ad9363}.identity-card .sigil{font-family:var(--serif);border-radius:1px;border-color:#7e6b44;transform:rotate(-3deg)}.identity-card.revealed{background:#d7be87;color:#5f3821}.identity-reveal{font-family:var(--serif);font-size:15px}.reveal-card{border-radius:1px}.reveal-emblem{border-radius:1px;font-family:var(--serif)}
dialog{border-radius:1px;background:#efe2c4;border:1px solid #9d8152;box-shadow:0 0 0 4px #302a20,0 0 0 5px #b09665,0 20px 70px #0005;color:#3c3024}dialog::backdrop{background:#151b16bb;backdrop-filter:blur(2px)}dialog h2,dialog h3{font-family:var(--serif)}dialog p,dialog li{color:#716049}dialog .card-kicker{color:#8e6840}.toast{background:#36392b;border:1px solid #b69a65;border-radius:1px;color:#f2dfb6;font-size:13px}.account-tabs button,.account-record,.account-rank,.account-recovery-box{border-radius:1px}.account-record,.account-rank{background:#e6d6b4}.account-tabs button[aria-pressed=true]{background:#66412c;border-color:#795638}.feedback-caution{background:#ded0ac!important}.score-notes{background:#ddcba6}
@media(min-width:1450px){.hero-generals{height:300px}.tile{width:47px;min-width:47px;height:67px}.mahjong-table{height:510px}}
@media(max-width:1150px){.welcome{gap:6%;grid-template-columns:1.1fr .9fr}.hero-generals{height:235px;padding:0}.lobby-card{padding:29px}.game-layout{grid-template-columns:minmax(0,1fr) 195px;gap:14px}.tile{width:37px;min-width:37px;height:55px}.general-display,.general-portrait{height:168px}.roster-player{grid-template-columns:43px 1fr;padding:9px;gap:8px}.roster-portrait{width:43px;height:54px}.character-choices{gap:8px}.character-name{font-size:22px;letter-spacing:3px}}
@media(max-width:850px){.topbar{padding:0 4%;gap:15px}.brand{font-size:23px}.top-actions{gap:13px}.connection{display:none}.welcome{gap:5%}.intro h1{font-size:45px;letter-spacing:5px}.intro h1 span{margin-left:39px;letter-spacing:10px}.hero-generals{height:215px}.hero-general-name{right:9px;font-size:19px;padding:8px 5px}.hero-stamp{right:-5px;font-size:16px}.intro-foot{font-size:10px;letter-spacing:1px;gap:10px}.lobby-card{padding:25px}.lobby-card h2{font-size:25px}.game-layout{grid-template-columns:1fr}.game-sidebar{display:grid;grid-template-columns:1.2fr 1fr;gap:13px}.identity-info{display:block}.general-display{width:110px;height:125px;float:left;margin:0 13px 8px -18px}.general-portrait{height:125px}.general-heading{font-size:23px;left:12px;bottom:10px}.general-title{display:none}.general-faction{font-size:12px;top:7px;left:7px;padding:3px}.identity-info>.card-kicker{display:block;padding-top:17px}.identity-info>h3{font-size:23px;margin-top:6px}.identity-info #skill-info{clear:both}.log-card{max-height:300px}.tile{width:39px;min-width:39px;height:57px}.waiting{padding:24px}.roster{gap:9px}.roster-player{grid-template-columns:42px 1fr}.character-selection h3{font-size:21px}.character-title{letter-spacing:0;font-size:9px}.character-check{display:none}.character-choice.selected .character-name:after{content:'✓';font:10px sans-serif;color:#8e3124;letter-spacing:0;margin-left:3px}}
@media(max-width:650px){main{padding:0 4%}.topbar{height:auto;min-height:85px;gap:8px;padding:14px 4% 11px;align-content:center;flex-wrap:wrap}.brand{font-size:22px;gap:12px;letter-spacing:3px}.brand small{font-size:8px;letter-spacing:2px}.seal{width:35px;height:38px;font-size:25px}.top-actions{gap:9px;justify-content:flex-end;width:auto;margin-left:auto}.top-actions .text-button{font-size:10px;min-height:35px;padding:5px 0;letter-spacing:0}.top-actions .text-button span{display:none}.welcome{grid-template-columns:1fr;gap:33px;padding:34px 0 39px}.intro{max-width:510px;width:100%;margin:auto}.intro .eyebrow{font-size:10px;letter-spacing:5px}.intro h1{font-size:46px;margin:19px 0 12px;letter-spacing:7px}.intro h1 span{margin-left:78px;letter-spacing:14px}.lead{font-size:13px;line-height:1.8}.hero-generals{max-width:410px;height:230px;margin:20px auto 0;padding:0 10px}.hero-general{width:35%;}.hero-general.front{width:38%}.hero-general-name{font-size:21px}.hero-stamp{right:0;bottom:4px}.intro-foot{justify-content:center;margin-top:18px;letter-spacing:2px}.lobby-card{padding:29px;max-width:510px;width:100%;margin:auto}.lobby-card h2{font-size:27px}.lobby-card form{margin-top:22px}.lobby-card .privacy-note{margin-top:20px}.site-footer{font-size:9px;padding:18px 4%}.site-footer>span:last-child{display:none}.room-heading{padding:21px 0 15px;gap:8px}.room-heading h1{font-size:18px;letter-spacing:0}.room-heading h1 span{font-size:14px;letter-spacing:1px}.room-heading .eyebrow{font-size:9px;letter-spacing:3px}.room-tools{gap:10px}.room-tools .secondary{padding:8px 9px;min-height:39px;font-size:10px;letter-spacing:0}.room-tools .text-button{font-size:11px}.waiting{padding:22px 15px}.waiting-intro h2{font-size:26px}.waiting-intro .muted{font-size:11px}.roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:20px 0}.roster-player{grid-template-columns:48px 1fr;min-height:76px;padding:8px;gap:9px}.roster-portrait{width:48px;height:54px}.roster-character{font-size:17px}.roster-player .name{font-size:11px}.character-selection{padding:18px 0 20px;margin-bottom:18px}.character-selection-heading{display:block;margin-bottom:15px}.character-selection h3{font-size:23px}.character-selection-heading p{font-size:11px;margin:8px 0 0}.character-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px 9px}.character-name{font-size:22px;letter-spacing:4px;padding-top:9px}.character-title{font-size:10px;letter-spacing:1px}.character-note{font-size:10px}.waiting-footer{gap:16px}.waiting-footer .toggle{font-size:10px;line-height:1.7}.waiting-footer #start-game{width:100%;order:3}.waiting-footer #ranked-label{max-width:100%}.mahjong-table{height:440px;border-width:7px}.mahjong-table:after{inset:13px}.seat{width:79px;max-width:79px}.seat-portrait{width:57px;height:61px;border-width:1px}.seat-character{font-size:15px;letter-spacing:3px}.seat-name{font-size:9px;max-width:77px}.seat .role-badge{font-size:8px;padding:2px 4px;letter-spacing:0}.seat-top{max-width:205px;width:205px;top:17px;grid-template-columns:47px 1fr;gap:0 8px}.seat-top .seat-portrait{width:47px;height:56px}.seat-top .seat-character{font-size:15px}.seat-top .seat-name{max-width:145px}.seat-top .backs{gap:2px;max-width:145px}.seat-top .back{width:7px;height:11px}.seat-left,.seat-right{top:138px}.seat-left{left:5px}.seat-right{right:5px}.seat-left .backs,.seat-right .backs{max-width:68px;gap:2px}.back{width:7px;height:12px}.seat-melds .tile.mini{width:15px;min-width:15px;height:21px}.seat-left .seat-melds,.seat-right .seat-melds{max-width:72px}.table-center{top:46%;max-width:48%;padding:8px 1px;width:205px}.center-kicker{font-size:9px;letter-spacing:4px}#turn-label{font-size:12px;line-height:1.8;margin-top:6px}#table-note{font-size:9px}.discard-area{bottom:19px;left:24%;right:24%;max-height:95px;gap:5px 3px}.discard-area .tile.mini{width:19px;min-width:19px;height:28px}.discard-area .tile.mini .value{font-size:14px}.discard-area .tile.mini .suit{font-size:10px}.tile{width:34px;min-width:34px;height:51px}.hand{gap:4px;padding:20px 4px 16px;min-height:94px}.own-area{padding:12px 8px 18px}.own-name{font-size:13px;letter-spacing:0}.own-portrait{width:31px;height:35px}.own-player .role-badge{font-size:10px;padding:3px 7px}.scroll-hint{font-size:9px}.action-hint{font-size:11px;margin:9px 3px}.actions{gap:7px}.actions button{font-size:12px;padding:9px 13px;min-height:43px}.table-topline{font-size:10px;padding:9px 11px;letter-spacing:1px}.game-sidebar{grid-template-columns:1fr}.identity-info{min-height:158px}.info-card{padding:16px}.identity-info{padding-top:0}.general-display{width:122px;height:143px;margin:0 15px 9px -16px}.general-portrait{height:143px}.identity-info>.card-kicker{padding-top:14px}.identity-info>h3{font-size:24px}.identity-info #role-description{font-size:11px;line-height:1.8}.identity-info #skill-info{clear:both;padding-top:1px;display:grid;grid-template-columns:1fr 1fr;gap:0 13px}.info-card .skill-line{font-size:10px;line-height:1.8;margin-top:9px;padding-top:8px}.log-card{max-height:190px}.identity-stage{padding:29px 9px 34px;min-height:340px}.identity-stage h2{font-size:25px;letter-spacing:2px}.identity-stage p{font-size:11px}.identity-card{width:23%;height:133px}.identity-cards{gap:6px;margin:22px auto 15px}.identity-card .sigil{font-size:34px;width:45px;height:50px}.identity-card .identity-number{font-size:8px;letter-spacing:1px}.identity-reveal{font-size:13px}.autoplay-controls{flex-wrap:wrap;gap:6px!important}.autoplay-controls button{font-size:11px!important;min-height:39px}.autoplay-controls p,.autoplay-status{font-size:10px!important;line-height:1.7}dialog{padding:23px 19px}dialog h2{font-size:25px}dialog p,dialog li{font-size:12px}}
@media(max-width:390px){.topbar{justify-content:center;gap:8px}.brand{font-size:22px}.top-actions{width:100%;justify-content:space-between;margin:0;gap:12px}.top-actions .text-button{font-size:11px;min-height:29px}.welcome{padding-top:28px}.intro h1{font-size:43px;letter-spacing:5px}.intro h1 span{margin-left:62px;letter-spacing:12px}.hero-generals{height:209px}.hero-general-name{font-size:18px;padding:8px 4px}.hero-stamp{font-size:15px}.lobby-card{padding:25px}.room-heading h1{font-size:16px}.room-heading h1 span{font-size:12px}.room-tools{gap:7px}.room-tools .secondary{font-size:9px;padding:7px}.character-name{font-size:20px}.character-title{font-size:9px;letter-spacing:0}.seat{max-width:69px;width:69px}.seat-portrait{width:51px;height:57px}.seat-top{max-width:195px;width:195px}.seat-character{font-size:14px}.seat-name{max-width:66px}.seat-top .seat-name{max-width:135px}.table-center{max-width:45%}.mahjong-table{height:426px}.tile{width:31px;min-width:31px;height:48px}.hand{gap:3px}.actions button{padding:9px 11px;font-size:11px}.discard-area{left:23%;right:23%}.tile .value{font-size:21px}.tile .suit{font-size:16px}.character-selection h3{font-size:21px}.own-player .role-badge{letter-spacing:1px}.own-name{font-size:12px}}
@media(prefers-reduced-motion:reduce){.character-choice{transition:none}.character-choice:hover:not(:disabled){transform:none}}
/* Rules-first skill cards: art does not change identity or permissions. */
#skill-info{display:flex;flex-direction:column;gap:13px}.skill-card{position:relative;background:#e2d0ab;border:1px solid #af9466;border-left:4px solid #7c3527;padding:12px 11px 10px;box-shadow:inset 0 0 0 2px #f4e5c438}.skill-card-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.skill-name{font:700 25px/1.3 var(--serif);letter-spacing:3px;color:#6c3023;margin:0}.skill-kind{font-size:8px;line-height:1.4;color:#8b6c43;writing-mode:vertical-rl;letter-spacing:2px;border:1px solid #b39b71;padding:3px}.skill-availability{display:block;font:10px/1.8 var(--serif);color:#7b6140;margin:4px 0 10px;border-bottom:1px solid #b39c72;padding-bottom:5px;letter-spacing:1px}.skill-card.ready{border-color:#97703a;background:#ead4a6;box-shadow:inset 0 0 0 2px #f8e8ba,0 2px 5px #4d35251a}.skill-card.ready .skill-availability{color:#7e3022;font-weight:700}.skill-card.spent{border-left-color:#8c8069;background:#dfd2b6}.skill-card.spent .skill-name{color:#867557}.skill-rule{display:grid;grid-template-columns:25px 1fr;gap:7px;font-size:11px!important;line-height:1.8!important;margin:6px 0!important;color:#5b4a33!important}.skill-rule b{font-size:10px;line-height:1.8;color:#8b6038}.skill-card .skill-newbie{font-size:10px;line-height:1.8;color:#846c49;margin:11px 0 0;border-top:1px dashed #bba378;padding-top:8px}.skill-table-note{display:flex;flex-wrap:wrap;align-items:center;gap:9px;border-top:1px solid #b7a078;padding-top:13px;font-size:10px;color:#716044}.skill-table-note b{font:13px var(--serif);letter-spacing:2px}.skill-table-note>span:last-child{font-size:10px;line-height:1.7;flex:1;min-width:80px}.skill-note{font-size:10px!important;color:#837050!important}.skill-choice-panel{border-radius:0!important;background:#eee0be!important;border:1px solid #b49660!important;border-left:4px solid #7c3527!important}.skill-choice-panel h3{font:700 23px var(--serif)!important;color:#733b27!important;letter-spacing:3px}.skill-choice-item{background:#dfcba2!important;border-radius:1px!important;border-color:#b49a6b!important}.skill-order-label{color:#71562f!important}.skill-choice-controls button{border-radius:0!important;min-height:37px!important;background:#eee1c3!important;color:#634a2c!important}.skill-choice-note{color:#7d6642!important;font-size:11px!important}.skill-order-preview{font:12px/1.8 var(--serif)!important;color:#74512f!important}.table-wrap{position:relative}.skill-effects{position:absolute;inset:41px 0 auto;display:flex;justify-content:center;align-items:flex-start;height:160px;overflow:visible;z-index:18;pointer-events:none}.skill-flash{position:relative;width:min(92%,540px);height:135px;min-height:135px;border-radius:0;display:grid;grid-template-columns:1fr;align-content:center;justify-items:center;gap:4px;background:#242b21f5;border-top:1px solid #bea472;border-bottom:1px solid #bea472;box-shadow:0 8px 15px #10150e45;color:#f0d8a8;text-shadow:0 2px 2px #17170f;animation:skillScroll 2.1s both;padding:10px 68px;overflow:hidden}.skill-flash:before{inset:5px;border:1px solid #b49b603b;border-radius:0;animation:none;transform:none!important;z-index:0;pointer-events:none}.skill-flash .effect-mark{font:700 35px/1.2 var(--serif);letter-spacing:8px;z-index:2;white-space:nowrap}.effect-kicker{font:9px var(--serif);letter-spacing:5px;color:#b7a278;z-index:2}.skill-flash .effect-caption{font:11px var(--serif);letter-spacing:2px;margin:0;color:#cfb789;z-index:2;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.effect-verse{font:10px var(--serif);letter-spacing:3px;color:#ac9a78;z-index:2}.effect-portrait{position:absolute;left:0;top:0;bottom:0;width:135px;height:135px;opacity:.53;mask-image:linear-gradient(to right,#000 35%,transparent);filter:saturate(.7)}.effect-glyph{position:absolute;right:15px;top:10px;font:95px/1.2 var(--serif);color:#dac18b12;transform:rotate(-9deg);z-index:0}.skill-flash.guanxing{background:#27333bf5;color:#cce0dc}.skill-flash.guanxing:after{content:'·  ✦  ·  ✧  ·  ✦';position:absolute;inset:15px 16px;color:#aac4ba4d;font-size:17px;letter-spacing:24px;animation:starsRise 2.1s both;pointer-events:none}.skill-flash.harvest{background:#46412af5;color:#ead398}.skill-flash.bomb{background:#482820f5;color:#f4ba85}.skill-flash.bomb .effect-glyph{color:#e2733c25;animation:inkFlame 2.1s both}.skill-flash.exchange,.skill-flash.exchangeComplete{background:#303b2cf5;color:#d8dfb8}.skill-flash.reroll{background:#2c3635f5;color:#d1dcc7}.skill-flash.hu{background:#5c4028f5;color:#fbe0a1}.skill-flash .tile{position:absolute;right:20px;top:49px;z-index:2;margin:0;box-shadow:0 2px 0 #9e8f65}.role-reveal-overlay{position:fixed;left:50%;top:50%;translate:-50% -50%;z-index:20}.skill-flash:not(.is-skill){height:95px;min-height:95px}.skill-flash:not(.is-skill) .effect-mark{font-size:28px}
@keyframes skillScroll{0%{opacity:0;transform:translateY(-10px) scaleX(.86)}14%,79%{opacity:1;transform:translateY(0) scaleX(1)}100%{opacity:0;transform:translateY(-5px)}}@keyframes starsRise{0%{opacity:0;transform:translateY(15px)}30%,70%{opacity:1}100%{opacity:0;transform:translateY(-10px)}}@keyframes inkFlame{0%{opacity:.2;transform:rotate(-12deg) scale(.7)}40%,70%{opacity:1;transform:rotate(-5deg) scale(1.1)}100%{opacity:0;transform:rotate(5deg) scale(1.25)}}
@media(max-width:850px){.identity-info #skill-info{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-top:6px}.skill-table-note,.skill-note{grid-column:1/-1}.skill-card{padding:11px 9px}.skill-name{font-size:23px;letter-spacing:2px}.skill-rule{font-size:11px!important;grid-template-columns:23px 1fr;gap:5px}.skill-card .skill-newbie{font-size:10px}}
@media(max-width:650px){.identity-info #skill-info{gap:10px;padding-top:7px}.skill-card{padding:12px 10px;border-left-width:3px}.skill-name{font-size:24px}.skill-rule{font-size:11px!important;line-height:1.8!important}.skill-card .skill-newbie{font-size:10px;line-height:1.8}.skill-availability{font-size:10px}.skill-effects{inset:37px 0 auto;height:140px}.skill-flash{height:118px;min-height:118px;width:95%;padding:10px 45px}.skill-flash .effect-mark{font-size:30px;letter-spacing:5px}.skill-flash .effect-caption{font-size:10px;letter-spacing:1px}.effect-verse{font-size:9px;letter-spacing:1px}.effect-kicker{font-size:8px;letter-spacing:3px}.effect-portrait{width:118px;height:118px;opacity:.45}.effect-glyph{font-size:80px;right:5px}.skill-flash.guanxing:after{font-size:14px;letter-spacing:12px}.skill-flash:not(.is-skill){height:85px;min-height:85px}.skill-flash:not(.is-skill) .effect-mark{font-size:25px}.skill-choice-panel{padding:14px 9px!important}.skill-choice-tiles{gap:10px!important}.skill-choice-controls{gap:5px!important}.skill-choice-controls button{font-size:10px!important;padding:5px 7px!important;min-height:34px!important}}
@media(max-width:390px){.identity-info #skill-info{grid-template-columns:1fr}.skill-card{padding:13px}.skill-kind{writing-mode:horizontal-tb;font-size:9px}.skill-rule{font-size:12px!important}.skill-newbie{font-size:11px!important}.skill-name{font-size:25px}}
@media(prefers-reduced-motion:reduce){.skill-flash,.skill-flash:after,.effect-glyph{animation:none!important;transform:none!important}.skill-flash{opacity:1}.skill-flash:before{display:block}.role-reveal-overlay{animation:none!important}}
/* Autoplay remains visible during identity drawing. Effects never cover controls. */
.skill-effects{position:relative;inset:auto;height:0;overflow:visible}.skill-flash{position:absolute;top:8px}.table-wrap>.autoplay-controls{margin:0!important;border:0!important;border-bottom:1px solid #a18b60!important;padding:9px 13px!important}.table-wrap>.autoplay-controls #autoplay-status{max-width:none}.table-wrap>.autoplay-controls #autoplay-toggle{min-height:38px;font-size:11px;padding:7px 12px}.identity-stage{border-top:1px solid #9a865e}
.game-layout{align-items:start}.table-wrap{background:#e7d7b5}

/* The expanded roster keeps every cosmetic choice independent of identity. */
.character-art.zhaoyun,.character-art.zhangfei,.character-art.zhugeliang,.character-art.huangzhong,.character-art.zhouyu,.character-art.sunshangxiang{background-image:url('/art/heroes-expansion-shu-wu.webp')}
.character-art.daqiao,.character-art.xiaoqiao,.character-art.simayi,.character-art.xiahoudun,.character-art.zhangliao,.character-art.lvbu{background-image:url('/art/heroes-expansion-wei-qun.webp')}
.character-art.zhaoyun,.character-art.daqiao{background-position:0 0}
.character-art.zhangfei,.character-art.xiaoqiao{background-position:50% 0}
.character-art.zhugeliang,.character-art.simayi{background-position:100% 0}
.character-art.huangzhong,.character-art.xiahoudun{background-position:0 100%}
.character-art.zhouyu,.character-art.zhangliao{background-position:50% 100%}
.character-art.sunshangxiang,.character-art.lvbu{background-position:100% 100%}
.character-filters{display:flex;flex-wrap:wrap;gap:8px;padding:0 0 10px;border-bottom:1px solid #b8a37d}
.character-filter{font:13px var(--serif);letter-spacing:2px;padding:8px 16px;min-height:40px;background:transparent;border:1px solid #b7a17a;color:#715739;border-radius:1px}
.character-filter.active{color:#f6e7c8;background:#774030;border-color:#774030;box-shadow:inset 0 0 0 2px #b58358}
.character-count{font-size:10px;line-height:1.8;letter-spacing:1px;color:#7d6748;margin:10px 0 6px}
.character-choices{max-height:560px;overflow-y:auto;overscroll-behavior:contain;padding:5px 5px 10px;scrollbar-width:thin;scrollbar-color:#a78b5f #e0cfae;scroll-padding-block:8px;align-content:start}
.character-choice.long-name .character-name{font-size:20px;letter-spacing:2px}
.character-choice[data-faction="魏"] .character-faction{background:#3a4652}
.character-choice[data-faction="蜀"] .character-faction{background:#3d4335}
.character-choice[data-faction="吴"] .character-faction{background:#773a28}
.character-choice[data-faction="群"] .character-faction{background:#675237}
@media(max-width:850px){.character-choices{grid-template-columns:repeat(3,minmax(0,1fr))}.character-choice.long-name .character-name{font-size:20px}}
@media(max-width:650px){.character-filters{gap:5px}.character-filter{flex:1;font-size:11px;letter-spacing:0;min-height:42px;padding:7px 5px}.character-count{letter-spacing:0;font-size:10px}.character-choices{max-height:460px;gap:12px 7px;padding:4px 4px 9px}.character-choice.long-name .character-name{font-size:17px;letter-spacing:1px}.character-choice .character-title{letter-spacing:0}.character-name{padding-left:2px;letter-spacing:2px}.character-title{padding-left:2px}}
@media(max-width:360px){.character-choice.long-name .character-name{font-size:15px;letter-spacing:0}.character-choice .character-name{font-size:18px;letter-spacing:1px}.character-choice .character-title{font-size:8px}.character-faction{left:8px;top:8px;font-size:11px;padding:4px 3px}}
