:root{color-scheme:light;--ink:#143248;--muted:#556e7c;--paper:#f6f3e9;--line:#d7ddd7;--coral:#ee7866;--blue:#529fb2;--white:#fffdf7;--water:#153b52}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;line-height:1.6}
button,input,summary,a{-webkit-tap-highlight-color:transparent}
button,input{font:inherit}
button{min-height:44px;border:1px solid var(--line);border-radius:9px;padding:9px 15px;background:var(--white);color:var(--ink);font-size:14px;font-weight:650;cursor:pointer}
button:hover:not(:disabled){background:#eaf0eb;border-color:#91aaa9}
button:disabled{cursor:default;color:#73828a;background:#e6e9e5;border-color:#d3dad6}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #b34c2d;outline-offset:3px}
[hidden]{display:none!important}
.shell{max-width:820px;padding:26px 30px 30px;margin:auto}
.page-header{position:relative;margin-bottom:24px}
.home-link{display:inline-flex;align-items:center;min-height:44px;color:var(--muted);font-size:13px;text-underline-offset:4px}
.eyebrow,.section-label{margin:17px 0 2px;font-size:12px;letter-spacing:.13em;font-weight:650;color:var(--muted)}
h1{font-size:46px;letter-spacing:.035em;line-height:1.25;margin:8px 0 10px;font-weight:800}
h1>span{display:inline-block;vertical-align:top;margin:4px 0 0 11px;font-size:24px;color:#d78051}
.intro{font-size:15px;margin:0;max-width:510px}
.legend{display:flex;gap:24px;margin-top:17px;font-size:13px;font-weight:600}
.legend>span{display:flex;align-items:center;gap:8px}
.legend-token{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;color:#143248;font-size:13px;line-height:1;border:1px solid #14324850}
.coral{border-radius:50%;background:var(--coral)}
.sail{width:20px;height:20px;background:var(--blue);transform:rotate(45deg);margin:0 3px}
.sail i{font-style:normal;transform:rotate(-45deg)}
.game-controls{padding:0;margin:0;min-width:0;border:0}
.game-stage{background:var(--white);border:1px solid #d8ded6;border-radius:20px;padding:20px;box-shadow:0 6px 0 #153b5207;scroll-margin-top:10px}
.status-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px;min-height:50px}
.section-label{margin:0;font-size:12px;letter-spacing:.12em}
h2{font-size:20px;line-height:1.4;margin:2px 0 0;letter-spacing:.02em}
.move-count{font-size:12px;white-space:nowrap;margin:0;color:var(--muted);text-align:right}
.move-count strong{display:inline-block;font-size:27px;font-weight:750;color:var(--ink);margin-left:4px;font-variant-numeric:tabular-nums}
.move-count>span{font-size:12px}
.column-buttons{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-bottom:9px}
.column-buttons button{padding:7px 0;background:#eff2e8;border-color:#d5ded3;min-width:44px;white-space:nowrap;font-size:14px}
.column-buttons span{font-weight:400;margin-left:6px;color:#54796e}
.column-buttons button:disabled{color:#7b888b;background:#e4e8e6}
#board{display:block;width:100%;height:auto;overflow:visible}
.board-water{fill:var(--water);stroke:#0b2c3f;stroke-width:2}
.empty-cell{fill:#edf0e5;stroke:#0a293d;stroke-width:2}
.token-1{fill:var(--coral);stroke:#ffc2a5;stroke-width:2}
.token-2{fill:var(--blue);stroke:#a2dbe0;stroke-width:2}
.token-number{fill:#102e41;font-size:30px;font-weight:800;text-anchor:middle;dominant-baseline:central}
.last-ring{fill:none;stroke:#fffdf7;stroke-width:4}
.win-ring{fill:none;stroke:#ffe692;stroke-width:6}
.win-star{fill:#153b52;stroke:#ffe692;stroke-width:4;paint-order:stroke;font-size:29px;font-weight:800;text-anchor:middle}
.board-footnote{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);margin:10px 1px 12px}
.board-footnote p{margin:0}
.board-footnote>span{white-space:nowrap}
.game-actions{display:flex;gap:10px}
.game-actions button{flex:1}
#restartButton{background:#173d50;color:#fffdf7;border-color:#173d50}
#restartButton:hover:not(:disabled){background:#285467}
#restartButton:disabled{background:#e6e9e5;color:#73828a;border-color:#d3dad6}
.feedback{margin:12px 0 0;padding:9px 11px;min-height:43px;border-left:3px solid #d99065;background:#f3f1e6;border-radius:0 7px 7px 0;font-size:14px;line-height:1.55}
.invite-panel{margin-top:24px;padding:23px 24px;background:#e9eee5;border:1px solid #d7dfd2;border-radius:16px}
.invite-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.invite-heading h2{font-size:19px}
.invite-star{font-size:40px;color:#578077;line-height:1}
.invite-panel>p{font-size:13px;color:var(--muted);margin:12px 0 15px}
#inviteButton{border-color:#96afa3;background:#f9faf2}
.invite-result{margin-top:18px;padding-top:15px;border-top:1px solid #cbd6ca}
.invite-result label{font-size:12px;font-weight:700}
.copy-row{display:flex;gap:8px;margin-top:5px}
.copy-row input{min-width:0;width:100%;height:44px;border:1px solid #a5b8ac;border-radius:8px;background:var(--white);padding:7px 10px;color:var(--ink);font-size:13px}
.copy-row button{flex:0 0 auto}
.invite-result p{font-size:12px;margin:7px 0 0;color:var(--muted)}
.text-board-panel{margin-top:20px;border:1px solid var(--line);border-radius:12px;background:#faf9f2;padding:0 17px}
summary{cursor:pointer;min-height:52px;padding:13px 0;font-size:14px;font-weight:700}
summary>span{font-size:12px;font-weight:400;color:var(--muted);margin-left:10px}
.table-wrap{padding-bottom:16px;max-width:100%}
table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px;line-height:1.4}
caption{text-align:left;color:var(--muted);font-size:12px;padding:0 0 10px}
th,td{text-align:center;padding:9px 2px;border:1px solid #cdd7cf;overflow-wrap:anywhere}
th{background:#e9eee5;font-weight:650}
td{background:#fffdf7}
td.winning-text{background:#fff1bb;font-weight:700}
td.last-text{box-shadow:inset 0 0 0 2px #284f63}
.confirm-panel{padding:18px 20px;margin-bottom:18px;border:2px solid #b96c48;background:#fff4e3;border-radius:14px}
.confirm-panel h2{font-size:18px}
.confirm-panel p{font-size:13px;margin:7px 0 14px}
.confirm-actions{display:flex;gap:10px;flex-wrap:wrap}
.danger-button{color:#fff;background:#9c4d31;border-color:#9c4d31}
.danger-button:hover:not(:disabled){background:#78351f;color:white}
.page-footer{padding:21px 8px 0;font-size:12px;text-align:center;color:var(--muted)}
.page-footer p:first-child{font-size:14px;color:#325668;font-weight:650}
.page-footer p{margin:0 0 10px}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(min-width:1100px){.shell{padding-top:38px}.page-header{padding-left:8px;margin-bottom:28px}.game-stage{padding:24px 30px}.legend{position:absolute;right:8px;bottom:2px;flex-direction:column;gap:9px}.intro{max-width:490px}}
@media(max-width:600px){.shell{padding:15px 10px 20px}.page-header{margin-bottom:17px;padding:0 6px}.home-link{font-size:12px}.eyebrow{margin-top:12px;font-size:12px;letter-spacing:.08em}h1{font-size:35px;margin:6px 0}.intro{font-size:13px;max-width:330px}.legend{gap:20px;font-size:12px;margin-top:12px}.legend-token{width:22px;height:22px}.sail{width:18px;height:18px}.game-stage{border-radius:14px;padding:12px 8px 11px;scroll-margin-top:8px}.status-line{padding:0 5px;min-height:43px;margin-bottom:11px}h2{font-size:17px}.move-count strong{font-size:23px}.column-buttons{gap:2px;margin-bottom:7px}.column-buttons button{font-size:13px;padding:7px 0;min-height:44px;border-radius:6px}.column-buttons span{margin-left:2px}.board-footnote{font-size:12px;line-height:1.5;gap:3px;margin:8px 2px 10px;flex-wrap:wrap}.game-actions{gap:8px}.game-actions button{font-size:13px}.feedback{font-size:13px;min-height:40px;margin-top:10px;padding:8px}.invite-panel{padding:18px 16px;margin-top:19px}.invite-heading h2{font-size:18px}.text-board-panel{padding:0 8px;margin-top:16px}summary>span{margin-left:4px;font-size:12px}th,td{padding:8px 1px}.confirm-panel{padding:15px 14px}.confirm-actions{gap:8px}.confirm-actions button{font-size:13px}}
