/* ============ カスタムフォント ============ */
@font-face {
  font-family: 'x8y12pxDenkiChip';
  src: url('../x8y12pxDenkiChip.woff2') format('woff2'),
       url('../x8y12pxDenkiChip.ttf')   format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ============ 基本リセット ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #05030a;
  font-family: 'x8y12pxDenkiChip', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', monospace;
  color: #f4eefb;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  /* 横スワイプで「戻る」操作が発火しないよう、ブラウザの overscroll を抑える。
     touch-action: none で iOS Safari のエッジスワイプも極力抑制。 */
  overscroll-behavior: contain;
  touch-action: none;
}

/* ============ ステージ（縦長 720x1280 を等比スケール）============ */
#viewport {
  position: fixed; inset: 0;
  overflow: hidden;
  background: #05030a;
}
#stage {
  position: absolute;
  top: 0; left: 0;
  width: 720px; height: 1280px;
  transform-origin: top left;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
#scene { position: absolute; inset: 0; }
.scene { position: absolute; inset: 0; }

/* ============ 横持ち時のヒント（スマホのみ）============ */
#rotate-hint {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.95);
  z-index: 50;
  text-align: center;
  padding: 24px;
}
#rotate-hint p { font-size: 24px; line-height: 1.75; opacity: 0.9; }
@media (orientation: landscape) and (max-height: 540px) {
  #rotate-hint { display: flex; }
}

