/* ── 보스매니저 관리페이지 ───────────────────────────────── */
:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --surface-3: #e8ebf4;
  --border: #e3e6ef;
  --text: #1b1e2b;
  --muted: #6b7185;
  --accent: #5b5bd6;
  --accent-2: #8b5cf6;
  --accent-soft: #ecebff;
  --accent-text: #ffffff;
  --ok: #16a34a;
  --ok-bg: #e7f7ed;
  --warn: #b45309;
  --warn-bg: #fef3e2;
  --bad: #dc2626;
  --bad-bg: #fdecec;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 4px 16px rgba(20, 24, 40, .05);
  --clan-l: 52%;
  --clan-s: 62%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11131a;
    --surface: #191c26;
    --surface-2: #222634;
    --surface-3: #2b3041;
    --border: #2c3142;
    --text: #e8eaf2;
    --muted: #9aa0b4;
    --accent: #8b8cf6;
    --accent-2: #a78bfa;
    --accent-soft: #272a4a;
    --ok: #4ade80;
    --ok-bg: #15301f;
    --warn: #fbbf24;
    --warn-bg: #352a12;
    --bad: #f87171;
    --bad-bg: #3a1c1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --clan-l: 62%;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 23px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 13px; }

/* ── 상단 ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.guild-pill {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 10px 4px 4px;
  background: var(--surface-2); border-radius: 999px; color: var(--text);
}
.guild-pill:hover { text-decoration: none; background: var(--surface-3); }
.guild-pill img, .guild-pill .gi { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.guild-pill .gi { display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.guild-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 600; }
.spacer { flex: 1; }
.avatar { width: 30px; height: 30px; border-radius: 50%; }
.uname { font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .uname, .brand-text { display: none; } }

.tabs-wrap { max-width: 1100px; margin: 0 auto; padding: 0 12px; }
/* 메뉴: 넓은 화면은 줄바꿈(전부 보이게), 좁은 화면은 옆으로 밀기 + 오른쪽 흐림 표시 */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0 10px; }
.tabs a {
  display: flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px;
  color: var(--muted); white-space: nowrap; font-size: 13.5px; font-weight: 600;
}
@media (max-width: 760px) {
  .tabs-wrap { position: relative; }
  .tabs-wrap::after { content: ""; position: absolute; top: 0; right: 0; bottom: 4px; width: 28px; pointer-events: none;
    background: linear-gradient(to right, transparent, var(--surface)); }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-right: 24px; -webkit-overflow-scrolling: touch; }
  .tabs a { padding: 6px 10px; font-size: 13px; }
}
.tabs a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.tabs a.active { color: var(--accent-text); background: var(--accent); }
.tabs .view-only { margin-left: auto; align-self: center; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 10px; border: 1px dashed var(--border); border-radius: 999px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 22px 16px 70px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-head .spacer { flex: 1; }

/* ── 카드 / 그리드 ────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }

/* 요약 카드 */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
@media (max-width: 480px) { .stat .value { font-size: 24px; } .stat { padding: 14px; } }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ── 폼 ───────────────────────────────────────────── */
label.field { display: block; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 140px; resize: vertical; font-family: ui-monospace, "Consolas", monospace; font-size: 14px; }
input.sm, select.sm { padding: 5px 8px; font-size: 13px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.checks label, label.inline { display: flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }

/* ── 버튼 ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--border); }
.btn.danger:hover { background: var(--bad-bg); filter: none; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 13px 24px; font-size: 16px; border-radius: 12px; }
.x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 3px; font-size: 13px; line-height: 1; }
.x:hover { color: var(--bad); }

/* ── 알림 / 배지 ──────────────────────────────────── */
.flash { padding: 11px 15px; border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* 혈맹 색 */
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: hsl(var(--h, 0) var(--clan-s) var(--clan-l)); }
.cdot.none { background: var(--muted); }
.clan-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: hsl(var(--h, 0) var(--clan-s) var(--clan-l) / .14); color: hsl(var(--h, 0) var(--clan-s) calc(var(--clan-l) - 12%));
}
@media (prefers-color-scheme: dark) { .clan-tag { color: hsl(var(--h, 0) var(--clan-s) 72%); } }
.clan-tag.none { background: var(--surface-2); color: var(--muted); }

/* ── 세그먼트(혈 탭) / 주간 이동 ──────────────────── */
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.seg a {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 14px; font-weight: 600;
}
.seg a:hover { text-decoration: none; background: var(--surface-2); }
.seg a.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.seg .count { font-size: 12px; color: var(--muted); font-weight: 700; }
.seg a.active .count { color: var(--accent); }

.weeknav {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.weeknav a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--text); }
.weeknav a:hover { background: var(--surface-2); text-decoration: none; }
.weeknav .range { padding: 0 8px; font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── 표 ───────────────────────────────────────────── */
/* 표: 헤더 고정 (표 안에서 스크롤) */
.table-wrap { overflow: auto; margin: 0 -4px; max-height: calc(100vh - 170px); }
.table-wrap thead { position: sticky; top: 0; z-index: 2; }
.table-wrap thead th { box-shadow: inset 0 -1px 0 var(--border); }
.stock-form { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.stock-form[hidden], .stock-btn[hidden] { display: none; }
.stock-btn { cursor: pointer; border: 0; font: inherit; }
.stock-form input[type=number] { width: 64px; text-align: right; }
.floor-buys-wrap { max-height: min(460px, 60vh); }  /* 층줌 매입 신청: 약 10줄, 나머지는 스크롤 */
/* 헤더: 이름(누르면 정렬) + 필터 아이콘 */
.th-inner { display: inline-flex; align-items: center; gap: 4px; }
th.num .th-inner { flex-direction: row-reverse; }
.th-label { cursor: pointer; user-select: none; }
.th-label:hover { color: var(--text); }
th[data-sort="asc"] .th-label::after { content: "↑"; margin-left: 3px; color: var(--accent); }
th[data-sort="desc"] .th-label::after { content: "↓"; margin-left: 3px; color: var(--accent); }
.th-filter {
  display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--muted); opacity: 0; cursor: pointer; position: relative; transition: opacity .12s, background .12s;
}
th.th-tools:hover .th-filter, .th-filter:focus-visible, .th-filter.open, .th-filter.on { opacity: 1; }
.th-filter:hover, .th-filter.open { background: var(--surface-3); color: var(--text); }
.th-filter.on { color: var(--accent); background: var(--accent-soft); }
.th-filter.on::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
@media (hover: none) { .th-filter { opacity: .55; } }
tr.f-hide { display: none; }

/* 필터 드롭다운 */
.fpop {
  position: fixed; z-index: 50; width: 244px; padding: 8px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 400;
  box-shadow: 0 12px 32px rgba(20, 24, 40, .16), 0 2px 6px rgba(20, 24, 40, .08);
  animation: fpop-in .12s ease-out;
}
@keyframes fpop-in { from { opacity: 0; transform: translateY(-4px); } }
.fpop-sort { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 8px; }
.fpop-sort button, .fpop-foot button {
  border: 0; border-radius: 8px; padding: 7px 8px; background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer;
}
.fpop-sort button:hover, .fpop-foot button:hover { background: var(--surface-3); }
.fpop-search { width: 100%; padding: 7px 10px; font-size: 13px; border-radius: 8px; }
.fpop-all { display: flex; align-items: center; gap: 8px; padding: 8px 6px 6px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.fpop-list { max-height: 240px; overflow: auto; padding: 4px 0; overscroll-behavior: contain; }
.fpop-list label { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 7px; cursor: pointer; }
.fpop-list label:hover { background: var(--surface-2); }
.fpop-list label[hidden] { display: none; }
.fpop-list span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpop-list em { font-style: normal; font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.fpop input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); flex: none; }
.fpop-foot { display: flex; justify-content: flex-end; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.fpop-foot button { background: none; color: var(--muted); padding: 5px 8px; }

/* 분배금 */
tfoot .sum-row td { font-weight: 700; background: var(--surface-2); border-bottom: 0; }
.paid-select { width: auto; min-width: 56px; font-weight: 700; }
.paid-select.on { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
tr.paid td { color: var(--muted); }
tr.zeroed td { color: var(--muted); }
td.empty-row { text-align: center; color: var(--muted); padding: 18px 10px; }
b.pos { color: var(--ok); } b.neg { color: var(--bad); }

/* 혈창고 */
.storage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.storage-card { margin: 0; }
.storage-table td { padding: 7px 8px; font-size: 14px; }
.storage-table tr:last-child td { border-bottom: 0; }
.storage-table tr.grp-start td { border-top: 2px solid var(--surface-3); }
.storage-table tr.empty .item-name { color: var(--muted); }
.storage-table .qty { width: 80px; font-weight: 700; }
.storage-table .qty-input { width: 64px; height: 30px; min-height: 0; text-align: right; padding: 2px 8px; font-size: 14px; font-weight: 700; border-radius: 7px; }
.row-tools { width: 1%; white-space: nowrap; text-align: right; }
.icon-btn { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted);
  font-size: 11px; cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { color: var(--bad); background: var(--bad-bg); }
.icon-btn:disabled { opacity: .25; cursor: default; }
.save-bar { position: sticky; bottom: 12px; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  margin: 14px 0; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sub-head { margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.per-point { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 12px 16px;
  border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--muted); font-size: 14px; }
.per-point b { font-size: 24px; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.per-point em { font-style: normal; font-size: 12px; margin-left: auto; }
.week-pick tr.picked td { background: var(--accent-soft); }
.week-pick input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.mode-seg { margin: 0; }
.bid-form [hidden] { display: none !important; }

/* 혈비 이전 내역 링크 */
.links-pop { width: 320px; right: 0; }
.link-row { display: flex; align-items: center; gap: 6px; }
.link-row a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-add { display: grid; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.link-add input { font-size: 13px; padding: 7px 10px; }

/* 정각 알림 제외 시간 */
.hour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; }
.hour-chip { cursor: pointer; }
.hour-chip input { position: absolute; opacity: 0; pointer-events: none; }
.hour-chip span { display: block; text-align: center; padding: 6px 0; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.hour-chip input:checked + span { background: var(--bad-bg); color: var(--bad); border-color: transparent; text-decoration: line-through; }
.hour-chip input:focus-visible + span { outline: 2px solid var(--accent); }

/* 분배 내역 닉네임 검색 */
.history-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 22px -4px 10px; padding: 10px 4px; background: var(--bg); }
.share-search { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.share-search input { flex: 1; min-width: 200px; max-width: 380px; padding: 7px 12px; font-size: 13px; }
.share-table tr.q-hide { display: none; }
.share-table tr.q-hit td { background: var(--accent-soft); }
.payout-card[hidden] { display: none; }
.x-badge[hidden] { display: none; }

/* 혈원 추방 */
.kick-check { width: 16px; height: 16px; accent-color: var(--bad); cursor: pointer; }
.kick-bar { position: sticky; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 0; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--bad);
  box-shadow: var(--shadow); }
.kick-bar[hidden] { display: none; }
.kick-bar input[type="text"] { flex: 1; min-width: 180px; font-size: 13px; }
.kick-dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--bad); border-radius: var(--radius); padding: 20px;
  background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(20, 24, 40, .3); }
.kick-dialog::backdrop { background: rgba(10, 12, 20, .45); }
.kick-dialog h2 { color: var(--bad); margin: 0 0 8px; }
.kd-list { max-height: 200px; overflow: auto; margin: 0; padding: 8px 8px 8px 26px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }

/* 메뉴 설정 표 */
.menu-table td { padding: 10px; }
.menu-check { width: 18px; height: 18px; accent-color: var(--accent); }
.scope-seg { margin: 0; }
.scope-seg label { cursor: pointer; }
.scope-seg input { position: absolute; opacity: 0; pointer-events: none; }
.scope-seg span { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.scope-seg input:checked + span { background: var(--accent); color: var(--accent-text); }
.scope-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* 🔧 관리 메뉴 (상단 오른쪽) */
.admin-menu { position: relative; }
.admin-menu summary { list-style: none; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-menu summary::after { content: " ▾"; font-size: 10px; }
.admin-menu summary:hover, .admin-menu[open] summary { color: var(--text); border-color: var(--accent); }
.admin-menu.active summary { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }
.admin-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 170px; padding: 6px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(20, 24, 40, .16); display: grid; gap: 2px; }
.admin-pop a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600; }
.admin-pop a:hover { background: var(--surface-2); text-decoration: none; }
.admin-pop a.active { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 600px) { .uname { display: none; } }

/* 헤더 메뉴 설정 */
.tabs a.tab-hidden { opacity: .45; text-decoration: line-through; }
.tabs .menu-edit { align-self: center; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); margin-left: auto; }
.tabs .menu-edit + .view-as { margin-left: 6px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; background: var(--surface); transition: border-color .12s, background .12s; }
.menu-item:hover { border-color: var(--accent); }
.menu-item:has(input:checked) { background: var(--accent-soft); border-color: transparent; }
.menu-item input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.menu-item.locked { cursor: default; opacity: .75; }
.mi-icon { font-size: 18px; }
.mi-label { font-weight: 600; display: flex; flex-direction: column; line-height: 1.25; }
.mi-label em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 500; }

/* 일반 혈원 모드 미리보기 */
.tabs .view-as { margin-left: auto; align-self: center; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--accent);
  padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); }
