/* ==========================================================
    TableTennisSkillsBattle - CSS
     卓球育成ゲーム Phase9
    ========================================================== */

/* リセット・基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Hiragino Sans', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 10px;
}

/* コンテナ */
.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ヘッダー */
.header {
    background: linear-gradient(180deg, #000000 0%, #0a1a2e 100%);
    color: white;
    padding: 12px 0;
    text-align: center;
}

.header-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* セクション共通スタイル */
section {
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

section h2 {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

section h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
}

/* プレイヤー情報セクション */
.player-info {
    border-left-color: #667eea;
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.value {
    color: #667eea;
    font-weight: 700;
    font-size: 16px;
}

/* ステータス表示 */
.stats-section {
    border-left-color: #ff6b6b;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
}

.stat-box {
    background: white;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.stat-label {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffa500);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 戦型表示セクション */
.style-section {
    border-left-color: #51cf66;
}

.current-style {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 2px solid #51cf66;
}

.style-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.style-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 戦型選択セクション */
.style-select-section {
    border-left-color: #4dabf7;
}

.style-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.style-category {
    background: white;
    padding: 12px;
    border-radius: 6px;
}

.style-category h3 {
    margin-bottom: 10px;
    color: #333;
}

.style-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.style-btn {
    padding: 12px 8px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #333;
}

.style-btn:hover {
    background: #e8f4f8;
    border-color: #4dabf7;
}

.style-btn.active {
    background: #4dabf7;
    border-color: #4dabf7;
    color: white;
    box-shadow: 0 4px 12px rgba(77, 171, 247, 0.3);
}

/* 育成ボタンセクション */
.training-section {
    border-left-color: #ffd43b;
}

.training-note {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    padding: 8px;
    background: #fff9e6;
    border-radius: 4px;
    border-left: 3px solid #ffd43b;
}

.training-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.training-btn {
    padding: 14px 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.training-btn:active {
    transform: scale(0.98);
}

.atk-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
}

.atk-btn:hover {
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.def-btn {
    background: linear-gradient(135deg, #4dabf7, #74c0fc);
}

.def-btn:hover {
    box-shadow: 0 6px 16px rgba(77, 171, 247, 0.4);
}

.spd-btn {
    background: linear-gradient(135deg, #ffd43b, #ffe066);
}

.spd-btn:hover {
    box-shadow: 0 6px 16px rgba(255, 212, 59, 0.4);
}

.tec-btn {
    background: linear-gradient(135deg, #51cf66, #69db7c);
}

.tec-btn:hover {
    box-shadow: 0 6px 16px rgba(81, 207, 102, 0.4);
}

.sta-btn {
    background: linear-gradient(135deg, #da77f2, #e599f7);
}

.sta-btn:hover {
    box-shadow: 0 6px 16px rgba(218, 119, 242, 0.4);
}

/* スキル管理セクション */
.skill-section {
    border-left-color: #20c997;
}

.skill-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 10px;
    background: #e9fcf5;
    border-radius: 6px;
    border: 1px solid #c3fae8;
}

.skill-debug-row {
    margin-bottom: 10px;
}

.debug-skill-btn {
    width: 100%;
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, #15aabf, #0ca678);
}

.debug-skill-btn:hover {
    box-shadow: 0 6px 16px rgba(12, 166, 120, 0.35);
}

.skill-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.skill-column {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
}

.skill-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    background: #f8f9fa;
}

.skill-card.equipped {
    border-color: #20c997;
    background: #f1fdf9;
}

.skill-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.skill-name {
    font-weight: 700;
    color: #212529;
    font-size: 14px;
}

.skill-category {
    font-size: 11px;
    font-weight: 700;
    color: #087f5b;
    background: #d3f9d8;
    padding: 2px 6px;
    border-radius: 12px;
    text-transform: uppercase;
}

.skill-description {
    font-size: 12px;
    color: #495057;
    margin-bottom: 8px;
}

.skill-meta {
    font-size: 11px;
    color: #495057;
    margin-top: 4px;
}

.skill-action-btn {
    width: 100%;
    border: none;
    border-radius: 5px;
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    cursor: pointer;
}

.equip-skill-btn {
    background: linear-gradient(135deg, #20c997, #12b886);
}

.equip-skill-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

.unequip-skill-btn {
    background: linear-gradient(135deg, #868e96, #495057);
}

.equipped-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #0b7285;
}

.skill-empty {
    font-size: 12px;
    color: #868e96;
    padding: 8px;
    border: 1px dashed #ced4da;
    border-radius: 6px;
    background: #f8f9fa;
}

/* 未取得スキルカード（グレースケール） */
.skill-unacquired {
    filter: grayscale(100%);
    opacity: 0.45;
    pointer-events: none;
}

/* 戦型サブ説明（小さなテキスト） */
.style-sub-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    padding: 4px 0 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* 最高Rate表示 */
.max-rate-label {
    font-size: 11px;
    color: #868e96;
    margin-left: 8px;
}

/* ホーム画面のステータスグリッド（選手情報内） */
.home-stats-grid {
    margin: 8px 0;
}

/* データ画面 Rate戦績セクション */
.data-rated-section {
    border-left-color: #ffa94d;
}

/* 自動バトルセクション */
.battle-section {
    border-left-color: #ff922b;
}

.battle-controls {
    margin-bottom: 12px;
}

.mode-note {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #d9480f;
    background: #fff4e6;
    border: 1px solid #ffd8a8;
    border-radius: 6px;
    padding: 8px 10px;
}

.mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.tournament-btn {
    background: linear-gradient(135deg, #f59f00, #f76707);
}

.tactic-box {
    margin-bottom: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
}

.tactic-box h3 {
    margin-bottom: 8px;
}

#tacticSelect,
.tactic-select {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 8px;
    font-size: 13px;
    margin-bottom: 8px;
    background: #fff;
}

#tacticDescription,
.tactic-description {
    font-size: 12px;
    color: #495057;
}

.pre-battle-tactic-box {
    margin-bottom: 12px;
}

.rival-box {
    margin-bottom: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
}

.rival-note {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.rival-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.rival-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    background: #f8f9fa;
}

.rival-card h4 {
    font-size: 14px;
    margin-bottom: 4px;
    color: #343a40;
}

.rival-style {
    font-size: 12px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 4px;
}

.rival-description {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.rival-battle-btn {
    width: 100%;
    border: none;
    border-radius: 5px;
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #4263eb, #364fc7);
    cursor: pointer;
}

.battle-controls-note {
    display: block;
    font-size: 12px;
    color: #6c757d;
}

.battle-btn {
    width: 100%;
    padding: 14px 10px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #ff922b, #ff6b6b);
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.25);
}

.battle-btn:hover {
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.35);
}

.battle-btn:active {
    transform: scale(0.98);
}

.battle-summary {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f3f5;
    padding: 8px 0;
}

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

.result-row .value {
    font-size: 18px;
}

.result-win {
    color: #2f9e44;
}

.result-lose {
    color: #e03131;
}

.battle-log {
    margin-top: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.battle-log-entry {
    font-size: 13px;
    line-height: 1.5;
    color: #495057;
    border-bottom: 1px solid #f1f3f5;
    padding: 6px 0;
}

.battle-log-entry:last-child {
    border-bottom: none;
}

/* メッセージログセクション */
.log-section {
    border-left-color: #a78bfa;
}

.save-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: #f3f0ff;
    border-radius: 6px;
    border: 1px solid #e5dbff;
}

.save-actions {
    margin-bottom: 10px;
}

.save-btn {
    width: 100%;
    border: none;
    border-radius: 6px;
    padding: 11px 10px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, #5c7cfa, #364fc7);
}

.save-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

.message-log {
    background: white;
    padding: 12px;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.log-entry {
    font-size: 13px;
    color: #555;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.4;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.success {
    color: #51cf66;
    font-weight: 600;
}

.log-entry.info {
    color: #4dabf7;
}

.log-entry.warning {
    color: #ffd43b;
}

/* フッター */
.footer {
    background: #f8f9fa;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #e0e0e0;
}

/* スマートフォン対応 */
@media (max-width: 480px) {
    .container {
        border-radius: 0;
        min-height: 100vh;
    }

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

    .main-content {
        padding: 15px;
    }

    section {
        margin-bottom: 20px;
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }

    .style-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .training-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .training-btn {
        padding: 12px 8px;
        font-size: 12px;
    }

    .mode-buttons {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Phase10 - バトルステージ・キャラクター表示
   ========================================================== */

/* バトルステージカード */
.battle-stage-card {
    margin-top: 14px;
    overflow: hidden;
}

.battle-stage-card h3 {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

/* バトルステージ本体 */
.battle-stage {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    min-height: 220px;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f7fbff, #e8f5e9);
    border: 2px solid #cfd8dc;
}

/* キャラクターエリア */
.character-area {
    width: 35%;
    text-align: center;
}

.character-area p {
    font-size: 12px;
    font-weight: 700;
    color: #444;
    margin-top: 6px;
}

/* ボールエリア */
.ball-area {
    position: relative;
    width: 20%;
    height: 120px;
}

/* キャラクター全体 */
.tt-character {
    position: relative;
    width: 80px;
    height: 120px;
    margin: 0 auto;
    transition: transform 0.25s ease, filter 0.25s ease;
}

/* 頭 */
.character-head {
    position: absolute;
    top: 0;
    left: 26px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #333;
}

/* 胴体 */
.character-body {
    position: absolute;
    top: 32px;
    left: 24px;
    width: 32px;
    height: 45px;
    border-radius: 12px;
    background: #555;
}

/* 腕 */
.character-arm {
    position: absolute;
    top: 40px;
    width: 35px;
    height: 8px;
    border-radius: 8px;
    background: #333;
}

.racket-arm {
    right: 4px;
    transform: rotate(-25deg);
}

.enemy-character .racket-arm {
    left: 4px;
    right: auto;
    transform: rotate(25deg);
}

/* ラケット */
.character-racket {
    position: absolute;
    top: 33px;
    right: -4px;
    width: 18px;
    height: 24px;
    border-radius: 50%;
    background: #d84315;
}

.enemy-character .character-racket {
    left: -4px;
    right: auto;
}

/* 足 */
.character-leg {
    position: absolute;
    top: 75px;
    width: 10px;
    height: 38px;
    border-radius: 8px;
    background: #333;
}

.left-leg {
    left: 26px;
    transform: rotate(10deg);
}

.right-leg {
    right: 26px;
    transform: rotate(-10deg);
}

/* ボール */
.battle-ball {
    position: absolute;
    top: 55px;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #333;
    transform: translateX(-50%);
    transition: transform 0.3s ease;
}

/* エフェクト */
.character-effect {
    position: absolute;
    inset: -8px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

/* アニメーションメッセージ */
#battle-animation-message {
    font-size: 12px;
    color: #7a8a90;
    text-align: center;
    margin-top: 8px;
}

/* ----------------------------------------------------------
   9タイプ別 見た目
   ---------------------------------------------------------- */

/* 前陣速攻型 */
.style-front-fast-attack .character-body {
    background: #ff7043;
}
.style-front-fast-attack {
    transform: skewX(-5deg);
}

/* オールフォア型 */
.style-all-fore .character-body {
    background: #ef5350;
}
.style-all-fore .character-racket {
    transform: scale(1.15);
}

/* パワー両ハンド型 */
.style-power-both-hand .character-body {
    background: #8d6e63;
    width: 40px;
    left: 20px;
}

/* ブロック＆カウンター型 */
.style-block-counter .character-body {
    background: #42a5f5;
    border-radius: 6px;
}

/* 一撃カウンター型 */
.style-one-shot-counter .character-body {
    background: #5c6bc0;
}
.style-one-shot-counter {
    transform: skewX(6deg);
}

/* オールラウンド型 */
.style-all-round .character-body {
    background: #66bb6a;
}

/* ペン粒型 */
.style-pips .character-body {
    background: #ab47bc;
}
.style-pips .character-effect {
    border-color: #ab47bc;
    opacity: 0.25;
}

/* カットマン型 */
.style-chopper .character-body {
    background: #26a69a;
}
.style-chopper {
    transform: translateY(8px);
}

/* 異質攻守型 */
.style-trickster .character-body {
    background: linear-gradient(90deg, #ffa726 50%, #7e57c2 50%);
}
.style-trickster .character-head {
    transform: translateX(4px);
}

/* ----------------------------------------------------------
   アニメーションクラス
   ---------------------------------------------------------- */

/* 攻撃 */
.tt-character.anim-attack {
    transform: translateX(18px) scale(1.05);
}
.enemy-character.anim-attack {
    transform: translateX(-18px) scale(1.05);
}

/* 守備 */
.tt-character.anim-defense {
    transform: translateX(-12px) scale(0.95);
}
.enemy-character.anim-defense {
    transform: translateX(12px) scale(0.95);
}

/* カウンター */
.tt-character.anim-counter {
    transform: translateX(14px) rotate(-4deg) scale(1.06);
}
.enemy-character.anim-counter {
    transform: translateX(-14px) rotate(4deg) scale(1.06);
}

/* スキル発動 */
.tt-character.anim-skill {
    filter: brightness(1.4);
}
.tt-character.anim-skill .character-effect {
    opacity: 1;
    border-color: #ffeb3b;
    box-shadow: 0 0 18px #ffeb3b;
}

/* 勝利 */
.tt-character.anim-win {
    transform: translateY(-18px) scale(1.08);
}

/* 敗北 */
.tt-character.anim-lose {
    transform: translateY(14px) scale(0.92);
    filter: grayscale(0.4);
}

/* ボールアニメーション */
.battle-ball.anim-to-enemy {
    transform: translateX(70px);
}
.battle-ball.anim-to-player {
    transform: translateX(-70px);
}

/* バトルステージ レスポンシブ */
@media (max-width: 600px) {
    .battle-stage {
        min-height: 190px;
        padding: 12px;
    }

    .tt-character {
        width: 64px;
        height: 105px;
    }

    .character-area {
        width: 38%;
    }

    .ball-area {
        width: 16%;
    }
}

/* タブレット対応 */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }

    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .training-buttons {
        grid-template-columns: repeat(5, 1fr);
    }

    .style-buttons {
        grid-template-columns: 1fr;
    }

    .skill-columns {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================
   v0.11 - 初回セットアップオーバーレイ
   ========================================================== */

.setup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 20px;
}

.setup-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    margin: auto;
}

.setup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.setup-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.setup-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.setup-step {
    padding: 20px;
}

.setup-step-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.setup-name-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 8px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.setup-name-input:focus {
    outline: none;
    border-color: #667eea;
}

.setup-name-input.setup-input-error {
    border-color: #e03131;
}

.setup-name-error {
    font-size: 12px;
    color: #e03131;
    font-weight: 600;
    margin-bottom: 6px;
}

.setup-note {
    font-size: 12px;
    color: #868e96;
    margin-bottom: 16px;
}

.setup-btn-next {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow 0.25s ease;
}

.setup-btn-next:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.setup-style-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.setup-style-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.setup-style-cat-label {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin-bottom: 8px;
}

.setup-style-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.setup-style-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    padding: 10px 8px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease;
}

.setup-style-btn:hover {
    background: #e8f4f8;
    border-color: #4dabf7;
}

.setup-style-btn.active {
    background: #4dabf7;
    border-color: #4dabf7;
    color: white;
    box-shadow: 0 4px 10px rgba(77, 171, 247, 0.3);
}

/* 戦型ミニ画像 */
.style-mini-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.style-btn-name {
    font-size: 12px;
    font-weight: 800;
}

/* 試合開始画面: カード内ミニ画像 */
.battle-start-char-img {
    display: block;
    margin: 6px auto 8px;
    width: 56px;
    height: 56px;
}

/* 全国Rate対戦: 対戦相手カードヘッダー */
.rated-opponent-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.rated-opponent-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setup-selected-info {
    background: #f1f9ff;
    border: 1px solid #c5e4ff;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #333;
    min-height: 48px;
}

.setup-selected-info strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #4dabf7;
    margin-bottom: 4px;
}

.setup-selected-info p {
    line-height: 1.5;
    color: #555;
}

.setup-btn-confirm {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #51cf66, #2f9e44);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(81, 207, 102, 0.25);
}

.setup-btn-confirm:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(81, 207, 102, 0.4);
}

.setup-btn-confirm:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
}

/* 戦型ロック表示 */
.style-lock-badge {
    font-size: 12px;
    font-weight: 700;
    color: #868e96;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* ==========================================================
   v0.12 - ログイン・パスワード機能
   ========================================================== */

/* ログイン / パスワード変更オーバーレイ */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 20px;
}

.login-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    margin: auto;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 20px;
    text-align: center;
}

.login-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.login-screen-inner {
    padding: 24px 20px;
}

.login-choice-title,
.login-form-title {
    font-size: 15px;
    font-weight: 700;
    color: #444;
    text-align: center;
    margin-bottom: 20px;
}

/* ログインボタン群 */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: box-shadow 0.25s ease;
    margin-bottom: 12px;
    color: white;
    box-sizing: border-box;
}

.login-btn:last-child {
    margin-bottom: 0;
}

.login-btn-new {
    background: linear-gradient(135deg, #51cf66, #2f9e44);
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.3);
}

.login-btn-new:hover {
    box-shadow: 0 6px 18px rgba(81, 207, 102, 0.45);
}

.login-btn-continue {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-btn-continue:hover {
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.45);
}

.login-btn-submit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.login-btn-submit:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.login-btn-submit:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
}

.login-btn-back {
    background: #868e96;
    box-shadow: none;
}

.login-btn-back:hover {
    background: #6c757d;
}

.login-btn-icon {
    font-size: 18px;
}

.login-btn-text {
    flex: 1;
    text-align: left;
}

/* フォーム */
.login-form-group {
    margin-bottom: 16px;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
}

.login-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.login-input:focus {
    outline: none;
    border-color: #667eea;
}

/* エラー・成功メッセージ */
.login-error {
    font-size: 13px;
    color: #e03131;
    font-weight: 600;
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    text-align: center;
}

.login-success {
    font-size: 13px;
    color: #2f9e44;
    font-weight: 600;
    background: #ebfbee;
    border: 1px solid #b2f2bb;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    text-align: center;
}

/* ==========================================================
   画面管理・ナビゲーション
   ========================================================== */

/* ゲームナビゲーションバー */
.game-nav {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: #0b1220;
    border-bottom: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-btn {
    flex: 1;
    min-width: 52px;
    padding: 9px 8px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    line-height: 1.3;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

.nav-btn.active {
    background: #f97316;
    color: white;
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.28);
}

/* ゲーム画面（各screen-*の共通ルール） */
.game-screen {
    /* JSで display を切り替えるため基本はブロック */
}

/* HOME画面: メインビジュアル */
.home-visual {
    width: 100%;
    margin-bottom: 16px;
}

.home-visual-img {
    width: 100%;
    height: auto;
    display: block;
}

/* HOME画面: メニューセクション */
.home-menu-section {
    border-left-color: #ffd43b;
}

.home-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.home-menu-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 16px;
    min-height: 118px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    font-family: inherit;
    text-align: left;
}

.home-menu-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.18);
    transform: translateY(-2px);
}

/* CSSアイコン: メニューシンボル */
.menu-symbol {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-block;
    position: relative;
    margin-bottom: 10px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
    flex-shrink: 0;
}

.menu-symbol::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.menu-symbol-training {
    background: linear-gradient(135deg, #ff8a3d, #ff4d4d);
}

.menu-symbol-training::after {
    content: "UP";
}

.menu-symbol-battle {
    background: linear-gradient(135deg, #ef4444, #991b1b);
}

.menu-symbol-battle::after {
    content: "VS";
}

.menu-symbol-data {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.menu-symbol-data::after {
    content: "RT";
}

.menu-symbol-settings {
    background: linear-gradient(135deg, #64748b, #334155);
}

.menu-symbol-settings::after {
    content: "SET";
}

.home-menu-label {
    font-size: 15px;
    font-weight: 900;
    color: #111827;
}

.home-menu-sub {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin-top: 2px;
}

/* 対戦モード選択画面 */
.battle-mode-select-section {
    border-left-color: #ff922b;
}

.battle-mode-select-sub {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}

.battle-mode-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.battle-mode-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 18px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.battle-mode-card.cpu-battle-card {
    border-left: 4px solid #4263eb;
}

.battle-mode-card.rated-battle-card {
    border-left: 4px solid #f03e3e;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 60%);
}

.battle-mode-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.battle-mode-card-icon {
    font-size: 26px;
    line-height: 1;
}

.battle-mode-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #343a40;
}

.battle-mode-card-desc {
    font-size: 13px;
    color: #495057;
    line-height: 1.7;
    margin-bottom: 12px;
}

.battle-mode-card-copy {
    font-size: 12px;
    color: #e03131;
    font-weight: 700;
    margin-bottom: 12px;
    font-style: italic;
}

.battle-mode-start-btn {
    width: 100%;
}

.battle-mode-start-btn.rated-btn {
    background: linear-gradient(135deg, #e03131 0%, #c92a2a 100%);
}

.battle-mode-start-btn.rated-btn:hover {
    background: linear-gradient(135deg, #c92a2a 0%, #b02020 100%);
}

/* 試合開始画面 */
.battle-start-section {
    border-left-color: #ff922b;
}

.battle-start-matchup {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 20px;
}

.battle-start-card {
    flex: 1;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 14px 12px;
}

.battle-start-card.player-card {
    border-left: 4px solid #4263eb;
}

.battle-start-card.cpu-card {
    border-left: 4px solid #e03131;
}

.battle-start-card h3 {
    font-size: 15px;
    margin-bottom: 10px;
    color: #343a40;
}

.bs-stats-summary {
    margin-top: 10px;
    font-size: 12px;
    color: #495057;
    background: #f8f9fa;
    border-radius: 5px;
    padding: 8px;
    line-height: 1.8;
    word-break: break-all;
}

.battle-start-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: #ff922b;
    flex-shrink: 0;
    padding: 0 4px;
}

.battle-start-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* 試合終了画面 */
.battle-result-section {
    border-left-color: #f59f00;
}

.br-result-banner {
    text-align: center;
    padding: 20px 16px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
}

.br-win {
    background: linear-gradient(135deg, #d3f9d8, #b2f2bb);
    color: #2f9e44;
    border: 2px solid #8ce99a;
}

.br-lose {
    background: linear-gradient(135deg, #ffe3e3, #ffc9c9);
    color: #e03131;
    border: 2px solid #ffa8a8;
}

.br-info-card,
.br-exp-card,
.br-log-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.br-log-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #343a40;
}

.br-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 13px;
}

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

.br-info-row .label {
    color: #6c757d;
    font-weight: 600;
}

.br-info-row .value {
    color: #343a40;
    font-weight: 700;
}

.br-exp-value {
    color: #f59f00;
    font-size: 16px;
}

.br-rate-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 6px;
}

.br-rate-transition {
    font-size: 18px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 8px;
}

.br-rate-arrow {
    color: #868e96;
}

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

.br-share-card {
    margin-top: 12px;
    margin-bottom: 12px;
}

.share-x-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 900;
    color: #ffffff;
    background: #0f172a;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.share-x-btn:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
}

.share-x-btn:active {
    transform: scale(0.98);
}

.br-analysis-card {
    background: white;
    border: 1px solid #e9ecef;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.br-analysis-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #343a40;
}

.br-analysis-item {
    margin-bottom: 10px;
}

.br-analysis-item:last-child {
    margin-bottom: 0;
}

.br-analysis-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.br-analysis-item p {
    font-size: 13px;
    color: #495057;
    line-height: 1.6;
    margin: 0;
}

.br-advantage-card {
    background: white;
    border: 1px solid #e9ecef;
    border-left: 4px solid #ff922b;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.br-advantage-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #343a40;
}

.br-advantage-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f5;
}

.br-advantage-row:last-of-type {
    border-bottom: none;
}

.br-advantage-label {
    font-size: 13px;
    color: #495057;
    font-weight: 600;
}

.br-advantage-value {
    font-size: 13px;
    color: #343a40;
    font-weight: 800;
}

.br-advantage-final {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 2px solid #e9ecef;
    border-bottom: none;
}

.br-advantage-final .br-advantage-label,
.br-advantage-final .br-advantage-value {
    font-size: 14px;
    font-weight: 900;
    color: #d9480f;
}

.br-advantage-note {
    margin-top: 10px;
    font-size: 11px;
    color: #868e96;
    line-height: 1.5;
}

/* レベルアップカード */
.br-levelup-card {
    background: linear-gradient(135deg, #fff9db, #fff3bf);
    border: 2px solid #ffd43b;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    text-align: center;
}

.br-levelup-card h3 {
    font-size: 18px;
    color: #e67700;
    margin-bottom: 8px;
    letter-spacing: 0.08em;
}

.br-levelup-card p {
    font-size: 14px;
    color: #343a40;
    font-weight: 700;
    line-height: 1.6;
    margin: 4px 0;
}

/* 次の装備枠解放テキスト（複数箇所で使用） */
.equip-slot-next {
    font-size: 12px;
    color: #868e96;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 4px;
}

/* HOME画面: プレイヤー状態表示 */
.home-player-status {
    text-align: center;
    padding: 10px 16px 4px;
    font-size: 14px;
    font-weight: 700;
    color: #343a40;
}

.home-player-level {
    font-size: 16px;
    color: #1971c2;
}

.home-player-status-sep {
    color: #868e96;
}

.home-player-slots {
    font-size: 16px;
    color: #2f9e44;
}

.home-next-equip-slot {
    font-size: 12px;
    color: #868e96;
    margin-top: 4px;
}

/* Rate対戦開始画面: レベル情報 */
.rated-level-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.rated-level-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 4px;
}

.rated-level-label {
    color: #868e96;
}

.rated-level-value {
    font-weight: 700;
    color: #343a40;
}

/* プレースホルダー画面 */
.screen-placeholder-section {
    border-left-color: #adb5bd;
}

.screen-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 14px;
    display: block;
}

.screen-placeholder h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #868e96;
}

.screen-placeholder p {
    font-size: 14px;
}

/* 設定画面 */
.settings-save-section {
    border-left-color: #20c997;
}

.settings-items-section {
    border-left-color: #667eea;
}

.settings-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-item-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    flex-shrink: 0;
    background: #eef2ff;
    position: relative;
    font-size: 0;
}

