:root { --bg: #f3ead7; --ink: #2a2118; --muted: #7a6a55; --brand: #1f6fff; --accent: #ff7a1a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif; }
body { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; touch-action: manipulation; }
.top { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #2a2118; color: #fff; }
.top a { color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; }
.top .pub { margin-left: auto; font-size: 12px; background: rgb(255 255 255 / 15%); padding: 2px 10px; border-radius: 999px; }
section { width: 100%; max-width: 560px; padding: 16px; }
.btn { display: inline-flex; justify-content: center; align-items: center; border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
.btn.main { background: var(--accent); color: #fff; box-shadow: 0 3px 0 #c45500; width: 100%; font-size: 17px; }
.btn.sub { background: #fff; color: #0b47c1; box-shadow: inset 0 0 0 2px #d6e2ff; width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.note { min-height: 1.2em; color: #c03; font-size: 13px; text-align: center; margin: 4px 0; }
.note.info { color: var(--muted); }
.stones { display: flex; justify-content: center; gap: 10px; margin: 18px 0; }
.stones i, .stone { display: inline-block; width: 46px; height: 46px; border-radius: 50%; }
.b { background: radial-gradient(circle at 35% 30%, #666, #111 60%); }
.w { background: radial-gradient(circle at 35% 30%, #fff, #d8d2c6 70%); box-shadow: inset 0 0 0 1px #b9b0a0; }
h2 { font-size: 15px; margin: 20px 0 8px; }
.rooms { list-style: none; margin: 0; padding: 0; }
.rooms li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-radius: 12px; margin-bottom: 8px; }
.rooms li.empty { color: var(--muted); justify-content: center; }
.rooms a { margin-left: auto; font-weight: 800; color: var(--brand); text-decoration: none; white-space: nowrap; }
.rooms .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rooms .rec { flex: none; font-size: 10px; font-weight: 800; background: #ffcc00; border-radius: 999px; padding: 1px 6px; }
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 13px; background: #999; flex: none; }
.players { display: flex; align-items: center; gap: 8px; }
.pl { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff; min-width: 0; border: 2px solid transparent; }
.pl.turn { border-color: var(--accent); }
.pl .stone { width: 22px; height: 22px; flex: none; }
.pl .nm { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pl { position: relative; }
.pl .me { position: absolute; top: -9px; right: 8px; font-size: 10px; font-weight: 800; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 7px; }
@media (max-width: 420px) { .pl { gap: 6px; padding: 8px; } .pl .stone { width: 16px; height: 16px; } }
.pl .away { position: absolute; bottom: -9px; right: 8px; font-size: 10px; color: #fff; background: #c03; border-radius: 999px; padding: 1px 7px; }
.pl .nm.empty { color: var(--muted); font-weight: 400; }
.vs { font-weight: 900; color: var(--muted); font-size: 12px; }
.status { text-align: center; font-weight: 800; margin: 12px 0 8px; min-height: 1.4em; }
.board-wrap { width: 100%; aspect-ratio: 1; }
canvas { width: 100%; height: 100%; display: block; border-radius: 10px; box-shadow: 0 4px 14px rgb(60 40 10 / 25%); }
.actions { display: grid; gap: 8px; margin-top: 14px; }
.watch { text-align: center; color: var(--muted); font-size: 13px; }
