/* ============================================
    전투 화면 (배틀 UI, 카드, 액션바, 로그, 패널)
    ============================================ */

/* 전투 화면 main 요소 오버라이드 */
#combat-screen {
    padding: 0 !important;
}

main #combat-screen {
    padding: 0 !important;
}

/* 전투 화면 전체 레이아웃 */
.combat-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* 전투 헤더 (배지, 턴 정보) */
.combat-header-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    color: #4a5568;
    transition: all 0.2s ease;
}

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

.battle-badge .label {
    font-size: 0.85em;
    color: #718096;
    margin-bottom: 4px;
}

.battle-badge .value {
    font-size: 1.3em;
    color: #667eea;
    font-weight: 700;
}

/* 전투 메인 컨테이너 */
.combat-columns {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    width: 100%;
}

/* 좌측 메인 래퍼 */
.combat-main { display: flex; flex-direction: column; gap: 16px; }

/* 캐릭터 표시(팀 카드)
   NOTE: 고정(sticky)은 로그 가시성을 크게 떨어뜨려 기본값에서는 해제합니다. */
.team-cards-row {
    position: static;
}

/* 우측 사이드(실시간)도 고정 해제 (스크롤 자연스럽게) */
.combat-side {
    position: static;
}

/* 팀 카드들 행 */
.team-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.team-card-title {
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 8px;
}

.team-card.team-hero .team-card-title { color: var(--team-hero); }
.team-card.team-gov .team-card-title { color: var(--team-gov); }
.team-card.team-villain .team-card-title { color: var(--team-villain); }

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

/* 팀 카드 */
.team-card {
    background: white;
    border: 2px solid #e3e6f0;
    border-radius: 16px;
    padding: 10px;
    transition: all 0.2s ease;
}

/* 3팀 컬러(라이트/다크 공통 변수 기반) */
.team-card.team-hero { border-left: 4px solid var(--team-hero); }
.team-card.team-gov { border-left: 4px solid var(--team-gov); }
.team-card.team-villain { border-left: 4px solid var(--team-villain); }

.team-card.team-hero:hover {
    border-color: var(--team-hero);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.team-card.team-gov:hover {
    border-color: var(--team-gov);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.14);
}

.team-card.team-villain:hover {
    border-color: var(--team-villain);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.14);
}

.team-card.team-a {
    border-left: 4px solid #667eea;
}

.team-card.team-a:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.team-card.team-b {
    border-left: 4px solid #e53e3e;
}

.team-card.team-b:hover {
    border-color: #e53e3e;
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.15);
}

.team-label {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-card.team-a .team-label {
    color: #667eea;
}

.team-card.team-b .team-label {
    color: #e53e3e;
}

/* 전투 캐릭터 카드 */
.combat-char-card {
    background: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;

}

.combat-char-card.is-current {
    border-color: rgba(49, 130, 206, 0.65);
    box-shadow: 0 6px 18px rgba(49, 130, 206, 0.18);
}

.combat-char-card.is-current[data-team="hero"] {
    border-color: rgba(37, 99, 235, 0.75);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
}

.combat-char-card.is-current[data-team="gov"] {
    border-color: rgba(22, 163, 74, 0.75);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.16);
}

.combat-char-card.is-current[data-team="villain"] {
    border-color: rgba(220, 38, 38, 0.75);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.16);
}

.combat-char-card.is-excluded {
    opacity: 0.55;
    filter: grayscale(1);
    border-style: dashed;
}

.combat-char-card.is-excluded .char-name {
    text-decoration: line-through;
}

.combat-char-card.is-excluded:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.combat-char-card:hover {
    border-color: #667eea;
    background: #ffffff;
}

.char-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.char-name-stat {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95em;
}

/* 실제 마크업에 사용되는 이름 클래스 */
.char-name {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1em;
}

.char-level {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

/* 태그들 */
.char-tags {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.char-tag {
    background: #eef2ff;
    color: #667eea;
    border: 1px solid #cbd5e0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
}

/* HP 행 */
.hp-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

.hp-bar-container {
    background: #e2e8f0;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
    border: 1px solid #cbd5e0;
}

.hp-bar {
    background: #e2e8f0;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.hp-bar .hp-base {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    transition: width 0.3s ease;
}

.hp-bar.has-shield {
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.hp-bar .hp-shield-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(37, 99, 235, 0.0) 0px,
        rgba(37, 99, 235, 0.0) 6px,
        rgba(37, 99, 235, 0.28) 6px,
        rgba(37, 99, 235, 0.28) 12px
    );
    pointer-events: none;
}

.shield-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(219, 234, 254, 0.95);
    border: 1px solid rgba(37, 99, 235, 0.35);
    color: #1e40af;
    font-weight: 800;
    font-size: 0.78em;
    line-height: 1.2;
}

