*{box-sizing:border-box}
:root{font-family:system-ui,-apple-system,"Segoe UI","Noto Sans JP",sans-serif;color:#243b2f;background:#f3f6f4;font-synthesis:none}
body{margin:0}button,input,select{font:inherit}button{border:0;cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.4}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #bda05b;outline-offset:3px}[hidden]{display:none!important}
main{width:min(100% - 28px,470px);margin:24px auto 36px}header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:22px}h1{font-size:25px;font-weight:750;letter-spacing:.015em;margin:0}.quiet{background:transparent;color:#60766a;padding:10px;font-size:14px;border-radius:8px}.quiet:hover:not(:disabled){background:#e4ece6}

.online-meta{display:flex;align-items:center;justify-content:space-between;font-size:14px;color:#657c6e}.online-meta .quiet{font-size:13px}.notice{font-size:14px;color:#8d5936;line-height:1.65;margin:10px 0 16px}.notice:empty{display:none}#leaderboard{padding:12px 12px 12px 36px;background:#fff;border-radius:10px;font-size:14px}#leaderboard li{padding:5px 4px}#leaderboard li span{float:right;font-variant-numeric:tabular-nums}
.scores{display:flex;justify-content:space-between;align-items:center;gap:6px;margin:10px 0}.score{display:flex;align-items:center;gap:10px;border-radius:12px;padding:9px 12px;min-width:128px;max-width:40%}.score.active{background:#fff}.score>.disc{width:25px;flex-shrink:0}.score>div{min-width:0}.score span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:13px;max-width:112px}.score strong{font-size:26px;line-height:1.3;font-weight:650;font-variant-numeric:tabular-nums}.score small{display:block;font-size:12px;color:#7e8f83}.score small b{color:#415d4c}.turn{font-size:14px;font-weight:650;text-align:center;line-height:1.6}
.board-wrap{background:#264b37;padding:9px;border-radius:12px;box-shadow:0 5px 18px #233e2c14}.board{display:grid;grid-template-columns:repeat(8,1fr);gap:1px;background:#34583f}.cell{aspect-ratio:1;min-width:0;background:#57856a;position:relative;display:grid;place-items:center;padding:6px;border-radius:0}.cell:nth-child(16n+2),.cell:nth-child(16n+4),.cell:nth-child(16n+6),.cell:nth-child(16n+8),.cell:nth-child(16n+9),.cell:nth-child(16n+11),.cell:nth-child(16n+13),.cell:nth-child(16n+15){background:#5d8b70}.cell:disabled{opacity:1}.cell.selected{box-shadow:inset 0 0 0 3px #ebcc85}.cell.last:after{content:'';position:absolute;bottom:3px;width:4px;height:4px;background:#f1dca2;border-radius:50%}.disc{display:block;aspect-ratio:1;width:100%;border-radius:50%;box-shadow:0 2px 3px #09221655;pointer-events:none}.black{background:radial-gradient(circle at 35% 25%,#48534b,#202b24 65%)}.white{background:radial-gradient(circle at 35% 25%,#fff,#e4eae2 85%)}.ghost{opacity:.52;outline:2px dashed #f1ce78;outline-offset:1px}.will-flip .disc{outline:3px solid #eaca80;outline-offset:1px}.hint{width:17%;aspect-ratio:1;border-radius:50%;background:#d6e7cbbb;pointer-events:none}.board-footer{display:flex;justify-content:space-between;gap:10px;min-height:30px;padding:8px 2px;font-size:12px;color:#7a8b7e}
.workbench{display:flex;justify-content:center;gap:38px;align-items:center;margin:10px 0 18px}.builder{display:grid;grid-template-columns:repeat(2,1fr);gap:5px;width:142px;flex-shrink:0}.builder button{aspect-ratio:1;border-radius:9px;background:#e4ebe5;padding:13px;color:#98ad9d;font-size:25px;display:grid;place-items:center}.builder button.filled{background:#d6e2d4}.builder button.pivot .disc{outline:2px solid #bca05b;outline-offset:3px}.actions{display:flex;flex-direction:column;gap:10px;align-items:stretch;width:138px}.primary{background:#315f43;color:#fff;border-radius:9px;padding:13px;font-weight:650;font-size:15px}.primary:not(:disabled):hover{background:#244d34}.primary:disabled{opacity:1;background:#e1e9df;color:#9aab97}details{font-size:14px;color:#7c8e7f;line-height:1.9;margin-top:25px}summary{cursor:pointer;width:max-content;margin:0 auto}ul{padding-left:20px}
@media(max-width:390px){main{width:calc(100% - 20px);margin-top:16px}h1{font-size:23px}.score{min-width:105px;padding:8px;gap:8px}.score span{max-width:82px}.score>.disc{width:22px}.turn{font-size:13px}.cell{padding:5px}.workbench{gap:28px}.builder{width:130px}.actions{width:120px}}
.menu-view header{margin-top:42px;justify-content:center}.menu-view header h1{font-size:30px;text-align:center}.menu-screen{min-height:320px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:26px;padding:36px 0}.mode-choices{display:flex;flex-direction:column;gap:16px;width:min(100%,310px)}.mode-choices button{background:#e3ece5;color:#315b40;font-size:20px;font-weight:650;border-radius:12px;padding:24px 18px}.mode-choices button:hover{background:#d5e3d8}.nickname{font:inherit;background:#fff;color:#294734;border:0;border-radius:9px;padding:12px 16px;width:min(100%,310px);font-size:16px}.menu-screen h2,.matching-view h2{font-size:19px;font-weight:600;margin:0;color:#587362}.level-choices{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;width:min(100%,350px)}.level-choices button{aspect-ratio:1;border-radius:10px;background:#e3ece5;color:#315b40;font-size:22px;font-weight:600}.level-choices button:hover{background:#d5e3d8}.matching-view{min-height:220px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:30px}.spinner{width:28px;height:28px;border:3px solid #dce6de;border-top-color:#497856;border-radius:50%;animation:spin 1s linear infinite}.menu-view #online-status{text-align:center}.menu-view #match{display:block;min-width:160px;margin:16px auto}.back-row{text-align:center;margin:20px 0 0}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation:none}}@media(max-width:390px){.menu-view header h1{font-size:27px}.level-choices{gap:8px}.menu-screen{min-height:300px}}
