:root {
  /* 中継・ゲーム向け：ほぼ黒の紺ベース、中央がわずかに明るいラジアル用 */
  --broadcast-navy-outer: #02040a;
  --broadcast-navy-deep: #050910;
  --broadcast-navy-panel: #121b2e;
  --broadcast-navy-raised: #1a2536;
  --neon-cyan: #00ffff;
  /* 主要ボタン：渋いワインレッド（選択・CTA） */
  --cta-orange: #6b303c;
  --cta-orange-dark: #452028;
  --cta-orange-light: #854a56;
  --cta-orange-pressed: #341820;
  --cta-glow-mid: rgba(107, 48, 60, 0.32);
  --cta-glow-strong: rgba(107, 48, 60, 0.38);
  --cta-glow-soft: rgba(107, 48, 60, 0.22);
  /* 喜びの数字・獲得表記 */
  --joy-gold: #f2e6b8;
  --joy-gold-mid: #e8d18a;
  --joy-gold-deep: #c9a227;
  --border-subtle-white: rgba(255, 255, 255, 0.33);
  --focus-ring: #ffd700;

  /* 互換・テロップ名（既存セレクタ向け） */
  --telop-navy-deep: var(--broadcast-navy-deep);
  --telop-navy: var(--broadcast-navy-panel);
  --telop-navy-mid: var(--broadcast-navy-raised);
  --telop-gold: #c9a962;
  --telop-gold-bright: #e8d5a8;
  --telop-white: #ffffff;
  --telop-cloud: #e4e9f2;
  --telop-muted-on-navy: #c8d4e8;
  --telop-up: #c45a5a;
  --telop-down: #5a8cc8;
  /* 旧ワイン枠の参照先（主要CTAはオレンジに統一） */
  --wine: var(--cta-orange);
  --wine-dark: var(--cta-orange-dark);
  --wine-pressed: var(--cta-orange-pressed);

  --bg: var(--broadcast-navy-deep);
  --panel: var(--broadcast-navy-panel);
  --panel-2: var(--broadcast-navy-raised);
  --text: #ffffff;
  --text-on-navy: #ffffff;
  --muted: var(--telop-muted-on-navy);
  --accent: var(--telop-gold);
  --team: var(--telop-gold);
  --team-bottom: var(--telop-gold);
  --danger: var(--telop-up);
  --ok: var(--telop-gold-bright);
  --success: var(--telop-gold-bright);
  --sp: #6b9fd4;
  --st: #7aab7a;
  --ph: #c9a06a;
  --mt: #9b90c4;
  --balance-r: var(--telop-up);
  --balance-b: var(--telop-down);
  --fill-cta: var(--cta-orange);
  --border-cta: var(--cta-orange-dark);

  /* スキル名・スキルアイテム表示の統一緑 */
  --ekiden-skill-fg: #8fefb0;
  --ekiden-skill-fg-soft: #b8f5ce;
  --ekiden-skill-fg-dim: #6ecf9a;
  --ekiden-skill-chip-bg: color-mix(in srgb, #1a4d30 55%, var(--panel));
  --ekiden-skill-chip-border: color-mix(in srgb, var(--ekiden-skill-fg-dim) 45%, transparent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", sans-serif;
  background: radial-gradient(
    ellipse 120% 88% at 50% 36%,
    var(--panel) 0%,
    var(--bg) 48%,
    var(--broadcast-navy-outer) 100%
  );
  color: var(--text-on-navy);
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.phone-shell {
  width: min(100vw, 430px);
  height: min(100vh, 900px);
  border: 1px solid var(--border-subtle-white);
  border-radius: 18px;
  background: radial-gradient(
    ellipse 115% 82% at 50% 34%,
    color-mix(in srgb, var(--panel) 96%, #fff) 0%,
    var(--panel) 42%,
    color-mix(in srgb, var(--bg) 92%, #000) 100%
  );
  color: var(--text-on-navy);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone-shell > main {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, transparent 26%),
    radial-gradient(ellipse 95% 75% at 50% 100%, rgba(5, 9, 16, 0.55) 0%, transparent 55%);
  pointer-events: none;
  opacity: 1;
}

.app-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-on-navy);
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 6px;
}

.app-header__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.app-header__title-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.app-header__top h1 {
  flex: 1 1 auto;
  min-width: 0;
}

.header-mode-badge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.header-play-mode-toggle {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-on-navy);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.header-play-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.header-play-mode-toggle:active {
  transform: scale(0.96);
}

.header-recovery-reload {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-on-navy);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.header-recovery-reload:hover {
  background: rgba(255, 255, 255, 0.1);
}

.header-recovery-reload:active {
  transform: scale(0.96);
}

.app-header__date-budget {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 48%;
  min-width: 0;
}

.header-date {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.35;
  text-align: right;
  width: 100%;
}

.app-header h1 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--text-on-navy);
}

.header-sub {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

/* 予算：部活暦の直下（日付と同系の小さめ表示） */
.app-header-budget.team-meta,
#teamMeta.team-meta.app-header-budget {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
  line-height: 1.35;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  display: block;
  letter-spacing: 0.02em;
  border: none;
}

.team-meta,
#teamMeta.team-meta:not(.app-header-budget) {
  font-size: 15px;
  color: var(--muted);
  text-align: right;
  line-height: 1.15;
  max-width: 56%;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  align-self: center;
  display: block;
}

.life-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 62%;
  min-width: 0;
}

.life-bar-top-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

.life-next-recovery {
  flex: 0 0 auto;
  margin-left: 2px;
  box-sizing: border-box;
  font-size: 0.58rem;
  line-height: 1.15;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.life-next-recovery__sec {
  font-weight: 800;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.9);
}

.life-next-recovery--full {
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  text-align: left;
}

.life-bar-main {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  align-items: center;
  min-width: 0;
}

.life-bar-infinity {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.life-bar-infinity-num {
  color: #58a6ff;
}

.life-bar-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ad-life-btn {
  font-size: 0.52rem;
  padding: 2px 5px;
  line-height: 1.15;
  white-space: nowrap;
  max-width: 100%;
}

.ad-life-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ad-life-btn.ad-life-btn--ready:not(:disabled) {
  background: linear-gradient(180deg, #ff7a6e 0%, #c0392b 48%, #a93226 100%);
  color: #fff;
  border: 1px solid color-mix(in srgb, #ff9a8e 70%, #000);
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.ad-life-test-btn {
  font-size: 0.58rem;
  padding: 3px 7px;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px dashed color-mix(in srgb, var(--muted) 55%, transparent);
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
}

.ad-life-test-btn:active {
  opacity: 0.85;
  transform: none;
}

.heart {
  font-size: 1rem;
}

.heart.heart--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  vertical-align: middle;
}

.heart:not(.empty) {
  color: var(--telop-up);
}

/* 練習ライフ：テーマのベース赤（--telop-up / --danger と同色）で Heart 形 */
.heart:not(.empty) .heart-fill-shape {
  width: 1em;
  height: 1em;
  display: block;
  background-color: var(--telop-up);
  -webkit-mask-image: url("images/Heart.svg");
  mask-image: url("images/Heart.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--telop-up) 55%, transparent));
}

.heart.empty {
  opacity: 0.35;
  color: var(--muted);
}

.screen-container {
  overflow: hidden;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  height: 100%;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 10px;
  min-height: 0;
  box-sizing: border-box;
  color: var(--text-on-navy);
}

/* ID セレクタ等で display が上書きされても、非アクティブは必ず隠す（画面分割バグ防止） */
.screen:not(.active) {
  display: none !important;
}

.screen.active {
  display: block;
}

/* CPU対戦: 結果エリアはスクロール、開始バーはナビ直上に固定 */
#screen-battle.screen.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  padding-bottom: 0;
  min-height: 0;
}

/* レース進行中（2D トラック表示）：一段ダークな中継背景 */
#screen-battle.screen.active:has(.race-panel) {
  background: radial-gradient(
    ellipse 118% 90% at 50% 38%,
    #0c1426 0%,
    #040810 52%,
    #010308 100%
  );
}

/* 対戦メイン（公式戦一覧 → モードボタン）を縦スクロール */
.battle-mode-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.battle-mode-scroll .official-tournaments-card {
  margin-top: 0;
}

/* 横画面は2段グリッド用ラッパー。縦画面では display:contents で従来どおり1列フレックスの並びを維持 */
.battle-mode-land-row {
  display: contents;
}
.battle-mode-land-right-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.cpu-life-hint {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 88%, rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
  vertical-align: middle;
}

.battle-mode-life-hint {
  margin: 0 0 10px !important;
  line-height: 1.5;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, #000) 0%, var(--bg) 100%);
  position: relative;
  z-index: 50;
}

.bottom-nav a.bottom-nav-link:focus-visible,
.bottom-nav button.bottom-nav-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.bottom-nav a.bottom-nav-link,
.bottom-nav button.bottom-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--border-subtle-white);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--panel-2) 94%, #fff) 0%,
    var(--panel-2) 45%,
    color-mix(in srgb, var(--panel-2) 86%, #000) 100%
  );
  color: var(--text-on-navy);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.42),
    0 4px 12px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.bottom-nav a.bottom-nav-link:hover,
.bottom-nav button.bottom-nav-link:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--panel-2) 92%, #fff) 0%,
    color-mix(in srgb, var(--panel-2) 96%, #fff) 45%,
    var(--panel-2) 100%
  );
  border-color: rgba(255, 255, 255, 0.42);
}

.bottom-nav a.bottom-nav-link:active,
.bottom-nav button.bottom-nav-link:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.38),
    inset 0 2px 5px rgba(0, 0, 0, 0.22);
}

.bottom-nav button.bottom-nav-training {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(
    180deg,
    var(--cta-orange-light) 0%,
    var(--cta-orange) 50%,
    color-mix(in srgb, var(--cta-orange) 82%, #000) 100%
  );
  color: #ffffff;
  font-weight: 700;
  box-shadow:
    0 2px 0 var(--cta-orange-dark),
    0 6px 18px var(--cta-glow-mid),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.bottom-nav button.bottom-nav-training:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--cta-orange-light) 90%, #fff) 0%,
    color-mix(in srgb, var(--cta-orange) 92%, #fff) 50%,
    var(--cta-orange) 100%
  );
  border-color: rgba(255, 255, 255, 0.55);
}

.bottom-nav button.bottom-nav-monthly-hot {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(
    180deg,
    var(--cta-orange-light) 0%,
    var(--cta-orange) 50%,
    color-mix(in srgb, var(--cta-orange) 82%, #000) 100%
  );
  color: #ffffff;
  font-weight: 700;
  box-shadow:
    0 2px 0 var(--cta-orange-dark),
    0 6px 18px var(--cta-glow-mid),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.bottom-nav button.bottom-nav-monthly-hot:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--cta-orange-light) 90%, #fff) 0%,
    color-mix(in srgb, var(--cta-orange) 92%, #fff) 50%,
    var(--cta-orange) 100%
  );
  border-color: rgba(255, 255, 255, 0.55);
}

.bottom-nav button.bottom-nav-training:active,
.bottom-nav button.bottom-nav-monthly-hot:active {
  box-shadow:
    0 1px 0 var(--cta-orange-pressed),
    0 4px 14px var(--cta-glow-soft),
    inset 0 2px 6px rgba(0, 0, 0, 0.28);
}

/* 練習ライフあり：練習タブを赤系で強調（対戦・ガチャのオレンジとは別色） */
.bottom-nav button.bottom-nav-training-hot {
  border: 1px solid color-mix(in srgb, var(--danger) 55%, #fff 18%);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--danger) 82%, #fff 18%) 0%,
    var(--danger) 48%,
    color-mix(in srgb, var(--danger) 72%, #000 28%) 100%
  );
  color: #fff;
  font-weight: 800;
  box-shadow:
    0 2px 0 color-mix(in srgb, var(--danger) 45%, #000),
    0 5px 16px color-mix(in srgb, var(--danger) 35%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.bottom-nav button.bottom-nav-training-hot:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--danger) 70%, #fff 30%) 0%,
    color-mix(in srgb, var(--danger) 92%, #fff 8%) 50%,
    var(--danger) 100%
  );
  border-color: color-mix(in srgb, var(--danger) 50%, #fff 35%);
}
.bottom-nav button.bottom-nav-training-hot:active {
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--danger) 50%, #000),
    0 3px 12px color-mix(in srgb, var(--danger) 28%, transparent),
    inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

button {
  border: 1px solid var(--border-subtle-white);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--panel-2) 94%, #fff) 0%,
    var(--panel-2) 45%,
    color-mix(in srgb, var(--panel-2) 86%, #000) 100%
  );
  color: var(--text-on-navy);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.42),
    0 4px 12px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

button:hover:not(:disabled) {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--panel-2) 92%, #fff) 0%,
    color-mix(in srgb, var(--panel-2) 96%, #fff) 45%,
    var(--panel-2) 100%
  );
  border-color: rgba(255, 255, 255, 0.42);
}

button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.38),
    inset 0 2px 5px rgba(0, 0, 0, 0.22);
}

button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--muted);
  box-shadow: none;
}

button.ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--text-on-navy);
}

button.ghost:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}

select {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--panel-2);
  color: var(--text-on-navy);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
  outline: none;
}

select:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

select option {
  background: var(--panel);
  color: var(--text);
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--panel-2);
  color: var(--text-on-navy);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.small {
  font-size: 0.8rem;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row.wrap {
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  align-content: start;
}

.player-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel-2);
  color: var(--text-on-navy);
  border-radius: 12px;
  padding: 8px;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.menu-btn[data-menu="Sp"] { background: color-mix(in srgb, var(--sp) 38%, var(--bg)); color: var(--text-on-navy); }
.menu-btn[data-menu="St"] { background: color-mix(in srgb, var(--st) 38%, var(--bg)); color: var(--text-on-navy); }
.menu-btn[data-menu="Ph"] { background: color-mix(in srgb, var(--ph) 38%, var(--bg)); color: var(--text-on-navy); }
.menu-btn[data-menu="Mt"] { background: color-mix(in srgb, var(--mt) 38%, var(--bg)); color: var(--text-on-navy); }

/* 練習メニュー等：汎用 button:hover のグレー上書きで色が消えないようにする */
button.menu-btn[data-menu="Sp"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--sp) 52%, var(--bg)) !important;
  color: var(--text-on-navy) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
button.menu-btn[data-menu="St"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--st) 52%, var(--bg)) !important;
  color: var(--text-on-navy) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
button.menu-btn[data-menu="Ph"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ph) 52%, var(--bg)) !important;
  color: var(--text-on-navy) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
button.menu-btn[data-menu="Mt"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--mt) 52%, var(--bg)) !important;
  color: var(--text-on-navy) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
button.menu-btn[data-menu="Sp"]:active:not(:disabled),
button.menu-btn[data-menu="St"]:active:not(:disabled),
button.menu-btn[data-menu="Ph"]:active:not(:disabled),
button.menu-btn[data-menu="Mt"]:active:not(:disabled) {
  transform: translateY(2px);
}

/* 赤／青を斜めの境目で二分（Sp 等と同じ color-mix 系で背景と文字のコントラストを確保） */
.menu-btn[data-menu="Balance"] {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--balance-r) 36%, var(--bg)) 0%,
    color-mix(in srgb, var(--balance-r) 36%, var(--bg)) 50%,
    color-mix(in srgb, var(--balance-b) 36%, var(--bg)) 50%,
    color-mix(in srgb, var(--balance-b) 36%, var(--bg)) 100%
  );
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-on-navy);
}

/* バランス：ホバー／押下でも赤青グラデが消えない（汎用 button:hover に負けない） */
button.menu-btn[data-menu="Balance"]:hover:not(:disabled) {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--balance-r) 50%, var(--bg)) 0%,
    color-mix(in srgb, var(--balance-r) 50%, var(--bg)) 50%,
    color-mix(in srgb, var(--balance-b) 50%, var(--bg)) 50%,
    color-mix(in srgb, var(--balance-b) 50%, var(--bg)) 100%
  ) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}

button.menu-btn[data-menu="Balance"]:active:not(:disabled) {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--balance-r) 44%, var(--bg)) 0%,
    color-mix(in srgb, var(--balance-r) 44%, var(--bg)) 50%,
    color-mix(in srgb, var(--balance-b) 44%, var(--bg)) 50%,
    color-mix(in srgb, var(--balance-b) 44%, var(--bg)) 100%
  ) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

button.menu-btn[data-menu="Balance"]:focus-visible:not(:disabled) {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.modal-root {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  /* 下部ナビ(50)より上。ログインオーバーレイ(9999)より下のため、エントリ中はチュートリアルはオーバーレイ解除後に見える */
  z-index: 200;
}

.modal-root.hidden {
  display: none;
}

.modal {
  width: min(90vw, 380px);
  max-height: 80vh;
  overflow-y: auto;
  background: var(--panel);
  color: var(--text-on-navy);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
}

/* 部費・入手確認：OK/獲得 を横長・赤、部費本文の金額は黄金色 */
.yen-gold {
  color: color-mix(in srgb, var(--joy-gold-deep) 35%, var(--joy-gold-mid));
  font-weight: 800;
  text-shadow: 0 0 12px rgba(232, 209, 138, 0.4);
}

.modal--club-fee .modal-alert-actions,
.modal--gain-ok .modal-alert-actions,
.modal--offline-battle-reminder .modal-alert-actions {
  margin-top: 16px;
  width: 100%;
  display: flex;
  justify-content: stretch;
}

.modal--club-fee .modal-alert-actions button.modal-btn-ok-wide-red,
.modal--gain-ok .modal-alert-actions button.modal-btn-ok-wide-red,
.modal--offline-battle-reminder .modal-alert-actions button.modal-btn-ok-wide-red {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 10px;
  border: 1px solid rgba(160, 35, 35, 0.95);
  background: linear-gradient(180deg, #e04040 0%, #b02020 100%);
  color: #fff;
  cursor: pointer;
}

.modal--club-fee .modal-alert-actions button.modal-btn-ok-wide-red:hover,
.modal--gain-ok .modal-alert-actions button.modal-btn-ok-wide-red:hover,
.modal--offline-battle-reminder .modal-alert-actions button.modal-btn-ok-wide-red:hover {
  filter: brightness(1.07);
}

/* スカウト／スキル選択：この選手を選ぶ など */
#modalRoot .scout-card .pickBtn {
  color: #ff5252 !important;
  border: 1px solid rgba(255, 82, 82, 0.55) !important;
  background: transparent !important;
  font-weight: 800;
}

#modalRoot .scout-card .pickBtn:hover {
  filter: brightness(1.08);
  border-color: rgba(255, 120, 120, 0.72) !important;
}

/* クラウド読み込み確認：大きめボタン、はい＝赤文字、いいえ＝無彩色 */
.modal--cloud-confirm .app-dialog-confirm-row {
  width: 100%;
  margin-top: 16px !important;
  justify-content: stretch !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

.modal--cloud-confirm .app-dialog-confirm-row button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
}

.modal--cloud-confirm #appConfirmYes {
  background: transparent !important;
  border: 2px solid rgba(255, 82, 82, 0.55) !important;
  color: #ff5252 !important;
}

.modal--cloud-confirm #appConfirmNo {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.38) !important;
}

/* 区間配置：作戦ブロックのみ木目調 */
.cpu-placement-tactics-details {
  margin: 10px 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(120, 82, 48, 0.55);
  background: linear-gradient(168deg, #3a2e22 0%, #261c14 48%, #1a130e 100%);
  padding: 0 10px 10px;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #f2e8dc;
}

.cpu-placement-tactics-summary {
  cursor: pointer;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 10px 4px 8px;
  list-style-position: outside;
  color: #fff4e6;
}

.cpu-placement-tactics-summary::-webkit-details-marker {
  color: #d4a574;
}

.cpu-placement-tactics-body {
  padding-top: 2px;
}

.cpu-placement-wind-one-line {
  margin: 0 0 10px;
  line-height: 1.45;
  color: inherit;
}

.cpu-tactics-fieldset {
  border: none;
  margin: 0 0 10px;
  padding: 0;
  min-width: 0;
}

.cpu-tactics-radio-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cpu-tactics-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.35;
  cursor: pointer;
  color: inherit;
}

.cpu-tactics-radio-label input {
  margin-top: 3px;
  flex-shrink: 0;
}

.cpu-order-sheet-embed {
  margin-top: 8px;
  min-height: 0;
}

.cpu-order-sheet-embed-loading,
.cpu-order-sheet-embed-error {
  margin: 8px 0;
  color: color-mix(in srgb, #f2e8dc 65%, var(--muted, #888));
}

.cpu-placement-tactics-details .cpu-order-sheet-embed-loading,
.cpu-placement-tactics-details .cpu-order-sheet-embed-error {
  color: color-mix(in srgb, #f2e8dc 72%, #8a7264);
}

/* ライフ不足モーダル：広告回復ボタン（赤系で目立たせる） */
.insufficient-life-ad-btn {
  font-weight: 800;
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  border: 1px solid color-mix(in srgb, var(--danger) 70%, #fff 10%) !important;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--danger) 82%, #fff 18%) 0%,
    var(--danger) 45%,
    color-mix(in srgb, var(--danger) 68%, #000 32%) 100%
  ) !important;
  box-shadow:
    0 2px 0 color-mix(in srgb, var(--danger) 40%, #000),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.insufficient-life-ad-btn:hover:not(:disabled) {
  filter: brightness(1.07);
}

.insufficient-life-ad-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.ranking-modal-scroll {
  max-height: min(50vh, 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 選手詳細：所持アイテム（ダブルクリックで使用） */
.player-detail-hint {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 6px;
}

.player-detail-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-detail-item-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
}

.player-detail-item-row .player-detail-item {
  flex: 1;
  min-width: 0;
}

.player-detail-item-use-btn {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}

.player-detail-item {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--team) 30%, #555);
  background: var(--panel-2);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  font-size: 0.85rem;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.player-detail-item:hover {
  border-color: color-mix(in srgb, var(--team) 55%, #888);
  background: color-mix(in srgb, var(--panel-2) 90%, var(--team) 10%);
}

.player-detail-item-name {
  display: block;
  font-weight: 700;
}

.player-detail-inv-hint {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.4;
}

.player-detail-item-effect {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.35;
  opacity: 0.92;
}

.player-detail-item--skill .player-detail-item-name,
.player-detail-item--skill .player-detail-item-effect {
  color: var(--ekiden-skill-fg);
  opacity: 1;
  font-weight: 800;
}

.player-detail-item--skill .player-detail-item-effect {
  font-weight: 600;
  color: var(--ekiden-skill-fg-soft);
}

#modalRoot .modal.modal--record-meet-select {
  position: relative;
}
#modalRoot .modal.modal--record-meet-select #closeRecordModal {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 5;
}
#modalRoot .modal.modal--record-meet-result,
#modalRoot .modal.modal--race-result-share {
  position: relative;
  padding-top: 44px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  overflow-x: hidden;
}
.modal-result-topbar {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  bottom: auto;
  z-index: 6;
  width: max-content;
  max-width: calc(100% - 20px);
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.modal-result-share-btn {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--text-on-navy);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  cursor: pointer;
}
.modal-result-close-btn {
  min-width: 36px;
  min-height: 32px;
  padding: 4px 10px;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 8px;
}
#modalRoot .modal.modal--record-meet-result #closeResultModal,
#modalRoot .modal.modal--record-meet-result #raceResultShareBtn,
#modalRoot .modal.modal--race-result-share #closeResultModal,
#modalRoot .modal.modal--race-result-share #raceResultShareBtn,
#modalRoot .modal.modal--race-result-share .modal-result-close-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  margin: 0 !important;
  flex: 0 0 auto;
}

/* 記録会でベスト更新・初記録のときのみ赤で強調 */
.best-new,
.record-meet-time--new-best {
  color: #e04545;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(224, 69, 69, 0.35);
}
.record-meet-pb-note {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25ch;
  white-space: nowrap;
}
.record-meet-meta-label {
  font-size: 0.82em;
  color: var(--muted);
}
.record-meet-meta-value {
  font-size: 0.92em;
}
.record-meet-meta-arrow {
  font-size: 0.84em;
  color: var(--muted);
}
.record-meet-meta-best {
  font-size: 0.92em;
}
#modalRoot .modal.modal--record-meet-result .record-meet-result-line {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.45rem;
  row-gap: 2px;
}
#modalRoot .modal.modal--record-meet-result .record-meet-result-rank {
  min-width: 0;
}
#modalRoot .modal.modal--record-meet-result .record-meet-time {
  min-width: 0;
  text-align: right;
}
#modalRoot .modal.modal--record-meet-result .record-meet-pb-note {
  min-width: 0;
  text-align: right;
  transform: none;
}
#modalRoot .modal.modal--record-meet-result .record-meet-result-lines-card {
  text-align: left;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#modalRoot .modal.modal--record-meet-result .record-meet-result-rank,
