/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  min-height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

/* ==========================================================================
   Body — 背景画像（固定）
   iOS Safari は background-attachment: fixed 非対応のため
   body::before + position: fixed で描画する
   ========================================================================== */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  --bg-color: #AE000D;
  --bg-image: url('../img/index-image.jpg');
  background-color: var(--bg-color);
  font-family: 'Noto Sans JP', sans-serif;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: 100%;
  max-width: 530px;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  background-color: var(--bg-color);
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  z-index: -1;
  pointer-events: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ==========================================================================
   Body — 背景画像（ページ別切り替え）
   指定ページのみ body に class を付与して切り替える
   ========================================================================== */
body.month {
  --bg-image: url('../img/index-image2.jpg');
  --bg-color: #FFAF04;
}

body.year {
  --bg-image: url('../img/index-image3.jpg');
  --bg-color: #E85100;
}

body.all {
  --bg-image: url('../img/index-image4.jpg');
  --bg-color: #A70072;
}

body.c01 {
  --bg-image: url('../img/c01_bg.jpg');
}

body.c02 {
  --bg-image: url('../img/c02_bg.jpg');
}

body.c03 {
  --bg-image: url('../img/c03_bg.jpg');
}

body.c04 {
  --bg-image: url('../img/c04_bg.jpg');
}

body.c05 {
  --bg-image: url('../img/c05_bg.jpg');
}

/* ==========================================================================
   Screen Container (max 530px、中央寄せ)
   ========================================================================== */
.screen {
  width: 100%;
  max-width: 530px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Hero — グラデーションバー＋ヘッダー画像＋ロゴ
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
}

/* 上部グラデーションバー: y=0 h=55 (#b800a5 → #000)
   aspect-ratio で高さを px に依存せず維持 */
.top-bar {
  width: 100%;
  aspect-ratio: 430 / 55;
  background: linear-gradient(to bottom, #b800a5 0%, #000000 100%);
}

/* ヘッダー画像: y=55 h=86 */
.header-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ロゴ: x=94 y=-22 w=243 h=172
   左オフセット 94/430=21.86%、幅 243/430=56.51% */
.logo {
  position: absolute;
  top: -22px;
  left: 21.86%;
  width: 56.51%;
  height: auto;
  z-index: 10;
  pointer-events: none;
}

/* ==========================================================================
   Score Section — ヒーロー下〜オーバーレイ上 (y=141〜y=323、182px)
   ========================================================================== */
.score-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 32px;
  text-align: center;
}

/* "AAAAAAAAAAさんのスコア": font-size 15px font-weight 700 */
.score-label {
  color: #fff;
  font-size: clamp(12px, 3.49vw, 15px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}

/* "0000.000Kgf": font-size 60px font-weight 700 #ffbc53 */
.score-value {
  color: #ffbc53;
  font-size: clamp(32px, 13.95vw, 60px);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  margin-bottom: 8px;
}

.score-value .unit {
  font-size: clamp(11px, 4.65vw, 20px);
  font-weight: 700;
  vertical-align: baseline;
}

/* メタ情報 3行: font-size 12px line-height 17px #fff */
.score-meta {
  color: #fff;
  font-size: clamp(10px, 2.79vw, 12px);
  line-height: 17px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Main Content — 半透明オーバーレイ (y=323 h=637 rgba(0,0,0,0.35))
   ========================================================================== */
.main-content {
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  padding: 17px 4.65% 40px; /* 4.65% = 20/430 */
}

/* ==========================================================================
   Register Prompt — "〜スコアを / 全国ランキングに登録しよう！"
   font-size 26px font-weight 700 #ffbc53 line-height 37px
   ========================================================================== */
.register-prompt {
  color: #ffbc53;
  font-size: clamp(18px, 6.05vw, 26px);
  font-weight: 700;
  line-height: 1.42; /* 37/26 */
  text-align: center;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.9);
  margin-bottom: 22px;
}

/* ==========================================================================
   Form Section
   ========================================================================== */
.form-section {
  display: flex;
  flex-direction: column;
}

/* プレイヤー名ラベル: font-size 14px #fff */
.form-label {
  display: block;
  color: #fff;
  font-size: clamp(11px, 3.26vw, 14px);
  line-height: 1;
  margin-bottom: 9px;
}

/* 入力フィールド: w=390 h=50 rx=10 白背景 黒枠 2px */
.form-input {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.5;
  border-radius: 10px;
  border: 2px solid #000;
  background: #fff;
  color: #000;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* 登録ボタン: w=144 h=50 rx=25 グラデーション */
.btn-register {
  align-self: center;
  width: 33.49%; /* 144/430 */
  min-width: 120px;
  padding: 14px 10px;
  margin-top: 20px;
  border-radius: 999px;
  border: 1px solid #000;
  background: linear-gradient(to bottom,
    #ff9f0a 0%,
    #ffd79a 47.5%,
    #ff9f0a 100%
  );
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(16px, 4.65vw, 20px);
  font-weight: 700;
  color: #000;
  line-height: 1;
  text-align: center;
}

/* ==========================================================================
   Notes — 注意事項テキスト
   font-size 11px line-height 16px #fff
   ========================================================================== */
.notes {
  margin-top: 38px;
  color: #fff;
  font-size: clamp(9px, 2.56vw, 11px);
  line-height: 16px;
}

.notes p {
  margin: 0;
}

/* 「・」行：折り返し時は中黒＋その後の文頭に揃える（ぶら下がりインデント） */
.notes .notes-item {
  padding-left: 1.2em;
  text-indent: -1.2em;
}

.notes .notes-blank {
  height: 16px;
}

/* ==========================================================================
   Bottom Link — "登録せずにランキングを確認する" + 矢印
   font-size 14px #ffbc53
   ========================================================================== */
.bottom-link-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 30px;
  padding-bottom: 20px;
}

.bottom-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffbc53;
  font-size: clamp(11px, 3.26vw, 14px);
  font-family: 'Noto Sans JP', sans-serif;
  text-decoration: none;
}

