/* =========================================================
 * amidakuji（みちびけ！あみだくじ） スタイル
 * 紙に墨で書いたあみだくじ。横棒 = 朱色、とびこし橋 = 青緑、動かせない橋 = 灰色
 * ========================================================= */
:root {
  --font-jp: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --c-bg: #f3e7c9;
  --c-paper: #fffaf0;
  --c-ink: #2b2f52;
  --c-text: #2b2f52;
  --c-dim: #7a7591;
  --c-rung: #e2513f;
  --c-arc: #12998e;
  --c-fixed: #6a6f88;
  --c-gold: #c98a00;
  --c-green: #2fae5f;
  --c-red: #e0405a;
  --c-panel: rgba(255, 250, 240, 0.97);
  --c-line: rgba(43, 47, 82, 0.16);
  /* ランキング（sgr-*）は明るいパネルで出す */
  --c-sgr-text: #1b1f3b;
  --c-sgr-dim: #6b6f85;
  --c-sgr-line: rgba(27, 31, 59, 0.14);
}

* { 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; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ===== レイアウト =====
   共通ヘッダー(--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;
}

#logo {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  white-space: nowrap;
}

.logo-a { color: #ffb29f; }

#topbar-buttons {
  display: flex;
  gap: 6px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

/* ===== ステージ ===== */
#stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--c-bg);
  touch-action: none;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== HUD ===== */
#top-ui {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px 0;
  padding-left: calc(10px + env(safe-area-inset-left, 0px));
  padding-right: calc(10px + env(safe-area-inset-right, 0px));
  pointer-events: none;
}

#hud {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 620px;
}

body.is-title #hud { visibility: hidden; }

.hud-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 96px;
  padding: 3px 10px 4px;
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.9);
  border: 1px solid var(--c-line);
  box-shadow: 0 1px 3px rgba(60, 40, 0, 0.12);
}

.hud-left { align-items: flex-start; }
.hud-center { align-items: center; flex: 1; max-width: 200px; }
.hud-right { align-items: flex-end; }

.hud-label {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.14em;
  color: var(--c-dim);
}

.hud-center .hud-label { font-size: 12px; color: var(--c-ink); }

.hud-row {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.hud-value {
  display: inline-block;
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: bold;
  line-height: 1.15;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
}

.hud-mult {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: bold;
  color: var(--c-dim);
}

.hud-mult.hot { color: var(--c-rung); }

.hud-prog {
  position: relative;
  width: 100%;
  height: 6px;
  margin: 3px 0 2px;
  border-radius: 999px;
  background: rgba(43, 47, 82, 0.14);
  overflow: hidden;
}

#hud-prog-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0a23a, var(--c-rung));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.hud-rest {
  font-size: 10px;
  font-weight: bold;
  color: var(--c-dim);
}

.hud-life {
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0.06em;
  color: var(--c-red);
  white-space: nowrap;
}

.hud-life .lost { color: rgba(43, 47, 82, 0.2); }