#modalRoot .modal.modal--record-meet-result .record-meet-time,
#modalRoot .modal.modal--record-meet-result .record-meet-pb-note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#modalRoot .modal.modal--record-meet-result .result-list.record-meet-result-lines {
  min-width: 0;
  max-width: 100%;
}

.joy-yen,
.joy-record {
  color: var(--joy-gold-mid);
  font-weight: 800;
  text-shadow: 0 0 12px rgba(232, 209, 138, 0.4);
}

.record-meet-prize-below {
  margin: 6px 0 12px;
  line-height: 1.45;
  color: var(--joy-gold-mid);
  text-align: left;
  font-weight: 800;
  text-shadow: 0 0 14px rgba(232, 209, 138, 0.38);
}

.prize-yen-line {
  margin-top: 8px;
}

/* 公式戦結果モーダル：参加賞の行を読みやすく */
.official-result-participation-line {
  color: color-mix(in srgb, var(--success, #6bc96b) 90%, var(--text-on-navy, #fff));
  line-height: 1.5;
  font-weight: 600;
}

.official-result-participation-line strong {
  color: color-mix(in srgb, var(--success, #8fdf9a) 95%, #fff);
  font-weight: 800;
}

/* 告知ページ public.html（大会本部アナウンス） */
html.public-announce-root,
body.public-announce-body {
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.public-announce-body {
  min-height: 100vh;
  margin: 0;
  padding: 16px;
  box-sizing: border-box;
}

/* 本体の .phone-shell と同じ最大幅・高さ（430×900）で比率を揃える。長い内容はシェル内スクロール */
.phone-shell.public-announce-shell {
  width: min(100vw, 430px);
  max-width: 430px;
  height: min(100dvh - 32px, 900px);
  min-height: min(100dvh - 32px, 900px);
  max-height: min(100dvh - 32px, 900px);
  overflow-x: hidden;
  overflow-y: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.public-announce-shell {
  width: min(100vw, 430px);
  max-width: 430px;
}

/* 公開情報ページ上部：横幅いっぱい（シェル幅に合わせて縮小） */
.public-announce-hero {
  width: 100%;
  margin: 0 0 12px;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
}

.public-announce-hero-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  object-fit: contain;
}

.public-announce-card {
  text-align: center;
}

.public-announce-title {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.public-announce-lead {
  margin: 0;
  line-height: 1.65;
  font-size: 0.95rem;
}

.public-section-title {
  font-size: 1.05rem;
  margin: 0 0 8px;
  font-weight: 800;
}

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

.public-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.public-team-search-input {
  flex: 1 1 180px;
  min-width: 0;
}

.public-search-submit-btn {
  flex: 0 0 auto;
  font-weight: 700;
}

.public-search-clear-btn {
  flex: 0 0 auto;
}

.public-roster-stat {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.public-roster-stat .public-rank-badge {
  margin-left: 4px;
  font-size: 0.95em;
}

.public-ranking-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.public-rank-details {
  border: 1px solid color-mix(in srgb, var(--team) 10%, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.public-compact-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.public-compact-summary::-webkit-details-marker {
  display: none;
}

.public-compact-summary::marker {
  content: "";
}

.public-rank-num {
  font-weight: 900;
  min-width: 2.8em;
}

.public-rank-rate {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.public-rank-badge {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.public-rank-badge--muted {
  color: var(--muted);
  font-weight: 700;
}

.public-rank-team {
  font-weight: 700;
  flex: 1 1 140px;
  min-width: 0;
  word-break: break-word;
}

.public-rank-pref {
  color: var(--muted);
}

.public-rank-details-body {
  padding: 0 12px 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.public-region-section {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--team) 12%, transparent);
}

.public-region-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.public-region-heading {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
}

.public-regional-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 6px 0;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.public-regional-row:last-child {
  border-bottom: none;
}

.public-regional-idx {
  font-weight: 800;
  min-width: 2.2em;
  color: var(--muted);
}

.national-join-card {
  text-align: left;
  border-color: color-mix(in srgb, #c44 28%, rgba(255, 255, 255, 0.12));
}

.national-join-hint {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.national-join-meta-hint {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.78rem;
}

.national-online-tournament-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
  text-align: center;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--muted);
  text-decoration: none;
}

.national-online-tournament-link:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.national-join-battle-btns {
  display: flex;
  flex-wrap: nowrap;
  margin: 10px 0 12px;
  gap: 8px;
  align-items: stretch;
}

.battle-online-match-btn--national {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
}

.national-join-battle-btns .battle-online-match-btn {
  width: auto;
  flex: 1 1 0;
}

.national-join-card--offline-only .national-join-disabled-faux {
  cursor: default;
  opacity: 0.58;
  pointer-events: none;
}

.public-collapsible-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.public-collapsible-summary::after {
  content: "▼";
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  transform-origin: 50% 45%;
  transition: transform 0.15s ease;
}

.public-collapsible-card[open] > .public-collapsible-summary::after {
  transform: rotate(180deg);
}

.public-collapsible-summary::-webkit-details-marker {
  display: none;
}

.public-participants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.public-participants-table th,
.public-participants-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 8px;
  text-align: left;
}

.public-participants-table th {
  background: color-mix(in srgb, var(--panel-2) 85%, #000 15%);
  font-weight: 700;
}

.public-uid-cell {
  font-size: 0.62rem;
  word-break: break-all;
}

.public-users-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.public-user-block {
  text-align: left;
  padding: 12px 14px;
}

.public-user-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.public-user-meta {
  color: var(--muted);
  font-weight: 600;
}

.public-tag-national {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  background: color-mix(in srgb, #c44 35%, transparent);
  color: #ffb3b3;
}

.public-subh {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.public-legs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.public-leg-cell {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: color-mix(in srgb, var(--panel-2) 90%, #000 10%);
  font-size: 0.72rem;
}

.public-leg-num {
  color: var(--muted);
  font-size: 0.65rem;
}

.public-leg-name {
  font-weight: 700;
  margin-top: 2px;
}

.public-player-stats-table {
  margin-top: 4px;
  font-size: 0.68rem;
}

.result-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-navy);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.76rem;
}

.chip--captain {
  border-color: rgba(255, 126, 126, 0.55);
  background: rgba(255, 126, 126, 0.22);
}

.chip--vice-captain {
  border-color: rgba(122, 178, 255, 0.56);
  background: rgba(122, 178, 255, 0.22);
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: color-mix(in srgb, currentColor 18%, transparent);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* 旧ライフカウント（互換・未使用） */
.life-count {
  font-size: 0.58rem;
  color: var(--muted);
}

.overall-line {
  font-weight: 950;
  font-size: 0.80rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stat-num {
  font-weight: 1000;
}

.stats-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.68rem;
  opacity: 0.98;
}

.stat-key {
  font-weight: 900;
  min-width: 2.1ch;
}

.stat-line--pair {
  margin-top: 1px;
}

.stat-sep {
  opacity: 0.65;
  font-weight: 900;
}

.stat-group {
  position: relative;
  display: inline-flex;
  align-items: baseline;
}

.gain-pop {
  color: var(--success);
  font-weight: 1000;
  font-size: 0.70rem;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.85),
    0 1px 2px rgba(0, 0, 0, 0.9);
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  animation: gainPop 900ms ease-out forwards;
}

@keyframes gainPop {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
}

#screen-training .player-card {
  position: relative;
  overflow: hidden;
}

#screen-training .player-card::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto -30%;
  height: 80%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  transform: rotate(-6deg);
  pointer-events: none;
  opacity: 0.45;
}

/* 練習：総合行だけ目立たせ、それ以外（名前・4能力・練習ボタン等）は小さく */
#screen-training .player-card > .row {
  font-size: 0.62rem;
}

#screen-training .player-card > .row strong {
  font-size: 0.74rem;
  font-weight: 800;
}

#screen-training .player-card > .row .chip {
  font-size: 0.56rem;
  padding: 1px 5px;
}

#screen-training .player-card > .runner-illu-stack {
  width: 26px;
  height: 26px;
}

#screen-training .player-card > .overall-line {
  font-size: 0.92rem;
  font-weight: 950;
  letter-spacing: 0.02em;
}

#screen-training .player-card > .stat-line {
  font-size: 0.56rem;
  gap: 4px;
}

#screen-training .player-card > .stat-line.stat-line--pair {
  font-size: calc(0.56rem - 1px);
}

#screen-training .player-card > .stat-line .rank {
  transform: scale(0.92);
  transform-origin: left center;
}

#screen-training .player-card > .menu-btn {
  font-size: 0.62rem;
  padding: 3px 5px;
  border-radius: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#screen-training .player-card .fav-btn {
  width: 22px;
  height: 22px;
  font-size: 0.78rem;
  border-radius: 8px;
}

#screen-training .player-card .gain-pop {
  font-size: 0.74rem;
  top: -9px;
  color: #ff6b6b !important;
  text-shadow:
    0 0 6px rgba(180, 40, 40, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.95);
}

#screen-training .player-card .gain-pop.gain-pop--awaken {
  font-size: 1.08rem !important;
  font-weight: 1000;
  top: -13px;
  color: #ff2222 !important;
  text-shadow:
    0 0 10px rgba(220, 30, 30, 1),
    0 0 18px rgba(80, 0, 0, 0.85),
    0 2px 3px rgba(0, 0, 0, 0.95);
  animation: gainPopAwaken 3s ease-out forwards;
}

#screen-training .player-card .gain-pop.gain-pop--injury {
  font-size: 0.74rem;
  top: -9px;
  color: #6eb8ff !important;
  text-shadow:
    0 0 6px rgba(40, 90, 180, 0.85),
    0 1px 2px rgba(0, 0, 0, 0.95);
}

#screen-training .player-card .gain-pop.gain-pop--injury.gain-pop--injury-big {
  font-size: 1.04rem !important;
  font-weight: 900;
  top: -12px;
  color: #4a9fff !important;
  text-shadow:
    0 0 10px rgba(60, 140, 255, 0.95),
    0 0 16px rgba(20, 50, 120, 0.7),
    0 2px 3px rgba(0, 0, 0, 0.95);
  animation: gainPopAwaken 3s ease-out forwards;
}

@keyframes gainPopAwaken {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  65% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-16px) scale(1.02);
  }
}

.training-awaken-flash {
  position: fixed;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  z-index: 12000;
  pointer-events: none;
  max-width: min(96vw, 22em);
  padding: 0 10px;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.28;
  font-size: clamp(1.45rem, 5.5vw, 2.65rem);
  font-weight: 950;
  letter-spacing: 0.03em;
  color: #ff1a1a;
  text-shadow:
    0 0 14px rgba(255, 80, 80, 0.95),
    0 0 28px rgba(120, 0, 0, 0.65),
    0 3px 8px rgba(0, 0, 0, 0.9);
  opacity: 1;
  transition: opacity 2.8s ease-out;
}

.training-awaken-flash.training-awaken-flash--fade {
  opacity: 0;
}

.training-injury-flash {
  position: fixed;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  z-index: 12000;
  pointer-events: none;
  max-width: min(96vw, 22em);
  padding: 0 10px;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.28;
  font-size: clamp(1.35rem, 5.2vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #5aa8ff;
  text-shadow:
    0 0 14px rgba(100, 170, 255, 0.9),
    0 0 26px rgba(30, 60, 140, 0.55),
    0 3px 8px rgba(0, 0, 0, 0.88);
  opacity: 1;
  transition: opacity 2.8s ease-out;
}

.training-injury-flash.training-injury-flash--fade {
  opacity: 0;
}

#screen-training .player-card--simple {
  padding: 4px 5px 2px;
  gap: 3px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  position: relative;
}

#screen-training .player-card--simple > .menu-btn {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 2px 8px;
  min-height: 0;
  line-height: 1.35;
  border-radius: 8px;
  text-align: center;
}

#screen-training .player-card--simple > .overall-line--compact {
  font-size: 0.78rem;
  margin: 4px 0 6px;
}

#screen-training .player-card-simple-line {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 1px;
  min-width: 0;
  width: 100%;
  font-size: 0.62rem;
  line-height: 1.15;
  color: var(--text);
  text-align: left;
  letter-spacing: 0.01em;
}

#screen-training .player-card--simple .player-card-simple-val {
  position: relative;
  display: inline-flex;
  align-items: center;
}
#screen-training .player-card--simple .player-card-simple-val .gain-pop {
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  transform: translateY(-50%);
  animation: gainPopInline 950ms ease-out forwards;
}
@keyframes gainPopInline {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(-4px);
  }
  20% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(8px);
  }
}
#screen-training .player-card .overall-line .stat-group .gain-pop {
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}

#screen-training .player-card--simple .player-card-simple-name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

#screen-training .player-card-simple-rank {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: left;
}

#screen-training .player-card-simple-rank .rank {
  font-size: 0.62rem;
  transform: none;
  transform-origin: left center;
}

#screen-training .player-card-simple-val {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: left;
}

#screen-training .player-card-simple-line .chip {
  flex-shrink: 0;
  text-align: left;
  font-size: 0.58rem;
  padding: 1px 5px;
  line-height: 1.2;
  border-radius: 6px;
}

#screen-training .player-card-best {
  margin: 2px 0 4px;
  font-size: 0.52rem;
  color: var(--muted);
  line-height: 1.35;
}

/* 詳細カード：学年横のスキル chip（他画面と同系の緑） */
#screen-training .player-card--detail .chip.chip--skill {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  line-height: 1.35;
  color: var(--ekiden-skill-fg-soft);
  background: var(--ekiden-skill-chip-bg);
  border: 1px solid var(--ekiden-skill-chip-border);
  text-shadow: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

#screen-training .player-card--detail .runner-illu-stack:not(.runningman--detail) {
  margin-top: 1px;
}

.fav-btn {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.20);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.fav-btn.on {
  border-color: color-mix(in srgb, var(--accent) 60%, #ffffff 0%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

#bulkMenuBtn {
  /* menu-btn[data-menu] の色をそのまま使う */
  font-weight: 900;
  box-shadow: none;
}

/* 練習バー・一括メニューのみ：1行・幅固定（練習ボタンと高さを揃えない） */
#screen-training .training-actions #bulkMenuBtn.menu-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 6rem;
  min-width: 6rem;
  max-width: 6rem;
  height: auto;
  min-height: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 0.88rem;
  line-height: 1.25;
}

/* 選手イラスト：下層PNG + 上層SVGマスク着色（runner_upper.svg） */
.runner-illu-stack {
  position: relative;
  width: 30px;
  height: 30px;
  align-self: center;
  flex-shrink: 0;
}

.runner-illu-stack .runner-under {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.95;
  pointer-events: none;
}

.runner-illu-stack .runner-upper-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: url("./images/runner_upper.svg");
  mask-image: url("./images/runner_upper.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  mask-mode: alpha;
  background-color: var(--player-runner-upper, #9f704f);
  pointer-events: none;
}

.runner-illu-stack.runningman--detail {
  width: 52px;
  height: 52px;
  margin: 4px auto 2px;
  display: block;
}

@keyframes tremble {
  0% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(-2px, 0) rotate(-2deg); }
  30% { transform: translate(2px, 0) rotate(2deg); }
  45% { transform: translate(-1px, 0) rotate(-1deg); }
  60% { transform: translate(1px, 0) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.runner-illu-stack.shake {
  animation: tremble 0.6s ease-in-out;
}

#playerRunnerUpperColor {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

/* Training screen */
.training-actions {
  position: sticky;
  bottom: 0;
  top: auto;
  z-index: 10;
  margin-bottom: 0;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0;
  pointer-events: none; /* 下部ナビのクリックを邪魔しない */
}

.training-actions button {
  pointer-events: auto;
}

.train-action-btn {
  flex: 1 1 auto;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #e05050, #b02828) !important;
  border-color: #c84040 !important;
  box-shadow: 0 4px 14px rgba(192, 40, 40, 0.45);
}
.train-action-btn:hover {
  filter: brightness(1.07);
}
.train-action-btn:active {
  transform: translateY(1px);
}

.train-action-btn--disabled,
.train-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.35);
  box-shadow: none;
  transform: none;
}
.train-action-btn--disabled:hover,
.train-action-btn:disabled:hover {
  filter: grayscale(0.35);
}

.training-actions .small {
  margin-top: 6px;
}

/* Compact player cards */
.player-card {
  padding: 4px;
  gap: 2px;
}

.player-card strong {
  font-size: 0.90rem;
}

.player-card .small {
  font-size: 0.72rem;
}

.player-card .chip {
  font-size: 0.68rem;
  padding: 2px 6px;
}

.player-card .menu-btn {
  padding: 4px 6px;
  border-radius: 9px;
  font-size: 0.76rem;
}

/* CPU placement modal（区間枠・選手一覧は通常表示・選択枠は 2px でサイズ一定） */
.cpu-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

/* 5区：Z字（1区左上→2区右上→3区左…） */
.cpu-slots.cpu-slots--map5 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  grid-template-areas:
    "z5a z5b"
    "z5c z5d"
    "z5e .";
}

.cpu-slots.cpu-slots--map5 > [data-cpu-slot-leg="0"] {
  grid-area: z5a;
}

.cpu-slots.cpu-slots--map5 > [data-cpu-slot-leg="1"] {
  grid-area: z5b;
}

.cpu-slots.cpu-slots--map5 > [data-cpu-slot-leg="2"] {
  grid-area: z5c;
}

.cpu-slots.cpu-slots--map5 > [data-cpu-slot-leg="3"] {
  grid-area: z5d;
}

.cpu-slots.cpu-slots--map5 > [data-cpu-slot-leg="4"] {
  grid-area: z5e;
}

/* 8区：Z字（1区左上→2区右上→…） */
.cpu-slots.cpu-slots--map8 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  grid-template-areas:
    "l1 l2"
    "l3 l4"
    "l5 l6"
    "l7 l8";
}

.cpu-slots.cpu-slots--map8 > [data-cpu-slot-leg="0"] {
  grid-area: l1;
}

.cpu-slots.cpu-slots--map8 > [data-cpu-slot-leg="1"] {
  grid-area: l2;
}

.cpu-slots.cpu-slots--map8 > [data-cpu-slot-leg="2"] {
  grid-area: l3;
}

.cpu-slots.cpu-slots--map8 > [data-cpu-slot-leg="3"] {
  grid-area: l4;
}

.cpu-slots.cpu-slots--map8 > [data-cpu-slot-leg="4"] {
  grid-area: l5;
}

.cpu-slots.cpu-slots--map8 > [data-cpu-slot-leg="5"] {
  grid-area: l6;
}

.cpu-slots.cpu-slots--map8 > [data-cpu-slot-leg="6"] {
  grid-area: l7;
}

.cpu-slots.cpu-slots--map8 > [data-cpu-slot-leg="7"] {
  grid-area: l8;
}

/* おまけ10区：Z字2列 */
.cpu-slots.cpu-slots--map10 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  grid-template-areas:
    "o1 o2"
    "o3 o4"
    "o5 o6"
    "o7 o8"
    "o9 o10";
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="0"] {
  grid-area: o1;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="1"] {
  grid-area: o2;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="2"] {
  grid-area: o3;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="3"] {
  grid-area: o4;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="4"] {
  grid-area: o5;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="5"] {
  grid-area: o6;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="6"] {
  grid-area: o7;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="7"] {
  grid-area: o8;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="8"] {
  grid-area: o9;
}
.cpu-slots.cpu-slots--map10 > [data-omake-slot-leg="9"] {
  grid-area: o10;
}

/* 区間配置モーダル：タイトル行 */
.cpu-placement-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.cpu-placement-title-text {
  flex: 1 1 auto;
  min-width: 0;
}

.cpu-placement-title-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cpu-placement-tourney-paren {
  flex: 0 0 auto;
  align-self: center;
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--muted);
  margin: 0 4px;
  white-space: nowrap;
}

.cpu-placement-modal-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

/* トラック形式モーダル：タイトル左・表示切替＋閉じるは右上（縦横共通。旧：横画面のみ absolute） */
#modalRoot .modal.modal--individual-track > .cpu-placement-title-row .cpu-placement-modal-title {
  padding-right: 6px;
}

