/* 墨线竞技：原生控件与轻量纸色，物理坐标与命中区域保持不变。 */
:root{color-scheme:light;font-family:system-ui,-apple-system,"PingFang SC",sans-serif;color:#202b31;background:#e9e1d3;font-size:16px;--ink:#202b31;--paper:#faf5e9;--red:#a33329}
*{box-sizing:border-box}body{margin:0;padding:env(safe-area-inset-top) 12px env(safe-area-inset-bottom)}
.game{max-width:480px;margin:14px auto 24px;padding:14px;background:var(--paper);border:2px solid var(--ink);border-radius:8px 3px 10px 4px;box-shadow:4px 5px 0 #202b3120}header,.score,.actions{display:flex;align-items:center;justify-content:space-between;gap:8px}
header{font-size:.75rem}.header-meta{display:grid;justify-items:end;gap:3px;text-align:right}.release{color:var(--red);font-size:.7rem}.version-picker{display:flex;align-items:center;gap:5px;margin:0;font-size:.75rem}.version-picker select{width:auto;min-height:44px;padding:4px;font-size:.75rem}a{color:inherit;min-height:44px;display:inline-flex;align-items:center;text-underline-offset:4px}h1{font-family:"Kaiti SC","STKaiti",serif;font-size:2.5rem;letter-spacing:.09em;margin:12px 0 3px}.title{border-bottom:3px solid var(--ink);padding-bottom:10px}.title>span{font-size:.8rem;color:#665b52}.score{padding:12px 0}#turn{color:var(--red)}#count{font-variant-numeric:tabular-nums;font-size:.8rem}
canvas{display:block;width:100%;height:auto;aspect-ratio:540/620;border-radius:2px;touch-action:none;user-select:none;-webkit-user-select:none}
#status{min-height:3em;margin:12px 0;line-height:1.6;font-size:.875rem;color:#564d45}
button,select,input{font:inherit}button{min-height:44px;border:2px solid var(--ink);border-radius:3px 6px 2px 4px;background:var(--paper);color:var(--ink);padding:8px 10px;cursor:pointer;box-shadow:2px 2px 0 var(--ink)}.actions button{flex:1;padding:7px 3px;font-size:.8rem}#jump:not(:disabled),#fire:not(:disabled){background:var(--red);color:white}button:disabled{opacity:.4;cursor:default;box-shadow:none}button:not(:disabled):hover{filter:brightness(.93)}button:focus-visible,summary:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #177d91;outline-offset:3px}
details{border-top:1px solid #b8ac9c;margin-top:20px;padding-top:10px;font-size:.875rem;line-height:1.7}summary{cursor:pointer;min-height:44px}label{display:block;margin:12px 0}select{width:100%;min-height:44px;padding:8px;background:var(--paper);color:var(--ink);border:1px solid var(--ink);border-radius:3px}input[type=range]{display:block;width:100%;min-height:44px;accent-color:var(--red)}footer{font-size:.7rem;line-height:1.7;color:#6b6258;text-align:center;margin-top:14px}.notes-link{margin-top:14px;border-bottom:2px solid var(--ink);font-weight:700}
@media(max-width:360px){body{padding-left:6px;padding-right:6px}.game{padding:9px}h1{font-size:2.1rem}.actions{gap:5px}.actions button{font-size:.75rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
/* v2.0：真实手绘贴图、漫画生命栏与结果演出。 */
body{background:#dfd7c8}.game{max-width:560px;padding:18px 20px 24px;background-color:#f8f0df;background-image:url('../assets/board.webp');background-size:1800px auto;background-position:center top;border:3px solid #202a2c;border-radius:13px 7px 17px 8px;box-shadow:7px 8px 0 #202b312b}header{font-size:.72rem}.header-meta>span:first-child{letter-spacing:.08em}.release{display:none}.title{position:relative;border-bottom:none;padding:0 0 8px}.title h1{margin:8px 0 0;line-height:0}.title h1 img{display:block;width:100%;height:auto;max-height:155px;object-fit:contain;object-position:left center}.title>span{display:block;color:#f8efd9;background:#24343b;clip-path:polygon(1% 10%,96% 0,100% 80%,3% 100%,0 60%);padding:7px 18px;font-size:.8rem;width:max-content;max-width:100%;letter-spacing:.13em}.score{padding:8px 2px;font-size:.82rem}.life-bar{display:flex;justify-content:space-between;align-items:center;border-top:2px solid #2a3436;border-bottom:1px solid #9b8a73;padding:10px 0 9px;margin-top:9px}.life{display:flex;gap:7px;align-items:center}.life div{display:grid;gap:1px}.life b{font-size:.72rem;letter-spacing:.12em}.life span{font-size:1.4rem;letter-spacing:.12em;line-height:1.15}.life.red span{color:#ae2b20}.life.black{text-align:right}.life.black span{color:#1b3344}.versus{font-family:serif;font-size:.9rem;color:#7a6d5e;transform:rotate(-7deg)}.arena{position:relative;isolation:isolate}canvas{border-radius:0}.impact{position:absolute;left:4%;right:4%;top:38%;z-index:2;padding:13px 10px;background:#202e36;color:#fff0d3;font-family:serif;font-weight:900;font-size:1.2rem;text-align:center;box-shadow:4px 5px 0 #b13224;transform:rotate(-3deg) scale(.9);opacity:0;transition:opacity .12s,transform .15s;pointer-events:none}.impact.visible{opacity:1;transform:rotate(-3deg) scale(1)}.impact.returning{background:#775a2d;box-shadow:4px 5px 0 #243641}.actions{gap:9px}.actions button{font-family:serif;font-weight:bold;font-size:.9rem;border:3px double #222e34;border-radius:2px;box-shadow:3px 4px 0 #202b313b;background-image:url('../assets/board.webp');background-size:900px auto}.actions #jump:not(:disabled),#playAgain{background:#a12e23;color:#fff4dd;box-shadow:3px 4px 0 #202b31}#status{min-height:2.8em;font-size:.82rem}details{margin-top:14px}#showResult{width:100%;margin-top:12px;background:#9c2b23;color:#fff0d5}button[hidden]{display:none}.notes-link{border-bottom:3px double #28353a}
#result{padding:0;border:0;max-width:min(440px,92vw);width:92vw;background:transparent;overflow:visible;color:#23343c}#result::backdrop{background:#0c1821c9;backdrop-filter:blur(5px)}.result-card{position:relative;isolation:isolate;text-align:center;padding:30px 22px 24px;background:#f4e7ce url('../assets/board.webp') center top/100% auto;border:4px solid #192b36;box-shadow:9px 10px 0 #a43125;animation:result-in .45s cubic-bezier(.2,.9,.2,1.2)}.result-card::before{content:'';position:absolute;inset:-30px;z-index:-1;background:repeating-conic-gradient(from 15deg,#d2a44a 0deg 3deg,transparent 3deg 22deg);clip-path:polygon(50% 0,58% 25%,77% 5%,75% 31%,100% 20%,83% 45%,100% 60%,77% 64%,95% 91%,65% 81%,53% 100%,43% 82%,15% 96%,23% 72%,0 62%,22% 48%,0 29%,30% 31%,27% 2%,43% 25%);animation:burst-in .65s ease-out}.result-eyebrow{font-size:.85rem;letter-spacing:.5em}.victory-emblem{margin:14px auto 8px;width:106px;height:106px;border-radius:50%;display:grid;place-items:center;background:url('../assets/red.webp') center/contain no-repeat;color:#fff0d1;font-family:serif;font-size:4.2rem;font-weight:900;transform:rotate(-8deg)}#result[data-winner=black] .victory-emblem{background-image:url('../assets/black.webp')}#result[data-winner=draw] .victory-emblem{display:none}#result h2{font-family:"Kaiti SC","STKaiti",serif;font-size:3rem;margin:12px 0;color:#9e2c21;letter-spacing:.06em}#result[data-winner=black] h2{color:#18354a}#resultDetail{line-height:1.7;font-size:.9rem}#resultScore{display:block;margin:16px 0;font-size:1.4rem;letter-spacing:.1em}.result-actions{display:grid;gap:10px;margin-top:24px}.result-actions button{min-height:48px;font-weight:bold}@keyframes result-in{from{transform:scale(.6) rotate(-8deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}@keyframes burst-in{from{transform:scale(.3) rotate(-20deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}
@media(max-width:430px){.game{padding:10px;margin-top:8px}.title h1 img{max-height:115px}.life-bar{padding:8px 0}.life img{width:30px;height:30px}.life span{font-size:1.2rem}.actions button{font-size:.8rem}.actions{gap:6px}.result-card{padding:24px 14px}#result h2{font-size:2.6rem}}
@media(prefers-reduced-motion:reduce){.result-card,.result-card::before{animation:none}.impact{transition:none;transform:none}.impact.visible{transform:none}}
/* 纸纹取空白区域，避免素材边框或河流压在按钮及正文上。 */
.game{background-position:center -110px}.actions button{background-image:none}.result-card{background-size:1500px auto;background-position:center -100px}.result-card::before{opacity:.18}
/* 单屏游戏布局；更新日志页保持普通可滚动文档。 */
html:has(.play-page){height:100%;overflow:hidden}
.play-page{height:100vh;height:100dvh;overflow:hidden;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);overscroll-behavior:none}
.play-page .game{height:100%;width:100%;max-width:560px;margin:0 auto;padding:6px 10px;display:grid;grid-template-rows:44px 44px 24px minmax(0,1fr) auto auto;gap:3px;border-width:2px;border-radius:7px;box-shadow:none;background-size:3000px auto;background-position:center -110px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.play-page .game img{-webkit-user-drag:none;user-select:none;-webkit-user-select:none;pointer-events:none}
.play-page .compact-header{gap:8px;min-width:0}.play-page .compact-header h1{margin:0;line-height:0;min-width:0;width:clamp(100px,36vw,150px);font-size:0}.play-page .compact-header img{width:100%;height:42px;object-fit:contain;object-position:left center}
.play-page .top-controls{display:flex;align-items:center;gap:6px}.play-page #versionSelect{min-height:44px;max-width:132px;width:auto;font-size:12px;padding:4px;border:1px solid #7f776b;background:#f8efdf}.play-page .menu-toggle{font-size:25px;line-height:1;min-width:44px;height:44px;padding:3px 7px;border:0;background:none;box-shadow:none}
.play-page .life-bar{margin:0;padding:2px 0;border-top:1px solid #8b8171}.play-page .life img{width:26px;height:26px}.play-page .life span{font-size:1.08rem}.play-page .life b{font-size:10px}.play-page .versus{font-size:12px}.play-page .score{padding:0 2px;font-size:12px}.play-page #count{font-size:11px}
.play-page .arena{min-height:0;min-width:0;display:grid;place-items:center;overflow:hidden}.play-page canvas{max-width:100%;max-height:100%;flex:none;touch-action:none}.play-page #status{margin:0;padding:4px 2px;min-height:34px;max-height:38px;line-height:15px;font-size:12px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.play-page .context-actions{display:flex;justify-content:center;gap:6px}.play-page .context-actions[hidden]{display:none}.play-page .context-actions button{min-height:44px;font-size:13px;padding:6px 12px;flex:1}.play-page #showResult{margin:0}
.play-page dialog{user-select:text;-webkit-user-select:text}.sheet{background:#faf2e2;color:#26343a;border:3px solid #26343a;border-radius:9px 3px 8px 4px;width:min(440px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 28px);overflow:auto;overscroll-behavior:contain;padding:16px;box-shadow:5px 6px 0 #a13226}.sheet::backdrop{background:#13232ba8;backdrop-filter:blur(3px)}.sheet h2{font-family:serif;font-size:1.4rem;margin:8px 0 12px}.sheet p{font-size:14px;line-height:1.6}.sheet .sheet-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.sheet .sheet-heading button{min-width:44px;box-shadow:none}.sheet select{font-size:16px}.sheet nav{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}.sheet .wide{display:block;width:100%;margin:12px 0}.sheet .cannon-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.sheet #cannonJump{background:#a33329;color:#fff4dd}.sheet #release{display:inline;color:#9f3026}.sheet summary{min-height:44px}.cannon-sheet #cannonCancel{border:0;background:none;box-shadow:none;text-decoration:underline;text-underline-offset:4px}
@media(max-height:480px){.play-page .game{grid-template-rows:44px 32px 20px minmax(0,1fr) auto auto;gap:1px}.play-page .life img{display:none}.play-page .life div{display:flex;align-items:center;gap:8px}.play-page #status{min-height:22px;max-height:22px;-webkit-line-clamp:1}.play-page .context-actions button{min-height:44px}.play-page .impact{font-size:14px;padding:8px}.play-page #result{max-height:calc(100dvh - 24px);overflow:auto}.play-page .result-card{padding:12px}.play-page .victory-emblem{width:52px;height:52px;font-size:32px;margin:4px auto}.play-page #result h2{font-size:28px;margin:4px}.play-page #resultScore{margin:6px}.play-page .result-actions{margin-top:10px}}
/* 描述性操作提示转为棋盘中央广播，不占据棋盘下方高度。 */
.play-page .game{grid-template-rows:44px 44px 24px minmax(0,1fr) auto}
.play-page #status{position:absolute;width:1px;height:1px;min-height:0;max-height:none;margin:-1px;padding:0;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.play-page .impact{top:50%;left:5%;right:5%;transform:translateY(-50%) scale(.96);font-size:clamp(14px,3.8vw,19px);line-height:1.6;padding:12px 14px;background:#202e36eb;box-shadow:3px 4px 0 #a43125;pointer-events:none}
.play-page .impact.visible{transform:translateY(-50%) scale(1)}.play-page .impact.red-turn{background:#8d2c23eb;box-shadow:3px 4px 0 #243743}.play-page .impact.black-turn{background:#21394beb;box-shadow:3px 4px 0 #bc8c48}
@media(max-height:480px){.play-page .game{grid-template-rows:44px 32px 20px minmax(0,1fr) auto;gap:1px}.play-page .impact{padding:7px;font-size:13px}}
@media(prefers-reduced-motion:reduce){.play-page .impact,.play-page .impact.visible{transform:translateY(-50%);transition:none}}
