:root{--green:#075d38;--green2:#043e2a;--gold:#f2d27b;--gold2:#b88728;--ink:#101419;--cream:#fff8e8;--red:#d92f29}*{box-sizing:border-box}html,body{width:100%;height:100%}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;background:#041f18;color:#fff;overflow:hidden}button,select,input{font:inherit}button{cursor:pointer}.screen{display:none;width:100vw;height:100vh}.screen.active{display:block}.hidden{display:none!important}.hidden-select{display:none}.title-screen,.setup-screen{position:relative;overflow:hidden}.title-bg,.setup-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.title-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(1,19,14,.18),rgba(1,13,10,.48) 54%,rgba(0,0,0,.78))}.setup-shade{position:absolute;inset:0;background:rgba(1,20,14,.72);backdrop-filter:blur(3px)}.title-wrap{position:relative;z-index:2;height:100%;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(380px,.75fr);align-items:center;gap:3vw;padding:5vh 5vw}.brand-block{align-self:center;position:relative;min-height:55vh;padding:4vh 2vw;text-shadow:0 4px 12px #000}.eyebrow{display:inline-block;letter-spacing:.18em;font-size:clamp(11px,1vw,16px);font-weight:800;color:#ffe6a0;border:1px solid #f6cf6f;padding:7px 12px;border-radius:999px;background:#063e2cbf}.eyebrow.dark{color:#70510a;background:#fff3c6;border-color:#ddb94e}.brand-block h1{font-size:clamp(46px,5.6vw,84px);line-height:.98;margin:20px 0 12px;font-weight:950;letter-spacing:-.06em;-webkit-text-stroke:2px #111}.brand-block h1 span{display:block;font-size:1.16em;background:linear-gradient(#fff8a0,#ffc62b 46%,#f08b00);-webkit-background-clip:text;color:transparent;filter:drop-shadow(0 5px 0 #111)}.brand-block p{font-size:clamp(16px,1.6vw,25px);font-weight:800;max-width:480px}.deck-float{position:absolute;right:1vw;bottom:0;width:min(25vw,360px);filter:drop-shadow(0 24px 20px #0009);transform:rotate(3deg)}.menu-board{justify-self:end;width:min(470px,100%);padding:22px;border:2px solid #f1d17b;border-radius:26px;background:linear-gradient(145deg,rgba(7,59,43,.95),rgba(3,31,23,.97));box-shadow:0 26px 60px #0008,inset 0 0 0 5px #ffffff08}.menu-main{width:100%;border:0;border-radius:18px;background:linear-gradient(180deg,#ffe36c,#f4a813);color:#231600;padding:18px 20px;display:flex;align-items:center;gap:16px;box-shadow:0 7px 0 #93520a,0 14px 30px #0005;text-align:left}.menu-main:hover{transform:translateY(-2px)}.menu-main .menu-icon{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;background:#1b5f42;color:#fff;font-size:22px}.menu-main b{display:block;font-size:25px}.menu-main small,.menu-grid small{display:block;opacity:.75;margin-top:3px}.menu-sub{margin-top:18px;width:100%;padding:12px;border:1px solid #d8be7b;border-radius:13px;background:#174f3d;color:#fff;font-size:17px;font-weight:800}.menu-sub:disabled{opacity:.35;cursor:not-allowed}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:12px}.menu-grid button,.version-card{min-height:105px;border:1px solid #cfae5e;border-radius:14px;background:linear-gradient(#113f32,#0a3026);color:#fff;padding:14px;text-align:left}.menu-grid button span{font-size:24px;color:#ffd556}.menu-grid button b{display:block;margin-top:7px;font-size:16px}.version-card{display:flex;flex-direction:column;justify-content:center;color:#d7cda7}.version-card b{color:#fff;margin:3px 0}.version-card span{font-size:10px;word-break:break-all;opacity:.65}.setup-shell{position:relative;z-index:2;width:min(1180px,94vw);height:min(860px,94vh);margin:3vh auto;border:2px solid #e6c46a;border-radius:28px;background:linear-gradient(145deg,rgba(5,54,39,.98),rgba(3,31,23,.98));box-shadow:0 30px 70px #0009;overflow:hidden}.setup-head{height:106px;display:grid;grid-template-columns:170px 1fr 190px;align-items:center;gap:20px;padding:18px 24px;background:linear-gradient(90deg,#082c23,#0d4e39);border-bottom:1px solid #d7b85c}.setup-head div{text-align:center}.setup-head small{letter-spacing:.17em;color:#d8be7a}.setup-head h2{font-size:34px;margin:2px 0}.ghost{border:1px solid #bba259;background:#0c392d;color:#fff;border-radius:11px;padding:11px}.start-big{border:0;border-radius:15px;padding:15px 16px;background:linear-gradient(#ffe56f,#f0a711);font-weight:900;color:#201400;box-shadow:0 5px 0 #92520a}.setup-content{height:calc(100% - 106px);display:grid;grid-template-columns:1.35fr .65fr;gap:18px;padding:18px;overflow:auto}.setup-main{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-content:start}.setting-card{background:#fffdf2;color:#17211c;border-radius:17px;padding:18px;border:3px solid #d4b765;box-shadow:0 8px 18px #0004}.setting-card:nth-child(2){grid-column:2;grid-row:1 / span 2}.setting-card h3{margin:0;font-size:22px;color:#0b5e3b}.setting-card p{margin:5px 0 15px;color:#6b716e;font-size:13px}.segmented{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.segmented button,.choice-row button{border:2px solid #d9d4c3;background:#f7f3e6;border-radius:11px;padding:11px 6px;color:#263029;font-weight:800}.segmented button.active,.choice-row button.active{border-color:#0f7a4f;background:#dff4e7;box-shadow:inset 0 0 0 2px #8bc7a5;color:#075b3a}.difficulty{grid-template-columns:1fr}.difficulty button{display:flex;justify-content:space-between;align-items:center;padding:13px}.difficulty small,.choice-row small{display:block;font-size:11px;font-weight:500;opacity:.72}.choice-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}.rule-panel{background:linear-gradient(180deg,#122c25,#081e19);border:1px solid #c6a958;border-radius:17px;padding:15px}.rule-title{display:flex;align-items:center;gap:7px;border-bottom:1px solid #ffffff20;padding:2px 4px 11px}.rule-title>span{width:30px;height:30px;border-radius:50%;background:#f2cf68;color:#29200b;display:grid;place-items:center;font-weight:900}.rule-title h3{margin-left:auto}.switch-card{display:grid;grid-template-columns:52px 1fr;align-items:center;gap:10px;margin-top:12px;padding:12px;border:1px solid #ffffff1f;border-radius:14px;background:#ffffff08;cursor:pointer}.switch-card input{display:none}.switch{width:48px;height:28px;border-radius:20px;background:#41544d;position:relative;transition:.2s}.switch:after{content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:#fff;transition:.2s}.switch-card input:checked+.switch{background:#e8bd38}.switch-card input:checked+.switch:after{left:23px;background:#164c39}.switch-card b{display:block}.switch-card small{display:block;color:#c8d1cc;margin-top:4px;line-height:1.4}.setup-tip{margin-top:18px;border-radius:13px;padding:13px;background:#f3d256;color:#2b2108}.setup-tip p{font-size:12px;margin:5px 0 0;line-height:1.5}.gameHeader{height:58px;display:flex;align-items:center;gap:16px;padding:7px 14px;background:#082b22;border-bottom:1px solid #c9aa61}.gameHeader #turnText{font-size:20px;font-weight:800;margin-right:auto}.gameHeader #statusPills{display:flex;gap:6px}.gameHeader button,.toolbar button{border:1px solid #d8bf7b;background:#113e32;color:#fff;border-radius:10px;padding:9px 14px}.pill{background:#6d4d10;border:1px solid #e4c368;padding:5px 9px;border-radius:999px;font-size:13px}#cpuArea{height:112px;display:flex;align-items:center;justify-content:center;gap:18px;padding:8px;background:#0a513a}.cpu{width:145px;height:92px;background:#073326;border:1px solid #d6bc70;border-radius:14px;padding:8px;position:relative;text-align:center}.cpu.turn{box-shadow:0 0 0 3px #ffdb4c,0 0 20px #ffdb4c}.cpu .backs{display:flex;justify-content:center;margin-top:5px}.cpu .miniBack{width:27px;height:40px;border-radius:4px;margin-left:-15px;object-fit:cover}.table{height:calc(100vh - 58px - 112px - 250px);min-height:230px;position:relative;background:radial-gradient(ellipse at center,#148153 0,#075d38 48%,#043f2b 100%);display:flex;align-items:center;justify-content:center;gap:65px;border-top:3px solid #d7bb6e;border-bottom:3px solid #d7bb6e}.pile,.discard{position:relative;width:145px;height:200px}.pile img,.discard img{width:100%;height:100%;object-fit:contain}.pile button{position:absolute;bottom:-35px;left:50%;transform:translateX(-50%);white-space:nowrap;border:0;border-radius:10px;padding:8px 14px;background:#f4d154;font-weight:800}.pile span{position:absolute;right:-6px;top:-6px;background:#111;border-radius:999px;padding:5px 8px}.discard{border:3px dashed #e7d189;border-radius:14px;display:grid;place-items:center}.discard.dragover{background:#ffffff2b;box-shadow:0 0 0 4px #f6da5c}.discard img{position:absolute;inset:0}.dropHint{opacity:.55;font-weight:700}.jump{position:absolute;top:10px;background:#d92222;padding:9px 18px;border-radius:999px;font-weight:800}#message{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);background:#001b15d9;border:1px solid #d6bd70;border-radius:10px;padding:8px 18px;min-width:300px;text-align:center}.playerZone{height:250px;background:#082d23;padding:8px 12px}.toolbar{height:40px;display:flex;gap:10px;align-items:center}.toolbar #selectionInfo{margin-left:auto}.toolbar #calcToggle.on{background:#f4c943;color:#1b1600;font-weight:800}#hand{height:195px;display:flex;align-items:end;justify-content:center;gap:6px;overflow-x:auto;padding:8px 4px}.card{position:relative;flex:0 0 auto;width:88px;height:128px;transition:.15s;user-select:none}.card img{width:100%;height:100%;object-fit:fill;border-radius:7px;box-shadow:0 5px 9px #0007;pointer-events:none}.card:hover{transform:translateY(-9px)}.card.selected{transform:translateY(-18px);outline:4px solid #ffdb43;border-radius:8px}.card .answerBadge{position:absolute;right:-8px;top:-8px;background:#fff;color:#111;border:3px solid #ffcf23;border-radius:999px;min-width:36px;height:36px;display:grid;place-items:center;font-size:21px;font-weight:900}.overlay{position:fixed;inset:0;background:#000c;display:grid;place-items:center;z-index:20}.modal{position:relative;background:#fff;color:#111;border-radius:22px;max-height:90vh;max-width:94vw;width:min(920px,94vw);padding:30px;overflow:auto;border:4px solid #dab94f;box-shadow:0 25px 80px #000c}.modal>button{position:absolute;right:12px;top:10px;border:0;background:#ddd;border-radius:999px;width:34px;height:34px}.calcCard{display:flex;gap:26px;align-items:center}.calcCard img{width:190px}.calcCard input{font-size:30px;width:110px;padding:10px;text-align:center;margin-right:8px}.primary{background:linear-gradient(#ffd84f,#f19b10);border:0;border-radius:12px;padding:12px 22px;font-weight:900;color:#241400}.overlay-title{display:flex;align-items:end;justify-content:space-between;border-bottom:3px solid #0e6b45;padding-bottom:10px;margin-bottom:18px}.overlay-title small{letter-spacing:.15em;color:#806d39;font-weight:800}.overlay-title h2{margin:2px 0;font-size:32px}.overlay-title>b{font-size:24px;color:#0e6b45}.collectionGrid{display:grid;grid-template-columns:repeat(10,1fr);gap:7px}.collectionGrid img{width:100%;border-radius:5px}.locked{filter:brightness(.07);opacity:.65}.achievementGrid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.achievement{display:flex;gap:11px;align-items:center;padding:12px;border:1px solid #ddd6c4;border-radius:12px;background:#f6f3e9;opacity:.48}.achievement.done{opacity:1;background:#fff3c7;border-color:#d5ae31}.achievement>span{font-size:26px;color:#d4a51e}.achievement b,.achievement small{display:block}.achievement small{color:#777;margin-top:3px}.howto{display:grid;grid-template-columns:1fr 1fr;gap:14px}.howto section{border:1px solid #ddd3b9;border-radius:13px;padding:15px;background:#faf8f0}.howto h3{color:#08603d}.sampleCards{display:flex;gap:5px}.sampleCards img{width:64px;border-radius:5px}.color-choice{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.color-choice button{height:90px;border:3px solid #fff;border-radius:14px;color:#fff;font-size:22px;font-weight:900;box-shadow:0 4px 12px #0004}.color-red{background:#d72d2d}.color-blue{background:#1766c8}.color-yellow{background:#e7b51c;color:#231a00!important}.color-green{background:#1b9a53}@media(max-width:900px){.title-wrap{grid-template-columns:1fr;padding:3vh 4vw}.brand-block{display:none}.menu-board{justify-self:center}.setup-shell{height:96vh;margin:2vh auto}.setup-content{grid-template-columns:1fr}.setup-main{grid-template-columns:1fr}.setting-card:nth-child(2){grid-column:auto;grid-row:auto}.rule-panel{margin-bottom:16px}.card{width:72px;height:105px}.table{gap:28px}.cpu{width:120px}.playerZone{height:220px}.table{height:calc(100vh - 58px - 112px - 220px)}.collectionGrid{grid-template-columns:repeat(6,1fr)}}

/* v4: copy, rules, answer badge, and pointer-drag refinements */
.brand-block .title-copy{max-width:620px;line-height:1.5;text-wrap:balance;word-break:auto-phrase}
.brand-block .title-copy span{display:block;white-space:nowrap}
.menu-main b,.menu-grid b,.setting-card h3,.switch-card b,.setup-tip b,.start-big,.ghost{word-break:keep-all;line-break:strict}
.menu-main small,.menu-grid small,.setting-card p,.switch-card small,.setup-tip p{line-height:1.45;text-wrap:pretty;word-break:auto-phrase}
.play-help{font-size:13px;color:#ead99c;font-weight:700;white-space:nowrap}

#hand{padding-top:30px;overflow-y:hidden}
.card{cursor:grab;touch-action:pan-x;-webkit-user-drag:none}
.card:active{cursor:grabbing}
.card .answerBadge{right:-13px;top:-18px;width:50px;height:54px;min-width:50px;border-radius:15px 15px 20px 20px;background:linear-gradient(180deg,#fff7c8 0%,#ffd83f 58%,#f2a90d 100%);border:4px solid #111;box-shadow:0 0 0 3px #fff,0 5px 12px #0009;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:.9;color:#111;z-index:7;transform:rotate(4deg)}
.card .answerBadge small{font-size:10px;letter-spacing:.04em;font-weight:900;margin-bottom:2px}
.card .answerBadge b{font-size:31px;font-weight:1000;line-height:.9}
.card.selected .answerBadge{transform:rotate(4deg) translateY(0)}
.dragGhost{position:fixed;z-index:9999;width:92px;height:136px;pointer-events:none;filter:drop-shadow(0 12px 13px #000b);transform:rotate(4deg)}
.dragGhost img{position:absolute;inset:0;width:88px;height:128px;object-fit:fill;border-radius:7px;border:2px solid #fff}
.dragGhost b{position:absolute;right:-17px;bottom:-11px;min-width:42px;height:42px;border-radius:999px;background:#ffd63e;color:#171100;border:3px solid #fff;box-shadow:0 0 0 2px #111;display:grid;place-items:center;font-size:18px}
.discard.dragover{background:#ffe97638;box-shadow:0 0 0 5px #ffe56a,0 0 35px #ffe56a99;transform:scale(1.035)}
.discard{transition:.12s}

.calcPanel h2{font-size:31px;margin:12px 0}
.calcInputRow{display:flex;align-items:center;gap:10px}
.calcCard input{font-size:36px;width:128px;font-weight:900;border:3px solid #0d704a;border-radius:12px}
.correct-msg{font-size:24px;color:#087547}.wrong-msg{font-size:20px;color:#c52d27}
.overlay-lead{margin:-4px 0 18px;color:#5d655f}

.modal.rules-modal{width:min(1180px,96vw);max-height:94vh;padding:30px 34px 40px}
.rules-heading{margin-bottom:14px}
.rule-hero{display:grid;grid-template-columns:150px 1fr;gap:24px;align-items:center;padding:18px 22px;border-radius:18px;background:linear-gradient(135deg,#073f30,#0a6a49);color:#fff;border:3px solid #e0bd59;box-shadow:0 8px 18px #0002;margin-bottom:18px}
.rule-hero>img{width:135px;max-height:165px;object-fit:contain;filter:drop-shadow(0 8px 8px #0007)}
.rule-hero p{margin:4px 0;line-height:1.7}
.rule-catch{font-weight:900;font-size:clamp(18px,2vw,27px);color:#ffe27a;text-shadow:0 2px 0 #000}
.rule-catch span{display:block;word-break:keep-all}
.rule-section{margin-top:18px;border:1px solid #ded6c2;border-radius:16px;padding:18px;background:#fffdf8}
.rule-section>h3,.section-title-row h3{margin:0 0 13px;color:#075d3c;font-size:24px;word-break:keep-all}
.rule-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.rule-steps>div,.browser-rule-grid>div,.extra-rule-grid>div{border-radius:12px;background:#f6f3e8;border:1px solid #ddd3b7;padding:13px 14px}
.rule-steps>div:last-child{grid-column:1/-1}
.rule-steps b,.browser-rule-grid b,.extra-rule-grid b{font-size:17px;color:#17382b}
.rule-steps p,.browser-rule-grid p,.extra-rule-grid p,.special-card-guide p,.finish-guide p{line-height:1.65;margin:6px 0 0;word-break:auto-phrase;text-wrap:pretty}
.browser-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.section-title-row{display:flex;align-items:baseline;justify-content:space-between;gap:20px;border-bottom:2px solid #e3d6b0;margin-bottom:14px}
.section-title-row span{font-size:13px;color:#776b51;font-weight:700;white-space:nowrap}
.special-guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.special-card-guide{display:grid;grid-template-columns:82px 1fr;gap:11px;align-items:center;padding:10px;border:1px solid #ded6c4;border-radius:13px;background:#faf8f1;min-height:142px}
.special-card-guide img{width:78px;height:114px;object-fit:fill;border-radius:6px;box-shadow:0 4px 9px #0003}
.special-name{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.special-name b{font-size:15px;line-height:1.3;color:#102f25;word-break:keep-all}
.special-name span{font-size:11px;white-space:nowrap;padding:3px 6px;border-radius:999px;background:#0a6242;color:#fff;font-weight:800}
.special-card-guide p{font-size:13px;color:#4f5551}
.extra-rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.finish-guide p{font-size:16px}

@media(max-width:1100px){
  .special-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .brand-block .title-copy span{white-space:normal}
}
@media(max-width:900px){
  .play-help{display:none}
  .modal.rules-modal{padding:24px 18px 30px}
  .rule-hero{grid-template-columns:100px 1fr}.rule-hero>img{width:94px}
  .rule-steps,.browser-rule-grid,.extra-rule-grid{grid-template-columns:1fr}
  .rule-steps>div:last-child{grid-column:auto}
  .special-guide-grid{grid-template-columns:1fr}
  .section-title-row{align-items:flex-start;flex-direction:column;gap:2px}
}

/* v5: play readability, wild-card selector, and robust layout */
.wild-setting-card{grid-column:1/-1;padding-bottom:16px}
.wild-setting-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.wild-setting-head h3{margin-bottom:4px}
.wild-setting-head p{margin-bottom:10px}
.wild-count{flex:0 0 auto;border-radius:999px;background:#0c6846;color:#fff;padding:7px 12px;font-size:13px;font-weight:900;white-space:nowrap}
.wild-group-label{font-size:12px;font-weight:900;color:#6b5a25;letter-spacing:.08em;margin:8px 0 7px;padding-top:4px;border-top:1px solid #e6ddc3}
.wild-group-label.extra{color:#9a421e}
.wild-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.wild-choice{position:relative;display:grid;grid-template-columns:50px 1fr;gap:9px;align-items:center;border:2px solid #ddd4bf;background:#f9f6ec;border-radius:12px;padding:7px 9px;cursor:pointer;min-height:72px}
.wild-choice:hover{border-color:#9b884f}
.wild-choice input{position:absolute;right:8px;top:8px;width:18px;height:18px;accent-color:#0b7850}
.wild-choice img{width:44px;height:64px;object-fit:fill;border-radius:4px;box-shadow:0 3px 7px #0003}
.wild-choice span{padding-right:20px;min-width:0}
.wild-choice b,.wild-choice small{display:block;word-break:keep-all;line-height:1.25}
.wild-choice b{font-size:13px;color:#123a2a}.wild-choice small{font-size:11px;color:#776d58;margin-top:3px}
.wild-choice:has(input:checked){border-color:#16855a;background:#e9f7ef;box-shadow:inset 0 0 0 1px #85c9a9}
.extra-grid .wild-choice:has(input:checked){border-color:#c66f25;background:#fff2e5}

.gameHeader{height:62px;display:grid;grid-template-columns:120px 1fr 120px;align-items:center;padding:8px 16px;gap:12px;background:linear-gradient(180deg,#082f25,#061f19);border-bottom:2px solid #d3b762}
.gameHeader #turnText{text-align:center;font-size:26px;font-weight:950;margin:0;white-space:nowrap;color:#fff6d3;text-shadow:0 2px 5px #000}
#statusPills{display:none}
#cpuArea{height:108px;gap:16px;padding:8px 12px}
.table{height:calc(100vh - 62px - 108px - 252px);min-height:270px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;align-items:center;justify-items:center;gap:5px;padding:8px 14px 9px;overflow:hidden}
.state-stage{display:flex;align-items:stretch;justify-content:center;gap:12px;width:min(680px,92vw);z-index:3}
.state-card{min-width:180px;border:3px solid #fff;border-radius:18px;padding:7px 18px 8px;text-align:center;box-shadow:0 0 0 3px #17130d,0 9px 18px #0007;background:#171c18;transition:.2s}
.state-card small{display:block;font-size:11px;font-weight:900;letter-spacing:.12em;opacity:.9;line-height:1.15}
.state-card strong{display:block;margin-top:2px;font-size:clamp(24px,2.4vw,34px);line-height:1.05;word-break:keep-all;text-shadow:0 2px 4px #0008}
.color-state.state-red{background:linear-gradient(180deg,#f7443e,#a90c0c)}
.color-state.state-blue{background:linear-gradient(180deg,#318ce8,#0b3e97)}
.color-state.state-yellow{background:linear-gradient(180deg,#ffdd45,#d89400);color:#221700}.color-state.state-yellow strong{text-shadow:none}
.color-state.state-green{background:linear-gradient(180deg,#39b96d,#08713b)}
.effect-state.active{background:linear-gradient(180deg,#ffda50,#e8750b);color:#1d1200;animation:statePulse .9s ease-in-out 1}.effect-state.active strong{text-shadow:none}
@keyframes statePulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
.table-core{display:flex;align-items:center;justify-content:center;gap:72px;min-height:0;width:100%}
.pile{width:150px;height:auto;display:flex;flex-direction:column;align-items:center;gap:8px;position:relative}
.pile-card-wrap{position:relative;width:140px;height:182px;display:grid;place-items:center}
.pile-card-wrap img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 8px #0008)}
.pile span#deckCount{position:absolute;right:-6px;top:-6px;background:#111;border:2px solid #fff;border-radius:999px;min-width:34px;height:34px;padding:0 7px;display:grid;place-items:center;font-weight:900;z-index:3}
.pile button{position:static;transform:none;width:132px;min-height:40px;border:3px solid #fff;border-radius:13px;padding:8px 10px;background:linear-gradient(#ffe578,#f2b51c);color:#201500;font-size:16px;font-weight:950;box-shadow:0 0 0 2px #38280a,0 5px 11px #0006;white-space:nowrap;z-index:4}
.pile button:disabled{filter:grayscale(.75);opacity:.55;cursor:not-allowed}
.discard{width:146px;height:212px;position:relative;border:4px dashed #f6db7f;border-radius:16px;display:grid;place-items:center;transition:.15s;overflow:visible}
.discard img{width:100%;height:100%;object-fit:fill;position:absolute;inset:0;border-radius:11px;z-index:2}
.dropHint{z-index:1;font-size:16px;opacity:.72;text-align:center;padding:8px}
.jump{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:9;display:flex;align-items:baseline;gap:10px;padding:15px 28px;border:5px solid #fff;border-radius:28px;background:linear-gradient(180deg,#ff3b2f,#b40606);box-shadow:0 0 0 4px #211,0 15px 40px #000b;pointer-events:none;animation:jumpPop .28s ease-out}
.jump span{font-size:25px;font-weight:1000}.jump b{font-size:56px;line-height:.9;color:#ffe75e;text-shadow:0 4px 0 #521}.jump small{font-size:18px;font-weight:900}
@keyframes jumpPop{from{transform:translate(-50%,-50%) scale(.7);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}
.game-message{min-height:34px;max-width:min(760px,90vw);padding:7px 16px;border:1px solid #d6bd70;border-radius:999px;background:#001b15e8;text-align:center;font-size:14px;line-height:1.35;z-index:3;white-space:normal;word-break:auto-phrase}
.effect-burst{position:absolute;inset:0;z-index:12;display:grid;place-items:center;background:radial-gradient(circle,rgba(255,222,78,.18),rgba(0,0,0,0) 58%);pointer-events:none}
.effect-burst>div{min-width:330px;max-width:80vw;padding:20px 34px;text-align:center;background:linear-gradient(135deg,#ffdd47,#f27a0c);color:#161007;border:6px solid #fff;border-radius:26px;box-shadow:0 0 0 5px #17110a,0 22px 60px #000c;animation:burstIn .26s ease-out}
.effect-burst small,.effect-burst strong,.effect-burst span{display:block}.effect-burst small{font-size:15px;font-weight:900;letter-spacing:.08em}.effect-burst strong{font-size:clamp(34px,4.5vw,64px);line-height:1;margin:4px 0;word-break:keep-all}.effect-burst span{font-size:17px;font-weight:900}
@keyframes burstIn{0%{transform:scale(.55) rotate(-3deg);opacity:0}75%{transform:scale(1.07) rotate(1deg)}100%{transform:scale(1);opacity:1}}
.playerZone{height:252px;padding:8px 12px 7px}.toolbar{height:42px;min-height:42px;gap:9px}.toolbar button{white-space:nowrap}.toolbar #selectionInfo{white-space:nowrap}.play-help{min-width:0;overflow:hidden;text-overflow:ellipsis}
#hand{height:194px;padding-top:31px;overflow-x:auto;overflow-y:hidden}
.card{width:90px;height:131px;cursor:grab;touch-action:pan-x;-webkit-user-drag:none}
.card[draggable="true"]{cursor:grab}.card.dragging{opacity:.48}.card:active{cursor:grabbing}
.card .answerBadge{right:-15px;top:-22px;width:58px;height:62px;min-width:58px;border-radius:17px 17px 22px 22px;border:4px solid #111;box-shadow:0 0 0 4px #fff,0 7px 15px #000b;transform:rotate(4deg)}
.card .answerBadge small{font-size:11px;margin-bottom:1px}.card .answerBadge b{font-size:37px;line-height:.86}

.modal.rules-modal{width:min(1160px,96vw);padding:28px 30px 38px}
.rule-hero{grid-template-columns:132px minmax(0,1fr);gap:22px;align-items:center}.rule-hero>img{width:118px;max-height:145px}.rule-hero>div{min-width:0}.rule-catch{font-size:clamp(18px,1.8vw,25px);line-height:1.45}.rule-catch span{display:block;white-space:normal;text-wrap:balance}.rule-hero p:not(.rule-catch){font-size:14px}
.special-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.special-card-guide{grid-template-columns:88px minmax(0,1fr);min-height:154px;align-items:start}.special-card-guide img{width:82px;height:120px}.special-card-guide>div{min-width:0}.special-card-guide p{font-size:13px;line-height:1.65;overflow-wrap:anywhere}.special-name{align-items:center}.special-name b{font-size:15px;white-space:normal;word-break:keep-all}.special-name span{flex:0 0 auto}

@media(max-width:980px){
 .wild-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .state-stage{gap:8px}.state-card{min-width:150px;padding-inline:12px}
 .table-core{gap:40px}.pile-card-wrap{width:125px;height:163px}.discard{width:132px;height:192px}
 .card{width:76px;height:111px}.card .answerBadge{width:52px;height:56px;min-width:52px}.card .answerBadge b{font-size:32px}
}
@media(max-width:760px){
 .gameHeader{grid-template-columns:90px 1fr 90px}.gameHeader #turnText{font-size:21px}
 .wild-choice-grid{grid-template-columns:1fr 1fr}.wild-setting-head{flex-direction:column;gap:3px}
 .state-card{min-width:130px}.state-card strong{font-size:22px}
 .special-guide-grid{grid-template-columns:1fr}
}
.brand-block .title-copy span{white-space:normal!important}
.brand-block .title-copy{max-width:min(560px,70%);line-height:1.55}
@media(max-width:1100px){.brand-block .title-copy{max-width:100%}}

/* v6: table-around layout, clear turn/effect/UNO presentation */
.gameHeader{height:52px;grid-template-columns:110px 1fr 110px;padding:6px 14px;z-index:30;position:relative}
.gameMiniTitle{text-align:center;font-weight:950;font-size:18px;letter-spacing:.04em;color:#ffe6a0;text-shadow:0 2px 5px #000}
.gameArena{height:calc(100vh - 52px - 232px);min-height:430px;position:relative;overflow:hidden;background:radial-gradient(ellipse at center,#188458 0,#075d38 52%,#043f2b 100%);border-bottom:3px solid #d7bb6e}

.cpu-ring{position:absolute;inset:0;z-index:4;pointer-events:none}
.cpu{position:absolute;width:150px;height:88px;background:linear-gradient(180deg,#07392c,#04261e);border:2px solid #d6bc70;border-radius:15px;padding:8px 8px 6px;text-align:center;box-shadow:0 7px 16px #0006;transition:.2s;pointer-events:auto}
.cpu b{display:block;font-size:16px;line-height:1.1}.cpu .cpuCountText{font-size:14px;margin-top:2px;color:#f4edd8}.cpu .backs{display:flex;justify-content:center;margin-top:5px;height:39px;overflow:visible}.cpu .miniBack{width:27px;height:39px;border-radius:4px;margin-left:-13px;object-fit:cover;box-shadow:0 2px 4px #0007}.cpu .miniBack:first-child{margin-left:0}
.cpu.turn{box-shadow:0 0 0 4px #ffdb4c,0 0 28px #ffcf3d,0 10px 20px #0008;transform:scale(1.045)}
.cpu.turn:after{content:"手番";position:absolute;right:-8px;top:-10px;background:#ffd84d;color:#241700;border:2px solid #fff;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:1000;box-shadow:0 2px 6px #0007}
.cpu.uno{border-color:#ff5a32;box-shadow:0 0 0 4px #fff,0 0 0 8px #e23422,0 10px 24px #0009}
.cpuUnoMark{position:absolute;width:64px;height:64px;object-fit:contain;right:-28px;bottom:-26px;filter:drop-shadow(0 5px 6px #000a);animation:unoWiggle 1.1s ease-in-out infinite alternate}
@keyframes unoWiggle{from{transform:rotate(-8deg) scale(.96)}to{transform:rotate(8deg) scale(1.06)}}
.cpu.seat-left{left:14px;top:50%;transform:translateY(-50%)}
.cpu.seat-left.turn{transform:translateY(-50%) scale(1.045)}
.cpu.seat-right{right:14px;top:50%;transform:translateY(-50%)}
.cpu.seat-right.turn{transform:translateY(-50%) scale(1.045)}
.cpu.seat-top-center{left:50%;top:10px;transform:translateX(-50%)}
.cpu.seat-top-center.turn{transform:translateX(-50%) scale(1.045)}
.cpu.seat-top-left{left:34%;top:10px;transform:translateX(-50%)}
.cpu.seat-top-left.turn{transform:translateX(-50%) scale(1.045)}
.cpu.seat-top-right{left:66%;top:10px;transform:translateX(-50%)}
.cpu.seat-top-right.turn{transform:translateX(-50%) scale(1.045)}

.direction-layer{position:absolute;inset:0;z-index:3;pointer-events:none}
.dir-arrow{position:absolute;color:#ffe16a;font-size:34px;font-weight:1000;line-height:1;text-shadow:0 3px 5px #000,0 0 8px #a05f00;transform:rotate(calc(var(--rot) + var(--flip,0deg)));opacity:.95}
.dir-arrow.reverse{--flip:180deg}
.dir-arrow.bl{left:16%;bottom:56px}.dir-arrow.rb{right:16%;bottom:56px}
.dir-arrow.lt{left:18%;top:90px}.dir-arrow.tr{right:18%;top:90px}.dir-arrow.tt{left:50%;top:42px}
.dir-arrow.vl{left:24%;top:48%}.dir-arrow.vr{right:24%;top:48%}

.turn-banner{position:absolute;top:102px;left:50%;transform:translateX(-50%);z-index:7;min-width:260px;text-align:center;padding:8px 24px 9px;border:3px solid #d8c27a;border-radius:18px;background:linear-gradient(180deg,#103c30,#061e18);box-shadow:0 7px 18px #0008;transition:.2s;pointer-events:none}
.turn-banner small{display:block;font-size:10px;letter-spacing:.2em;color:#dccb92;font-weight:900}.turn-banner strong{display:block;font-size:26px;line-height:1.05;color:#fff7d6;font-weight:1000;text-shadow:0 2px 4px #000}
.turn-banner.human{background:linear-gradient(180deg,#ffdf5a,#f39811);border-color:#fff;color:#201400;box-shadow:0 0 0 4px #5b3c08,0 0 28px #ffd74b,0 10px 22px #0008;animation:yourTurnPulse .75s ease-in-out 2}
.turn-banner.human small,.turn-banner.human strong{color:#251700;text-shadow:none}
@keyframes yourTurnPulse{0%,100%{transform:translateX(-50%) scale(1)}50%{transform:translateX(-50%) scale(1.08)}}

.state-stage{position:absolute;top:155px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:170px minmax(300px,430px);gap:10px;width:auto;z-index:6}
.state-card{min-width:0;padding:6px 14px 7px;border-radius:15px;border-width:3px;box-shadow:0 0 0 2px #17130d,0 7px 15px #0007}
.state-card small{font-size:10px}.state-card strong{font-size:clamp(21px,2vw,29px);white-space:normal;line-height:1.08}
.effect-state strong{max-width:430px}

.table-core{position:absolute;left:50%;top:66%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;gap:78px;width:auto;z-index:5}
.pile{width:142px}.pile-card-wrap{width:130px;height:170px}.discard{width:132px;height:192px}
.game-message{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);max-width:min(620px,62vw);min-width:340px;z-index:8;font-size:14px;padding:7px 16px}

.jump{position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);z-index:15;min-width:410px;justify-content:center;box-shadow:0 0 0 5px #211,0 0 40px #ffcf2c,0 18px 45px #000d;animation:jumpPop .28s ease-out, jumpGlow 1s ease-in-out infinite alternate}
.jump span{font-size:28px}.jump b{font-size:64px}.jump small{font-size:20px}
@keyframes jumpGlow{from{filter:brightness(1)}to{filter:brightness(1.14)}}

.uno-burst{position:absolute;inset:0;z-index:18;display:grid;place-items:center;background:radial-gradient(circle,rgba(255,215,35,.28),rgba(0,0,0,0) 56%);pointer-events:none}
.uno-burst>div{display:flex;flex-direction:column;align-items:center;justify-content:center;filter:drop-shadow(0 18px 18px #000c);animation:unoBurstIn .34s cubic-bezier(.18,.89,.32,1.28)}
.uno-burst img{width:min(330px,42vw);max-height:250px;object-fit:contain}.uno-burst strong{margin-top:-20px;padding:7px 20px;border-radius:999px;background:#fff;color:#b21611;border:4px solid #111;font-size:clamp(22px,2.4vw,34px);font-weight:1000;box-shadow:0 6px 15px #0008}
@keyframes unoBurstIn{from{transform:scale(.35) rotate(-10deg);opacity:0}75%{transform:scale(1.08) rotate(3deg)}to{transform:scale(1) rotate(0);opacity:1}}

.playerZone{height:232px;background:linear-gradient(180deg,#082d23,#051f19);padding:7px 12px 8px;position:relative;z-index:20}
.toolbar{height:39px;min-height:39px}.hand-row{height:178px;display:grid;grid-template-columns:minmax(0,1fr) 154px;gap:10px;align-items:stretch}
#hand{height:178px;display:flex;align-items:end;justify-content:center;gap:6px;overflow-x:auto;overflow-y:hidden;padding:29px 4px 7px}
.player-actions{height:100%;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;gap:7px;padding:8px 4px 6px;border-left:1px solid #ffffff1b}
.player-actions .draw-action{min-height:58px;border:3px solid #fff;border-radius:15px;background:linear-gradient(#ffe578,#f2b51c);color:#201500;font-size:18px;font-weight:1000;box-shadow:0 0 0 2px #38280a,0 5px 11px #0006;white-space:nowrap}
.player-actions .draw-action:disabled{filter:grayscale(.75);opacity:.5;cursor:not-allowed}.player-actions>small{text-align:center;color:#cdbf92;font-size:10px}
.human-uno{margin-bottom:auto;display:flex;align-items:center;justify-content:center;gap:4px;padding:3px 5px;border-radius:13px;background:#49150d;border:2px solid #ffcb3f;box-shadow:0 0 16px #ff9b2c88}
.human-uno img{width:72px;height:58px;object-fit:contain}.human-uno span{font-size:13px;font-weight:1000;color:#ffe763;white-space:nowrap}

.effect-burst{z-index:17}

@media(max-width:1100px){
  .cpu{width:132px;height:82px}.cpu.seat-left{left:7px}.cpu.seat-right{right:7px}.cpu.seat-top-left{left:31%}.cpu.seat-top-right{left:69%}
  .state-stage{grid-template-columns:145px minmax(270px,370px)}.turn-banner{top:98px}.state-stage{top:148px}.table-core{gap:56px;top:67%}
  .dir-arrow{font-size:29px}.dir-arrow.bl{left:13%}.dir-arrow.rb{right:13%}
}
@media(max-width:900px){
  .gameArena{min-height:400px}.cpu{width:116px;height:76px;padding:6px}.cpu b{font-size:14px}.cpu .cpuCountText{font-size:12px}.cpu .miniBack{width:22px;height:33px}
  .turn-banner{top:91px;min-width:220px;padding:6px 16px}.turn-banner strong{font-size:22px}.state-stage{top:137px;grid-template-columns:125px minmax(240px,330px)}.state-card strong{font-size:19px}.table-core{top:68%;gap:42px}.pile-card-wrap{width:112px;height:146px}.discard{width:114px;height:166px}
  .game-message{min-width:280px;max-width:60vw;font-size:12px}.hand-row{grid-template-columns:minmax(0,1fr) 132px}.player-actions .draw-action{font-size:15px}.human-uno img{width:58px;height:48px}.human-uno span{display:none}
  .dir-arrow{font-size:25px}
}
#cpuArea.cpu-ring{position:absolute;inset:0;width:auto;height:auto;display:block;background:transparent;padding:0;gap:0;z-index:4;pointer-events:none}


/* v7: clear center table, larger discard, non-overlapping notifications */
.gameHeader{height:52px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:6px 14px}
.header-left{display:flex;align-items:center;gap:8px;justify-self:start}.gameHeader>#retire{justify-self:end}.gameHeader button{white-space:nowrap}
.gameMiniTitle{font-size:19px}

/* Title copy gets its own readable panel, away from the deck illustration. */
.brand-block{z-index:2}.brand-block h1,.brand-block .eyebrow,.brand-block .title-copy{position:relative;z-index:3}
.brand-block .title-copy{max-width:min(620px,58%);padding:12px 16px;border:1px solid #d9bb63;border-radius:14px;background:rgba(2,31,23,.84);box-shadow:0 8px 22px #0007;margin-top:14px}
.deck-float{right:-1vw;bottom:-2vh;width:min(22vw,310px);z-index:1;opacity:.98}

.gameArena{height:calc(100vh - 52px - 232px);min-height:430px}

/* Keep the middle of the table for the cards themselves. */
.table-core{top:51%;gap:76px;z-index:5}
.pile{width:150px}.pile-card-wrap{width:138px;height:180px}
.discard{width:170px;height:247px;border-width:4px;border-radius:18px}
.discard img{border-radius:13px}
.dropHint{font-size:15px}

/* Current colour / restriction sit beside the cards instead of above them. */
.state-stage{position:absolute;inset:0;transform:none;display:block;width:auto;z-index:6;pointer-events:none}
.state-card{position:absolute;top:48%;transform:translateY(-50%);padding:7px 12px 8px}
#colorState{left:22%;width:145px;min-width:145px}
#effectState{right:20%;width:235px;min-width:200px}
.state-card small{font-size:10px}.state-card strong{font-size:clamp(20px,1.8vw,27px)}
.effect-state strong{max-width:none}

/* Turn notice belongs near the player's hand, not over the table card. */
.turn-banner{top:auto;bottom:12px;min-width:260px;padding:7px 20px 8px;z-index:11}
.turn-banner strong{font-size:25px}

/* Routine instructions beneath the deck are removed. Only short alerts appear as a toast. */
.game-message{position:absolute;left:50%;bottom:62px;transform:translateX(-50%);min-width:0;max-width:min(520px,48vw);padding:7px 14px;border-radius:12px;z-index:14;font-size:13px;opacity:0;pointer-events:none;transition:.18s}
.game-message.show{opacity:1}

/* Jump-in timer is highly visible but does not cover the discard pile. */
.jump{left:auto;right:18px;top:auto;bottom:14px;transform:none;z-index:15;min-width:260px;max-width:310px;padding:10px 15px;border-width:4px;border-radius:18px;gap:7px;justify-content:center;animation:jumpGlow 1s ease-in-out infinite alternate}
.jump span{font-size:18px}.jump b{font-size:42px}.jump small{font-size:15px}

/* Special-effect notice is a compact event banner in the lower-left corner. */
.effect-burst{position:absolute;inset:auto auto 14px 18px;z-index:16;display:block;background:none;pointer-events:none}
.effect-burst>div{min-width:230px;max-width:330px;padding:10px 15px;border:4px solid #fff;border-radius:18px;text-align:left;box-shadow:0 0 0 3px #17110a,0 12px 28px #000b;animation:burstIn .22s ease-out}
.effect-burst small{font-size:11px}.effect-burst strong{font-size:clamp(22px,2.3vw,31px);line-height:1}.effect-burst span{font-size:12px;margin-top:3px}

/* UNO is intentionally the only full-center celebration. */
.uno-burst{z-index:19}.uno-burst img{width:min(360px,44vw);max-height:270px}.uno-burst strong{font-size:clamp(24px,2.6vw,36px)}

@media(max-width:1100px){
  #colorState{left:18%;width:125px;min-width:125px}#effectState{right:16%;width:205px;min-width:180px}
  .table-core{top:52%;gap:54px}.discard{width:154px;height:224px}.pile-card-wrap{width:122px;height:159px}
  .jump{right:10px;bottom:10px;min-width:225px}.effect-burst{left:10px;bottom:10px}
  .brand-block .title-copy{max-width:62%}
}
@media(max-width:900px){
  .header-left{gap:4px}.gameHeader button{padding:7px 9px}.gameMiniTitle{font-size:16px}
  #colorState{left:16%;width:112px;min-width:112px}#effectState{right:13%;width:185px;min-width:165px}
  .state-card strong{font-size:18px}.table-core{top:53%;gap:38px}.discard{width:142px;height:207px}.pile-card-wrap{width:110px;height:143px}
  .turn-banner{bottom:8px;min-width:220px}.turn-banner strong{font-size:21px}
  .jump{right:7px;bottom:7px;min-width:200px}.jump span{font-size:15px}.jump b{font-size:34px}
  .effect-burst{left:7px;bottom:7px}.effect-burst>div{min-width:190px;max-width:250px}
  .brand-block .title-copy{max-width:100%}.deck-float{opacity:.78;width:min(24vw,250px)}
}

/* v8: keep the table center free; clearer title copy and quick rules access */
.title-wrap{grid-template-columns:minmax(0,1.18fr) minmax(390px,.82fr);gap:2.2vw;padding:4vh 4.5vw}
.brand-block{min-height:60vh;padding:3vh 1.5vw 2vh;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.brand-block h1{margin:16px 0 10px;max-width:720px}
.brand-block .title-copy{position:relative;z-index:5;width:min(720px,100%);max-width:none;margin:12px 0 0;padding:14px 18px;background:rgba(2,31,23,.9);overflow:visible}
.brand-block .title-copy span{display:block;white-space:nowrap;word-break:normal;font-size:clamp(15px,1.45vw,22px);line-height:1.55}
.deck-float{right:-.5vw;bottom:-3vh;width:min(20vw,285px);z-index:2;opacity:.92}

.gameHeader{grid-template-columns:minmax(300px,1fr) auto minmax(130px,1fr)}
.header-left{gap:7px;flex-wrap:nowrap}.gameHeader button{padding:8px 12px}

/* The two persistent state indicators live in the upper corners, never over the discard. */
.state-stage{position:absolute;inset:0;transform:none;display:block;width:auto;z-index:7;pointer-events:none}
.state-card{top:14px;transform:none;min-height:64px;padding:6px 12px 7px;border-width:3px}
#colorState{left:16px;width:142px;min-width:142px}
#effectState{right:16px;width:245px;min-width:210px}
.state-card small{font-size:10px}.state-card strong{font-size:clamp(20px,1.7vw,27px);line-height:1.08}

/* Main play area belongs to the cards. */
.table-core{top:53%;gap:92px;z-index:5}
.pile-card-wrap{width:148px;height:193px}
.discard{width:188px;height:273px;border-width:4px}
.discard img{border-radius:14px}

/* Turn indicator sits immediately above the player's hand. */
.turn-banner{bottom:10px;top:auto;min-width:255px;z-index:12;padding:7px 20px}
.turn-banner strong{font-size:24px}

/* Non-UNO event feedback is peripheral, never centered over the discard. */
.jump{left:auto;right:18px;top:92px;bottom:auto;transform:none;z-index:15;min-width:250px;max-width:300px;padding:9px 14px;border-width:4px;border-radius:18px}
.jump span{font-size:17px}.jump b{font-size:40px}.jump small{font-size:14px}
.effect-burst{inset:auto auto auto 18px;top:92px;z-index:16;display:block;background:none}
.effect-burst>div{min-width:220px;max-width:300px;padding:9px 14px;border-width:4px;border-radius:17px;text-align:left}
.effect-burst strong{font-size:clamp(21px,2vw,29px)}
.game-message{bottom:54px;max-width:min(440px,42vw);font-size:12px;padding:6px 12px}

/* Full-center celebration is reserved for UNO only. */
.uno-burst{z-index:19}.uno-burst img{width:min(370px,45vw);max-height:275px}

@media(max-width:1100px){
  .brand-block .title-copy{width:min(620px,100%)}
  .brand-block .title-copy span{font-size:clamp(14px,1.35vw,19px)}
  .deck-float{width:min(18vw,240px)}
  #colorState{left:10px;width:122px;min-width:122px}#effectState{right:10px;width:210px;min-width:185px}
  .table-core{gap:66px}.pile-card-wrap{width:132px;height:172px}.discard{width:170px;height:247px}
  .jump{right:10px;top:88px;min-width:220px}.effect-burst{left:10px;top:88px}
}
@media(max-width:900px){
  .gameHeader{grid-template-columns:minmax(265px,1fr) auto 92px}.gameHeader button{padding:7px 8px;font-size:12px}.gameMiniTitle{font-size:15px}
  .brand-block .title-copy span{white-space:normal}
  #colorState{left:7px;width:108px;min-width:108px}#effectState{right:7px;width:174px;min-width:160px}
  .state-card strong{font-size:17px}.table-core{gap:44px}.pile-card-wrap{width:116px;height:151px}.discard{width:150px;height:218px}
  .jump{right:7px;top:82px;min-width:190px}.effect-burst{left:7px;top:82px}.effect-burst>div{min-width:175px;max-width:225px}
}
.quick-special{margin-top:0}.quick-special .special-guide-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1050px){.quick-special .special-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v9: title deck visibility, clearer opponents, toggle guides, and result presentation */
.brand-block .title-copy{width:max-content;max-width:100%;padding:12px 16px;margin-top:12px}
.brand-block .title-copy span{white-space:nowrap}
.deck-float{right:2vw;bottom:-3vh;width:min(22vw,315px);opacity:1}
.cpu .cpuCountText{font-size:18px;font-weight:900;line-height:1.15;margin-top:3px;color:#fff4cf;text-shadow:0 2px 4px #000}

.result-modal{width:min(820px,94vw);max-height:92vh;padding:0;overflow:auto;border:4px solid #e3bd45;background:linear-gradient(180deg,#fff9e5,#f7efe0);box-shadow:0 0 0 5px #201507,0 30px 90px #000d}
.result-hero{position:relative;overflow:hidden;text-align:center;padding:28px 24px 20px;color:#fff;background:linear-gradient(145deg,#064b34,#0e8055);border-bottom:4px solid #d9ae34}
.result-hero.win{background:radial-gradient(circle at 50% 20%,#ffdf61 0,#e79211 34%,#8b3f05 78%,#3a1700 100%)}
.result-hero.lose{background:radial-gradient(circle at 50% 20%,#3b7b8f,#17475d 48%,#0d2837)}
.result-rays{position:absolute;inset:-70%;background:repeating-conic-gradient(from 0deg,transparent 0 8deg,#ffffff18 8deg 14deg);animation:resultSpin 18s linear infinite;pointer-events:none}
.result-hero>*:not(.result-rays){position:relative;z-index:1}.result-crown{font-size:54px;font-weight:950;line-height:1}.result-hero small{display:block;letter-spacing:.22em;font-weight:900;margin-top:5px}.result-hero h2{font-size:clamp(30px,4vw,52px);line-height:1.08;margin:8px 0 5px;text-shadow:0 4px 0 #0005}.result-hero p{margin:0 auto 12px;font-weight:800;max-width:620px}.human-place{display:inline-flex;gap:10px;align-items:center;padding:8px 16px;border-radius:999px;background:#071e17bb;border:2px solid #ffe277;font-weight:800}.human-place b{font-size:24px;color:#ffe267}
.result-board{padding:20px 24px 12px}.result-board h3{text-align:center;color:#075e3d;margin:0 0 12px;font-size:21px}.result-list{display:grid;gap:8px}.result-row{display:grid;grid-template-columns:44px 58px 1fr auto;align-items:center;gap:8px;padding:10px 14px;border:2px solid #dfd3b5;border-radius:13px;background:#fff;color:#20251f}.result-row.you{border-color:#dfa913;background:#fff5c9;box-shadow:0 0 0 2px #f3ca4b55}.result-row.winner{background:linear-gradient(90deg,#fff1a3,#fffdf1);border-color:#d89c15}.result-medal{font-size:25px;text-align:center}.result-place{font-size:20px;color:#8d5d09}.result-row strong{font-size:18px}.result-hand{font-weight:900;color:#0a6743;background:#e5f5eb;padding:5px 9px;border-radius:999px}
.result-actions{display:flex;justify-content:center;gap:12px;padding:12px 24px 24px}.result-actions button{min-width:170px;font-size:17px}.result-secondary{border:2px solid #98752a;border-radius:12px;background:#fff;color:#4d3a12;padding:12px 22px;font-weight:900}
@keyframes resultSpin{to{transform:rotate(360deg)}}
@media(max-width:1050px){.cpu .cpuCountText{font-size:16px}.deck-float{right:1vw;width:min(20vw,275px)}}
@media(max-width:900px){.brand-block .title-copy{width:100%}.brand-block .title-copy span{white-space:normal}.cpu .cpuCountText{font-size:15px}.result-row{grid-template-columns:36px 50px 1fr auto;padding:9px}.result-row strong{font-size:16px}}

/* v10: table-first layout, start roulette, targeted player feedback, tablet-safe spacing */
.brand-block{overflow:visible}
.deck-float{right:auto;left:56%;bottom:-2vh;width:min(23vw,330px);transform:translateX(-8%) rotate(3deg);z-index:4}
.brand-block .title-copy{z-index:6}

/* Keep the upper CPU seats away from the enlarged discard pile. */
.cpu.seat-top-left{left:27%;top:8px}
.cpu.seat-top-right{left:73%;top:8px}
.cpu.seat-top-center{top:8px}

/* The table centre is reserved for deck and discard. Persistent states sit beside them. */
.state-stage{position:absolute;inset:0;display:block;transform:none;width:auto;z-index:8;pointer-events:none}
.state-card{position:absolute;top:50%;transform:translateY(-50%);min-height:62px;padding:7px 12px 8px;border-width:3px;box-shadow:0 0 0 2px #17130d,0 8px 18px #0008}
#effectState{left:calc(50% - 415px);width:225px;min-width:195px}
#colorState{left:calc(50% + 255px);width:160px;min-width:145px}
#colorState strong{font-size:29px}
#effectState strong{font-size:20px;line-height:1.18}

.table-core{top:58%;gap:96px}
.pile-card-wrap{width:148px;height:193px}
.discard{width:190px;height:276px}

/* Turn notice stays by the player's area, but does not occupy the card table. */
.turn-banner{top:auto;bottom:10px;min-width:250px;z-index:12}

/* Jump-in and general event notices stay in the edge lanes, not over the discard card. */
.jump{left:auto;right:18px;top:92px;bottom:auto;transform:none;min-width:245px;max-width:290px;padding:9px 14px;border-radius:18px}
.jump span{font-size:17px}.jump b{font-size:40px}.jump small{font-size:14px}
.effect-burst{inset:auto auto auto 18px;top:92px;display:block;background:none}
.effect-burst>div{min-width:220px;max-width:300px;padding:9px 14px;border-width:4px;border-radius:17px;text-align:left}
.effect-burst strong{font-size:clamp(21px,2vw,29px)}

/* Feedback specifically aimed at the human appears above the hand. */
.playerZone{position:relative}
.human-effect{position:absolute;left:50%;top:46px;transform:translateX(-50%);z-index:40;min-width:330px;max-width:70vw;padding:11px 24px 12px;border:4px solid #fff;border-radius:18px;background:linear-gradient(180deg,#ffcf42,#ef7b0c);color:#241500;text-align:center;box-shadow:0 0 0 4px #281a06,0 12px 30px #000b;pointer-events:none;animation:humanEffectIn .22s ease-out}
.human-effect.negative{background:linear-gradient(180deg,#ff4b3e,#b60707);color:#fff}
.human-effect.info{background:linear-gradient(180deg,#66d8ff,#147ac0);color:#fff}
.human-effect strong{display:block;font-size:30px;line-height:1;font-weight:1000}
.human-effect span{display:block;margin-top:4px;font-size:14px;font-weight:900}
@keyframes humanEffectIn{from{transform:translate(-50%,10px) scale(.75);opacity:0}to{transform:translate(-50%,0) scale(1);opacity:1}}
.human-condition{margin-left:auto;padding:5px 10px;border:2px solid #ffd85c;border-radius:999px;background:#6b220d;color:#fff7cd;font-size:12px;font-weight:950;white-space:nowrap;box-shadow:0 0 12px #ffae2b66}
.toolbar #selectionInfo{margin-left:0}

/* Start-player roulette: independent of the game rules so it can later be reused online. */
.start-roulette{position:absolute;inset:0;z-index:60;display:grid;place-items:center;background:rgba(1,24,18,.66);backdrop-filter:blur(2px)}
.roulette-panel{width:min(520px,72vw);padding:24px 26px 28px;border:4px solid #ffe274;border-radius:28px;background:linear-gradient(180deg,#093f31,#041e18);text-align:center;box-shadow:0 0 0 5px #1c1304,0 24px 70px #000d}
.roulette-panel>small{letter-spacing:.2em;color:#ffe69a;font-weight:950}.roulette-panel h2{margin:7px 0 15px;font-size:28px}
.roulette-wheel{height:124px;position:relative;display:grid;place-items:center;border-radius:22px;background:radial-gradient(circle,#fff3a7,#f5b91e 62%,#9c5a07);color:#241600;overflow:hidden}
.roulette-wheel:before{content:"";position:absolute;inset:-60%;background:repeating-conic-gradient(#ffffff55 0 8deg,transparent 8deg 18deg);animation:rouletteSpin .8s linear infinite}
.roulette-wheel>*{position:relative;z-index:1}.roulette-arrow{position:absolute;left:24px;font-size:58px;font-weight:1000;color:#195b41;text-shadow:0 3px 0 #fff}.roulette-wheel strong{font-size:38px;font-weight:1000;text-shadow:0 2px 0 #fff}
@keyframes rouletteSpin{to{transform:rotate(360deg)}}
.start-roulette.done .roulette-wheel{animation:rouletteWin .42s ease-out 2 alternate}
@keyframes rouletteWin{to{transform:scale(1.07);box-shadow:0 0 30px #ffe25c}}

/* Tablet landscape: preserve the same composition, only reduce scale and spacing. */
@media(max-width:1180px){
  .cpu.seat-top-left{left:25%}.cpu.seat-top-right{left:75%}
  #effectState{left:calc(50% - 350px);width:190px;min-width:180px}
  #colorState{left:calc(50% + 215px);width:145px;min-width:135px}
  .table-core{top:59%;gap:64px}.pile-card-wrap{width:132px;height:172px}.discard{width:168px;height:244px}
  .human-effect{top:44px;min-width:300px}.human-effect strong{font-size:27px}
  .deck-float{left:58%;width:min(22vw,270px)}
}
@media(max-width:1024px){
  .cpu.seat-top-left{left:23%}.cpu.seat-top-right{left:77%}
  .cpu{width:118px;height:76px}.cpu .miniBack{width:22px;height:32px}.cpu .cpuCountText{font-size:14px}
  #effectState{left:8px;top:58%;transform:none;width:170px;min-width:160px}
  #colorState{left:auto;right:8px;top:58%;transform:none;width:135px;min-width:125px}
  .table-core{top:60%;gap:42px}.pile-card-wrap{width:112px;height:146px}.discard{width:145px;height:211px}
  .dir-arrow{font-size:25px}.turn-banner{bottom:6px;min-width:210px}.turn-banner strong{font-size:21px}
  .jump{right:7px;top:80px;min-width:190px}.effect-burst{left:7px;top:80px}.effect-burst>div{min-width:175px;max-width:225px}
  .human-effect{top:42px;min-width:270px;max-width:62vw;padding:9px 16px}.human-effect strong{font-size:24px}.human-effect span{font-size:12px}
  .deck-float{left:61%;width:min(21vw,230px)}
}
@media(max-height:700px) and (orientation:landscape){
  .gameHeader{height:46px}.gameArena{height:calc(100vh - 46px - 210px);min-height:340px}.playerZone{height:210px}.hand-row,#hand{height:158px}.card{width:78px;height:113px}
  .cpu{top:5px}.table-core{top:61%}.discard{width:136px;height:198px}.pile-card-wrap{width:104px;height:136px}
  .turn-banner{bottom:3px;padding:5px 15px}.turn-banner strong{font-size:19px}
  .state-card{min-height:52px}.state-card strong{font-size:17px}.human-effect{top:39px}
}
@media(max-width:1024px){
  #effectState{left:calc(50% - 320px);top:57%;transform:translateY(-50%);width:170px;min-width:160px}
  #colorState{left:calc(50% + 190px);right:auto;top:57%;transform:translateY(-50%);width:135px;min-width:125px}
}

/* v11 adjustments */
.deck-float{right:-3vw!important;bottom:0!important;width:min(21.5vw,330px)!important}
.result-screen{position:relative;background:radial-gradient(circle at 50% 18%,#0d7651 0,#06452f 42%,#021f18 100%);overflow:auto;padding:24px}
.result-screen.active{display:grid!important;place-items:center}
.result-page-shell{width:min(900px,96vw);margin:auto;border:4px solid #e3bd45;border-radius:26px;overflow:hidden;background:linear-gradient(180deg,#fff9e5,#f7efe0);box-shadow:0 0 0 6px #201507,0 30px 90px #000d}
.result-page-shell .result-board{max-height:42vh;overflow:auto}
.result-page-shell .result-actions{position:sticky;bottom:0;background:#fff7e3;border-top:1px solid #e0cf9d;padding:16px 24px 22px;z-index:2}
.result-page-shell .result-actions button{min-width:220px}
.result-page-shell .result-same{background:linear-gradient(#ffd84f,#f19b10);border:0;border-radius:12px;padding:13px 22px;font-weight:950;color:#241400;box-shadow:0 5px 0 #94520b}
.result-page-shell .result-title-btn{border:2px solid #98752a;border-radius:12px;background:#fff;color:#4d3a12;padding:13px 22px;font-weight:900}
@media(max-width:1180px){.deck-float{right:-1.5vw!important;width:min(22vw,300px)!important}}
@media(max-width:900px){.deck-float{display:none!important}.result-screen{padding:12px}.result-page-shell{width:98vw}}
/* v11 title composition: move the deck away from subtitle and toward center */
.deck-float{right:-9vw!important;left:auto!important;width:min(21.5vw,330px)!important;bottom:0!important;transform:rotate(3deg)!important}
@media(max-width:1180px){.deck-float{right:-5vw!important;width:min(22vw,290px)!important}}


/* v12: center title deck, show active-rule cards, touch-friendly calculation keypad */
.deck-float{
  left:67%!important;
  right:auto!important;
  bottom:-1vh!important;
  width:min(21.5vw,330px)!important;
  transform:translateX(-25%) rotate(3deg)!important;
}
.effect-state{overflow:visible}
.effect-state-cards{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  gap:5px;
  margin-top:7px;
  min-height:54px;
}
.effect-state-cards img{
  width:38px;
  height:55px;
  object-fit:fill;
  border-radius:5px;
  border:2px solid #fff8d2;
  box-shadow:0 3px 8px #0009;
  background:#111;
}
.effect-state.active{padding-bottom:7px}
.calcCard{align-items:center}
.calcPanel{min-width:0}
.calcInputRow input{
  text-align:center;
  font-size:34px;
  font-weight:950;
  width:110px;
  caret-color:transparent;
}
.calcKeypad{
  display:grid;
  grid-template-columns:repeat(5,minmax(52px,1fr));
  gap:9px;
  margin-top:15px;
  max-width:470px;
}
.numKey{
  min-height:58px;
  border:2px solid #c99723;
  border-radius:13px;
  background:linear-gradient(#fff7d6,#ffe58b);
  color:#201500;
  font-size:27px;
  font-weight:950;
  box-shadow:0 4px 0 #a66c08;
}
.numKey:hover,.numKey.active{
  transform:translateY(-1px);
  background:linear-gradient(#ffe46b,#f5ae16);
  box-shadow:0 5px 0 #8b4e05,0 0 0 3px #ffca3155;
}
.numKey:active{transform:translateY(3px);box-shadow:0 1px 0 #8b4e05}
@media(max-width:1180px){
  .deck-float{left:66%!important;width:min(21vw,285px)!important}
  .effect-state-cards img{width:34px;height:49px}
}
@media(max-width:1024px){
  .effect-state-cards{margin-top:5px;min-height:45px}
  .effect-state-cards img{width:30px;height:44px}
  .calcKeypad{grid-template-columns:repeat(5,minmax(46px,1fr));gap:7px}
  .numKey{min-height:52px;font-size:24px}
}


/* v13: title separation, active-rule card memory aid, and finished-player presentation */
/* Keep the decorative deck clearly to the right of the two-line subtitle. */
.deck-float{
  left:82%!important;
  right:auto!important;
  bottom:-1vh!important;
  width:min(21vw,315px)!important;
  transform:translateX(-25%) rotate(3deg)!important;
}

/* The yellow panel carries text only. The actual rule card hangs below it, larger and easier to remember. */
.effect-state{overflow:visible!important;padding-bottom:7px!important}
.effect-state-cards{
  position:absolute;
  left:50%;
  top:calc(100% + 9px);
  transform:translateX(-50%);
  display:flex;
  justify-content:center;
  align-items:flex-start;
  gap:8px;
  margin:0!important;
  min-height:0!important;
  width:max-content;
  max-width:220px;
  pointer-events:none;
}
.effect-state-cards img{
  width:64px!important;
  height:93px!important;
  object-fit:fill;
  border-radius:7px;
  border:3px solid #fff8d2;
  box-shadow:0 5px 13px #000b;
  background:#111;
}

/* Once the human has gone out in ranking mode, replace the old hand with a large finish panel. */
.human-out-display{
  align-self:center;
  width:min(620px,92%);
  min-height:132px;
  margin:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border:4px solid #ffe277;
  border-radius:22px;
  background:radial-gradient(circle at 50% 15%,#ffea86 0,#f4ad18 34%,#a64b08 72%,#4b2105 100%);
  color:#fff;
  box-shadow:0 0 0 4px #2b1905,0 0 30px #ffcf4477,0 15px 35px #000a;
  text-align:center;
  text-shadow:0 3px 0 #6e3204;
}
.human-out-display small{letter-spacing:.22em;font-weight:950;color:#fff3c0}
.human-out-display strong{font-size:clamp(34px,4vw,54px);line-height:1.05;margin:5px 0;font-weight:1000}
.human-out-display span{font-size:14px;font-weight:900;color:#fff7d5}
.player-actions button:disabled,.toolbar button:disabled{opacity:.45;cursor:not-allowed}

@media(max-width:1180px){
  .deck-float{left:81%!important;width:min(20vw,275px)!important}
  .effect-state-cards img{width:57px!important;height:83px!important}
}
@media(max-width:1024px){
  .deck-float{left:80%!important;width:min(19vw,225px)!important}
  .effect-state-cards{top:calc(100% + 6px);gap:5px}
  .effect-state-cards img{width:49px!important;height:71px!important;border-width:2px}
  .human-out-display{min-height:110px}.human-out-display strong{font-size:32px}
}


/* v14: safer turn locking, compact title, fast CPU-only finish, and toggleable play log */
.deck-float{display:none!important}
.hand-row.human-finished{grid-template-columns:1fr!important}
.hand-row.human-finished #hand{width:100%}
.human-out-display{justify-self:center!important;align-self:center!important;margin-left:auto!important;margin-right:auto!important}
.log-toggle{position:absolute;left:14px;bottom:12px;z-index:45;border:2px solid #e0bd5d;border-radius:12px;background:#0b3d30;color:#fff;padding:9px 14px;font-weight:900;box-shadow:0 5px 14px #0008}
.log-toggle.active{background:#f0bf37;color:#201500}
.game-log-panel{position:absolute;left:14px;bottom:58px;z-index:44;width:min(380px,45vw);max-height:48vh;overflow:hidden;border:2px solid #e2c26d;border-radius:16px;background:rgba(4,33,25,.97);box-shadow:0 18px 42px #000b}
.game-log-head{display:flex;justify-content:space-between;align-items:center;padding:11px 14px;border-bottom:1px solid #ffffff22;background:#0b4a38}.game-log-head strong{font-size:17px}.game-log-head small{color:#d9c98c}
.game-log-list{max-height:40vh;overflow:auto;padding:8px 10px}.game-log-item{padding:8px 7px;border-bottom:1px solid #ffffff18;font-size:13px;line-height:1.45}.game-log-empty{padding:16px;color:#c8d0ca;text-align:center}
@media(max-width:1024px){.game-log-panel{width:min(330px,52vw);max-height:42vh}.log-toggle{left:8px;bottom:8px;padding:7px 11px}.game-log-panel{left:8px;bottom:50px}}

/* v20: suspend control, draw-chain line break, sequential multi-skip */
.header-right{justify-self:end;display:flex;align-items:center;gap:7px}
.gameHeader>.header-right{justify-self:end}
.header-right #pauseGame{background:#205a49;border-color:#e4c977}
.header-right #retire{background:#563020;border-color:#d8b66d}
.effect-state strong{white-space:pre-line;line-height:1.08}
.human-condition{white-space:pre-line;line-height:1.08;text-align:center}
@media(max-width:1180px){.header-right{gap:4px}.header-right button{padding-left:8px!important;padding-right:8px!important}}
@media(max-width:900px){.gameHeader{grid-template-columns:minmax(250px,1fr) auto 126px}.header-right{gap:3px}.header-right button{font-size:11px!important;padding:7px 6px!important}}


/* v21: show multi-card play and card effect at the same time */
.multi-burst{position:absolute;left:18px;top:174px;z-index:17;pointer-events:none}
.multi-burst>div{min-width:220px;max-width:300px;padding:9px 14px;border:4px solid #fff;border-radius:17px;text-align:left;background:linear-gradient(135deg,#845bff,#4b28bd);color:#fff;box-shadow:0 0 0 3px #17110a,0 12px 28px #000b;animation:burstIn .22s ease-out}
.multi-burst small,.multi-burst strong,.multi-burst span{display:block}
.multi-burst small{font-size:11px;font-weight:900;letter-spacing:.08em;opacity:.92}
.multi-burst strong{font-size:clamp(24px,2.5vw,34px);line-height:1;margin:2px 0;font-weight:1000}
.multi-burst span{font-size:12px;font-weight:900;margin-top:3px}
@media(max-width:1180px){.multi-burst{left:10px;top:168px}.multi-burst>div{min-width:190px;max-width:250px}}
@media(max-width:1024px){.multi-burst{left:7px;top:160px}.multi-burst>div{min-width:175px;max-width:225px;padding:8px 11px}.multi-burst strong{font-size:23px}.multi-burst span{font-size:11px}}


/* Ver 1.2.2: online battle lobby / waiting room + basic turn sync */
.menu-online{width:100%;margin-top:13px;border:2px solid #7fe0ff;border-radius:18px;background:linear-gradient(180deg,#176b82,#0c4354);color:#fff;padding:15px 20px;display:flex;align-items:center;gap:16px;box-shadow:0 6px 0 #052c38,0 12px 24px #0005;text-align:left}.menu-online:hover{transform:translateY(-2px)}.menu-online .menu-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#e8fbff;color:#0b4f62;font-size:24px;font-weight:1000}.menu-online b{display:block;font-size:22px}.menu-online small{display:block;color:#d8f7ff;margin-top:3px}.menu-board>.menu-sub{margin-top:13px}
.online-screen{position:relative;overflow:hidden}.online-shell{position:relative;z-index:2;width:min(1180px,94vw);height:min(860px,94vh);margin:3vh auto;border:2px solid #e6c46a;border-radius:28px;background:linear-gradient(145deg,rgba(5,54,39,.985),rgba(3,31,23,.99));box-shadow:0 30px 70px #0009;overflow:hidden}.online-head{height:96px;display:grid;grid-template-columns:170px 1fr 170px;align-items:center;gap:18px;padding:15px 22px;background:linear-gradient(90deg,#082c23,#0d4e39);border-bottom:1px solid #d7b85c}.online-head>div{text-align:center}.online-head small{letter-spacing:.18em;color:#d8be7a}.online-head h2{font-size:32px;margin:2px 0}.online-preview-badge,.connection-pill{justify-self:end;border:1px solid #8bdaf0;border-radius:999px;background:#0b495c;color:#e9fbff;padding:8px 13px;font-weight:900;font-size:13px}.connection-pill{border-color:#7de0a8;background:#0b4932;color:#eafff2;display:flex;align-items:center;gap:7px}.connection-pill i{width:9px;height:9px;border-radius:50%;background:#55e68b;box-shadow:0 0 10px #55e68b}.online-lobby-body{height:calc(100% - 96px);padding:24px 30px 28px;overflow:auto}.online-name-card{display:grid;grid-template-columns:1fr minmax(260px,360px);align-items:center;gap:28px;padding:18px 22px;border:2px solid #d6ba69;border-radius:18px;background:#fffaf0;color:#18221e;box-shadow:0 10px 24px #0004}.online-name-card small,.online-entry-card>small,.room-section-head small,.room-code-panel small{letter-spacing:.14em;font-weight:900;color:#8b6a18}.online-name-card h3{margin:3px 0;font-size:23px;color:#0b5e3b}.online-name-card p{margin:2px 0;color:#66716b;font-size:13px}.online-name-card input{width:100%;border:3px solid #0f7a4f;border-radius:14px;background:#fff;padding:13px 16px;font-size:22px;font-weight:900;color:#163126;outline:none}.online-name-card input:focus{box-shadow:0 0 0 4px #8de4bd55}.online-entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}.online-entry-card{position:relative;min-height:300px;padding:25px 25px 22px;border:2px solid #d8bf75;border-radius:22px;background:linear-gradient(180deg,#fffdf4,#f2ead1);color:#17211c;box-shadow:0 14px 28px #0004;overflow:hidden}.online-entry-card:after{content:"";position:absolute;right:-50px;top:-60px;width:180px;height:180px;border-radius:50%;background:#0d765019}.online-entry-card.join-room-card:after{background:#147d9b20}.online-entry-icon{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;background:#0d6c49;color:#fff;font-size:31px;font-weight:1000;box-shadow:0 5px 0 #06432f}.join-room-card .online-entry-icon{background:#176c83;box-shadow:0 5px 0 #0b3e4d}.online-entry-card h3{font-size:28px;margin:12px 0 6px;color:#0b5e3b}.join-room-card h3{color:#125d73}.online-entry-card p{min-height:52px;line-height:1.65;color:#59645e;font-size:14px}.online-primary{border:0;border-radius:14px;background:linear-gradient(#ffe470,#f0aa17);color:#241700;padding:13px 18px;font-weight:1000;font-size:17px;box-shadow:0 5px 0 #9a5c0a}.room-code-entry{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:10px;margin-top:18px}.room-code-entry input{min-width:0;border:3px solid #176c83;border-radius:13px;padding:10px 12px;text-align:center;font-size:27px;font-weight:1000;letter-spacing:.28em;color:#163642;background:#fff}.online-feature-strip{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;margin:19px 0 10px}.online-feature-strip span{padding:7px 12px;border:1px solid #e4c875;border-radius:999px;background:#0b3b2f;color:#ffeaaa;font-size:13px;font-weight:900}.online-preview-note{text-align:center;color:#baccc4;font-size:12px;margin:8px auto 0;max-width:850px;line-height:1.6}
.online-room-body{height:calc(100% - 96px);display:grid;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);gap:18px;padding:18px;overflow:auto}.room-members-card,.room-control-card{border:2px solid #d6ba69;border-radius:19px;background:#fffaf0;color:#17211c;box-shadow:0 12px 26px #0004}.room-members-card{padding:18px}.room-control-card{padding:18px;display:flex;flex-direction:column;gap:13px}.room-code-panel{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 16px;border-radius:15px;background:linear-gradient(90deg,#0a513a,#0c6b4a);color:#fff}.room-code-panel small{color:#ffe39a}.room-code-panel strong{display:block;font-size:34px;letter-spacing:.17em;line-height:1}.room-code-panel button,.mini-action{border:1px solid #f0d579;border-radius:10px;background:#153e33;color:#fff;padding:8px 11px;font-weight:900}.room-section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:16px 0 10px}.room-section-head h3{font-size:23px;color:#0b5e3b;margin:2px 0}.room-size-control{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:900;color:#5a655f}.room-size-control>div{display:flex;gap:4px}.room-size-control button{width:32px;height:32px;border:2px solid #d8d1bc;border-radius:8px;background:#fff;color:#33433b;font-weight:900}.room-size-control button.active{background:#0f7a4f;border-color:#0f7a4f;color:#fff}.room-size-control.locked{opacity:.45;pointer-events:none}.room-seats{display:grid;gap:9px}.room-seat{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:11px;min-height:67px;padding:9px 11px;border:2px solid #ddd4ba;border-radius:14px;background:#fff}.room-seat.host{border-color:#ddb940;background:#fff8d8}.room-seat.me{border-color:#3da97a;background:#eaf9f0}.room-seat.cpu{border-color:#7793a3;background:#edf4f7}.room-seat.empty{border-style:dashed;color:#7d867f;background:#fbfaf4}.seat-avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#0c6445;color:#fff;font-size:20px;font-weight:1000}.room-seat.cpu .seat-avatar{background:#607d8b}.room-seat.empty .seat-avatar{background:#d8d5c9;color:#777}.seat-info b{display:block;font-size:16px}.seat-info small{display:block;color:#78817c;margin-top:2px}.seat-badge{font-size:11px;font-weight:1000;padding:5px 8px;border-radius:999px;background:#f1d257;color:#4a3608}.seat-action{border:1px solid #368363;border-radius:9px;background:#e4f5eb;color:#135c3d;padding:7px 10px;font-weight:900}.seat-action.remove{border-color:#8599a3;background:#f0f4f6;color:#40545e}.room-help{display:grid;grid-template-columns:auto 1fr;gap:9px;margin-top:12px;padding:10px 12px;border-radius:12px;background:#f3d256;color:#302408;font-size:12px}.room-role{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:9px 11px;border-radius:12px;background:#143e32;color:#fff}.room-role span{font-weight:1000;color:#ffe06b}.room-role small{text-align:right;color:#cfe0d9}.room-settings-summary{padding:0 2px}.settings-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.setting-summary-chip{padding:8px 9px;border-radius:10px;background:#efe9d6;border:1px solid #d7cdae}.setting-summary-chip small{display:block;color:#7b806f;font-size:10px}.setting-summary-chip b{display:block;margin-top:2px;color:#233128;font-size:13px}.online-settings-panel{margin-top:10px;padding:11px;border:1px solid #d4c8a5;border-radius:12px;background:#f7f2e4}.online-settings-panel>label{display:grid;grid-template-columns:100px 1fr;align-items:center;gap:8px;margin-bottom:8px;font-size:12px;font-weight:900}.online-settings-panel select{width:100%;border:1px solid #c7bea4;border-radius:8px;padding:7px;background:#fff}.online-rule-toggles{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px;margin:8px 0}.online-rule-toggles label,.online-wild-grid label{display:flex;align-items:center;gap:5px;border:1px solid #d4ccb7;border-radius:8px;background:#fff;padding:6px;font-size:11px;font-weight:800}.online-wild-box>b{font-size:12px}.online-wild-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-top:5px}.room-policy-list{display:grid;gap:6px}.room-policy-list>div{display:grid;grid-template-columns:62px 1fr;gap:7px;padding:7px 9px;border-radius:9px;background:#f1eee2;font-size:11px}.room-policy-list b{color:#0b5e3b}.room-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:auto}.room-actions .start-big{grid-column:1/-1}.room-actions button:disabled{opacity:.4;cursor:not-allowed;box-shadow:none}.danger-soft{border:1px solid #b96a5d;border-radius:10px;background:#fff1ed;color:#8b2d1f;padding:10px;font-weight:900}.room-status-text{text-align:center;margin:0;color:#6b756f;font-size:12px;font-weight:800}.room-control-card.guest-mode #onlineSettingsToggle,.room-control-card.guest-mode #roomStartBtn,.room-control-card.guest-mode #roomCloseBtn{display:none}.room-control-card.guest-mode #roomLeaveBtn{display:block!important;grid-column:1/-1}.room-control-card.guest-mode .online-settings-panel{display:none!important}
@media(max-width:1050px){.online-room-body{grid-template-columns:minmax(0,1fr) 350px}.online-shell{width:96vw}.room-code-panel strong{font-size:30px}.online-wild-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.online-head{grid-template-columns:120px 1fr 120px}.online-entry-grid{grid-template-columns:1fr}.online-name-card{grid-template-columns:1fr}.online-room-body{grid-template-columns:1fr;overflow:auto}.room-control-card{min-height:500px}.online-shell{height:96vh;margin:2vh auto}.online-feature-strip{display:none}}

/* Ver 1.2.1 waiting-room CPU controls */
.room-seat.cpu{grid-template-columns:48px minmax(120px,1fr) auto;overflow:hidden}
.cpu-seat-tools{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}
.cpu-seat-tools select{width:108px;max-width:108px;border:1px solid #7e98a5;border-radius:8px;background:#fff;color:#2c4652;padding:6px 7px;font-size:11px;font-weight:900;outline:none}
.cpu-seat-tools select:focus{box-shadow:0 0 0 3px #77a9bd44;border-color:#4f7f94}
.cpu-seat-tools button{width:32px;height:32px;flex:0 0 32px;border:1px solid #9aa9b0;border-radius:8px;background:#fff;color:#50646d;font-size:19px;font-weight:1000;line-height:1;padding:0;display:grid;place-items:center}
.cpu-seat-tools button:hover{background:#ffe9e5;border-color:#c57a6c;color:#9c3928}
.room-seat.empty .seat-action{white-space:nowrap;min-width:76px}
@media(max-width:1050px){.cpu-seat-tools select{width:96px;max-width:96px}.room-seat.cpu{grid-template-columns:44px minmax(100px,1fr) auto}}

/* Achievement categories: common + online */
.achievement-section{margin-top:18px;padding-top:4px}
.achievement-section:first-of-type{margin-top:0}
.achievement-section+.achievement-section{border-top:2px solid #e0d5b8;padding-top:22px;margin-top:24px}
.achievement-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:11px}
.achievement-section-head small{letter-spacing:.13em;color:#8d7131;font-weight:900}
.achievement-section-head h3{margin:2px 0 2px;color:#0b5e3b;font-size:22px}
.achievement-section-head p{margin:0;color:#777;font-size:12px;line-height:1.5}
.achievement-section-head>b{font-size:18px;color:#0b5e3b;white-space:nowrap}
.online-achievement-section .achievement-section-head h3,.online-achievement-section .achievement-section-head>b{color:#125f78}
.online-achievement-section .achievement.done{background:#e9f8ff;border-color:#67aec5}
.online-achievement-section .achievement.done>span{color:#1683a5}
@media(max-width:720px){.achievementGrid{grid-template-columns:1fr}.achievement-section-head{align-items:flex-start}.achievement-section-head p{max-width:78%}}
.cpu-seat-tools{display:flex;align-items:center;gap:7px;min-width:0}
.cpu-diff-seg{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid #aebdc4;border-radius:9px;background:#f8fbfc}
.cpu-diff-seg button{width:29px;height:28px;border:0;border-radius:6px;background:transparent;color:#60747d;font-size:11px;font-weight:1000;padding:0;display:grid;place-items:center}
.cpu-diff-seg button.active{background:#607d8b;color:#fff;box-shadow:inset 0 -2px 0 #405963}
.cpu-diff-seg button:hover{background:#dce8ed;color:#314b56}
.cpu-diff-seg button.active:hover{background:#607d8b;color:#fff}
.cpu-seat-tools .cpu-remove-btn{width:32px;height:32px;flex:0 0 32px;border:1px solid #9aa9b0;border-radius:8px;background:#fff;color:#50646d;font-size:19px;font-weight:1000;line-height:1;padding:0;display:grid;place-items:center}
.cpu-seat-tools .cpu-remove-btn:hover{background:#ffe9e5;border-color:#c57a6c;color:#9c3928}
/* native select rules from an earlier draft are intentionally neutralized */
.cpu-seat-tools select{display:none!important}
/* Avoid collision with the in-game .cpu seat class. */
.room-seat.room-cpu{position:relative;left:auto;right:auto;top:auto;bottom:auto;transform:none;width:auto;height:auto;min-height:67px;display:grid;grid-template-columns:48px minmax(120px,1fr) auto;align-items:center;gap:11px;padding:9px 11px;border:2px solid #7793a3;border-radius:14px;background:#edf4f7;color:#17211c;box-shadow:none;text-align:left;pointer-events:auto;overflow:hidden}
.room-seat.room-cpu .seat-avatar{background:#607d8b}
.room-seat.room-cpu:hover{transform:none}
@media(max-width:1050px){.room-seat.room-cpu{grid-template-columns:44px minmax(100px,1fr) auto}}
/* v1.2.1 real waiting-room + basic turn sync */
.connection-pill.is-offline{border-color:#f18d83;background:#67261f;color:#fff2ef}.connection-pill.is-offline i{background:#ff7265;box-shadow:0 0 10px #ff7265}.connection-pill.is-syncing{border-color:#e6c46a;background:#584516;color:#fff4ca}.connection-pill.is-syncing i{background:#ffd35a;box-shadow:0 0 10px #ffd35a}.room-seat.disconnected{opacity:.68;border-style:dashed}.room-seat.disconnected .seat-info small{color:#a73e31;font-weight:900}

/* v1.2.2: explicit room resume (no automatic jump from communication menu) */
.online-resume-row{display:flex;justify-content:center;margin:14px 0 2px}.online-resume-btn{min-width:260px;border-color:#8ccfb0!important;background:#0b4c38!important;color:#effff7!important;font-weight:900}.online-resume-btn.hidden{display:none!important}

/* Ver 1.3.0: online full-rule authoritative sync */


/* v1.3.1: tablet drag stability */
@media (pointer: coarse){
  #hand .card{-webkit-user-drag:none!important;touch-action:pan-x;}
  .dragGhost{pointer-events:none!important;will-change:transform,left,top;}
  #dropZone{touch-action:none;}
}

/* v1.3.2: unified pointer drag, lighter ghost, wider drop target */
.card{touch-action:pan-x;-webkit-user-drag:none}
.card img{pointer-events:none;-webkit-user-drag:none;user-select:none}
.dragGhost{left:0;top:0;width:64px;height:94px;filter:drop-shadow(0 8px 8px #0009);will-change:transform;transform:translate3d(-999px,-999px,0);contain:layout paint style}
.dragGhost img{width:62px;height:90px;border-radius:6px;border:2px solid #fff}
.dragGhost b{right:-13px;bottom:-10px;min-width:34px;height:34px;font-size:15px;border-width:2px;box-shadow:0 0 0 2px #111}
.discard.drop-accepted{animation:dropAccepted .22s ease-out}
@keyframes dropAccepted{0%{transform:scale(1)}45%{transform:scale(1.075);box-shadow:0 0 0 7px #fff27a,0 0 42px #ffe667cc}100%{transform:scale(1)}}
@media (pointer:coarse){
  #hand .card{touch-action:pan-x}
  #dropZone{touch-action:manipulation}
}

/* v1.3.3: dual input model — native mouse drag + lightweight touch drag */
#hand .card[draggable="true"]{cursor:grab;-webkit-user-drag:element;touch-action:auto}
#hand .card[draggable="true"]:active{cursor:grabbing}
#hand .card.dragging{opacity:.58}
#hand .card.touch-dragging{opacity:.72}
.discard img{pointer-events:none}
.touchDragGhost{
  position:fixed;left:0;top:0;z-index:10000;pointer-events:none;
  width:50px;height:68px;border-radius:8px;border:3px solid #fff;
  background:#171717;box-shadow:0 5px 12px #0008;
  transform:translate3d(-999px,-999px,0);will-change:transform;
  display:grid;place-items:center;overflow:hidden;
}
.touchDragGhost::before{content:"";position:absolute;inset:4px;border:2px solid #ffffff88;border-radius:5px}
.touchDragGhost span{position:relative;z-index:1;max-width:42px;padding:3px;color:#fff;font-size:10px;font-weight:1000;line-height:1.1;text-align:center;text-shadow:0 1px 2px #000;word-break:break-all}
.touchDragGhost.color-red{background:#cf342f}.touchDragGhost.color-blue{background:#2368bd}.touchDragGhost.color-yellow{background:#d7a915}.touchDragGhost.color-green{background:#208851}.touchDragGhost.color-wild{background:#161616}
@media (pointer:coarse){
  #hand .card{touch-action:pan-x;-webkit-user-drag:none!important}
  .touchDragGhost{width:46px;height:64px;box-shadow:0 4px 9px #0007}
}

/* v1.3.4: retire state */
.cpu .cpuCountText{white-space:nowrap}
.human-out-display.retired{background:linear-gradient(120deg,#552018,#a54128 48%,#7b2c20);box-shadow:0 0 0 4px #ffd36a,0 8px 28px #0008}
.human-out-display.retired small{color:#ffd6c8}
.human-out-display.retired span{color:#ffe0d4}
.result-row.retired{background:#f2eee9;border-color:#bca89b;opacity:.92}
.result-row.retired .result-hand{background:#ead9d2;color:#8b3528}

/* Ver 1.3.7 waiting-room player removal */
.human-remove-btn{border:1px solid #c66f63;border-radius:9px;background:#fff1ed;color:#943528;padding:7px 10px;font-size:11px;font-weight:1000;white-space:nowrap}
.human-remove-btn:hover{background:#ffe0da;border-color:#a94e42}


/* Ver 1.3.6 seat order controls */
.seat-order-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 11px;padding:10px 12px;border:1px solid #d6c9a5;border-radius:12px;background:#f7f1df}.seat-order-panel>div:first-child{min-width:0}.seat-order-panel b{display:block;color:#0b5e3b;font-size:14px}.seat-order-panel small{display:block;margin-top:3px;color:#69736d;font-size:11px;line-height:1.45}.seat-mode-seg{display:flex;gap:5px;flex:0 0 auto}.seat-mode-seg button{border:2px solid #c9c1aa;border-radius:9px;background:#fff;color:#435148;padding:7px 10px;font-size:11px;font-weight:950}.seat-mode-seg button.active{background:#0f7a4f;border-color:#0f7a4f;color:#fff}.seat-mode-seg button:disabled{opacity:.45}.seat-right-tools{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0}.seat-move-tools{display:flex;gap:3px}.seat-move-tools button{width:29px;height:29px;border:1px solid #b6b09f;border-radius:8px;background:#fff;color:#345447;font-weight:1000;font-size:15px;line-height:1;padding:0}.seat-move-tools button:hover:not(:disabled){background:#e4f5eb;border-color:#5b9f7f}.seat-move-tools button:disabled{opacity:.28}.room-seat[draggable="true"]{cursor:grab}.room-seat.dragging{opacity:.55}.room-seat.drag-over{outline:3px solid #f1c84a;outline-offset:2px}.settings-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.result-actions{flex-wrap:wrap}.result-actions #resultLobby{background:#edf7f1;border-color:#4b8c69;color:#20583e}.result-actions button:disabled{opacity:.48;box-shadow:none;cursor:not-allowed}@media(max-width:820px){.seat-order-panel{align-items:flex-start;flex-direction:column}.seat-mode-seg{width:100%}.seat-mode-seg button{flex:1}.seat-right-tools{gap:4px}.seat-move-tools button{width:28px;height:28px}.result-page-shell .result-actions button{min-width:180px}}