.tabs .view-as:hover { text-decoration: none; filter: brightness(.97); }
.preview-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--warn-bg); color: var(--warn); font-size: 13px; border-bottom: 1px solid var(--border); }

/* 권한 카드 */
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.role-box {
  display: flex; flex-direction: column; gap: 10px; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.role-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.role-desc { margin-top: -6px; font-size: 12px; color: var(--muted); }
.role-box .chips { min-height: 28px; align-items: center; }
.role-add { margin-top: auto; padding-top: 4px; }
.ctl-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ctl-row select, .ctl-row .btn { height: 36px; font-size: 13px; }
.ctl-row select { width: auto; min-width: 0; padding: 0 30px 0 10px; }
.role-add select { flex: 1 1 160px; }
.ctl-row .btn { padding: 0 14px; white-space: nowrap; }
.req-box { margin-bottom: 14px; background: var(--surface-2); border-style: dashed; }
.req { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.req-who { flex: 1 1 220px; min-width: 0; }
.req .grant-clan[hidden] { display: none; }
tr.paid td b { color: var(--text); }

/* 자동 갱신 표시 (오른쪽 아래) */
.refresh-pill {
  position: fixed; right: 14px; bottom: 14px; z-index: 40; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1; box-shadow: var(--shadow); cursor: pointer; opacity: .85;
}
.refresh-pill:hover { opacity: 1; color: var(--text); }
.refresh-pill .ri { display: inline-block; font-size: 13px; }
.refresh-pill.spin .ri { animation: ri-spin .8s linear infinite; }
.refresh-pill.err { color: var(--bad); }
@keyframes ri-spin { to { transform: rotate(360deg); } }

/* 적용 중인 필터 칩 */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; }
.filter-bar[hidden] { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }
.fchip b { color: var(--accent); font-weight: 700; }
.fchip button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; }
.fchip button:hover { background: var(--surface); color: var(--text); }
.fcount { color: var(--muted); margin-left: 4px; }
.fclear { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fclear:hover { color: var(--text); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: none; letter-spacing: .02em; background: var(--surface-2); }
th:first-child { border-top-left-radius: 8px; } th:last-child { border-top-right-radius: 8px; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th, .nowrap { white-space: nowrap; }
.clan-tag, .badge, .time { white-space: nowrap; }
td input.sm, td select.sm { min-width: 0; }
tr.past td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.time { font-weight: 800; font-variant-numeric: tabular-nums; }

/* 참여율 막대 */
.bar { position: relative; height: 6px; border-radius: 999px; background: var(--surface-3); min-width: 70px; overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ── 서버 목록 ────────────────────────────────────── */
.server { display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.server img, .server .noicon {
  width: 46px; height: 46px; border-radius: 14px; flex: none; background: var(--accent-soft);
  display: grid; place-items: center; font-weight: 800; color: var(--accent);
}
.server .meta { flex: 1; min-width: 0; }
.server .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 체크리스트 */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: 9px; padding: 7px 0; }
.dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex: none; font-weight: 800; }
.dot.ok { background: var(--ok-bg); color: var(--ok); }
.dot.todo { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }

/* ── 명단 ─────────────────────────────────────────── */
.event-card .card-head h2 { font-size: 17px; }
.event-card .card-head .time { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 5px 3px 10px;
  border-radius: 999px; background: var(--surface-2); font-size: 14px;
  border: 1px solid transparent;
}
.chip.c { border-color: hsl(var(--h, 0) var(--clan-s) var(--clan-l) / .35); background: hsl(var(--h, 0) var(--clan-s) var(--clan-l) / .08); }
.chip form { display: inline; }
.clan-group + .clan-group { margin-top: 12px; }
.clan-group h3 { display: flex; align-items: center; gap: 7px; }
.drop-chip { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

details.card summary { cursor: pointer; font-weight: 700; }
pre.preview {
  margin: 10px 0 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm);
  white-space: pre-wrap; word-break: break-all; font: 13px/1.6 ui-monospace, "Consolas", monospace;
}

/* 첫 화면 */
.hero { text-align: center; padding: 80px 16px 40px; }
.hero .brand-mark { width: 64px; height: 64px; border-radius: 20px; font-size: 32px; margin: 0 auto 18px; }
.hero h1 { font-size: 34px; margin-bottom: 10px; }
.hero p { color: var(--muted); font-size: 17px; }
.features { margin-top: 36px; }
.features .card h3 { margin-bottom: 4px; font-size: 15px; }

/* 혈원 검색 */
.search { max-width: 260px; }
tr[hidden] { display: none; }

/* ── 설정 화면: 한 줄 = 왼쪽 제목·설명 / 오른쪽 입력칸 ───────── */
.set-card { padding: 0; overflow: hidden; }
.set-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.set-head h2 { margin: 0; }
.set-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
#nick-card { padding: 0 20px 20px; }
#nick-card .set-head { margin: 0 -20px 4px; }
.set-row { display: grid; grid-template-columns: minmax(180px, 32%) 1fr; gap: 8px 24px; padding: 16px 20px; border-bottom: 1px solid var(--border); align-items: start; }
.set-row:last-child { border-bottom: 0; }
.set-title { font-weight: 700; font-size: 14px; }
.set-hint { margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.set-control { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.set-control > select, .set-control > input[type=text], .set-control > textarea { max-width: 520px; }
.set-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.set-sub { padding: 10px 20px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; border-bottom: 1px solid var(--border); }
.inline-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.inline-fields label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.w-xs { width: 84px !important; } .w-sm { width: 160px !important; max-width: 100%; } .w-md { width: 240px !important; max-width: 100%; }
.set-control .checks { max-height: 260px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.checks label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-bar .btn { min-width: 120px; }
#settings-form > .save-bar { margin-top: 4px; }

/* ── 휴대폰 화면 (전체) ─────────────────────────────────────── */
@media (max-width: 760px) {
  .set-row { grid-template-columns: 1fr; padding: 14px 16px; gap: 8px; }
  .set-head { padding: 16px 16px 12px; }
  .set-sub { padding: 9px 16px; }
  #nick-card { padding: 0 16px 16px; }
  #nick-card .set-head { margin: 0 -16px 4px; }
  .set-control > select, .set-control > input[type=text], .set-control > textarea { max-width: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 16px 12px 80px; }
  .card { padding: 14px; border-radius: 12px; }
  .set-card { padding: 0; }
  h1 { font-size: 20px; }
  .page-head { gap: 8px; margin-bottom: 14px; }
  .page-head > .spacer { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat .value { font-size: 22px; }
  /* iOS 에서 입력칸을 누르면 화면이 확대되지 않게 */
  input[type=text], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea { font-size: 16px; }
  input.sm, select.sm, .ctl-row select { font-size: 15px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .checks { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .hour-grid { grid-template-columns: repeat(6, 1fr); }
  .topbar-inner { padding: 8px 12px; gap: 8px; }
  .guild-pill { max-width: 46vw; }
  .admin-menu summary { padding: 6px 10px; }
  .btn { padding: 9px 14px; }
  .weeknav .range { font-size: 13px; }
  .seg { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
  .seg a, .seg label { white-space: nowrap; }
  th, td { padding: 9px 8px; }
  .save-bar, .kick-bar { bottom: 8px; padding: 8px 10px; }
  .refresh-pill { right: 8px; bottom: 8px; }
  .fpop { width: calc(100vw - 16px); }
  .storage-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .req .ctl-row { width: 100%; }
  .req .ctl-row select { flex: 1; }
}

/* ── 휴대폰: 표 첫 칸 고정 · 숫자 카드 촘촘하게 ─────────────── */
@media (max-width: 600px) {
  .table-wrap table:not([data-nofilter]) tbody td:first-child,
  .table-wrap table:not([data-nofilter]) thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .table-wrap table:not([data-nofilter]) thead th:first-child { background: var(--surface-2); z-index: 3; }
  .table-wrap table:not([data-nofilter]) tbody td:first-child { box-shadow: 1px 0 0 var(--border); }
  #members.has-kick tbody td:nth-child(2), #members.has-kick thead th:nth-child(2) { position: sticky; left: 36px; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  #members.has-kick thead th:nth-child(2) { background: var(--surface-2); z-index: 3; }
  tr.q-hit td:first-child, tr.paid td:first-child { background: inherit; }
  .stat { padding: 12px 14px; }
  .stat .label { font-size: 12px; }
  .stat .hint { font-size: 11px; line-height: 1.35; }
  .card-head { gap: 8px; }
  .card-head h2 { font-size: 15px; }
}

/* 명단: 여러 명 지우기 */
.bulk-pick { display: none; }
.event-card.selecting .bulk-pick { display: inline-flex; align-items: center; gap: 4px; }
.event-card.selecting .chip input.bulk-pick { width: 15px; height: 15px; margin: 0 2px 0 0; accent-color: var(--bad); cursor: pointer; }
.event-card.selecting .chip form { display: none; }
.event-card.selecting .chip:has(input.bulk-pick:checked) { border-color: var(--bad); background: var(--bad-bg); }
.event-card h3 .bulk-pick { margin-left: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.bulk-bar { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px;
  border: 1px solid var(--bad); border-radius: var(--radius); background: var(--surface); position: sticky; top: 8px; z-index: 15; }
.event-card.selecting .bulk-bar { display: flex; }
.event-card.selecting .bulk-toggle { background: var(--bad-bg); color: var(--bad); }

/* 관리 메뉴 숫자 */
.count-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }

/* 내 출석 · 정정 요청 */
.me-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.me-stat { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.me-stat .v { font-size: 22px; font-weight: 800; }
.me-stat .k { font-size: 12px; color: var(--muted); }
.fix-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px 0 2px; }
.fix-form select { width: auto; }
.fix-form input[type="text"] { flex: 1; min-width: 160px; }
details.fix summary { cursor: pointer; list-style: none; }
details.fix summary::-webkit-details-marker { display: none; }
.fix-actions { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .bulk-bar { top: 4px; }
  .me-stat .v { font-size: 18px; }
}

/* 명단: 전체 음소거 */
.mute-bar { padding: 10px 14px; gap: 10px; }
.mute-bar.locked { border-color: var(--bad); background: var(--bad-bg); }

/* 설정: 채널 보스 */
.cb-rule { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; display: grid; gap: 8px; }

/* 분배 내역: 전원 완료면 한 줄로 접힘 */
details.payout-card > summary.payout-sum { cursor: pointer; list-style: none; margin-bottom: 0; }
details.payout-card > summary.payout-sum::-webkit-details-marker { display: none; }
details.payout-card[open] > summary.payout-sum { margin-bottom: 12px; }
.payout-sum .sum-chev { color: var(--muted); transition: transform .15s; }
details.payout-card:not([open]) .sum-chev { transform: rotate(-90deg); }
details.payout-card.all-done:not([open]) { padding-top: 12px; padding-bottom: 12px; opacity: .85; }
details.payout-card.all-done:not([open]):hover { opacity: 1; }

/* 특정 인원 출석 보기 */
.person-search { padding: 10px 14px; gap: 8px; }
.chip-nick { color: inherit; text-decoration: none; }
.chip-nick:hover { text-decoration: underline; }
.event-card.selecting .chip-nick { pointer-events: none; }

/* 변경기록: 되돌린 기록 */
tr.undone td { opacity: .55; }

/* 소개 페이지 · 체험 */
.hero-lead { font-size: 18px; line-height: 1.6; }
.hero-cta { justify-content: center; gap: 10px; margin: 22px 0 10px; }
.land-h { text-align: center; margin: 34px 0 14px; }
.land-start { margin-top: 22px; }
.land-start ol { line-height: 1.9; padding-left: 20px; }
.demo-bar { background: var(--accent-soft); color: var(--accent); }

/* 혈창고: 안내 · 아덴 비율 · 외판가 */
.storage-notice { display: grid; gap: 6px; border-color: var(--accent); background: var(--accent-soft); }
.storage-notice .sn-text { font-size: 16px; font-weight: 700; }
.storage-table td.price { text-align: right; white-space: nowrap; }
.price-input { width: 64px; text-align: right; font-size: 13px; padding: 4px 6px; }

/* 혈창고 v2: 표 머리 · 가격 칸 · 드래그 */
.storage-grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }
.storage-table thead th { font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.storage-table thead th.num { text-align: right; }
.price-cell { text-align: right; white-space: nowrap; padding: 4px 6px; vertical-align: middle; }
.price-won { font-size: 14px; } .price-won b { font-size: 15px; }
.price-aden { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 2px; }
.price-edit { display: inline-flex; align-items: center; gap: 3px; }
.price-edit input { width: 76px; text-align: right; font-size: 14px; font-weight: 600; padding: 5px 7px; }
.price-edit span { font-size: 12px; color: var(--muted); }
.drag-col { width: 22px; padding: 0 2px !important; }
.drag-handle { cursor: grab; color: var(--muted); font-size: 16px; user-select: none; touch-action: none; padding: 2px 4px; border-radius: 6px; }
.drag-handle:hover { background: var(--surface-2); color: var(--text); }
.cat-handle { font-size: 18px; margin-right: 2px; }
.drag-ghost { opacity: .45; background: var(--accent-soft) !important; }
.drag-toast { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 80; padding: 8px 14px; border-radius: 999px;
  background: var(--ok, #16a34a); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.drag-toast.bad { background: var(--bad); }
.drag-toast[hidden] { display: none; }
@media (max-width: 760px) { .price-edit input { width: 64px; } }
.storage-table .item-name { white-space: nowrap; }
.storage-grid.wide .storage-table { width: 100%; }
/* 혈창고: 가격 칸이 있으면 한 줄에 카드 하나 (넓게 쭉) */
.storage-grid.wide { grid-template-columns: 1fr; }
.storage-grid.wide .storage-card { overflow-x: auto; }
.storage-grid.wide .storage-table th:first-child + th, .storage-grid.wide .storage-table .item-name { width: 40%; }
/* 드래그 중 손에 들린 줄 */
.drag-floating { opacity: .95 !important; background: var(--surface) !important; box-shadow: 0 10px 28px rgba(0,0,0,.22); border-radius: 8px; }
body.sortable-dragging, .sortable-fallback { cursor: grabbing !important; }
/* 혈창고: 분류별 내판가 % */
.pct-edit { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pct-edit input { width: 52px; text-align: right; font-weight: 700; padding: 4px 6px; font-size: 13px; }
.price-edit.auto input { background: var(--surface-2); color: var(--accent); border-style: dashed; cursor: default; }
.storage-notice .sn-text { white-space: pre-line; line-height: 1.6; }
/* 혈창고: 가격 입력 단위 */
.storage-tools { gap: 10px; margin: -4px 0 10px; align-items: center; }
.storage-copy { gap: 8px; margin: 4px 0 18px; align-items: center; }
.storage-copy + .storage-tools { margin-top: 0; }
.taken-when { font-size: 11px; opacity: .7; font-weight: 400; }
.price-btn { border: 0; background: none; cursor: pointer; padding: 0 2px; font-size: 13px; opacity: .45; vertical-align: middle; }
.price-btn:hover, .storage-table tr:hover .price-btn { opacity: 1; }
.price-dlg { width: min(560px, calc(100vw - 32px)); max-height: 85vh; padding: 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.price-dlg::backdrop { background: rgba(0,0,0,.45); }
.price-dlg h2 { margin: 0; font-size: 17px; }
.price-dlg h3 { margin: 14px 0 6px; font-size: 14px; }
.price-table th, .price-table td { padding: 6px 8px; }
.price-table tbody th { text-align: left; white-space: nowrap; }
.head-tools { gap: 6px; flex-wrap: wrap; align-items: center; }
.score-wrap { max-height: 60vh; overflow: auto; }
.score-table thead th { position: sticky; top: 0; background: var(--surface); }
.score-table tr.me-row th, .score-table tr.me-row td { background: color-mix(in srgb, var(--accent, #6b8cff) 14%, transparent); }
.price-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.price-list li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-list a { color: var(--text); }
.price-ex { margin-top: 12px; }
.price-search { gap: 6px; margin: 10px 0 4px; }
.price-ex .row { margin-top: 6px; gap: 6px; }
.unit-toggle { margin: 0; }
.unit-toggle label { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.unit-toggle input { accent-color: var(--accent); }
.unit-toggle label:has(input:checked) { background: var(--accent-soft); color: var(--accent); border-radius: 999px; }
.unit-toggle label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
/* 혈창고: 입찰 대기 */
.wait-input.on { border-color: var(--warn, #c77700); background: color-mix(in srgb, var(--warn, #c77700) 10%, transparent); color: var(--warn, #c77700); font-weight: 800; }
td.wait { white-space: nowrap; }
/* 혈창고: 아이템별 가격 단위 */
.unit-cell { white-space: nowrap; padding: 4px 4px; }
.unit-select { width: auto; font-size: 12px; font-weight: 700; padding: 4px 6px; }
.unit-select.aden { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.price-edit.aden input { width: 110px; color: var(--accent); }
/* 혈창고: 맨 위 입찰 대기 모아보기 */
.wait-card { border-color: var(--warn, #c77700); }
.wait-card .card-head h2 { color: var(--warn, #c77700); }
.wait-card .item-name a { color: var(--text); font-weight: 700; }
.price-edit input::placeholder { color: var(--accent); opacity: .6; font-weight: 600; }
.wait-sub { margin: 10px 0 4px; padding-top: 6px; border-top: 1px dashed var(--border); }
.wait-sub:first-of-type { border-top: 0; padding-top: 0; }
/* 혈창고: 입찰 신청 */
.req-cell { min-width: 220px; vertical-align: top; padding: 6px; }
.req-btn { margin-bottom: 4px; }
.req-list { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.req-list li { margin: 2px 0; }
.req-score { color: var(--muted); font-size: 12px; margin-left: 4px; }
.req-x { display: inline; }
.req-names { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.req-names .chip { font-size: 12px; padding: 2px 8px; }
/* 입찰 대기: 현금 · 아덴 표 칸 맞추기 + 신청은 맨 오른쪽 */
.wait-wrap { max-height: none !important; overflow-y: visible !important; }
.wait-table { width: 100%; table-layout: fixed; }
.wait-table col.c-cat { width: 13%; }
.wait-table col.c-name { width: 22%; }
.wait-table col.c-wait { width: 9%; }
.wait-table col.c-qty { width: 7%; }
.wait-table col.c-price { width: 15%; }
.wait-table col.c-req { width: 19%; }
.wait-table:not(.with-prices) col.c-name { width: 40%; }
.wait-table td, .wait-table th { overflow: hidden; text-overflow: ellipsis; }
.wait-table th.req-head, .wait-table td.req-cell { text-align: right; }
.wait-table td.req-cell { min-width: 0; }
.wait-table .req-list { text-align: left; display: inline-block; }
.wait-table .req-names { justify-content: flex-end; }
@media (max-width: 760px) { .wait-table { table-layout: auto; min-width: 720px; } }
.badge.free { background: color-mix(in srgb, var(--ok, #16a34a) 14%, transparent); color: var(--ok, #16a34a); font-weight: 800; }
.badge.req-closed { background: var(--surface-2); color: var(--muted); font-weight: 700; }
.req-btn { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
/* 🪜 층줌 몇 장: 버튼과 같은 높이의 작은 칸 + '장' */
.qty-pick { display: inline-flex; align-items: center; height: 30px; border: 1px solid var(--border); border-radius: 8px;
            background: var(--surface); padding: 0 8px 0 2px; font-size: 13px; color: var(--muted); }
.qty-pick input { width: 40px; height: 100%; border: 0; background: transparent; padding: 0 2px; text-align: right;
                  font-size: 13px; font-weight: 600; color: var(--text); box-shadow: none; -moz-appearance: textfield; }
.qty-pick input:focus { outline: none; }
.qty-pick:focus-within { border-color: var(--accent); }
.qty-pick input::-webkit-inner-spin-button, .qty-pick input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-pick span { margin-left: 2px; }
/* 입찰 신청자 접었다 폈다 */
.req-fold { margin-top: 4px; text-align: right; }
.req-fold > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; user-select: none; }
.req-fold > summary::-webkit-details-marker { display: none; }
.req-fold > summary::after { content: "▸"; transition: transform .15s; }
.req-fold[open] > summary::after { transform: rotate(90deg); }
.req-fold[open] > summary { margin-bottom: 4px; }
.req-none { margin-top: 4px; }
/* 룰렛 말 개수 */
.marbles { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--accent-soft); color: var(--accent); }
.marbles.zero { background: var(--surface-2); color: var(--muted); }
.roulette-row { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 6px; }
/* 입찰 신청 마감시간 */
.req-deadline { font-size: 12px; font-weight: 700; color: var(--warn, #c77700); margin-top: 3px; }
.req-deadline.past { color: var(--muted); text-decoration: line-through; }
.deadline-edit { margin-top: 3px; font-size: 12px; }
.deadline-edit > summary { cursor: pointer; color: var(--muted); list-style: none; }
.deadline-edit > summary::-webkit-details-marker { display: none; }
.deadline-edit input[type="datetime-local"] { width: auto; font-size: 12px; padding: 3px 6px; }
/* 입찰 대기: 묶음 머리줄 (공통 마감시간) + 여유 있게 */
.wait-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 26px 0 8px; padding: 10px 12px;
  border-top: 0; border-radius: 10px; background: var(--surface-2); }
.wait-sub:first-of-type { margin-top: 8px; padding-top: 10px; }
.wait-sub .req-deadline { margin: 0; }
.deadline-form { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.deadline-form input[type="datetime-local"] { width: auto; font-size: 13px; padding: 4px 8px; }
.wait-table td, .wait-table th { padding: 10px 12px; }
.wait-table td.req-cell { padding: 8px 12px; vertical-align: middle; }
.wait-table .price-cell { padding-right: 16px; }
.wait-table tbody tr + tr td { border-top: 1px solid var(--border); }
/* 마감시간 고르기 (팝업) */
.dl-pick { position: relative; margin-left: auto; }
.dl-btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background: var(--surface); border: 1px dashed var(--border); color: var(--muted); user-select: none; }
.dl-btn::-webkit-details-marker { display: none; }
.dl-btn.set { border-style: solid; border-color: var(--warn, #c77700); color: var(--warn, #c77700); background: color-mix(in srgb, var(--warn, #c77700) 8%, var(--surface)); }
.dl-btn.past { border-color: var(--border); color: var(--muted); text-decoration: line-through; background: var(--surface); }
.dl-caret { font-size: 10px; opacity: .7; }
.dl-pick[open] .dl-caret { transform: rotate(180deg); }
.dl-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: min(360px, calc(100vw - 32px)); padding: 14px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(20, 24, 40, .18); display: grid; gap: 8px; }
.dl-title { font-weight: 800; font-size: 14px; }
.dl-label { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.dl-quick, .dl-hours { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-chip, .dl-hour { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 5px 11px;
  font-size: 12px; font-weight: 700; cursor: pointer; }
.dl-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dl-day { display: grid; place-items: center; gap: 1px; padding: 6px 0; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2);
  cursor: pointer; color: var(--text); }
.dl-day .d-wd { font-size: 10px; color: var(--muted); font-weight: 700; }
.dl-day .d-num { font-size: 15px; font-weight: 800; }
.dl-day .d-num small { font-size: 10px; font-weight: 700; color: var(--muted); }
.dl-day.wkend .d-wd { color: var(--bad); }
.dl-chip:hover, .dl-hour:hover, .dl-day:hover { border-color: var(--accent); }
.dl-chip.on, .dl-hour.on, .dl-day.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.dl-day.on .d-wd, .dl-day.on .d-num small { color: rgba(255,255,255,.85); }
.dl-time { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dl-time select { width: auto; font-size: 13px; padding: 5px 8px; }
.dl-preview { font-size: 12px; font-weight: 700; color: var(--accent); }
.dl-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
@media (max-width: 760px) { .dl-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 80px; width: auto; } }
/* 우선신청 */
.wait-info { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; padding: 8px 12px; margin-top: 8px;
  border-radius: 10px; background: color-mix(in srgb, #eab308 10%, var(--surface)); border: 1px solid color-mix(in srgb, #eab308 35%, transparent); }
.cum-form { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.cut-form { flex-basis: 100%; justify-content: flex-end; }
.win-form { display: inline-flex; margin: 0 4px 0 0; vertical-align: middle; }
.win-check { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; cursor: pointer; line-height: 1;
  height: 20px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.win-check input { width: 12px; height: 12px; margin: 0; }
.req-panel .req-list li { line-height: 24px; }
.req-panel .req-list li > * { vertical-align: middle; }
.req-list li.is-win { background: color-mix(in srgb, var(--ok, #2e9d5b) 10%, transparent); border-radius: 8px; }
.req-list li.is-win .win-check { border-color: var(--ok, #2e9d5b); color: var(--ok, #2e9d5b); }
.chip.chip-win { border-color: var(--ok, #2e9d5b); }
.pick-need { color: var(--warn, #c77700); font-weight: 600; font-size: 12px; margin-top: 3px; white-space: nowrap; }
.req-toggle { white-space: nowrap; }
.win-table .win-item { margin: 2px 4px 2px 0; }
.taken-form { display: inline; margin: 0; }
button.chip.win-item { font: inherit; cursor: pointer; color: inherit; }
button.chip.win-item:hover { border-color: var(--ok, #2e9d5b); }
.win-item.taken { background: color-mix(in srgb, var(--ok, #2e9d5b) 14%, transparent); border-color: var(--ok, #2e9d5b);
  color: var(--ok, #2e9d5b); text-decoration: line-through; text-decoration-thickness: 1px; }
.win-group { border-top: 1px solid var(--border); padding: 8px 0; }
.win-group > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; padding: 4px 0; list-style: none; }
.win-group > summary::-webkit-details-marker { display: none; }
.win-group > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.win-group[open] > summary::before { transform: rotate(90deg); }
.win-group .win-copy { margin-left: auto; }
.win-group .win-copy + .win-copy { margin-left: 0; }   /* 두 복사 버튼은 붙여서 오른쪽에 */
.win-past-title { margin: 12px 0 2px; }
.complete-form { display: inline-flex; margin: 0 0 0 auto; }
.complete-form + .dl-pick { margin-left: 8px !important; }
.complete-btn { background: var(--ok, #2e9d5b); border-color: var(--ok, #2e9d5b); color: #fff; }
.win-table .win-item.hit { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cut-input { width: 64px !important; text-align: right; }
.cut-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge.prio { background: color-mix(in srgb, #eab308 22%, transparent); color: #a16207; font-weight: 800; }
.badge.tag { background: color-mix(in srgb, #0ea5e9 20%, transparent); color: #0369a1; font-weight: 800; }
.btn.tag-btn { background: #0284c7; border-color: #0284c7; color: #fff; }
.tag-answer { color: #0369a1; font-weight: 600; }
.req-counts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; justify-content: flex-end; }
.req-counts .badge { white-space: nowrap; }
.req-groups { display: grid; gap: 4px; margin: 6px 0 8px; }
.tag-rows { display: grid; gap: 4px; flex: 1; min-width: 260px; }
.tag-row { display: flex; gap: 6px; align-items: center; }
.tag-row[hidden] { display: none; }
.tag-row .tag-name { width: 110px; flex: none; }
.tag-row .tag-q { flex: 1; min-width: 0; }
.tag-row .inline { white-space: nowrap; }
.standing-head { list-style: none; cursor: pointer; }
.standing-head::-webkit-details-marker { display: none; }
.standing-caret { transition: transform .15s; color: var(--muted, #888); }
.standing-card:not([open]) .standing-caret { transform: rotate(-90deg); }
.standing-card:not([open]) > .standing-head { margin-bottom: 0; }
.standing-list > summary { list-style: none; cursor: pointer; margin-top: 4px; }
.standing-list > summary::-webkit-details-marker { display: none; }
.standing-list[open] > summary { margin-bottom: 6px; }
@media (prefers-color-scheme: dark) { .tag-answer { color: #7dd3fc; } }
.standing-item { padding: 10px 0; border-top: 1px solid var(--line, rgba(127,127,127,.2)); }
.standing-item:first-of-type { border-top: 0; }
.standing-item .req-btn { margin-left: auto; }   /* 줄이 넘쳐도 신청 · 수정 버튼은 오른쪽 끝 */
@media (max-width: 760px) {
  /* 📱 층줌 · 상시 입찰: 이름+점수 / 배지 / 버튼 줄로 정리 */
  .standing-item > .row { gap: 6px !important; }
  .standing-item > .row > .spacer { display: none; }
  .standing-item .badge { font-size: 12px; padding: 2px 8px; }
  .standing-item .req-btn { width: 100%; justify-content: flex-end; margin-top: 2px; }
  .standing-item .req-btn .btn { min-height: 34px; }
  .stock-form input[type=number] { width: 56px; }
  .floor-buys-wrap table { min-width: 640px; }   /* 매입 신청 표: 찌그러지지 않고 옆으로 스크롤 */
  .floor-buys-wrap { max-height: 60vh; }
}
@media (prefers-color-scheme: dark) { .badge.tag { color: #7dd3fc; } }
.prio-btn { background: #eab308; border-color: #eab308; color: #1f1300; }
.prio-note { margin-top: 4px; font-size: 12px; }
.prio-names { color: #a16207; font-weight: 700; margin-left: 4px; }
.req-list li.is-prio b { color: #a16207; }
@media (prefers-color-scheme: dark) { .badge.prio, .prio-names, .req-list li.is-prio b { color: #facc15; } }
/* 신청자 명단: 아이템 아래 한 줄 */
.req-toggle { margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; border: 0; cursor: pointer; }
.req-toggle::after { content: "▸"; transition: transform .15s; }
.req-toggle[aria-expanded="true"]::after { transform: rotate(90deg); }
.wait-table tr.req-row td { padding: 0 12px 12px; border-top: 0 !important; overflow: visible; }
.req-panel { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--accent); }
.req-panel-head { font-size: 13px; margin-bottom: 6px; }
.req-panel .req-list { display: block; margin: 0; padding-left: 20px; text-align: left; }
.req-panel .req-list li { margin: 4px 0; }
.req-panel .roulette-row { justify-content: flex-start; }
.req-panel .req-names { justify-content: flex-start; }
.job-tag { display: inline-block; margin-left: 3px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700;
  background: var(--surface-3, var(--surface-2)); color: var(--muted); border: 1px solid var(--border); vertical-align: 1px; }

/* 설정 탭 (성격별로 나눠 보기) */
.set-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 0 4px; scrollbar-width: none;
  position: sticky; top: var(--topbar-h, 104px); z-index: 9; background: var(--bg); }  /* 상단 바(10) · 관리 메뉴보다 아래 */
.set-tabs::-webkit-scrollbar { display: none; }
.set-tabs button { flex: none; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.set-tabs button:hover { color: var(--text); }
.set-tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.set-card[hidden], form.set-card[hidden] { display: none !important; }

.clan-pt.set { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); font-weight: 600; }

/* 혈비: 아덴 · 현금 장부 */
.fund-ledger { margin-bottom: 14px; }
.fund-ledger-title { font-weight: 700; margin: 4px 0 8px; }
.fund-ledger .stats { margin-bottom: 8px; }
.fund-start { margin: 0 0 6px; gap: 8px; }
.seg-pick { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg-pick label { display: inline-flex; cursor: pointer; }
.seg-pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick span { padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg-pick input:checked + span { background: var(--accent); color: #fff; }
.seg-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
th.grp-head { text-align: center !important; border-bottom: 1px solid var(--border); }
.badge.cash { background: color-mix(in srgb, var(--ok, #2e9d5b) 14%, transparent); color: var(--ok, #2e9d5b); }

.fix-quick { display: inline-flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.fix-one { display: inline; margin: 0; }
.boss-pick { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.boss-pick[hidden] { display: none; }

.lv-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }

/* 🎱 핀볼 추첨 */
.race-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.race-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 120px; }
.race-side textarea { font-family: ui-monospace, monospace; font-size: 13px; min-height: 0; }
.race-stage { padding: 8px; position: relative; }
#race-canvas { width: 100%; height: min(78vh, 760px); display: block; border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface)); }
.race-bar { height: 6px; border-radius: 99px; background: var(--border); margin-top: 8px; overflow: hidden; }
.race-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
/* ⛶ 크게 보기 */
.race-fs-bar { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; gap: 6px; }
.race-fs-bar .btn { opacity: .9; }
.race-fs-bar .btn.ghost { background: var(--surface); }
.race-fs-bar .btn:hover { opacity: 1; }
.race-fs-only { display: none; }
.race-stage.is-full { background: var(--surface); padding: 10px; margin: 0; border-radius: 0; display: flex; flex-direction: column; }
.race-stage.is-full .race-fs-only { display: inline-flex; }
.race-stage.is-full #race-canvas { flex: 1; height: auto; min-height: 0; }
.race-stage.race-full { position: fixed; inset: 0; z-index: 1000; }
.race-fs-panel { position: absolute; top: 14px; left: 14px; z-index: 2; max-width: min(300px, 45vw); max-height: calc(100% - 40px); overflow: auto;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.race-fs-panel:not(:has(.rl-row, .race-result:not([hidden]))) { display: none; }
.race-fs-panel .race-result { border-top: 0; padding-top: 0; }
body.race-noscroll { overflow: hidden; }
.race-speed { align-self: flex-start; }
.race-live { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.rl-row { display: flex; align-items: center; gap: 6px; }
.rl-row b { width: 18px; color: var(--muted); }
.rl-row i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.rl-row.in { font-weight: 700; }
.race-result { border-top: 1px solid var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.race-result h3 { margin: 0 0 4px; font-size: 15px; }
.rr-row.win { font-size: 15px; color: var(--ok, #2e9d5b); }
@media (max-width: 760px) { .race-wrap { grid-template-columns: 1fr; } .race-side { position: static; } #race-canvas { height: 62vh; } }

.race-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 설정: 점수 방식 */
.score-now { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); margin-bottom: 8px; font-size: 14px; }
.score-modes { display: flex; flex-direction: column; gap: 6px; }
.ok-text { color: var(--ok, #2e9d5b); font-weight: 700; }
/* 혈창고: 공개 입찰 회차 → 분배금 */
.round-payout { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; margin: 6px 0; border-radius: 8px;
  background: color-mix(in srgb, var(--ok, #2e9d5b) 8%, var(--surface)); }
/* 분배금: 템마다 혈비 % */
.fee-edit { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; }
.fee-edit input { width: 46px; text-align: right; padding: 2px 4px; }
/* 🔁 재입찰 */
.badge.rebid { font-size: 11px; background: color-mix(in srgb, #8b5cf6 14%, var(--surface)); color: #7c3aed; border-color: color-mix(in srgb, #8b5cf6 35%, var(--border)); }
.rebid-mark { font-size: 11px; color: #7c3aed; font-weight: 700; }
/* 입찰 직업 제한 */
.job-limit-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; margin: 4px 0 8px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.job-pick { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; cursor: pointer; }
.job-counts { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-left: 6px; }
.job-tag.out, .req-list li.is-out .job-tag { text-decoration: line-through; opacity: .6; }
.req-list li.is-out { opacity: .55; }
.chip.chip-out { opacity: .5; text-decoration: line-through; }
.badge.job-limit { font-size: 11px; margin-top: 2px; }
/* 명단: 누락 방지 '확인 필요' */
.miss-box { border: 1px solid color-mix(in srgb, var(--warn, #c77700) 45%, var(--border)); background: color-mix(in srgb, var(--warn, #c77700) 8%, var(--surface));
  border-radius: 10px; padding: 8px 10px; margin: -2px 0 12px; display: flex; flex-direction: column; gap: 4px; }
.miss-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 당첨 금액 바꾸기 ✏️ */
.price-pen { border: 0; background: none; cursor: pointer; padding: 0 4px 0 0; font-size: 12px; opacity: .55; vertical-align: middle; }
.price-pen:hover { opacity: 1; }
.price-pen.win-cancel { color: var(--bad); padding-right: 8px; }
/* 게임 고르기: 2칸 격자 (8개) */
.seg-pick.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: 100%; border: 0; border-radius: 0; overflow: visible; }
.game-grid label { display: block; }
.game-grid span { display: block; text-align: center; white-space: nowrap; border: 1px solid var(--border); border-radius: 10px; padding: 7px 6px; }
.seg-pick input:disabled + span { opacity: .4; cursor: not-allowed; }

/* 혈창고 입찰템: 옆으로 밀 때 분류 + 아이템명 두 칸 고정 */
@media (max-width: 760px) {
  .wait-table tr:not(.req-row) > :nth-child(1) { position: sticky; left: 0; z-index: 1; background: var(--surface);
    width: 64px; min-width: 64px; max-width: 64px; padding-left: 8px; padding-right: 6px; box-shadow: none !important; }
  .wait-table tr:not(.req-row) > :nth-child(2) { position: sticky; left: 64px; z-index: 1; background: var(--surface);
    width: 120px; min-width: 120px; max-width: 120px; padding-left: 6px; padding-right: 8px;
    white-space: normal; word-break: keep-all; overflow-wrap: anywhere; box-shadow: 1px 0 0 var(--border); }
  .wait-table thead tr:not(.req-row) > :nth-child(1), .wait-table thead tr:not(.req-row) > :nth-child(2) { background: var(--surface-2); z-index: 3; }
}

/* 💰 예상 합계 (관리자) */
.badge.expect-sum, .badge.listed-sum { background: var(--accent-soft); color: var(--text); font-weight: 600; white-space: normal; }
.badge.expect-sum b, .badge.listed-sum b { color: var(--accent); }

/* ⏳ 여러 명 한꺼번에 처리 중 (bot/bulk.py) */
.job-bar { max-width: 1200px; margin: 10px auto 0; padding: 10px 14px; border-radius: var(--radius); background: var(--accent-soft);
  border: 1px solid var(--accent); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.job-bar.done { background: var(--surface-2); border-color: var(--border); }
.job-track { flex: 0 0 160px; height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.job-track span { display: block; height: 100%; background: var(--accent); }
@media (max-width: 600px) { .job-bar { margin: 8px 8px 0; } }
