/* Guild Hub 공통 스타일 — "맑은 하늘"
   색·크기는 아래 :root 변수만 고치면 전체에 반영된다. */

:root {
    --bg: #f5f7fa;          /* 밝은 회색 배경 */
    --surface: #ffffff;     /* 흰 카드 */
    --text: #1f2937;        /* 본문 글자 */
    --muted: #6b7280;       /* 보조 글자 */
    --line: #e5e7eb;        /* 테두리 */
    --primary: #4a78e0;     /* 부드러운 파랑 */
    --primary-dark: #3a63c4;
    --primary-hover: #3a63c4;
    --primary-soft: #eaf0fd;
    --notice: #fff8e6;      /* 테스트 안내 띠 */
    --notice-line: #f3e3b5;
    --notice-text: #7a5b12;

    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
    --gap: 16px;
    --tabbar-h: 64px;
    --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

    /* 화면 곳곳의 상태 색 (라이트 값 = 원래 색 그대로). 다크 값은 아래 다크 모드 블록 */
    --topbar-bg: rgba(255, 255, 255, .92);
    --bad-bg: #fdeeee;
    --bad: #a23b3b;
    --menu-red: #b9402f;        /* 메뉴 '적혈' 강조 (차분한 적갈색) */
    --panel-shadow: rgba(30, 50, 90, .12);
    --chip-bg: #f0f2f5;
    --warn: #a06a00;
    --ok: #2f7d4f;
    --muted-red-bg: #f3eded;
    --muted-red: #8a5a5a;
    --bad-line: #f3d6d6;
    --bad-6: #c4473f;
    --world: #3f78c4;
    --orange-2: #b9772b;
    --ok-5: #3f9461;
    --bad-bg-4: #fbeceb;
    --world-bg: #eaf1fb;
    --gold-bg-8: #fbf2e6;
    --ok-bg: #e9f5ee;
    --trash-text: #6b6f76;
    --trash-bg: #eceef1;
    --line-2: #c9cdd3;
    --soft-bg-6: #fbfcff;
    --topbar-bg-2: rgba(245, 247, 250, .92);
    --bad-2: #b4433b;
    --chip-bg-2: #f3f4f6;
    --gray-text: #8b9098;
    --flash-gold: #fff3c4;
    --trash-solid: #6b6f76;
    --ok-2: #1f7a4a;
    --orange: #a8641a;
    --gold-line-2: #f1d9a6;
    --gold-bg-2: #fffaf0;
    --bad-bg-3: #fde8e8;
    --bad-3: #b23b3b;
    --gold-2: #8a5a12;
    --gold: #b07a12;
    --miss-fill: #9aa3ae;
    --peg: #c3cad4;
    --gold-bg-6: #fff3d6;
    --bad-bg-8: #fff6f6;
    --gold-line-3: #c9b37a;
    --bad-line-3: #efc9c9;
    --cls-knight-bg: #e8eefc;
    --cls-knight: #3a5cb8;
    --cls-ranger-bg: #e6f4ec;
    --cls-mage-bg: #f1eafb;
    --cls-mage: #6b46b0;
    --cls-healer-bg: #fdeef3;
    --cls-healer: #b04a6e;
    --soft-bg: #f6f8fb;
    --bar-track: #e9eef7;
    --gold-line: #ecd9a6;
    --gold-bg: #fffbf0;
    --silver-line: #dde2ea;
    --soft-bg-2: #f8f9fb;
    --bronze-line: #ebd3bf;
    --bronze-bg: #fdf8f3;
    --mine-outline: #c9d6f4;
    --bad-line-4: #e2a5a5;
    --float-bg: rgba(255, 255, 255, .94);
    --bad-line-2: #f0c4c4;
    --bad-bg-7: #fff5f5;
    --bad-4: #b4232a;
    --muted-2: #6b7280;
    --gold-3: #9a6a10;
    --flash-blue: #eef3ff;
    --soft-bg-5: #f6f8fc;
    --ok-bg-3: #e8f6ec;
    --ok-4: #2f8a4c;
    --bad-bg-2: #fdecec;
    --bad-5: #c0504d;
    --rank-line: #9bb3e8;
    --bad-bg-5: #fdeaea;
    --soft-bg-4: #fafafa;
    --soft-bg-3: #f7f8fb;
    --ok-bg-2: #e3f3e8;
    --ok-3: #1f6b3a;
    --dup-bg: #eeeeee;
    --dup-text: #555;
    --off-bg: #f3f3f3;
    --off-text: #777;
    --bad-bg-6: #fde8e4;
    --gold-bg-5: #fff3e0;
    --gold-bg-3: #fffaf2;
    --gold-bg-7: #fdf3dc;
    --gold-bg-4: #fff8ec;
    --ok-bg-4: #e8f6ee;
    --duel-soft-text: #3d4654;
    --duel-a: #b23a48;
    --duel-b: #2f62a8;
    color-scheme: light;
}

/* 다크 모드: 기기 설정(prefers-color-scheme)을 따르고, 머리글 ◐ 버튼으로 고르면 <html data-theme> 가 우선한다 (layouts/app 의 head 스크립트 · theme.js)
   차분한 남색 바탕 + 채도를 낮춘 상태 색 (눈이 피로하지 않게). 두 블록은 같은 값 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111722;
    --surface: #1a2130;
    --text: #e4e8ef;
    --muted: #9aa4b2;
    --line: #2c3545;
    --primary: #4f78d6;
    --primary-dark: #a9c1f5;
    --primary-hover: #3d63c0;
    --primary-soft: #22304d;
    --notice: #2d2614;
    --notice-line: #4a3f1f;
    --notice-text: #e8cf8a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .25);
    --topbar-bg: rgba(26, 33, 48, .92);
    --bad-bg: #3a2224;
    --bad: #f08a84;
    --menu-red: #f0938a;
    --panel-shadow: rgba(0, 0, 0, .45);
    --chip-bg: #263041;
    --warn: #e5b558;
    --ok: #7fcf9c;
    --muted-red-bg: #33262a;
    --muted-red: #c9a0a0;
    --bad-line: #5a3236;
    --bad-6: #f07a70;
    --world: #7fa8e6;
    --orange-2: #e0a35c;
    --ok-5: #6cc28f;
    --bad-bg-4: #3a2224;
    --world-bg: #1f2f48;
    --gold-bg-8: #33291c;
    --ok-bg: #183223;
    --trash-text: #8e96a3;
    --trash-bg: #2a3140;
    --line-2: #3a4456;
    --soft-bg-6: #1c2433;
    --topbar-bg-2: rgba(17, 23, 34, .92);
    --bad-2: #f29089;
    --chip-bg-2: #222b38;
    --gray-text: #8e97a5;
    --flash-gold: #4a3d16;
    --trash-solid: #5d6676;
    --ok-2: #7fd3a0;
    --orange: #eaa766;
    --gold-line-2: #5a4a25;
    --gold-bg-2: #2b2617;
    --bad-bg-3: #3c2326;
    --bad-3: #f08a84;
    --gold-2: #e0b766;
    --gold: #e3b55a;
    --miss-fill: #7d8796;
    --peg: #5a6578;
    --gold-bg-6: #3a2f17;
    --bad-bg-8: #35222a;
    --gold-line-3: #6b5a30;
    --bad-line-3: #5e3437;
    --cls-knight-bg: #22325a;
    --cls-knight: #9db5f2;
    --cls-ranger-bg: #1b3527;
    --cls-mage-bg: #2e2547;
    --cls-mage: #c2a8f0;
    --cls-healer-bg: #3f2230;
    --cls-healer: #ef9dbb;
    --soft-bg: #1e2635;
    --bar-track: #263044;
    --gold-line: #5a4a25;
    --gold-bg: #2d2716;
    --silver-line: #39445a;
    --soft-bg-2: #202838;
    --bronze-line: #5a4434;
    --bronze-bg: #2d241e;
    --mine-outline: #3b5694;
    --bad-line-4: #7a3d40;
    --float-bg: rgba(26, 33, 48, .94);
    --bad-line-2: #633538;
    --bad-bg-7: #35222a;
    --bad-4: #ff9a92;
    --muted-2: #9aa4b2;
    --gold-3: #e6be6a;
    --flash-blue: #26365a;
    --soft-bg-5: #222b3b;
    --ok-bg-3: #1a3426;
    --ok-4: #7fcf9c;
    --bad-bg-2: #3a2224;
    --bad-5: #f08a84;
    --rank-line: #3b5694;
    --bad-bg-5: #432628;
    --soft-bg-4: #1f2736;
    --soft-bg-3: #1e2635;
    --ok-bg-2: #183223;
    --ok-3: #8ad8a6;
    --dup-bg: #2a3140;
    --dup-text: #b3bac6;
    --off-bg: #262d3a;
    --off-text: #8e97a5;
    --bad-bg-6: #3c2523;
    --gold-bg-5: #33291a;
    --gold-bg-3: #2b2617;
    --gold-bg-7: #352c18;
    --gold-bg-4: #2d2716;
    --ok-bg-4: #1a3426;
    --duel-soft-text: #c3cad6;
    --duel-a: #f3a0a7;
    --duel-b: #a5c8f3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #111722;
    --surface: #1a2130;
    --text: #e4e8ef;
    --muted: #9aa4b2;
    --line: #2c3545;
    --primary: #4f78d6;
    --primary-dark: #a9c1f5;
    --primary-hover: #3d63c0;
    --primary-soft: #22304d;
    --notice: #2d2614;
    --notice-line: #4a3f1f;
    --notice-text: #e8cf8a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .25);
    --topbar-bg: rgba(26, 33, 48, .92);
    --bad-bg: #3a2224;
    --bad: #f08a84;
    --menu-red: #f0938a;
    --panel-shadow: rgba(0, 0, 0, .45);
    --chip-bg: #263041;
    --warn: #e5b558;
    --ok: #7fcf9c;
    --muted-red-bg: #33262a;
    --muted-red: #c9a0a0;
    --bad-line: #5a3236;
    --bad-6: #f07a70;
    --world: #7fa8e6;
    --orange-2: #e0a35c;
    --ok-5: #6cc28f;
    --bad-bg-4: #3a2224;
    --world-bg: #1f2f48;
    --gold-bg-8: #33291c;
    --ok-bg: #183223;
    --trash-text: #8e96a3;
    --trash-bg: #2a3140;
    --line-2: #3a4456;
    --soft-bg-6: #1c2433;
    --topbar-bg-2: rgba(17, 23, 34, .92);
    --bad-2: #f29089;
    --chip-bg-2: #222b38;
    --gray-text: #8e97a5;
    --flash-gold: #4a3d16;
    --trash-solid: #5d6676;
    --ok-2: #7fd3a0;
    --orange: #eaa766;
    --gold-line-2: #5a4a25;
    --gold-bg-2: #2b2617;
    --bad-bg-3: #3c2326;
    --bad-3: #f08a84;
    --gold-2: #e0b766;
    --gold: #e3b55a;
    --miss-fill: #7d8796;
    --peg: #5a6578;
    --gold-bg-6: #3a2f17;
    --bad-bg-8: #35222a;
    --gold-line-3: #6b5a30;
    --bad-line-3: #5e3437;
    --cls-knight-bg: #22325a;
    --cls-knight: #9db5f2;
    --cls-ranger-bg: #1b3527;
    --cls-mage-bg: #2e2547;
    --cls-mage: #c2a8f0;
    --cls-healer-bg: #3f2230;
    --cls-healer: #ef9dbb;
    --soft-bg: #1e2635;
    --bar-track: #263044;
    --gold-line: #5a4a25;
    --gold-bg: #2d2716;
    --silver-line: #39445a;
    --soft-bg-2: #202838;
    --bronze-line: #5a4434;
    --bronze-bg: #2d241e;
    --mine-outline: #3b5694;
    --bad-line-4: #7a3d40;
    --float-bg: rgba(26, 33, 48, .94);
    --bad-line-2: #633538;
    --bad-bg-7: #35222a;
    --bad-4: #ff9a92;
    --muted-2: #9aa4b2;
    --gold-3: #e6be6a;
    --flash-blue: #26365a;
    --soft-bg-5: #222b3b;
    --ok-bg-3: #1a3426;
    --ok-4: #7fcf9c;
    --bad-bg-2: #3a2224;
    --bad-5: #f08a84;
    --rank-line: #3b5694;
    --bad-bg-5: #432628;
    --soft-bg-4: #1f2736;
    --soft-bg-3: #1e2635;
    --ok-bg-2: #183223;
    --ok-3: #8ad8a6;
    --dup-bg: #2a3140;
    --dup-text: #b3bac6;
    --off-bg: #262d3a;
    --off-text: #8e97a5;
    --bad-bg-6: #3c2523;
    --gold-bg-5: #33291a;
    --gold-bg-3: #2b2617;
    --gold-bg-7: #352c18;
    --gold-bg-4: #2d2716;
    --ok-bg-4: #1a3426;
    --duel-soft-text: #c3cad6;
    --duel-a: #f3a0a7;
    --duel-b: #a5c8f3;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: anywhere;
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

h1, h2 { margin: 0; line-height: 1.3; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }

/* ── 상단 바 ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--topbar-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.topbar__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.brand { font-size: 17px; font-weight: 800; color: var(--primary-dark); letter-spacing: -.01em; white-space: nowrap; }

/* ── 로그인 영역 ── */
.account { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.account form { margin: 0; }
.account__avatar {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    object-fit: cover;
}
.account__name {
    min-width: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

/* ── 알림 메시지 ── */
.flash {
    max-width: 1048px;   /* 메뉴바 · 본문 카드와 같은 폭 */
    margin: 16px auto 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 14px;
    width: calc(100% - 32px);
}
.flash--error { background: var(--bad-bg); color: var(--bad); }

/* 계정 메뉴 (이름을 누르면 펼침: 내 정보 · 로그아웃) */
.account-menu { position: relative; min-width: 0; }
.account-menu__btn { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; list-style: none; }
.account-menu__btn::-webkit-details-marker { display: none; }
.account-menu__btn .icon { flex: none; width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.account-menu[open] .account-menu__btn .icon { transform: rotate(180deg); }
.account-menu__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px var(--panel-shadow); }
.account-menu__panel form { margin: 0; }
.account-menu__item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.account-menu__item:hover { background: var(--bg); }
.account-menu__item .icon { width: 18px; height: 18px; color: var(--muted); }
@media (min-width: 768px) { .account-menu__admin { display: none; } }
@media (max-width: 767px) { .account-menu__me { display: none; } }   /* 모바일은 하단 탭 '내정보'가 있어 계정 메뉴에서는 숨김 */

@media (max-width: 479px) {
    .topbar__inner { gap: 12px; }
    /* 계정명은 남는 폭을 모두 쓰고 잘리면 … */
    .account { flex: 1; justify-content: flex-end; }
    .account__name { flex: 0 1 auto; max-width: none; }
}

.topnav { display: none; gap: 4px; }
.topnav__link {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}
.topnav__link:hover { background: var(--bg); color: var(--text); }
.topnav__link.is-active { background: var(--primary-soft); color: var(--primary-dark); }

/* ── 본문 ── */
.page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 16px 32px;
}

.page-title { margin-bottom: 16px; }

.home-grid { display: grid; gap: var(--gap); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    min-width: 0;
}
.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}