.bottom-link-arrow {
  flex-shrink: 0;
}

/* ==========================================================================
   Error Banner — .screen.error 時に表示
   position: fixed でページ最上部に固定、.screen と同幅で中央寄せ
   ========================================================================== */
.error-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 530px;
  padding: 18px 16px 20px;
  background: #ffff00;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.161);
  text-align: center;
  z-index: 100;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* "全国ランキングへの登録が完了していません": 18px bold red */
.error-banner__title {
  color: red;
  font-size: clamp(15px, 4.19vw, 18px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 3px;
}

/* "登録のできないプレイヤー名です。" etc: 14px normal red */
.error-banner__body {
  color: red;
  font-size: clamp(12px, 3.26vw, 14px);
  font-weight: 400;
  line-height: 1.43; /* 20/14 */
}

.error-banner__body p {
  margin: 0;
}

/* .screen.error が存在するとき :has() でバナーを表示 */
body:has(.screen.error) .error-banner {
  display: flex;
}

/* ==========================================================================
   Error Hint — 入力欄直下の赤バー
   w=390 h=29 rx=6 fill=red / text 14px white x=30
   ========================================================================== */
.error-hint {
  display: none;
  width: 100%;
  padding: 7px 10px;
  margin-top: 10px;
  border-radius: 6px;
  background: red;
  color: #fff;
  font-size: clamp(12px, 3.26vw, 14px);
  line-height: 1;
}

/* ==========================================================================
   Error State — .screen.error で切り替わる各要素
   ========================================================================== */

.score-meta p {
  display: block;
  margin: 0;
}

/* 入力フィールド: ピンク背景・赤枠 */
.screen.error .form-input {
  background: #ff8f8f;
  border-color: red;
}

/* エラーヒント: 表示 */
.screen.error .error-hint {
  display: block;
}

/* ==========================================================================
   Complete Page — ヘッダー画像 (complete-image2.png 430x219)
   top-bar・ロゴなし、画像のみ
   ========================================================================== */
.complete-header img {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Complete Page — 中間セクション (y=219〜y=549、330px)
   背景は body の固定背景をそのまま透過表示
   ========================================================================== */
.complete-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 0 28px;
  text-align: center;
}

/* "登録完了": font-size 40px #ffbc53 bold */
.complete-title {
  color: #ffbc53;
  font-size: clamp(28px, 9.30vw, 40px);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.9);
  margin-bottom: 17px;
}

/* "(プレイヤー名)さんの〜登録されました！": font-size 19px white bold line-height 27px */
.complete-message {
  color: #fff;
  font-size: clamp(14px, 4.42vw, 19px);
  font-weight: 700;
  line-height: 1.42; /* 27 / 19 */
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.9);
  margin-bottom: 10px;
}

/* "※ランキングへの反映...": font-size 12px white */
.complete-note {
  color: #fff;
  font-size: clamp(10px, 2.79vw, 12px);
  margin-bottom: 30px;
}