.hp-shield-text {
    color: #1d4ed8;
    font-weight: 800;
}

.hp-text {
    font-size: 0.75em;
    font-weight: 600;
    color: #4a5568;
    text-align: right;
}

/* 스탯 행 */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 4px;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.stat-item {
    background: #f0f4ff;
    border: 1px solid #e3e6f0;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    color: #4a5568;
}

.stat-item strong {
    color: #667eea;
    display: block;
    font-size: 0.95em;
}

/* 액션 바 */
.action-bar {
    background: white;
    border-top: 2px solid #e3e6f0;
    border-radius: 0 0 16px 16px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: -20px;
}

/* 래퍼 내부 버튼을 부모 그리드에 배치 */
.action-bar .action-buttons {
    display: contents;
}

.btn-action {
    padding: 10px 8px;
    font-size: 0.85em;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e3e6f0;
}

.btn-action.attack {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-action.attack:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-action.defend {
    background: #fbd38d;
    color: #975a16;
    border-color: #fbd38d;
}

.btn-action.defend:hover {
    background: #f6ad55;
    transform: translateY(-2px);
}

.btn-action.skill {
    background: #b19cd9;
    color: white;
    border-color: #b19cd9;
}

.btn-action.skill:hover {
    background: #9d7eb8;
    transform: translateY(-2px);
}

.btn-action.end-turn {
    background: #e53e3e;
    color: white;
    border-color: #e53e3e;
}

.btn-action.end-turn:hover {
    background: #c53030;
    transform: translateY(-2px);
}

/* 시간 종료 버튼 ID 강제 적용 */
#forfeit-button { background: #e53e3e; border-color: #e53e3e; color: #fff; }
#forfeit-button:hover { background: #c53030; border-color: #c53030; }

/* (removed) 헤더 HOME 버튼 */

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 로그 패널 */
.log-panel {
    background: #1a202c;
    color: #e2e8f0;
    border: 2px solid #2d3748;
    border-radius: 12px;
    padding: 12px;
    height: clamp(520px, 62vh, 920px);
    overflow: hidden;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

.log-header {
    font-weight: 800;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.log-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.log-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.log-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-family: 'Noto Sans KR', sans-serif;
}

.log-tool-btn {
    border: 1px solid #4a5568;
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

.log-tool-btn:hover {
    background: rgba(255,255,255,0.10);
}

.log-content {
    flex: 1;
    height: auto;
    min-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.log-separator {
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin: 10px 0;
}

.log-entry {
    margin-bottom: 6px;
    padding: 6px 8px;
    border-left: 3px solid #667eea;
    padding-left: 10px;
}

.log-time {
    display: inline-block;
    min-width: 70px;
    color: #a0aec0;
    font-size: 0.85em;
    margin-right: 6px;
}

.log-message {
    white-space: pre-wrap;
    word-break: break-word;
}

.log-entry--error .log-message { color: #fecaca; }
.log-entry--success .log-message { color: #a7f3d0; }
.log-entry--damage .log-message { color: #fca5a5; }
.log-entry--hp .log-message { color: #86efac; }
.log-entry--roll .log-message { color: #e9d5ff; }
.log-entry--defense .log-message { color: #67e8f9; }
.log-entry--action .log-message { color: #93c5fd; }
.log-entry--info .log-message { color: #e2e8f0; }

/* ===== 로그 그룹(행동 단위 블럭) ===== */
.log-group {
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}

.log-group__header {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 10px 10px;
    cursor: pointer;
}

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

.log-group__chevron {
    width: 18px;
    display: inline-flex;
    justify-content: center;
    color: rgba(226,232,240,0.9);
    transform: rotate(0deg);
    transition: transform 0.15s ease;
}

.log-group__title {
    font-weight: 900;
    font-family: 'Noto Sans KR', sans-serif;
    letter-spacing: -0.2px;
}

.log-group__meta {
    margin-left: auto;
    font-size: 12px;
    color: rgba(226,232,240,0.75);
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 800;
}

.log-group__preview {
    margin-top: 6px;
    color: rgba(226,232,240,0.78);
    font-size: 12px;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    line-height: 1.35;
}

.log-group__body {
    padding: 0 10px 10px;
}

.log-group.is-collapsed .log-group__body {
    display: none;
}

.log-group.is-collapsed .log-group__chevron {
    transform: rotate(-90deg);
}

.log-group--fail { border-color: rgba(239, 68, 68, 0.35); }
.log-group--pending { border-color: rgba(96, 165, 250, 0.35); }
.log-group--resolved { border-color: rgba(34, 197, 94, 0.28); }

.log-entry {
    margin-bottom: 6px;
    padding: 6px 8px;
    border-left: 3px solid #667eea;
    padding-left: 10px;
}

.log-entry.damage {
    border-left-color: #e53e3e;
}

.log-entry.defense {
    border-left-color: #fbd38d;
}

.log-entry.heal {
    border-left-color: #48bb78;
}

.log-entry.info {
    border-left-color: #667eea;
}

.log-timestamp {
    color: #a0aec0;
    font-size: 0.85em;
}

/* 실시간 패널 (오른쪽 사이드) */
.combat-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.realtime-panel {
    background: white;
    border: 2px solid #e3e6f0;
    border-radius: 12px;
    padding: 16px;
}

.realtime-title {
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 12px;
    font-size: 0.95em;
}

.realtime-clock {
    background: #f8f9fc;
    border: 2px solid #e3e6f0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.clock-time {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.clock-date {
    font-size: 0.85em;
    color: #718096;
    margin-top: 4px;
}

/* 참여 캐릭터별 스킬 상태(우측 패널) */
.realtime-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.skill-block-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-detail-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.skill-detail-label {
    color: #718096;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
}

.skill-detail-value {
    color: #2c3e50;
    font-weight: 700;
    text-align: right;
}

.skill-uses {
    font-family: 'Courier New', monospace;
}

.skill-uses.is-locked {
    color: #c53030;
}

/* 스킬 블록 */
.skill-block {
    background: #f8f9fc;
    border: 2px solid #e3e6f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.skill-block-title {
    font-weight: 700;
    color: #4a5568;
    font-size: 0.85em;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3e6f0;
}

.skill-block-body {
    font-size: 0.9em;
    color: #2c3e50;
    line-height: 1.6;
}

.skill-block-body.placeholder {
    color: #a0aec0;
    font-style: italic;
}

.skill-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
}

.skill-icon {
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.skill-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.skill-name {
    color: #4a5568;
    font-weight: 600;
}

.skill-value {
    color: #667eea;
    font-weight: 700;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 타겟 패널 */
.target-panel {
    background: #f8f9fc;
    border: 2px solid #e3e6f0;
    border-radius: 12px;
    padding: 12px;
}

/* (레거시) 타겟 선택 안내 문구는 UI에서 제거 */
#target-selection > p {
    display: none;
}

.turn-order-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #4a5568;
    line-height: 1.4;
}

.turn-order-hint .turn-order-title {
    font-weight: 800;
    color: #2c3e50;
}

.turn-order-hint .turn-order-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.65);
    margin-right: 6px;
    margin-top: 6px;
}

.turn-order-hint .turn-order-item.is-current {
    border-color: rgba(49, 130, 206, 0.55);
    background: rgba(49, 130, 206, 0.10);
    color: #1a365d;
}

.turn-order-hint .turn-order-idx {
    font-weight: 800;
    color: #2d3748;
}

.turn-order-hint .turn-order-agi {
    font-weight: 800;
    color: #14532d;
}

.target-title {
    font-weight: 700;
    color: #4a5568;
    font-size: 0.85em;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3e6f0;
}

.target-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.target-option {
    background: white;
    border: 2px solid #e3e6f0;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85em;
    color: #4a5568;
}

.target-option:hover {
    border-color: #667eea;
    background: #eef2ff;
}

.target-option.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 중앙 전투 영역 */
.combat-center {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   방어자 응답 선택 모달 (회피/반격/PASS)
   ============================================ */

.defense-response-modal .modal-content {
    max-width: 560px;
    width: min(560px, calc(100% - 28px));
}

.defense-response-modal .defense-response-header {
    padding-top: 18px;
    padding-bottom: 18px;
}

.defense-response-modal .defense-response-title {
    font-family: 'Gaegu', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: 0.5px;
    color: #3b5bdb;
}

.defense-response-modal .defense-response-banner {
    background: #3a3a3a;
    color: #ffffff;
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.defense-response-modal .defense-response-banner__line {
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
}

.defense-response-modal .defense-response-banner__who {
    color: #ffffff;
}

.defense-response-modal .defense-response-banner__grade {
    color: #22c55e;
    font-weight: 900;
}

.defense-response-modal .defense-response-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.defense-response-modal .dr-btn {
    appearance: none;
    border: none;
    border-radius: 6px;
    padding: 14px 10px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.1;
    transition: transform 0.08s ease, filter 0.15s ease;
}

.defense-response-modal .dr-btn:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.defense-response-modal .dr-btn:active {
    transform: translateY(0);
}

.defense-response-modal .dr-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.45);
}

.defense-response-modal .dr-btn--counter {
    background: linear-gradient(90deg, #f2e85e, #f1a33c);
    color: #111827;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
}

.defense-response-modal .dr-btn--dodge {
    background: linear-gradient(90deg, #6b88ff, #7a66ff);
}

.defense-response-modal .dr-btn--pass {
    background: linear-gradient(90deg, #ff3b3b, #ff2d86);
}

.defense-response-modal .dr-btn--defense-skill {
    background: linear-gradient(90deg, #22c55e, #2bb6a4);
}

.defense-response-modal .defense-response-footnote {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e3e6f0;
    display: grid;
    gap: 6px;
}

.defense-response-modal .defense-response-footnote__hint {
    color: #718096;
    font-size: 12.5px;
    line-height: 1.4;
}

/* ============================================
   턴 스킵 안내 모달
   ============================================ */

.skip-turn-modal .modal-content {
    max-width: 420px;
    width: min(420px, calc(100% - 28px));
}

.skip-turn-modal .modal-header h2 {
    color: #667eea;
    font-size: 1.2em;
}

.skip-turn-modal .skip-turn-text {
    font-size: 1.05em;
    font-weight: 900;
    color: #2d3748;
    padding: 12px 14px;
    border-radius: 12px;
    background: #edf2ff;
    border: 1px solid #c3dafe;
}

.skip-turn-modal .skip-turn-note {
    margin-top: 10px;
    font-size: 0.9em;
    color: #718096;
}

@media (max-width: 820px) {
    .defense-response-modal .defense-response-title {
        font-size: 26px;
    }

    .defense-response-modal .defense-response-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 460px) {
    .defense-response-modal .defense-response-buttons {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   스킬 대상 선택 모달
   ============================================ */

.skill-target-modal .modal-content {
    width: min(640px, calc(100% - 28px));
}

.skill-target-subtitle {
    margin: 0 0 12px 0;
    color: #4a5568;
    font-size: 15px;
    line-height: 1.5;
}

.skill-target-support-mode {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid #e3e6f0;
    border-radius: 10px;
    background: #f8f9fc;
    margin: 0 0 12px 0;
}

.skill-target-support-title {
    font-weight: 900;
    color: #2c3e50;
    margin-right: 6px;
}

.skill-target-support-option {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font-weight: 800;
    color: #4a5568;
}

.skill-target-support-basic-mode {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px dashed #e3e6f0;
}

.skill-target-support-cancel-kind {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px dashed #e3e6f0;
}

.skill-target-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.skill-target-group {
    border: 1px solid #e3e6f0;
    border-radius: 12px;
    padding: 12px;
    background: #f8f9fc;
}

.skill-target-group-title {
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.skill-target-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.skill-target-btn {
    appearance: none;
    border: 2px solid #e3e6f0;
    background: #ffffff;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.skill-target-btn:hover {
    border-color: #667eea;
    transform: translateY(-1px);
}

.skill-target-btn:active {
    transform: translateY(0);
}

.skill-target-btn.is-selected {
    border-color: #667eea;
    background: #eef2ff;
}

.skill-target-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.skill-target-btn-name {
    font-weight: 800;
    color: #2c3e50;
    font-size: 16px;
}

.skill-target-btn-hp {
    font-size: 14px;
    color: #718096;
    white-space: nowrap;
}

.skill-target-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.skill-target-note {
    margin-top: 10px;
    font-size: 13px;
    color: #718096;
    line-height: 1.45;
}

@media (max-width: 520px) {
    .skill-target-buttons {
        grid-template-columns: 1fr;
    }
}

/* 반응형 레이아웃 */
@media (max-width: 1200px) {
    .combat-columns {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .combat-shell {
        padding: 12px;
        gap: 12px;
    }
    
    .team-cards-row {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .btn-action {
        padding: 12px;
        font-size: 0.85em;
    }
    
    .log-panel {
        height: clamp(360px, 52vh, 640px);
    }
    
    .combat-header-row {
        grid-template-columns: 1fr 1fr;
    }
}
