/* ========================================
   全体共通
======================================== */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #f6f7fb;
  color: #222;
}

body.modal-open {
  overflow: hidden;
}

button, input, select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

/* ========================================
   アプリ全体
======================================== */

.app {
  min-height: 100vh;
}

/* ========================================
   左サイドバー
======================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 235px;
  height: 100vh;
  padding: 26px 12px 18px;
  background: #ffffff;
  border-right: 1px solid #e7e7eb;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

/* ========================================
   サイトタイトル
======================================== */

.site-title {
  padding: 6px 12px 28px;
}

.site-title-main {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.site-title-sub {
  margin-top: 6px;
  color: #888;
  font-size: 12px;
}

/* ========================================
   左メニュー
======================================== */

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-button:hover {
  background: #f6f6f8;
}

.nav-button:active {
  transform: scale(0.98);
}

.nav-button.active {
  background: #ffeaf2;
  color: #e43e76;
}

.nav-icon {
  width: 24px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
}

/* ========================================
   サイドバー下部
======================================== */

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px 4px;
  border-top: 1px solid #ececf0;
  color: #777;
  font-size: 12px;
}

.sidebar-footer strong {
  display: block;
  margin-top: 4px;
  color: #111;
  font-size: 18px;
  font-weight: 800;
}

/* ========================================
   メイン画面
======================================== */

.main {
  margin-left: 235px;
  min-height: 100vh;
  padding: 38px 44px 60px;
}

/* ========================================
   ページ
======================================== */

.page {
  display: none;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.page.active {
  display: block;
}

/* ========================================
   ページヘッダー
======================================== */

.page-header {
  margin-bottom: 26px;
}

.page-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-header p {
  margin: 9px 0 0;
  color: #777;
  font-size: 15px;
  line-height: 1.7;
}

/* ========================================
   理論編成コンテナ
======================================== */

#scoreTheoryContainer, #powerTheoryContainer {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ========================================
   バンドブロック
======================================== */

.band-block {
  width: 100%;
  padding: 26px 26px 32px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.045);
}

/* ========================================
   バンドヘッダー
======================================== */

.band-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eeeeef;
}

.band-name {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.8px;
}

/* ========================================
   特訓前 / 特訓後
======================================== */

.image-mode-buttons {
  display: inline-flex;
  border: 1px solid #dedee2;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.image-mode-button {
  min-width: 94px;
  padding: 10px 14px;
  border: none;
  border-right: 1px solid #dedee2;
  background: #ffffff;
  color: #222;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.image-mode-button:last-child {
  border-right: none;
}

.image-mode-button:hover {
  background: #fafafa;
}

.image-mode-button.active {
  background: #ff4f86;
  color: white;
}

/* ========================================
   タイプごとの編成
======================================== */

.theory-row {
  padding: 26px 0 28px;
  border-bottom: 1px solid #eeeeef;
}

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

/* ========================================
   タイプ見出し
======================================== */

.theory-row-title {
  min-height: 34px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 22px;
  font-weight: 600;
}

/* ========================================
   編成スコア倍率
   895%など
   少し小さく調整
======================================== */

.theory-row-title strong {
  margin-left: 2px;
  color: #111;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.2px;
}

/* ========================================
   総合力
======================================== */

.total-power {
  margin-left: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f1f1f5;
  color: #333;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.3;
}

/* ========================================
   属性
======================================== */

.attribute {
  font-size: 24px;
  line-height: 1;
}

.attribute.powerful {
  color: #ef3340;
}

.attribute.cool {
  color: #2d67d8;
}

.attribute.pure {
  color: #35b844;
}

.attribute.happy {
  color: #ff8b22;
}

/* ========================================
   5枚編成
======================================== */

.team-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

/* ========================================
   カード
======================================== */

.team-card {
  position: relative;
  min-width: 0;
  text-align: center;
}

.clickable-card {
  cursor: pointer;
  border-radius: 12px;
}

.clickable-card:focus-visible {
  outline: 3px solid #ff4f86;
  outline-offset: 4px;
}

/* ========================================
   カード順位
======================================== */

.position-number {
  height: 20px;
  margin-bottom: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #707070;
  font-size: 13px;
  font-weight: 800;
}

/* ========================================
   リーダー
======================================== */

.team-card.center {
  z-index: 2;
}

.center-label {
  position: absolute;
  top: 27px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ff4f86;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ========================================
   カード画像
======================================== */

.card-real-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  background: #eeeeef;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.team-card:hover .card-real-image {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
}

/* ========================================
   リーダーカード枠
======================================== */

.team-card.center .card-real-image {
  outline: 3px solid #ff4f86;
  outline-offset: 2px;
}

/* ========================================
   カード下情報
======================================== */

.card-info {
  margin-top: 9px;
  min-height: 92px;
  color: #222;
  font-size: 12px;
  line-height: 1.4;
}

/* ========================================
   レアリティ
======================================== */

.card-rarity {
  color: #111;
  font-size: 14px;
  font-weight: 700;
}

