/* ============================================================
   이벤트 레이드 전용 스타일 v3
   - 슬롯머신 릴 애니메이션
   - 루드라 신청 카드 스타일 파티 카드
   ============================================================ */

/* ── 루트 ─────────────────────────────────────────────────── */
.er-root {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 40px;
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, sans-serif;
}

/* ── 헤더 ─────────────────────────────────────────────────── */
.er-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}
.er-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.er-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 12px;
}
.er-header-title { display: flex; align-items: center; gap: 14px; }
.er-crown {
    font-size: 36px;
    filter: drop-shadow(0 0 14px rgba(255,200,50,.85));
    animation: er-crown-pulse 2.2s ease-in-out infinite;
}
@keyframes er-crown-pulse {
    0%, 100% { transform: scale(1) rotate(-4deg); }
    50%       { transform: scale(1.12) rotate(4deg); }
}
.er-title-text {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 20px rgba(102,126,234,.6);
}
.er-subtitle { margin: 0; font-size: 12px; color: rgba(255,255,255,.55); }

/* ── 헤더 스탯 ─────────────────────────────────────────────── */
.er-header-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.er-stat-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
    border-radius: 20px; padding: 6px 14px; color: #fff;
    font-size: 13px; font-weight: 700; backdrop-filter: blur(6px);
}
.er-stat-badge span:first-child  { font-size: 18px; }
.er-stat-badge span:nth-child(2) { font-size: 20px; font-weight: 800; color: #fbbf24; }
.er-stat-label { font-size: 12px; color: rgba(255,255,255,.7); }
.er-stat-party  span:nth-child(2)  { color: #60a5fa; }
.er-stat-support span:nth-child(2) { color: #f97316; }

/* ── 2열 본문 ─────────────────────────────────────────────── */
.er-body {
    display: grid;
    grid-template-columns: 390px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 880px) {
    .er-body { grid-template-columns: 1fr; }
    .er-header-inner { flex-direction: column; align-items: flex-start; }
}

/* ── 패널 공통 ────────────────────────────────────────────── */
.er-panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(102,126,234,.07);
    border: 1px solid #e8eaf6;
    overflow: hidden;
}
.er-panel-head {
    display: flex; align-items: center; gap: 8px;
    padding: 13px 16px;
    background: linear-gradient(135deg, #f8f9ff, #eef0ff);
    border-bottom: 1px solid #e8eaf6;
}
.er-panel-icon  { font-size: 18px; }
.er-panel-title { margin: 0; font-size: 14px; font-weight: 700; color: #2d3748; flex: 1; }
.er-head-actions { display: flex; gap: 6px; }

/* ── 참가 신청 폼 ─────────────────────────────────────────── */
.er-join-form    { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.er-form-label   { font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; }

/* ── 검색 ─────────────────────────────────────────────────── */
.er-search-wrap  { position: relative; }
.er-search-icon  { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; pointer-events: none; }
.er-search-input {
    width: 100%; padding: 9px 10px 9px 32px;
    border: 1.5px solid #e5e7eb; border-radius: 10px; font-size: 13px;
    outline: none; transition: border-color .2s; box-sizing: border-box; background: #fafafa;
}
.er-search-input:focus { border-color: #667eea; background: #fff; }

/* ── 멤버 목록 ────────────────────────────────────────────── */
.er-member-list {
    max-height: 320px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 3px;
}
.er-member-list::-webkit-scrollbar       { width: 4px; }
.er-member-list::-webkit-scrollbar-track { background: #f1f5f9; }
.er-member-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.er-member-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 9px;
    border: 1.5px solid transparent; cursor: pointer;
    transition: all .15s; background: #f9fafb;
}
.er-member-item:hover:not(.er-member-done) { border-color: var(--jc,#667eea); background: #fff; transform: translateX(3px); box-shadow: 0 2px 10px rgba(102,126,234,.12); }
.er-member-item.er-member-selected { border-color: var(--jc,#667eea); background: linear-gradient(135deg,#fff,#f0f4ff); box-shadow: 0 2px 14px rgba(102,126,234,.18); transform: translateX(3px); }
.er-member-item.er-member-done     { opacity: .5; cursor: default; background: #f0fdf4; }
.er-member-job-icon { font-size: 18px; flex-shrink: 0; }
.er-member-info     { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.er-member-nick     { font-size: 13px; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-member-job      { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.er-member-right    { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.er-member-power        { font-size: 11px; color: #94a3b8; font-weight: 600; }
.er-member-badge-done   { font-size: 10px; color: #10b981; font-weight: 700; background: #d1fae5; padding: 1px 6px; border-radius: 8px; }

/* ── 서포터 배지 ──────────────────────────────────────────── */
.er-support-badge { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 6px; display: inline-block; line-height: 1.4; vertical-align: middle; }
.er-badge-hobeop  { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
.er-badge-chiyu   { background: #fdf2f8; color: #9d174d; border: 1px solid #f9a8d4; }
.er-badge-tank    { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.er-badge-guard   { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }

/* ── 선택된 멤버 카드 ──────────────────────────────────────── */
.er-selected-wrap { animation: er-fade-up .25s ease; }
.er-selected-card { padding: 11px 13px; background: linear-gradient(135deg,#f0f4ff,#e8edff); border: 1.5px solid #c7d2fe; border-radius: 11px; }

/* ── 버튼 ─────────────────────────────────────────────────── */
.er-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer;
    transition: all .2s; padding: 9px 16px; white-space: nowrap; font-family: inherit;
}
.er-btn:disabled { opacity: .42; cursor: not-allowed; transform: none !important; }
.er-btn-primary  { background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; box-shadow: 0 4px 14px rgba(102,126,234,.32); }
.er-btn-primary:not(:disabled):hover  { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(102,126,234,.48); }
.er-btn-magic {
    background: linear-gradient(135deg,#f59e0b 0%,#ef4444 50%,#8b5cf6 100%);
    background-size: 200% 200%; animation: er-magic-bg 3s ease infinite;
    color: #fff; box-shadow: 0 4px 18px rgba(239,68,68,.32); font-size: 15px; padding: 11px 26px;
}
.er-btn-magic:not(:disabled):hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 30px rgba(239,68,68,.5); }
@keyframes er-magic-bg {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.er-btn-danger { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.er-btn-danger:not(:disabled):hover { background: #dc2626; color: #fff; transform: translateY(-1px); }
.er-btn-sm     { font-size: 11px; padding: 5px 10px; border-radius: 7px; }
.er-join-btn   { width: 100%; padding: 11px; font-size: 14px; }
.er-btn-cancel { background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0; }
.er-btn-cancel:hover { background: #e2e8f0; transform: translateY(-1px); }

/* ── 메시지 ───────────────────────────────────────────────── */
.er-join-msg { font-size: 12px; font-weight: 600; text-align: center; min-height: 18px; }
.er-msg-ok   { color: #10b981; }
.er-msg-err  { color: #ef4444; }

/* ── 참가자 목록 ──────────────────────────────────────────── */
.er-participants-list {
    padding: 10px; max-height: 340px; overflow-y: auto;
}
.er-participants-list::-webkit-scrollbar       { width: 4px; }
.er-participants-list::-webkit-scrollbar-track { background: #f1f5f9; }
.er-participants-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.er-p-grid { display: flex; flex-direction: column; gap: 5px; }
.er-p-card {
    display: flex; align-items: center; gap: 7px; padding: 8px 10px;
    border-radius: 9px; background: #fff; border: 1.5px solid #e8eaf6;
    border-left: 3px solid var(--jc,#667eea); transition: all .2s;
    animation: er-slide-in .3s ease both;
}
@keyframes er-slide-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}
.er-p-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); transform: translateX(2px); }
.er-p-num  { font-size: 10px; font-weight: 700; color: #94a3b8; min-width: 16px; }
.er-p-icon { font-size: 17px; flex-shrink: 0; }
.er-p-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.er-p-nick { font-size: 13px; font-weight: 700; color: #1e293b; }
.er-p-job  { font-size: 10px; font-weight: 600; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.er-p-power { font-size: 10px; color: #94a3b8; font-weight: 600; flex-shrink: 0; }
.er-p-del   { background: none; border: none; color: #d1d5db; cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 5px; transition: all .15s; flex-shrink: 0; }
.er-p-del:hover { background: #fee2e2; color: #ef4444; }

/* ── 파티 구성 버튼 영역 ───────────────────────────────────── */
.er-party-actions {
    padding: 12px 14px; display: flex; flex-direction: column;
    align-items: center; gap: 8px; border-top: 1px solid #e8eaf6;
}
.er-build-warning {
    font-size: 12px; font-weight: 600; color: #b45309;
    background: #fffbeb; border: 1px solid #fcd34d;
    border-radius: 8px; padding: 7px 12px;
    text-align: center; width: 100%; box-sizing: border-box;
}
.er-admin-hint { font-size: 11px; color: #94a3b8; text-align: center; margin: 4px 0 0; line-height: 1.5; }

/* ── 빈 상태 ──────────────────────────────────────────────── */
.er-empty       { text-align: center; color: #94a3b8; font-size: 12px; padding: 14px; }
.er-empty-large { padding: 36px 18px; font-size: 13px; line-height: 2; }

/* ── 파티 결과 섹션 ───────────────────────────────────────── */
.er-party-result {
    margin-top: 22px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(102,126,234,.11);
    border: 1px solid #e8eaf6;
    overflow: hidden;
    animation: er-fade-up .4s ease;
}
@keyframes er-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   슬롯머신 영역
   ============================================================ */
.er-slot-section {
    padding: 30px 20px 24px;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    position: relative;
    overflow: hidden;
}
.er-slot-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(102,126,234,.35) 0%, transparent 70%);
    pointer-events: none;
}
.er-slot-title {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(249,168,22,.8);
    animation: er-slot-title-pulse 1s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
}
@keyframes er-slot-title-pulse {
    from { text-shadow: 0 0 20px rgba(249,168,22,.8); }
    to   { text-shadow: 0 0 40px rgba(249,168,22,1), 0 0 80px rgba(249,168,22,.5); }
}

/* 릴 컨테이너 */
.er-slot-reels {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* 단일 릴 */
.er-slot-reel {
    width: 150px;
    height: 56px;
    background: rgba(0,0,0,.55);
    border: 2px solid rgba(255,255,255,.15);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(102,126,234,.4), inset 0 0 12px rgba(0,0,0,.5);
}
/* 상단/하단 페이드 마스크 */
.er-slot-reel::before,
.er-slot-reel::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 16px;
    z-index: 2;
    pointer-events: none;
}
.er-slot-reel::before { top: 0;    background: linear-gradient(to bottom, rgba(0,0,0,.7), transparent); }
.er-slot-reel::after  { bottom: 0; background: linear-gradient(to top,   rgba(0,0,0,.7), transparent); }

.er-reel-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.er-reel-item {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.7);
    white-space: nowrap;
    letter-spacing: .5px;
    flex-shrink: 0;
}
.er-reel-final {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #fbbf24 !important;
    text-shadow: 0 0 12px currentColor;
    border: 1.5px solid currentColor;
    border-radius: 8px;
    background: rgba(251,191,36,.08);
    margin: 0 4px;
    height: 48px !important;
    box-shadow: 0 0 16px rgba(251,191,36,.4);
}

/* ============================================================
   파티 카드 (루드라 신청 카드 스타일)
   ============================================================ */
.er-cards-section { padding: 0; }

.er-result-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
}
.er-result-title { margin: 0; font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 0 16px rgba(102,126,234,.6); }

/* 2열 행 */
.er-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px 16px 0;
}
.er-card-row:last-child { padding-bottom: 16px; }
@media (max-width: 700px) { .er-card-row { grid-template-columns: 1fr; } }

/* ── 파티 카드 본체 (루드라 카드 스타일) ── */
.er-raid-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
    border: 1px solid rgba(0,0,0,.06);
    background: #fff;
    transition: transform .2s, box-shadow .2s;
}
.er-raid-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.14); }

/* 카드 헤더 */
.er-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #fff;
}
.er-card-header-left  { display: flex; align-items: center; gap: 10px; }
.er-card-party-icon   { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.er-card-party-name   { font-size: 16px; font-weight: 800; letter-spacing: .5px; }
.er-card-party-sub    { font-size: 11px; opacity: .8; margin-top: 2px; }
.er-card-header-right { display: flex; align-items: center; gap: 6px; }
.er-card-support-ok   { font-size: 11px; font-weight: 700; background: rgba(255,255,255,.22); padding: 3px 10px; border-radius: 20px; }
.er-card-tank-ok      { font-size: 11px; font-weight: 700; background: rgba(255,255,255,.15); padding: 3px 10px; border-radius: 20px; margin-left: 4px; }
.er-card-no-support   { font-size: 11px; font-weight: 700; color: #fef08a; background: rgba(0,0,0,.25); padding: 3px 10px; border-radius: 20px; }

/* 카드 바디 */
.er-card-body {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #fafbff;
}

/* ── 슬롯 행 (멤버 1명) ── */
.er-slot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    border-left: 3px solid var(--jc, #667eea);
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: opacity .35s ease, transform .35s ease;
}
.er-slot-row:hover { background: #f8faff; box-shadow: 0 2px 8px rgba(102,126,234,.08); }
.er-slot-empty { border-left-color: #e2e8f0; background: #f9fafb; }

/* 슬롯 번호 */
.er-slot-num {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; flex-shrink: 0;
}

/* 슬롯 아바타 */
.er-slot-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; border: 1.5px solid transparent; flex-shrink: 0;
}
.er-slot-avatar-empty { background: #f1f5f9 !important; border-color: #e2e8f0 !important; color: #94a3b8; font-size: 14px; }

/* 슬롯 정보 */
.er-slot-meta  { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.er-slot-nick  { font-size: 13px; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-slot-job   { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.er-slot-pw    { font-size: 10px; color: #94a3b8; font-weight: 600; flex-shrink: 0; white-space: nowrap; }

/* ── 애니메이션 오버레이 ───────────────────────────────────── */
.er-anim-overlay {
    position: fixed; inset: 0; z-index: 9998;
    pointer-events: none; background: transparent;
}

/* ── 이벤트 레이드 탭 버튼 ──────────────────────────────────── */
.tab-button.tab-event-raid {
    background: linear-gradient(135deg, #fff8e7, #fff0d4);
    color: #b45309;
    border: 1px solid #fcd34d;
    font-weight: 700;
}
.tab-button.tab-event-raid:hover { background: linear-gradient(135deg,#fef3c7,#fde68a); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,.22); }
.tab-button.tab-event-raid.active { background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; box-shadow: 0 4px 16px rgba(245,158,11,.4); border-color: transparent; }

/* ── 실시간 도트 ─────────────────────────────────────────── */
.er-realtime-dot { color: #10b981; font-size: 10px; margin-left: 4px; animation: er-dot-pulse 1.4s ease-in-out infinite; vertical-align: middle; }
@keyframes er-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .4; transform: scale(.7); }
}

/* ── 관리자 비밀번호 모달 ──────────────────────────────────── */
.er-modal-overlay {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(15,23,42,.65); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    animation: er-fade-up .2s ease;
}
.er-modal {
    background: #fff; border-radius: 20px; padding: 32px 28px 24px;
    width: 100%; max-width: 380px;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
    display: flex; flex-direction: column; gap: 14px;
    animation: er-modal-in .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes er-modal-in {
    from { opacity: 0; transform: scale(.88) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.er-modal-head  { display: flex; align-items: center; gap: 10px; }
.er-modal-icon  { font-size: 28px; }
.er-modal-title { margin: 0; font-size: 18px; font-weight: 800; color: #1e293b; }
.er-modal-desc  { margin: 0; font-size: 13px; color: #64748b; line-height: 1.7; text-align: center; }
.er-modal-input-wrap { position: relative; }
.er-modal-input {
    width: 100%; padding: 12px 16px;
    border: 2px solid #e5e7eb; border-radius: 12px; font-size: 16px;
    outline: none; transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box; text-align: center; letter-spacing: 4px; font-family: inherit;
}
.er-modal-input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.15); }
.er-admin-msg   { font-size: 13px; font-weight: 600; text-align: center; min-height: 18px; }
.er-modal-btns  { display: flex; gap: 10px; }
.er-modal-btns .er-btn { flex: 1; }

/* ============================================================
   레이드 그룹 컨테이너
   ============================================================ */
.er-raid-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px;
}

/* 레이드 그룹 래퍼 (파티 2개 묶음) */
.er-raid-group {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    border: 1px solid rgba(0,0,0,.07);
    background: #fff;
    transition: transform .2s, box-shadow .2s;
}
.er-raid-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(102,126,234,.13);
}

/* 레이드 그룹 헤더 */
.er-rg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 11px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 2px solid rgba(102,126,234,.3);
}
.er-rg-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .5px;
}
.er-rg-icon { font-size: 18px; filter: drop-shadow(0 0 6px rgba(255,200,0,.6)); }
.er-rg-sub  { font-size: 12px; color: rgba(255,255,255,.55); font-weight: 500; margin-left: 4px; }
.er-rg-badges { display: flex; gap: 8px; align-items: center; }
.er-rg-party-dot {
    width: 12px; height: 12px; border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
    display: inline-block;
}

/* 레이드 그룹 바디 (파티 카드 2열) */
.er-rg-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #f8faff;
}
.er-rg-body .er-raid-card {
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-right: 1px solid #e8edf5;
    background: #fff;
}
.er-rg-body .er-raid-card:last-child { border-right: none; }
@media (max-width: 680px) {
    .er-rg-body { grid-template-columns: 1fr; }
    .er-rg-body .er-raid-card { border-right: none; border-bottom: 1px solid #e8edf5; }
    .er-rg-body .er-raid-card:last-child { border-bottom: none; }
}

/* 카드 배지 (서포터/탱커 상태) */
.er-card-badge-ok {
    font-size: 11px; font-weight: 700;
    background: rgba(255,255,255,.22);
    padding: 3px 9px; border-radius: 20px;
    color: #fff;
    white-space: nowrap;
}
.er-card-badge-warn {
    font-size: 11px; font-weight: 700;
    background: rgba(0,0,0,.25);
    padding: 3px 9px; border-radius: 20px;
    color: #fef08a;
    white-space: nowrap;
}

/* ============================================================
   편집 버튼
   ============================================================ */
.er-btn-edit {
    background: linear-gradient(135deg, #f0f4ff, #e8efff);
    color: #4f46e5;
    border: 1.5px solid #c7d2fe;
    font-weight: 700;
}
.er-btn-edit:hover {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(79,70,229,.18);
}
.er-btn-edit-on {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 12px rgba(16,185,129,.35) !important;
}
.er-btn-edit-on:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* ============================================================
   드래그드롭 편집 모드
   ============================================================ */
/* 편집 모드 활성화된 레이드 그룹 */
.er-raid-group.er-edit-active {
    border: 2px solid #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,.15), 0 4px 24px rgba(0,0,0,.10);
}
.er-raid-group.er-edit-active .er-rg-header {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
    border-bottom: 2px solid #6366f1;
}

/* 편집 레이블 */
.er-edit-label {
    font-size: 11px;
    color: #a5b4fc;
    font-weight: 600;
    letter-spacing: .5px;
    animation: er-edit-blink 1.4s ease-in-out infinite;
}
@keyframes er-edit-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .45; }
}

/* 편집 모드 카드 */
.er-raid-card-edit {
    border: 1.5px dashed #c7d2fe;
}
.er-raid-card-edit .er-card-body {
    background: #f5f7ff;
    gap: 6px;
    padding: 8px;
}

/* 드래그 핸들 */
.er-drag-handle {
    font-size: 16px;
    color: #94a3b8;
    cursor: grab;
    padding: 0 4px;
    flex-shrink: 0;
    user-select: none;
    transition: color .15s;
}
.er-draggable:hover .er-drag-handle { color: #6366f1; }
.er-draggable:active { cursor: grabbing; }

/* 드래그 중 슬롯 */
.er-draggable[draggable="true"] {
    transition: opacity .15s, box-shadow .15s;
}
.er-draggable:hover {
    background: #f0f4ff !important;
    box-shadow: 0 2px 8px rgba(99,102,241,.13);
}

/* 드롭 대상 하이라이트 */
.er-drag-over {
    background: #eef2ff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99,102,241,.35) !important;
    transform: scale(1.01);
}
.er-drop-zone {
    border: 1.5px dashed #c7d2fe;
    background: #fafbff;
    min-height: 52px;
    transition: all .15s;
}
.er-drop-zone.er-drag-over {
    background: #eef2ff !important;
    border-color: #6366f1 !important;
}

/* 빈 슬롯 클릭 가능 표시 */
.er-slot-addable {
    cursor: pointer;
    transition: all .15s;
}
.er-slot-addable:hover {
    background: #f0fdf4 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16,185,129,.2) !important;
}
.er-slot-addable:hover .er-slot-avatar-empty {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #10b981;
    font-size: 18px;
}
.er-slot-addable:hover .er-slot-nick {
    color: #10b981 !important;
}

/* ============================================================
   멤버 추가 모달
   ============================================================ */
.er-addmember-modal {
    max-width: 420px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 20px 16px;
}
.er-addmember-modal .er-modal-head {
    align-items: center;
    gap: 10px;
    position: relative;
}
.er-addm-close {
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    background: #f1f5f9;
    border: none;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    color: #64748b;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.er-addm-close:hover { background: #fee2e2; color: #ef4444; }

.er-addmember-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8faff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 12px;
    transition: border-color .2s;
}
.er-addmember-search-wrap:focus-within { border-color: #667eea; }
.er-addmember-search-wrap .er-search-input {
    border: none;
    background: transparent;
    padding: 10px 0;
    flex: 1;
    font-size: 14px;
    outline: none;
}

.er-addmember-list {
    overflow-y: auto;
    max-height: calc(80vh - 160px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 멤버 추가 리스트 아이템 */
.er-addm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    border: 1.5px solid transparent;
    border-left: 3px solid var(--jc, #667eea);
    background: #fff;
    transition: all .13s;
}
.er-addm-item:hover {
    background: #f0f4ff;
    border-color: var(--jc, #667eea);
    border-left-color: var(--jc, #667eea);
    transform: translateX(2px);
}
.er-addm-icon  { font-size: 20px; flex-shrink: 0; }
.er-addm-info  { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.er-addm-nick  { font-size: 13px; font-weight: 700; color: #1e293b; }
.er-addm-job   { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.er-addm-power { font-size: 11px; color: #94a3b8; font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.er-addm-plus  { font-size: 18px; color: #10b981; font-weight: 700; flex-shrink: 0; }

/* ── 멤버 추가 모달 - 이미 배정된 멤버 ─────────────────── */
.er-addm-disabled {
    cursor: default;
    opacity: 0.55;
    background: #f8fafc;
    pointer-events: none;
}
.er-addm-badge-in {
    font-size: 10px;
    font-weight: 700;
    background: #e2e8f0;
    color: #64748b;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── 편집 모드 빈 슬롯 - 클릭 가능 표시 ──────────────── */
.er-empty-clickable {
    cursor: pointer;
    transition: all .15s;
}
.er-empty-clickable:hover {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important;
    border: 1.5px dashed #667eea !important;
    transform: translateX(2px);
}
.er-empty-clickable:hover .er-slot-avatar-empty {
    background: #667eea22;
    border-color: #667eea;
}
.er-empty-clickable:hover .er-slot-avatar-empty span {
    color: #667eea;
}
.er-empty-clickable:hover .er-slot-nick {
    color: #667eea !important;
}

/* ── er-subtitle 숨김 (이미 삭제됐지만 혹시 남아있을 경우) ─ */
.er-subtitle { display: none; }