.settings-icon-profile {
    background: #eef2ff;
}

.settings-icon-profile::after {
    content: "PRF";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 8px;
    font-weight: 900;
    color: #4f46e5;
}

.settings-icon-name {
    background: #f0fdf4;
}

.settings-icon-name::after {
    content: "NM";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 900;
    color: #16a34a;
}

.settings-icon-password {
    background: #eef2ff;
}

.settings-icon-password::after {
    content: "KEY";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 900;
    color: #4f46e5;
}

.settings-icon-reset {
    background: #fff1f2;
}

.settings-icon-reset::after {
    content: "DEL";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-weight: 900;
    color: #e11d48;
}

.settings-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.settings-item-label {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.settings-item-status {
    font-size: 12px;
    color: #adb5bd;
    font-weight: 600;
}

.settings-back-row {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.settings-back-btn {
    padding: 12px 32px;
    font-size: 14px;
    border-radius: 8px;
}

/* データ確認画面 */
.data-player-section {
    border-left-color: #667eea;
}

.data-stats-section {
    border-left-color: #ff6b6b;
}

.data-records-section {
    border-left-color: #ffd43b;
}

.data-skills-section {
    border-left-color: #20c997;
}

.data-equipped-section {
    border-left-color: #339af0;
}

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

/* 保存ボタン追加スタイル */
.save-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.save-btn-secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.save-btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #e03131);
}

/* 全国Rate対戦開始画面 */
.rated-battle-start-section {
    border-left-color: #e03131;
}

.rated-battle-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: #e03131;
    font-style: italic;
    margin-bottom: 4px;
}