/* 区間配置：作戦は1ボタンで順送り（色で種別を示す） */
.cpu-tactics-cycle-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: color-mix(in srgb, var(--panel-2) 90%, #1a1f2e);
  color: var(--text, #e8ecf4);
  text-align: center;
  transition: transform 0.08s ease, filter 0.12s ease;
}

.cpu-tactics-cycle-btn:active {
  transform: scale(0.98);
}

.cpu-tactics-cycle-label {
  font-weight: 900;
  font-size: 0.92rem;
  line-height: 1.25;
}

.cpu-tactics-cycle--aggressive {
  --cpu-tactics-cycle-bg: linear-gradient(
    145deg,
    color-mix(in srgb, #8b2222 58%, var(--panel-2)),
    color-mix(in srgb, #4a1515 45%, var(--panel))
  );
  border-color: #c44;
  background: var(--cpu-tactics-cycle-bg);
  color: #fff;
}

.cpu-tactics-cycle--stamina {
  --cpu-tactics-cycle-bg: linear-gradient(
    145deg,
    color-mix(in srgb, #1e5a9a 52%, var(--panel-2)),
    color-mix(in srgb, #123a5c 45%, var(--panel))
  );
  border-color: #3d8fd4;
  background: var(--cpu-tactics-cycle-bg);
  color: #f0f6ff;
}

.cpu-tactics-cycle--mypace {
  --cpu-tactics-cycle-bg: linear-gradient(
    145deg,
    color-mix(in srgb, #1f7a3a 50%, var(--panel-2)),
    color-mix(in srgb, #124526 42%, var(--panel))
  );
  border-color: #3cb371;
  background: var(--cpu-tactics-cycle-bg);
  color: #f4fff6;
}

.cpu-tactics-cycle--mark {
  --cpu-tactics-cycle-bg: linear-gradient(
    145deg,
    color-mix(in srgb, #a88418 52%, var(--panel-2)),
    color-mix(in srgb, #5c4e0f 40%, var(--panel))
  );
  border-color: #d4b32e;
  background: var(--cpu-tactics-cycle-bg);
  color: #fffbeb;
}

/* 汎用 button:hover のグレー背景で作戦色が消えない */
button.cpu-tactics-cycle-btn:hover:not(:disabled) {
  background: var(--cpu-tactics-cycle-bg) !important;
  filter: brightness(1.08);
  border-color: rgba(255, 255, 255, 0.48);
}

.cpu-order-sheet-open-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.cpu-order-sheet-panel {
  margin-top: 4px;
}

.cpu-order-sheet-cols {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  -webkit-overflow-scrolling: touch;
}

.cpu-order-sheet-col {
  flex: 0 0 auto;
  width: min(48vw, 11.5rem);
  max-width: 11.5rem;
  min-width: 9.25rem;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  padding: 7px 7px 8px;
  background: color-mix(in srgb, var(--panel) 94%, #000);
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
}

.cpu-order-sheet-col--self {
  border-color: color-mix(in srgb, var(--team) 42%, rgba(255, 255, 255, 0.15));
  background: color-mix(in srgb, var(--panel-2) 88%, var(--team) 8%);
}

.cpu-order-sheet-team-head {
  font-weight: 900;
  font-size: 0.8rem;
  line-height: 1.22;
  text-align: center;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  word-break: break-word;
}

.cpu-order-sheet-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cpu-order-sheet-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px 6px;
  align-items: center;
  font-size: 0.74rem;
  line-height: 1.22;
  min-width: 0;
}

.cpu-order-sheet-leg {
  flex: 0 0 auto;
  font-weight: 900;
  color: var(--telop-gold-bright, #e8d5a8);
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
  white-space: nowrap;
}

.cpu-order-sheet-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0;
}

.cpu-order-sheet-rank {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
}

.cpu-order-sheet-rank .rank {
  transform: scale(0.9);
  transform-origin: right center;
}

.cpu-order-sheet-toolbar {
  flex-wrap: wrap;
}

/* 区間スロットと選手一覧の区切り */
.cpu-placement-separator {
  display: block;
  height: 0;
  margin: 16px 0 14px;
  padding: 0;
  border: none;
  border-top: 5px solid color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, 0.2));
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.cpu-slots > .card.cpu-slot-card {
  padding: 4px 6px !important;
  margin-bottom: 0 !important;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28) !important;
  min-height: 4.25rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.cpu-slots > .card.cpu-slot-card > .cpu-slot-inner {
  flex: 1 1 auto;
  min-height: 0;
}

.cpu-slot-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.cpu-slot-body {
  flex: 1 1 auto;
  min-width: 0;
}

.cpu-slot-meta--empty-row {
  margin-bottom: 0 !important;
  flex-wrap: wrap;
}

.cpu-slot-empty-hint {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.95;
}

.cpu-slot-card--empty {
  background: color-mix(in srgb, var(--panel) 94%, #000) !important;
  border: 2px solid color-mix(in srgb, var(--muted) 32%, transparent) !important;
  box-sizing: border-box;
}

.cpu-slot-card--filled {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--panel-2) 96%, #000),
    color-mix(in srgb, var(--panel) 90%, #000)
  ) !important;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent) !important;
  box-sizing: border-box;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 2px 10px rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.cpu-slot-card--filled .cpu-slot-meta {
  color: var(--muted);
}

.cpu-slot-card--filled .cpu-slot-leg-num {
  color: var(--telop-white);
}

.cpu-slot-card--filled .cpu-slot-km {
  color: var(--muted);
  opacity: 1;
}

.cpu-slot-card--filled .cpu-slot-rank-badge {
  color: var(--text);
}

.cpu-slot-card--filled .cpu-slot-rank-badge .rank {
  color: inherit !important;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.cpu-slot-card--filled .cpu-slot-rank-badge--none {
  color: var(--muted);
}

.cpu-slot-card--filled .cpu-slot-player-name {
  color: var(--text);
}

.cpu-slot-card--filled .cpu-slot-player-name strong {
  color: var(--telop-white);
}

.cpu-slot-player-line {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  line-height: 1.15;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  min-width: 0;
}

.cpu-slot-player-line-left {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px 4px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.cpu-slot-player-line-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.cpu-slot-player-line-right .stat-num {
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.cpu-slot-skill-after-rank {
  flex: 0 1 auto;
  margin-left: 2px;
  font-size: 0.54rem;
  font-weight: 800;
  color: var(--ekiden-skill-fg);
  line-height: 1.1;
  max-width: 4.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpu-pick-rank-skill-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 2px 4px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.cpu-slot-player-line--empty-slot {
  margin-top: 2px;
  min-height: 1.75rem;
  align-items: center;
  opacity: 0.4;
  pointer-events: none;
}

.cpu-slot-empty-slot-ph,
.cpu-slot-empty-slot-stat {
  font-size: 0.58rem;
  color: var(--muted);
}

.cpu-slot-player-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  font-size: 0.76rem;
  color: var(--text);
}

.cpu-slot-player-line .chip {
  flex-shrink: 0;
  font-size: 0.52rem;
  padding: 1px 4px;
  line-height: 1.2;
  border-radius: 5px;
}

.cpu-slot-card--filled .cpu-slot-player-line .chip {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--panel) 80%, #000);
  color: var(--telop-gold-bright);
}

.cpu-slot-player-line-left .rank {
  flex-shrink: 0;
  margin-left: 3px;
  transform: scale(0.92);
  transform-origin: left center;
}

.omake-battle-placement-inner--simple .cpu-slots > .card.cpu-slot-card {
  min-height: 2.2rem;
  padding: 3px 6px !important;
}

.omake-battle-placement-inner--simple .cpu-slot-inner {
  align-items: center;
}

.omake-battle-placement-inner--simple .cpu-slot-player-line--simple {
  font-size: 0.66rem;
  line-height: 1.05;
  min-height: 1.1rem;
  gap: 4px;
  align-items: center;
}

.omake-battle-placement-inner--simple .cpu-slot-player-line--simple .cpu-slot-player-line-left {
  gap: 3px;
  white-space: nowrap;
}

.omake-battle-placement-inner--simple .cpu-slot-player-line--simple .cpu-slot-leg-num {
  font-size: 0.62rem;
}

.omake-battle-placement-inner--simple .cpu-slot-player-line--simple strong {
  font-size: 0.72rem;
}

.omake-battle-placement-inner--simple .cpu-slot-player-line--simple .chip {
  font-size: 0.56rem;
  padding: 1px 4px;
}

.omake-battle-placement-inner--simple .cpu-slot-player-line--simple .rank {
  transform: none;
  font-size: 0.62rem;
  line-height: 1;
}

.omake-battle-placement-inner--simple .cpu-slot-player-line--simple .cpu-slot-terrain {
  display: none;
}

.cpu-slot-terrain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 1px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  line-height: 1.2;
}

.cpu-slot-terrain--roller {
  background: color-mix(in srgb, var(--accent) 35%, rgba(0, 0, 0, 0.5));
  color: #ffe8d0;
  border-color: color-mix(in srgb, var(--accent) 50%, transparent) !important;
}

.cpu-slot-terrain--up {
  background: color-mix(in srgb, var(--danger) 42%, rgba(0, 0, 0, 0.45));
  color: #fff;
  border-color: color-mix(in srgb, var(--danger) 55%, transparent) !important;
}

.cpu-slot-terrain--down {
  background: color-mix(in srgb, var(--balance-b) 42%, rgba(0, 0, 0, 0.45));
  color: #fff;
  border-color: color-mix(in srgb, var(--balance-b) 55%, transparent) !important;
}

.cpu-slot-card--tappable {
  cursor: pointer;
}
.cpu-slot-card--tappable:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 80%, #fff);
  outline-offset: 2px;
}

.cpu-slot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  margin-bottom: 3px;
  font-size: 0.64rem;
  color: var(--muted);
  line-height: 1.2;
}

.cpu-slot-leg-num {
  font-weight: 900;
  color: var(--text, #eee);
}

.cpu-slot-km {
  opacity: 0.95;
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cpu-slot-rank-badge {
  margin-left: auto;
  font-size: 0.72rem;
}

.cpu-slot-rank-badge--none {
  color: var(--muted);
  font-weight: 700;
}

.cpu-slot-player-name {
  font-size: 0.72rem;
}

/* 区間配置・選手一覧：2列・4px 枠（未選択は透明／配置済みは太い黄枠） */
.cpu-pick-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.cpu-pick-list button.cpu-pick-player-btn[data-place-player],
.cpu-pick-list button.cpu-pick-player-btn[data-omake-place-player],
.cpu-pick-list button.cpu-pick-player-btn[data-omake-myteam-place-player] {
  border-width: 4px;
  border-style: solid;
  border-color: transparent;
  box-sizing: border-box;
  padding: 8px 8px !important;
  margin-bottom: 0 !important;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  border-radius: 10px;
}

.cpu-pick-list button.cpu-pick-player-btn.cpu-pick-btn--placed:not(:disabled) {
  border-color: #ffd700 !important;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.42),
    0 4px 12px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cpu-pick-list button.cpu-pick-player-btn[data-place-player]:hover:not(:disabled),
.cpu-pick-list button.cpu-pick-player-btn[data-omake-place-player]:hover:not(:disabled),
.cpu-pick-list button.cpu-pick-player-btn[data-omake-myteam-place-player]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--panel-2) 92%, var(--team) 14%) !important;
  border-color: color-mix(in srgb, var(--team) 35%, transparent) !important;
}

.cpu-pick-list button.cpu-pick-player-btn.cpu-pick-btn--placed:hover:not(:disabled) {
  border-color: #ffd700 !important;
}

.cpu-pick-normal {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  text-align: left;
}

.cpu-pick-normal .cpu-pick-name-row {
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-on-navy);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.cpu-pick-normal .pick-name {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpu-pick-normal .cpu-pick-name-row .rank {
  flex-shrink: 0;
}

.cpu-pick-normal .cpu-pick-meta-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--muted);
}

.cpu-pick-normal .cpu-pick-meta-row .chip {
  font-size: 0.68rem;
  padding: 2px 6px;
}

.cpu-pick-normal .cpu-pick-meta-row .pick-val {
  font-weight: 900;
  font-size: 0.88rem;
  color: var(--text-on-navy);
  font-variant-numeric: tabular-nums;
}

.omake-battle-placement-inner--simple .cpu-pick-list button.cpu-pick-player-btn[data-omake-place-player] {
  padding: 4px 6px !important;
  min-height: 1.95rem;
  border-width: 3px;
}

.omake-battle-placement-inner--simple .cpu-pick-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.cpu-pick-normal--simple {
  gap: 0;
}

.cpu-pick-normal--simple .cpu-pick-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  line-height: 1.05;
  white-space: nowrap;
}

.cpu-pick-normal--simple .pick-name {
  flex: 1 1 auto;
  min-width: 0;
}

.cpu-pick-normal--simple .chip {
  font-size: 0.54rem;
  padding: 1px 4px;
}

.cpu-pick-normal--simple .rank {
  transform: none;
  font-size: 0.6rem;
  line-height: 1;
}

.cpu-pick-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px 4px;
  font-size: 0.5rem;
  line-height: 1.15;
  color: var(--muted);
}

.cpu-pick-stats-grid .cpu-pick-stat-cell {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 1px 2px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.cpu-pick-stats-grid .cpu-pick-stat-cell abbr {
  flex-shrink: 0;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.48rem;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--muted) 65%, var(--text-on-navy));
}

.cpu-pick-stats-grid .cpu-pick-stat-cell .rank {
  flex-shrink: 0;
  transform: scale(1);
  transform-origin: left center;
  font-size: 0.58rem;
}

.cpu-pick-stats-grid .cpu-pick-stat-num {
  flex-shrink: 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.5rem;
  color: var(--text-on-navy);
}

/* 後方互換：旧コンパクト（未使用想定） */
.cpu-pick-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 5px;
  width: 100%;
  font-size: 0.58rem;
  line-height: 1.15;
}

.cpu-pick-compact .pick-name {
  font-weight: 800;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpu-pick-compact .chip {
  flex-shrink: 0;
  font-size: 0.52rem;
  padding: 1px 4px;
  line-height: 1.2;
  border-radius: 5px;
}

.cpu-pick-compact .rank {
  flex-shrink: 0;
  transform: scale(0.92);
  transform-origin: left center;
}

.cpu-pick-compact .pick-val {
  flex-shrink: 0;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.cpu-actionbar {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 0 8px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cpu-actionbar #clearPlacementBtn {
  flex: 0 0 auto;
}

.online-random-trade-btn {
  flex: 0 0 auto;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(215, 140, 45, 0.55);
  background: linear-gradient(180deg, #ffd7a0 0%, #ffbe73 100%);
  color: #5f3f17;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.online-random-trade-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffe0b5 0%, #ffc684 100%);
  border-color: rgba(205, 130, 35, 0.62);
  color: #4f3312;
}
.online-random-trade-btn[data-phase="done"] {
  background: linear-gradient(180deg, #3b4453 0%, #2f3744 100%);
  border-color: rgba(255, 255, 255, 0.2);
  color: #d5d9e0;
}
.online-random-trade-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

/* オンライン・トレード確定後：区スロットと選手一覧の配置変更を不可にする */
.cpu-placement-main--online-locked .cpu-slots,
.cpu-placement-main--online-locked .cpu-pick-list {
  pointer-events: none;
  opacity: 0.9;
}

#startCpuBtn,
#omakeMyTeamStartBtn,
#startIndividualTrackBtn {
  flex: 1 1 auto;
  font-weight: 1000;
}

.cpu-placement-loading-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  text-align: center;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-2) 88%, var(--team, #9f704f) 10%);
  border-radius: 8px;
  border: 1px dashed color-mix(in srgb, var(--team, #9f704f) 32%, transparent);
  line-height: 1.45;
}

/* オレンジ立体CTA（主要アクション） */
#startCpuBtn,
#omakeMyTeamStartBtn,
#startIndividualTrackBtn,
#advanceRaceBtn,
#rareGachaBtn.rare-gacha-btn--hot,
#freeItemGachaBtn.rare-gacha-btn--hot,
.official-play-btn--hot,
.record-meet-btn--hot,
.record-type-btn--hot {
  background: linear-gradient(
    180deg,
    var(--cta-orange-light) 0%,
    var(--cta-orange) 50%,
    color-mix(in srgb, var(--cta-orange) 82%, #000) 100%
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow:
    0 2px 0 var(--cta-orange-dark),
    0 8px 22px var(--cta-glow-mid),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

#startCpuBtn:hover:not(:disabled),
#omakeMyTeamStartBtn:hover:not(:disabled),
#startIndividualTrackBtn:hover:not(:disabled),
#advanceRaceBtn:hover:not(:disabled),
#rareGachaBtn.rare-gacha-btn--hot:hover:not(:disabled),
#freeItemGachaBtn.rare-gacha-btn--hot:hover:not(:disabled),
.official-play-btn--hot:hover:not(:disabled),
.record-meet-btn--hot:hover:not(:disabled),
.record-type-btn--hot:hover:not(:disabled) {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--cta-orange-light) 88%, #fff) 0%,
    color-mix(in srgb, var(--cta-orange) 90%, #fff) 50%,
    var(--cta-orange) 100%
  ) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  box-shadow:
    0 2px 0 var(--cta-orange-dark),
    0 10px 26px var(--cta-glow-strong),
    inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

#startCpuBtn:active:not(:disabled),
#omakeMyTeamStartBtn:active:not(:disabled),
#startIndividualTrackBtn:active:not(:disabled),
#advanceRaceBtn:active:not(:disabled),
#rareGachaBtn.rare-gacha-btn--hot:active:not(:disabled),
#freeItemGachaBtn.rare-gacha-btn--hot:active:not(:disabled),
.official-play-btn--hot:active:not(:disabled),
.record-meet-btn--hot:active:not(:disabled),
.record-type-btn--hot:active:not(:disabled) {
  transform: translateY(2px) !important;
  box-shadow:
    0 1px 0 var(--cta-orange-pressed),
    0 4px 14px var(--cta-glow-soft),
    inset 0 2px 6px rgba(0, 0, 0, 0.28) !important;
}

/* レアガチャが引けるとき */
#rareGachaBtn.rare-gacha-btn--hot {
  font-weight: 900;
}

/* スキルガチャが引けるとき（エメラルド寄りの緑・コントラスト維持） */
#skillGachaBtn.skill-gacha-btn--ready {
  font-weight: 900;
  background: linear-gradient(
    180deg,
    #6abe8f 0%,
    #3d8f62 48%,
    color-mix(in srgb, #2a6b4a 88%, #000) 100%
  ) !important;
  border: 1px solid rgba(200, 255, 220, 0.42) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.32);
  box-shadow:
    0 2px 0 #1e4a33,
    0 8px 24px rgba(45, 120, 82, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.32) !important;
}

#skillGachaBtn.skill-gacha-btn--ready:hover:not(:disabled) {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, #7ad49a 92%, #fff) 0%,
    color-mix(in srgb, #3d8f62 88%, #fff) 48%,
    #2d7a52 100%
  ) !important;
  border-color: rgba(220, 255, 235, 0.55) !important;
  box-shadow:
    0 2px 0 #1e4a33,
    0 10px 28px rgba(45, 140, 95, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

#skillGachaBtn.skill-gacha-btn--ready:active:not(:disabled) {
  transform: translateY(2px) !important;
  box-shadow:
    0 1px 0 #153828,
    0 4px 16px rgba(30, 90, 60, 0.28),
    inset 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

/* 無料アイテムガチャが引けるとき */
#freeItemGachaBtn.rare-gacha-btn--hot {
  font-weight: 900;
}

/* ガチャ確率モーダル：平均の見出し */
.gacha-range-avg-head {
  font-size: 1.35rem;
  margin: 0 0 14px;
  text-align: center;
  line-height: 1.35;
}

.gacha-range-avg-head--ruled {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid color-mix(in srgb, var(--team, #9f704f) 42%, rgba(255, 255, 255, 0.22));
}

/* ガチャ確率：★帯・アイテム表をノーマル相当の茶系トーンで統一 */
#modalRoot .gacha-range-table--scout {
  background: color-mix(in srgb, var(--panel) 72%, rgba(120, 75, 40, 0.38));
  border: 1px solid color-mix(in srgb, rgba(165, 115, 65, 0.5) 75%, transparent);
  border-radius: 10px;
  overflow: hidden;
}

#modalRoot .gacha-range-table--scout th,
#modalRoot .gacha-range-table--scout td {
  color: color-mix(in srgb, var(--text) 88%, #2a1a0d);
}

#modalRoot .gacha-range-table--skill-split {
  font-size: 0.72rem;
}

.player-card .chip.chip--skill {
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  line-height: 1.35;
  background: var(--ekiden-skill-chip-bg);
  color: var(--ekiden-skill-fg-soft);
  border: 1.5px solid var(--ekiden-skill-chip-border);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.settings-dev-support-btns button {
  min-width: 5.5rem;
}

.online-leg-preset-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.online-leg-preset-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.online-leg-preset-label {
  flex: 0 0 2.25rem;
  margin: 0;
}

.online-leg-preset-select {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.gacha-items-preview-wrap {
  margin-top: 6px;
}

/* ガチャ：所持アイテムは折りたたみ（既定で閉じる） */
.gacha-items-details {
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.2));
  overflow: hidden;
}

.gacha-items-details-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-on-navy);
  user-select: none;
}

.gacha-items-details-summary::-webkit-details-marker {
  display: none;
}

.gacha-items-details-summary::after {
  content: " ▼";
  font-size: 0.65rem;
  opacity: 0.65;
}

.gacha-items-details[open] .gacha-items-details-summary::after {
  content: " ▲";
}

.gacha-items-details-body {
  padding: 0 8px 10px;
}

.gacha-items-preview-list {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  max-height: 8.5rem;
  overflow-y: auto;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, rgba(0, 0, 0, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  line-height: 1.45;
}

.gacha-items-preview-item {
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gacha-items-preview-item:last-child {
  border-bottom: none;
}

.gacha-items-preview-name {
  display: block;
  font-weight: 600;
}

.gacha-items-preview-effect {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

.gacha-items-preview-item--skill .gacha-items-preview-name,
.gacha-items-preview-item--skill .gacha-items-preview-effect {
  color: var(--ekiden-skill-fg);
  font-weight: 700;
}

.gacha-items-preview-item--skill .gacha-items-preview-effect {
  font-weight: 600;
  opacity: 0.95;
}

/* ガチャ画面：スキル購入一覧 */
.gacha-skill-shop {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gacha-skill-shop-title {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1.35;
}

.gacha-skill-shop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gacha-skill-shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.25));
}

.gacha-skill-shop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.gacha-skill-shop-name {
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.3;
}

.gacha-skill-shop-desc {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--muted);
}

.gacha-skill-shop-buy {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.2));
  background: color-mix(in srgb, var(--accent) 22%, var(--panel));
  color: var(--text-on-navy);
  cursor: pointer;
}

.gacha-skill-shop-buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* エキシビションライフ（獲得系ゴールドの♥／♡・最大2）— 「トライアル」直後・練習ライフ（.heart）と同系のサイズ */
.battle-trial-title-row .battle-trial-life-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 0;
  justify-content: flex-start;
  font-size: 1rem;
}
.battle-trial-title-row .exhibition-life-hearts {
  font-size: 1rem;
}
.battle-trial-title-row .exhibition-life-heart-img {
  width: 1em;
  height: 1em;
}
.battle-exhibition-life-row {
  margin: 6px 0 10px;
  line-height: 1.5;
}
.battle-exhibition-life-label {
  font-weight: 700;
  color: var(--muted);
  margin-right: 6px;
}
.exhibition-life-hearts {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  vertical-align: middle;
  font-size: 0.88em;
}
.exhibition-life-heart {
  font-size: 1em;
  line-height: 1;
  user-select: none;
}
.exhibition-life-heart--full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
/* エキシビションライフ：黄色系・やや小さめ */
.exhibition-life-heart-img {
  width: 0.92em;
  height: 0.92em;
  display: block;
  object-fit: contain;
  vertical-align: middle;
  filter: brightness(1.08) saturate(1.45) hue-rotate(-8deg) drop-shadow(0 0 3px rgba(240, 200, 80, 0.45));
}
.exhibition-life-heart--empty {
  color: color-mix(in srgb, var(--joy-gold-mid) 72%, #c9a227);
  opacity: 0.62;
}
.battle-exhibition-life-next {
  margin-left: 8px;
  color: var(--muted);
}
.battle-exhibition-life-next--full {
  color: color-mix(in srgb, var(--joy-gold-mid) 55%, var(--muted));
}

.battle-online-match-btn {
  width: 100%;
  box-sizing: border-box;
}

/* 全国カード内：オンライン対戦＝ゴールド（中継・獲得系の黄色） */
.battle-online-match-btn.battle-online-match-btn--national:not(:disabled) {
  font-weight: 900;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--telop-gold-bright) 52%, var(--joy-gold-deep)) 0%,
    var(--joy-gold-deep) 100%
  ) !important;
  border: 1px solid color-mix(in srgb, #fff 40%, var(--joy-gold-deep)) !important;
  color: #1a1508 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow:
    0 2px 0 color-mix(in srgb, var(--joy-gold-deep) 65%, #000),
    inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
}

.battle-online-match-btn.battle-online-match-btn--national:not(:disabled):hover {
  filter: brightness(1.06);
}

.battle-online-match-btn.battle-online-match-btn--national:not(:disabled):active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--joy-gold-deep) 75%, #000),
    inset 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* battle action bar — フッターナビの直上に常時表示 */
.battle-actionbar {
  flex: 0 0 auto;
  order: 99;
  z-index: 40;
  margin-top: auto;
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 10px;
  align-items: center;
  pointer-events: auto;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
}

#screen-battle .race-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  padding-bottom: 4px;
}