/* ========================================
   カード個別スコア倍率
   150%など
======================================== */

.card-score {
  margin-top: 3px;
  color: #111;
  font-size: 15px;
  font-weight: 900;
}

/* ========================================
   入手区分
======================================== */

.card-type {
  margin-top: 3px;
  color: #ef4777;
  font-size: 12px;
  font-weight: 800;
}

/* ========================================
   カードタイトル
======================================== */

.card-title {
  margin-top: 3px;
  min-height: 34px;
  color: #222;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* ========================================
   編成できない場合
======================================== */

.empty-team {
  min-height: 80px;
  padding: 22px;
  border: 2px dashed #dddddf;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #aaa;
  font-size: 14px;
  text-align: center;
}

/* ========================================
   未実装ページ
======================================== */

.coming-box {
  padding: 30px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  color: #444;
  font-size: 15px;
  line-height: 1.8;
}

/* ========================================
   カード一覧状態
======================================== */

.data-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.status-item {
  padding: 22px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.status-item span {
  display: block;
  color: #777;
  font-size: 13px;
}

.status-item strong {
  display: block;
  margin-top: 7px;
  color: #111;
  font-size: 24px;
  font-weight: 800;
}

/* ========================================
   バンド順 / ランキング順
======================================== */

.theory-view-controls {
  margin-bottom: 22px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.view-mode-label {
  color: #777;
  font-size: 13px;
  font-weight: 700;
}

.view-mode-buttons {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #dedee2;
  border-radius: 10px;
  background: white;
}

.view-mode-button {
  min-width: 100px;
  padding: 10px 15px;
  border: none;
  border-right: 1px solid #dedee2;
  background: white;
  color: #333;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.view-mode-button:last-child {
  border-right: none;
}

.view-mode-button:hover {
  background: #f7f7f9;
}

.view-mode-button.active {
  background: #ff4f86;
  color: white;
}

/* ========================================
   1～32位バッジ
======================================== */

.theory-rank-badge {
  min-width: 62px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #fff0f5;
  color: #e83f76;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.theory-rank-badge.unavailable {
  background: #f3f3f5;
  color: #999;
}

/* ========================================
   ランキング一覧
======================================== */

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ========================================
   ランキング上部
======================================== */

.ranking-toolbar {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04);
}

.ranking-toolbar-text {
  font-size: 17px;
  font-weight: 800;
}

/* ========================================
   ランキング1編成
======================================== */

.ranking-entry {
  padding: 24px 26px 28px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.045);
}

.ranking-entry-header {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eeeeef;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* ========================================
   ランキング順位
======================================== */

.ranking-number {
  min-width: 76px;
  color: #e83f76;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.ranking-number span {
  margin-left: 2px;
  font-size: 15px;
}

/* ========================================
   ランキング見出し
======================================== */

.ranking-entry-title {
  min-width: 0;
}

.ranking-entry-band {
  margin-bottom: 6px;
  color: #111;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.3;
}

.ranking-entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 18px;
  font-weight: 700;
}

/* ランキング側の編成スコアも少し小さく */

.ranking-entry-meta strong {
  font-size: 19px;
  font-weight: 900;
}

/* ========================================
   スマホヘッダー
======================================== */

.mobile-header {
  display: none;
}

.menu-button {
  border: none;
  background: transparent;
  cursor: pointer;
}

/* ========================================
   サイドバー背景
======================================== */

.overlay {
  display: none;
}

/* ========================================
   カード詳細モーダル
======================================== */

.card-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card-detail-modal.open {
  display: flex;
}

/* ========================================
   モーダル背景
======================================== */

.card-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

/* ========================================
   モーダル本体
======================================== */

.card-detail-panel {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  overflow-x: hidden;
}

/* ========================================
   閉じる
======================================== */

.card-detail-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #f1f1f4;
  color: #333;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s ease;
}

.card-detail-close:hover {
  background: #e3e3e8;
}

/* ========================================
   詳細レイアウト
======================================== */

.card-detail-content {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 32px;
}

/* ========================================
   詳細画像
======================================== */

.card-detail-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  background: #eeeeef;
}

/* ========================================
   詳細画像切替
======================================== */