.rated-battle-desc {
    font-size: 13px;
    color: #495057;
    margin-bottom: 16px;
}

.rated-summary-card {
    background: white;
    border: 2px solid #ffc9c9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 70%);
}

.rated-summary-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.rated-summary-item {
    flex: 1;
}

.rated-summary-label {
    font-size: 11px;
    color: #868e96;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rated-summary-value {
    font-size: 28px;
    font-weight: 900;
    color: #e03131;
    line-height: 1.1;
}

.rated-record-value {
    font-size: 16px;
    color: #343a40;
}

.rated-win-rate {
    font-size: 12px;
    color: #495057;
    margin-top: 2px;
}

.rated-provisional-area {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff9db;
    border: 1px solid #ffd43b;
    border-radius: 8px;
}

.rated-provisional-badge {
    font-size: 12px;
    font-weight: 700;
    color: #e67700;
    margin-bottom: 4px;
}

.rated-provisional-remaining {
    font-size: 13px;
    color: #343a40;
    font-weight: 600;
    margin-bottom: 4px;
}

.rated-provisional-hint {
    font-size: 11px;
    color: #868e96;
    line-height: 1.5;
}

.rated-history-card {
    background: white;
    border: 1px solid #e9ecef;
    border-left: 4px solid #f97316;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.rated-history-card h3 {
    font-size: 14px;
    font-weight: 900;
    color: #343a40;
    margin-bottom: 10px;
}

