/* GO — side panel and dialogs. Stage is a fixed 1920x1080 scene scaled to fit. */
:root { --ink: #1b1510; --paper: #f1e7d2; --gold: #d9b35b; --muted: #9c8f76; --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif; --serif: Georgia, "Times New Roman", serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: var(--font); color: var(--paper); user-select: none; -webkit-user-select: none; }
#stage { position: fixed; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%); transform-origin: center center; }
#game { position: absolute; left: 0; top: 0; display: block; }

#panel { position: absolute; left: 1280px; top: 60px; width: 600px; height: 960px; padding: 26px 28px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(28,22,16,.93), rgba(14,11,8,.95)); border: 1px solid rgba(217,179,91,.35); box-shadow: 0 24px 60px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.kanji { font-family: "Yu Mincho", "MS Mincho", "Noto Serif CJK JP", serif; font-size: 64px; line-height: 1; color: var(--gold); text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.kanji.big { font-size: 110px; margin-bottom: 4px; }
.title { font-family: var(--serif); font-size: 40px; letter-spacing: 10px; line-height: 1; }
.sub { font-size: 12px; letter-spacing: 5px; color: var(--muted); margin-top: 6px; }
.card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); transition: border-color .3s, box-shadow .3s; }
.card.active { border-color: var(--gold); box-shadow: 0 0 22px rgba(217,179,91,.25); }
.card.low .clock { color: #ff6b6b; animation: blink .8s infinite; }
.card .stone { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset -6px -8px 12px rgba(0,0,0,.6), 0 4px 8px rgba(0,0,0,.6); }
.card .stone.black { background: radial-gradient(circle at 35% 30%, #666, #1a1a1a 55%, #000); }
.card .stone.white { background: radial-gradient(circle at 35% 30%, #fff, #e8e4d8 55%, #b7b2a3); }
.card .who { flex: 1; } .card .name { font-size: 20px; font-weight: 700; } .card .caps { font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.card .clock { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--paper); }
#status { font-family: var(--serif); font-size: 22px; letter-spacing: 1px; margin-top: 4px; }
#winbar { height: 8px; border-radius: 4px; background: #e9e4d6; overflow: hidden; position: relative; border: 1px solid rgba(0,0,0,.4); }
#winbar span { position: absolute; left: 0; top: 0; bottom: 0; width: var(--b, 50%); background: #111; transition: width .5s; }
#think { font-size: 14px; color: var(--gold); letter-spacing: 1px; min-height: 18px; }
#think.on::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--gold); animation: blink 1s infinite; }
#message { font-size: 13px; letter-spacing: 2px; color: var(--muted); min-height: 18px; }
.row { display: flex; gap: 10px; } .row.sound { align-items: center; margin-top: 2px; }
.btn { flex: 1; font-family: var(--font); font-weight: 700; letter-spacing: 2px; font-size: 14px; cursor: pointer; color: var(--paper); border: 1px solid rgba(217,179,91,.35); background: linear-gradient(180deg, #3a2f22, #241c13); border-radius: 10px; padding: 0 10px; height: 46px; box-shadow: 0 4px 0 #0a0806, 0 8px 16px rgba(0,0,0,.4); transition: transform .06s, filter .15s; }
.btn:hover { filter: brightness(1.15); } .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #0a0806; }
.btn:disabled { filter: grayscale(.5) brightness(.6); cursor: default; transform: none; }
.btn.gold { background: linear-gradient(180deg, #f3dfa6, #d9b35b 40%, #9a7a2c 90%); color: #241a08; border-color: #5a4612; }
.btn.warn { color: #ffb0a0; } .btn.toggle.on { background: linear-gradient(180deg, #5a4a2a, #3a2f1a); border-color: var(--gold); color: #ffe7b0; }
.btn.icon { flex: 0 0 46px; border-radius: 50%; padding: 0; font-size: 18px; } #btn-sound.muted { filter: grayscale(.7) brightness(.7); }
#vol { flex: 1; accent-color: var(--gold); cursor: pointer; }
.btn.big { height: 60px; font-size: 20px; letter-spacing: 4px; width: 100%; margin-top: 14px; }
#scoring { border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; } #scoring p { font-size: 13px; color: var(--muted); margin: 6px 0 10px; line-height: 1.45; }
#score-text { font-size: 14px; line-height: 1.5; margin-bottom: 10px; color: var(--paper); }
.h { font-family: var(--serif); letter-spacing: 6px; color: var(--gold); font-size: 16px; }
.hint { margin-top: auto; font-size: 12px; letter-spacing: 1px; color: #6e634f; text-align: center; }
.modal { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.62); }
.modal.hidden, .hidden { display: none !important; }
.box { width: 640px; padding: 34px 40px 36px; border-radius: 20px; text-align: center; background: linear-gradient(180deg, #2a2219, #15100b); border: 2px solid rgba(217,179,91,.5); box-shadow: 0 40px 100px rgba(0,0,0,.8); }
.box .h { margin-bottom: 14px; }
#result-text { font-family: var(--serif); font-size: 40px; margin: 10px 0 8px; } #result-sub { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.box.setup .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; text-align: left; }
.box.setup label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: 2px; color: var(--muted); }
.box.setup select, .box.setup input { font-family: var(--font); font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(217,179,91,.35); background: #100c08; color: var(--paper); }
.note { margin-top: 14px; font-size: 12px; letter-spacing: 2px; color: #6e634f; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
