/* =========================================================
 * pita-arrow（ピタアロー） スタイル
 * ========================================================= */
:root {
  --font-jp: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  --font-num: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --c-bg: #2f7d3a;
  --c-text: #3d2c1e;
  --c-dim: #8a6f58;
  --c-accent: #d93a3a;
  --c-accent-deep: #a82626;
  --c-leaf: #2f9e5b;
  --c-leaf-deep: #1f7a43;
  --c-panel: rgba(255, 249, 232, 0.96);
  --c-line: rgba(74, 50, 34, 0.16);
  /* ランキング（sgr-*）は明るいパネルで出す */
  --c-sgr-text: #3a2a1e;
  --c-sgr-dim: #8a6f58;
  --c-sgr-line: rgba(74, 50, 34, 0.16);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-jp);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-text-size-adjust: 100%;
  -webkit-touch-callout: none;
}

[hidden] { display: none !important; }

/* ===== レイアウト =====
   共通ヘッダー(--sgh-top)とフッター広告(--ad-space)のぶんだけ内側に収める */
#app {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--sgh-top, 0px);
  bottom: var(--ad-space, 0px);
  display: flex;
  flex-direction: column;
}

/* ===== 上部バー =====
   ボタンは共通ヘッダーのメニューへ集約済みで、タイトルだけの帯は縦幅を圧迫するので隠す。
   h1 と共通ヘッダーが押す元ボタンは DOM に残す（見えなくするだけ） */
#topbar {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===== ステージ ===== */
#stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #5c9e57;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* なぞってもページがスクロール・ズームしないようにする（操作はすべて game.js が受ける） */
  touch-action: none;
}

/* やられた瞬間、画面のふちを赤く光らせる */
#hurt-flash {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 70px 24px rgba(255, 40, 30, 0.75);
}
#hurt-flash.on { animation: hurt-flash 0.45s ease-out; }
@keyframes hurt-flash { from { opacity: 1; } to { opacity: 0; } }

/* ===== ダメージの数字 ===== */
#fx-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  overflow: hidden;
  pointer-events: none;
}

.num {
  position: absolute;
  display: none;
  transform: translate(-50%, -50%);
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 0 #3a2418, 1px 0 0 #3a2418, -1px 0 0 #3a2418, 0 -1px 0 #3a2418, 0 2px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  will-change: transform, opacity;
}
.num.on { display: block; animation: num-rise 0.7s ease-out both; }
.num.crit { font-size: 22px; color: #ffd83a; }
.num.fire { font-size: 12px; color: #ffa24a; }
.num.poison { font-size: 12px; color: #9be85a; }
.num.bolt { font-size: 13px; color: #fff27a; }
.num.heal { color: #7dff8a; }
.num.hurt { font-size: 19px; color: #ff5a4a; }
@keyframes num-rise {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  15% { transform: translate(-50%, -90%) scale(1.25); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(-50%, -230%) scale(1); opacity: 0; }
}

/* ===== 画面の外の敵・扉を知らせる矢印 ===== */
.edge {
  position: absolute;
  left: -11px;
  top: -9px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 18px solid #ff4a3a;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  opacity: 0.9;
  will-change: transform;
}
.edge.door { border-bottom-color: #ffd54a; animation: edge-pulse 0.7s ease-in-out infinite alternate; }
@keyframes edge-pulse { from { opacity: 0.55; } to { opacity: 1; } }

/* ===== スティック ===== */
#stick {
  position: absolute;
  z-index: 12;
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}
#stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
}

/* ===== HUD ===== */
#hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 10;
  padding: 8px 12px 0;
  padding-left: calc(12px + env(safe-area-inset-left, 0px));
  padding-right: calc(12px + env(safe-area-inset-right, 0px));
  pointer-events: none;
  color: #fff;
  text-shadow: 0 2px 0 rgba(40, 26, 14, 0.75), 0 0 8px rgba(40, 26, 14, 0.4);
}
.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}
.hud-floor { margin: 0; display: flex; align-items: baseline; gap: 8px; }
#hud-floor { font-size: 22px; font-weight: 900; line-height: 1.1; }
#hud-biome { font-size: 11px; font-weight: bold; opacity: 0.92; }
#hud-hp { margin: 0; font-family: var(--font-num); font-size: 14px; font-weight: 900; }
.hud-xp-row { margin-top: 4px; }
#hud-lv { flex: none; font-family: var(--font-num); font-size: 13px; font-weight: 900; }
.xp-bar {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: rgba(30, 20, 12, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
}
#xp-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4fe0ff, #8ff6ff);
  transition: width 0.35s ease-out;
}
#skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 560px;
  margin: 5px auto 0;
  min-height: 0;
}
.chip {
  padding: 1px 5px;
  border-radius: 7px;
  background: rgba(30, 20, 12, 0.5);
  font-size: 12px;
  font-weight: bold;
  line-height: 1.5;
  text-shadow: none;
}
#boss { max-width: 420px; margin: 6px auto 0; text-align: center; }
#boss-name { margin: 0 0 2px; font-size: 13px; font-weight: 900; color: #ffd0d0; }
.boss-bar {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: rgba(30, 10, 10, 0.7);
  border: 2px solid #fff;
  overflow: hidden;
}
#boss-fill { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #ff3a3a, #ff8a4a); transition: width 0.15s linear; }

#banner {
  position: absolute;
  left: 50%;
  top: 32%;
  z-index: 11;
  margin: 0;
  padding: 8px 24px;
  border-radius: 999px;
  background: rgba(40, 26, 14, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.85);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.25s, transform 0.25s;
}
#banner.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#banner.clear { background: rgba(31, 122, 67, 0.9); }
#banner.boss { background: rgba(160, 24, 24, 0.92); color: #fff3b0; }
#banner.biome { background: rgba(40, 60, 110, 0.88); }

#hint {
  position: absolute;
  left: 50%;
  bottom: 4%;
  z-index: 11;
  margin: 0;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(40, 26, 14, 0.72);
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  animation: hint-bob 1.2s ease-in-out infinite alternate;
}
#hint b { color: #ffe06a; }
#hint .hint-key { display: none; }
@media (hover: hover) and (pointer: fine) {
  #hint .hint-touch { display: none; }
  #hint .hint-key { display: inline; }
}
@keyframes hint-bob { from { transform: translateX(-50%) translateY(0); } to { transform: translateX(-50%) translateY(-5px); } }