/* ============ 汎用ボタン ============ */
.btn {
  font-family: inherit;
  font-size: 24px;
  padding: 20px 28px;
  width: 460px;
  border: 3px solid #ffe27a;
  border-radius: 0;
  background: #2a1848;
  color: #f4eefb;
  cursor: pointer;
  box-shadow: 5px 5px 0 #000;
  line-height: 1.5;
}
.btn:active {
  box-shadow: 2px 2px 0 #000;
  transform: translate(3px, 3px);
}
.btn.primary {
  background: #ffe27a;
  color: #1a0828;
  border-color: #ffffff;
  font-weight: 700;
}
.btn.ghost { background: #180e30; border-color: #9d7fd6; }

/* ============ タイトル ============ */
.title .title-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.title-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
  padding: 48px;
}
.title-logo {
  font-size: 72px;
  line-height: 1.2;
  text-align: center;
  color: #ffe27a;
  text-shadow: 4px 4px 0 #000000, -2px -2px 0 #000000;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.title-sub { font-size: 24px; line-height: 1.5; opacity: 0.82; margin-bottom: 24px; }
.title-menu { display: flex; flex-direction: column; gap: 24px; }
.title-foot { margin-top: 24px; font-size: 12px; opacity: 0.5; }

/* ============ ノベル ============ */
.novel-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.novel-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.novel-text {
  position: absolute;
  left: 40px; right: 40px; top: 160px;
  font-size: 26px; line-height: 1.75;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
  pointer-events: none;
  white-space: pre-wrap;
}
/* ノベル中・タイトル画面のメニューボタン（右上）*/
.novel-menu,
.title-menu-btn {
  position: absolute;
  top: 20px; right: 20px;
  width: 72px; height: 72px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  background: rgba(13, 6, 32, 0.82);
  border: 3px solid #ffe27a;
  cursor: pointer;
  z-index: 6;
}
.novel-menu span,
.title-menu-btn span { width: 34px; height: 4px; background: #f4eefb; }
.novel-menu:active span,
.title-menu-btn:active span { background: #ffe27a; }
.novel-advance {
  position: absolute; right: 40px; bottom: 40px;
  font-size: 28px; color: #ffe27a;
  text-shadow: 2px 2px 0 #000;
  animation: bob 0.8s steps(2, end) infinite;
  pointer-events: none;
}
.novel-advance.auto {
  left: 40px; right: 40px;
  text-align: center;
  font-size: 24px;
}
.novel-tap-hint {
  position: absolute;
  left: 0; right: 0; bottom: 60px;
  text-align: center;
  font-size: 28px;
  color: #ffe27a;
  text-shadow: 3px 3px 0 #000;
  pointer-events: none;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1.0; } }
.novel-choices {
  position: absolute;
  left: 0; right: 0; bottom: 300px;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px;
}

/* ============ スコアモード イントロ ============ */
@keyframes score-sway-in {
  0%   { opacity: 0;    filter: blur(32px) brightness(3.2) saturate(0.2); transform: scale(1.18) translateY(-20px); }
  15%  { opacity: 0.45; filter: blur(20px) brightness(2.4) saturate(0.4); transform: scale(1.10) translate(-14px, -10px); }
  30%  { opacity: 0.72; filter: blur(11px) brightness(1.7) saturate(0.65); transform: scale(1.05) translate(9px, -5px); }
  46%  { opacity: 0.88; filter: blur(5px)  brightness(1.25) saturate(0.85); transform: scale(1.025) translate(-5px, -2px); }
  61%  { opacity: 0.95; filter: blur(2px)  brightness(1.08); transform: scale(1.01) translate(3px, -1px); }
  75%  { filter: blur(0.8px) brightness(1.03); transform: scale(1.004) translate(-1px, 0); }
  88%  { filter: blur(0.2px) brightness(1.01); transform: scale(1.001); }
  100% { opacity: 1;    filter: blur(0) brightness(1) saturate(1); transform: scale(1) translate(0, 0); }
}
.score-sway-in {
  animation: score-sway-in 3.2s cubic-bezier(0.22, 0.6, 0.36, 1) both;
}

/* ============ ブロック崩し画面 ============ */
.breaker { display: flex; flex-direction: column; }

/* --- 上部 HUD（2段）--- */
.hud {
  height: 216px;
  display: flex; flex-direction: column;
  background: #160d2e;
  border-bottom: 3px solid #ffe27a;
}

/* 1段目：残基 / 多用途表示エリア / メニュー */
.hud-top {
  height: 96px;
  display: flex; align-items: stretch;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}
.hud-lives {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; padding: 0 14px;
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  max-width: 300px;
}
.hud-lives .heart { width: 24px; height: 24px; }
.hud-lives .heart.on rect { fill: #ff3860; }
.hud-lives .heart.off rect { fill: rgba(255, 255, 255, 0.12); }

.hud-display {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  gap: 6px; padding: 0 18px;
}
.hud-display-label { font-size: 24px; letter-spacing: 1px; opacity: 0.7; }
.hud-display-value { font-size: 24px; color: #ffe27a; }
/* スコアアタックモード：プログレスバーを隠し、スコア値を少し大きく */
.hud-display.attack .hud-bar { display: none; }
.hud-display.attack .hud-display-value { font-size: 36px; }
.hud-bar {
  position: relative;
  width: 100%; height: 10px;
  background: #0a0618;
  border: 2px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.hud-bar-markers { position: absolute; inset: 0; pointer-events: none; }
.hud-bar-marker {
  position: absolute; top: 0; bottom: 0;
  width: 2px;
  background: rgba(255, 226, 122, 0.9);
  transform: translateX(-50%);
}
.hud-bar-marker::before {
  content: '';
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255, 226, 122, 0.9);
}
.hud-bar-fill {
  height: 100%; width: 0%;
  background: #4488ff;
}

.hud-menu {
  width: 80px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  background: transparent; border: none;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}
.hud-menu span {
  width: 36px; height: 4px;
  background: #f4eefb;
}
.hud-menu:active span { background: #ffe27a; }

/* 2段目：キャラ顔＋台詞 */
.hud-bottom {
  flex: 1;
  display: flex; align-items: center;
  gap: 16px; padding: 0 16px;
}
.hud-face {
  width: 84px; height: 84px;
  border: 3px solid #ffe27a;
  background: #0d0620;
  flex-shrink: 0;
  image-rendering: pixelated;
}
.hud-speech { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.hud-name { font-size: 24px; color: #ffe27a; text-shadow: 2px 2px 0 #000; }
.hud-text { font-size: 24px; line-height: 1.5; }
/* ステータス（スコアモードの進捗注釈。台詞の右側・右寄せ）。
   行は閾値を超えた順に上から積み上がる。空なら自然に消える。 */
.hud-status {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  text-align: right;
}
.hud-status-line {
  font-size: 24px; line-height: 1.1;
  color: #ff8aa6;
  text-shadow: 2px 2px 0 #000;
}

/* --- プレイエリア --- */
.breaker-play {
  position: relative;
  width: 720px; height: 1064px;
}
.breaker-canvas {
  display: block; width: 720px; height: 1064px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* --- リザルト --- */
.breaker-result {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.85);
  z-index: 10;
}
.result-panel {
  width: 560px; max-width: 88%;
  padding: 48px 36px;
  text-align: center;
  border-radius: 0;
  background: #0d0620;
  border: 3px solid #9d7fd6;
  box-shadow: 6px 6px 0 #000;
}
.result-panel.win h2 { color: #ffe27a; text-shadow: 3px 3px 0 #000; }
.result-panel.lose h2 { color: #ff8aa6; text-shadow: 3px 3px 0 #000; }
.result-panel h2 { font-size: 48px; margin-bottom: 24px; line-height: 1.25; }
.result-panel p { font-size: 24px; line-height: 1.5; opacity: 0.85; margin-bottom: 36px; }
.result-tip {
  width: 100%;
  margin: -12px 0 24px;
  padding: 14px 18px;
  background: #1a0e36;
  border-left: 4px solid #ffe27a;
  text-align: left;
  font-size: 20px; line-height: 1.5;
  display: flex; flex-direction: column; gap: 6px;
}
.result-tip-label { color: #ffe27a; font-size: 18px; letter-spacing: 2px; }
.result-tip-body { color: #f4eefb; opacity: 0.9; }

/* ============ メニュー（オーバーレイ）============ */
.menu-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.85);
  z-index: 20;
}
.menu-overlay.hidden { display: none; }
.menu-panel {
  width: 580px; max-width: 88%;
  padding: 48px 36px;
  border-radius: 0;
  background: #0d0620;
  border: 3px solid #9d7fd6;
  box-shadow: 6px 6px 0 #000;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px;
}
.menu-panel h2 { font-size: 36px; color: #ffe27a; text-shadow: 3px 3px 0 #000; }
.menu-btn {
  width: 100%;
  font-family: inherit; font-size: 24px;
  padding: 18px 16px;
  border-radius: 0;
  border: 3px solid #ffe27a;
  background: #2a1848;
  color: #f4eefb; cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  line-height: 1.5;
}
.menu-btn.ghost { background: #180e30; border-color: #9d7fd6; }
.menu-btn:active { box-shadow: 1px 1px 0 #000; transform: translate(3px, 3px); }
.menu-row {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  font-size: 24px;
}
.menu-row input[type="range"] { flex: 1; height: 28px; accent-color: #b98cff; }
.menu-note { font-size: 12px; opacity: 0.5; }

/* ============ タイトルメニュー（6項目対応）============ */
.title-menu { gap: 16px; }
.btn:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: 5px 5px 0 #000;
}
.btn:disabled:active {
  transform: none;
  box-shadow: 5px 5px 0 #000;
}

/* 音量スライダーのラベル幅を揃える */
.menu-row label { min-width: 160px; }

/* ============ ステージセレクト（タイトルから開くオーバーレイ）============ */
.stage-select-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.92);
  z-index: 22;
}
.stage-select-overlay.hidden { display: none; }
.stage-select-panel {
  width: 580px; max-width: 92%;
  max-height: 92%;
  padding: 48px 36px;
  background: #0d0620;
  border: 3px solid #9d7fd6;
  box-shadow: 6px 6px 0 #000;
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
  overflow-y: auto;
}
.stage-select-panel h2 { font-size: 36px; color: #ffe27a; text-shadow: 3px 3px 0 #000; }
.stage-select-list { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.stage-select-list .menu-btn.locked {
  opacity: 0.42;
  border-color: #4a3a6a;
  background: #100a22;
  color: #8a7aaa;
  cursor: default;
}
.stage-select-list .menu-btn.locked:active { transform: none; box-shadow: 4px 4px 0 #000; }

/* セグメント切り替え（パドル操作モード等）*/
.menu-seg { flex: 1; display: flex; gap: 8px; }
.menu-seg-btn {
  flex: 1;
  font-family: inherit; font-size: 24px;
  padding: 10px 0;
  border-radius: 0;
  border: 3px solid #9d7fd6;
  background: #180e30;
  color: #f4eefb; cursor: pointer;
  box-shadow: 3px 3px 0 #000;
}
.menu-seg-btn.active { background: #2a1848; border-color: #ffe27a; color: #ffe27a; }
.menu-seg-btn:active { box-shadow: 1px 1px 0 #000; transform: translate(2px, 2px); }

/* タッチ専用設定：マウス＋細かいポインタ（PC など）では非表示にする。
   any-pointer:coarse を満たす端末（スマホ・タブレット・ハイブリッド機）で表示。 */
@media (hover: hover) and (pointer: fine) {
  .menu-row-touch { display: none; }
}

/* ============ HUD ギャラリーボタン ============ */
.hud-gallery {
  width: 80px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}
.hud-gallery:active { opacity: 0.55; }

/* ============ ギャラリー（オーバーレイ）============ */
.gallery-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.92);
  z-index: 22;
}
.gallery-panel {
  width: 640px; max-width: 92%;
  max-height: 92%;
  padding: 36px 32px;
  background: #0d0620;
  border: 3px solid #9d7fd6;
  box-shadow: 6px 6px 0 #000;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px;
  overflow-y: auto;
}
.gallery-panel h2 { font-size: 36px; color: #ffe27a; text-shadow: 3px 3px 0 #000; }
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}
.gallery-cell {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px;
  background: #1a0e36;
  border: 3px solid #ffe27a;
  color: #f4eefb;
  font-family: inherit;
  cursor: pointer;
}
.gallery-cell:active { transform: translate(2px, 2px); }
.gallery-cell.locked { border-color: #4a3a6a; cursor: default; }
.gallery-cell img {
  width: 100%; height: 220px;
  object-fit: cover;
  background: #000;
  image-rendering: pixelated;
}
.gallery-cell span { font-size: 24px; text-align: center; }
.gallery-lock {
  width: 100%; height: 220px;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: #4a3a6a;
  background: #100a22;
}
.gallery-note { font-size: 24px; opacity: 0.75; }

/* ギャラリー拡大ビュー */
.gallery-viewer {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  background: rgba(5, 3, 10, 0.97);
}
.gallery-viewer-img {
  max-width: 98%; max-height: 84%;
  object-fit: contain;
  border: 3px solid #ffe27a;
  box-shadow: 6px 6px 0 #000;
  image-rendering: pixelated;
}
.gallery-viewer-img.multi { cursor: pointer; }
.gallery-viewer-img.multi:active { transform: translate(2px, 2px); }
.gallery-viewer-title { font-size: 24px; color: #ffe27a; text-shadow: 2px 2px 0 #000; }
.gallery-viewer .menu-btn { width: 320px; }

/* ============ ライセンス（オーバーレイ）============ */
.license-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.92);
  z-index: 30;
}
.license-panel {
  width: 620px; max-width: 92%;
  max-height: 88%;
  padding: 36px 32px;
  background: #0d0620;
  border: 3px solid #9d7fd6;
  box-shadow: 6px 6px 0 #000;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px;
}
.license-panel h2 { font-size: 36px; color: #ffe27a; text-shadow: 3px 3px 0 #000; }
.license-body {
  width: 100%;
  overflow-y: auto;
  font-size: 24px;
  line-height: 1.6;
  white-space: pre-wrap;
  text-align: left;
  opacity: 0.9;
}
.license-body a {
  color: #8fd0ff;
  text-decoration: underline;
}
.license-body a:hover, .license-body a:active { color: #ffe27a; }

/* ============ デバッグメニュー（オーバーレイ）============ */
.debug-panel { width: 480px; gap: 16px; }
.debug-panel h2 { font-size: 28px; }
.debug-hint { font-size: 22px; color: #f4eefb; opacity: 0.9; text-align: center; }
.debug-auth { width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.debug-input {
  width: 100%;
  font-family: inherit; font-size: 24px;
  padding: 12px 14px;
  background: #180e30;
  color: #f4eefb;
  border: 3px solid #9d7fd6;
  box-shadow: inset 2px 2px 0 #000;
  text-align: center;
  outline: none;
}
.debug-input:focus { border-color: #ffe27a; }
.debug-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.debug-grid .menu-btn { font-size: 20px; padding: 14px 8px; }
.debug-score-row {
  grid-column: 1 / -1;
  display: flex; gap: 10px;
}
.debug-score-row .debug-input { flex: 1; text-align: left; }
.debug-score-row .menu-btn { width: auto; min-width: 110px; }

/* ============ ジュークボックス（オーバーレイ）============ */
.jukebox-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.94);
  z-index: 30;
}
.jukebox-panel {
  width: 640px; max-width: 92%;
  max-height: 90%;
  padding: 36px 32px;
  background: #0d0620;
  border: 3px solid #9d7fd6;
  box-shadow: 6px 6px 0 #000;
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
}
.jukebox-panel h2 { font-size: 36px; color: #ffe27a; text-shadow: 3px 3px 0 #000; }
.jukebox-list {
  width: 100%;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
}
.jukebox-row {
  display: flex; align-items: center; gap: 18px;
  width: 100%;
  padding: 14px 18px;
  background: #1a0e36;
  border: 3px solid #5a3a8a;
  color: #f4eefb;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.jukebox-row:active { transform: translate(2px, 2px); }
.jukebox-row.active { border-color: #ffe27a; background: #2a1856; }
.jukebox-icon {
  font-size: 32px; color: #ffe27a;
  min-width: 36px; text-align: center;
}
.jukebox-meta { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.jukebox-name { font-size: 28px; color: #ffe27a; }
.jukebox-desc { font-size: 20px; opacity: 0.85; line-height: 1.3; }
.jukebox-stat { font-size: 18px; opacity: 0.6; }
.jukebox-note {
  font-size: 24px; opacity: 0.8;
  min-height: 28px;
  text-align: center;
}

/* ============ 一時停止（オーバーレイ）============ */
.pause-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.9);
  z-index: 24;
}
.pause-panel {
  width: 520px; max-width: 88%;
  padding: 48px 36px;
  background: #0d0620;
  border: 3px solid #9d7fd6;
  box-shadow: 6px 6px 0 #000;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px;
}
.pause-panel h2 { font-size: 48px; color: #ffe27a; text-shadow: 3px 3px 0 #000; }
.pause-note { font-size: 24px; line-height: 1.5; opacity: 0.8; text-align: center; }
.pause-panel .menu-btn { width: 100%; }

.hidden { display: none !important; }

/* ============ 年齢確認ゲート ============ */
.agegate-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 3, 10, 0.95);
  z-index: 50;
}
.agegate-panel {
  width: 580px; max-width: 88%;
  padding: 48px 36px;
  background: #0d0620;
  border: 3px solid #9d7fd6;
  box-shadow: 6px 6px 0 #000;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px;
}
.agegate-panel h2 {
  font-size: 36px; color: #ffe27a; text-shadow: 3px 3px 0 #000;
  text-align: center; line-height: 1.3;
}
.agegate-panel h2.agegate-deny { color: #ff8aa6; }
.agegate-text {
  font-size: 24px; line-height: 1.6; text-align: center; color: #f4eefb;
}
.agegate-inputs {
  display: flex; flex-direction: column; gap: 12px;
  font-size: 24px; width: 100%;
}
.agegate-inputs label {
  display: flex; align-items: center; gap: 12px;
  justify-content: flex-end;
}
.agegate-inputs input[type="number"] {
  font-family: inherit; font-size: 24px;
  width: 168px; padding: 8px 12px;
  background: #2a1848; color: #f4eefb;
  border: 3px solid #ffe27a; border-radius: 0;
  text-align: center;
}
/* スピンボタン非表示（数字入力欄を綺麗に保つ） */
.agegate-inputs input[type="number"]::-webkit-outer-spin-button,
.agegate-inputs input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.agegate-inputs input[type="number"] { -moz-appearance: textfield; }
.agegate-error {
  min-height: 24px; font-size: 24px; color: #ff8aa6;
  text-align: center; line-height: 1.2;
}