.card-detail-image-buttons {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.card-detail-image-buttons button {
  padding: 8px 16px;
  border: 1px solid #dddddf;
  border-radius: 999px;
  background: white;
  color: #444;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.card-detail-image-buttons button.active {
  border-color: #ff4f86;
  background: #ff4f86;
  color: white;
}

/* ========================================
   詳細画面
   キャラ名・カード名
======================================== */

.card-detail-heading {
  margin-bottom: 14px;
}

.card-detail-character {
  padding-right: 50px;
  color: #555;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.card-detail-title {
  margin: 4px 50px 0 0;
  color: #111;
  font-size: 29px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.4px;
}

/* ========================================
   詳細タグ
======================================== */

.card-detail-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.card-detail-tag {
  padding: 5px 10px;
  background: #f2f2f5;
  border-radius: 999px;
  color: #444;
  font-size: 12px;
  font-weight: 800;
}

/* ========================================
   詳細セクション
======================================== */

.card-detail-section {
  margin-top: 24px;
}

.card-detail-section h3 {
  margin: 0 0 11px;
  padding-bottom: 7px;
  border-bottom: 1px solid #eeeeef;
  font-size: 16px;
}

/* ========================================
   基本情報
======================================== */

.card-detail-table {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px 14px;
  font-size: 14px;
}

.card-detail-table > div:nth-child(odd) {
  color: #777;
  font-weight: 700;
}

/* ========================================
   スキル
======================================== */

.card-detail-skill-name {
  font-size: 15px;
  font-weight: 800;
}

.card-detail-skill-text {
  margin-top: 9px;
  padding: 12px;
  background: #f7f7f9;
  border-radius: 10px;
  color: #444;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

/* ========================================
   ステータス
======================================== */

.card-detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card-detail-stat {
  padding: 13px;
  background: #f7f7f9;
  border-radius: 10px;
}

.card-detail-stat span {
  display: block;
  color: #777;
  font-size: 11px;
}

.card-detail-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.card-detail-stat.total {
  background: #fff0f5;
}

.card-detail-stat.total strong {
  color: #e83f76;
}

.card-detail-note {
  margin-top: 10px;
  color: #888;
  font-size: 11px;
  line-height: 1.6;
}

/* ========================================
   タブレット
======================================== */

@media (max-width: 1050px) {
  .main {
    padding: 34px 24px 50px;
  }

  .band-block {
    padding: 22px 18px 28px;
  }

  .team-grid {
    gap: 9px;
  }

  .card-title {
    font-size: 11px;
  }

  .card-type {
    font-size: 11px;
  }
}

/* ========================================
   スマホ
======================================== */

@media (max-width: 800px) {
  body {
    background: #f7f7fa;
  }

  /* サイドバー */

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 26px rgba(0, 0, 0, 0.12);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* 上部 */

  .mobile-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 58px;
    padding: 0 15px;
    background: white;
    border-bottom: 1px solid #e8e8ea;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 16px;
    font-weight: 800;
    z-index: 80;
  }

  .menu-button {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 23px;
  }

  /* メイン */

  .main {
    margin-left: 0;
    padding: 22px 10px 45px;
  }

  .page-header {
    padding: 0 4px;
    margin-bottom: 18px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .page-header p {
    font-size: 13px;
  }

  /* バンド */

  .band-block {
    padding: 16px 10px 24px;
    border-radius: 14px;
  }

  .band-header {
    gap: 14px;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 18px;
  }

  .band-name {
    font-size: 27px;
  }

  /* 特訓 */

  .image-mode-button {
    min-width: 86px;
    padding: 9px 12px;
    font-size: 12px;
  }

  /* タイプ */

  .theory-row {
    padding: 20px 0 22px;
  }

  .theory-row-title {
    margin-bottom: 12px;
    gap: 5px;
    font-size: 18px;
  }

  .theory-row-title strong {
    font-size: 18px;
  }

  .total-power {
    margin-left: 5px;
    padding: 4px 7px;
    font-size: 13px;
  }

  /* 5枚 */

  .team-grid {
    gap: 4px;
  }

  .position-number {
    height: 16px;
    margin-bottom: 4px;
    font-size: 10px;
  }

  .card-real-image {
    border-radius: 7px;
  }

  .team-card.center .card-real-image {
    outline-width: 2px;
    outline-offset: 1px;
  }

  .center-label {
    top: 20px;
    padding: 2px 5px;
    font-size: 7px;
  }

  /* カード情報 */

  .card-info {
    margin-top: 6px;
    min-height: 75px;
    font-size: 9px;
  }

  .card-rarity {
    font-size: 10px;
  }

  .card-score {
    margin-top: 1px;
    font-size: 11px;
  }

  .card-type {
    margin-top: 2px;
    font-size: 8px;
  }

  .card-title {
    margin-top: 2px;
    min-height: 27px;
    font-size: 8px;
    line-height: 1.3;
  }

  /* 表示切替 */

  .theory-view-controls {
    justify-content: space-between;
    margin-bottom: 16px;
  }

  .view-mode-button {
    min-width: 90px;
    padding: 9px 11px;
    font-size: 12px;
  }

  /* 順位 */

  .theory-rank-badge {
    min-width: 53px;
    padding: 4px 6px;
    font-size: 11px;
  }

  /* ランキング */

  .ranking-toolbar {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .ranking-entry {
    padding: 17px 10px 22px;
    border-radius: 14px;
  }

  .ranking-entry-header {
    margin-bottom: 14px;
    padding: 0 4px 14px;
    gap: 10px;
  }

  .ranking-number {
    min-width: 55px;
    font-size: 27px;
  }

  .ranking-number span {
    font-size: 12px;
  }

  .ranking-entry-band {
    font-size: 18px;
  }

  .ranking-entry-meta {
    gap: 5px;
    font-size: 15px;
  }

  .ranking-entry-meta strong {
    font-size: 17px;
  }

  /* その他 */

  .empty-team {
    min-height: 65px;
    padding: 14px;
    font-size: 12px;
  }

  .data-status {
    grid-template-columns: 1fr;
  }

  /* 背景 */

  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 90;
  }

  .overlay.show {
    display: block;
  }
}

/* ========================================
   詳細画面 スマホ
======================================== */

@media (max-width: 700px) {
  .card-detail-modal {
    padding: 10px;
  }

  .card-detail-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card-detail-image-area {
    width: min(100%, 420px);
    margin: 0 auto;
  }

  .card-detail-character {
    padding-right: 42px;
    font-size: 16px;
  }

  .card-detail-title {
    margin-right: 42px;
    font-size: 23px;
  }

  .card-detail-stat strong {
    font-size: 17px;
  }

  .card-detail-table {
    grid-template-columns: 80px 1fr;
    font-size: 13px;
  }
}

/* ========================================
   小さいスマホ
======================================== */

@media (max-width: 480px) {
  .main {
    padding: 16px 6px 40px;
  }

  .band-block {
    padding: 14px 6px 20px;
  }

  .band-name {
    font-size: 24px;
  }

  .team-grid {
    gap: 3px;
  }

  .theory-row-title {
    font-size: 17px;
  }

  .theory-row-title strong {
    font-size: 17px;
  }

  .total-power {
    font-size: 12px;
  }

  .card-info {
    min-height: 66px;
  }

  .card-title {
    font-size: 7.5px;
  }

  .card-type {
    font-size: 7.5px;
  }

  .card-detail-stat-grid {
    gap: 7px;
  }

  .card-detail-stat {
    padding: 10px;
  }

  .card-detail-stat strong {
    font-size: 15px;
  }
}

/* ========================================
   カード一覧
======================================== */

.card-list-controls {
  margin-bottom: 22px;
  padding: 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.045);
}

/* ========================================
   検索
======================================== */

.card-list-search-row {
  display: flex;
  gap: 10px;
}

.card-list-search {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #dcdce2;
  border-radius: 10px;
  background: white;
  color: #222;
  font-size: 15px;
  outline: none;
}

.card-list-search:focus {
  border-color: #ff4f86;
  box-shadow: 0 0 0 3px rgba(255, 79, 134, 0.1);
}

.card-list-reset {
  padding: 0 16px;
  border: 1px solid #dddddf;
  border-radius: 10px;
  background: white;
  color: #555;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.card-list-reset:hover {
  background: #f7f7f9;
}

/* ========================================
   フィルター
======================================== */

.card-list-filter-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.card-list-filter-grid label {
  min-width: 0;
}

.card-list-filter-grid label > span {
  display: block;
  margin-bottom: 5px;
  color: #777;
  font-size: 11px;
  font-weight: 700;
}

.card-list-filter-grid select {
  width: 100%;
  height: 39px;
  padding: 0 9px;
  border: 1px solid #dcdce2;
  border-radius: 9px;
  background: white;
  color: #333;
  font-size: 12px;
}

/* ========================================
   一覧ツールバー
======================================== */

.card-list-toolbar {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eeeeef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.card-list-count {
  color: #555;
  font-size: 13px;
  font-weight: 800;
}

/* ========================================
   カード一覧特訓ボタン
======================================== */

.card-list-image-button {
  min-width: 94px;
  padding: 9px 13px;
  border: none;
  border-right: 1px solid #dedee2;
  background: white;
  color: #222;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.card-list-image-button:last-child {
  border-right: none;
}

.card-list-image-button.active {
  background: #ff4f86;
  color: white;
}

/* ========================================
   カードグリッド
======================================== */

.card-list-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

/* ========================================
   カード1枚
======================================== */

.card-list-card {
  min-width: 0;
  overflow: hidden;
  background: white;
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.055);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-list-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.1);
}

