:root{color-scheme:dark;--bg:#061e17;--panel:#123b2d;--line:#d8ba722e;--gold:#e8c782;--text:#f4e9ca;--muted:#aec2ae;font-family:system-ui,"Microsoft YaHei",sans-serif}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:radial-gradient(ellipse at 40% 0,#184b36,transparent 65%),var(--bg);color:var(--text);min-height:100dvh}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}a{color:var(--gold);text-decoration:none}button{cursor:pointer;border:1px solid #cbb27166;border-radius:10px;color:var(--text);background:#254c3c;padding:11px 18px;font-weight:600}button:hover:enabled{background-color:#356249}button:disabled{opacity:.42;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #f3d18b;outline-offset:3px}.gold{background:linear-gradient(135deg,#f3dca3,#caa45f);color:#183227;border-color:#f0d599}.gold:hover:enabled{background:#f2d497}.textButton{background:transparent;border:0;padding:8px;color:var(--gold)}input,select{border:1px solid #789c7a80;background:#08291f;border-radius:10px;padding:13px;color:#f5f0dd;width:100%;min-width:0;min-height:46px}label{display:block;font-size:13px;color:#c5d4be;margin:16px 0 8px}h1,h2,h3,p{margin-top:0}h2{font-size:22px;margin-bottom:12px}h3{font-size:17px}small{font-size:11px}.muted{color:var(--muted);font-size:13px;line-height:1.7}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--gold);margin-bottom:10px}.panel{background:linear-gradient(135deg,#173f30cc,#0c2c23dd);border:1px solid var(--line);border-radius:20px}
.siteHeader{height:78px;max-width:1240px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:20px;padding:0 28px;border-bottom:1px solid #c2c9a520}.brand{display:flex;align-items:center;gap:12px;font:600 21px "Microsoft YaHei","PingFang SC",sans-serif;letter-spacing:2px;color:#f4eddb}.brandIcon{width:38px;height:44px;object-fit:contain}.brand small{display:block;letter-spacing:3px;font-size:8px;font-weight:400;margin-top:5px;color:#9eb8a8}.siteHeader nav{display:flex;align-items:center;gap:24px;font-size:12px;color:#c9d1ba}.siteHeader nav a{color:inherit}
.lobby{max-width:1120px;margin:40px auto 70px;padding:0 24px;display:grid;grid-template-columns:1.1fr 1fr;gap:32px 58px;font-family:"Microsoft YaHei","PingFang SC",sans-serif}.hero{position:relative;min-height:445px;padding:23px 0}.hero .eyebrow{color:#b8bb96;margin-bottom:14px}.hero h1{font-size:clamp(38px,4vw,54px);font-weight:600;line-height:1.3;letter-spacing:3px;margin:0 0 22px}.hero h1 span{color:var(--gold)}.intro{font-size:14px;line-height:1.9;color:#9eb8a8}.heroArt{position:relative;height:170px;margin-top:28px;width:100%;max-width:380px}.heroArt>span{position:absolute;left:0;bottom:17px;color:#91ab93;font-size:10px;letter-spacing:3px}.heroBoard{position:absolute;right:13px;top:0;width:184px;height:163px;border:13px solid #c9aa73;border-radius:8px;background:repeating-linear-gradient(0deg,transparent 0 23px,#7c592f88 23px 24px),repeating-linear-gradient(90deg,#d9b981 0 23px,#7c592f88 23px 24px);box-shadow:0 7px 0 #81663f,0 18px 25px #00130b77;transform:rotate(-12deg)}.heroStone{position:absolute;left:13px;top:12px;display:block;width:23px;height:23px;border-radius:50%;box-shadow:1px 3px 4px #0007}.heroStone:nth-child(2){left:37px;top:36px}.heroStone:nth-child(3){left:61px;top:60px}.heroStone:nth-child(4){left:61px;top:36px}.heroStone:nth-child(5){left:85px;top:84px}.heroStone:nth-child(6){left:85px;top:60px}.heroStone:nth-child(7){left:109px;top:108px}.black{background:radial-gradient(circle at 35% 28%,#505552,#131715 75%)}.white{background:radial-gradient(circle at 35% 28%,#fff,#d3d3c9 80%)}
.entry{padding:30px;align-self:start;min-height:445px}.entry h2{font-size:24px;letter-spacing:1px;font-weight:600;margin:0 0 24px}.joinRow{display:flex;gap:8px}.joinRow input{letter-spacing:2px;text-transform:uppercase}.joinRow button{white-space:nowrap}.entryActions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.entryActions button{min-height:54px;padding:10px}.entryActions small{display:block;font-size:10px;margin-top:4px;font-weight:400;color:#b1c2a2}.entryNote{font-size:11px;line-height:1.8;color:#a9c2a9;margin:0}.resume{width:100%;margin-top:14px;background:#c7b46d20;color:var(--gold);font-size:12px}.moreModes{border-top:1px solid var(--line);margin-top:18px;padding-top:14px;font-size:12px;color:#aec2ae}.moreModes summary{cursor:pointer;color:var(--gold)}.moreModes label{font-size:12px}.moreModes select{font-size:13px}
.tablePage{max-width:1240px;margin:0 auto;padding:20px 24px 28px}.tableToolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px;font-size:12px;min-height:34px}.tableIdentity,.tableLinks{display:flex;align-items:center;gap:10px}.tableIdentity{flex-wrap:wrap}.tableToolbar .eyebrow{margin:0;font-size:10px}.roomBadge{font-size:12px;min-height:32px;padding:6px 10px;border-radius:7px;background:#244b3b;border:1px solid #b79e615e;color:#e9ddb8;font-weight:400}.roomBadge b{letter-spacing:2px}#roundLabel{font-size:12px;margin:0}#connection{font-size:11px;color:#b8cfb6}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 276px;gap:20px;align-items:start}.boardPanel{padding:18px 22px 15px}.players{display:flex;justify-content:space-between;gap:14px;margin:0 auto 16px;max-width:620px}.playerChip{border:1px solid #91a75c36;border-radius:11px;display:flex;align-items:center;gap:10px;min-width:0;width:50%;padding:11px;background:#092d226b}.playerChip div{min-width:0}.playerChip b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}.playerChip small{display:block;font-size:10px;color:#a9c3a9;margin-bottom:4px}.playerChip.active{border-color:#d9bd7188;background:#44653c44}.stone{display:block;flex:none;width:27px;height:27px;border-radius:50%;box-shadow:0 2px 4px #0006}.turnBadge{margin-left:auto;flex:none;color:#e8d59c;font-size:10px}.boardFooter{display:flex;justify-content:space-between;gap:10px;margin:14px auto 0;max-width:620px;font-size:10px;color:#a3b7aa}
#board{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));grid-template-rows:repeat(15,minmax(0,1fr));width:min(100%,max(330px,calc(100dvh - 310px)));max-width:620px;aspect-ratio:1;margin:auto;padding:2.4%;background:linear-gradient(115deg,#dfbe80,#cfa56a);border-radius:7px;box-shadow:0 8px 24px #0003;touch-action:manipulation}#board [role=row]{display:contents}.cell{position:relative;padding:0;min-width:0;min-height:0;border:0;border-radius:0;background:linear-gradient(#6e502a99,#6e502a99) center/1px 100% no-repeat,linear-gradient(#6e502a99,#6e502a99) center/100% 1px no-repeat;aspect-ratio:1;cursor:pointer}.cell:hover:enabled{background-color:#8c5a2922}.cell:first-child{background-size:1px 100%,50% 1px;background-position:center,right center}.cell:last-child{background-size:1px 100%,50% 1px;background-position:center,left center}[role=row]:first-child .cell{background-size:1px 50%,100% 1px;background-position:center bottom,center}[role=row]:last-child .cell{background-size:1px 50%,100% 1px;background-position:center top,center}[role=row]:first-child .cell:first-child{background-size:1px 50%,50% 1px;background-position:center bottom,right center}[role=row]:first-child .cell:last-child{background-size:1px 50%,50% 1px;background-position:center bottom,left center}[role=row]:last-child .cell:first-child{background-size:1px 50%,50% 1px;background-position:center top,right center}[role=row]:last-child .cell:last-child{background-size:1px 50%,50% 1px;background-position:center top,left center}.cell.star:before{content:"";position:absolute;width:15%;height:15%;border-radius:50%;background:#6e502a;left:42.5%;top:42.5%}.piece{position:absolute;inset:7%;border-radius:50%;box-shadow:1px 3px 4px #0006}.cell.last .piece:after{content:"";position:absolute;inset:38%;border-radius:50%;background:#c35937}.cell.winning .piece{outline:3px solid #b74527;outline-offset:1px}.cell:focus-visible{outline:2px solid #6b351e;outline-offset:-2px;z-index:2}.cell[aria-disabled=true]{cursor:default}
.sidePanel{display:grid;gap:16px;align-content:start}.statusPanel,.roomPanel,.ruleNote{padding:22px 20px}.statusPanel h2{font-size:23px;line-height:1.4;margin-bottom:10px}#hint{font-size:12px;line-height:1.8;margin:0;min-height:44px}.actions{display:flex;gap:8px;margin-top:18px}.actions button{flex:1;font-size:13px;padding:10px;min-height:44px}.roomPanel h2{font-size:18px;margin-bottom:10px}.roomPanel .muted{font-size:11px;margin-bottom:0}.wide{width:100%;margin-top:14px;font-size:12px;min-height:44px}#roomDetails{margin-top:17px;border-top:1px solid var(--line);padding-top:16px;font-size:11px;color:#a4bea5}summary{cursor:pointer}#roomDetails input{font-size:11px;padding:10px;min-height:40px}#roomDetails .muted{margin-top:12px}.ruleNote h3{font-size:15px;margin-bottom:15px}.ruleNote>p:not(.eyebrow){font-size:11px;line-height:1.8;color:#a4bea5;margin:14px 0 6px}.ruleNote .textButton{font-size:11px;padding:6px 0}.stoneSequence{display:flex;align-items:center;gap:10px}.stoneSequence i{width:19px;height:19px;background:radial-gradient(circle at 35% 28%,#505552,#131715 75%);border-radius:50%;box-shadow:0 2px 3px #0004}#pendingRequest{border:1px solid #e4c37d77;padding:13px;border-radius:10px;margin-top:16px;font-size:12px;line-height:1.7}#pendingRequest p{margin:0}#pendingRequest .actions{margin-top:12px}
.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);max-width:90vw;z-index:2000;padding:13px 22px;background:#e7d6a9;color:#213b2b;border-radius:10px;box-shadow:0 6px 24px #0005;font-size:13px;line-height:1.6;text-align:center}.toast:empty{display:none}.toast.error{background:#f2cab4;color:#4f271e}.dialog{background:#123a2c;color:var(--text);border:1px solid #c7ae6677;border-radius:18px;padding:28px;width:min(590px,calc(100vw - 28px));max-height:85dvh;overflow:auto;box-shadow:0 28px 70px #0009}.dialog::backdrop{background:#00130dc9}.dialog p{color:#b9cdb4;line-height:1.9;font-size:13px}.dialog h3{color:#e3cc91;margin-top:23px}.dialogActions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.sectionHeading{display:flex;align-items:center;justify-content:space-between;gap:16px}.sectionHeading h2{margin:0}
@media(max-width:1000px) and (min-width:701px){.workspace{grid-template-columns:minmax(0,1fr) 238px;gap:16px}.boardPanel{padding:15px}.statusPanel,.roomPanel,.ruleNote{padding:19px 16px}.turnBadge{display:none}.lobby{gap:30px}.heroArt>span{display:none}}
@media(max-width:700px){.siteHeader{height:64px;padding:0 18px}.siteHeader nav{gap:12px;font-size:11px}.siteHeader .textButton{font-size:11px;padding:5px}.brand{font-size:19px;gap:9px}.brandIcon{width:31px;height:36px}.lobby{grid-template-columns:1fr;margin:20px auto 40px;padding:0 20px;gap:22px}.hero{min-height:196px;padding:8px 0}.hero h1{font-size:35px;line-height:1.3;margin-bottom:16px}.hero .intro{font-size:12px;margin-bottom:0}.heroArt{position:absolute;right:0;bottom:0;width:145px;height:139px;margin:0;pointer-events:none}.heroBoard{transform:scale(.67) rotate(-12deg);transform-origin:right bottom;right:0;top:auto;bottom:15px}.heroArt>span{display:none}.entry{padding:23px;min-height:0}.entry h2{font-size:23px;margin-bottom:20px}.tablePage{padding:14px 12px 22px}.tableToolbar{gap:8px;margin-bottom:12px}.tableIdentity{gap:6px;flex-wrap:nowrap}.tableToolbar .eyebrow{display:none}.roomBadge{font-size:10px;padding:6px 7px}.tableToolbar #roundLabel{font-size:10px}.tableLinks{gap:5px;white-space:nowrap}.tableLinks .textButton{font-size:11px;padding:6px}#connection{font-size:10px}.workspace{display:flex;flex-direction:column;gap:14px}.sidePanel{display:contents}.statusPanel{order:0;width:100%;padding:17px}.statusPanel h2{font-size:20px;margin-bottom:7px}#hint{min-height:0;font-size:11px}.statusPanel>.eyebrow{display:none}.statusPanel>.actions{margin-top:12px}.boardPanel{order:1;width:100%;padding:12px}.roomPanel{order:2;width:100%}.ruleNote{order:3;width:100%}#board{width:100%;max-width:560px;padding:2.4%}.players{gap:8px;margin-bottom:12px}.playerChip{gap:7px;padding:9px}.playerChip b{font-size:12px}.playerChip small{font-size:9px}.stone{width:22px;height:22px}.turnBadge{font-size:9px}.boardFooter{font-size:9px;margin-top:12px}.roomPanel,.ruleNote{padding:19px}.dialog{padding:23px}.toast{bottom:18px;font-size:12px;padding:12px 16px}}
@media(max-width:370px){.heroArt{right:-6px;bottom:-12px}.heroBoard{transform:scale(.5) rotate(-12deg)}.hero h1{font-size:32px}.hero .intro{font-size:11px}.entry{padding:20px}.joinRow button{padding:10px;font-size:12px}.turnBadge{display:none}#connection{display:none}.tableLinks .textButton{font-size:10px}.roomBadge{font-size:9px}.entryActions{gap:7px}.entryActions button{font-size:13px}}
@media(prefers-reduced-motion:no-preference){.piece{animation:land .15s ease-out}@keyframes land{from{transform:scale(.8)}to{transform:scale(1)}}}


.publicRooms{grid-column:1/-1;border-top:1px solid #a8bd8740;padding-top:28px}.publicRooms .sectionHeading{margin-bottom:17px}.publicRooms h2{font-size:22px}.publicRooms .textButton{font-size:12px}.roomList{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:12px}.roomEntry{display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid var(--line);border-radius:13px;padding:17px 20px;background:#103c2d80}.roomEntry>div{min-width:0}.roomEntry b{letter-spacing:3px;color:var(--gold)}.roomEntry p{font-size:12px;color:var(--muted);margin:6px 0 0;overflow-wrap:anywhere;line-height:1.7}.roomEntry button{flex:none;font-size:12px;padding:10px 13px;white-space:nowrap}.emptyRooms{grid-column:1/-1;border:1px dashed var(--line);border-radius:13px;padding:24px;margin:0;font-size:13px;line-height:1.9}.privateChoice{display:flex;align-items:center;gap:8px;color:#a9c2a9;font-size:12px;margin:0 0 12px}.privateChoice input{width:auto;min-height:0;padding:0;accent-color:#dbc58a}@media(max-width:700px){.publicRooms{padding-top:22px}.publicRooms h2{font-size:21px}.roomEntry{padding:16px}.emptyRooms{padding:20px;font-size:12px}}
