/* ===== 迷宮クエスト — RPG風UI（プレイ面最大化） ===== */
:root {
  --bg-deep: #0d1b1e;
  --bg-mid: #132a2f;
  --stone: #1a3339;
  --panel: #1e3d44;
  --panel-edge: #2f5c66;
  --gold: #e8b84a;
  --gold-dim: #b8892e;
  --cream: #f3e6c8;
  --hp: #e85d4c;
  --hp-empty: #4a2a28;
  --ok: #3cba7a;
  --danger: #c44536;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --hud-h: 44px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

::selection {
  background: transparent;
  color: inherit;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  overflow: hidden;
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 50% 0%, #1f4a52 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-deep) 0%, #081214 100%);
  color: var(--cream);
}

.hidden {
  display: none !important;
}

/* ===== タイトル ===== */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(12px + var(--safe-top))
    calc(12px + var(--safe-right))
    calc(12px + var(--safe-bottom))
    calc(12px + var(--safe-left));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background:
    radial-gradient(circle at 50% 18%, rgba(232, 184, 74, 0.16), transparent 42%),
    linear-gradient(165deg, #071316 0%, #123038 55%, #0a1418 100%);
}

#title-screen * {
  touch-action: pan-y;
}

#title-screen button,
#start-button {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.title-card {
  text-align: center;
  max-width: 440px;
  width: 100%;
  margin: auto;
}

.title-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #8fb4bc;
  border: 1px solid #3a5c64;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.title-brand {
  font-size: clamp(2.1rem, 9vw, 3.3rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-shadow: 0 4px 0 #5a3a10, 0 0 30px rgba(232, 184, 74, 0.35);
  margin-bottom: 1rem;
}

.title-hero-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

.title-hero-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.title-story {
  font-size: clamp(0.9rem, 3.4vw, 1.05rem);
  color: #d5e2e6;
  line-height: 1.55;
  font-weight: 600;
}

.title-story strong {
  color: var(--gold);
}

.title-mission {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.mission-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(30, 61, 68, 0.9), rgba(16, 34, 38, 0.95));
  border: 1px solid var(--panel-edge);
}

.mission-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #8fb4bc;
  letter-spacing: 0.08em;
}

.mission-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cream);
}

.title-tips {
  list-style: none;
  text-align: left;
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px dashed #3a5c64;
}

.title-tips li {
  font-size: 0.86rem;
  color: #b7c9ce;
  font-weight: 600;
  line-height: 1.55;
  padding: 2px 0;
}

#start-button {
  width: 100%;
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  padding: 1rem 1.4rem;
  border: 3px solid var(--gold);
  border-radius: 14px;
  background: linear-gradient(180deg, #3a2a12, #1e160a);
  color: var(--gold);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 0 #3a2a10, 0 12px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.08s ease, opacity 0.08s ease;
}

#start-button:active {
  transform: translateY(4px) scale(0.97);
  box-shadow: 0 4px 0 #3a2a10;
}

/* ===== ゲーム本体：上がプレイ、下が固定操作帯（必ず収まる） ===== */
.game-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding:
    var(--safe-top)
    var(--safe-right)
    0
    var(--safe-left);
  gap: 0;
  background: #050a0c;
  overflow: hidden;
  touch-action: none;
}

.play-stage {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

/* ===== HUD：1行・薄型 ===== */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: var(--hud-h);
  min-height: var(--hud-h);
  padding: 0 10px;
  background: rgba(10, 22, 26, 0.92);
  border: none;
  border-bottom: 1px solid #243e44;
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
  z-index: 5;
}

.hud-hp {
  display: flex;
  gap: 3px;
  font-size: 1.2rem;
  letter-spacing: 0;
  line-height: 1;
  min-width: 3.6rem;
}

.hud-hp .heart {
  color: var(--hp);
  filter: drop-shadow(0 1px 0 #5a1a14);
}

.hud-hp .heart.empty {
  color: var(--hp-empty);
  opacity: 0.7;
}

.hud-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  overflow: hidden;
}

.hud-pill {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.78rem;
  color: #c5d5d9;
  white-space: nowrap;
}

.hud-pill strong {
  color: var(--gold);
  font-weight: 800;
}