/* オンラインロビー：親が overflow:hidden のため、全体を縦スクロール可能に */
#screen-battle .battle-online-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.race-relay-card {
  padding: 10px 12px;
  border-color: color-mix(in srgb, var(--team) 22%, rgba(255, 255, 255, 0.12));
}

.race-relay-chain {
  font-size: 0.78rem;
  line-height: 1.65;
  word-break: break-all;
  color: var(--text);
}

.race-relay-runner {
  display: inline;
  font-weight: 600;
}

.race-relay-runner--current {
  color: var(--team);
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--team) 24%, rgba(0, 0, 0, 0.35));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--team) 55%, transparent);
}

.relay-sep {
  display: inline;
  margin: 0 2px;
}

.relay-sep--dash {
  color: var(--muted);
  font-weight: 600;
}

.relay-sep--arrow {
  color: var(--team);
  font-weight: 900;
}

.prize-modal-body p {
  margin: 6px 0;
}

.prize-total-line {
  margin-top: 12px !important;
  font-size: 1.05rem;
}

.prize-muted {
  color: var(--muted);
}

.prize-legs .small {
  color: var(--muted);
}

.prize-unlock-msg {
  margin-top: 10px !important;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--team) 18%, rgba(0, 0, 0, 0.35));
  border: 1px solid color-mix(in srgb, var(--team) 35%, transparent);
  font-size: 0.88rem;
}

/* 作戦タブ内：トライアル CPU の難易度（オーダー比較の直下） */
.cpu-placement-trial-difficulty-line .cpu-placement-trial-difficulty-value {
  color: #e8a870;
  font-weight: 800;
  margin-left: 0.1ch;
}

/* もう一つのC駅伝：マイチーム10区（modal--omake-myteam-placement） */
#modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-pick-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}
#modalRoot .modal.modal--omake-myteam-placement .cpu-pick-list button.cpu-pick-player-btn[data-omake-myteam-place-player] {
  width: 100%;
  min-height: 76px;
  align-self: stretch;
}

/* ----- 公式戦一覧 ----- */
.official-tournaments-card {
  margin-top: 10px;
}

.official-tournaments-card--tabbed .official-battle-tabstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.official-battle-tab {
  flex: 1 1 140px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: color-mix(in srgb, var(--panel) 88%, rgba(0, 0, 0, 0.35));
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  text-align: center;
}

.official-battle-tab.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--team) 55%, rgba(255, 255, 255, 0.2));
  background: color-mix(in srgb, var(--team) 28%, rgba(0, 0, 0, 0.35));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--team) 40%, transparent);
}

.official-battle-panels {
  margin-top: 2px;
}

.official-battle-tab-panel {
  min-height: 0;
}

.official-seasonal-official-card {
  border-color: color-mix(in srgb, var(--team) 42%, rgba(255, 255, 255, 0.12));
}

.official-seasonal-row {
  align-items: flex-start;
}

.official-seasonal-line1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.official-seasonal-rankband {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.official-seasonal-bandsep {
  color: var(--muted);
  font-weight: 800;
  margin: 0 2px;
  font-size: 0.85em;
}

.official-seasonal-condlist {
  margin: 4px 0 0;
  padding-left: 1.05em;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.official-seasonal-condlist li {
  margin: 0.15em 0;
}

.official-seasonal-z-leg-table {
  width: 100%;
  margin-top: 4px;
  border-collapse: collapse;
  font-size: 0.74rem;
  color: var(--muted);
}

.official-seasonal-z-leg-table th,
.official-seasonal-z-leg-table td {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 8px;
  text-align: left;
}

.official-seasonal-z-leg-table th {
  background: rgba(0, 0, 0, 0.25);
  font-weight: 700;
  color: #e8eef8;
}

.official-tournaments-heading {
  margin: 0 0 6px;
  font-size: 1rem;
}

.official-monthly-notice {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 88%, rgba(0, 0, 0, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.official-monthly-notice--used {
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.25));
  border-color: rgba(255, 255, 255, 0.1);
}

.official-monthly-illu {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(160px, 28vw);
  object-fit: contain;
  object-position: center bottom;
  border-radius: 8px;
}

/* 今月プレイ済みでもイラストは通常表示（視認性のためグレーアウトしない） */

.official-tournaments-lead {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.official-tournaments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.official-tournament-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid color-mix(in srgb, var(--team) 22%, rgba(255, 255, 255, 0.06));
}

.official-tournament-row--first-clear {
  background: color-mix(in srgb, var(--joy-gold-bright) 38%, rgba(0, 0, 0, 0.16));
  border-color: color-mix(in srgb, var(--joy-gold-bright) 62%, rgba(255, 255, 255, 0.24));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--joy-gold-bright) 46%, transparent);
}

/* 設定：履歴（折りたたみ・既定は閉） */
.settings-activity-log-field {
  margin-top: 4px;
}

.settings-activity-log-details {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: color-mix(in srgb, var(--panel) 92%, rgba(0, 0, 0, 0.25));
  padding: 0;
  overflow: hidden;
}

.settings-activity-log-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-on-navy);
  user-select: none;
}

.settings-activity-log-summary::-webkit-details-marker {
  display: none;
}

.settings-activity-log-summary::after {
  content: " ▼";
  font-size: 0.65rem;
  opacity: 0.65;
}

.settings-activity-log-details[open] .settings-activity-log-summary::after {
  content: " ▲";
}

.settings-activity-log-details .settings-hint {
  padding: 0 12px;
}

.settings-activity-log-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: left;
}

.settings-activity-log-list li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-on-navy);
}

.settings-activity-log-time {
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.settings-activity-log-empty {
  padding: 0 12px 12px !important;
}

.official-tournament-info {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.official-tournament-line1 {
  font-weight: 800;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.official-tournament-name {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.official-tournament-tier {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.official-tournament-tier .rank {
  font-weight: 900;
}

.official-tier-suffix {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.92em;
}

.official-prize-inline {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: normal;
}

.official-prize-sep {
  font-weight: 600;
  opacity: 0.85;
}

.official-subprize-hint {
  margin-top: 4px;
  line-height: 1.5;
  color: var(--muted);
}

.official-subprize-hint.small {
  font-size: 0.7rem;
  line-height: 1.45;
}

.official-tournament-name {
  font-weight: 800;
  font-size: 0.88rem;
}

.official-tournament-meta {
  color: var(--muted);
  margin-top: 2px;
}

.official-prize-row--void {
  text-decoration: line-through;
  opacity: 0.5;
}

.official-play-btn {
  flex: 0 0 auto;
  align-self: center;
  min-width: 4.5em;
  padding: 8px 12px;
  font-weight: 800;
}

.official-play-btn--hot {
  font-weight: 900;
}

.record-meet-btn--hot {
  font-weight: 900;
}

.official-play-btn--spent,
.record-meet-btn--spent {
  opacity: 0.5;
  filter: grayscale(0.35);
  cursor: not-allowed;
}

/* 1位クリア済み：グレーアウトせず「クリア」表示（押せないが達成感を残す） */
.official-play-btn--cleared,
.official-play-btn--cleared:disabled {
  opacity: 1 !important;
  filter: none !important;
  cursor: default;
  font-weight: 900;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--joy-gold-bright) 52%, var(--joy-gold-deep)) 0%,
    var(--joy-gold-deep) 100%
  ) !important;
  border-color: color-mix(in srgb, #fff 40%, var(--joy-gold-deep)) !important;
  box-shadow:
    0 2px 0 color-mix(in srgb, var(--joy-gold-deep) 65%, #000),
    inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
}

.record-type-btn--hot {
  font-weight: 900;
}

.official-race-banner {
  padding: 8px 12px;
  margin: 0 0 8px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.88rem;
  text-align: center;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  background: linear-gradient(
    180deg,
    var(--cta-orange-light) 0%,
    var(--cta-orange) 55%,
    color-mix(in srgb, var(--cta-orange) 80%, #000) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 2px 0 var(--cta-orange-dark),
    0 6px 18px var(--cta-glow-mid),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.race-track {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 8px 10px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-on-navy);
  max-height: min(52vh, 380px);
  overflow-y: auto;
}

.race-lane {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.race-lane-label {
  flex: 0 0 46px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
  letter-spacing: 0.02em;
}

.race-lane-track {
  flex: 1 1 auto;
  position: relative;
  height: 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--telop-cloud) 0%, var(--telop-white) 55%, var(--telop-cloud) 100%);
  border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.race-lane-track::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.race-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.35);
}

.race-dot--player {
  width: 14px;
  height: 14px;
  z-index: 2;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent),
    0 4px 18px rgba(0, 0, 0, 0.45);
}

.race-results {
  margin-top: 0;
}

#advanceRaceBtn {
  flex: 1 1 auto;
  height: 42px;
  font-weight: 1000;
  font-size: 1rem;
}

.battle-actionbar #advanceRaceBtn {
  pointer-events: auto;
}

.result-list button[data-place-player],
.result-list button[data-omake-place-player] {
  text-align: left;
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

/* 区間配置：無効時も 4px 枠でレイアウトを揃える */
.cpu-pick-list button[data-place-player]:disabled,
.cpu-pick-list button[data-omake-place-player]:disabled {
  opacity: 1 !important;
  cursor: not-allowed;
  background: linear-gradient(
    180deg,
    var(--cta-orange-light) 0%,
    var(--cta-orange) 50%,
    color-mix(in srgb, var(--cta-orange) 82%, #000) 100%
  ) !important;
  border: 4px solid rgba(255, 255, 255, 0.42) !important;
  box-sizing: border-box;
  color: #ffffff !important;
  box-shadow:
    0 2px 0 var(--cta-orange-dark),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cpu-pick-list button[data-place-player]:disabled .pick-name,
.cpu-pick-list button[data-omake-place-player]:disabled .pick-name {
  color: #ffffff;
}

.cpu-pick-list button[data-place-player]:disabled .pick-val,
.cpu-pick-list button[data-omake-place-player]:disabled .pick-val {
  color: #ffffff;
}

.cpu-pick-list button[data-place-player]:disabled .rank,
.cpu-pick-list button[data-omake-place-player]:disabled .rank {
  color: inherit;
}

/* sticky bottom actions overlap防止（アクションは画面下に密着させる）
   ※ #screen-training 単体に display を付けると、詳細度で .screen{display:none} を貫通し
     非表示のまま練習画面が残り、他画面と縦に分割表示される */
#screen-training.screen.active {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

#screen-training.screen.active > .two-col {
  padding-bottom: 100px;
  flex: 1 1 auto;
}

/* ----- 設定モード（setting.html / screen-settings） ----- */
.settings-mode-card .settings-mode-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.settings-hint {
  margin: 0 0 14px;
  color: var(--muted);
}

.settings-field {
  margin-bottom: 14px;
}

.settings-google-logout-btn {
  margin-top: 8px;
  width: 100%;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 50%, #666);
  background: transparent;
  color: color-mix(in srgb, var(--danger) 90%, #fff);
  cursor: pointer;
}

.settings-google-logout-btn:hover {
  background: color-mix(in srgb, var(--danger) 18%, transparent);
}

.settings-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.settings-text-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
}

.settings-char-count {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  text-align: right;
}
.settings-team-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
}
.settings-team-name-row .settings-text-input {
  width: clamp(180px, 22ch, 260px);
}
.settings-team-name-row .settings-char-count {
  margin-top: 0;
  white-space: nowrap;
}

.settings-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-color-row input[type="color"] {
  width: 52px;
  height: 40px;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--panel-2);
  cursor: pointer;
}

.settings-color-hex {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

.settings-team-color-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 8px;
  margin-top: 4px;
  align-items: center;
}

.settings-team-color-preview {
  border: 2px solid rgba(255, 255, 255, 0.22);
  margin: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.18);
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: start;
}

.settings-kit-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.settings-kit-swatch {
  flex-shrink: 0;
  cursor: pointer;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
.settings-kit-swatch:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, #fff);
  outline-offset: 3px;
}

.settings-kit-swatch--shirt {
  width: 58px;
  height: 68px;
  margin-bottom: 0;
  -webkit-mask-image: url("./images/tshirt.svg");
  mask-image: url("./images/tshirt.svg");
}

.settings-kit-swatch--shorts {
  width: 52px;
  height: 52px;
  margin-top: -6px;
  -webkit-mask-image: url("./images/shorts.svg");
  mask-image: url("./images/shorts.svg");
}

.settings-team-color-layout > .settings-color-row--labeled {
  grid-column: 2;
  margin-bottom: 0;
}

.settings-team-color-layout > .settings-color-row--labeled:nth-child(2) {
  grid-row: 1;
}

.settings-team-color-layout > .settings-color-row--labeled:nth-child(3) {
  grid-row: 2;
}

.settings-color-sublabel {
  min-width: 1.5em;
  font-size: 0.82rem;
  color: var(--muted);
}

.record-meet-modal-visual {
  text-align: center;
  margin: 0 0 12px;
}

.record-meet-modal-visual img {
  display: block;
  margin: 0 auto;
  max-width: min(320px, 90vw);
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

.volume-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

input.volume-bar[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 10px;
  accent-color: var(--accent);
  cursor: pointer;
}

.volume-bar-value {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  min-width: 2.2em;
  text-align: right;
}

.volume-bar-unit {
  font-size: 0.8rem;
  color: var(--muted);
}

/* 白大学など明るい●の縁取り */
.race-dot--lightUni {
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.35),
    0 6px 14px rgba(0, 0, 0, 0.4);
}

/* スキル／レアガチャ：2枚横並びなど */
.result-list.scout-pick-grid {
  grid-template-columns: 1fr 1fr;
}

/* スキルガチャ等：上段2枚＋おまけアイテムは下段 */
.result-list.scout-pick-grid--triple {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-list.scout-pick-grid--rare-two {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(540px, 100%);
  margin-inline: auto;
  width: 100%;
}

.result-list.scout-pick-grid--rare-two .scout-pick-players-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.scout-pick-players-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* スカウト候補：選手一覧（練習画面）と同じ名前＋学年 chip の見た目 */
.scout-card > .row.between strong {
  font-size: 0.74rem;
  font-weight: 800;
}

.scout-card > .row.between .chip {
  font-size: 0.56rem;
  padding: 1px 5px;
}

.scout-card-skill {
  margin: 6px 0 0;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 600;
  color: color-mix(in srgb, var(--muted) 92%, var(--ekiden-skill-fg) 8%);
}

.scout-card--rare-hot {
  background: color-mix(in srgb, #ff8e8e 16%, var(--panel));
  border-color: color-mix(in srgb, #ff8e8e 42%, var(--border-subtle-white));
}

/* ガチャ確率モーダル：レア★帯表の列幅 */
.gacha-range-table--rare-scout {
  table-layout: fixed;
}

.gacha-range-table--rare-scout th:nth-child(1),
.gacha-range-table--rare-scout td:nth-child(1) {
  width: 40%;
}

.gacha-range-table--rare-scout th:nth-child(2),
.gacha-range-table--rare-scout td:nth-child(2) {
  width: 22%;
}

.gacha-range-table--rare-scout th:nth-child(3),
.gacha-range-table--rare-scout td:nth-child(3) {
  width: 38%;
}

@media (max-width: 360px) {
  .result-list.scout-pick-grid:not(.scout-pick-grid--triple) {
    grid-template-columns: 1fr;
  }
  .scout-pick-players-row {
    grid-template-columns: 1fr;
  }
}

.scout-card--item .scout-item-title {
  font-weight: 900;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.scout-card--item .scout-item-name {
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--accent) 80%, #fff);
}

.scout-item-name--skill,
.scout-card--skill-item .scout-item-name {
  color: var(--ekiden-skill-fg);
  font-weight: 900;
}

.retire-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

/* index.html のみ：ログインオーバーレイが見えているときだけ本体をブロック（オーバーレイを隠したのに entry-gate だけ残ると広告ボタン等が一切押せなくなるのを防ぐ） */
body.ekiden-entry-gate .firebase-auth-overlay:not(.hidden) ~ .phone-shell {
  pointer-events: none;
  user-select: none;
  filter: brightness(0.35);
}

.firebase-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: max(10px, env(safe-area-inset-top, 0)) max(12px, env(safe-area-inset-right, 0))
    max(12px, env(safe-area-inset-bottom, 0)) max(12px, env(safe-area-inset-left, 0));
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255, 215, 80, 0.22), transparent 55%),
    radial-gradient(ellipse 100% 70% at 50% 100%, rgba(107, 48, 60, 0.35), transparent 50%),
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(55, 65, 95, 0.5), rgba(4, 6, 14, 0.98));
  backdrop-filter: blur(10px);
  overflow: hidden;
  box-sizing: border-box;
}

/* Android WebView: backdrop-filter が GPU でネイティブ落ちすることがあるため無効化 */
html.ekiden-android-wv .firebase-auth-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(12, 12, 18, 0.97);
}

.firebase-auth-overlay.hidden {
  display: none !important;
}

/* クラウド同期・初回データ読み込み中 */
.app-load-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgba(6, 10, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html.ekiden-android-wv .app-load-overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(10, 14, 22, 0.94);
}
.app-load-overlay[hidden] {
  display: none !important;
}
.app-load-overlay__panel {
  text-align: center;
  padding: 22px 28px;
  min-width: 220px;
  max-width: min(92vw, 320px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.app-load-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: app-load-spin 0.72s linear infinite;
}
@keyframes app-load-spin {
  to {
    transform: rotate(360deg);
  }
}
.app-load-overlay__msg {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.firebase-auth-scroll {
  width: min(100vw, 430px);
  max-width: 430px;
  height: min(100dvh - 24px, 100vh - 24px, 900px);
  min-height: min(100dvh - 24px, 100vh - 24px, 900px);
  max-height: min(100dvh - 24px, 100vh - 24px, 900px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  box-sizing: border-box;
}

.firebase-auth-shell {
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  margin-bottom: 0;
  padding: 16px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, rgba(255, 255, 255, 0.14));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 28px color-mix(in srgb, var(--accent) 28%, transparent),
    0 16px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--panel-2) 88%, var(--accent) 5%) 0%,
    var(--panel) 45%,
    color-mix(in srgb, var(--bg) 92%, #000) 100%
  );
}

.firebase-auth-hero {
  margin: 0 0 12px;
  text-align: center;
}

.firebase-auth-hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.28rem, 5.4vw, 2.05rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;
  text-shadow:
    0 0 20px color-mix(in srgb, var(--accent) 75%, transparent),
    0 0 42px color-mix(in srgb, var(--cta-orange) 35%, transparent),
    0 2px 0 rgba(0, 0, 0, 0.45);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.firebase-auth-hero-image-wrap {
  width: calc(100% + 28px);
  margin-left: -14px;
  margin-right: -14px;
  border-radius: 0;
  overflow: hidden;
  border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.firebase-auth-hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(220px, 38vh);
  object-fit: cover;
  object-position: center;
  background: rgba(0, 0, 0, 0.25);
}

.firebase-auth-login {
  border-top: 1px solid color-mix(in srgb, var(--team) 28%, transparent);
  padding-top: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.firebase-auth-google-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.firebase-auth-google-recommend {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--danger, #e74c3c);
  text-shadow: 0 0 1px color-mix(in srgb, var(--danger, #e74c3c) 35%, transparent);
}

.firebase-auth-google-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #fff;
  color: #1f1f1f;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.firebase-auth-google-btn:active {
  opacity: 0.94;
  transform: scale(0.99);
}

/* iOS 端末では Google ログイン導線を非表示（JS 判定に加え CSS でもフェイルセーフ） */
.ekiden-ios-device .firebase-auth-google-wrap,
.ekiden-ios-device .firebase-auth-or--with-google {
  display: none !important;
}

.firebase-auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  width: 100%;
}

.firebase-auth-or__line {
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--muted) 35%, transparent);
}

.firebase-auth-or__text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--muted) 92%, var(--text));
  text-transform: uppercase;
}

.firebase-auth-email-block {
  margin: 0;
  padding: 14px 12px 16px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--panel) 35%, var(--panel-2));
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.firebase-auth-method-title {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
}

.firebase-auth-method-hint {
  margin: 0 0 12px;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
}

.firebase-auth-field {
  margin-bottom: 10px;
}

.firebase-auth-field:last-of-type {
  margin-bottom: 0;
}

.firebase-auth-email-label {
  display: block;
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

.firebase-auth-email-input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  font-size: 0.88rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--team) 28%, rgba(255, 255, 255, 0.18));
  background: var(--panel-2);
  color: var(--text-on-navy);
}

.firebase-auth-email-input::placeholder {
  color: color-mix(in srgb, var(--muted) 55%, transparent);
}

.firebase-auth-email-input:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.firebase-auth-email-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.firebase-auth-email-btn {
  margin: 0;
  padding: 10px 8px;
  font-weight: 800;
  font-size: 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}

.firebase-auth-email-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.firebase-auth-email-btn--primary {
  border-color: color-mix(in srgb, var(--team) 45%, rgba(255, 255, 255, 0.2));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--team) 22%, var(--panel-2)) 0%,
    var(--panel-2) 100%
  );
  color: var(--text-on-navy);
}

.firebase-auth-email-btn--outline {
  border-color: color-mix(in srgb, var(--muted) 45%, rgba(255, 255, 255, 0.15));
  background: transparent;
  color: color-mix(in srgb, var(--text-on-navy) 88%, transparent);
  font-weight: 700;
}

.firebase-auth-email-btn:active:not(:disabled) {
  opacity: 0.92;
}

.firebase-auth-testplay-btn {
  width: 100%;
  margin-top: 2px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, #5a9fd4 55%, rgba(255, 255, 255, 0.22));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, #4a8ec8 88%, #fff) 0%,
    #3a7ab8 48%,
    color-mix(in srgb, #2d6aa3 92%, #000) 100%
  );
  color: #f4f9ff;
  cursor: pointer;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.firebase-auth-testplay-btn:active {
  opacity: 0.92;
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.22);
}

.firebase-auth-copyright {
  margin: 0;
  padding: 16px 12px max(20px, env(safe-area-inset-bottom, 0));
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  letter-spacing: 0.02em;
}