/* ランキング一覧: x=25 幅=380 → side padding 5.81% (25/430) */
.ranking-list {
  width: 100%;
  padding: 0 5.81%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ランキング行: h=52 rx=6 rgba(0,0,0,0.24) / text 22px #ffbc53 bold x=45 */
.ranking-item {
  background: rgba(0, 0, 0, 0.24);
  border-radius: 6px;
  padding: 15px 20px;  /* 15+22+15=52px */
  font-size: clamp(16px, 5.12vw, 22px);
  font-weight: 700;
  color: #ffbc53;
  line-height: 1;
  text-align: left;
}

/* ==========================================================================
   Complete Page — スコアセクション (y=549〜y=780、overlay 0.35)
   .score-label / .score-value / .score-meta / .unit は index.html と共通
   ========================================================================== */
.complete-score {
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 35px 0 60px;
  text-align: center;
}

/* ==========================================================================
   Complete Page — ボタンセクション (y=780〜y=932、overlay 0.51)
   ========================================================================== */
.complete-actions {
  background: rgba(0, 0, 0, 0.51);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 0 20px;
  gap: 9px;
}

/* "全国ランキングを確認" ゴールドボタン: w=263 (61.16%)
   グラデーション・border・border-radius は .btn-register と共通 */
.btn-ranking {
  width: 61.16%; /* 263 / 430 */
  min-width: 200px;
  padding: 14px 10px;
  border-radius: 999px;
  border: 1px solid #000;
  background: linear-gradient(to bottom,
    #ff9f0a 0%,
    #ffd79a 47.5%,
    #ff9f0a 100%
  );
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(16px, 4.65vw, 20px);
  font-weight: 700;
  color: #000;
  line-height: 1;
  text-align: center;
}

/* "スコアをXでポスト" ボタン: 透明背景・白テキスト・Xロゴ付き */
.btn-x-post {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: clamp(13px, 3.72vw, 16px);
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1;
  cursor: pointer;
}

/* Xロゴ: 20x20 */
.x-logo {
  width: 20px;
  height: auto;
  flex-shrink: 0;
}

/* ==========================================================================
   Timeout Page — コンテンツセクション (y=219〜)
   .complete-header / .btn-ranking は complete.html と共通流用
   ========================================================================== */
.timeout-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 4.65% 40px;
  text-align: center;
}

/* "登録失敗": font-size 40px #ffbc53 bold — .complete-title と同スタイル */
.timeout-title {
  color: #ffbc53;
  font-size: clamp(28px, 9.30vw, 40px);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.9);
  margin-bottom: 17px;
}

/* "全国ランキングの登録に失敗しました。": font-size 19px white bold */
.timeout-message {
  color: #fff;
  font-size: clamp(14px, 4.42vw, 19px);
  font-weight: 700;
  line-height: 1.42;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.9);
  margin-bottom: 32px;
}

/* ==========================================================================
   Ranking Page — Hero home button
   x=10 y=10 r=30 → 60×60px円形、グラデーション背景
   ========================================================================== */
.hero-home-btn {
  position: absolute;
  top: clamp(7px, 2.33vw, 10px);    /* 10/430 */
  left: clamp(7px, 2.33vw, 10px);   /* 10/430 */
  width: clamp(42px, 13.95vw, 60px); /* 60/430 */
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffc010 0%, #ff6d01 100%);
  border: 2px solid #653900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 20;
}

.hero-home-btn .material-symbols-outlined {
  font-size: 24px;
  color: #000;
  line-height: 1;
  user-select: none;
}

/* ==========================================================================
   Ranking Page — キービジュアル（ヒーロー下端に 33px 重なる）
   430×127: overlap = 33px → margin-top = -(33/430*100) = -7.67%
   ========================================================================== */
.ranking-keyvisu-wrap {
  margin-top: -7.67%; /* 33/430 */
  position: relative;
  z-index: 5;
  pointer-events: none;
}