.rated-history-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rated-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 7px 9px;
    border-radius: 7px;
    font-weight: 700;
}

.rated-history-item.win {
    color: #2f9e44;
    background: #f3faf5;
}

.rated-history-item.lose {
    color: #e03131;
    background: #fff5f5;
}

.rated-no-history {
    font-size: 13px;
    color: #868e96;
    line-height: 1.7;
    padding: 8px 0;
}

.rated-history-summary {
    font-size: 13px;
    font-weight: 800;
    color: #495057;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 7px 9px;
    margin-bottom: 8px;
}

.rated-search-status {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #e03131;
    font-style: italic;
    margin-bottom: 12px;
    min-height: 20px;
}

.rated-opponent-area {
    background: white;
    border: 2px solid #e03131;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 70%);
}

.rated-opponent-found-label {
    font-size: 13px;
    font-weight: 700;
    color: #e03131;
    margin-bottom: 10px;
}

.rated-opponent-card {
    background: white;
    border: 1px solid #ffc9c9;
    border-radius: 8px;
    padding: 12px;
}

.rated-opponent-name {
    font-size: 18px;
    font-weight: 900;
    color: #343a40;
    margin-bottom: 4px;
}

.rated-opponent-rate {
    font-size: 14px;
    font-weight: 700;
    color: #e03131;
    margin-bottom: 3px;
}