/* テストプレイ：区間スキル設定（index-auth） */
.demo-leg-setup-dialog {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: max(0px, env(safe-area-inset-top, 0)) max(0px, env(safe-area-inset-right, 0))
    max(0px, env(safe-area-inset-bottom, 0)) max(0px, env(safe-area-inset-left, 0));
  background: rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.demo-leg-setup-dialog.hidden {
  display: none !important;
}

.demo-leg-setup-dialog__card {
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: 100%;
  overflow: auto;
  text-align: left;
  border-radius: 0;
  box-sizing: border-box;
}

.demo-leg-setup-dialog__card--placement {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  max-height: none;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.demo-leg-setup-dialog__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.demo-leg-setup-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.demo-leg-setup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.demo-leg-setup-row__label {
  flex: 0 0 2.5rem;
  font-weight: 700;
}

.demo-testplay-cpu-slots {
  margin-top: 8px;
}

/* ガチャ画面ヒーロー */
/* ガチャ：レアとスキルの間隔・スキル説明 */
.gacha-paid-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 2px;
}

.gacha-paid-stack .gacha-stack-btn {
  width: 100%;
  box-sizing: border-box;
}

.gacha-skill-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gacha-mode-hero {
  margin: 0 0 14px;
  text-align: center;
}

.gacha-mode-hero-img {
  display: block;
  width: 100%;
  max-width: min(100%, 420px);
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* スカウト結果：★は ★1 / ★4 のみ。2・3は数字のみ */
.scout-gacha-stars {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  color: color-mix(in srgb, var(--accent) 85%, #fff);
}

.scout-item-name--skill-inline {
  color: var(--ekiden-skill-fg);
  font-weight: 800;
}

/* モーダル内のスキル名（確率表・説明） */
#modalRoot .ekiden-skill-inline {
  color: var(--ekiden-skill-fg);
  font-weight: 800;
}

.firebase-auth-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

/* オンライン対戦パネル */
.online-panel .online-heading {
  margin: 10px 0 8px;
  font-size: 1.05rem;
}
.online-panel .online-subheading {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.online-race-form-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 8px;
}
.online-race-form-head .online-subheading {
  margin: 0;
  flex-shrink: 0;
}
.online-race-form-head .online-life-hearts-host {
  width: auto;
  flex-shrink: 0;
}
.online-race-form-head .online-life-recover-note {
  flex: 1 1 12rem;
  margin: 0;
  text-align: right;
  min-width: 0;
}
.online-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.online-panel-head-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  flex: 1;
  min-width: 0;
}
.online-panel-head-title .online-subheading {
  margin: 0;
  flex-shrink: 0;
}
.online-panel-head-title .online-pick-summary {
  margin: 0;
}
.online-panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  flex-shrink: 0;
}
.online-my-rating {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin: 8px 0 6px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-on-navy);
}
.online-my-rating .online-label {
  font-size: 0.82rem;
  color: var(--muted);
}
.online-my-rating strong {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.online-life-hearts-host .online-life-hearts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.online-life-recover-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card.online-panel.online-panel--friends {
  background: color-mix(in srgb, #2d5a3d 22%, var(--panel-2, #1a2d48));
  border-color: color-mix(in srgb, #5fcf8a 35%, rgba(255, 255, 255, 0.12));
}

.player-detail-visual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}

.player-detail-visual-spacer {
  display: block;
  min-width: 0;
}

.player-detail-visual-runner {
  justify-self: end;
  min-width: 0;
  margin-right: 4px;
}

.player-detail-visual-chart {
  justify-self: start;
  min-width: 0;
  margin-left: 4px;
}

.player-detail-visual-chart .player-detail-radar-wrap {
  max-width: 168px;
}

.player-detail-visual-row .runner-illu-stack.runningman--detail {
  margin: 0;
  flex-shrink: 0;
  transform: scale(2.2);
  transform-origin: center center;
}

.player-detail-radar-wrap {
  min-width: 0;
  max-width: 168px;
  margin-left: 0;
  margin-right: 0;
}

.player-detail-radar-svg {
  width: 100%;
  height: auto;
  display: block;
}

.player-detail-radar-grid {
  fill: none;
  stroke: color-mix(in srgb, var(--player-detail-radar-color, var(--team)) 24%, transparent);
  stroke-width: 0.42;
  pointer-events: none;
}

.player-detail-radar-axis-line {
  stroke: color-mix(in srgb, var(--muted) 50%, transparent);
  stroke-width: 0.55;
  stroke-dasharray: 2 3;
  pointer-events: none;
}

.player-detail-radar-center {
  fill: var(--player-detail-radar-color, var(--team));
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 0.65;
}

.player-detail-radar-fill--c-baseline {
  fill: rgba(128, 132, 144, 0.3);
  stroke: rgba(116, 122, 138, 0.95);
  stroke-width: 1.85;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

/* シミュレータ選手詳細：C 相当の平均チャートは濃いグレーのみ */
.omake-detail-visual .player-detail-radar-fill--c-baseline {
  fill: rgba(58, 60, 68, 0.92);
  stroke: rgba(34, 36, 42, 0.98);
  stroke-width: 1.9;
  stroke-dasharray: none;
}
.player-detail-radar-fill {
  fill: color-mix(in srgb, var(--player-detail-radar-color, var(--team)) 38%, transparent);
  stroke: color-mix(in srgb, var(--player-detail-radar-color, var(--team)) 88%, #fff);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.player-detail-radar-fill--join {
  fill: rgba(118, 122, 132, 0.36);
  stroke: rgba(72, 76, 84, 0.92);
  stroke-width: 1.65;
  stroke-linejoin: round;
}

.player-detail-stat-join {
  color: color-mix(in srgb, var(--muted) 78%, var(--text-on-navy, #e8eef5));
  font-weight: 700;
}

.player-detail-radar-axis {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", sans-serif;
}

.player-detail-radar-axis--tm {
  font-size: 9px;
  letter-spacing: -0.03em;
}

.player-detail-radar-cap {
  font-size: 0.56rem;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.35;
  text-align: center;
}

.player-detail-radar-times {
  font-size: 0.72rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--muted) 35%, var(--text-on-navy, #e8eef5));
  margin: 6px 0 0;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.02em;
}

.player-detail-modal-head {
  margin-bottom: 4px;
}

.player-detail-name-row--head {
  margin-bottom: 0;
}

#modalRoot .modal.modal--player-detail .player-detail-role-btn.player-detail-role-btn--captain-on {
  border-color: rgba(255, 126, 126, 0.55);
  background: rgba(255, 126, 126, 0.28);
  color: var(--text-on-navy);
  font-weight: 750;
}

#modalRoot .modal.modal--player-detail .player-detail-role-btn.player-detail-role-btn--vice-on {
  border-color: rgba(122, 178, 255, 0.56);
  background: rgba(122, 178, 255, 0.28);
  color: var(--text-on-navy);
  font-weight: 750;
}

.player-detail-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  max-width: min(52%, 14rem);
}

.player-detail-skill-banner {
  margin-top: 0;
  padding: 6px 10px;
  border-radius: 10px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ekiden-skill-fg-soft);
  background: var(--ekiden-skill-chip-bg);
  border: 1px solid var(--ekiden-skill-chip-border);
  letter-spacing: 0.05em;
  max-width: 100%;
}

.player-detail-skill-label {
  color: var(--ekiden-skill-fg-dim);
  font-weight: 700;
}

.player-detail-skill-banner strong {
  color: var(--ekiden-skill-fg);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.player-detail-skill {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--ekiden-skill-fg);
  letter-spacing: 0.05em;
}

.card.ekiden-news-card--tone {
  margin-top: 10px;
  background: color-mix(in srgb, #2d5a3d 20%, var(--panel-2, #1a2d48));
  border-color: color-mix(in srgb, #5fcf8a 32%, rgba(255, 255, 255, 0.12));
}

.ekiden-news-card--tone .ekiden-news-heading {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.ekiden-news-card--tone .ekiden-news-body {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

.ekiden-news-card--tone .ekiden-news-note {
  margin: 8px 0 0;
  line-height: 1.5;
  color: var(--muted);
}
.online-auth-warn {
  color: var(--danger);
  margin: 6px 0;
}
.online-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.online-row-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--team) 22%, #444);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.online-row-btn:active {
  opacity: 0.9;
}
.online-row-btn--selected {
  border-color: color-mix(in srgb, var(--team) 55%, #666);
  background: color-mix(in srgb, var(--team) 22%, var(--panel-2));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--team) 40%, transparent);
}
.online-row-static {
  cursor: pointer;
  user-select: none;
}
.online-next-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 16px 20px;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff !important;
  background: var(--danger) !important;
  border: 1px solid color-mix(in srgb, var(--danger) 55%, #fff) !important;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--danger) 45%, transparent);
}
/* 汎用 button:hover のグレー上書きを打ち消し、赤を維持 */
button.online-next-btn:hover:not(:disabled) {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--danger) 82%, #fff) 0%,
    color-mix(in srgb, var(--danger) 94%, #000) 100%
  ) !important;
  color: #fff !important;
  border-color: color-mix(in srgb, var(--danger) 40%, #fff) !important;
  filter: brightness(1.06);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--danger) 55%, transparent) !important;
}
.online-next-btn:active:not(:disabled) {
  transform: translateY(1px);
  filter: brightness(0.96);
}
.online-pick-summary {
  margin: 0;
  color: var(--muted);
}
.online-row-name {
  font-weight: 700;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.online-row-team-rank {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}
.online-row-btn > .rank {
  flex-shrink: 0;
  font-size: 0.72rem;
}
.online-row-meta {
  flex-shrink: 1;
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  line-height: 1.35;
  max-width: min(58%, 14rem);
  white-space: normal;
}
.online-row-meta .online-row-rate {
  color: var(--muted);
  margin-right: 2px;
}
.online-row-meta .online-row-avg-num {
  font-variant-numeric: tabular-nums;
  color: var(--text-on-navy, #e8f4ff);
  font-weight: 700;
}
.online-uid {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  word-break: break-all;
  padding: 6px 8px;
  border-radius: 8px;
  background: #1a1818;
  border: 1px solid color-mix(in srgb, var(--team) 20%, #555);
}
.online-uid-row {
  margin-top: 8px;
  align-items: center;
  gap: 8px;
}
.online-friend-add {
  display: block;
  margin-top: 12px;
}
.online-friend-input-row {
  margin-top: 6px;
  gap: 8px;
  align-items: center;
}
.online-friend-input-row input {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #1c1a1a;
  color: var(--text);
  font: inherit;
}

/* アプリ内ダイアログ（alert 代替） */
.modal-alert-actions {
  margin-top: 12px;
}

.app-dialog-msg {
  line-height: 1.55;
  margin: 0.5rem 0 0;
}

/* アイテム入手・ガチャ結果など */
.app-dialog-msg--gold-reward {
  color: var(--joy-gold-mid);
  font-weight: 800;
  text-shadow: 0 0 14px rgba(232, 209, 138, 0.38);
}

/* ガチャ選択モーダル内のおまけアイテム名 */
.item-drop-name--gold {
  font-weight: 800;
  color: var(--joy-gold-mid);
  text-shadow: 0 0 12px rgba(232, 209, 138, 0.35);
}

/* index ログイン画面用インラインダイアログ */
.auth-inline-dialog {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}
.auth-inline-dialog.hidden {
  display: none !important;
}
.auth-inline-dialog__card {
  max-width: 360px;
  width: 100%;
}
.auth-inline-dialog__title {
  margin: 0 0 8px;
  font-size: 1rem;
}
.auth-inline-dialog__msg {
  margin: 0;
  white-space: pre-wrap;
}

/* ——— 対戦モード・シミュレータ ——— */
body.ekiden-screen-battle-omake .app-header {
  display: none !important;
}
body.ekiden-screen-battle-omake #trainingSortSelectHeader {
  display: none !important;
}
body.ekiden-screen-battle-omake .bottom-nav {
  display: none !important;
}
body.ekiden-screen-battle-omake .phone-shell {
  grid-template-rows: 1fr;
}
/* 設定「横画面」＋シミュレータ時：シェルを画面幅いっぱいに近づける */
body.ekiden-screen-battle-omake.ekiden-omake-layout-landscape .phone-shell {
  width: min(100vw, 100dvw);
  max-width: min(100vw, 100dvw);
  height: min(100dvh, 100vh);
}
body.ekiden-screen-battle-omake .phone-shell > main {
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* 通常画面（練習/ガチャ/対戦/設定）の横画面レイアウト */
body.ekiden-main-layout-landscape {
  --ek-land-fs: clamp(1.05rem, 0.35rem + 1.6vmin, 1.42rem);
  --ek-land-fs-lg: clamp(1.2rem, 0.42rem + 1.85vmin, 1.58rem);
  --ek-land-fs-title: clamp(1.32rem, 0.48rem + 2.05vmin, 1.72rem);
  --ek-ui-large: calc(var(--ek-land-fs) * 1.22);
  --ek-ui-medium: calc(var(--ek-land-fs) * 1);
  --ek-ui-small: calc(var(--ek-land-fs) * 0.78);
  --ek-ui-xsmall: calc(var(--ek-land-fs) * 0.66);
}
body.ekiden-main-layout-landscape .phone-shell {
  aspect-ratio: 16 / 10;
  width: min(calc(100vw - 24px), calc((100dvh - 16px) * (16 / 10)));
  max-width: min(calc(100vw - 24px), calc((100dvh - 16px) * (16 / 10)));
  height: auto;
  max-height: calc(100dvh - 16px);
  border-radius: 14px;
  font-size: var(--ek-land-fs);
}
/* 横画面：main 内のアクティブ画面を高さいっぱいにし、min-height:0 で子の overflow が効くようにする */
body.ekiden-main-layout-landscape .screen-container > section.screen.active {
  flex: 1 1 auto;
  min-height: 0;
}
body.ekiden-main-layout-landscape .app-header {
  padding: 10px 18px 8px;
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape .app-header__title-wrap {
  font-size: var(--ek-land-fs-lg);
  gap: 12px;
}
body.ekiden-main-layout-landscape .app-header h1,
body.ekiden-main-layout-landscape #teamTitle {
  font-size: var(--ek-land-fs-title);
}
body.ekiden-main-layout-landscape .header-mode-badge,
body.ekiden-main-layout-landscape #headerModeBadge {
  font-size: var(--ek-land-fs);
  line-height: 1.25;
}
body.ekiden-main-layout-landscape .header-sub {
  gap: 10px;
  font-size: var(--ek-land-fs);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 2px;
}
body.ekiden-main-layout-landscape .life-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  max-width: none;
  min-width: 0;
}
body.ekiden-main-layout-landscape .life-bar-top-row {
  gap: 4px;
  width: auto;
}
body.ekiden-main-layout-landscape .life-bar-extra {
  gap: 4px;
}
body.ekiden-main-layout-landscape #trainingSortSelectHeader {
  white-space: nowrap;
  min-width: 11.2rem;
  position: absolute;
  top: 10px;
  right: 18px;
  z-index: 3;
}
body.ekiden-main-layout-landscape #trainingSortSelectHeader,
body.ekiden-main-layout-landscape .header-sub .life-next-recovery,
body.ekiden-main-layout-landscape .header-sub .ad-life-btn {
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape .app-header__top {
  padding-right: 12.3rem;
}
body.ekiden-main-layout-landscape .header-sub {
  min-height: 0;
}
body.ekiden-main-layout-landscape #lifeBar {
  position: absolute;
  top: 10px;
  right: 13.8rem;
  z-index: 3;
  max-width: min(42vw, 28rem);
}
body.ekiden-main-layout-landscape .life-bar-top-row {
  gap: 8px;
}
body.ekiden-main-layout-landscape .life-bar-infinity {
  font-size: calc(var(--ek-land-fs) * 1.04);
}
body.ekiden-main-layout-landscape .life-next-recovery,
body.ekiden-main-layout-landscape .life-next-recovery--full {
  font-size: calc(var(--ek-land-fs) * 0.84);
  margin-left: 0;
}
body.ekiden-main-layout-landscape .life-bar-infinity {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape .heart {
  font-size: 1.25rem;
}
body.ekiden-main-layout-landscape .header-play-mode-toggle {
  font-size: var(--ek-land-fs-lg);
  padding: 4px 11px;
}
body.ekiden-main-layout-landscape .header-date,
body.ekiden-main-layout-landscape .app-header-budget.team-meta,
body.ekiden-main-layout-landscape #teamMeta.team-meta.app-header-budget {
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape .bottom-nav button,
body.ekiden-main-layout-landscape .bottom-nav a.bottom-nav-link {
  font-size: var(--ek-land-fs-lg);
  min-height: 58px;
}

/* 練習：横に広く、文字を大きめ */
body.ekiden-main-layout-landscape #screen-training.screen.active > .two-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 110px;
}
body.ekiden-main-layout-landscape #screen-training.screen.active > .two-col > .player-card {
  margin: 0;
}
/* 簡易表示のみ N の流れ（左列を上→下、次に中央列、右列） */
body.ekiden-main-layout-landscape #screen-training.screen.active > .two-col.training-list--simple {
  display: block;
  column-count: 3;
  column-gap: 12px;
}
body.ekiden-main-layout-landscape #screen-training.screen.active > .two-col.training-list--simple > .player-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 12px;
}
body.ekiden-main-layout-landscape #screen-training .player-card {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-training .player-card > .runner-illu-stack {
  width: clamp(34px, 1.6rem + 1.2vmin, 42px);
  height: clamp(34px, 1.6rem + 1.2vmin, 42px);
}
body.ekiden-main-layout-landscape #screen-training .player-card .small {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-training .player-card strong {
  font-size: var(--ek-land-fs-title);
}
body.ekiden-main-layout-landscape #screen-training .player-card .chip {
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape #screen-training .player-card .menu-btn,
body.ekiden-main-layout-landscape #screen-training .training-actions button {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-training .player-card--simple {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
}
body.ekiden-main-layout-landscape #screen-training .player-card--simple .player-card-simple-line {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  min-width: 0;
}
body.ekiden-main-layout-landscape #screen-training .player-card--simple > .menu-btn {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  width: auto !important;
  min-width: 7.4rem;
  max-width: 9rem;
  padding: 3px 10px;
}
body.ekiden-main-layout-landscape #screen-training .player-card--simple .player-card-simple-gain {
  bottom: 0;
  left: auto;
  right: 10px;
  transform: translateY(-110%);
}
body.ekiden-main-layout-landscape #screen-training .player-card-simple-val.stat-num {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-training .player-card-simple-rank .rank {
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape #screen-training .player-card > .overall-line {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-training .player-card > .stat-line,
body.ekiden-main-layout-landscape #screen-training .player-card > .stat-line.stat-line--pair {
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape #screen-training .player-card > .stat-line .stat-key,
body.ekiden-main-layout-landscape #screen-training .player-card > .stat-line .stat-num {
  font-size: inherit;
}
body.ekiden-main-layout-landscape #screen-training .training-actions #bulkMenuBtn.menu-btn {
  font-size: var(--ek-land-fs-lg);
  width: 9.6rem;
  min-width: 9.6rem;
  max-width: 9.6rem;
}

/* ガチャ：全体拡大 */
body.ekiden-main-layout-landscape #screen-gacha.screen.active {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-gacha .card {
  padding: 18px;
}
body.ekiden-main-layout-landscape #screen-gacha button {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-gacha .small {
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape #screen-gacha #rareGachaBtn,
body.ekiden-main-layout-landscape #screen-gacha #skillGachaBtn,
body.ekiden-main-layout-landscape #screen-gacha #gachaScoutRangeBtn {
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape #screen-gacha .gacha-paid-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
body.ekiden-main-layout-landscape #screen-gacha .gacha-skill-stack {
  grid-column: 1;
  grid-row: 1;
}
body.ekiden-main-layout-landscape #screen-gacha #rareGachaBtn {
  grid-column: 2;
  grid-row: 1;
}
body.ekiden-main-layout-landscape #screen-gacha #freeItemGachaBtn {
  display: inline-flex;
  width: auto;
  margin-left: auto;
}
/* 横画面：対戦・ガチャのヒーロー／月次イラストは非表示（縦スクロール量と帯域を削る） */
body.ekiden-main-layout-landscape .gacha-mode-hero-img {
  display: block;
  width: 100%;
  max-width: min(100%, 420px);
  height: auto;
}
body.ekiden-main-layout-landscape .gacha-mode-hero {
  margin-bottom: 0;
}
body.ekiden-main-layout-landscape .official-monthly-notice {
  display: block;
}
body.ekiden-main-layout-landscape .official-monthly-illu {
  width: 100%;
  max-width: 100%;
  max-height: none;
  object-fit: cover;
}

