* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #10161a; color: #fff; overflow: hidden;
  font-family: "Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic","Meiryo",system-ui,sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#stage { position: relative; width: 360px; height: 640px; }
#cv { display: block; width: 100%; height: 100%; touch-action: none; border-radius: 6px; }
.hidden { display: none !important; }
#pauseBtn { position: absolute; top: 4px; right: 4px; width: 40px; height: 28px; border: 0; border-radius: 8px;
  background: rgba(255,255,255,0.2); color: #fff; font-weight: 900; font-size: 14px; cursor: pointer; }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(8,16,12,0.86); padding: 20px 18px; text-align: center; overflow-y: auto; }
h1 { margin: 0 0 12px; font-size: 34px; letter-spacing: 2px; text-shadow: 0 3px 0 #0b3a5e; }
h1 small { display: block; font-size: 16px; color: #ffd23f; letter-spacing: 6px; margin-top: 4px; }
h2 { margin: 0 0 10px; font-size: 28px; }
.howto { background: rgba(255,255,255,0.07); border-radius: 12px; padding: 10px 14px; font-size: 14px; line-height: 1.6; text-align: left; max-width: 320px; }
.howto p { margin: 4px 0; }
.howto ul { margin: 4px 0; padding-left: 0; list-style: none; }
.howto li { margin: 3px 0; }
.keys { color: #bcd; font-size: 12.5px; }
.chip { display: inline-block; border-radius: 6px; padding: 0 6px; font-weight: 900; font-size: 12px; margin-right: 4px; }
.chip.red { background: #d93030; } .chip.brown { background: #9a5b2b; } .chip.blue { background: #2b8fd6; }
.btns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; width: 100%; max-width: 280px; }
button { font: inherit; }
.btns button { border: 0; border-radius: 12px; padding: 13px 10px; font-size: 17px; font-weight: 900; background: #2f4d5e; color: #fff; cursor: pointer; }
.btns button.primary { background: #ffb020; color: #2a1800; }
.btns button small { display: block; font-size: 11.5px; font-weight: 600; opacity: 0.8; }
button:focus-visible { outline: 3px solid #fff; }
.verdict { font-size: 14px; line-height: 1.5; max-width: 320px; margin: 0 0 8px; color: #ffe9b0; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13.5px; text-align: left; max-width: 320px; margin: 4px 0; }
dt { color: #9fc; font-weight: 800; white-space: nowrap; }
dd { margin: 0; }
.link { margin-top: 12px; background: none; border: 0; color: #9ab; text-decoration: underline; font-size: 12px; cursor: pointer; }
/* 一時停止中も盤面が読めるよう薄く */
#pause { background: rgba(8,16,12,0.45); justify-content: flex-end; padding-bottom: 120px; }
#pause h2 { text-shadow: 0 2px 6px #000; }
.tip { font-size: 13px; line-height: 1.5; max-width: 320px; margin: 0 0 8px; color: #bfe8ff; background: rgba(80,160,255,0.12); border-radius: 8px; padding: 6px 10px; }
.tip:empty { display: none; }
#rotate { display: none; position: fixed; left: 8px; top: 8px; font-size: 12px; color: #9ab; }
@media (orientation: landscape) and (max-height: 500px) { #rotate { display: block; } }