.bump { animation: bump 0.3s ease-out; }

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ===== 案内の帯 ===== */
.banner {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: calc(100% - 24px);
  padding: 10px 26px 12px;
  border-radius: 18px;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(43, 47, 82, 0.93);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 30px rgba(40, 30, 0, 0.35);
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.banner.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.banner__head {
  font-family: var(--font-num);
  font-size: clamp(22px, 7vw, 36px);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.1;
  color: #ffd166;
}

.banner__head:empty,
.banner__text:empty { display: none; }

.banner__text {
  font-size: clamp(14px, 4.2vw, 20px);
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.banner.over .banner__head { color: #ff8b9c; }

/* ===== 画面（タイトル・リザルト・一時停止） ===== */
.screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  background: rgba(243, 231, 201, 0.55);
  overflow-y: auto;
}

#screen-title,
#screen-result { padding-bottom: 46px; }

.screen-cover { background: #f3e7c9; }

.panel {
  width: min(400px, 100%);
  margin: auto;
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: var(--c-panel);
  border: 2px solid var(--c-ink);
  box-shadow: 0 6px 0 rgba(43, 47, 82, 0.85), 0 18px 40px rgba(60, 40, 0, 0.25);
  text-align: center;
  color: var(--c-text);
}

.title-en {
  margin: 0;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.36em;
  color: var(--c-dim);
}

.title-ja {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0 0;
  font-weight: 900;
  line-height: 1.12;
}

.tj-s {
  font-size: clamp(20px, 6.4vw, 26px);
  letter-spacing: 0.12em;
  color: var(--c-ink);
}

.tj-m {
  font-size: clamp(38px, 12.4vw, 54px);
  letter-spacing: 0.02em;
  color: var(--c-rung);
  text-shadow: 0 3px 0 rgba(43, 47, 82, 0.9);
}

.title-catch {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
}

.mode-select {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-height: 48px;
  padding: 6px 6px 7px;
  border: 2px solid rgba(43, 47, 82, 0.28);
  border-radius: 12px;
  background: #fff;
  color: var(--c-ink);
  font-family: var(--font-jp);
  cursor: pointer;
  touch-action: manipulation;
}

.mode-btn__name { font-size: 15px; font-weight: 900; }
.mode-btn__sub { font-size: 11px; color: var(--c-dim); }

.mode-btn[aria-checked="true"] {
  border-color: var(--c-rung);
  background: #fff1ec;
  box-shadow: inset 0 0 0 1px var(--c-rung);
}

.mode-btn[aria-checked="true"] .mode-btn__name { color: var(--c-rung); }

.mode-btn:focus-visible,
.btn:focus-visible,
.paused-panel:focus-visible {
  outline: 3px solid #3f8cf0;
  outline-offset: 2px;
}

.title-best {
  display: inline-block;
  margin: 10px 0 0;
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(201, 138, 0, 0.12);
  border: 1px solid rgba(201, 138, 0, 0.4);
  font-size: 13px;
  font-weight: bold;
  color: #8a5f00;
}

.title-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.title-sub-buttons {
  display: flex;
  gap: 8px;
}

.title-sub-buttons .btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 14px;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: var(--font-jp);
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  touch-action: manipulation;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  border: 0;
  background: var(--c-rung);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 4px 0 #8f2a1e;
}

.btn-primary:active { box-shadow: 0 2px 0 #8f2a1e; transform: translateY(2px); }

.btn-sub {
  border: 2px solid rgba(43, 47, 82, 0.3);
  background: #fff;
  color: var(--c-ink);
}

/* リザルト */
.result-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--c-ink);
}

.result-mode {
  display: inline-block;
  margin: 6px 0 0;
  padding: 1px 12px;
  border-radius: 999px;
  background: var(--c-ink);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.result-new {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: bold;
  color: var(--c-gold);
}

.result-score-row {
  margin: 6px 0 0;
  font-family: var(--font-num);
  color: var(--c-rung);
}

#result-score {
  font-size: 44px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.result-unit {
  margin-left: 4px;
  font-family: var(--font-jp);
  font-size: 16px;
  font-weight: bold;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 10px 0 14px;
}

.rstat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(43, 47, 82, 0.06);
  border: 1px solid rgba(43, 47, 82, 0.1);
}

.rstat-label {
  font-size: 11px;
  color: var(--c-dim);
  white-space: nowrap;
}

.rstat span:last-child {
  font-size: 16px;
  font-weight: bold;
}

.result-buttons {
  display: flex;
  gap: 8px;
}

.result-buttons .btn { flex: 1; }

/* 一時停止 */
.paused-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-jp);
  cursor: pointer;
}

.paused-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--c-ink);
}

.paused-hint {
  font-size: 13px;
  color: var(--c-dim);
}

/* ===== 遊び方モーダル ===== */
.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(43, 40, 30, 0.6);
}

.modal-box {
  width: min(480px, 100%);
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: var(--c-paper);
  border: 2px solid var(--c-ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
  color: var(--c-text);
}

.modal-title {
  margin: 0 0 10px;
  font-size: 19px;
  color: var(--c-ink);
}

.howto {
  margin: 0 0 14px;
  padding: 0 0 0 1.2em;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.7;
}

.howto li + li { margin-top: 5px; }
.howto b { color: #8a4a00; }
.howto b.c-rung { color: var(--c-rung); }
.howto b.c-arc { color: var(--c-arc); }
.howto b.c-fixed { color: var(--c-fixed); }

@media (hover: none) and (pointer: coarse) {
  .howto-pc { display: none; }
}

.modal-box .btn { min-width: 160px; }

/* ===== フッター ===== */
#footer {
  position: absolute;
  left: 0;
  right: 0;
  /* #app 自体が広告の上で終わっているので、ここで --ad-space を足さない */
  bottom: 5px;
  text-align: center;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(43, 47, 82, 0.8);
  pointer-events: none;
  z-index: 31;
}

#footer a {
  color: #a8371f;
  pointer-events: auto;
}