.hud-dim {
  color: #7a9399;
  font-weight: 700;
  margin-left: 1px;
}

/* ===== 迷路：残りの縦幅を全部使う ===== */
.maze-container {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: block;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: #0a1214;
  box-shadow: none;
}

#mazeCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #0a1012;
}

/* ===== メッセージ ===== */
.message {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  width: min(92%, 420px);
  background: linear-gradient(180deg, #2a1f14, #1a140e);
  color: var(--cream);
  border: 3px solid var(--gold-dim);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  font-weight: 700;
  text-align: center;
  z-index: 30;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
  pointer-events: none;
}

/* ===== オーバーレイパネル ===== */
.overlay-panel {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 迷路エリア内のみ（下の操作帯が safe-area を担当） */
  padding: 6px;
  background: rgba(4, 10, 12, 0.82);
  box-sizing: border-box;
  touch-action: none;
  overflow: hidden;
}

.panel-inner {
  width: min(100%, 440px);
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, #243a40, #15262b);
  border: 3px solid var(--gold-dim);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.panel-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 6px;
}

.panel-desc {
  text-align: center;
  color: #b7c9ce;
  margin-bottom: 12px;
}

.choice-art {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.choice-art img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ===== 戦闘：必ず画面内に収める ===== */
.battle-panel {
  align-items: stretch;
  justify-content: stretch;
  z-index: 50;
  padding: 4px;
  touch-action: none;
}

.battle-inner {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  overflow: hidden;
  border-radius: 12px;
}

.battle-arena {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
  padding: 6px 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent),
    radial-gradient(ellipse at 50% 100%, rgba(232, 184, 74, 0.12), transparent 60%);
  border-radius: 10px;
  border: 1px solid var(--panel-edge);
}

.fighter {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.fighter img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.enemy-side img {
  width: 56px;
  height: 56px;
  animation: mimic-bob 1.4s ease-in-out infinite;
}

@keyframes mimic-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.fighter-meta {
  text-align: left;
  min-width: 0;
  overflow: hidden;
}

.enemy-side .fighter-meta {
  text-align: right;
}

.fighter-name {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--cream);
  margin-bottom: 2px;
  white-space: nowrap;
}

.fighter-hp {
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--hp);
  min-height: 1em;
  line-height: 1;
}

.fighter-hp.enemy {
  color: #9eb0b5;
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.battle-vs {
  font-weight: 900;
  color: var(--gold);
  font-size: 0.85rem;
  padding-bottom: 0;
  text-shadow: 0 2px 0 #5a3a10;
}

.battle-log {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 28%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--panel-edge);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 0;
  -webkit-overflow-scrolling: touch;
}

.battle-log-label {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}