.card-list-card:focus-visible {
  outline: 3px solid #ff4f86;
  outline-offset: 3px;
}

/* ========================================
   一覧画像
======================================== */

.card-list-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee;
}

.card-list-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ========================================
   一覧情報
======================================== */

.card-list-body {
  padding: 11px 12px 13px;
}

.card-list-character {
  color: #777;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-list-title {
  margin-top: 3px;
  min-height: 39px;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

/* ========================================
   一覧タグ
======================================== */

.card-list-tags {
  margin-top: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.card-list-tags span {
  padding: 3px 6px;
  border-radius: 999px;
  background: #f2f2f5;
  color: #555;
  font-size: 9px;
  font-weight: 800;
}

.card-list-tags .card-list-attribute.powerful {
  background: #fff0f1;
  color: #dc303c;
}

.card-list-tags .card-list-attribute.cool {
  background: #edf3ff;
  color: #2860c8;
}

.card-list-tags .card-list-attribute.pure {
  background: #eefbef;
  color: #269c35;
}

.card-list-tags .card-list-attribute.happy {
  background: #fff5e9;
  color: #e5740c;
}

/* ========================================
   スコア・総合力
======================================== */

.card-list-values {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eeeeef;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-list-values span {
  display: block;
  color: #999;
  font-size: 9px;
}

.card-list-values strong {
  display: block;
  margin-top: 2px;
  color: #222;
  font-size: 13px;
  font-weight: 900;
}

/* ========================================
   0件
======================================== */

.card-list-empty {
  grid-column: 1 / -1;
  padding: 50px 20px;
  border: 2px dashed #ddd;
  border-radius: 14px;
  color: #999;
  text-align: center;
}

/* ========================================
   カード一覧 タブレット
======================================== */

@media (max-width: 1050px) {
  .card-list-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-list-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ========================================
   カード一覧 スマホ
======================================== */

@media (max-width: 700px) {
  .card-list-controls {
    padding: 13px;
  }

  .card-list-search-row {
    flex-direction: column;
  }

  .card-list-reset {
    height: 38px;
  }

  .card-list-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-list-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .card-list-body {
    padding: 8px 7px 10px;
  }

  .card-list-character {
    font-size: 9px;
  }

  .card-list-title {
    min-height: 34px;
    font-size: 11px;
  }

  .card-list-tags span {
    font-size: 7px;
  }

  .card-list-values {
    gap: 4px;
  }

  .card-list-values strong {
    font-size: 10px;
  }
}

/* ========================================
   小さいスマホ
======================================== */

@media (max-width: 430px) {
  .card-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ========================================
   カード詳細 左側
======================================== */

.card-detail-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

/* ========================================
   入手先
======================================== */

.card-detail-source {
  width: 100%;
}

.card-detail-source.hidden {
  display: none;
}

.card-source-label {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.card-source-panel {
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid #e4e4e8;
  border-radius: 14px;
  background: #fafafa;
  text-align: center;
}

/* ========================================
   バナー
======================================== */

.card-source-banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 150px;
  margin: 0 auto 14px;
  object-fit: contain;
  border-radius: 10px;
}

/* ========================================
   イベント / ガチャ名
======================================== */

.card-source-name {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #222;
}

/* ========================================
   種別
======================================== */

.card-source-type {
  margin-top: 5px;
  font-size: 13px;
  color: #666;
}

/* ========================================
   開催期間
======================================== */

.card-source-period {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #777;
}

/* ========================================
   獲得条件
======================================== */

.card-source-obtain {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

/* ========================================
   イベント
======================================== */

.event-source {
  border-color: #d9e6ff;
}

/* ========================================
   ガチャ
======================================== */

.gacha-source {
  border-color: #eadff7;
}

/* ========================================
   スマホ
======================================== */

@media (max-width: 700px) {
  .card-detail-left {
    gap: 16px;
  }

  .card-source-panel {
    padding: 13px;
  }

  .card-source-name {
    font-size: 15px;
  }

  .card-source-banner {
    max-height: 130px;
  }
}

/* ========================================
   カード詳細
   横スクロール完全禁止
======================================== */

/* ========================================
   カード詳細 左右矢印
   モーダルの横幅を広げないよう
   viewport基準で固定する
======================================== */

.card-detail-nav {
  position: fixed;
  top: 50%;
  z-index: 1100;
  width: 46px;
  height: 68px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
  color: #333;
  font-family: inherit;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

/* ========================================
   左
   900pxモーダルの少し外側
   画面が狭ければ10px
======================================== */

.card-detail-prev {
  left: max(10px, calc(50vw - 506px));
}

/* ========================================
   右
======================================== */

.card-detail-next {
  right: max(10px, calc(50vw - 506px));
}

/* ========================================
   Hover
======================================== */

.card-detail-nav:hover:not(:disabled) {
  background: #ffffff;
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.20);
  transform: translateY(-50%) scale(1.06);
}

/* ========================================
   押した時
======================================== */

.card-detail-nav:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96);
}

/* ========================================
   端まで来たら無効
======================================== */

.card-detail-nav:disabled, .card-detail-nav.disabled {
  opacity: 0.22;
  cursor: default;
  box-shadow: none;
}

/* ========================================
   画面が狭い場合
   矢印を画面端へ置く
======================================== */

@media (max-width: 1050px) {
  .card-detail-prev {
    left: 8px;
  }

  .card-detail-next {
    right: 8px;
  }

  .card-detail-nav {
    width: 42px;
    height: 62px;
    font-size: 37px;
  }
}

/* ========================================
   スマホ
======================================== */

@media (max-width: 700px) {
  .card-detail-nav {
    width: 36px;
    height: 54px;
    border-radius: 13px;
    font-size: 31px;
  }

  .card-detail-prev {
    left: 4px;
  }

  .card-detail-next {
    right: 4px;
  }
}

/* ========================================
   個人用編成 V2
======================================== */

.personal-v2-panel {
  margin-bottom: 22px;
  padding: 22px;

  background: #ffffff;

  border-radius: 16px;

  box-shadow:
    0 4px 18px
    rgba(
      0,
      0,
      0,
      0.045
    );
}

.personal-v2-section-title {
  font-size: 19px;
  font-weight: 900;

  color: #222;
}

/* ========================================
   スコア / 総合力
======================================== */

.personal-v2-mode-buttons {
  display: flex;

  gap: 10px;

  margin-top: 18px;
}

.personal-v2-mode-button {
  flex: 1;

  min-height: 52px;

  border: 1px solid #dedee3;
  border-radius: 12px;

  background: #ffffff;

  color: #555;

  font-size: 15px;
  font-weight: 800;

  cursor: pointer;
}

.personal-v2-mode-button:hover {
  background: #fafafa;
}

.personal-v2-mode-button.active {
  border-color: #ff4f86;

  background: #fff0f5;

  color: #e83f76;
}

/* ========================================
   編成条件
======================================== */

.personal-v2-condition-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;

  margin-top: 18px;
}

.personal-v2-condition-grid label > span,
.personal-v2-filter-grid label > span {
  display: block;

  margin-bottom: 6px;

  color: #777;

  font-size: 11px;
  font-weight: 800;
}

.personal-v2-condition-grid select,
.personal-v2-filter-grid select {
  width: 100%;
  height: 42px;

  padding: 0 10px;

  border: 1px solid #dcdce2;
  border-radius: 9px;

  background: #ffffff;
}

.personal-v2-calculate {
  width: 100%;
  height: 50px;

  margin-top: 18px;

  border: none;
  border-radius: 12px;

  background: #ff4f86;

  color: #ffffff;

  font-size: 15px;
  font-weight: 900;

  cursor: pointer;
}

.personal-v2-calculate:hover {
  opacity: 0.9;
}

/* ========================================
   編成結果
======================================== */

.personal-v2-result-header {
  display: flex;

  justify-content: space-between;

  align-items: flex-start;
}

.personal-v2-result-status {
  margin-top: 5px;

  color: #888;

  font-size: 12px;
}

.personal-v2-team {
  display: grid;

  grid-template-columns:
    repeat(
      5,
      minmax(0, 1fr)
    );

  gap: 12px;

  margin-top: 22px;
}

.personal-v2-team-slot {
  position: relative;

  min-width: 0;

  text-align: center;
}

.personal-v2-team-slot > span {
  display: block;

  height: 22px;

  color: #777;

  font-size: 12px;
  font-weight: 900;
}

.personal-v2-team-empty {
  aspect-ratio: 1 / 1;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 2px dashed #dcdce2;
  border-radius: 12px;

  background: #fafafa;

  color: #bbb;

  font-size: 28px;
}

.personal-v2-team-slot.leader
.personal-v2-team-empty {
  border-color: #ff4f86;

  background: #fff7fa;
}

.personal-v2-leader-label {
  position: absolute;

  top: 26px;
  left: 50%;

  z-index: 2;

  padding: 3px 7px;

  border-radius: 999px;

  background: #ff4f86;

  color: #fff;

  font-size: 9px;
  font-weight: 900;

  transform:
    translateX(
      -50%
    );
}

.personal-v2-result-values {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 12px;

  margin-top: 20px;
}

.personal-v2-result-values > div {
  padding: 14px;

  border-radius: 10px;

  background: #f7f7f9;
}

.personal-v2-result-values span {
  display: block;

  color: #888;

  font-size: 10px;
}

.personal-v2-result-values strong {
  display: block;

  margin-top: 5px;

  font-size: 19px;
}

/* ========================================
   固定条件
======================================== */

.personal-v2-fixed-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;

  margin-top: 16px;
}

.personal-v2-fixed-box {
  padding: 16px;

  border: 1px solid #e5e5e8;
  border-radius: 12px;

  background: #fafafa;
}

.personal-v2-fixed-title {
  font-size: 15px;
  font-weight: 900;
}

.personal-v2-fixed-box p {
  margin:
    5px 0
    12px;

  color: #888;

  font-size: 11px;
}

.personal-v2-fixed-list {
  min-height: 32px;

  display: flex;

  flex-wrap: wrap;

  gap: 6px;

  color: #999;

  font-size: 12px;
}

.personal-v2-fixed-chip {
  display: inline-flex;

  flex-direction: column;

  gap: 2px;

  padding: 6px 9px;

  border-radius: 9px;

  background: #ffffff;

  color: #333;

  font-weight: 800;

  box-shadow:
    0 2px 6px
    rgba(
      0,
      0,
      0,
      0.06
    );
}

.personal-v2-fixed-chip small {
  max-width: 180px;

  overflow: hidden;

  color: #888;

  font-size: 9px;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.personal-v2-fixed-note {
  margin-top: 12px;

  color: #888;

  font-size: 11px;
}

/* ========================================
   育成・ボーナス
======================================== */

.personal-v2-settings-links {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;

  margin-top: 16px;
}

.personal-v2-settings-link {
  padding: 16px;

  border: 1px solid #e5e5e8;
  border-radius: 12px;

  background: #fafafa;

  text-align: left;
}

.personal-v2-settings-link strong,
.personal-v2-settings-link span,
.personal-v2-settings-link small {
  display: block;
}

.personal-v2-settings-link strong {
  font-size: 14px;
}

.personal-v2-settings-link span {
  margin-top: 5px;

  color: #666;

  font-size: 11px;
}

.personal-v2-settings-link small {
  margin-top: 9px;

  color: #aaa;

  font-size: 9px;
}

/* ========================================
   所持カード上部
======================================== */

.personal-v2-owned-header {
  display: flex;

  justify-content: space-between;

  align-items: center;
}

.personal-v2-owned-sub {
  margin-top: 4px;

  color: #888;

  font-size: 11px;
}

.personal-v2-owned-count {
  color: #888;

  font-size: 11px;
}

.personal-v2-owned-count strong {
  margin-left: 5px;

  color: #222;

  font-size: 18px;
}

/* ========================================
   検索
======================================== */

.personal-v2-search-row {
  display: flex;

  gap: 10px;

  margin-top: 18px;
}

.personal-v2-search-row input {
  flex: 1;

  min-width: 0;
  height: 44px;

  padding: 0 14px;

  border: 1px solid #dcdce2;
  border-radius: 10px;

  outline: none;
}

.personal-v2-search-row input:focus {
  border-color: #ff4f86;

  box-shadow:
    0 0 0 3px
    rgba(
      255,
      79,
      134,
      0.1
    );
}

.personal-v2-search-row button {
  padding: 0 16px;

  border: 1px solid #ddd;
  border-radius: 10px;

  background: #fff;

  font-size: 12px;
  font-weight: 800;

  cursor: pointer;
}

/* ========================================
   カード絞り込み
======================================== */

.personal-v2-filter-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 12px;

  margin-top: 15px;
}

.personal-v2-card-toolbar {
  margin-top: 15px;
  padding-top: 13px;

  border-top: 1px solid #eee;

  color: #555;

  font-size: 12px;
  font-weight: 800;
}

/* ========================================
   所持カード一覧
======================================== */

.personal-v2-card-grid {
  display: grid;

  grid-template-columns:
    repeat(
      5,
      minmax(0, 1fr)
    );

  gap: 14px;

  margin-top: 18px;
}

.personal-v2-card {
  min-width: 0;

  overflow: hidden;

  border: 2px solid transparent;
  border-radius: 13px;

  background: #fff;

  box-shadow:
    0 3px 13px
    rgba(
      0,
      0,
      0,
      0.055
    );

  cursor: pointer;

  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.personal-v2-card:hover {
  transform:
    translateY(
      -2px
    );
}

.personal-v2-card.owned {
  border-color: #ff8eae;
}

.personal-v2-card.fixed-card {
  border-color: #ff4f86;
}

.personal-v2-card-image-wrap {
  position: relative;

  aspect-ratio: 1 / 1;

  overflow: hidden;

  background: #eee;
}

.personal-v2-card-image {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

.personal-v2-owned-badge {
  position: absolute;

  top: 7px;
  left: 7px;

  padding: 4px 8px;

  border-radius: 999px;

  background: #ff4f86;

  color: #fff;

  font-size: 9px;
  font-weight: 900;
}

.personal-v2-fixed-card-badge {
  position: absolute;

  right: 7px;
  bottom: 7px;

  padding: 4px 7px;

  border-radius: 7px;

  background:
    rgba(
      20,
      20,
      20,
      0.82
    );

  color: #fff;

  font-size: 8px;
  font-weight: 800;
}

.personal-v2-card-body {
  padding: 10px;
}

.personal-v2-card-character {
  color: #777;

  font-size: 10px;
  font-weight: 800;
}

.personal-v2-card-title {
  min-height: 37px;

  margin-top: 3px;

  font-size: 12px;
  font-weight: 900;

  line-height: 1.45;
}

.personal-v2-card-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 4px;

  margin-top: 7px;
}

.personal-v2-card-tags span {
  padding: 3px 5px;

  border-radius: 999px;

  background: #f1f1f4;

  color: #555;

  font-size: 8px;
  font-weight: 800;
}

.personal-v2-card-growth {
  margin-top: 9px;
  padding-top: 8px;

  border-top: 1px solid #eee;

  color: #777;

  font-size: 10px;

  line-height: 1.6;
}

/* ========================================
   0件
======================================== */

.personal-v2-empty {
  grid-column:
    1 / -1;

  padding: 45px 20px;

  border: 2px dashed #ddd;
  border-radius: 12px;

  color: #aaa;

  text-align: center;
}

/* ========================================
   育成設定モーダル
======================================== */

.personal-v2-edit-modal {
  position: fixed;

  inset: 0;

  z-index: 1300;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 20px;
}

.personal-v2-edit-modal.open {
  display: flex;
}

.personal-v2-edit-backdrop {
  position: absolute;

  inset: 0;

  background:
    rgba(
      0,
      0,
      0,
      0.55
    );
}

.personal-v2-edit-panel {
  position: relative;

  z-index: 1;

  width:
    min(
      520px,
      100%
    );

  max-height:
    calc(
      100vh - 40px
    );

  overflow-y: auto;

  padding: 24px;

  border-radius: 18px;

  background: #fff;

  box-shadow:
    0 12px 40px
    rgba(
      0,
      0,
      0,
      0.2
    );
}

.personal-v2-edit-close {
  position: absolute;

  top: 12px;
  right: 12px;

  width: 36px;
  height: 36px;

  border: 0;
  border-radius: 50%;

  background: #f4f4f6;

  font-size: 22px;

  cursor: pointer;
}

.personal-v2-edit-header {
  display: grid;

  grid-template-columns:
    110px
    minmax(
      0,
      1fr
    );

  gap: 15px;

  align-items: center;

  padding-right: 35px;
}

.personal-v2-edit-header img {
  width: 110px;

  aspect-ratio: 1 / 1;

  object-fit: cover;

  border-radius: 11px;
}

.personal-v2-edit-character {
  color: #666;

  font-size: 13px;
  font-weight: 800;
}

.personal-v2-edit-title {
  margin-top: 4px;

  font-size: 20px;
  font-weight: 900;
}

/* ========================================
   育成設定フォーム
======================================== */

.personal-v2-edit-fields {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 12px;

  margin-top: 22px;
}

.personal-v2-edit-fields label {
  padding: 12px;

  border-radius: 10px;

  background: #f7f7f9;
}

.personal-v2-edit-fields label > span {
  display: block;

  margin-bottom: 6px;

  color: #777;

  font-size: 10px;
  font-weight: 800;
}

.personal-v2-edit-fields select {
  width: 100%;
  height: 37px;

  border: 1px solid #ddd;
  border-radius: 7px;

  background: #fff;
}

.personal-v2-edit-owned {
  display: flex !important;

  align-items: center;

  justify-content: space-between;
}

.personal-v2-edit-owned span {
  margin: 0 !important;
}

.personal-v2-edit-owned input {
  width: 22px;
  height: 22px;
}

/* ========================================
   固定設定
======================================== */

.personal-v2-edit-fixed {
  display: grid;

  gap: 9px;

  margin-top: 16px;
}

.personal-v2-edit-fixed label {
  display: flex;

  align-items: center;

  gap: 9px;

  padding: 12px;

  border: 1px solid #e3e3e7;
  border-radius: 10px;

  cursor: pointer;
}

.personal-v2-edit-fixed input {
  width: 18px;
  height: 18px;
}

.personal-v2-edit-save {
  width: 100%;
  height: 46px;

  margin-top: 18px;

  border: none;
  border-radius: 10px;

  background: #ff4f86;

  color: #fff;

  font-weight: 900;

  cursor: pointer;
}

/* ========================================
   タブレット
======================================== */

@media (
  max-width: 1000px
) {

  .personal-v2-card-grid {
    grid-template-columns:
      repeat(
        4,
        minmax(0, 1fr)
      );
  }

}

/* ========================================
   スマホ
======================================== */

@media (
  max-width: 700px
) {

  .personal-v2-panel {
    padding: 15px;
  }

  .personal-v2-mode-buttons {
    flex-direction: column;
  }

  .personal-v2-condition-grid,
  .personal-v2-fixed-grid,
  .personal-v2-settings-links,
  .personal-v2-result-values {
    grid-template-columns:
      1fr;
  }

  .personal-v2-team {
    gap: 4px;
  }

  .personal-v2-search-row {
    flex-direction: column;
  }

  .personal-v2-search-row button {
    height: 38px;
  }

  .personal-v2-filter-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .personal-v2-card-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 8px;
  }

  .personal-v2-edit-fields {
    grid-template-columns:
      1fr;
  }

  .personal-v2-edit-header {
    grid-template-columns:
      85px
      minmax(
        0,
        1fr
      );
  }

  .personal-v2-edit-header img {
    width: 85px;
  }

}

/* ========================================
   個人用編成 結果カード
======================================== */
.personal-v2-result-card {
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e4e4e8;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.055);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.personal-v2-result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.personal-v2-result-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.personal-v2-result-card-body {
  padding: 7px 8px;
}

.personal-v2-result-card-character {
  overflow: hidden;
  color: #666;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-v2-result-card-title {
  min-height: 34px;
  margin-top: 3px;
  overflow: hidden;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.personal-v2-result-card-growth {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 5px;
  overflow: hidden;
  color: #777;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.personal-v2-result-card-growth span {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}

.personal-v2-result-card-growth span:not(:last-child)::after {
  content: "｜";
  margin: 0 2px;
  color: #ccc;
}

.personal-v2-result-card-values {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid #eee;
  font-size: 9px;
  font-weight: 900;
}

.personal-v2-team-slot.leader .personal-v2-result-card {
  border: 2px solid #ff4f86;
}