body.playing #footer { display: none; }

/* ===== 高さの小さいスマホ ===== */
@media (max-height: 700px) {
  .panel { padding: 14px 16px 14px; }
  .tj-m { font-size: clamp(34px, 11vw, 44px); }
  .title-catch { margin-top: 6px; font-size: 12.5px; line-height: 1.55; }
  .title-buttons { margin-top: 10px; gap: 8px; }
  #result-score { font-size: 36px; }
}

/* ===== 低い画面（横向きのスマホなど） ===== */
@media (max-height: 520px) {
  #top-ui { padding-top: 3px; }
  .hud-cell { padding: 1px 8px 2px; }
  .hud-value { font-size: 15px; }
  .hud-life { font-size: 14px; }
  .hud-rest { display: none; }
  .title-catch, .title-en { display: none; }
  .panel { padding: 10px 16px; width: min(520px, 100%); }
  .title-ja { flex-direction: row; justify-content: center; align-items: baseline; gap: 6px; }
  .tj-s { font-size: 18px; }
  .tj-m { font-size: 30px; }
  .mode-select { margin-top: 6px; }
  .mode-btn { min-height: 38px; padding: 3px 6px; }
  .mode-btn__sub { display: none; }
  .title-best { margin-top: 6px; }
  .title-buttons { flex-direction: row; margin-top: 8px; }
  .title-buttons > .btn { flex: 1; }
  .title-sub-buttons { flex: 1.4; }
  .title-buttons .btn { min-height: 38px; padding: 6px 8px; font-size: 13px; }
  #footer { display: flex; justify-content: center; gap: 10px; bottom: 3px; font-size: 10px; line-height: 1.4; }
  #screen-title, #screen-result { padding-top: 6px; padding-bottom: 22px; }
  .result-title { font-size: 17px; }
  .result-score-row { margin-top: 0; }
  #result-score { font-size: 28px; }
  .result-stats { grid-template-columns: repeat(4, 1fr); margin: 4px 0 8px; gap: 4px; }
  .rstat { padding: 3px 4px; gap: 0; }
  .rstat span:last-child { font-size: 14px; }
  .result-buttons .btn { min-height: 38px; padding: 6px 12px; }
}

/* ===== 全国ランキング（共通モジュール 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, 18, 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: #f7f8fc;
  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(19, 169, 194, 0.06);
  color: var(--c-sgr-text);
  cursor: pointer;
}

.sgr-tab-active {
  background: linear-gradient(90deg, #13a9c2, #ff8a12);
  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: #13a9c2;
  box-shadow: 0 0 8px rgba(19, 169, 194, 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(90deg, #13a9c2, #ff8a12);
  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(19, 169, 194, 0.07); }

.sgr-row.sgr-row-me {
  background: linear-gradient(90deg, #13a9c2, #ff8a12);
  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;
}

.sgr-close {
  border: 1px solid var(--c-sgr-line);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: rgba(19, 169, 194, 0.06);
  color: var(--c-sgr-text);
  cursor: pointer;
}

.sgr-close:hover { border-color: #13a9c2; }

.sgr-cta {
  margin: 0 0 12px;
  text-align: center;
}

.sgr-cta-msg {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: bold;
  color: var(--c-gold);
}

.sgr-cta-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: linear-gradient(135deg, #ffd166, #ff9a1f);
  color: #2a1a00;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 154, 31, 0.4);
}

.sgr-cta-btn:hover { filter: brightness(1.08); }

.sgr-cta-link {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--c-text);
  cursor: pointer;
}

/* ==========================================================================
   フッター固定バナー広告（スマホ表示時のみ / 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; }
}