#quiz-question {
  font-size: clamp(0.88rem, 3.2vw, 1.05rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.4;
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.battle-commands {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.battle-commands button {
  flex: 1 1 0;
  width: 100%;
  min-height: 40px;
  max-height: 64px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 2px solid #3d5e66;
  background: linear-gradient(180deg, #2c4a52, #1c343a);
  color: var(--cream);
  font-size: clamp(0.82rem, 3vw, 1.05rem);
  font-weight: 700;
  cursor: pointer;
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: transform 0.08s ease, opacity 0.08s ease, border-color 0.12s ease;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.battle-commands button:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.battle-commands button:hover {
  border-color: var(--gold);
}

.battle-commands button.cmd-index::before {
  content: attr(data-cmd);
  display: inline-block;
  min-width: 1.2em;
  margin-right: 6px;
  color: var(--gold);
  font-weight: 900;
}

/* 操作帯は常時表示（プレイ面と分離） */
.controls.ui-dim .dpad-btn {
  opacity: 0.35;
  pointer-events: none;
}

/* ===== ボタン ===== */
.game-btn {
  cursor: pointer;
  font-weight: 800;
  border: none;
  transition: transform 0.08s ease, opacity 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}

.game-btn:active {
  transform: scale(0.92);
  opacity: 0.85;
}

.btn-gold {
  background: linear-gradient(180deg, #f0c45a, #c89228);
  color: #2a1a08;
  border: 2px solid #ffe08a;
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 1.05rem;
  box-shadow: 0 4px 0 #7a5618;
}

.btn-slate {
  background: linear-gradient(180deg, #3a5258, #243840);
  color: var(--cream);
  border: 2px solid #5a747c;
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 1.05rem;
  box-shadow: 0 4px 0 #152228;
}

.btn-danger {
  background: linear-gradient(180deg, #d85a4a, #a83428);
  color: #fff;
  border: 2px solid #f09080;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 1.05rem;
  box-shadow: 0 4px 0 #6a2018;
}

/* ===== 操作帯：下〜25%+1cm／十字は帯内に余白つきで配置 ===== */
.controls {
  --ctrl-h: calc(25dvh + 1cm);
  --ctrl-pad-y: 10px;
  flex: 0 0 auto;
  height: calc(var(--ctrl-h) + var(--safe-bottom));
  min-height: calc(176px + 1cm + var(--safe-bottom));
  max-height: calc(280px + 1cm + var(--safe-bottom));
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding:
    var(--ctrl-pad-y)
    calc(12px + var(--safe-right))
    calc(var(--ctrl-pad-y) + var(--safe-bottom))
    calc(12px + var(--safe-left));
  background:
    linear-gradient(180deg, #1a2a2e 0%, #0e181c 100%);
  border-top: 2px solid #2f4a50;
  box-sizing: border-box;
  touch-action: none;
  overflow: hidden; /* 帯内に収めて窮屈なはみ出しをやめる */
}

.fc-pad {
  width: 100%;
  max-width: 720px;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(12px, 3.5vw, 20px);
  overflow: hidden;
}

/* 左：十字キー — 広げた帯の中で最大サイズ＋余白（旧1.2倍相当） */
.fc-dpad {
  position: relative;
  justify-self: start;
  align-self: center;
  /* 上下に少し空気を残して「詰まって」見えないようにする */
  height: calc(100% - 6px);
  width: auto;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  z-index: 2;
}

.dpad-btn,
.action-btn,
.game-btn,
.battle-commands button {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.dpad-btn {
  position: absolute;
  /* 少し小さくして十字の腕同士に隙間を作る */
  width: 38%;
  height: 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #3a5258, #243840);
  color: var(--gold);
  border: 2px solid #5a747c;
  box-shadow: 0 4px 0 #0e1c20;
  font-size: clamp(20px, 6vw, 30px);
  font-weight: 900;
  padding: 0;
  line-height: 1;
}

.dpad-up { top: 0; left: 31%; }
.dpad-down { bottom: 0; left: 31%; }
.dpad-left { left: 0; top: 31%; }
.dpad-right { right: 0; top: 31%; }

.dpad-center {
  position: absolute;
  left: 34%;
  top: 34%;
  width: 32%;
  height: 32%;
  border-radius: 12px;
  background: #1a2c30;
  border: 1px solid #2f454a;
  pointer-events: none;
}

.dpad-btn:active,
.dpad-btn.is-pressed {
  transform: translateY(2px) scale(0.96);
  box-shadow: 0 1px 0 #0e1c20;
}

/* 右：B / A — 右列内に必ず収める */
.fc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: stretch;
  gap: clamp(12px, 3.5vw, 18px);
  height: 100%;
  min-width: 0;
  padding-right: 2px;
  box-sizing: border-box;
}

.action-btn {
  width: min(20vw, 92px, 36%);
  height: min(20vw, 92px, 36%);
  max-height: 68%;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 5px 0 #3a1a12;
  line-height: 1;
  padding: 0;
}

.action-a {
  background: linear-gradient(180deg, #e85d4c, #b83228);
  border: 3px solid #f09080;
  color: #fff;
  transform: translateY(4px);
}

.action-b {
  background: linear-gradient(180deg, #5a8fd4, #3a6aa8);
  border: 3px solid #8eb6e8;
  color: #fff;
  transform: translateY(-4px);
}

.action-btn:active,
.action-btn.is-pressed {
  transform: translateY(2px) scale(0.94);
  box-shadow: 0 2px 0 #3a1a12;
  opacity: 0.92;
}

.action-key {
  font-size: clamp(1.35rem, 5.2vw, 1.75rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.action-hint {
  font-size: clamp(0.62rem, 2.4vw, 0.8rem);
  font-weight: 700;
  opacity: 0.9;
  pointer-events: none;
}

/* ===== モーダル ===== */
.modal {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  padding: 16px;
}

.modal-content {
  width: min(100%, 380px);
  background: linear-gradient(180deg, #243a40, #15262b);
  border: 3px solid var(--gold-dim);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.modal-content h2 {
  font-size: 1.7rem;
  margin-bottom: 12px;
  color: var(--gold);
}

#game-over-modal .modal-content h2 { color: #f07060; }
#game-clear-modal .modal-content h2 { color: #7edc8a; }

.modal-content p {
  font-size: 1.05rem;
  margin-bottom: 22px;
  color: #c5d5d9;
  line-height: 1.5;
  font-weight: 600;
}

/* ===== ローディング ===== */
#loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 800;
}

/* ===== 縦長スマホ最適化 ===== */
@media (max-width: 480px) {
  :root { --hud-h: 40px; }

  .hud-pill {
    padding: 3px 7px;
    font-size: 0.72rem;
  }

  .fighter img {
    width: 42px;
    height: 42px;
  }

  .enemy-side img {
    width: 50px;
    height: 50px;
  }

  .battle-commands button {
    min-height: 40px;
    padding: 7px 9px;
  }

  .message {
    bottom: 10%;
  }
}

/* とても縦長（iPhone系） */
@media (max-width: 430px) and (min-height: 700px) {
  .controls {
    --ctrl-h: calc(26dvh + 1cm);
    min-height: calc(188px + 1cm + var(--safe-bottom));
    max-height: calc(300px + 1cm + var(--safe-bottom));
  }

  .action-btn {
    width: min(21vw, 96px);
    height: min(21vw, 96px);
  }
}

/* 短い画面（iPhone SE / 横向き）でも必ず収める */
@media (max-height: 700px) {
  :root { --hud-h: 36px; }

  .controls {
    --ctrl-h: calc(24dvh + 0.8cm);
    --ctrl-pad-y: 8px;
    min-height: calc(148px + 0.8cm + var(--safe-bottom));
    max-height: calc(210px + 0.8cm + var(--safe-bottom));
  }

  .fc-dpad {
    height: calc(100% - 4px);
    max-width: 100%;
  }

  .action-btn {
    width: min(20vw, 84px);
    height: min(20vw, 84px);
  }

  .title-eyebrow { margin-bottom: 6px; }
  .title-brand {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    margin-bottom: 0.6rem;
  }
  .title-hero-img { width: 56px; height: 56px; }
  .title-tips { margin-bottom: 10px; padding: 8px 10px; }
  .title-tips li { font-size: 0.78rem; line-height: 1.35; }
  #start-button { padding: 0.85rem 1.1rem; }

  .battle-arena { padding: 4px 6px; }
  .fighter img { width: 36px; height: 36px; }
  .enemy-side img { width: 42px; height: 42px; }
  .battle-log { max-height: 24%; padding: 6px 8px; }
  #quiz-question { font-size: clamp(0.8rem, 2.8vw, 0.95rem); }
  .battle-commands { gap: 4px; }
  .battle-commands button {
    min-height: 36px;
    max-height: 48px;
    padding: 5px 8px;
    font-size: clamp(0.78rem, 2.8vw, 0.95rem);
  }
}

@media (max-height: 560px) {
  .title-tips { display: none; }
  .title-mission { gap: 6px; margin-bottom: 8px; }
  .mission-item { padding: 7px 10px; }
  .controls {
    --ctrl-h: calc(22dvh + 0.6cm);
    --ctrl-pad-y: 6px;
    min-height: calc(128px + 0.6cm + var(--safe-bottom));
    max-height: calc(168px + 0.6cm + var(--safe-bottom));
  }
}

@media (min-width: 769px) {
  .controls {
    --ctrl-h: calc(230px + 1cm);
    min-height: calc(210px + 1cm);
    max-height: calc(300px + 1cm + var(--safe-bottom));
  }

  .fc-dpad {
    max-width: 100%;
  }

  .action-btn {
    width: 92px;
    height: 92px;
  }
}