/* 対戦準備画面：横は「上段：トライアル｜オンライン」「下段：ランク駅伝｜右スタック」— 行スパン無しで重なりを防ぐ */
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .battle-mode-land-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .battle-mode-land-right-stack {
  gap: 12px;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-rank-ekiden-card {
  overflow: visible;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-individual-champ-card {
  align-self: stretch;
  width: 100%;
  min-width: 0;
  height: fit-content;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-individual-champ-card .official-tournaments-heading {
  flex: 0 0 auto;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-individual-champ-card .official-individual-champ-hero {
  flex: 0 0 auto;
  margin-top: 4px;
  margin-bottom: 6px;
  max-height: min(20vh, 150px);
  overflow: hidden;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-individual-champ-card .official-individual-champ-hero-img {
  display: block;
  width: 100%;
  max-height: min(20vh, 150px);
  height: auto;
  object-fit: cover;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-individual-champ-card .official-tournaments-list {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-seasonal-official-card {
  align-self: stretch;
  width: 100%;
  min-width: 0;
  margin-top: 0;
  overflow: visible;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .battle-omake-entry-card {
  align-self: stretch;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .card {
  margin: 0;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .small {
  font-size: var(--ek-land-fs);
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .battle-trial-title-row .battle-trial-title-text,
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .battle-trial-title-row .battle-trial-life-inline,
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .national-join-hint,
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-tournaments-heading,
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .battle-omake-entry-heading {
  font-size: var(--ek-land-fs-lg);
  line-height: 1.35;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .battle-trial-title-row .battle-trial-title-text {
  color: #fff !important;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-tournament-name {
  font-size: var(--ek-land-fs);
  font-weight: 900;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-tournament-tier,
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-tournament-tier .rank,
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-prize-inline {
  font-size: calc(var(--ek-land-fs) * 0.9);
  line-height: 1.35;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-subprize-hint.small {
  font-size: calc(var(--ek-land-fs) * 0.78);
  line-height: 1.35;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll button {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-rank-ekiden-card .official-tournaments-list,
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-seasonal-official-card .official-tournaments-list {
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}
body.ekiden-main-layout-landscape #screen-battle .battle-mode-scroll .official-tournaments-card:not(.official-individual-champ-card) .official-tournaments-list {
  max-height: none;
  overflow-y: visible;
}

/* 横画面：オンライン対戦パネルを2列化 */
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
}
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel.online-panel--public-candidates {
  grid-column: 1;
  grid-row: 2;
}
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel.online-panel--friend-exchange,
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel:nth-child(5) {
  grid-column: 1 / -1;
  grid-row: 3;
}

/* 設定（横画面）：縦レイアウトを崩さず、文字だけ少し大きくする */
body.ekiden-main-layout-landscape #screen-settings.screen.active {
  display: block;
  padding: 12px clamp(20px, 4vw, 56px);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-width: 0;
  width: 100%;
  font-size: calc(var(--ek-land-fs-lg) * 1.05);
}
body.ekiden-main-layout-landscape #screen-settings.screen.active > .card {
  margin: 0 0 12px;
  min-width: 0;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card {
  display: block;
  padding: clamp(10px, 1.8vw, 18px) clamp(12px, 2.2vw, 22px);
  box-sizing: border-box;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-mode-title {
  font-size: calc(var(--ek-land-fs-title) * 1.02);
  margin: 0 0 12px;
  padding: 2px 0 0;
}
body.ekiden-main-layout-landscape #screen-settings .card:not(.settings-mode-card) .settings-mode-title {
  font-size: calc(var(--ek-land-fs-title) * 1.02);
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-field {
  margin-bottom: 14px;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-label,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-hint,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .small,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card button,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card input,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card select {
  font-size: calc(var(--ek-land-fs-lg) * 1.04);
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-field .row.wrap {
  gap: 8px 10px;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-text-input {
  width: min(100%, 760px);
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-team-name-row .settings-text-input {
  width: clamp(220px, 20vw, 320px);
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .volume-bar-row {
  width: min(100%, 760px);
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .volume-bar-row input.volume-bar[type="range"] {
  flex: 1 1 auto;
  max-width: 640px;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-team-color-layout {
  column-gap: 18px;
  row-gap: 12px;
  margin-top: 8px;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-team-color-preview {
  padding: 14px 16px;
  border-radius: 14px;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-color-row {
  gap: 14px;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-color-row input[type="color"] {
  width: 62px;
  height: 48px;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-color-sublabel,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-color-hex {
  font-size: calc(var(--ek-land-fs) * 1.06);
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-kit-swatch--shirt {
  width: 68px;
  height: 80px;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-kit-swatch--shorts {
  width: 60px;
  height: 60px;
  margin-top: -8px;
}

/* 横画面：ガチャはカード2枚を横2列（左=スキルショップ、右=ガチャ操作） */
body.ekiden-main-layout-landscape #screen-gacha.screen.active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
}
body.ekiden-main-layout-landscape #screen-gacha > .card {
  margin: 0;
}
body.ekiden-main-layout-landscape #screen-gacha > .gacha-main-card {
  grid-column: 2;
  grid-row: 1;
}
body.ekiden-main-layout-landscape #screen-gacha > .gacha-skill-shop-card {
  grid-column: 1;
  grid-row: 1;
}
body.ekiden-main-layout-landscape #screen-gacha > .gacha-main-card {
  display: block;
}
body.ekiden-main-layout-landscape #screen-gacha > .gacha-skill-shop-card .gacha-skill-shop {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
body.ekiden-main-layout-landscape #screen-gacha > .gacha-main-card .gacha-paid-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
}
body.ekiden-main-layout-landscape #screen-gacha > .gacha-main-card #freeItemGachaBtn {
  justify-self: end;
  width: auto;
}
body.ekiden-main-layout-landscape #screen-gacha .gacha-skill-shop-name {
  font-size: var(--ek-land-fs-lg);
}
body.ekiden-main-layout-landscape #screen-gacha .gacha-skill-shop-desc {
  font-size: var(--ek-land-fs);
}

/* 横画面：モーダルは大型化（文字・余白を増やす） */
body.ekiden-main-layout-landscape #modalRoot .modal {
  width: min(90vw, 1040px);
  max-height: 88vh;
  font-size: calc(var(--ek-land-fs-lg) * 1.18);
  padding: 10px;
}
/* 横画面：シンプルな appAlert（タイトル＋本文＋OK のみ）は小さめに（中央配置のまま）。 */
body.ekiden-main-layout-landscape #modalRoot .modal:has(> .modal-alert-actions) {
  width: min(42vw, 440px);
  max-width: min(42vw, 440px);
  max-height: min(60vh, 460px);
  padding: 12px 16px;
}
body.ekiden-main-layout-landscape #modalRoot .modal:has(> .modal-alert-actions) h3 {
  font-size: calc(var(--ek-land-fs-title) * 1.08);
  margin: 0 0 8px;
}
body.ekiden-main-layout-landscape #modalRoot .modal:has(> .modal-alert-actions) .app-dialog-msg {
  font-size: calc(var(--ek-land-fs) * 1.18);
  line-height: 1.55;
  margin: 0 0 12px;
}
body.ekiden-main-layout-landscape #modalRoot .modal:has(> .modal-alert-actions) .modal-alert-actions button {
  font-size: calc(var(--ek-land-fs) * 1.15);
  min-height: 44px;
  padding: 8px 20px;
}
body.ekiden-main-layout-landscape #modalRoot .modal h3 {
  font-size: calc(var(--ek-land-fs-title) * 1.18);
  margin: 0 0 10px;
}
body.ekiden-main-layout-landscape #modalRoot .modal button,
body.ekiden-main-layout-landscape #modalRoot .modal .small,
body.ekiden-main-layout-landscape #modalRoot .modal input,
body.ekiden-main-layout-landscape #modalRoot .modal select {
  font-size: calc(var(--ek-land-fs) * 1.35);
}

/* 横画面：個人選手権・決勝結果（幅を抑えつつ本文を大きく） */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-champ-final-result {
  width: min(82vw, 720px);
  max-width: min(82vw, 720px);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-champ-final-result h3 {
  font-size: calc(var(--ek-land-fs-title) * 1.22);
  margin-bottom: 12px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-champ-final-result .small {
  font-size: calc(var(--ek-land-fs) * 1.48);
  line-height: 1.5;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-champ-final-result button {
  font-size: calc(var(--ek-land-fs-lg) * 1.2);
  min-height: 52px;
  padding: 12px 24px;
}

/* 横画面：記録会（種目選択） */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-select {
  width: min(48vw, 520px);
  max-height: min(52vh, 420px);
  position: relative;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-select .record-meet-modal-visual img {
  width: 100%;
  max-width: none;
  object-fit: cover;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-select #closeRecordModal {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 5;
}

/* 横画面：記録会結果は1人1行 */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .result-list.record-meet-result-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result {
  width: min(calc(100vw - 24px), 82vw, 560px);
  max-width: calc(100vw - 24px);
  max-height: min(74vh, 640px);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .record-meet-result-lines-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .record-meet-result-line {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.45rem;
  row-gap: 2px;
  padding: 2px 0;
  font-size: calc(var(--ek-land-fs) * 1.02);
  line-height: 1.35;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .record-meet-result-rank {
  min-width: 0;
  font-weight: 800;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .record-meet-time {
  min-width: 0;
  font-size: calc(var(--ek-land-fs) * 1);
  font-weight: 800;
  text-align: right;
  transform: none;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .record-meet-pb-note .record-meet-meta-value {
  margin-left: 0.25ch;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .record-meet-pb-note {
  min-width: 0;
  text-align: right;
  transform: none;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .record-meet-result-line .small {
  font-size: calc(var(--ek-land-fs) * 0.88);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .record-meet-prize-below.small {
  font-size: calc(var(--ek-land-fs) * 0.78);
}
/* 横画面：結果モーダルのシェアと×は右上で隣接 */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--record-meet-result .modal-result-topbar,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--race-result-share .modal-result-topbar {
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  width: max-content !important;
  max-width: calc(100% - 20px);
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--online-race-result {
  width: min(62vw, 780px);
  max-height: min(74vh, 680px);
}

/* 横画面：区間配置は3列（左=区間, 中=作戦固定展開, 右=選手一覧） */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement {
  width: min(96vw, 1500px);
  max-height: min(90vh, calc((100vw - 40px) * 0.72));
  font-size: calc(var(--ek-land-fs) * 1.04);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain {
  display: grid;
  grid-template-columns: minmax(272px, 286px) minmax(340px, 1.05fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: start;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement .cpu-placement-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement .cpu-placement-title-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-actionbar {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #startCpuBtn {
  margin-left: auto;
  min-width: 8.8rem;
  padding-inline: 14px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots {
  grid-column: 1;
  grid-row: 2;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.2));
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 12.8rem;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots.cpu-slots--map5 {
  width: 286px;
  min-width: 286px;
  max-width: 286px;
  flex: 0 0 286px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots.cpu-slots--map8 {
  width: 286px;
  min-width: 286px;
  max-width: 286px;
  flex: 0 0 286px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots .cpu-slot-card,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots .cpu-slot-inner {
  font-size: calc(var(--ek-land-fs) * 1.2);
  line-height: 1.32;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  padding: 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.2));
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details > summary {
  display: none;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details > .cpu-placement-tactics-body {
  display: block;
  padding: 4px 6px 6px 0;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details .cpu-placement-wind-one-line {
  margin: 0 0 8px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list {
  grid-column: 3;
  grid-row: 2;
  max-height: 62vh;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.2));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement {
  width: min(96vw, 1500px);
  max-height: min(90vh, calc((100vw - 40px) * 0.72));
  font-size: calc(var(--ek-land-fs) * 1.04);
}
/* 横画面：他の区間配置（modal--cpu-placement）と同型 — 左=区間・中=作戦+オーダー・右=選手 */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain {
  display: grid;
  grid-template-columns: minmax(272px, 286px) minmax(340px, 1.05fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: start;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-actionbar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement .cpu-placement-title-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #omakeMyTeamStartBtn {
  margin-left: auto;
  min-width: 8.8rem;
  padding-inline: 14px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-slots {
  grid-column: 1;
  grid-row: 2;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.2));
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 12.8rem;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-slots.cpu-slots--map10 {
  width: 286px;
  min-width: 286px;
  max-width: 286px;
  flex: 0 0 286px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-slots .cpu-slot-card,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-slots .cpu-slot-inner {
  font-size: calc(var(--ek-land-fs) * 1.2);
  line-height: 1.32;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-tactics-details {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  padding: 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.2));
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-tactics-details > summary {
  display: none;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-tactics-details > .cpu-placement-tactics-body {
  display: block;
  padding: 4px 6px 6px 0;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-tactics-details .cpu-placement-wind-one-line {
  margin: 0 0 8px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-separator {
  display: none;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-pick-list {
  grid-column: 3;
  grid-row: 2;
  max-height: 62vh;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 90%, rgba(0, 0, 0, 0.2));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-player-btn {
  width: 100%;
  min-height: 84px;
  font-size: calc(var(--ek-land-fs) * 0.92);
  line-height: 1.24;
  padding: 8px 9px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-player-btn[data-omake-myteam-place-player] {
  min-height: 96px !important;
  font-size: calc(var(--ek-land-fs) * 0.88) !important;
  line-height: 1.2 !important;
  padding: 8px 9px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-tactics-details,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-tactics-details > .cpu-placement-tactics-body {
  padding-left: 0 !important;
  margin-left: 0 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-tactics-details .cpu-order-sheet-embed,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-placement-tactics-details .cpu-order-sheet-embed * {
  margin-left: 0 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-placement-tactics-body .small,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-order-sheet-toolbar {
  font-size: var(--ek-ui-medium) !important;
  line-height: 1.3 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-tactics-radio-label > span,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-placement-wind-one-line {
  font-size: var(--ek-ui-medium) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-pick-stat-cell {
  font-size: var(--ek-ui-small) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-slot-player-line strong,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-slot-player-line .rank,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-slot-player-line .stat-num {
  font-size: calc(var(--ek-land-fs) * 0.98) !important;
  line-height: 1.28 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain .cpu-slot-km {
  font-size: calc(var(--ek-land-fs) * 1.02) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--omake-myteam-placement #cpuPlacementMain > .cpu-pick-list {
  padding: 8px !important;
  max-height: 68vh !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-slot-inner {
  font-size: calc(var(--ek-land-fs) * 1.18);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-separator {
  display: none;
}

/* 横画面：トラック形式は2列（左=枠, 右=選手一覧） */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track {
  width: min(96vw, 1280px);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 12px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-placement-title-row,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-actionbar {
  grid-column: 1 / -1;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-slots {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 20rem;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track.modal--individual-champ-prelim > .cpu-slots {
  max-width: 22rem;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-slots .cpu-slot-card,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-slots .cpu-slot-inner {
  font-size: calc(var(--ek-land-fs) * 1.2);
  line-height: 1.32;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-pick-list .cpu-pick-player-btn {
  font-size: calc(var(--ek-land-fs) * 1.2);
  line-height: 1.32;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-pick-list {
  grid-column: 2;
  max-height: 66vh;
  overflow-y: auto;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-placement-separator {
  display: none;
}

/* 横画面：選手詳細モーダルを横長2カラム化 */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) {
  width: min(96vw, 1080px);
  max-height: 90vh;
  display: block;
  font-size: calc(var(--ek-land-fs) * 1.08);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-row,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-row {
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
}
/* 実画面が横向きのときに必ず効かせる上書き（WebView差分対策） */
body.ekiden-main-layout-landscape .app-header__top {
  padding-right: 0;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-field--team-name,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-field--prefecture,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-field--se,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-dev-support-block {
  grid-column: 1;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-field--team-color,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-field--orientation,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card .settings-retired-list-field {
  grid-column: 2;
}
body.ekiden-main-layout-landscape #screen-settings .settings-data-init-card {
  grid-column: 1;
}
body.ekiden-main-layout-landscape #screen-settings .settings-activity-log-card {
  grid-column: 2;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots .cpu-slot-card,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots .cpu-slot-inner,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-slots .cpu-slot-card,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track > .cpu-slots .cpu-slot-inner {
  font-size: calc(var(--ek-land-fs) * 1.24) !important;
  line-height: 1.32 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-player-btn,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-player-btn {
  font-size: calc(var(--ek-land-fs) * 1.02) !important;
  line-height: 1.28 !important;
  min-height: 86px !important;
  padding: 10px 12px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-normal .cpu-pick-name-row,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-normal .cpu-pick-name-row {
  font-size: calc(var(--ek-land-fs) * 0.98) !important;
  line-height: 1.28 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-normal .cpu-pick-meta-row,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-normal .cpu-pick-meta-row {
  font-size: calc(var(--ek-land-fs) * 0.86) !important;
  line-height: 1.25 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details {
  margin-left: 0;
  padding-left: 2px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain {
  grid-template-columns: minmax(272px, 286px) minmax(340px, 1.05fr) minmax(0, 1.2fr);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details > .cpu-placement-tactics-body {
  padding-left: 0 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details .cpu-order-sheet-embed,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details .cpu-order-sheet-embed * {
  margin-left: 0 !important;
}

/* 横画面最終上書き（実機差分対策） */
body.ekiden-main-layout-landscape #trainingSortSelectHeader {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 172px !important;
  min-width: 172px !important;
  z-index: 4 !important;
}
body.ekiden-main-layout-landscape .app-header__date-budget {
  position: absolute !important;
  right: 194px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  max-width: 156px !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 2px !important;
}
body.ekiden-main-layout-landscape #headerDate,
body.ekiden-main-layout-landscape #teamMeta.team-meta.app-header-budget {
  width: 100% !important;
  max-width: 100% !important;
  text-align: right !important;
}
body.ekiden-main-layout-landscape #lifeBar {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  left: calc(14px + min(34vw, 360px) + 16px) !important;
  right: auto !important;
  width: min(290px, 28vw) !important;
  max-width: min(290px, 28vw) !important;
  z-index: 4 !important;
}
body.ekiden-main-layout-landscape #lifeBar .life-bar-top-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  width: auto !important;
  flex: 0 0 auto;
}
body.ekiden-main-layout-landscape #lifeBar .life-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}
body.ekiden-main-layout-landscape #lifeBar .life-bar-main {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.ekiden-main-layout-landscape #lifeBar .life-bar-extra {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  margin-left: 6px;
}
body.ekiden-main-layout-landscape #lifeBar .life-next-recovery,
body.ekiden-main-layout-landscape #lifeBar .life-next-recovery--full {
  display: none !important;
}
body.ekiden-main-layout-landscape #lifeBar .ad-life-btn {
  font-size: calc(var(--ek-land-fs) * 0.72) !important;
  padding: 2px 6px !important;
}
body.ekiden-main-layout-landscape .app-header__title-wrap {
  /* ライフバー（絶対配置）の右側から開始。フル幅に伸ばさない */
  --ek-land-life-slot: calc(280px + min(260px, calc(100% - 640px)));
  --ek-land-header-right-reserve: calc(172px + 12px + 156px + 28px);
  flex: 0 1 auto !important;
  min-width: 0;
  align-items: center !important;
  margin-left: 0 !important;
  max-width: min(34vw, 360px) !important;
}
body.ekiden-main-layout-landscape .app-header__top {
  justify-content: flex-start !important;
  align-items: center !important;
  min-height: 42px;
}
body.ekiden-main-layout-landscape #teamTitle {
  flex: 0 1 auto !important;
  min-width: 0;
  max-width: min(16ch, 100%) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  margin: 0 !important;
  line-height: 1.15;
}
body.ekiden-main-layout-landscape #headerModeBadge,
body.ekiden-main-layout-landscape #headerPlayModeToggle {
  flex-shrink: 0;
}

body.ekiden-main-layout-landscape #modalRoot .modal.modal--rare-scout-result .scout-card > .row.between strong {
  font-size: calc(var(--ek-land-fs-lg) * 1.02);
  line-height: 1.3;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--rare-scout-result .scout-card > .row.between .chip {
  font-size: calc(var(--ek-land-fs-lg) * 1.02);
  line-height: 1.25;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--rare-scout-result .scout-gacha-stars {
  font-size: calc(var(--ek-land-fs-lg) * 1.02);
  line-height: 1.25;
}

/* ガチャ画像はカード横幅いっぱい */
body.ekiden-main-layout-landscape #screen-gacha .gacha-main-card .gacha-mode-hero-img {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  object-fit: cover !important;
}
body.ekiden-main-layout-landscape #screen-gacha .gacha-main-card .gacha-mode-hero {
  margin: 0 0 8px !important;
}

/* 区間配置・トラック選手選択は文字をさらに大きく */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-placement-tactics-details > .cpu-placement-tactics-body {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* トラック開始：区間配置の「開始」と同系（オレンジCTA・右寄せ幅） */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track #startIndividualTrackBtn {
  margin-left: auto;
  min-width: 8.8rem;
  padding-inline: 14px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list {
  padding: 8px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  max-height: 68vh !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-slot-player-line strong,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-slot-player-line .rank,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-slot-player-line .stat-num {
  font-size: calc(var(--ek-land-fs) * 0.98) !important;
  line-height: 1.28 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-slot-km {
  font-size: calc(var(--ek-land-fs) * 1.02) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-placement-tactics-body .small,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-order-sheet-toolbar {
  font-size: var(--ek-ui-medium) !important;
  line-height: 1.3 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-tactics-radio-label > span,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-placement-wind-one-line,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement .cpu-placement-tourney-paren {
  font-size: var(--ek-ui-medium) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain .cpu-pick-stat-cell,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-stat-cell {
  font-size: var(--ek-ui-small) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-player-btn + .cpu-pick-player-btn {
  margin-top: 0;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-player-btn {
  min-height: 96px !important;
  padding: 8px 9px !important;
  font-size: calc(var(--ek-land-fs) * 0.88) !important;
  line-height: 1.2 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots.cpu-slots--map5,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots.cpu-slots--map8 {
  width: 286px !important;
  min-width: 286px !important;
  max-width: 286px !important;
  flex: 0 0 286px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-slots .cpu-slot-player-line-left strong {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track {
  width: min(96vw, 1400px) !important;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.3fr) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-normal .pick-name {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.2 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-player-btn {
  min-height: 98px !important;
  font-size: calc(var(--ek-land-fs) * 0.9) !important;
  padding: 9px 10px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-head-actions .fav-btn {
  width: 38px !important;
  height: 38px !important;
  font-size: 1.28rem !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-skill-banner {
  font-size: calc(var(--ek-land-fs) * 0.82) !important;
  padding: 8px 14px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-skill {
  font-size: calc(var(--ek-land-fs) * 0.78) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-item {
  font-size: calc(var(--ek-land-fs) * 1.02) !important;
  padding: 11px 13px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-row {
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: flex-start !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 14px;
  row-gap: 8px;
  align-items: start;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail > *,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) > * {
  grid-column: 1 / -1;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-name-row,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-runner-color,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-name-row,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-runner-color {
  grid-column: 1;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-row,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-row {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: start;
  width: auto !important;
  margin-top: 8px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  grid-template-columns: auto auto;
  column-gap: 14px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-row .player-detail-visual-spacer,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-row .player-detail-visual-spacer {
  display: none;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-runner,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-chart,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-runner,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-chart {
  margin: 0;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-row,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-row {
  grid-template-columns: 128px 208px;
  column-gap: 18px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-runner,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-runner {
  width: 128px;
  justify-self: start;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-row .runner-illu-stack.runningman--detail,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-row .runner-illu-stack.runningman--detail {
  transform: scale(2.45);
  transform-origin: left center;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-visual-chart .player-detail-radar-wrap,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-visual-chart .player-detail-radar-wrap {
  width: 208px;
  max-width: 208px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-items-block,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-items-block {
  grid-column: 2;
  justify-self: start;
  width: 100%;
  max-width: 460px;
  margin-top: 0 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-items-block .player-detail-item-row,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-items-block .player-detail-item-row {
  justify-content: flex-start;
  align-items: flex-start;
}
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel.online-panel--public-candidates .online-heading,
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel.online-panel--public-candidates .online-subheading,
body.ekiden-main-layout-landscape #screen-battle .battle-online-scroll > .online-panel.online-panel--public-candidates .small {
  font-size: var(--ek-land-fs-lg) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--gacha-scout-range {
  width: min(78vw, 860px) !important;
  aspect-ratio: 10 / 7;
  max-height: min(74vh, calc(min(78vw, 860px) * 0.7));
  font-size: calc(var(--ek-land-fs) * 1.08);
  position: relative;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--gacha-scout-range .gacha-range-table {
  font-size: calc(var(--ek-land-fs) * 1.08) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--gacha-scout-range button {
  font-size: calc(var(--ek-land-fs) * 0.98) !important;
}
/* ガチャ確率モーダル：× 閉じるボタンは右上固定 */
#modalRoot .modal.modal--gacha-scout-range {
  position: relative;
}
#modalRoot .modal.modal--gacha-scout-range #gachaScoutRangeClose {
  position: absolute;
  top: 8px;
  right: 8px;
  width: auto;
  min-width: 0;
  padding: 2px 10px;
  line-height: 1.1;
  z-index: 5;
}
/* ガチャ確率モーダル：★1〜★4 のラベルを黄金色（金色）で強調 */
#modalRoot .modal.modal--gacha-scout-range .gacha-star-tier-label {
  color: #ffd24a;
  font-weight: 800;
  text-shadow: 0 0 1px rgba(255, 200, 80, 0.55), 0 1px 0 rgba(0, 0, 0, 0.35);
  letter-spacing: 0.02em;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--skill-gacha-pick {
  width: min(84vw, 860px);
  font-size: calc(var(--ek-land-fs) * 1.05);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--skill-gacha-pick .small,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--skill-gacha-pick button {
  font-size: calc(var(--ek-land-fs) * 0.82) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--offline-battle-reminder {
  width: min(88vw, 760px);
  font-size: calc(var(--ek-land-fs) * 0.98);
  padding: 14px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--offline-battle-reminder .small,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--offline-battle-reminder button {
  font-size: calc(var(--ek-land-fs) * 0.92) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--rare-scout-result {
  width: min(92vw, 920px);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--rare-scout-result > p.small {
  font-size: calc(var(--ek-land-fs) * 0.8) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--rare-scout-result .result-list.scout-pick-grid--rare-two {
  max-width: 100%;
  margin-inline: 0;
}
body.ekiden-main-layout-landscape #screen-settings .settings-offline-to-login-card {
  grid-column: 1 !important;
}
body.ekiden-main-layout-landscape #screen-settings .settings-manual-card {
  grid-column: 2 !important;
}
body.ekiden-main-layout-landscape #screen-settings .settings-data-init-card {
  grid-column: 1 !important;
}
body.ekiden-main-layout-landscape #screen-settings .settings-activity-log-card {
  grid-column: 2 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--gain-ok {
  width: min(44vw, 520px) !important;
  max-height: min(40vh, 300px);
  padding-bottom: 8px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--gain-ok .app-dialog-msg {
  white-space: nowrap;
  overflow-x: auto;
  text-wrap: nowrap;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--gain-ok .modal-alert-actions {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--gain-ok .app-gain-line-main {
  display: inline-block;
  font-size: calc(var(--ek-land-fs) * 1.03);
  line-height: 1.45;
  font-weight: 800;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--gain-ok .app-gain-line-effect {
  display: inline-block;
  font-size: calc(var(--ek-land-fs) * 0.82);
  line-height: 1.35;
  font-weight: 700;
}

#modalRoot .modal.modal--skill-gacha-reward {
  width: min(92vw, 640px) !important;
}
#modalRoot .modal.modal--skill-gacha-reward .app-dialog-msg {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-wrap: pretty;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--skill-gacha-reward {
  width: min(56vw, 760px) !important;
  max-height: min(56vh, 420px);
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--skill-gacha-reward .app-dialog-msg {
  white-space: normal;
  overflow-x: visible;
  text-wrap: pretty;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track {
  width: min(72vw, 1040px) !important;
  aspect-ratio: 5 / 3;
  max-height: min(92vh, calc(min(72vw, 1040px) * 0.6));
  min-height: min(74vh, 640px);
  position: relative;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track.modal--individual-champ-prelim {
  aspect-ratio: 5 / 3;
  max-height: min(90vh, calc(min(72vw, 1040px) * 0.6));
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-slot-empty-hint {
  font-size: calc(var(--ek-land-fs) * 0.74) !important;
  line-height: 1.2 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track.modal--individual-champ-prelim .cpu-slot-meta.cpu-slot-meta--empty-row {
  font-size: calc(var(--ek-land-fs) * 0.74) !important;
  line-height: 1.2 !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement .cpu-placement-title-right .cpu-placement-time-toggle-btn {
  order: -1;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement .cpu-placement-time-toggle-btn,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-placement-time-toggle-btn {
  font-size: calc(var(--ek-land-fs) * 0.82) !important;
}

/* 区間配置の表示切替（タイム/総合）ボタン：少しオレンジに */
.cpu-placement-time-toggle-btn {
  background: color-mix(in srgb, #ff9a3c 18%, transparent) !important;
  border-color: rgba(255, 154, 60, 0.55) !important;
  color: #ffd6a8 !important;
}
.cpu-placement-time-toggle-btn:hover:not(:disabled) {
  background: color-mix(in srgb, #ff9a3c 30%, transparent) !important;
  border-color: rgba(255, 154, 60, 0.8) !important;
  color: #ffe9cf !important;
}

#cpuOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-corner,
#cpuOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-leg,
#cpuOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-th-uni,
#cpuOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-corner,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-leg,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-th-uni,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner {
  border-right: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}
#cpuOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner {
  text-align: left;
  padding: 4px 6px;
}
#cpuOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner-main,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner-main {
  font-weight: 700;
  display: block;
  margin-right: 0;
  font-size: 0.68rem;
}
#cpuOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner-rank,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner-rank {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
}
#cpuOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner-rank--none,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-order-mega-table .battle-omake-mega-runner-rank--none {
  font-size: 0.68rem;
  font-weight: 800;
}

body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-items,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-items.player-detail-items--split,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-items.player-detail-items--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-items.player-detail-items--split .player-detail-items-col,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-items.player-detail-items--split .player-detail-items-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-items-block .player-detail-items:not(.player-detail-items--split),
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-items-block .player-detail-items:not(.player-detail-items--split) {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement .cpu-slot-player-line-left .ekiden-skill-inline,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement .cpu-pick-rank-skill-row .ekiden-skill-inline,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-slot-player-line-left .ekiden-skill-inline,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-rank-skill-row .ekiden-skill-inline {
  font-size: calc(var(--ek-land-fs) * 0.72) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-player-btn {
  min-height: 88px !important;
  padding: 6px 7px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-stats-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 2px 6px !important;
  overflow: hidden;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-stats-grid .cpu-pick-stat-cell {
  flex: 0 0 auto;
  font-size: calc(var(--ek-land-fs) * 0.66) !important;
  gap: 1px !important;
  white-space: nowrap !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-stats-grid .cpu-pick-stat-cell abbr {
  font-size: calc(var(--ek-land-fs) * 0.62) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-stats-grid .cpu-pick-stat-cell .rank {
  font-size: calc(var(--ek-land-fs) * 0.62) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-stats-grid .cpu-pick-stat-num {
  font-size: calc(var(--ek-land-fs) * 0.64) !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-player-btn,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-player-btn {
  min-height: 76px !important;
  padding: 6px 8px !important;
}
/* トライアルトラック（個人戦）の選手ピッカーは駅伝の区間選択カードと同サイズまで拡張 */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-player-btn {
  min-height: 108px !important;
  padding: 10px 12px !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-stats-grid,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-stats-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 2px 8px !important;
  overflow: hidden;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-stat-cell,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-stat-cell {
  flex: 0 0 auto;
  white-space: nowrap !important;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--cpu-placement #cpuPlacementMain > .cpu-pick-list .cpu-pick-meta-row .pick-val.stat-num,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--individual-track .cpu-pick-list .cpu-pick-meta-row .pick-val.stat-num {
  font-size: var(--ek-ui-medium) !important;
  font-weight: 900 !important;
}
/* シミュレータ：画面内に収め、区間配置の長い一覧はパネル内スクロール */
#screen-battle-omake.screen.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  min-height: 0;
  height: 100%;
}
#screen-battle-omake .battle-omake-root {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#omakeBattleMainPanel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* 横・区間配置：外側 #omakeBattleMainPanel は縦スクロールしない（内側ピックグリッドがスクロール） */
#screen-battle-omake .battle-omake-root--land #omakeBattleMainPanel.battle-omake-main-panel--land-legs-picks {
  overflow-y: hidden;
  overflow-x: hidden;
  min-height: 0;
}
#screen-battle-omake .battle-omake-root--land #omakeBattleMainPanel.battle-omake-main-panel--land-legs-picks .battle-omake-pick-grid {
  overscroll-behavior: contain;
}
/* シミュレータ横画面設定：区間配置時のみ左スリット。文字・表は大きめに viewport でスケール */
#screen-battle-omake .battle-omake-root--land {
  --omake-land-fs: clamp(17px, min(2.75vw, 3.1vh), 24px);
  font-size: var(--omake-land-fs);
  padding: 4px 6px 6px;
  margin: 1px 2px;
}
#screen-battle-omake .battle-omake-land-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(4px, 0.9vw, 10px);
}
#screen-battle-omake .battle-omake-land-body--solo {
  gap: 0;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-land-body:not(.battle-omake-land-body--solo) {
  gap: clamp(8px, 1.4vw, 16px);
}
#screen-battle-omake .battle-omake-leg-aside.battle-omake-leg-aside--compact {
  flex: 0 0 clamp(176px, 22vw, 264px);
  max-width: clamp(176px, 22vw, 264px);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--muted) 32%, transparent);
  background: color-mix(in srgb, var(--panel) 92%, #000);
  padding: 6px 7px 8px;
  box-sizing: border-box;
}
#screen-battle-omake .battle-omake-leg-aside--compact .battle-omake-aside-slots-inner {
  min-height: 0;
}
#screen-battle-omake .battle-omake-leg-aside--compact .omake-battle-placement-title-row {
  margin-bottom: 6px;
  gap: 6px;
}
#screen-battle-omake .battle-omake-leg-aside--compact .battle-omake-clear-placement-btn {
  font-size: clamp(0.72rem, min(1.35vw, 1.4vh), 0.86rem);
  padding: 4px 8px;
}
#screen-battle-omake .battle-omake-leg-aside--compact .cpu-slots.cpu-slots--map10 {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(10, auto);
  grid-template-areas: "o1" "o2" "o3" "o4" "o5" "o6" "o7" "o8" "o9" "o10";
  gap: 5px;
}
#screen-battle-omake .battle-omake-leg-aside--compact .cpu-slot-card {
  padding: 4px 6px;
  min-height: 72px;
  box-sizing: border-box;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card {
  min-height: 56px;
  padding: 5px 7px;
  min-width: 0;
  overflow: hidden;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slots.cpu-slots--map10 {
  gap: 5px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slots.cpu-slots--map10 > .card.cpu-slot-card {
  min-width: 0;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-skill-after-rank {
  font-size: clamp(0.38rem, min(0.65vw, 0.68vh), 0.48rem);
  font-weight: 700;
  line-height: 1;
  max-width: 3.2em;
}
/* 配置済み：スロット高さは据え置き、氏名・ランク・1万を同サイズ（以前の約3/4） */
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .cpu-slot-player-line {
  align-items: center;
}
/* 詳細スロット：氏名・スキル・1万が横一列ではみ出すとき折り返し、1万は行末へ（簡易1行は据え置き） */
#screen-battle-omake
  .battle-omake-root--land
  .battle-omake-leg-aside--compact
  .cpu-slot-card--filled
  .cpu-slot-player-line:not(.cpu-slot-player-line--simple) {
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 3px;
}
#screen-battle-omake
  .battle-omake-root--land
  .battle-omake-leg-aside--compact
  .cpu-slot-card--filled
  .cpu-slot-player-line:not(.cpu-slot-player-line--simple)
  .cpu-slot-player-line-right {
  margin-left: auto;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .cpu-slot-player-line strong,
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .cpu-slot-player-line--simple .cpu-slot-player-line-left strong,
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .cpu-slot-player-line .rank,
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .cpu-slot-player-line--simple .cpu-slot-player-line-left .rank {
  font-size: clamp(1.38rem, min(2.55vw, 2.7vh), 1.65rem);
  font-weight: 800;
  line-height: 1.15;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .cpu-slot-player-line .rank,
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .cpu-slot-player-line--simple .cpu-slot-player-line-left .rank {
  transform: none;
  padding: 1px 6px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .omake-slot-10k,
#screen-battle-omake .battle-omake-root--land .battle-omake-leg-aside--compact .cpu-slot-card--filled .cpu-slot-player-line-right .stat-num {
  font-size: clamp(1.38rem, min(2.55vw, 2.7vh), 1.65rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
#screen-battle-omake .battle-omake-leg-aside--compact .cpu-slot-player-line strong,
#screen-battle-omake .battle-omake-leg-aside--compact .cpu-slot-player-line--simple .cpu-slot-player-line-left strong {
  font-size: clamp(0.95rem, min(1.75vw, 1.85vh), 1.12rem);
  font-weight: 800;
}
#screen-battle-omake .battle-omake-leg-aside--compact .cpu-slot-meta,
#screen-battle-omake .battle-omake-leg-aside--compact .cpu-slot-player-line {
  font-size: clamp(0.78rem, min(1.45vw, 1.5vh), 0.92rem);
}
#screen-battle-omake .battle-omake-leg-aside--compact .cpu-slot-leg-num {
  font-size: clamp(0.74rem, min(1.35vw, 1.4vh), 0.88rem);
}
#screen-battle-omake .battle-omake-leg-aside--compact .cpu-slot-km {
  font-size: clamp(0.68rem, min(1.25vw, 1.3vh), 0.8rem);
}
#screen-battle-omake .battle-omake-leg-aside--compact .omake-battle-placement-title {
  font-size: clamp(1.02rem, min(2.05vw, 2.15vh), 1.22rem);
  font-weight: 900;
}
#screen-battle-omake .battle-omake-main-panel--land {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* 横・区間配置：右パネル（候補一覧）が親の高さに収まり、グリッド内でスクロールする */
#screen-battle-omake .battle-omake-main-panel--land > .battle-omake-main-picks-only {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#screen-battle-omake .battle-omake-main-panel--land > .battle-omake-main-picks-only > .cpu-placement-separator {
  flex-shrink: 0;
}
#screen-battle-omake .battle-omake-main-panel--land > .battle-omake-order-mega-stack,
#screen-battle-omake .battle-omake-main-panel--land > .battle-omake-roster {
  flex: 1 1 auto;
  min-height: 0;
}
#screen-battle-omake .battle-omake-main-panel--land > .battle-omake-order-footer {
  flex-shrink: 0;
}
#screen-battle-omake .battle-omake-top-grid--land {
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, auto);
  grid-template-rows: auto;
  gap: 6px 8px;
  margin-bottom: 8px;
  align-items: center;
}
#screen-battle-omake .battle-omake-cell--land-tr {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 10px;
  min-width: 0;
}
#screen-battle-omake .battle-omake-order-footer--land-top {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 10px;
  font-size: clamp(0.86rem, min(1.65vw, 1.75vh), 1.02rem);
}
#screen-battle-omake .battle-omake-order-footer--land-top .battle-omake-wind-select {
  max-width: min(36vw, 220px);
}
#screen-battle-omake .battle-omake-order-footer--land-top .battle-omake-order-wind-label {
  flex-shrink: 0;
  white-space: nowrap;
}
#screen-battle-omake .battle-omake-top-grid--land .battle-omake-cell--order-tools {
  grid-column: unset;
  grid-row: unset;
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(70vw, 520px);
  flex-wrap: nowrap;
  gap: 10px;
}
#screen-battle-omake .battle-omake-top-grid--land .battle-omake-cell--order-tools .battle-omake-mode-nav {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(46vw, 360px);
  padding: clamp(8px, 1.5vh, 12px) clamp(10px, 1.8vw, 14px);
  font-size: clamp(0.9rem, min(2.15vw, 2.25vh), 1.1rem);
}
#screen-battle-omake .battle-omake-top-grid--land .battle-omake-cell--order-tools .battle-omake-ui-select {
  flex: 0 1 auto;
  width: auto;
  min-width: 9.25rem;
  max-width: min(38vw, 220px);
  padding: clamp(8px, 1.35vh, 11px) 10px;
  font-size: clamp(0.86rem, min(2vw, 2.1vh), 1.05rem);
}
#screen-battle-omake .battle-omake-top-grid--land .battle-omake-cell--start {
  grid-column: unset;
  grid-row: unset;
  flex-shrink: 0;
}
#screen-battle-omake .battle-omake-top-grid--land .battle-omake-start-btn {
  min-width: 94px;
  min-height: 48px;
  font-size: clamp(0.92rem, 1.85vw, 1.1rem);
  padding: 8px 10px 8px 11px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
#screen-battle-omake .battle-omake-top-grid--land .battle-omake-back-arrow {
  min-width: 48px;
  min-height: 48px;
  font-size: clamp(1.1rem, 2.3vw, 1.35rem);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-uni-select {
  font-size: clamp(0.9rem, min(1.9vw, 2vh), 1.08rem);
  padding: clamp(7px, 1.2vh, 11px) 12px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-order-mega-table {
  font-size: clamp(15px, min(2.35vw, 2.65vh), 22px);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-mega-corner,
#screen-battle-omake .battle-omake-root--land .battle-omake-mega-leg {
  font-size: clamp(14px, min(2.15vw, 2.35vh), 20px);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-mega-uni {
  font-size: clamp(15px, min(2.25vw, 2.45vh), 21px);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-mega-th-uni {
  min-width: 3.85rem;
  max-width: 7rem;
  height: auto;
  max-height: none;
  padding: 6px 7px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-mega-head .battle-omake-tactic-btn {
  font-size: clamp(0.52rem, min(1.15vw, 1.22vh), 0.68rem);
  padding: 2px 5px;
  min-height: 1.2rem;
  line-height: 1.2;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-mega-corner {
  max-width: 2.1rem;
  padding: 6px 5px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-mega-leg {
  max-width: 2.6rem;
  padding: 5px 6px;
}
/* オーダー表：氏名セル（最小単位で2段階ほど縮小） */
#screen-battle-omake .battle-omake-root--land .battle-omake-order-mega-table tbody .battle-omake-mega-runner {
  max-width: 9rem;
  font-size: clamp(1.02em, min(2.4vw, 2.55vh), 1.22em);
  font-weight: 700;
  padding: 2px 3px;
  line-height: 1.22;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-order-mega-table tbody .battle-omake-mega-leg {
  font-size: inherit;
  padding: 2px 3px;
  line-height: 1.22;
}
#screen-battle-omake .battle-omake-order-mega-stack--land-two {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#screen-battle-omake .battle-omake-order-mega-stack--land-two > .battle-omake-order-mega-sheet {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#screen-battle-omake .battle-omake-order-mega-stack--land-two .battle-omake-order-mega-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
/* grid--grid の repeat(2) より後勝ちさせるため #screen まで含める */
#screen-battle-omake .battle-omake-root--land .battle-omake-roster.battle-omake-roster--grid.battle-omake-roster--grid-land {
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 16vw, 190px), 1fr));
  justify-content: start;
  gap: clamp(6px, 1vw, 10px);
  align-items: start;
}
/* 簡易ロスター：列幅を多人数時と同じ（minmax の下限）に固定し、1fr で列だけが伸びないようにする */
#screen-battle-omake .battle-omake-root--land .battle-omake-roster.battle-omake-roster--grid.battle-omake-roster--grid-land.battle-omake-roster--grid-land-simple {
  display: block;
  column-count: 2;
  column-gap: 8px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster.battle-omake-roster--grid.battle-omake-roster--grid-land.battle-omake-roster--grid-land-simple > .player-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 6px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple:not(.player-card--simple-land-omake) {
  padding: 10px 12px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .player-card-simple-line--land-omake {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 5px 8px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land-simple .player-card--simple-land-omake {
  padding: 5px 10px;
  width: 100%;
  min-height: 2.5rem;
  box-sizing: border-box;
  gap: 0;
  justify-content: center;
  align-self: start;
  overflow: hidden;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .player-card-simple-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .player-card-simple-10k {
  flex: 0 0 auto;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
/* 簡易1行：氏名・ランク・10kを同じ字サイズ（space-between 由来の重なりを解消） */
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .player-card-simple-name,
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .player-card-simple-10k,
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .player-card-simple-rank,
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .player-card-simple-rank .rank {
  font-size: clamp(0.88rem, min(1.62vw, 1.72vh), 1.02rem);
  line-height: 1.25;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .player-card-simple-rank .rank {
  transform: none;
  padding: 1px 5px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--simple-land-omake .chip {
  font-size: clamp(0.72rem, min(1.32vw, 1.4vh), 0.86rem);
  flex-shrink: 0;
  line-height: 1.2;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip {
  min-width: 0;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip .battle-omake-player-best--land-stack {
  margin: 6px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(0.78rem, min(1.48vw, 1.55vh), 0.92rem);
  line-height: 1.35;
  color: color-mix(in srgb, var(--muted) 90%, var(--text, #fff));
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip .battle-omake-best-land-row {
  display: block;
  font-weight: 600;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip .battle-omake-best-time-em {
  font-size: clamp(0.92rem, min(1.82vw, 1.92vh), 1.08rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text, #fff);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip .battle-omake-best-10k-em {
  font-size: clamp(1.02rem, min(2.05vw, 2.15vh), 1.22rem);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip .battle-omake-stat-line--land-ranks-only {
  margin: 0;
  font-size: clamp(0.58rem, min(1.05vw, 1.12vh), 0.72rem);
  line-height: 1.2;
  color: var(--muted);
  flex-wrap: nowrap;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip .battle-omake-stat-line--land-ranks-only .rank {
  font-size: inherit;
  padding: 0 3px;
  transform: none;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip.player-card--omake-compact {
  padding: 8px 10px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-land-strip .runner-illu-stack {
  display: none !important;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact {
  padding: 12px 14px;
  font-size: clamp(0.92rem, min(1.95vw, 2.05vh), 1.08rem);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact .battle-omake-player-name {
  font-size: clamp(1rem, min(2.05vw, 2.15vh), 1.18rem);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact .chip {
  font-size: clamp(0.78rem, min(1.55vw, 1.65vh), 0.9rem);
  padding: 2px 6px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact .battle-omake-overall-line {
  font-size: clamp(0.88rem, min(1.75vw, 1.85vh), 1.02rem);
  margin: 5px 0;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact .battle-omake-player-best {
  font-size: clamp(0.8rem, min(1.6vw, 1.7vh), 0.95rem);
  margin: 4px 0 6px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact .battle-omake-stat-line {
  font-size: clamp(0.84rem, min(1.65vw, 1.75vh), 0.98rem);
  margin: 4px 0;
  gap: 4px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact .stat-key {
  font-size: clamp(0.78rem, min(1.55vw, 1.65vh), 0.9rem);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact .stat-num {
  font-size: clamp(0.82rem, min(1.6vw, 1.7vh), 0.95rem);
}
#screen-battle-omake .battle-omake-root--land .battle-omake-roster--grid-land .player-card--omake-compact .runner-illu-stack {
  transform: scale(1);
  transform-origin: top center;
  margin-bottom: 0;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-main-picks-only {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-main-picks-only .battle-omake-pick-grid {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 8px;
  align-items: start;
  align-content: start;
  isolation: isolate;
}
/* 仮想チーム等・候補が多いとき：グリッド子の min-width:auto ではみ出して隣セルと重なるのを防ぐ */
#screen-battle-omake .battle-omake-root--land .battle-omake-main-picks-only .battle-omake-pick-grid > .cpu-pick-player-btn {
  min-width: 0;
  overflow-x: hidden;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-main-picks-only--land .battle-omake-pick-grid {
  display: block;
  column-count: 2;
  column-gap: 8px;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-main-picks-only--land .battle-omake-pick-grid > .cpu-pick-player-btn {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  width: 100%;
  margin: 0 0 8px;
}
#screen-battle-omake .battle-omake-root:not(.battle-omake-root--land) .omake-battle-placement-inner .cpu-pick-list > .cpu-pick-player-btn {
  min-width: 0;
  overflow-x: hidden;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-main-picks-only:not(.battle-omake-main-picks-only--land) .cpu-pick-player-btn {
  font-size: clamp(0.86rem, min(1.75vw, 1.85vh), 1.02rem);
  padding: clamp(7px, 1.1vh, 11px) clamp(8px, 1.3vw, 12px);
}
/* 区間配置＋横：グリッドで行が伸びないよう詰めた固定トーン（簡易・詳細とも高さオート） */
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-player-btn {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: stretch;
  font-size: clamp(0.8rem, min(1.5vw, 1.58vh), 0.94rem);
  height: auto;
  min-height: 0;
  max-height: none;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-player-btn:not(.cpu-pick-player-btn--land-detail) {
  padding: 4px 8px;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-player-btn.cpu-pick-player-btn--land-detail {
  padding: 5px 8px;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-normal {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  flex: 0 0 auto;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-normal--land-detail {
  justify-content: flex-start;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-normal--land-one-row {
  gap: 2px;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-normal--land-one-row.cpu-pick-normal--simple {
  gap: 0;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-land-one-row {
  display: flex;
  flex-flow: row nowrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px 6px;
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-land-one-row .chip {
  flex-shrink: 0;
  font-size: clamp(0.82rem, min(1.55vw, 1.65vh), 0.98rem);
  padding: 2px 7px;
  line-height: 1.2;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-land-one-row .rank {
  flex-shrink: 0;
  font-size: clamp(0.9rem, min(1.75vw, 1.85vh), 1.06rem);
  padding: 2px 8px;
  line-height: 1.2;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-land-one-row .omake-pick-10k--land-em {
  flex: 0 0 auto;
  font-size: clamp(0.92rem, min(1.85vw, 1.95vh), 1.12rem);
  font-weight: 900;
  line-height: 1.2;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-name-row {
  align-items: center;
  gap: 6px;
}
#screen-battle-omake .battle-omake-main-picks-only--land .pick-name {
  font-size: clamp(0.8rem, min(1.48vw, 1.55vh), 0.94rem);
  font-weight: 800;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-meta-row {
  font-size: clamp(0.74rem, min(1.38vw, 1.45vh), 0.88rem);
}
#screen-battle-omake .battle-omake-main-picks-only--land .omake-pick-10k {
  font-size: clamp(0.76rem, min(1.42vw, 1.48vh), 0.9rem);
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-four-stats {
  display: block;
  flex: 0 0 auto;
  font-size: clamp(0.65rem, min(1.2vw, 1.25vh), 0.76rem);
  margin-top: 2px;
  width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}
#screen-battle-omake .battle-omake-main-picks-only--land .chip {
  font-size: clamp(0.68rem, min(1.25vw, 1.3vh), 0.8rem);
}
#screen-battle-omake .battle-omake-main-picks-only--land .pick-name--land-pick {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.95rem, min(1.82vw, 1.92vh), 1.1rem);
  font-weight: 800;
}
#screen-battle-omake .battle-omake-main-picks-only--land .cpu-pick-normal--land-detail .cpu-pick-four-stats {
  text-align: left;
  width: 100%;
  margin-top: 3px;
  line-height: 1.35;
}
#screen-battle-omake .battle-omake-root--land .battle-omake-order-footer {
  font-size: clamp(0.88rem, min(1.65vw, 1.75vh), 1.02rem);
  flex-shrink: 0;
}
.omake-battle-placement-inner {
  min-height: 0;
}
.omake-slot-10k,
.omake-pick-10k {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cpu-pick-meta-row--omake-10k-only {
  justify-content: flex-end;
}
.omake-battle-placement-title-stack {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}
.battle-omake-entry-card {
  margin-top: 6px;
  padding: 10px 12px;
  text-align: left;
}
.battle-omake-entry-heading {
  margin: 0 0 6px;
  text-align: left;
  font-size: 1rem;
}
.battle-omake-entry-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.battle-omake-enter-btn {
  width: 100%;
  max-width: none;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--muted) 42%, transparent);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.battle-omake-myteam-btn {
  font-size: 12px;
}
.battle-omake-myteam-btn.is-locked {
  border-color: color-mix(in srgb, var(--muted) 56%, transparent);
  background: color-mix(in srgb, var(--muted) 24%, var(--panel-2));
  color: color-mix(in srgb, var(--muted) 82%, #fff);
  cursor: not-allowed;
}
/* 未ロックは .is-locked。解放時は「100円」支援と同系のオレンジ */
.battle-omake-myteam-btn.is-unlocked {
  border-color: #ffad55;
  color: #ffad55;
  background: rgba(130, 88, 24, 0.25);
}
.battle-omake-myteam-btn.is-unlocked:hover:not(:disabled),
.battle-omake-myteam-btn.is-unlocked:focus-visible:not(:disabled) {
  filter: brightness(1.1);
}
.battle-omake-myteam-btn.is-unlocked.is-on {
  border-color: #ffad55;
  color: #ffad55;
  background: rgba(130, 88, 24, 0.25);
}
.battle-omake-root {
  text-align: left;
  padding: 12px 14px 18px;
  margin: 8px;
}
.battle-omake-top-grid {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-rows: auto auto;
  gap: 8px 10px;
  margin-bottom: 10px;
  align-items: center;
}
.battle-omake-cell--back {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.battle-omake-back-arrow {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  color: #9fd4ff;
  border-color: rgba(120, 190, 255, 0.5) !important;
  background: rgba(40, 90, 140, 0.22) !important;
}

.battle-omake-back-arrow:hover:not(:disabled),
.battle-omake-back-arrow:focus-visible:not(:disabled) {
  color: #c8e8ff;
  border-color: rgba(160, 210, 255, 0.65) !important;
  background: rgba(50, 110, 170, 0.35) !important;
}

.battle-omake-mode-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--panel) 88%, #000);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
button.battle-omake-mode-nav {
  border-color: #ffad55 !important;
  color: #ffad55 !important;
  background: rgba(130, 88, 24, 0.25) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
button.battle-omake-mode-nav:hover:not(:disabled),
button.battle-omake-mode-nav:focus-visible:not(:disabled) {
  filter: brightness(1.12);
}
button.battle-omake-mode-nav:active:not(:disabled) {
  transform: translateY(1px);
}
.battle-omake-cell--uni {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.battle-omake-cell--start {
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.battle-omake-cell--order-tools {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
}
.battle-omake-cell--order-tools .battle-omake-ui-select {
  flex: 0 0 118px;
  width: 118px;
  min-width: 112px;
  max-width: 124px;
}
.battle-omake-ui-select {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
}
.battle-omake-uni-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}
.battle-omake-uni-select {
  /* 大学名は最大3文字程度の表示想定で幅を抑える */
  width: min(100%, 118px);
  max-width: 100%;
  box-sizing: border-box;
  border: 2px solid var(--omake-uni-main, var(--accent));
  background: color-mix(in srgb, var(--omake-uni-main) 20%, var(--panel));
  color: var(--text);
  border-radius: 10px;
  padding: 10px 8px;
  min-height: 44px;
  font-weight: 800;
  font-size: 1rem;
}
.battle-omake-start-btn {
  /* 「開始→」：→が右端で切れないよう左寄せ寄りの余白と字詰め */
  min-width: 86px;
  min-height: 44px;
  padding: 8px 9px 8px 10px;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  border-radius: 10px;
  background: #b71c1c;
  color: #fff;
  border: 1px solid #7f1018;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.battle-omake-start-btn:hover,
.battle-omake-start-btn:focus-visible,
.battle-omake-start-btn:active {
  background: #b71c1c;
  color: #fff;
  border-color: #7f1018;
  opacity: 1;
  filter: none;
}
button.battle-omake-start-btn:hover:not(:disabled),
button.battle-omake-start-btn:focus-visible:not(:disabled),
button.battle-omake-start-btn:active:not(:disabled) {
  background: #b71c1c !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #7f1018 !important;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25) !important;
  filter: none !important;
  opacity: 1 !important;
}
.battle-omake-order-nav-btn {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
}
.battle-omake-order-nav-btn.is-active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.battle-omake-order-footer {
  margin-top: 8px;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.battle-omake-order-footer .battle-omake-wind-select {
  width: auto;
  min-width: 140px;
  max-width: 180px;
  padding: 7px 10px;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(26, 36, 56, 0.92);
  color: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.battle-omake-order-wind-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #d7e8ff;
  letter-spacing: 0.02em;
}
.battle-omake-mega-runner--trade .battle-omake-mega-runner-main {
  color: #ff9800;
  font-weight: 900;
}
.cpu-order-trade-tag {
  margin-left: 3px;
  font-size: 0.55rem;
  font-weight: 800;
  color: #ff9800;
  vertical-align: middle;
}
.cpu-slot-card--traded {
  outline: 2px solid rgba(230, 81, 0, 0.85);
  outline-offset: 1px;
}
.cpu-slot-trade-from {
  margin-left: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ff9800;
}
.official-individual-champ-card {
  margin-top: 10px;
}
.official-individual-champ-hero {
  margin: 6px 0 10px;
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel-2, #1a2d48) 82%, #000);
  border: 1px solid color-mix(in srgb, #fff 16%, transparent);
}
.official-individual-champ-hero-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.battle-omake-roster--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
#screen-battle-omake .player-card--simple .player-card-simple-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
#screen-battle-omake .player-card--simple .player-card-simple-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
}
#screen-battle-omake .player-card-simple-10k {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--muted) 88%, var(--text, #fff));
  font-variant-numeric: tabular-nums;
}
.omake-battle-placement-inner--simple .cpu-slot-player-line--simple .cpu-slot-player-line-left .rank {
  margin-left: 2px;
}
.battle-omake-pick-grid .cpu-pick-four-stats {
  margin-top: 3px;
  font-size: 0.58rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.battle-omake-pick-grid .cpu-pick-four-stats .stat-num {
  font-size: inherit;
  font-weight: 700;
}
.omake-battle-placement-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.omake-battle-placement-title-row .omake-battle-placement-title {
  margin: 0;
  min-width: 0;
}
.battle-omake-clear-placement-btn {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 4px 10px;
  font-weight: 700;
}
.omake-battle-placement-title {
  margin: 0 0 8px;
}
.battle-omake-order-mega-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.battle-omake-order-mega-sheet {
  padding: 8px 10px;
  margin: 0;
}
.battle-omake-order-mega-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px 6px;
  position: relative;
  isolation: isolate;
}
.battle-omake-order-mega-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.6rem;
  table-layout: auto;
}
.battle-omake-mega-corner {
  position: sticky;
  left: 0;
  z-index: 4;
  padding: 5px 4px;
  text-align: center;
  vertical-align: middle;
  font-weight: 800;
  font-size: 0.62rem;
  color: var(--muted);
  background: var(--panel);
  background-clip: padding-box;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 28%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  box-shadow: 2px 0 6px -2px rgba(0, 0, 0, 0.28);
  max-width: 1.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}
.battle-omake-mega-th-uni {
  padding: 3px 4px;
  text-align: center;
  vertical-align: middle;
  height: 3.55rem;
  max-height: 3.55rem;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--omake-order-uni, var(--accent)) 34%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--omake-order-uni, var(--accent)) 48%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
  min-width: 3rem;
  max-width: 4.6rem;
}
.battle-omake-mega-th-uni--self {
  outline: 1px solid color-mix(in srgb, var(--team) 64%, #ffffff);
  outline-offset: -1px;
}
.battle-omake-mega-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  justify-content: flex-end;
}
.battle-omake-mega-uni {
  font-weight: 800;
  font-size: 0.62rem;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  min-width: 0;
}
.battle-omake-mega-head .battle-omake-tactic-btn {
  padding: 3px 4px;
  font-size: 0.52rem;
  line-height: 1.15;
  width: 100%;
  box-sizing: border-box;
  border-radius: 5px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 1.35rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.battle-omake-mega-leg {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 3px 4px;
  text-align: center;
  font-weight: 700;
  font-size: 0.58rem;
  color: var(--text);
  white-space: nowrap;
  background: var(--panel);
  background-clip: padding-box;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
  box-shadow: 2px 0 6px -2px rgba(0, 0, 0, 0.22);
  max-width: 1.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  cursor: default;
}
.battle-omake-mega-leg:focus-visible {
  outline: none;
}
.battle-omake-leg-note {
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 600;
}
.battle-omake-mega-runner {
  padding: 3px 4px;
  text-align: center;
  font-weight: 600;
  font-size: 0.55rem;
  line-height: 1.25;
  vertical-align: middle;
  word-break: break-all;
  max-width: 4.8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--muted) 12%, transparent);
  background: color-mix(in srgb, var(--omake-order-uni, var(--accent)) 14%, var(--panel));
}
.battle-omake-mega-runner-main {
  display: inline-block;
  margin-right: 3px;
}
.battle-omake-mega-runner-rank {
  display: inline-flex;
  vertical-align: middle;
}
.battle-omake-mega-runner-rank--none {
  color: var(--muted);
  font-weight: 700;
}
.battle-omake-mega-runner-rank .rank {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.42) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  transform: scale(0.88);
  transform-origin: center;
}
#cpuOrderSheetEmbed .battle-omake-mega-th-uni,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-mega-th-uni {
  height: auto;
  max-height: none;
  min-width: 2.6rem;
  padding: 2px 4px;
}
#cpuOrderSheetEmbed .battle-omake-mega-head,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-mega-head {
  display: block;
}
#cpuOrderSheetEmbed .battle-omake-mega-uni,
#cpuOmakeMyTeamOrderSheetEmbed .battle-omake-mega-uni {
  font-size: 0.68rem;
  line-height: 1.1;
}
.battle-omake-tactic-btn {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.2);
  max-width: 100%;
  text-align: left;
}
.battle-omake-tactic-btn--gangan {
  background: #c62828;
  color: #fff;
}
.battle-omake-tactic-btn--gangan:hover,
.battle-omake-tactic-btn--gangan:focus-visible,
.battle-omake-tactic-btn--gangan:active {
  background: #c62828;
  color: #fff;
  border-color: rgba(0, 0, 0, 0.25);
  opacity: 1;
  filter: none;
}
.battle-omake-tactic-btn--second_half {
  background: #1565c0;
  color: #fff;
}
.battle-omake-tactic-btn--second_half:hover,
.battle-omake-tactic-btn--second_half:focus-visible,
.battle-omake-tactic-btn--second_half:active {
  background: #1565c0;
  color: #fff;
  border-color: rgba(0, 0, 0, 0.25);
  opacity: 1;
  filter: none;
}
.battle-omake-tactic-btn--mypace_o {
  background: #2e7d32;
  color: #fff;
}
.battle-omake-tactic-btn--mypace_o:hover,
.battle-omake-tactic-btn--mypace_o:focus-visible,
.battle-omake-tactic-btn--mypace_o:active {
  background: #2e7d32;
  color: #fff;
  border-color: rgba(0, 0, 0, 0.25);
  opacity: 1;
  filter: none;
}
.battle-omake-tactic-btn--mark_pack {
  background: #f9a825;
  color: #1a1204;
}
.battle-omake-tactic-btn--mark_pack:hover,
.battle-omake-tactic-btn--mark_pack:focus-visible,
.battle-omake-tactic-btn--mark_pack:active {
  background: #f9a825;
  color: #1a1204;
  border-color: rgba(0, 0, 0, 0.25);
  opacity: 1;
  filter: none;
}
.battle-omake-tactic-btn--skip {
  background: #9e9e9e;
  color: #1a1a1a;
  opacity: 0.92;
}
.battle-omake-tactic-btn--skip:hover,
.battle-omake-tactic-btn--skip:focus-visible,
.battle-omake-tactic-btn--skip:active {
  background: #757575;
  color: #fff;
  border-color: rgba(0, 0, 0, 0.25);
  opacity: 1;
  filter: none;
}
button.battle-omake-tactic-btn.battle-omake-tactic-btn--gangan:hover:not(:disabled),
button.battle-omake-tactic-btn.battle-omake-tactic-btn--gangan:focus-visible:not(:disabled),
button.battle-omake-tactic-btn.battle-omake-tactic-btn--gangan:active:not(:disabled) {
  background: #c62828 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
  filter: none !important;
  opacity: 1 !important;
}
button.battle-omake-tactic-btn.battle-omake-tactic-btn--second_half:hover:not(:disabled),
button.battle-omake-tactic-btn.battle-omake-tactic-btn--second_half:focus-visible:not(:disabled),
button.battle-omake-tactic-btn.battle-omake-tactic-btn--second_half:active:not(:disabled) {
  background: #1565c0 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
  filter: none !important;
  opacity: 1 !important;
}
button.battle-omake-tactic-btn.battle-omake-tactic-btn--mypace_o:hover:not(:disabled),
button.battle-omake-tactic-btn.battle-omake-tactic-btn--mypace_o:focus-visible:not(:disabled),
button.battle-omake-tactic-btn.battle-omake-tactic-btn--mypace_o:active:not(:disabled) {
  background: #2e7d32 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
  filter: none !important;
  opacity: 1 !important;
}
button.battle-omake-tactic-btn.battle-omake-tactic-btn--mark_pack:hover:not(:disabled),
button.battle-omake-tactic-btn.battle-omake-tactic-btn--mark_pack:focus-visible:not(:disabled),
button.battle-omake-tactic-btn.battle-omake-tactic-btn--mark_pack:active:not(:disabled) {
  background: #f9a825 !important;
  background-image: none !important;
  color: #1a1204 !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
  filter: none !important;
  opacity: 1 !important;
}
.battle-omake-roster--grid .player-card--omake-compact {
  padding: 6px 7px;
  font-size: 0.7rem;
}
.battle-omake-roster--grid .player-card--omake-compact .battle-omake-player-name {
  font-size: 0.76rem;
}
.battle-omake-roster--grid .player-card--omake-compact .chip {
  font-size: 0.58rem;
  padding: 1px 4px;
}
.battle-omake-roster--grid .player-card--omake-compact .battle-omake-overall-line {
  font-size: 0.66rem;
  margin: 3px 0;
}
.battle-omake-roster--grid .player-card--omake-compact .battle-omake-player-best {
  font-size: 0.58rem;
  margin: 2px 0 4px;
  line-height: 1.35;
}
.battle-omake-roster--grid .player-card--omake-compact .battle-omake-stat-line {
  font-size: 0.62rem;
  margin: 2px 0;
  gap: 2px;
}
.battle-omake-roster--grid .player-card--omake-compact .stat-key {
  font-size: 0.58rem;
}
.battle-omake-roster--grid .player-card--omake-compact .stat-num {
  font-size: 0.62rem;
}
.battle-omake-roster--grid .player-card--omake-compact .runner-illu-stack {
  transform: scale(0.82);
  transform-origin: top center;
  margin-bottom: -6px;
}
.modal.omake-battle-detail-modal {
  max-width: min(96vw, 440px);
}
.omake-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.omake-detail-head > h3 {
  flex: 0 0 auto;
  min-width: 0;
}
.omake-detail-head-center {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.omake-detail-head-times {
  margin: 2px 0 0;
  font-size: 0.95rem;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--muted) 18%, var(--text-on-navy, #e8eef5));
  text-align: center;
  white-space: nowrap;
}
.omake-detail-visual .player-detail-visual-runner {
  max-width: 120px;
}
/* シミュレータ・選手詳細：総合行の下に 5千／1万／half のベストタイムを表示 */
.omake-detail-best-line {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--muted) 18%, var(--text-on-navy, #e8eef5));
  font-variant-numeric: tabular-nums;
}
.omake-detail-best-line .omake-detail-best-item {
  font-weight: 700;
}
.omake-detail-best-line .omake-detail-best-item .stat-num {
  margin-left: 0.15ch;
  font-weight: 800;
}
.omake-detail-best-line .omake-detail-best-sep {
  color: var(--muted);
  opacity: 0.6;
}
.omake-stat-sliders {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.omake-stat-slider-row {
  display: grid;
  grid-template-columns: 2rem 3.2rem 1fr;
  gap: 8px;
  align-items: center;
}
.omake-stat-short {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--muted);
}
.omake-stat-rank .rank {
  font-size: 0.95rem;
}
.omake-skill-pick-title {
  margin: 14px 0 6px;
}
.omake-skill-pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.omake-skill-pick {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  background: color-mix(in srgb, var(--panel-2) 88%, var(--bg));
  color: color-mix(in srgb, var(--text) 55%, var(--muted));
  font-size: 0.82rem;
  cursor: pointer;
  opacity: 0.55;
}
.omake-skill-pick.is-selected {
  opacity: 1;
  border-color: var(--ekiden-skill-fg-dim);
  color: var(--ekiden-skill-fg);
  box-shadow: 0 0 12px color-mix(in srgb, var(--ekiden-skill-fg) 35%, transparent),
    0 0 2px color-mix(in srgb, var(--ekiden-skill-fg) 80%, transparent);
  background: color-mix(in srgb, #1a4d30 40%, var(--panel));
}
.omake-skill-pick--readonly {
  cursor: default;
  pointer-events: none;
}

/* 横画面：選手詳細モーダルの文字サイズ・左カラム幅 */
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-profile-line,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-profile-line,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-stat-lines,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-stat-lines,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-best-lines,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-best-lines {
  grid-column: 1;
  justify-self: start;
  width: 100%;
  max-width: 400px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-stats-best-row,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-stats-best-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 400px);
  gap: 8px 14px;
  align-items: start;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-item-tools,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-item-tools {
  grid-column: 1;
  max-width: 400px;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-items-block,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-items-block {
  grid-column: 1 / -1 !important;
  max-width: 860px !important;
  justify-self: start;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-stat-lines,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-stat-lines {
  display: grid;
  gap: 6px;
  font-size: calc(var(--ek-land-fs) * 1.02);
  line-height: 1.35;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-best-lines,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-best-lines {
  display: grid;
  gap: 4px;
  font-size: calc(var(--ek-land-fs) * 1.02);
  line-height: 1.35;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-retire-wrap,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-retire-wrap {
  grid-column: 1;
}
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-hint--small,
body.ekiden-main-layout-landscape #modalRoot .modal.modal--player-detail .player-detail-retire-wrap .retire-hint,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-hint--small,
body.ekiden-main-layout-landscape #modalRoot .modal:has(#playerNameInput) .player-detail-retire-wrap .retire-hint {
  font-size: calc(var(--ek-land-fs) * 0.84) !important;
  line-height: 1.4;
}

/* 区間配置：補足文はタイトル右の括弧表示 */
.cpu-placement-context-line-inline {
  font-weight: 600;
  white-space: nowrap;
}

/* 区間配置：トライアル時のCPU強さラベル（タイトル横バッジ） */
.trial-cpu-strength-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-navy, #fff);
  vertical-align: middle;
  white-space: nowrap;
}
.trial-cpu-strength-chip strong {
  font-weight: 900;
  letter-spacing: 0.04em;
}
.trial-cpu-strength-chip--danger {
  background: rgba(220, 70, 70, 0.22);
  border-color: rgba(255, 120, 120, 0.55);
  color: #ffd5d5;
}
.trial-cpu-strength-chip--warn {
  background: rgba(255, 154, 60, 0.18);
  border-color: rgba(255, 154, 60, 0.55);
  color: #ffd6a8;
}
.trial-cpu-strength-chip--ok {
  background: rgba(60, 200, 120, 0.18);
  border-color: rgba(60, 200, 120, 0.55);
  color: #c7f5d8;
}
.trial-cpu-strength-chip--mystery {
  /* 「？」系：他バッジより薄く・小さく */
  margin-left: 6px;
  padding: 0 6px;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.45;
  background: rgba(160, 130, 200, 0.07);
  border-color: rgba(180, 150, 220, 0.22);
  color: color-mix(in srgb, #e7d4ff 55%, var(--muted, #9aa4b2));
}
.trial-cpu-strength-chip--mystery strong {
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* 横画面：設定画面は2列で上から詰める */
body.ekiden-main-layout-landscape #screen-settings.screen.active {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: row dense;
  align-content: start;
}
body.ekiden-main-layout-landscape #screen-settings.screen.active > .card,
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card,
body.ekiden-main-layout-landscape #screen-settings .settings-manual-card,
body.ekiden-main-layout-landscape #screen-settings .settings-offline-to-login-card,
body.ekiden-main-layout-landscape #screen-settings .settings-data-init-card,
body.ekiden-main-layout-landscape #screen-settings .settings-activity-log-card {
  grid-column: auto !important;
  align-self: start;
  height: fit-content;
}
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px;
}
/* 設定メインカードは見切れ防止のため2列全幅 */
body.ekiden-main-layout-landscape #screen-settings .settings-mode-card {
  grid-column: 1 / -1 !important;
}
body.ekiden-main-layout-landscape #screen-settings .settings-manual-card {
  grid-column: 1 !important;
  grid-row: 2;
}
body.ekiden-main-layout-landscape #screen-settings .settings-offline-to-login-card {
  grid-column: 2 !important;
  grid-row: 2;
}
body.ekiden-main-layout-landscape #screen-settings .settings-activity-log-card {
  grid-column: 1 !important;
  grid-row: 3;
}
body.ekiden-main-layout-landscape #screen-settings .settings-data-init-card {
  grid-column: 2 !important;
  grid-row: 3;
}
