@font-face {
  font-family: "DotGothic16 Embedded";
  src: url("DotGothic16-hn-subset.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  height: var(--vv-h, 100dvh);
  background: #f7f7f7;
  color: #535353;
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-family: "DotGothic16", "DotGothic16 Embedded", sans-serif;
}
:root {
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  /* 専用ヘッダー帯: サイト共通の「← GAMES」と一時停止ボタンだけが入る。
     ゲームの絵・文字・ボタンはこの帯より下にしか置かない。 */
  --hdr-h: 60px;
}
#hdr {
  position: fixed;
  left: 0; right: 0; top: 0;
  height: calc(var(--hdr-h) + var(--safe-t));
  background: #f7f7f7;
  border-bottom: 2px solid #535353;
  z-index: 5;
}
#area {
  position: fixed;
  left: var(--safe-l);
  right: var(--safe-r);
  top: calc(var(--hdr-h) + var(--safe-t));
  height: calc(100vh - var(--hdr-h) - var(--safe-t) - var(--safe-b));
  height: calc(100dvh - var(--hdr-h) - var(--safe-t) - var(--safe-b));
  height: calc(var(--vv-h, 100dvh) - var(--hdr-h) - var(--safe-t) - var(--safe-b));
  overflow: hidden;
  touch-action: none;
  z-index: 1;
}
#stage {
  position: absolute;
  left: 0; top: 0;
  width: 390px;
  height: 640px;
  transform-origin: 0 0;
  background: #f7f7f7;
  overflow: hidden;
}
#stage.framed { box-shadow: -2px 0 0 #535353, 2px 0 0 #535353; }
#cv { position: absolute; left: 0; top: 0; width: 390px; height: 640px; display: block; }
#stage, #stage * { font-family: inherit; }
.txt {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  pointer-events: none;
  color: #535353;
  white-space: nowrap;
  text-shadow: 2px 0 #f7f7f7, -2px 0 #f7f7f7, 0 2px #f7f7f7, 0 -2px #f7f7f7;
}
#msg, #sub {
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
  overflow: hidden;
}
#msg { top: 30px; font-size: 26px; line-height: 32px; }
#sub { top: 64px; font-size: 26px; line-height: 32px; }
#title-panel { top: 30px; display: none; }
#t-title { font-size: 36px; line-height: 42px; font-weight: normal; }
#t-sub { font-size: 20px; line-height: 26px; margin-top: 2px; }
#t-catch { font-size: 19px; line-height: 27px; margin-top: 12px; }
#t-how { font-size: 20px; line-height: 26px; margin-top: 12px; }
#over-panel { top: 104px; display: none; }
#o-score { font-size: 24px; line-height: 30px; }
#o-best { font-size: 20px; line-height: 28px; margin-top: 2px; }
.show { display: block !important; }
#btn {
  position: absolute;
  left: 115px;
  width: 160px;
  height: 52px;
  top: 480px;
  border: 2px solid #535353;
  border-radius: 8px;
  background: #f7f7f7;
  color: #535353;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  touch-action: none;
}
#btn:active, #btn.down { transform: translateY(2px); background: #ececec; }
#btn.wait { opacity: .45; }

/* サイト共通ボタン（game-back.css / game-pause.js）を専用ヘッダー帯の中へ移す。
   サイト側CSSより後で読まれても勝つように詳細度を上げている。 */
html body a.xx-back {
  top: calc(var(--safe-t) + 18px);
  bottom: auto;
  left: calc(var(--safe-l) + 10px);
  opacity: .9;
}
html body button.xx-pause {
  top: calc(var(--safe-t) + 18px);
  bottom: auto;
  left: calc(var(--safe-l) + 92px);
  opacity: .9;
}