.ranking-keyvisu {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Ranking Page — タブ (y=242 h=44)
   4タブ均等: flex:1  gap=10px  padding=20px両側
   今月（active）: ゴールド / 前月・年間・全期間: レッドオレンジ
   ========================================================================== */

/* フィルターありページ: タブ＋フィルターをひとまとめにして画面上部へ sticky */
.ranking-tabs-filter-sticky {
  position: sticky;
  top: 20px;
  z-index: 30;
}

.ranking-tabs-filter-sticky .ranking-tabs {
  position: static;
}

.ranking-tabs {
  display: flex;
  gap: 10px;
  padding: 0 4.65%; /* 20/430 */
  margin-top: 7px;  /* 242 - 235(keyvisu bottom) */
  position: sticky;
  top: 20px;
  z-index: 30;
}

.ranking-tab {
  flex: 1;
  aspect-ratio: 90 / 44;
  border-radius: 999px;
  border: 2px solid #090009;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(14px, 4.65vw, 20px);
  font-weight: 700;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, #ffac8f 0%, #fe5015 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.ranking-tab--active {
  background: linear-gradient(to bottom, #fbebc3 0%, #ffb803 100%);
}

/* ==========================================================================
   Ranking Page — フィルタードロップダウン (y=309 w=390 h=44 rx=10)
   ========================================================================== */
.ranking-filter-wrap {
  position: relative;
  padding: 0 4.65%; /* 20/430 */
  margin-top: 23px; /* 309 - 286(tabs bottom) */
}

.ranking-filter {
  width: 100%;
  padding: 13px 16px;
  font-size: clamp(11px, 3.26vw, 14px);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  border-radius: 10px;
  border: 2px solid #000;
  background: #fff;
  color: #000;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  line-height: 1;
}

/* 赤い下向き三角（多角形_1: 7×6px → rotate(180) = 下向き） */
.ranking-filter-wrap::after {
  content: '';
  position: absolute;
  right: calc(4.65% + 14px);
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid #a70013;
  pointer-events: none;
}

/* ==========================================================================
   Ranking Page — データなし
   ========================================================================== */
.ranking-empty {
  padding: 32px 4.65%;
  text-align: center;
}

.ranking-empty__text {
  color: #fff;
  font-size: clamp(14px, 4.18vw, 16px);
  font-weight: 700;
  line-height: 1.5;
}

/* ==========================================================================
   Ranking Page — c01 メインビジュアル（430×144）
   ========================================================================== */
.ranking-c01-main {
  margin-top: 12px;
}

.ranking-c01-main__frame {
  width: 100%;
  aspect-ratio: 430 / 144;
  position: relative;
  overflow: hidden;
}

.ranking-c01-main__img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Ranking Page — トップ3カード
   各カード: w=390 h=92 rx=6 bg=#000017
   上部グラデーション領域: h=63 / 下部メタ: 残り
   ========================================================================== */
.ranking-top3 {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 27px 4.65% 21px; /* top=27(380-353) bottom=21(707-686) */
}

.top3-card {
  position: relative;
  background: #000017;
  border-radius: 6px;
  /* バナーがカード上端からはみ出るため clip-path でトップだけ開放 */
  clip-path: inset(-8px 0 0 0 round 6px);
}

/* 上部グラデーション領域: margin 3px（内側インセット）、h=63 */
.top3-card__header {
  display: flex;
  align-items: stretch;
  margin: 3px 3px 0;
  border-radius: 4px;
  height: 63px;
}

.top3-card--1st .top3-card__header {
  background: linear-gradient(to right, #ffcb16 0%, #ff6700 52.5%, #ffc310 100%);
}

.top3-card--2nd .top3-card__header {
  background: linear-gradient(to right, #1ac9ff 0%, #015dff 52.5%, #0bb5ff 100%);
}

.top3-card--3rd .top3-card__header {
  background: linear-gradient(to right, #fe6a54 0%, #e00a07 52.5%, #fe6651 100%);
}

/* バナー画像: 左 約37% 幅（142/382）
   margin-top: -(はみ出し8px + ヘッダーのtopマージン3px) = -11px
   height: 63px + 11px = 74px でボトム位置を維持 */
.top3-card__banner {
  width: 37.17%;
  height: calc(100% + 11px);
  object-fit: cover;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: -11px;
}

/* 名前・スコアエリア */
.top3-card__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 10px;
  min-width: 0;
  gap: 4px;
}

.top3-card__name {
  font-size: clamp(17px, 4.58vw, 22px);
  font-weight: 700;
  line-height: 1;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 0.2em;
}

.top3-card__divider {
  border: none;
  border-top: 1px solid #000;
  margin: 0;
}

.top3-card__score {
  font-size: clamp(13px, 4.19vw, 18px);
  font-weight: 700;
  line-height: 1;
  color: #000;
}

.top3-card__unit {
  font-size: clamp(10px, 3.49vw, 15px);
}

/* メタ行: 下部ダーク領域（白テキスト） */
.top3-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: clamp(9px, 2.56vw, 11px);
  color: #fff;
}

.top3-card__enemy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Ranking Page — キャラアイコン（共通: トップ3 + ランキング行）
   20×20px 円形
   ========================================================================== */
.char-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  object-fit: cover;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ==========================================================================
   Ranking Page — ランキングセクション（4位以下）
   暗いオーバーレイ rgba(0,0,0,0.35)
   ========================================================================== */
.ranking-section {
  background: rgba(0, 0, 0, 0.35);
  padding: 17px 0;
}

/* ==========================================================================
   Ranking Page — ランキング行リスト（4位〜10位）
   各行: w=390 h≈95 / サムネイル w=92 h=90
   ========================================================================== */
.ranking-rows {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 3.43%; /* 14.75/430 */
}

.ranking-row {
  display: flex;
  align-items: stretch;
  background: rgba(0, 0, 23, 0.46);
  position: relative;
}

/* サムネイル: w=92 h=90 → aspect-ratio: 92/90
   margin-left: -10px で行の左端より 10px はみ出す（デザインに合わせた配置） */
.ranking-row__thumb {
  position: absolute;
  top: -15px;
  left: -2%;
  z-index: 1;
  width: 22.78%; /* 92/404 */
  aspect-ratio: 92 / 90;
  background-image: url('../img/ranking-thumb.png');
  background-size: 100% 80%;
  background-repeat: no-repeat;
  background-position: center;
}

/* 順位番号オーバーレイ
   left: 10px で可視領域（はみ出し分を除いた右側）内に中央揃え */
.ranking-row__rank {
  position: absolute;
  left: 17px;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: clamp(12px, 3.72vw, 16px);
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.ranking-row__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ==========================================================================
   Ranking Page — 右下バッジ（トップ3カード + ランキング行）
   125×54px を右下に absolute 配置
   ========================================================================== */
.c01-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 125px;
  height: 54px;
  z-index: 5;
  pointer-events: none;
}

.c01-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 上部ダーク領域 h=65.546 (名前・スコア) */
.ranking-row__upper {
  flex: 1;
  background: rgba(0, 0, 0, 0.51);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9px 8px 9px 22.8%;
  gap: 3px;
}

.ranking-row__name {
  font-size: clamp(13px, 4.19vw, 18px);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 0.2em;
}

.ranking-row__divider {
  border: none;
  border-top: 1px solid #c7c7c7;
  margin: 0;
}

.ranking-row__score {
  font-size: clamp(10px, 3.26vw, 14px);
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.ranking-row__unit {
  font-size: clamp(9px, 2.56vw, 11px);
}

/* メタ行（下部: 都道府県・日付・キャラクター） */
.ranking-row__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 22.8%;
  font-size: clamp(8px, 2.33vw, 10px);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}

.ranking-row__enemy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Ranking Page — ページネーション
   3ページドット + 左右矢印
   ドット: r=30 (60×60)  アクティブ: 黒  非アクティブ: rgba(0,0,0,0.43)
   ========================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px 0 20px;
  margin-bottom: 80px;
}

.pagination__dot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.43);
  color: #fff;
  font-size: clamp(14px, 4.19vw, 18px);
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination__dot--active {
  background: #000;
}

.pagination__arrow {
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-decoration: none;
}

.pagination__arrow .material-symbols-outlined {
  font-size: 24px;
  color: #000;
  line-height: 1;
  user-select: none;
}

.screen-copyright {
  color: #fff;
  font-size: clamp(8px, 2.33vw, 10px);
  line-height: 1.5;
  text-align: center;
  padding: 0 4.65% 24px;
  margin: 0;
}

/* ==========================================================================
   グループヘッダー（共通）
   ========================================================================== */
.p-groupHeader-01 {
  width: 100%;
  align-self: stretch; /* body の align-items: center でも横幅いっぱいに */
}

/* ==========================================================================
   共通フッター
   ========================================================================== */
#footer {
  width: 100%;
  align-self: stretch; /* body の align-items: center でも横幅いっぱいに */
}

#footer iframe {
  margin: 0 !important;
}

/* ==========================================================================
   Ranking Page — スクロールトップボタン（fixed）
   r=30 (60×60)  rgba(0,0,0,0.63)  矢印: #ffb803
   ========================================================================== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: calc(max(0px, (100vw - 530px) / 2) + 10px);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.63);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease;
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top .material-symbols-outlined {
  font-size: 24px;
  color: #ffb803;
  line-height: 1;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transition: none;
    transform: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 531px) {
  .screen {
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid #000;
    border-right: 2px solid #000;
  }
}

.disabled {
    pointer-events: none;
    cursor: default;
    color: gray;
    opacity: 0;
}