/* ── 작은 표시(태그) ── */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}
.tag--blue { background: var(--primary-soft); color: var(--primary-dark); }

/* ── 버튼 ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.btn--sm { padding: 6px 12px; font-size: 14px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }   /* 다크에서도 흰 글씨가 보이게 (primary-dark 는 다크에서 연한 파랑) */
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn:disabled { cursor: not-allowed; opacity: .65; }

/* ── 내 캐릭터 ── */
.char { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.char__avatar {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 18px;
}
.char__name { font-size: 17px; font-weight: 700; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.stat { background: var(--bg); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.stat dt { font-size: 13px; color: var(--muted); }
.stat dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.stat dd small { font-size: 13px; font-weight: 500; color: var(--muted); }
.stat__sub { font-size: 13px; color: var(--primary-dark); font-weight: 600; }

.bar { height: 6px; margin-top: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }

/* ── 바로가기 ── */
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 88px;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}
.quick__item .icon { color: var(--primary); }
.quick__item:hover { border-color: var(--primary); background: var(--primary-soft); }

/* ── 공통 목록 · 표시 ── */
.page-title small { font-size: 14px; font-weight: 500; margin-left: 6px; }
.stack { display: grid; gap: var(--gap); }
.hint { margin-top: 10px; font-size: 13px; color: var(--muted); }

.count {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    margin-left: 2px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.badge {
    flex: none;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.badge--owner { background: var(--primary-soft); color: var(--primary-dark); }

.status { font-size: 13px; font-weight: 700; white-space: nowrap; }
.status--pending { color: var(--warn); }
.status--approved { color: var(--ok); }
.status--rejected { color: var(--bad); }
.status--cancelled { color: var(--muted); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows__main { min-width: 0; display: grid; gap: 2px; font-weight: 600; }
.rows__main small { font-weight: 400; font-size: 13px; }
.rows__side { display: flex; align-items: center; gap: 8px; flex: none; }
.rows__side form { margin: 0; }
.reason { color: var(--bad); }


/* ── 입력 폼 ── */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label { font-size: 14px; font-weight: 600; padding: 0; }
.field__error { font-size: 13px; color: var(--bad); }
input[type="text"], input[type="number"], input[type="datetime-local"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="datetime-local"]:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}
.choice input { margin-top: 4px; accent-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.form__actions { display: flex; justify-content: flex-end; }

/* ── 승인 화면 ── */
.meta { display: grid; gap: 6px; margin: 0 0 12px; font-size: 14px; }
.meta div { display: flex; gap: 12px; }
.meta dt { flex: none; width: 84px; color: var(--muted); white-space: nowrap; }
.meta dd { margin: 0; min-width: 0; }
.warn {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--notice);
    color: var(--notice-text);
    font-size: 13px;
}
.request__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.request__actions form { margin: 0; }
.reject { display: flex; gap: 8px; flex: 1 1 260px; }
.reject input { flex: 1; min-width: 0; padding: 8px 12px; }

/* ── 검색 · 명부 결과 ── */
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; min-width: 0; }
.badge--muted { background: var(--muted-red-bg); color: var(--muted-red); }

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.result {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
}
.result__info { display: grid; gap: 2px; min-width: 0; }
.result__info small { font-size: 13px; }
.result__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.result__actions form { margin: 0; }
.result__note { margin: 0; font-size: 13px; color: var(--muted); }

/* ── 관리 탭 · 필터 ── */
.subtabs { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; }
.subtabs__link {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
.subtabs__link.is-active { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary-dark); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}
.chip.is-active { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }

/* ── 가져오기 결과 ── */
.numbers {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.numbers li { background: var(--bg); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.numbers span { font-size: 12px; color: var(--muted); }
.numbers strong { font-size: 17px; }
.details { font-size: 13px; margin-bottom: 12px; }
.details summary { cursor: pointer; color: var(--primary-dark); font-weight: 600; }
.details ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.details li.is-warn { color: var(--notice-text); }
/* 관리 > 연결 승인의 연결 현황: 펼친 목록이 길어도 화면을 늘리지 않게 칸 안에서 스크롤 */
.link-report { margin-top: var(--gap); }
.link-report .warn ul { margin: 6px 0 0; padding-left: 18px; }
.link-report .details > ul, .link-report .details > .chips { max-height: 240px; overflow-y: auto; overflow-wrap: anywhere; }
.confirm-box {
    margin-top: 4px;
    padding: 14px;
    border-radius: 10px;
    background: var(--notice);
    border: 1px solid var(--notice-line);
    display: grid;
    gap: 10px;
    font-size: 14px;
}
.confirm-box p { margin: 0; }
.choice input[type="checkbox"] { accent-color: var(--primary); }

@media (max-width: 479px) {
    .numbers { grid-template-columns: repeat(2, 1fr); }
}

/* ── 적혈 목록 ── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head .page-title { margin-bottom: 0; }
.note { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); font-size: 14px; }
.note a { text-decoration: underline; }
.btn--danger { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }

/* 분류 색: 적혈 빨강 · 월드경계 파랑 · 길드탈퇴 주황 · 중재 초록 (모두 옅게) */
.wl { --c-red: var(--bad-6); --c-world: var(--world); --c-leave: var(--orange-2); --c-mediate: var(--ok-5); --c-farm: var(--muted); }
.wl-search { display: flex; gap: 8px; position: sticky; top: 56px; z-index: 5; background: var(--surface); padding: 6px 0 10px; }
.wl-input { flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: var(--surface); color: var(--text); }
.wl-input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.wl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.wl-head > span { min-width: 0; }
.wl-head__link { flex: none; font-size: 13px; color: var(--muted); text-decoration: none; }
.wl-head__link:hover { color: var(--primary-dark); text-decoration: underline; }
.wl-empty { padding: 12px 0; }
.wl-rows { list-style: none; margin: 0; padding: 0; }
.wl-row { border-top: 1px solid var(--line); }
.wl-row:first-child { border-top: 0; }
.wl-row__main {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 2px;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.wl-row.is-open .wl-row__main { background: var(--bg); border-radius: 8px; }
.wl-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--chip-bg); }
.wl-badge--red { color: var(--c-red); background: var(--bad-bg-4); }
.wl-badge--world { color: var(--c-world); background: var(--world-bg); }
.wl-badge--leave { color: var(--c-leave); background: var(--gold-bg-8); }
.wl-badge--mediate { color: var(--c-mediate); background: var(--ok-bg); }
.wl-badge--farm { color: var(--c-farm); background: var(--chip-bg); }   /* 작업장: 이름만 관리 (PVP · 미션과 무관), 눈에 덜 띄게 */
.wl-badge--trash { color: var(--trash-text); background: var(--trash-bg); border: 1px dashed var(--line-2); }
.wl-badges { display: inline-flex; gap: 4px; }
.wl-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-star { color: #d39b12; }
.wl-new { margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; vertical-align: 2px; }
.wl-memo { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.wl-detail { padding: 10px 4px 14px; display: grid; gap: 8px; font-size: 14px; }
.wl-detail p { margin: 0; }
.wl-detail__memo { white-space: pre-wrap; }
.wl-trash-info { color: var(--muted-red); font-size: 13px; }
.wl-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-form { margin: 0; display: grid; gap: 10px; }
.wl-form[hidden], .wl-logs[hidden] { display: none; }   /* display: grid 가 hidden 을 덮지 않게 */
.wl-edit { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.wl-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-cat { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.wl-cat input { accent-color: var(--primary); }
.wl-cat:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.wl textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.wl-logs { margin: 0; padding: 10px 12px; list-style: none; background: var(--bg); border-radius: 8px; display: grid; gap: 4px; font-size: 13px; }
.wl-add { margin-bottom: 14px; padding: 14px; border: 1px solid var(--primary-soft); border-radius: 10px; background: var(--soft-bg-6); }
.wl-add h2 { margin-bottom: 10px; }
.wl-missing { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--bg); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.wl-missing p { margin: 0; }
.wl-more { margin-top: 10px; width: 100%; justify-content: center; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; }

/* 폰 (640px 이하): 메모는 이름 아래 줄에 두 줄까지, 분류 칩은 한 줄 가로 스크롤 */
@media (max-width: 640px) {
    .wl-row__main { grid-template-columns: auto minmax(0, 1fr) auto; }
    .wl-memo { grid-column: 2 / 4; grid-row: 2; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.4; }
    .wl-tags { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .wl-tags::-webkit-scrollbar { display: none; }
    .wl-tags .chip { flex: none; }
    .wl-memo:empty { display: none; }   /* 메모 없는 줄은 한 줄 그대로 */
    .wl-tags.has-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
}

/* ── 준비 중 화면 ── */
.soon { max-width: 520px; margin: 24px auto; text-align: center; display: grid; gap: 12px; justify-items: center; padding: 40px 24px; }

/* ── 하단 정보 ── */

/* ── 모바일 하단 탭 ── */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: grid;
    grid-auto-flow: column;            /* 메뉴 수(config hub.menu)에 맞춰 한 줄에 똑같이 나눈다 */
    grid-auto-columns: 1fr;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
}
.tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}
.tabbar__item.is-active { color: var(--primary); }
.tabbar__icon { position: relative; display: inline-flex; }
.dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e05a4a;
    border: 2px solid var(--surface);
}

/* ── PC (768px 이상): 상단 메뉴, 하단 탭 숨김, 2열 ── */
@media (min-width: 768px) {
    body { padding-bottom: 0; }
    /* PC: 메뉴바를 창 전체 띠 대신 아래 카드와 같은 폭의 둥근 상자로 (스크롤해도 위에 붙어 있음) */
    .topbar { padding: 10px 16px 0; background: var(--topbar-bg-2); border-bottom: 0; }
    .topbar__inner { max-width: 1048px; padding: 0 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
    .page { padding-top: 22px; }
    .topnav { display: flex; }
    .tabbar { display: none; }
    .home-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .quick { grid-template-columns: repeat(4, 1fr); }
    .home-grid .quick { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .home-grid .quick { grid-template-columns: repeat(4, 1fr); }
}

/* ── 출석 · 정산 ── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn--xs { padding: 4px 10px; font-size: 13px; }
.period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.period input[type="date"], .form select, .input-sm {
    padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface); color: var(--text); font: inherit; font-size: 15px; max-width: 100%;
}
.input-sm { width: 64px; padding: 2px 6px; font-size: 14px; }
.table-wrap { overflow-x: auto; margin-bottom: 12px; }
.att-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.att-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.att-table td { padding: 8px; border-bottom: 1px solid var(--line); }
.att-table tr:last-child td { border-bottom: 0; }
.att-table .nw { white-space: nowrap; }
.att-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.att-table tr.is-mine td { background: var(--primary-soft); }
.att-table a { font-weight: 600; }
.att-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--chip-bg); color: var(--muted); white-space: nowrap; }
.att-status--ok { background: var(--ok-bg); color: var(--ok); }
.att-status--low { background: var(--gold-bg-8); color: var(--warn); }
.att-status--off { background: var(--muted-red-bg); color: var(--muted-red); }
.att-cell { flex-wrap: wrap; }
.att-mark { flex: none; width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--chip-bg); color: var(--muted); font-weight: 700; }
.att-mark.is-on { background: var(--primary-soft); color: var(--primary-dark); }
.att-cell .rows__main { flex: 1; }
.att-fix { flex: none; }
.att-fix summary { list-style: none; }
.att-fix summary::-webkit-details-marker { display: none; }
.att-fix[open] { flex-basis: 100%; }
.att-fix__form { display: flex; gap: 6px; margin-top: 8px; }
.att-fix__form input[type="text"] { flex: 1; min-width: 0; padding: 6px 10px; }
.att-names { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.att-names li { padding: 4px 10px; border-radius: 999px; background: var(--bg); font-size: 14px; }
.att-names li.is-mine { background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary-soft); font-weight: 600; }   /* 내 캐릭터: 은은한 파란 바탕 */
.att-names li.is-mine a { color: var(--primary-dark); }
.row-actions { display: flex; gap: 4px; flex: none; }
.rows li:has(.row-actions) { flex-wrap: wrap; gap: 8px; }
.rows li:has(.row-actions) .rows__main { flex: 1 1 180px; }
.rows li:has(.link-manage) { flex-wrap: wrap; }
.link-manage { flex-basis: 100%; margin: 0; }
.link-manage .link-list { list-style: none; padding: 0; }
.link-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border: 0; }
.link-list form { margin: 0; }

/* ── 전투력 · 홈 캐릭터 탭 ── */
.char-head { justify-content: flex-start; flex-wrap: nowrap; }
.char-head h2 { flex: none; }
.char-tabs { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.char-tabs::-webkit-scrollbar { display: none; }
.char-tab {
    flex: none; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.char-tab.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.up { color: var(--ok); }
.down { color: var(--bad); }
.strong { font-weight: 800; }
.power-result { scroll-margin-top: 72px; }   /* 상단 메뉴에 가리지 않게 */
.power-big small { font-size: 16px; font-weight: 700; }
.power-big { margin: 0 0 6px; font-size: 30px; font-weight: 800; color: var(--primary-dark); }
.power-change { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.power-text { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; resize: vertical; }
.power-pasted { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--primary-soft); border-radius: 10px; background: var(--primary-soft); }
.power-pasted[hidden], .power-text[hidden] { display: none; }
.power-clip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }   /* 📋 붙여넣기 버튼 줄 */
.power-clip[hidden] { display: none; }
.power-pasted__info { font-weight: 700; color: var(--primary-dark); overflow-wrap: anywhere; }
.power-form-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.power-form-row .field { flex: 1 1 200px; }
.power-sub { margin: 16px 0 6px; font-size: 15px; }
.chart-tabs { display: flex; gap: 6px; }
.chart-tabs .char-tab { padding: 4px 10px; font-size: 13px; }
.power-chart { width: 100%; overflow: hidden; }
.power-chart svg { display: block; }
.pc-grid { stroke: var(--line); stroke-width: 1; }
.pc-axis { fill: var(--muted); font-size: 11px; }
.pc-line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; }
.pc-hit { fill: transparent; cursor: pointer; }
.pc-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; pointer-events: none; }
.pc-pt.is-on .pc-dot { fill: var(--primary); }
.pc-pt:focus { outline: none; }
.pc-pt:focus-visible .pc-dot { stroke-width: 3; }
.pc-val { fill: var(--primary-dark); font-size: 13px; font-weight: 700; }
.power-chart__info { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list > li { border-top: 1px solid var(--line); }
.rank-list > li:first-child { border-top: 0; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.rank-row::-webkit-details-marker { display: none; }
.rank-no { flex: none; width: 28px; text-align: center; font-weight: 800; color: var(--primary-dark); }
.rank-name { flex: 1; min-width: 0; display: grid; font-weight: 600; overflow-wrap: anywhere; }
.rank-name small { font-weight: 400; font-size: 12px; }
.rank-total { flex: none; font-variant-numeric: tabular-nums; }
.rank-more { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 0 12px 38px; font-size: 13px; }
.row-actions form { margin: 0; }
.ev-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ev { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.ev input { accent-color: var(--primary); }
.ev:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.ev--off { cursor: default; color: var(--muted); border-style: dashed; }
.form select { width: 100%; }
.settle-power-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; }
.settle-power-opts[hidden] { display: none; }   /* 참여율 방식일 때 숨김 (display: flex 가 hidden 을 덮지 않게) */
.settle-power-opts .hint { flex-basis: 100%; margin: 0; }


/* ── 홈: 출석 · 전투력 · 날짜별 보탐 ── */
.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.day { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day__date { flex: none; width: 52px; padding-top: 4px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.day__date small { font-weight: 500; color: var(--muted); }
.day__events { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ev-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; border: 1px solid transparent; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-chip b { font-size: 13px; }
.ev-chip sup { font-size: 11px; margin-left: -2px; }
.ev-chip.is-on { background: var(--ok-bg); color: var(--ok); }
.ev-chip.is-off { background: var(--bad-bg); color: var(--bad-2); }
.ev-chip.is-empty { background: var(--chip-bg-2); color: var(--gray-text); border: 1px dashed var(--line-2); }
.days__legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.days__legend .ev-chip { padding: 0 6px; }
.home-att .days__legend { margin-top: 8px; gap: 2px 10px; }


/* ── 목록 검색 · 필터 (출석 · 전투력) ── */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.list-tools .filter-input { flex: 1 1 180px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: var(--surface); color: var(--text); }
.list-tools .filter-input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.list-tools .chips { margin: 0; }
button.chip { background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; }
.filter-empty { padding: 10px 0; }
.is-found, .is-found td { animation: found 2s ease-out; }
@keyframes found { from { background: var(--flash-gold); } to { background: transparent; } }
.rank-list > li.is-mine { background: var(--primary-soft); border-radius: 8px; }
.list-more { width: 100%; justify-content: center; margin-top: 8px; }

/* ── 모바일 터치 영역 (자주 누르는 것만, 44px 안팎) ── */
@media (max-width: 640px) {
    .char-tab { min-height: 40px; padding: 8px 14px; }
    .chips .chip { min-height: 38px; display: inline-flex; align-items: center; padding: 6px 14px; font-size: 14px; }
    .att-table td:first-child a { display: inline-block; padding: 10px 0; }
    .att-table td { padding-top: 2px; padding-bottom: 2px; }
    .list-tools .btn { min-height: 42px; }
    .tabbar__label { font-size: 11.5px; }
}
@media (max-width: 640px) {
    .subtabs { flex-wrap: wrap; overflow-x: visible; }   /* 관리 · 전투력 탭: 모바일에서는 줄바꿈 (가로 스크롤 없음) */
}

/* ── 적혈: 선택한 분류를 분명하게, 휴지통은 점선 · 회색 ── */
.wl-tags .chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.wl-tags .chip--trash { border-style: dashed; color: var(--gray-text); }
.wl-tags .chip--trash.is-active { background: var(--trash-solid); border-color: var(--trash-solid); color: #fff; }

/* ── 내 정보: 연결 해제는 "관리"를 펼쳐야 보임 (확인 창은 그대로) ── */
.link-row .rows__side { flex-wrap: wrap; justify-content: flex-end; }
.unlink summary { list-style: none; cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 8px; border-radius: 8px; }
.unlink summary::-webkit-details-marker { display: none; }
.unlink[open] summary { color: var(--text); }
.unlink form { margin-top: 6px; }

@media (max-width: 640px) {
    .page { padding-top: 16px; }
    .card { padding: 16px; }
    .wl-search .btn { min-height: 44px; }
    .unlink summary { min-height: 40px; display: inline-flex; align-items: center; }
}

.page-head--end { justify-content: flex-end; }   /* 제목을 화면에서 숨긴 페이지: 버튼만 오른쪽 */
/* ── 홈 대시보드 (시안 기준): 카드마다 흰 카드 · 제목 줄 오른쪽에 바로가기, PC 전투력 | 출석 | PVP / 모바일 출석 → 전투력 → PVP ── */
.home-char .card__head { margin-bottom: 12px; }
.char-head__title { display: flex; align-items: center; gap: 6px; }
.char-head__title .icon { width: 18px; height: 18px; color: var(--muted); }
.char-head__who { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
@media (max-width: 479px) { .char-head__who { display: none; } }   /* 모바일: 탭 자리를 위해 계정 이름은 머리글 계정 버튼에서만 */
.home-char .char { margin: 0; }
.home-char .char[hidden] { display: none; }
.home-char .char .muted { font-size: 14px; }
.char__info { min-width: 0; flex: 1; }
.home-bank { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 8px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; text-align: right; }
.home-bank strong { font-size: 18px; color: var(--primary-dark); }
.home-bank small { font-size: 12px; }
.home-panel { display: grid; gap: var(--gap); grid-template-areas: "att" "power" "pvp"; align-items: start; }
.home-panel[hidden] { display: none; }
.home-card { display: flex; flex-direction: column; gap: 0; border-radius: 16px; padding: 18px 20px; }
.home-power { grid-area: power; }
.home-att { grid-area: att; }
.home-pvp { grid-area: pvp; }
.home-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.home-card__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.home-card__title .icon { width: 20px; height: 20px; color: var(--muted); }
.home-card__more { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0 2px; font-size: 14px; font-weight: 600; color: var(--primary-dark); }
.home-card__more .icon { width: 18px; height: 18px; }
.home-card__sub { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.home-big { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.home-big small { font-size: 13px; font-weight: 500; }
.home-sub { margin: 4px 0 0; font-size: 15px; font-weight: 700; }
.home-note { display: block; margin-top: 6px; }
.home-att__line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.home-period { font-size: 13px; white-space: nowrap; }
.home-bar { height: 8px; margin-top: 10px; }
.home-days { margin-top: 14px; min-width: 0; }
.home-days__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.home-done { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.home-done .icon { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.home-att .days { gap: 0; }
.home-att .day { align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.home-att .day:first-child { border-top: 0; }
.home-att .day__date { width: 56px; padding-top: 0; font-size: 15px; }
.home-att .day__events { gap: 6px; }
.home-att .ev-chip { padding: 4px 10px; font-size: 13.5px; }
.home-days:not(.is-open) .day--more { display: none; }
.home-days__toggle { display: inline-flex; align-items: center; min-height: 36px; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--primary-dark); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.home-days__toggle::before { content: "▸"; margin-right: 4px; }
.home-days.is-open .home-days__toggle::before { content: "▾"; }
.home-days__close, .home-days.is-open .home-days__open, .home-days__toggle .for-pc { display: none; }
.home-days.is-open .home-days__close { display: inline; }
.home-power__body { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.home-power__side { display: grid; gap: 4px; justify-items: start; }
.home-gaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 15px; font-weight: 700; }
.home-gaps.up { margin-top: 10px; color: var(--ok); font-size: 14px; }
.home-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.home-card__actions .btn { justify-content: center; gap: 8px; min-height: 46px; border-radius: 12px; font-size: 15px; }
.home-card__actions .btn .icon { width: 20px; height: 20px; }
.home-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-tile { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.home-tile__label { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-tile strong { font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.home-tile small { font-size: 12.5px; }
.home-tile .home-tile__bonus { font-size: 11.5px; color: var(--ok-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-tile small span { display: block; }
.home-kills { list-style: none; margin: 0; padding: 0; display: grid; font-size: 14px; }
.home-kills li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.home-kills li:first-child { border-top: 0; }
.home-kills__time { flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.home-kills__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pvp-left { font-size: 13px; font-weight: 700; color: var(--orange); white-space: nowrap; }
@media (max-width: 420px) {
    .home-card { padding: 16px; }
    .home-big { font-size: 30px; }
    .home-att .day { gap: 6px; }
    .home-att .day__date { width: 50px; font-size: 14px; }
    .home-att .day__events { gap: 4px; }
    .home-att .ev-chip { padding: 3px 7px; gap: 3px; font-size: 13px; }
    .home-bank { padding: 6px 10px; }
    .home-bank__src { display: none; }
    .home-char .char .muted { font-size: 13px; }
    .home-char .char { gap: 10px; }
    .home-bank strong { font-size: 16px; }
    .home-bank small { font-size: 11px; }
    .home-tile { padding: 8px 10px; }
}
@media (max-width: 359px) {
    .char { flex-wrap: wrap; }
    .home-bank { flex-basis: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 768px) {
    .home-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "power att" "pvp pvp"; }   /* 태블릿 · 좁은 PC: PC와 같은 순서, PVP는 아래 넓게 */
    .home-panel { align-items: stretch; }   /* 위 두 카드 높이를 맞추고 버튼은 바닥에 */
    .home-card__actions { margin-top: auto; }
}
@media (min-width: 1024px) {
    .home-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "power att pvp"; gap: 12px; }
    .home-power__body { flex-direction: column; }   /* 3열에서는 폭이 좁아 차이를 숫자 아래로 */
    /* PC는 기존 스파르타처럼 촘촘하게 (모바일은 시안 크기 그대로) */
    .home-card { padding: 14px 16px; border-radius: 14px; }
    .home-card__head { margin-bottom: 6px; }
    .home-card__title { font-size: 14px; }
    .home-card__title .icon { width: 17px; height: 17px; }
    .home-card__more { min-height: 26px; font-size: 13px; }
    .home-big { font-size: 26px; }
    .home-sub { margin-top: 2px; font-size: 14px; }
    .home-gaps { font-size: 14px; }
    .home-bar { height: 6px; margin-top: 8px; }
    .home-days { margin-top: 10px; }
    .home-att .day { padding: 1px 0; border-top: 0; }
    .home-att .ev-chip { line-height: 1.45; }
    .home-att .day__date { width: 52px; font-size: 13.5px; }
    .home-att .day__events { gap: 4px; }
    .home-att .ev-chip { padding: 2px 8px; font-size: 12.5px; }
    .home-days:not(.is-open) .day--more:not(.day--more-pc) { display: flex; }   /* PC는 7일까지 바로 보임 */
    .home-days__toggle.is-mobile-only { display: none; }
    .home-days__toggle .for-mobile { display: none; }
    .home-days__toggle .for-pc { display: inline; }
    .home-tile { padding: 8px 10px; }
    .home-tile strong { font-size: 18px; }
    .home-card__sub { margin: 10px 0 4px; }
    .home-kills li { padding: 4px 0; }
    .home-panel { align-items: stretch; }   /* 세 카드 높이를 같게 (가장 긴 카드 기준), 버튼은 카드 바닥에 맞춤 */
    .home-card__actions { margin-top: auto; padding-top: 12px; gap: 8px; }
    .home-card__actions .btn { min-height: 38px; font-size: 14px; border-radius: 10px; }
    .home-card__actions .btn .icon { width: 18px; height: 18px; }
}

/* ── 출석 목록: 하루 한 줄 · 최근 7일 펼침, 이전은 월별 접기 ── */
.ev-days { list-style: none; margin: 0; padding: 0; }
.ev-day { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.ev-days > .ev-day:first-child { border-top: 0; }
.ev-day__date { flex: none; width: 56px; padding-top: 3px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.ev-day__date small { font-weight: 500; color: var(--muted); }
.ev-day__items { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ev-item { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.ev-item__time { color: var(--muted); }
.ev-item b { font-weight: 700; }
.ev-item sup { font-size: 11px; color: var(--bad-2); }
.ev-item__diff { color: var(--orange); font-weight: 700; }
.ev-item.is-empty { border-style: dashed; background: var(--chip-bg-2); color: var(--gray-text); }
.ev-month { margin: 8px 0 0; }
.ev-month summary { padding: 8px 0; font-weight: 600; }
.ev-month .ev-days { margin-bottom: 4px; }
@media (max-width: 420px) {
    .ev-day { gap: 6px; }
    .ev-day__date { width: 46px; font-size: 13px; }
    .ev-day__items { gap: 4px; }
    .ev-item { gap: 3px; padding: 3px 7px; font-size: 12.5px; }
}
.sheet-now { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: -4px 0 12px; }
body.is-guest { padding-bottom: 0; }   /* 비로그인: 하단 메뉴 없음 */

/* PVP 스샷 올리기 팝업 (홈). 폰은 화면 전체, PC는 가운데 넓은 창 */
.pvp-modal { width: min(720px, calc(100vw - 32px)); height: min(880px, calc(100dvh - 48px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: var(--radius); background: var(--bg); color: var(--text); overflow: hidden; }
.pvp-modal[open] { display: flex; flex-direction: column; }
.pvp-modal::backdrop { background: rgba(15, 23, 42, .45); }
.pvp-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pvp-modal__head h2 { margin: 0; font-size: 16px; }
.pvp-modal__close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.pvp-modal__close:hover { background: var(--bg); color: var(--text); }
.pvp-modal__frame { flex: 1; width: 100%; border: 0; display: block; background: var(--bg); }
@media (max-width: 640px) {
    .pvp-modal { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; }
}
body.is-embed { padding-bottom: 16px; }
body.is-embed .page { padding-top: 12px; }

/* 아이템 입찰 */
.auc-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 16px; text-decoration: none; color: var(--text); border-color: var(--gold-line-2); background: var(--gold-bg-2); }
.auc-banner__t { font-weight: 700; }
.auc-banner__items { flex: 1 1 240px; min-width: 0; font-size: 13.5px; color: var(--muted); }
.auc-banner__go { margin-left: auto; font-size: 13.5px; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.auc-card__body { display: flex; gap: 14px; align-items: flex-start; }
.auc-card__img { flex: none; width: 112px; height: 112px; object-fit: contain; border-radius: 10px; background: #1b1f22; }
.auc-card__info { flex: 1; min-width: 0; }
.auc-card__name { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.auc-grade { display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 5px; background: var(--bad-bg-3); color: var(--bad-3); font-size: 12px; font-weight: 700; vertical-align: middle; }
.auc-card__meta { margin: 0 0 6px; font-size: 13px; line-height: 1.55; }
.auc-card__memo { margin: 0 0 6px; font-size: 13.5px; }
.auc-card__now, .auc-card__mine { margin: 0; font-size: 14px; }
.auc-bid { display: flex; gap: 8px; margin-top: 12px; }
.auc-bid input { flex: 1; min-width: 0; }
.auc-form .auc-grid, .auc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.auc-choice { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.auc-choice label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.auc-event { margin: 0; }
.auc-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.auc-row:first-of-type { border-top: 0; }
.auc-row__main { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
.auc-row__win { font-weight: 700; color: var(--gold-2); }
.auc-row__act { display: flex; gap: 6px; }
@media (max-width: 640px) {
    .auc-grid { grid-template-columns: 1fr; }
    .auc-card__img { width: 84px; height: 84px; }
}
.auc-row__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.auc-names { margin-left: 4px; color: var(--muted); font-size: 13.5px; }
.auc-card__now { margin: 10px 0 0; }
.auc-join { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; }
.auc-join__ok { font-weight: 700; color: var(--ok-2); }
.auc-draw { margin-top: 10px; }
.auc-card__win { margin: 10px 0 6px; font-size: 16px; }

/* 사다리타기 (auction-ladder.js 가 그림) */
.ladder__hint { margin: 0 0 4px; font-size: 12.5px; }
.ladder__wrap { overflow-x: auto; }
.ladder__svg { display: block; max-width: none; height: auto; }
.ladder__lines line { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.ladder__path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.ladder__path.is-win { stroke: #e0a326; }
.ladder__path.is-pick { stroke: var(--primary); opacity: .75; }
.ladder__name { font-size: 13px; font-weight: 600; fill: var(--text); cursor: pointer; }
.ladder__name.is-me { fill: var(--primary-dark); }
.ladder__name.is-win { fill: var(--gold); font-weight: 800; }
.ladder__end { font-size: 12.5px; fill: var(--muted); }
.ladder__end.is-prize { fill: var(--gold); font-weight: 800; }
.auc-winner.is-wait { color: var(--muted); font-weight: 600; }
.auc-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.auc-tag { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; }
.auc-tag.is-me { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }

/* 🔔 알림 (머리글) */
.notif { position: relative; flex: none; }
.notif__btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; list-style: none; font-size: 17px; }
.notif__btn::-webkit-details-marker { display: none; }
.notif__count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.notif__count[hidden] { display: none; }
.notif__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 31; width: min(340px, calc(100vw - 24px)); max-height: 60vh; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px var(--panel-shadow); }
.notif__title { margin: 4px 8px 6px; font-weight: 700; }
.notif__item { display: flex; gap: 10px; padding: 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.45; }
.notif__item:hover { background: var(--bg); }
.notif__item.is-new { background: var(--primary-soft); }
.notif__icon { flex: none; width: 20px; text-align: center; }
.notif__text { min-width: 0; display: grid; }
.notif__text small { color: var(--muted); font-size: 12px; }
.notif__empty { margin: 8px; }
@media (max-width: 767px) { .notif__panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-height: 70vh; } }

/* 사다리 연출 (auction-ladder.js) */
.ladder { position: relative; }
.ladder__hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.ladder__again { padding: 2px 10px; min-height: 0; }
.ladder__count { position: absolute; left: 50%; top: 45%; z-index: 4; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; font-size: 64px; font-weight: 900; color: var(--primary-dark); text-shadow: 0 4px 18px rgba(74, 120, 224, .35); }
.ladder__count.is-on { animation: ladder-count .6s ease-out forwards; }
@keyframes ladder-count { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } }
.ladder__trail { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: .35; }
.ladder__token circle { stroke: #fff; stroke-width: 2; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.ladder__token text { fill: #fff; font-size: 11px; font-weight: 800; pointer-events: none; }
.ladder__token { transition: opacity .4s; }
.ladder__token.is-out { opacity: 0; }
.ladder__token.is-win circle { r: 14; stroke: #f3d27a; stroke-width: 3; }
.ladder__end.is-flip { animation: ladder-flip .45s ease-out; transform-box: fill-box; transform-origin: center; }
.ladder__end.is-miss { fill: var(--miss-fill); }
.ladder__end.is-prize { font-size: 15px; animation: ladder-flip .45s ease-out, ladder-glow 1.2s ease-in-out .45s 3; }
@keyframes ladder-flip { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ladder-glow { 50% { filter: drop-shadow(0 0 6px #f3c14a); } }
.auc-winner.is-pop { display: inline-block; animation: auc-pop .6s cubic-bezier(.2, 1.6, .4, 1); color: var(--gold); }
@keyframes auc-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ladder__confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.ladder__confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; animation: ladder-confetti 1.8s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes ladder-confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 60% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--rot)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ladder__count, .ladder__confetti { display: none; } .auc-winner.is-pop, .ladder__end.is-flip, .ladder__end.is-prize { animation: none; } }

/* 사다리 끝: 화면 가운데 당첨자 이름 */
.ladder__banner { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .35); cursor: pointer; animation: ladder-fade .25s ease-out; }
.ladder__banner.is-out { opacity: 0; transition: opacity .3s; }
.ladder__banner-box { min-width: min(320px, 100%); max-width: 100%; padding: 22px 28px; border-radius: 18px; background: var(--surface); text-align: center; box-shadow: 0 18px 48px rgba(0, 0, 0, .25); animation: auc-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.ladder__banner-top { margin: 0; font-size: 16px; font-weight: 700; color: var(--gold); }
.ladder__banner-name { margin: 4px 0; font-size: clamp(30px, 9vw, 48px); font-weight: 900; color: var(--text); overflow-wrap: anywhere; }
.ladder__banner-item { margin: 0; color: var(--muted); font-size: 14px; }
@keyframes ladder-fade { from { opacity: 0; } }
.auc-photo { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.auc-photo.is-over { border-color: var(--primary); background: var(--primary-soft); }
.auc-photo__preview { max-width: 220px; max-height: 160px; border-radius: 8px; background: #1b1f22; object-fit: contain; }
.auc-photo__preview[hidden] { display: none; }
.auc-photo__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.auc-photo__btns label.btn { cursor: pointer; }
.field[hidden], .btn[hidden], .hint[hidden] { display: none; }
.auc-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.auc-check input { margin-top: 3px; }
.auc-check small { display: block; font-weight: 400; }
.auc-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.auc-pick select { min-height: 32px; max-width: 180px; }

/* 핀볼 추첨 (auction-pinball.js) */
.pinball__wrap { display: flex; justify-content: center; }
.pinball__svg { display: block; max-width: 100%; height: auto; }
.pinball__pegs circle { fill: var(--peg); }
.pinball__bins line { stroke: var(--peg); stroke-width: 2; }
.pinball__ball circle { stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.pinball__ball text { fill: #fff; font-weight: 800; pointer-events: none; }
.pinball__ball.is-win circle { stroke: #f3d27a; stroke-width: 3; }
.pinball__label { font-size: 12px; fill: var(--muted); }
.pinball__label.is-flip { animation: ladder-flip .45s ease-out; transform-box: fill-box; transform-origin: center; }
.pinball__label.is-miss { fill: var(--miss-fill); }
.pinball__label.is-prize { fill: var(--gold); font-weight: 800; font-size: 13px; animation: ladder-flip .45s ease-out, ladder-glow 1.2s ease-in-out .45s 3; }

/* 오리 레이스 (auction-duck.js) */
.duck__track { position: relative; display: grid; gap: 4px; padding: 6px 0; }
.duck__finish { position: absolute; top: 0; bottom: 0; right: 4px; width: 6px; z-index: 2; background: repeating-linear-gradient(0deg, #333 0 6px, #fff 6px 12px); border-radius: 2px; opacity: .7; }
.duck__lane { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 6px; }
.duck__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 700; text-align: right; }
.duck__water { position: relative; height: 30px; margin-right: 12px; border-radius: 8px; overflow: hidden; background: linear-gradient(180deg, #d9ecfb, #b9dbf5); }
.duck__water::before { content: ""; position: absolute; inset: auto 0 0 0; height: 10px; background: radial-gradient(circle at 10px -4px, transparent 9px, rgba(255, 255, 255, .55) 10px) 0 0 / 20px 10px repeat-x; }
.ladder.is-racing .duck__water::before { animation: duck-waves 1s linear infinite; }
@keyframes duck-waves { to { background-position: -20px 0; } }
.duck__duck { position: absolute; top: 1px; left: 0; display: inline-flex; align-items: center; gap: 2px; font-size: 22px; line-height: 28px; white-space: nowrap; }
.duck__body { display: inline-block; transform: scaleX(-1); }
.ladder.is-racing .duck__body { animation: duck-bob .45s ease-in-out infinite alternate; }
@keyframes duck-bob { from { transform: scaleX(-1) translateY(0) rotate(0); } to { transform: scaleX(-1) translateY(-3px) rotate(6deg); } }
.duck__rank { font-size: 12px; font-weight: 800; color: var(--muted); }
.duck__lane.is-lead .duck__name { color: var(--primary-dark); }
.duck__lane.is-lead .duck__duck::after { content: "👑"; position: absolute; left: 4px; top: -12px; font-size: 13px; }
.duck__lane.is-win .duck__name, .duck__lane.is-win .duck__rank { color: var(--gold); }
.duck__lane.is-win .duck__water { box-shadow: 0 0 0 2px #f3c14a inset; background: linear-gradient(180deg, var(--gold-bg-6), #f6dc9c); }

/* 공통 이펙트 (auction-fx.js) */
.auc-flash { position: fixed; inset: 0; z-index: 59; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(255, 214, 102, .55), rgba(255, 214, 102, 0) 60%); animation: auc-flash .9s ease-out forwards; }
@keyframes auc-flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.auc-rays { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 210, 90, .28) 0 10deg, transparent 10deg 20deg); animation: auc-rays 6s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes auc-rays { to { transform: rotate(360deg); } }
.ladder__banner-box { position: relative; }
.auc-spark { position: absolute; color: #f3c14a; font-size: 20px; animation: auc-spark 1.2s ease-in-out infinite; }
.auc-spark.s1 { left: 10px; top: 8px; } .auc-spark.s2 { right: 14px; top: 18px; animation-delay: .4s; } .auc-spark.s3 { right: 40px; bottom: 10px; animation-delay: .8s; }
@keyframes auc-spark { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.2); } }
.auc-sound[aria-pressed="true"] { border-color: var(--primary); color: var(--primary-dark); }
@media (prefers-reduced-motion: reduce) { .auc-rays, .auc-spark, .ladder.is-racing .duck__body, .ladder.is-racing .duck__water::before { animation: none; } }
@media (max-width: 479px) { .duck__lane { grid-template-columns: 56px 1fr; } .duck__name { font-size: 11.5px; } .auc-rays { width: 360px; height: 360px; } }
.auc-del { color: var(--bad-3); }
.auc-form__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.auc-photo__now { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.auc-row__act { flex-wrap: wrap; justify-content: flex-end; }
.auc-form select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; }
.auc-dt { display: flex; gap: 6px; }
.auc-dt input[type="date"] { flex: 1 1 auto; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; }
.auc-dt input[type="text"] { flex: 0 0 84px; text-align: center; font-variant-numeric: tabular-nums; }
.auc-dt input.is-bad { border-color: #d65a5a; background: var(--bad-bg-8); }
.auc-dt__note { display: block; min-height: 1.2em; margin-top: 2px; }
.ladder__wrap { display: flex; justify-content: safe center; }
/* 끝난 입찰 한 줄 요약 (펼치면 결과) */
.auc-done { padding-top: 12px; padding-bottom: 12px; }
.auc-done__sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; cursor: pointer; list-style: none; }
.auc-done__sum::-webkit-details-marker { display: none; }
.auc-done__name { font-weight: 800; }
.auc-done__win { font-weight: 700; color: var(--gold); }
.auc-done__more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--primary-dark); }
.auc-done[open] .auc-done__more { color: var(--muted); }
.auc-done[open] > .auc-card__body { margin-top: 12px; }
.auc-card__zoom { position: relative; flex: none; display: block; border-radius: 10px; cursor: zoom-in; }
.auc-card__zoom-ico { position: absolute; right: 4px; bottom: 4px; padding: 1px 4px; border-radius: 6px; background: rgba(255, 255, 255, .85); font-size: 12px; }
.auc-lightbox { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 22, .82); cursor: zoom-out; animation: ladder-fade .2s ease-out; }
.auc-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; box-shadow: 0 18px 48px rgba(0, 0, 0, .45); cursor: default; }
.auc-lightbox__x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 18px; cursor: pointer; }
/* 접힌 결과를 펼쳤을 때: 이름은 요약 줄에 있으니 카드 머리에서는 숨김 · 다시 보기 / 소리 버튼은 오른쪽에 나란히 */
.auc-done .auc-card__name { display: none; }
.ladder__hint { justify-content: flex-start; }
.ladder__hint .ladder__again { margin-left: auto; }
.ladder__hint .ladder__again + .ladder__again { margin-left: 0; }

/* 입찰 화면 다듬기 (사진 비율 · 폰 제목 · 터치 높이 · 운영진 영역 · 찾기) */
.auc-card__img { width: auto; height: auto; max-width: min(260px, 42vw); max-height: 120px; object-fit: contain; }
.auc-title small { display: block; margin: 2px 0 0; font-size: 13px; font-weight: 400; }
.auc-staff { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; padding: 8px 10px; border: 1px dashed var(--gold-line-3); border-radius: 10px; background: var(--gold-bg-2); }
.auc-staff__label { font-size: 12.5px; font-weight: 700; color: var(--gold-2); margin-right: 4px; }
.auc-staff form { margin: 0; }
.auc-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.auc-find input[type="search"] { flex: 1 1 180px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; }
.auc-none { margin: 0 0 12px; }
.auc-card[hidden], .auc-done[hidden] { display: none; }
.auc-lightbox { overflow: auto; }
.auc-lightbox__pan { max-width: 100%; max-height: 82vh; overflow: auto; border-radius: 10px; }
.auc-lightbox__pan img { display: block; max-width: 100%; max-height: 82vh; cursor: zoom-in; }
.auc-lightbox.is-zoom .auc-lightbox__pan img { max-width: none; max-height: none; width: auto; height: min(70vh, 520px); cursor: zoom-out; }
.auc-lightbox__tip { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; color: rgba(255, 255, 255, .8); font-size: 12.5px; pointer-events: none; }
@media (max-width: 640px) {
    .auc-card__body { flex-direction: column; }
    .auc-card__img { max-width: 100%; max-height: 140px; }
    .auc-card__name { font-size: 16.5px; line-height: 1.35; }
    .auc-title { font-size: 20px; }
    .auc-join .btn, .auc-staff .btn, .auc-pick .btn, .auc-row__act .btn, .ladder__again, .auc-find .chip { min-height: 44px; }
    .auc-lightbox.is-zoom .auc-lightbox__pan img { height: 46vh; }
}

/* 운영진 전용 칸 (일반 기능과 구분) */
.staff-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px dashed var(--gold-line-3); border-radius: 10px; background: var(--gold-bg-2); }
.staff-zone__label { font-size: 12.5px; font-weight: 700; color: var(--gold-2); }
.staff-zone .sheet-now { margin: 0; }
/* 명부 '⋯ 더보기' */
.row-more { display: inline-block; }
.row-more > summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
.row-more > summary::-webkit-details-marker { display: none; }
.row-more[open] > summary { color: var(--text); }
.row-more .row-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rows li[hidden] { display: none; }
/* 폰: 누르는 것은 모두 44px 이상 */
@media (max-width: 640px) {
    .btn--xs, .btn--sm, .chip, .row-more > summary, .details > summary, .subtabs__link { min-height: 44px; }
    .btn--xs, .btn--sm { display: inline-flex; align-items: center; justify-content: center; padding-left: 12px; padding-right: 12px; }
    .row-more > summary, .details > summary { display: flex; align-items: center; }
}

/* 입찰: 운영진 참여자 빼기 */
.auc-kick { flex: 0 0 auto; }
.auc-kick[open] { flex-basis: 100%; }   /* 접혀 있으면 다른 버튼과 한 줄, 펼치면 아래 줄 전체 */
.auc-kick > summary { list-style: none; display: inline-flex; cursor: pointer; }
.auc-kick > summary::-webkit-details-marker { display: none; }
.auc-kick[open] > summary { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary-dark); }
.auc-kick__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.auc-kick__list form { margin: 0; }
.auc-kick__btn { background: var(--surface); border-color: var(--bad-line-3); color: var(--bad); cursor: pointer; font: inherit; font-size: 13px; }
@media (max-width: 640px) { .auc-kick__btn { min-height: 44px; } }

/* 전투력 순위 꾸밈: 직업 색 · 메달 · 1위 대비 막대 · 위와의 차이 · 요약 */
.cls { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11.5px; font-weight: 700; line-height: 1.6; }
.cls--knight { background: var(--cls-knight-bg); color: var(--cls-knight); }
.cls--ranger { background: var(--cls-ranger-bg); color: var(--ok); }
.cls--mage { background: var(--cls-mage-bg); color: var(--cls-mage); }
.cls--healer { background: var(--cls-healer-bg); color: var(--cls-healer); }
.power-medal { font-size: 20px; line-height: 1; }
.power-score { flex: none; display: grid; justify-items: end; gap: 2px; min-width: 120px; }
.power-score .bar { width: 120px; margin-top: 2px; }
.rank-list li.is-leader .bar span { background: linear-gradient(90deg, #e0b04a, #f3d27a); }
.power-gap { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.power-summary { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--soft-bg); font-size: 13.5px; }
.power-summary b { font-weight: 700; }
@media (max-width: 640px) { .power-score { min-width: 96px; } .power-score .bar { width: 96px; } }
.power-bar { display: none; }
/* PC: 막대는 이름과 숫자 사이 가운데 (폰은 숫자 밑 짧은 막대) */
@media (min-width: 768px) {
    .rank-list--bar .rank-name { flex: 0 0 30%; }
    .rank-list--bar .power-bar { display: block; flex: 1; height: 8px; margin: 0 12px; align-self: center; }
    .rank-list--bar .power-score { min-width: 110px; }
    .rank-list--bar .power-score .bar { display: none; }
}

/* ── 전투력 순위 대시보드 (.power-board 안에서만) ── */
/* 직업 필터: 고른 것은 파랑으로 채움 */
.power-board .power-filter .chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
/* 검색 · 내 순위: 같은 높이 · 같은 모서리 */
.power-board .list-tools .filter-input, .power-board .list-tools .btn { box-sizing: border-box; height: 44px; min-height: 44px; border-radius: 10px; }
.power-board .list-tools .btn { padding: 0 16px; border-color: var(--line); color: var(--primary-dark); }
/* 요약 카드 */
.power-sum { display: grid; gap: 10px; margin: 0 0 14px; }
.power-sum__avg { display: grid; align-content: center; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--primary-soft); }
.power-sum__label { font-size: 12.5px; font-weight: 600; color: var(--primary-dark); }
.power-sum__avg b { font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.power-sum__avg small, .power-sum__top small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.power-sum__tops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.power-sum__top { display: grid; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.power-sum__top b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) {
    .power-sum { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
    .power-sum__tops { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* 일반 줄: 조금 촘촘하게, 순위 · 이름 · 전투력을 굵게 */
.power-board .rank-list--bar .rank-row { padding: 8px 4px; }
.power-board .rank-list--bar .rank-name { font-weight: 700; }
.power-board .rank-list--bar .rank-name small { font-weight: 400; }
.power-board .rank-list--bar .rank-total { font-size: 15.5px; font-weight: 800; }
.power-board .rank-list--bar .bar { height: 8px; background: var(--bar-track); }
.power-board .rank-list--bar .bar span { background: linear-gradient(90deg, #7d9fe8, #4a78e0); }
/* TOP 3: 금 · 은 · 동 테두리와 옅은 바탕 (그림자 · 반짝임 없음) */
.power-board .rank-list--bar > li.is-top { margin: 0 0 8px; border: 1px solid; border-radius: 12px; }
.power-board .rank-list--bar > li.is-top + li:not(.is-top) { border-top: 0; }
.power-board .rank-list--bar > li.is-top .rank-row { padding: 12px 12px 12px 8px; }
.power-board .rank-list--bar > li.is-top .rank-name { font-size: 16px; }
.power-board .rank-list--bar > li.is-top .rank-total { font-size: 18px; }
.power-board .rank-list--bar > li.is-top .power-medal { font-size: 22px; }
.power-board .rank-list--bar > li.is-top-1 { border-color: var(--gold-line); background: var(--gold-bg); }
.power-board .rank-list--bar > li.is-top-2 { border-color: var(--silver-line); background: var(--soft-bg-2); }
.power-board .rank-list--bar > li.is-top-3 { border-color: var(--bronze-line); background: var(--bronze-bg); }
.power-board .rank-list--bar > li.is-top-1 .bar span { background: linear-gradient(90deg, #e9c46a, #d9a43a); }
.power-board .rank-list--bar > li.is-top-2 .bar span { background: linear-gradient(90deg, #c3cad6, #9aa4b5); }
.power-board .rank-list--bar > li.is-top-3 .bar span { background: linear-gradient(90deg, #e0b08a, #c58556); }
.power-board .rank-list--bar > li.is-top.is-mine { outline: 2px solid var(--mine-outline); outline-offset: -1px; }
.power-board .rank-list--bar > li.is-top .rank-more { padding-left: 46px; padding-right: 12px; }
@media (max-width: 640px) {
    .power-board .rank-list--bar > li.is-top .rank-row { padding: 10px 8px 10px 4px; }
    .power-sum__avg b { font-size: 22px; }
}

/* 실수 방지 버튼: 한 번 누른 상태 */
.btn.is-armed { background: var(--bad-bg); border-color: var(--bad-line-4); color: var(--bad); }

/* 사다리 재미 연출: 가로줄 반짝임 · 남은 인원 · 꽝 말풍선 · 왕관 */
.ladder__spark { fill: none; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: ladder-spark .5s ease-out forwards; }
@keyframes ladder-spark { from { transform: scale(.4); opacity: .95; } to { transform: scale(2.8); opacity: 0; } }
.ladder__left { margin-left: auto; padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--float-bg); font-size: 13px; font-weight: 800; color: var(--primary-dark); pointer-events: none; }
.ladder__left.is-final { border-color: var(--bad-line-2); background: var(--bad-bg-7); color: var(--bad-4); animation: ladder-beat .52s ease-in-out infinite; }
@keyframes ladder-beat { 50% { transform: scale(1.08); } }
.ladder__bubble { position: absolute; z-index: 5; padding: 2px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--muted-2); white-space: nowrap; pointer-events: none; transform: translate(-50%, -100%); animation: ladder-bubble 1.5s ease-out forwards; }
@keyframes ladder-bubble { 0% { opacity: 0; transform: translate(-50%, -70%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -100%) scale(1.06); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -200%); } }
.ladder__crown { font-size: 16px; transform-box: fill-box; transform-origin: center bottom; animation: auc-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@media (prefers-reduced-motion: reduce) { .ladder__spark, .ladder__bubble { display: none; } .ladder__left.is-final, .ladder__crown { animation: none; } }
/* 결과 공개 직전: 열릴 말이 살짝 커짐 */
.ladder__token.is-peek circle { r: 14; stroke: #4a78e0; stroke-width: 3; }

/* 자리 정하기 (입찰 시작 폼) · 자리 섞기 연출 */
.auc-staff form.auc-draw { display: contents; }
.auc-seat .hint { margin: 6px 0 4px; }
.auc-seat__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; }
.auc-seat__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 600; }
.auc-seat__row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auc-seat__row .input { width: 72px; min-height: 40px; padding: 6px 8px; text-align: center; }
.ladder__name.is-pin { fill: var(--primary-dark); font-weight: 800; }
.ladder__name.is-settle { transform-box: fill-box; transform-origin: center; animation: auc-pop .45s cubic-bezier(.2, 1.6, .4, 1); }

/* 사다리 지진: 화면 흔들림 · 새로 생기는 주황 가로줄 */
.ladder__lines line.ladder__q { stroke: #f0a35c; }
.ladder__lines line.ladder__q.is-hidden { opacity: 0; }
.ladder__lines line.ladder__q.is-new { transform-box: fill-box; transform-origin: left center; animation: ladder-grow .45s ease-out; }
@keyframes ladder-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ladder__svg.is-quake { animation: ladder-shake .6s linear 2; }
@keyframes ladder-shake { 0%, 100% { transform: translate(0, 0); } 15% { transform: translate(-5px, 2px) rotate(-.4deg); } 30% { transform: translate(5px, -2px) rotate(.4deg); } 45% { transform: translate(-4px, -1px); } 60% { transform: translate(4px, 2px) rotate(-.3deg); } 75% { transform: translate(-2px, 1px); } 90% { transform: translate(2px, -1px); } }
@media (prefers-reduced-motion: reduce) { .ladder__svg.is-quake, .ladder__lines line.ladder__q.is-new { animation: none; } }

/* 사다리 게임 페이지 */
.auc-gamelink { margin: -6px 0 12px; }
.ladder-start { margin-top: 12px; }
.ladder-start .auc-seat .auc-seat__list { margin-top: 8px; }
.ladder-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 600; }
.ladder-opts label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; }
.ladder-opts input { width: 18px; height: 18px; }
.ladder-stage { margin-top: 14px; }
.ladder-stage:empty { display: none; }

/* 사다리 결과 칸 직접 쓰기: 당첨 말풍선 · 결과표 */
.ladder__bubble.is-good { border-color: var(--gold-line); background: var(--gold-bg); color: var(--gold-3); }
.ladder__results { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin: 12px 0 0; padding: 0; }
.ladder__results li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.ladder__results li.is-good { border-color: var(--gold-line); background: var(--gold-bg); }
.ladder__results li span { color: var(--muted); }
.ladder__results li.is-good span { color: var(--gold-3); font-weight: 700; }

/* 사다리 게임: 자리 섞기 누를 때 이름 칸 반짝 */
.input.is-shuffled { animation: lg-shuffle .5s ease; }
@keyframes lg-shuffle { from { background: var(--flash-blue); } }

/* 사다리 게임 입력 (간단하게): 왼쪽 짧은 이름표 · 자리 순서 칩 · 버튼 한 줄 */
.lg-form { gap: 10px; }
.lg-field { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 8px; margin: 0; }
.lg-field > span { font-size: 14px; font-weight: 700; white-space: nowrap; }
.lg-field textarea { min-height: 44px; resize: vertical; }
.lg-seats { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0 80px; padding: 0; }
.lg-seats li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft-bg-5); font-size: 13px; font-weight: 600; }
.lg-seats b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #5b80d6; color: #fff; font-size: 11px; }
.lg-seats.is-shuffled li { animation: lg-pop .35s ease both; }
@keyframes lg-pop { from { transform: scale(.7); opacity: 0; } }
.lg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lg-actions .btn--primary { flex: 1 1 180px; }
.lg-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.lg-toggle input { width: 18px; height: 18px; }
@media (max-width: 480px) {
  .lg-field { grid-template-columns: 1fr; gap: 4px; }
  .lg-seats { margin-left: 0; }
}

/* 전투력: 최근 3일 제출 알림 줄 (NEW = 마지막으로 본 뒤 올라온 것) */
.power-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 10px 14px; border: 1px solid var(--gold-line); border-radius: 12px; background: var(--gold-bg); font-size: 14px; }
.power-recent__head { font-weight: 700; margin-right: 2px; }
.power-recent__name { display: inline-flex; align-items: center; gap: 4px; color: var(--text); text-decoration: none; }
.power-recent__name:hover { text-decoration: underline; }
.power-recent__name[hidden] { display: none; }
.power-new { padding: 0 6px; border-radius: 6px; background: #f3d27a; color: #6b4a00; font-size: 11px; font-weight: 800; line-height: 18px; }
.power-recent__more { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }

/* 전투력 순위 변화: 순위 변동(7일 전 대비) · 점수 변화(지난 측정 대비) — 연한 색, 작게 */
.power-move { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 17px; vertical-align: 1px; }
.power-move.is-up { background: var(--ok-bg-3); color: var(--ok-4); }
.power-move.is-down { background: var(--bad-bg-2); color: var(--bad-5); }
.power-move.is-new { background: var(--gold-bg-6); color: var(--gold-3); }
.power-move.is-partial { background: var(--chip-bg); color: var(--muted); font-weight: 600; cursor: help; }   /* 일부 측정: 눈에 띄되 순위 변동보다 약하게 */
.power-delta { font-weight: 700; }
.power-delta.is-up { color: var(--ok-4); }
.power-delta.is-down { color: var(--bad-5); }

/* 다크 모드 버튼 (머리글): 라이트에선 달, 다크에선 해 */
.theme-btn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; }
.theme-btn:hover { color: var(--text); }
.theme-btn .icon { width: 19px; height: 19px; }
.theme-btn__sun { display: none; }
:root[data-theme="dark"] .theme-btn__moon { display: none; }
:root[data-theme="dark"] .theme-btn__sun { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn__moon { display: none; }
  :root:not([data-theme="light"]) .theme-btn__sun { display: inline-flex; }
}

/* 다크 모드 입력창: 따로 색을 정하지 않은 칸(브라우저 기본 회색)을 카드색으로. :where 로 우선순위 0 → 칸마다 정한 색(오류 표시 등)이 이긴다. 라이트에는 영향 없음 */
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) :where(textarea, select, input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=submit]):not([type=button])) { background-color: var(--surface); color: var(--text); }
}
:where(:root[data-theme="dark"]) :where(textarea, select, input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=submit]):not([type=button])) { background-color: var(--surface); color: var(--text); }

/* ── 홈: 내 캐릭터 요약 한 장 (2026-10-11) — 이름 · 적립금 / 숫자 3칸 / 버튼 2개. 자세한 건 각 페이지 ── */
.home-sum { padding: 16px 18px; }
.home-sum__title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 16px; }
.home-sum__title .icon { width: 18px; height: 18px; color: var(--muted); }
.home-sum__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.home-sum .home-sum__tabs { gap: 4px; padding: 0; }
.home-sum .home-sum__tabs .char-tab { min-height: 32px; padding: 3px 12px; font-size: 13px; }   /* 폰에서도 누르기 쉬운 높이 */
.home-sum__panel[hidden] { display: none; }
.home-sum__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.home-sum__who { min-width: 0; }
.home-sum__name { margin: 0; font-size: 16px; line-height: 1.4; }
.home-sum__name small { font-size: 12px; }
.home-sum__meta { margin: 2px 0 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-sum__bank { flex: none; display: grid; justify-items: end; text-align: right; }
.home-sum__bank b { font-size: 17px; font-variant-numeric: tabular-nums; }
.home-sum__bank small { font-size: 12px; }
.home-sum__tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin-top: 14px; }
.home-sum__tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.home-sum__tile:hover, .home-sum__tile:focus-visible { border-color: var(--primary); background: var(--primary-soft); }
.home-sum__tile:active { transform: scale(.98); }
.home-sum__spark { display: block; width: 100%; height: 34px; margin: 2px 0; overflow: visible; }   /* 홈 전투력 성장 그래프 */
.home-sum__spark polyline { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.home-sum__label { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 13px; color: var(--muted); }
.home-sum__narrow { display: none; }
.home-sum__label .icon { flex: none; width: 16px; height: 16px; color: var(--primary-dark); }   /* › 누르면 그 페이지로 */
.home-sum__num { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.home-sum__sub { font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }
.home-sum__actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin-top: 14px; }
.home-sum__actions .btn { justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; }
.home-sum__actions .btn .icon { width: 19px; height: 19px; }
@media (max-width: 479px) {
    .home-sum { padding: 14px; }
    .home-sum__tiles { gap: 6px; margin-top: 12px; }
    .home-sum__tile { padding: 10px; }
    .home-sum__label { font-size: 12px; }
    .home-sum__num { font-size: 21px; }
    .home-sum__sub { font-size: 11.5px; }
    .home-sum__bank b { font-size: 15px; }
    .home-sum__bank small { font-size: 11px; }
    .home-sum__actions { gap: 8px; margin-top: 12px; }
    .home-sum__of { display: none; }   /* 폰: '/ 45명'은 숨겨 한 줄로 */
    /* 폰: 적립금은 아래 한 줄로 내려 이름 · 캐릭터 칩이 한 줄에 들어가게, (시트 N)은 숨김(레벨 글자에 마우스를 올리면 보임) */
    .home-sum__head { flex-wrap: wrap; row-gap: 6px; }
    .home-sum__who { flex: 1 1 100%; }
    .home-sum__bank { flex: 1 1 100%; display: flex; align-items: baseline; justify-content: space-between; padding: 4px 10px; border-radius: 10px; background: var(--bg); }
    .home-sum__sheet { display: none; }
    .home-sum__wide { display: none; }   /* 폰: '이번 주 PVP' → '주간 PVP' (› 와 한 줄에) */
    .home-sum__narrow { display: inline; }
}

/* ── 메뉴: PC 위 메뉴도 아이콘 + 짧은 이름 (폰 하단 탭과 같은 아이콘 · 이름, 2026-10-11) ── */
.topnav__link { display: inline-flex; align-items: center; gap: 6px; }
.topnav__link .icon { width: 17px; height: 17px; }
.topnav__link { white-space: nowrap; }   /* 글자가 세로로 쪼개지지 않게 */
@media (min-width: 768px) and (max-width: 959px) {
    /* 태블릿 · 좁은 창: 아이콘을 숨기고 간격을 줄여 메뉴 7개 + 계정이 한 줄에 */
    .topbar__inner { gap: 12px; padding: 0 12px; }
    .topnav { gap: 0; }
    .topnav__link { padding: 8px 8px; }
    .topnav__link .icon { display: none; }
}

/* ── 홈: 내 처치 기록 (기간 탭 = 처치 수, 대상별 횟수 막대, 적 이름 검색) ── */
.kl { scroll-margin-top: 80px; }
.kl__panel[hidden] { display: none; }
.kl__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-bottom: 10px; }
.kl__head h2 small { font-size: 13px; font-weight: 600; }
.kl__head > small { font-size: 12px; }
.kl__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.kl__tab { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.kl__tab > span { max-width: 100%; overflow-wrap: anywhere; }   /* 대회 이름이 길어도 칸 안에서 줄바꿈 */
.kl__tab b { color: var(--text); font-size: 20px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kl__tab b small { margin-left: 1px; font-size: 12px; font-weight: 600; }
.kl__tab.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.kl__search { width: 100%; margin: 10px 0 6px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }   /* 다른 입력칸과 같은 모양 */
.kl__search:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.kl__list, .kl__found { list-style: none; margin: 0; padding: 0; }
.kl__list li { border-top: 1px solid var(--line); }
.kl__list li:first-child { border-top: 0; }
.kl__list summary { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 2.5em; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; list-style: none; }
.kl__list summary::-webkit-details-marker { display: none; }
.kl__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.kl__bar { height: 6px; border-radius: 999px; background: var(--bar-track); overflow: hidden; }
.kl__bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.kl__list summary b { text-align: right; font-variant-numeric: tabular-nums; }
.kl__days { list-style: none; margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; background: var(--bg); font-size: 13px; }
.kl__days li { display: grid; grid-template-columns: 5.6em 2.8em minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.kl__days b { font-variant-numeric: tabular-nums; }
.kl__date { font-variant-numeric: tabular-nums; }
.kl__empty { padding: 10px 0; }
.kl__found li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.kl__found li:first-child { border-top: 0; }
.kl__found li[hidden], .kl__list[hidden], .kl__found[hidden] { display: none; }   /* 검색에서 걸러진 줄 · 다른 기간 목록은 숨김 (display: flex 가 hidden 을 덮지 않게) */
.kl__counts { font-size: 13px; color: var(--muted); }
.kl__counts b { color: var(--text); }
.kl__none { padding: 8px 0; }
.kl__more { padding: 2px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 479px) {
    .kl__tabs { gap: 4px; }
    .kl__tab { padding: 6px 8px; font-size: 11.5px; }
    .kl__tab b { font-size: 17px; }
    .kl__list summary { grid-template-columns: minmax(0, 7em) minmax(0, 1fr) 2em; gap: 8px; }
}

/* 메뉴 '적혈': 핵심 메뉴라 붉은 계열로 눈에 띄게 (아이콘 · 글자만, 배경은 그대로). PC 상단 · 모바일 하단 탭 같이 */
.topnav__link[data-menu="watchlist"], .tabbar__item[data-menu="watchlist"] { color: var(--menu-red); }
.topnav__link[data-menu="watchlist"]:hover, .topnav__link[data-menu="watchlist"].is-active, .tabbar__item[data-menu="watchlist"].is-active { color: var(--menu-red); }
.topnav__link[data-menu="watchlist"] .icon, .tabbar__item[data-menu="watchlist"] .icon { color: var(--menu-red); }

/* 폰: 입력칸 글자가 16px보다 작으면 아이폰이 누를 때 화면을 확대한다 */
@media (max-width: 640px) {
    input:not([type="radio"]):not([type="checkbox"]):not([type="range"]), select, textarea { font-size: 16px; }
}

/* ── 적립금 사용 신청서 (fund/apply) · 홈 적립금 아래 '사용 신청 ›' ── */
.home-sum__fund { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.fund-apply { max-width: 760px; }
.fund-apply__how { margin: 0 0 16px; padding: 10px 12px 10px 30px; border-radius: 10px; background: var(--bg); font-size: 14px; line-height: 1.7; }
.fund-apply__add { justify-self: start; }
.fund-apply__result { max-width: 760px; margin-top: 12px; }
.fund-apply__preview { display: block; width: 100%; min-height: 230px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; line-height: 1.55; resize: vertical; }
.fund-items { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fund-item { display: grid; grid-template-columns: minmax(0, 1fr) 132px 110px 92px 40px; gap: 6px; align-items: center; padding: 8px; }
.fund-item + .fund-item { border-top: 1px dashed var(--line); }
.fund-item--head { padding-top: 6px; padding-bottom: 0; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); }
.fund-item input[type="text"] { padding: 8px; }
.fund-item [data-f="qty"], .fund-item [data-f="price"], .fund-item [data-f="dia"] { text-align: right; }
.fund-qty { display: flex; gap: 4px; min-width: 0; }
.fund-qty input[type="text"] { min-width: 0; text-align: center; }
.fund-qty .btn, .fund-item__x { flex: none; min-width: 36px; padding: 0; justify-content: center; }
.fund-item__x { border: 0; color: var(--muted); }
.fund-items input.is-bad, .fund-apply input.is-bad { border-color: var(--bad-line-4); background: var(--bad-bg-8); }
.fund-sum { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); }
.fund-sum div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14.5px; }
.fund-sum b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fund-sum b.is-bad { color: var(--bad); }
.fund-sum .field__error { margin: 0; text-align: right; }
.field__error[hidden] { display: none; }
@media (max-width: 640px) {
    /* 폰: 패키지 이름은 한 줄 전체, 아래 줄에 개수 · 가격 · 다이아 · 빼기 */
    .fund-item { grid-template-columns: 104px minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 4px; }
    .fund-qty .btn { min-width: 30px; }
    .fund-item [data-f="name"] { grid-column: 1 / -1; }
    .fund-item--head { display: none; }
    .fund-apply input[type="text"], .fund-apply select { font-size: 16px; }   /* 아이폰 확대 방지 */
}

/* 전투력 측정: 저장 안 됨 이유 (저장 버튼 바로 위) */
.power-error { margin: 0; padding: 10px 12px; border: 1px solid var(--bad-line); border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 14px; font-weight: 600; }

/* 전투력 순위: 세부 숫자 줄(PVE · PVP · 공격 …)은 한 단계 연하게 — 종합 점수가 먼저 보이게 */
.power-board .rank-more { color: var(--muted); font-size: 12.5px; }
.power-board .rank-more a { color: var(--primary); }
