[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #e8e4da; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
body { font-family: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "Zen Maru Gothic", "BIZ UDPGothic", sans-serif; color: #2b2b2b; }
#stage { position: fixed; inset: 0; }
#sheets { position: absolute; inset: 0; }
.sheet { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: translateX(6%); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.sheet.left { transform: translateX(-6%); }
.sheet.on { opacity: 1; transform: none; }
.sheet.instant { transition: none; }
.gr-text { font-family: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "Zen Maru Gothic", sans-serif; paint-order: stroke; }
.gr-text.b { font-weight: 700; }
.gr-text.serif { font-family: "Hiragino Mincho ProN", "Shippori Mincho", serif; }
.gr-meta { font-size: 18px; fill: #b0aa9c; font-family: "Hiragino Maru Gothic ProN", sans-serif; }

/* 全体を見る */
body.overview #sheets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2vw; padding: 1.2vw; box-sizing: border-box; overflow: auto; }
body.overview .sheet { position: relative; opacity: 1; transform: none; height: auto; aspect-ratio: 16 / 10; box-shadow: 0 2px 10px rgba(0,0,0,.15); }

/* 右下の小さな表示 */
#hud { position: fixed; right: 10px; bottom: 8px; display: flex; align-items: center; gap: 8px; z-index: 5; opacity: .55; }
#hud:hover { opacity: 1; }
#count { font-size: 13px; color: #8a8478; min-width: 52px; text-align: right; }
.mic { width: 12px; height: 12px; border-radius: 50%; background: #b9b4a8; }
.mic.listening { background: #2e9e5b; }
.mic.listening.hear { box-shadow: 0 0 0 5px rgba(46,158,91,.35); }
.mic.error { background: #e0453a; }
#gear { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #c9c3b6; background: #fffdf8; font-size: 18px; color: #6d675b; padding: 0; }

#panel { position: fixed; right: 10px; bottom: 52px; width: min(360px, 90vw); max-height: 80vh; overflow: auto; background: #fffdf8; border: 1px solid #d8d2c4; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 14px 16px; z-index: 6; font-size: 15px; }
#panel h3 { margin: 4px 0 8px; font-size: 15px; }
#panel .row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
#panel button { font: inherit; padding: 8px 12px; border-radius: 8px; border: 1px solid #c9c3b6; background: #f4f1ea; }
#panel label { display: flex; align-items: center; gap: 6px; }
#panel input[type=range] { flex: 1; }
#panel .hint { font-size: 12px; color: #8a8478; line-height: 1.5; }
#jump { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
#jump li { padding: 5px 6px; border-bottom: 1px dotted #ddd6c7; cursor: pointer; }
#jump li.done { color: #a8a294; }

#caption { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; max-width: 80vw; background: rgba(43,43,43,.75); color: #fff; padding: 6px 14px; border-radius: 8px; font-size: 18px; z-index: 4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#debug { position: fixed; left: 8px; top: 8px; background: rgba(255,253,248,.95); border: 1px solid #d8d2c4; border-radius: 8px; padding: 8px 10px; font-size: 12px; z-index: 4; max-width: 46vw; line-height: 1.5; }
#debug .ok { color: #2e9e5b; font-weight: 700; }
#debug .buf { color: #6d675b; word-break: break-all; }
#toast { position: fixed; left: 50%; top: 14px; transform: translate(-50%, -80px); background: #2b2b2b; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 15px; z-index: 9; transition: transform .3s; max-width: 90vw; }
#toast.on { transform: translate(-50%, 0); }

/* 始める画面 */
#start { position: fixed; inset: 0; background: #fffdf8; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; box-sizing: border-box; text-align: center; }
#start h1 { font-size: clamp(26px, 4vw, 44px); margin: 0; }
#start p { margin: 0; color: #6d675b; }
#start .btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
#start button { font: inherit; font-size: 19px; padding: 14px 22px; border-radius: 12px; border: 2px solid #2b2b2b; background: #fff; }
#start button.main { background: #2b2b2b; color: #fff; }
#start button:disabled { opacity: .35; }
#start .note { font-size: 13px; color: #8a8478; max-width: 640px; line-height: 1.7; text-align: left; }
#start .small { font-size: 14px; display: flex; gap: 6px; align-items: center; }