.rated-opponent-style {
    font-size: 12px;
    color: #495057;
    margin-bottom: 8px;
}

.rated-rate-diff {
    font-size: 13px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 6px;
    line-height: 1.6;
}

.rated-tier-label {
    font-size: 12px;
    color: #868e96;
    font-weight: 600;
}

.rated-opponent-comment {
    font-size: 12px;
    color: #e03131;
    font-style: italic;
}

.rated-battle-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rated-find-btn {
    background: linear-gradient(135deg, #e03131 0%, #c92a2a 100%);
}

.rated-find-btn:hover {
    background: linear-gradient(135deg, #c92a2a 0%, #b02020 100%);
}

.rated-start-btn {
    background: linear-gradient(135deg, #2f9e44 0%, #2b8a3e 100%);
}

.rated-start-btn:hover {
    background: linear-gradient(135deg, #2b8a3e 0%, #237032 100%);
}

.rated-find-another-btn {
    background: linear-gradient(135deg, #e67700 0%, #d9480f 100%);
}

.rated-find-another-btn:hover {
    background: linear-gradient(135deg, #d9480f 0%, #c0390a 100%);
}

/* ==========================================================
   TOP画面（未ログイン時・ログアウト後のみ表示）
   ========================================================== */

.top-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #050510;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.top-screen-inner {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100%;
}

.top-hero-image {
    width: 100%;
    height: 100vh;
    height: 100svh;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.top-screen-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 16px 28px;
    pointer-events: none;
}

.start-button {
    pointer-events: auto;
    width: min(86%, 360px);
    padding: 16px 24px;
    border: 0;
    border-radius: 999px;
    font-size: 1.25rem;
    font-weight: 900;
    color: #111;
    background: linear-gradient(180deg, #ffe66d, #ffb000);
    box-shadow: 0 0 24px rgba(255, 190, 0, 0.65);
    cursor: pointer;
    transition: transform 0.1s ease;
}

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

@media (min-width: 600px) {
    .top-hero-image {
        height: 100vh;
        object-position: center center;
    }
}

/* ==========================================================
   レート戦バトル演出画面
   ========================================================== */

.rated-anim-section {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ヘッダー：モード名・対戦相手情報 */
.rata-header {
    text-align: center;
}

.rata-header h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: #1565c0;
}

.rata-matchup-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

.rata-vs {
    color: #e53935;
    font-size: 0.85rem;
    font-weight: 700;
}

.rata-matchup-rates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    font-size: 0.78rem;
    color: #546e7a;
    margin-top: 2px;
}

/* スコアボード */
.rata-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #1565c0;
    border-radius: 14px;
    padding: 14px 20px;
    color: #fff;
}

.rata-score-col {
    text-align: center;
    min-width: 56px;
}

.rata-score-num {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
    transition: transform 0.2s ease;
}

.rata-score-num.score-pop {
    animation: rataPop 0.35s ease;
}

@keyframes rataPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.5); color: #ffe066; }
    100% { transform: scale(1); }
}

.rata-score-sep {
    font-size: 2rem;
    font-weight: 700;
    opacity: 0.7;
}

.rata-score-label {
    font-size: 0.68rem;
    font-weight: 700;
    opacity: 0.8;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* キャラクターステージ */
.rata-stage {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    min-height: 160px;
    background: linear-gradient(180deg, #f0f8ff, #e8f5e9);
    border-radius: 14px;
    border: 2px solid #cfd8dc;
    padding: 16px 10px 10px;
}

.rata-character-col {
    text-align: center;
    width: 44%;
}

/* 画像ベースのキャラクターボックス */
.rata-char-box {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.rata-char-img {
    width: 130px;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.2s ease, filter 0.2s ease;
}

/* 相手側は左右反転 */
.rata-char-box.opponent-side .rata-char-img {
    transform: scaleX(-1);
}

/* 得点時アニメーション */
.rata-char-box.anim-score .rata-char-img {
    transform: translateX(14px) translateY(-4px) scale(1.12);
    filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 180, 0, 0.7));
}

.rata-char-box.opponent-side.anim-score .rata-char-img {
    transform: scaleX(-1) translateX(14px) translateY(-4px) scale(1.12);
}

/* スキル発動時アニメーション */
.rata-char-box.anim-skill .rata-char-img {
    transform: translateY(-18px) scale(1.28);
    filter: brightness(1.45) drop-shadow(0 0 14px rgba(255, 235, 59, 0.95));
}

.rata-char-box.opponent-side.anim-skill .rata-char-img {
    transform: scaleX(-1) translateY(-18px) scale(1.28);
}

/* 失点時アニメーション */
.rata-char-box.anim-lose-point .rata-char-img {
    transform: translateY(6px) scale(0.94);
    filter: brightness(0.9) saturate(0.85);
}

.rata-char-box.opponent-side.anim-lose-point .rata-char-img {
    transform: scaleX(-1) translateY(6px) scale(0.94);
}

/* 勝利アニメーション */
.rata-char-box.anim-win .rata-char-img {
    transform: translateY(-20px) scale(1.1);
    filter: brightness(1.15) drop-shadow(0 0 8px rgba(255, 215, 0, 0.7));
}

.rata-char-box.opponent-side.anim-win .rata-char-img {
    transform: scaleX(-1) translateY(-20px) scale(1.1);
}

/* レート戦勝利ジャンプアニメーション */
@keyframes rataWinBounce {
    0%   { transform: translateY(-20px) scale(1.1); }
    20%  { transform: translateY(-44px) scale(1.18); }
    40%  { transform: translateY(-20px) scale(1.1); }
    60%  { transform: translateY(-38px) scale(1.15); }
    80%  { transform: translateY(-20px) scale(1.1); }
    90%  { transform: translateY(-30px) scale(1.12); }
    100% { transform: translateY(-20px) scale(1.1); }
}

@keyframes rataWinBounceFlip {
    0%   { transform: scaleX(-1) translateY(-20px) scale(1.1); }
    20%  { transform: scaleX(-1) translateY(-44px) scale(1.18); }
    40%  { transform: scaleX(-1) translateY(-20px) scale(1.1); }
    60%  { transform: scaleX(-1) translateY(-38px) scale(1.15); }
    80%  { transform: scaleX(-1) translateY(-20px) scale(1.1); }
    90%  { transform: scaleX(-1) translateY(-30px) scale(1.12); }
    100% { transform: scaleX(-1) translateY(-20px) scale(1.1); }
}

.rata-char-box.anim-win-strong .rata-char-img {
    animation: rataWinBounce 0.7s ease-in-out 3 forwards;
    filter: brightness(1.3) drop-shadow(0 0 14px rgba(255, 215, 0, 0.9));
}

.rata-char-box.opponent-side.anim-win-strong .rata-char-img {
    animation: rataWinBounceFlip 0.7s ease-in-out 3 forwards;
    filter: brightness(1.3) drop-shadow(0 0 14px rgba(255, 215, 0, 0.9));
}

/* 敗北アニメーション */
.rata-char-box.anim-lose .rata-char-img {
    transform: translateY(16px) scale(0.9);
    filter: grayscale(0.45) brightness(0.8);
}

.rata-char-box.opponent-side.anim-lose .rata-char-img {
    transform: scaleX(-1) translateY(16px) scale(0.9);
}

/* ログエリア */
.rata-log-area {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 14px 16px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rata-log-text {
    font-size: 0.88rem;
    color: #343a40;
    text-align: center;
    line-height: 1.5;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* 試合結果エリア */
.rata-result-area {
    text-align: center;
    padding: 10px;
}

.rata-result-text {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.rata-result-win {
    color: #e53935;
    text-shadow: 0 0 12px rgba(229, 57, 53, 0.4);
}

.rata-result-lose {
    color: #546e7a;
}

.rata-final-score {
    font-size: 1rem;
    font-weight: 700;
    color: #37474f;
    margin-bottom: 6px;
}

.rata-rate-change {
    font-size: 1rem;
    font-weight: 700;
}

.rata-rate-up {
    color: #e53935;
}

.rata-rate-down {
    color: #1e88e5;
}

/* スキップ・結果ボタン */
.rata-buttons {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rata-result-btn {
    min-width: 160px;
    font-size: 0.9rem;
}

.rata-skip-btn {
    min-width: 120px;
    font-size: 0.82rem;
    background: #78909c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    cursor: pointer;
    opacity: 0.85;
}

.rata-skip-btn:hover {
    opacity: 1;
    background: #546e7a;
}

/* 格上撃破メッセージ */
.rata-upset-message {
    font-size: 1.05rem;
    font-weight: 900;
    color: #f57f17;
    text-shadow: 0 0 10px rgba(245, 127, 23, 0.5);
    margin-bottom: 6px;
    animation: upsetPulse 0.6s ease-in-out 2;
}

@keyframes upsetPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

@media (max-width: 600px) {
    .rata-score-num {
        font-size: 2rem;
    }

    .rata-stage {
        min-height: 130px;
    }

    .rata-char-img {
        width: 100px;
    }
}

/* ==========================================================
   スキルバッジ（対戦開始画面・相手スキル表示）
   ========================================================== */

.skill-badge {
    display: inline-block;
    background: #d3f9d8;
    color: #087f5b;
    border: 1px solid #8ce99a;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin: 2px 2px;
}

.skill-equipped-badge {
    display: inline-block;
    background: #20c997;
    color: white;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}

/* 試合前スキルカード設定エリア */
.pre-battle-skill-area {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.pre-battle-skill-area h3 {
    font-size: 14px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 10px;
}

/* CPUスキル表示 */
.bs-skills-label {
    font-size: 11px;
    color: #868e96;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bs-skills-summary {
    font-size: 12px;
    color: #495057;
    background: #f8f9fa;
    border-radius: 5px;
    padding: 6px 8px;
    line-height: 1.8;
    word-break: break-all;
}

/* 相手スキル表示エリア（レート対戦） */
.rated-opponent-skills-area {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0d0d0;
}

.rated-opp-skills-label {
    font-size: 11px;
    color: #868e96;
    font-weight: 600;
    margin-bottom: 4px;
}

.rated-opp-skills-list {
    font-size: 12px;
    color: #495057;
    line-height: 1.8;
}

/* ランダムスキル獲得ボタン */
.skill-acquire-row {
    margin-bottom: 12px;
}

.skill-acquire-btn {
    width: 100%;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, #845ef7, #5c7cfa);
}

.skill-acquire-btn:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(92, 124, 250, 0.4);
}

.skill-acquire-btn:disabled {
    filter: grayscale(100%);
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* 対戦前スキル選択プロンプト */
.pre-battle-skill-prompt {
    font-size: 13px;
    font-weight: 700;
    color: #e03131;
    margin-bottom: 8px;
}

.pre-battle-skill-prompt.fulfilled {
    color: #2f9e44;
}

/* 対戦前スキル選択チップ */
.pre-battle-skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-select-chip {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #ced4da;
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #495057;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.skill-select-chip.selected {
    background: #20c997;
    border-color: #20c997;
    color: white;
}

.skill-select-chip:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

/* プレリリース版で一時的に非表示にするUI要素 */
.pre-release-hidden {
    display: none;
}

/* ==========================================================
   プレリリース版: バッジ・ログイン注意文
   ========================================================== */

.pre-release-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #f97316;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: 999px;
    padding: 3px 8px;
    margin-top: 6px;
    margin-bottom: 6px;
}

.login-warning-note {
    font-size: 12px;
    color: #868e96;
    line-height: 1.6;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 12px;
}

/* ==========================================================
   戦型別ステータス上限 - ステータス一覧表示
   ========================================================== */

.stat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.stat-row {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 10px 12px;
}

.stat-row-header {
    display: grid;
    grid-template-columns: 42px 1fr auto auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.stat-bar-area {
    width: 100%;
    height: 10px;
    background: transparent;
}

.stat-bar-cap {
    height: 100%;
    background: #e0e0e0;
    border-radius: 999px;
    overflow: hidden;
}

.stat-code {
    font-size: 12px;
    font-weight: 900;
    color: #667eea;
    letter-spacing: 0.08em;
}

.stat-name {
    font-size: 13px;
    font-weight: 700;
    color: #343a40;
}

.stat-number {
    font-size: 13px;
    font-weight: 800;
    color: #343a40;
}

.stat-trait {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    white-space: nowrap;
}

.trait-very-good {
    color: #c92a2a;
    background: #fff5f5;
    border: 1px solid #ffc9c9;
}

.trait-good {
    color: #e67700;
    background: #fff9db;
    border: 1px solid #ffe066;
}

.trait-normal {
    color: #495057;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
}

.trait-weak {
    color: #1971c2;
    background: #e7f5ff;
    border: 1px solid #a5d8ff;
}

.trait-very-weak {
    color: #5f3dc4;
    background: #f3f0ff;
    border: 1px solid #d0bfff;
}

/* ==========================================================
   育成完成カード
   ========================================================== */

.training-complete-card {
    background: linear-gradient(135deg, #fff4e6, #fff);
    border: 2px solid #ff922b;
    border-radius: 12px;
    padding: 14px;
    margin: 12px 0;
    text-align: center;
}

.training-complete-card h3 {
    font-size: 17px;
    font-weight: 900;
    color: #d9480f;
    margin-bottom: 8px;
}

.training-complete-card p {
    font-size: 13px;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 10px;
}

.training-complete-rate-btn {
    background: linear-gradient(135deg, #ff922b, #fd7e14);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.training-complete-rate-btn:hover {
    opacity: 0.9;
}

/* データ画面ステータスセクション */
.data-stats-section {
    border-left-color: #667eea;
}


/* ============================================================
   複数選手管理 UI
   ============================================================ */

/* ホーム画面: 現在の選手セクション */
.home-character-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}

.home-character-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.home-character-title {
    margin: 0;
    font-size: 0.85rem;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.home-character-active-badge {
    background: #00b4d8;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.home-character-info {
    margin-bottom: 12px;
}

.home-character-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e2e8f0;
    margin-bottom: 2px;
}

.home-character-style {
    font-size: 0.9rem;
    color: #90cdf4;
    margin-bottom: 6px;
}

.home-character-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #a0aec0;
}

.home-char-sep {
    color: #4a5568;
}

.home-character-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.home-char-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #4a5568;
    background: #2d3748;
    color: #e2e8f0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.home-char-btn:hover:not(:disabled) {
    background: #4a5568;
    border-color: #90cdf4;
}

.home-char-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.home-char-btn-new {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-color: #00b4d8;
    color: #90cdf4;
}

.home-char-btn-new:hover:not(:disabled) {
    background: linear-gradient(135deg, #1a4a7c 0%, #0f3460 100%);
}

/* 選手一覧モーダル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.character-list-modal {
    padding: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #0f3460;
    position: sticky;
    top: 0;
    background: #1a1a2e;
    z-index: 1;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #e2e8f0;
}

.modal-close-btn {
    background: none;
    border: 1px solid #4a5568;
    color: #a0aec0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: #4a5568;
    color: #e2e8f0;
}

.modal-body {
    padding: 16px;
}

.character-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.character-list-empty {
    text-align: center;
    color: #a0aec0;
    padding: 20px;
}

.character-card {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 14px;
    position: relative;
    transition: border-color 0.2s;
}

.character-card-active {
    border-color: #00b4d8;
    box-shadow: 0 0 0 1px #00b4d8;
}

.character-active-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00b4d8;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.character-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.character-card-header .style-mini-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.character-card-info {
    flex: 1;
}

.character-card-name {
    font-size: 1rem;
    font-weight: bold;
    color: #e2e8f0;
}

.character-card-style {
    font-size: 0.8rem;
    color: #90cdf4;
}

.character-card-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 4px;
}

.char-sep {
    color: #4a5568;
}

.character-card-record {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 4px;
}

.character-card-statline {
    font-size: 0.75rem;
    color: #718096;
    font-family: monospace;
    margin-bottom: 10px;
}

.character-select-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #00b4d8;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #90cdf4;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.character-select-btn:hover {
    background: linear-gradient(135deg, #1a4a7c 0%, #0f3460 100%);
    color: #e2e8f0;
}

.character-in-use {
    text-align: center;
    color: #00b4d8;
    font-size: 0.85rem;
    padding: 8px;
    border: 1px dashed #00b4d8;
    border-radius: 8px;
}

/* 新規選手作成オーバーレイ - setup-overlayのスタイルを再利用 */
.setup-btn-cancel {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #4a5568;
    background: transparent;
    color: #a0aec0;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.setup-btn-cancel:hover {
    background: #2d3748;
    color: #e2e8f0;
}