/* ===== 画面（タイトル・結果・一時停止） ===== */
.screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  padding-bottom: 48px;
  background: rgba(30, 40, 24, 0.3);
  overflow-y: auto;
}
.screen-dim { background: rgba(20, 22, 30, 0.62); }

.panel {
  width: min(340px, 100%);
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: var(--c-panel);
  border: 3px solid #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.title-logo {
  margin: 0;
  font-size: clamp(38px, 12vw, 50px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.tl-a { color: var(--c-accent); text-shadow: 0 3px 0 #7a1c1c; }
.tl-b { color: var(--c-leaf); text-shadow: 0 3px 0 #145230; }
.title-catch { margin: 8px 0 0; font-size: 15px; font-weight: bold; }
.title-catch b { color: var(--c-accent-deep); }
.title-best { min-height: 1.3em; margin: 6px 0 0; font-size: 12px; font-weight: bold; color: var(--c-dim); }
.title-best:empty { display: none; }
.title-buttons, .over-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.title-sub-buttons { display: flex; gap: 8px; }
.title-sub-buttons .btn { flex: 1; min-width: 0; padding-left: 6px; padding-right: 6px; font-size: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-primary { background: var(--c-leaf); color: #fff; box-shadow: 0 4px 0 var(--c-leaf-deep); }
.btn-primary:active { box-shadow: 0 2px 0 var(--c-leaf-deep); transform: translateY(2px); }
.btn-sub { background: #fff; color: var(--c-text); box-shadow: 0 3px 0 rgba(74, 50, 34, 0.25); border: 1px solid var(--c-line); }
.btn-sub:active { box-shadow: 0 1px 0 rgba(74, 50, 34, 0.25); transform: translateY(2px); }
.btn:focus-visible, .skill-card:focus-visible { outline: 3px solid #ffb03a; outline-offset: 2px; }

/* 結果 */
.over-reason { margin: 0; font-size: 18px; font-weight: 900; color: var(--c-accent); }
.over-score-row { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 6px 0 0; }
#over-score { font-family: var(--font-num); font-size: 58px; font-weight: 900; line-height: 1.05; color: var(--c-text); }
.over-unit { font-size: 18px; font-weight: bold; color: var(--c-dim); }
.over-rank {
  display: inline-block;
  margin: 4px 0 0;
  padding: 3px 14px;
  border-radius: 999px;
  background: var(--c-leaf);
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}
.over-new { margin: 8px 0 0; font-size: 14px; font-weight: 900; color: var(--c-accent); animation: new-pop 0.7s ease-in-out infinite alternate; }
@keyframes new-pop { from { transform: scale(1); } to { transform: scale(1.07); } }
.over-stat { margin: 8px 0 0; font-size: 13px; font-weight: bold; }
.over-best { margin: 4px 0 0; font-size: 13px; font-weight: bold; color: var(--c-dim); }
.over-msg { min-height: 1.2em; margin: 8px 0 0; font-size: 12px; color: var(--c-dim); }
.over-msg:empty { display: none; }

/* 一時停止 */
.paused-panel { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.paused-title { margin: 0; font-size: 20px; font-weight: 900; }
.paused-hint { margin: 0; font-size: 13px; line-height: 1.7; color: var(--c-dim); }

/* ===== スキルをえらぶ ===== */
.skill-screen { z-index: 32; padding-bottom: 16px; }
.skill-box { width: min(400px, 100%); text-align: center; animation: skill-in 0.25s ease-out both; }
@keyframes skill-in { from { transform: translateY(18px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.skill-title { margin: 0; font-size: 24px; font-weight: 900; color: #ffe06a; text-shadow: 0 3px 0 rgba(40, 26, 14, 0.8); }
.skill-sub { margin: 4px 0 12px; font-size: 13px; font-weight: bold; color: #fff; }
.skill-list { display: flex; flex-direction: column; gap: 10px; }
.skill-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 10px 14px;
  border: 3px solid #fff;
  border-radius: 18px;
  background: var(--c-panel);
  box-shadow: 0 5px 0 rgba(40, 26, 14, 0.45);
  font-family: inherit;
  color: var(--c-text);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.skill-card:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(40, 26, 14, 0.45); }
.skill-ic {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #ffe9b8;
  font-size: 28px;
  line-height: 1;
}
.skill-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.skill-name { font-size: 17px; font-weight: 900; }
.skill-stars { font-size: 11px; line-height: 1; color: #e0a020; letter-spacing: 0.05em; }
.skill-desc { font-size: 12.5px; line-height: 1.5; color: var(--c-dim); font-weight: bold; }

/* ===== 遊び方モーダル（body 直下。広告と共通ヘッダーのあいだに収める） ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2147482800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: calc(16px + var(--sgh-top, 0px));
  padding-bottom: calc(16px + var(--ad-space, 0px));
  background: rgba(24, 30, 24, 0.7);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-box {
  width: min(480px, 100%);
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 18px 18px;
  border-radius: 20px;
  background: #fff9e8;
  border: 3px solid #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.modal-title { margin: 0 0 10px; font-size: 19px; font-weight: 900; color: var(--c-leaf-deep); }
.howto { margin: 0 0 14px; padding: 0; list-style: none; text-align: left; }
.howto li { position: relative; margin-bottom: 7px; padding-left: 1.1em; font-size: 13px; line-height: 1.7; color: var(--c-text); }
.howto li::before { content: ""; position: absolute; left: 0.15em; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--c-leaf); }
.howto b { color: var(--c-accent-deep); }

/* ===== フッター ===== */
#footer {
  position: absolute;
  left: 0;
  right: 0;
  /* #app がすでに広告の上で終わっているので、広告ぶん（--ad-space）は足さない */
  bottom: 6px;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 31;
}
#footer a { color: #ffe9a8; pointer-events: auto; }
body.playing #footer { display: none; }

/* 横長の画面: タイトル・結果の札を左に寄せて、まん中の部屋を見せる */
@media (min-aspect-ratio: 5/4) {
  .screen-title, #screen-over { justify-content: flex-start; padding-left: calc(4vw + env(safe-area-inset-left, 0px)); }
  .screen-title .panel, #screen-over .panel { width: min(320px, 34vw); }
}
/* 縦長の画面: タイトルは上、結果も上に寄せて、うしろの部屋を見せる */
@media (max-aspect-ratio: 5/4) {
  .screen-title { align-items: flex-start; padding-top: 7vh; }
}
/* 縦が短い画面（横向きのスマホなど） */
@media (max-height: 460px) {
  .panel { padding: 10px 14px; }
  .title-logo { font-size: 30px; }
  .btn { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 15px; }
  .title-buttons, .over-buttons { margin-top: 8px; gap: 6px; }
  #over-score { font-size: 40px; }
  .skill-list { flex-direction: row; }
  .skill-card { flex: 1; flex-direction: column; text-align: center; min-height: 0; padding: 8px; gap: 6px; }
  .skill-title { font-size: 19px; }
  .skill-sub { margin-bottom: 8px; }
  #banner { top: 30%; font-size: 16px; padding: 5px 16px; }
}

/* ===== 全国ランキング（共通モジュール sgr-*） ===== */
.sgr-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 7, 16, 0.7);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sgr-hidden { display: none !important; }

.sgr-panel {
  width: min(420px, 100%);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fbf8f0;
  color: var(--c-sgr-text);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  -webkit-user-select: text;
  user-select: text;
}

.sgr-title {
  margin: 0;
  font-size: 20px;
  text-align: center;
}

.sgr-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.sgr-tab {
  border: 1px solid var(--c-sgr-line);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: rgba(63, 156, 54, 0.06);
  color: var(--c-sgr-text);
  cursor: pointer;
}

.sgr-tab-active {
  background: linear-gradient(135deg, #4fb043, #2a7526);
  border-color: transparent;
  color: #fff;
}

.sgr-register-msg {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  color: #c4620c;
}

.sgr-form { display: flex; gap: 8px; }

.sgr-name {
  flex: 1;
  min-width: 0;
  font-size: 16px; /* iOSズーム防止のため16px以上 */
  font-family: var(--font-jp);
  padding: 8px 10px;
  border: 2px solid var(--c-sgr-line);
  border-radius: 8px;
  background: #fff;
  color: var(--c-sgr-text);
  -webkit-user-select: text;
  user-select: text;
}

.sgr-name::placeholder { color: var(--c-sgr-dim); }

.sgr-name:focus {
  outline: none;
  border-color: #4fb043;
  box-shadow: 0 0 8px rgba(226, 67, 75, 0.3);
}

.sgr-submit {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: linear-gradient(135deg, #4fb043, #2a7526);
  color: #fff;
  cursor: pointer;
}

.sgr-submit:hover { filter: brightness(1.1); }

.sgr-submit:disabled { opacity: 0.5; cursor: default; }

.sgr-error {
  margin: 4px 0 0;
  font-size: 12px;
  color: #c9252e;
}

.sgr-status {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: var(--c-sgr-dim);
}

.sgr-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.sgr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.sgr-row:nth-child(even) { background: rgba(63, 156, 54, 0.06); }

.sgr-row.sgr-row-me {
  background: linear-gradient(135deg, #4fb043, #2a7526);
  color: #fff;
}

.sgr-rank {
  width: 2em;
  text-align: right;
  font-weight: bold;
  flex-shrink: 0;
}

.sgr-rank-top1 { color: #c98d1c; }
.sgr-rank-top2 { color: #8a93a6; }
.sgr-rank-top3 { color: #b0703a; }
.sgr-row-me .sgr-rank { color: #fff; }

.sgr-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgr-row-score {
  font-weight: bold;
  font-family: var(--font-num);
  flex-shrink: 0;
  order: 4;
}


/* ==========================================================================
   フッター固定バナー広告（スマホ表示時のみ / js/ad-banner.js が挿入する）
   --ad-h    : 広告そのものの高さ。広告なしのときは 0px
   --ad-space: レイアウトが空けるべき高さ（広告 + セーフエリア）
   ========================================================================== */
:root {
  --ad-h: 0px;
  --ad-space: 0px;
}
html.has-ad-banner {
  --ad-space: calc(var(--ad-h, 0px) + env(safe-area-inset-bottom, 0px));
}

.ad-banner {
  /* height は広告そのものの高さ。セーフエリアぶんの padding は外側に足す */
  box-sizing: content-box;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* ランキング・リザルト等の全画面オーバーレイ（2147483000）よりは下に置く */
  z-index: 2147482000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: var(--ad-h, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  background: rgba(14, 16, 20, 0.86);
  /* border ではなく inset shadow にして、枠線ぶん高さがずれないようにする */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ad-banner__frame {
  display: block;
  width: 100%;
  height: var(--ad-h, 0px);
  border: 0;
  color-scheme: light;
}

@media print {
  .ad-banner { display: none; }
}
