/* ──────────────────────────────────────────────
   7セグ風フォント（DSEG）読み込み
────────────────────────────────────────────── */
@font-face {
  font-family: 'DSEG7ClassicMini-Bold';
  src: url('https://cdn.jsdelivr.net/npm/dseg@0.46.0/fonts/DSEG7-Classic-MINI/DSEG7ClassicMini-Bold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/npm/dseg@0.46.0/fonts/DSEG7-Classic-MINI/DSEG7ClassicMini-Bold.woff')  format('woff');
  font-weight: normal;
  font-style: normal;
}

/* ──────────────────────────────────────────────
   ベースレイアウト
────────────────────────────────────────────── */
body {
  margin: 0;
  font-family: "Helvetica Neue", sans-serif;
  background: linear-gradient(to bottom, #333, #000);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
}

/* ──────────────────────────────────────────────
   コンテナ
────────────────────────────────────────────── */
.container {
  text-align: center;
  width: 80vw;
  max-width: 80vw;
  padding: 0 4vw;
}

/* ──────────────────────────────────────────────
   見出し
────────────────────────────────────────────── */
h2 {
  margin-bottom: 4vh;
  font-size: 8vw;
}

/* ──────────────────────────────────────────────
   デジタル表示部
   — ID #display に直接当てるように変更しました。
────────────────────────────────────────────── */
#display {
  /* 必ず inline-block にしておく */
  display: inline-block;
  /* 先に DSEG フォント、そのあと通常等幅フォントへフォールバック */
  font-family: 'DSEG7ClassicMini-Bold', monospace;
  /* フォントの太さ・スタイルは normal に */
  font-weight: normal;
  font-style: normal;
  /* 数字サイズと間隔 */
  font-size: 16vw;
  line-height: 1;
  letter-spacing: 0.25em;
  /* 横幅だけ細く */
  transform: scale(0.9, 1);
  margin-bottom: 5vh;
}

/* ──────────────────────────────────────────────
   キーパッド
────────────────────────────────────────────── */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6vw;
  width: 80vw;
  max-width: 80vw;
}

/* ──────────────────────────────────────────────
   各キー
────────────────────────────────────────────── */
.key {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 11vw;
  width: 20vw;
  height: 20vw;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.key:hover,
.key:active {
  background: rgba(255, 255, 255, 0.3);
}

.key.delete {
  font-size: 12vw;
}

/* ──────────────────────────────────────────────
   ビデオコンテナ
────────────────────────────────────────────── */
#videoContainer {
  display: none;
  margin-top: 6vh;
  width: 100vw;
  max-width: 90vw;
}

video {
  width: 100%;
  border: 2px solid white;
}
