:root {
  --ink: #f1e4c8;
  --dim: #b7a37f;
  --gold: #f2b54a;
  --bg: #0e0a07;
  --red: #d2553b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden;
  font-family: 'Zen Old Mincho', 'Hiragino Mincho ProN', serif; user-select: none; -webkit-user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
/* お知らせのベル（/news.js）。タイトルの間だけ右上に */
.ss-news { position: fixed; z-index: 5; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; background: rgba(14,10,7,.78); border: 1px solid #5a4630; color: var(--gold); box-shadow: 0 4px 16px rgba(0,0,0,.5); cursor: pointer; }
#title.hidden ~ .ss-news { display: none; }

#hud { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 0; pointer-events: none; text-shadow: 0 2px 6px #000; }
.label { font-size: 12px; letter-spacing: .2em; color: var(--dim); }
.floor { font-size: 34px; font-weight: 900; line-height: 1.1; }
.floor small { font-size: 14px; margin-left: 2px; }
.hud-center { text-align: center; padding-top: 4px; }
.moves { font-size: 22px; letter-spacing: .25em; color: var(--gold); min-height: 28px; }
.moves .used { color: #4a3d2c; }
.order { font-size: 14px; color: var(--ink); margin-top: 2px; }
.hud-right { text-align: right; }
.lives { font-size: 20px; letter-spacing: .15em; color: var(--gold); margin-top: 4px; }
.lives .lost { color: #3f3428; }

.flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(210,85,59,.0) 30%, rgba(210,85,59,.45)); transition: opacity .25s; }
.flash.on { opacity: 1; }
.fade { position: fixed; inset: 0; pointer-events: none; background: #000; opacity: 0; transition: opacity .45s; }
.fade.on { opacity: 1; }
.banner { position: fixed; left: 0; right: 0; top: 42%; text-align: center; font-size: 30px; font-weight: 900; letter-spacing: .2em;
  pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; text-shadow: 0 3px 12px #000; }
.banner.on { opacity: 1; transform: none; }
.banner.miss { color: var(--red); }

.panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(88vw, 360px);
  max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 28px 22px 22px; text-align: center; background: rgba(14,10,7,.82); border: 1px solid #5a4630; border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6); backdrop-filter: blur(3px); }
h1 { margin: 0 0 10px; font-size: 34px; font-weight: 900; letter-spacing: .25em; color: var(--gold); }
.sub { margin: 0 0 16px; line-height: 1.7; font-size: 15px; }
.rules { list-style: none; padding: 0; margin: 0 0 22px; font-size: 13px; color: var(--dim); line-height: 2; }
.rules li::before { content: '◆ '; color: var(--gold); }
.btn { display: block; width: 100%; margin-top: 10px; padding: 13px 0; font: inherit; font-size: 17px; font-weight: 700; letter-spacing: .2em;
  color: #1a1209; background: linear-gradient(#f5c66a, #c98a2a); border: 0; border-radius: 4px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid #6b5538; }
.big { font-size: 36px; font-weight: 900; margin: 6px 0; color: var(--gold); }
.score { font-size: 16px; margin-bottom: 14px; }
.extra { font-size: 15px; color: var(--ink); margin: 2px 0 8px; letter-spacing: .05em; }
.extra:empty { display: none; }
.label.headline { font-size: 20px; font-weight: 900; color: var(--gold); letter-spacing: .3em; }
