:root {
  --bg: #eef0f3; --ink: #222; --muted: #7a808c; --line: #dcdfe4; --card: #fff;
  --navy: #3b4252; --navy2: #2e3440; --accent: #5865f2; --accent-soft: #eef0ff; --rare: #b5179e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.45 "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; }
/* 늘 화면보다 10vh 길게: 직업을 바꿔 목록이 잠깐 비어도 스크롤바(공간을 차지하는 브라우저)가 사라지지 않아 폭이 흔들리지 않는다 */
body { min-height: 110vh; display: flex; flex-direction: column; }
body > .wrap { flex: 1 0 auto; width: 100%; }
.foot { flex: none; min-height: 10vh; padding: 14px 20px 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; text-align: center; }
.foot p { margin: 2px 0; } .foot a { text-decoration: underline; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button, select, input { font: inherit; }

.gnb { background: #1f2229; color: #fff; }
.gnb_in { max-width: 1320px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: baseline; gap: 24px; }
.gnb h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }
.gnb h1 small { font-size: 12px; font-weight: 400; color: #9aa0ab; margin-left: 8px; }
.snap { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8a909c; font-size: 11px; }
/* 머리글은 늘 한 줄: 좁아지면 오른쪽 상태 줄(카탈로그 · 연결한 폴더) → 제목 옆 설명 순으로 감춘다. 기기가 아니라 창 폭 기준(창을 줄인 PC도 같음) */
@media (max-width: 900px) { .snap { display: none; } }
@media (max-width: 560px) { .gnb h1 small { display: none; } }

.wrap { max-width: 1320px; margin: 0 auto; padding: 20px; display: flex; gap: 20px; align-items: flex-start; }
.left { width: 400px; flex: none; position: sticky; top: 12px; }
/* 무대 · 재생 · 오라아바타 설정 · 내보내기가 화면보다 길면(작은 화면 · 오라를 입었을 때) 왼쪽 칸만 따로 스크롤 — 붙어 있는 칸의 아래(내보내기)가 화면 밖에 묻히지 않게 */
section.left { max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-width: thin; }
.right { flex: 1; min-width: 0; }

/* 미리보기 */
.preview { position: relative; background: #2b2f3a; border-radius: 4px 4px 0 0; overflow: hidden; height: 460px; display: flex; align-items: center; justify-content: center; }
.stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: repeating-conic-gradient(#3a3f4b 0 25%, #333844 0 50%) 0 0 / 16px 16px; }
.stage.solid { background: var(--stagebg); }
#stage { image-rendering: pixelated; max-width: 100%; max-height: 100%; }
.btn_prev, .btn_next { position: absolute; bottom: 10px; width: 28px; height: 28px; border-radius: 3px; background: rgba(0,0,0,.45); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
.btn_prev { right: 44px; } .btn_next { right: 10px; }
.btn_prev:hover, .btn_next:hover { background: rgba(0,0,0,.7); }
.pose_label { position: absolute; left: 10px; bottom: 12px; color: #dfe3ea; font-size: 12px; text-shadow: 0 1px 2px #000; }
.zoom { display: flex; gap: 0; background: #fff; border: 1px solid var(--line); border-top: 0; }
.zoom span { padding: 7px 10px; color: var(--muted); }
.zoom a { flex: 1; text-align: center; padding: 7px 0; color: #666; border-left: 1px solid var(--line); }
.zoom a.on { color: var(--accent); font-weight: 700; background: var(--accent-soft); }

.player, .export { background: #fff; border: 1px solid var(--line); border-top: 0; padding: 12px; }
.export { margin-top: 12px; border-top: 1px solid var(--line); border-radius: 4px; }
.export h3 { margin: 0 0 8px; font-size: 13px; }
.motions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.motions a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; color: #555; background: #f7f8fa; }
.motions a.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.motion_more { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: -2px 0 10px; color: #555; }
.motion_more select { flex: 1 1 220px; min-width: 0; max-width: 100%; padding: 3px 4px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.motion_more select.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.timeline { display: flex; align-items: center; gap: 8px; }
.timeline input[type=range] { flex: 1; accent-color: var(--accent); }
.btn_play { width: 34px; height: 30px; border: 0; border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer; }
.fno { width: 64px; text-align: right; color: #555; font-variant-numeric: tabular-nums; }
/* 오라아바타 설정 (무대와 내보내기 사이, 오라를 입었을 때만 — app.js renderAuraBar) */
.aura_set { margin-top: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; color: #555; }
.aura_set h3 { margin: 0 0 8px; font-size: 13px; color: #222; }
.aura_set .hint { margin: 4px 0 0; line-height: 1.5; word-break: keep-all; }
.aura_off { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 10px; }
.aura_off input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.aura_off button { padding: 1px 8px; border: 1px solid var(--line); background: #f7f8fa; border-radius: 3px; cursor: pointer; }
.aura_off button:disabled { color: #bbb; cursor: default; }
.aura_set[hidden], .aura_off[hidden] { display: none; }
.aura_warn { margin: 8px 0 0; color: #b4441c; font-size: 12px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.aura_warn[hidden] { display: none; }
.aura_warn .aura_dll { margin-left: 4px; padding: 1px 8px; border: 1px solid #b4441c; background: #fff; color: #b4441c; border-radius: 3px; cursor: pointer; font-size: 12px; }
.range { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 8px; color: #555; }
.range input[type=number] { width: 56px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 3px; }
.range button, .export button { padding: 3px 8px; border: 1px solid var(--line); background: #f7f8fa; border-radius: 3px; cursor: pointer; }
.range select, .export select { padding: 3px 4px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.export .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn_primary { background: var(--accent) !important; color: #fff; border-color: var(--accent) !important; font-weight: 700; padding: 4px 14px !important; }
/* 파란 버튼 위에 마우스: 글자는 흰색 그대로, 바탕만 조금 진하게 — 감싼 줄의 "button:hover { color: accent }"(.of_row 등)가 글자를 바탕색으로 바꾸지 않게 */
.btn_primary:hover:not(:disabled) { background: #4752c4 !important; border-color: #4752c4 !important; color: #fff !important; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.chk { display: inline-flex; align-items: center; gap: 4px; color: #555; }

/* 오른쪽: 공식 쇼룸 배치 */
.option1 { background: var(--navy); padding: 18px 20px 0; border-radius: 4px 4px 0 0; }
.row1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row1 select { width: 180px; height: 30px; padding: 0 8px; border: 0; border-radius: 2px; }
.random { color: #fff; background: rgba(255,255,255,.12); padding: 5px 12px; border-radius: 2px; }
.chk.light { color: #d6dae2; font-size: 12px; }
.btns { display: flex; margin-top: 14px; }
.btns a { flex: 1; text-align: center; padding: 9px 0; background: #e9ebef; color: #555; border-right: 1px solid #d5d8de; font-size: 13px; }
.btns a:last-child { border-right: 0; }
.btns a.on { background: #fff; color: #111; font-weight: 700; }
.option2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; flex-wrap: wrap; }
.search { display: flex; align-items: center; background: #fff; border: 1px solid #c9cdd4; height: 34px; flex: 1; max-width: 520px; }
.search strong { margin: 0 6px; padding: 1px 6px; background: #e7e9f6; color: #4b55c8; border-radius: 2px; font-size: 12px; white-space: nowrap; }
.input_search { flex: 1; border: 0; outline: 0; height: 100%; padding: 0 6px; min-width: 0; }
.btn_search { height: 100%; width: 60px; background: #5a6577; color: #fff; display: flex; align-items: center; justify-content: center; }
.sort { display: flex; align-items: center; gap: 16px; color: #555; }
.sortbtn { color: #333; font-weight: 700; }
.sort .count { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid #c9cdd4; border-radius: 3px; overflow: hidden; background: #fff; }
.seg a { padding: 4px 10px; color: #666; font-size: 12px; white-space: nowrap; }
.seg a + a { border-left: 1px solid #c9cdd4; }
.seg a.on { background: var(--accent); color: #fff; font-weight: 700; }
.seg small { font-size: 10.5px; opacity: .8; font-variant-numeric: tabular-nums; }

/* 위쪽 줄: 직업 · 랜덤 | 목록 보기 | 캐릭터 불러오기 · 옵션 (좁으면 글자를 빼고 아이콘만, 그래도 넘치면 줄 바꿈) */
.seg.dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }
.seg.dark a { color: #d6dae2; padding: 5px 11px; }
.seg.dark a + a { border-left-color: rgba(255,255,255,.25); }
.seg.dark a.on { background: #fff; color: var(--navy2); }
.row1_tools { margin-left: auto; display: flex; gap: 6px; }
.ibtn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 3px;
  background: rgba(255,255,255,.08); color: #e6e9ef; font-size: 12px; cursor: pointer; white-space: nowrap; }
.ibtn:hover { background: rgba(255,255,255,.18); }
.ibtn.soon { color: #aab0bc; }
.ibtn .soon_tag { font-style: normal; font-size: 10px; padding: 0 4px; border-radius: 2px; background: rgba(255,255,255,.14); color: #c9ced8; }
@media (max-width: 1240px) { .ibtn .lbl, .ibtn .soon_tag { display: none; } .ibtn { padding: 0 8px; } }
@media (max-width: 560px) { .row1 select { flex: 1; width: auto; } .row1_tools { margin-left: 0; } }

/* 목록 위 상자: 높이 한 줄 고정 (목록을 내려도 위에 붙어 있다). 펼치면 안쪽만 절대 위치로 아래로 늘어나 목록 위에 뜬다 */
.assist { position: sticky; top: 0; z-index: 6; height: 76px; margin-bottom: 4px; }
.assist_in { position: absolute; left: 0; right: 0; top: 0; height: 76px; overflow: hidden; padding: 8px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.assist[data-mode="types"] .assist_in { border-color: var(--accent); }
.assist.open .assist_in { height: auto; min-height: 76px; max-height: min(72vh, 620px); overflow-y: auto; box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.as_row { display: flex; align-items: center; gap: 10px; min-height: 58px; }
.assist.open .as_row { align-items: flex-start; }
/* 머리: 배지와 이름(도우미 안내는 설명)을 한 덩이로 묶고 위아래 두 줄로 — 칩 · 버튼과 같은 높이에 셋이 나란히 늘어서지 않게 */
.as_head { flex: 0 1 auto; min-width: 0; max-width: 240px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.as_head.wide, .assist[data-mode="help"] .as_head { flex: 1 1 auto; max-width: none; }
.as_label { flex: none; padding: 1px 6px; background: var(--accent-soft); color: var(--accent); border-radius: 2px; font-size: 12px; font-weight: 700; }
.as_name { display: block; max-width: 100%; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assist.open .as_head { margin-top: 1px; }
.as_text { display: block; color: #555; font-size: 12.5px; line-height: 1.45; }
.as_head .as_text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }   /* 배지 아래 두 줄까지 (상자 높이 76px 고정), 넘치면 … · 전체는 title */
.as_tools { flex: none; margin-left: auto; display: flex; gap: 4px; align-self: flex-start; }
.as_tools button, .as_btn { padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; background: #f7f8fa; color: #444; cursor: pointer; font-size: 12px; white-space: nowrap; }
.as_tools button:hover:not(:disabled), .as_btn:hover { border-color: #9aa3b5; }
.as_tools button:disabled { opacity: .4; cursor: default; }
.as_btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; padding: 6px 14px; }
.as_tools .as_more[hidden] { display: none; }
.as_body { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.as_body p { margin: 0 0 8px; line-height: 1.6; color: #333; }
.as_body > .as_btn { margin: 2px 0 6px; }
.as_qs { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.as_qs b, .as_hist b { font-size: 12px; color: var(--muted); font-weight: 700; }
.as_qs a { padding: 6px 10px; border: 1px solid #dfe2f5; border-radius: 4px; background: #f8f9ff; color: #3b44b8; }
.as_qs a::before { content: "Q. "; font-weight: 700; }
.as_qs a:hover { border-color: var(--accent); background: var(--accent-soft); }
.as_hist { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; color: var(--muted); }
.as_hist b { margin-right: 4px; }
.as_hist a { color: #667; } .as_hist a:hover { color: var(--accent); } .as_hist a.on { color: var(--ink); font-weight: 700; }
.flash { outline: 3px solid #ffb020 !important; outline-offset: 2px; animation: flash .45s ease-in-out 4 alternate; }
@keyframes flash { from { outline-color: #ffb020; } to { outline-color: rgba(255,176,32,.15); } }

/* 타입 칩: 접힌 상태에선 한 줄(넘치면 오른쪽 끝을 흐리게), 펼치면 여러 줄 */
.tb_list { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; gap: 6px; overflow: hidden; }
.tb_list.over { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.assist.open .tb_list { flex-wrap: wrap; order: 9; flex-basis: 100%; }   /* 펼치면 칩은 제목 아래 한 줄 전체 폭 */
.assist.open[data-mode="types"] .as_row { flex-wrap: wrap; row-gap: 8px; min-height: 0; }
.assist.open[data-mode="help"] .as_row { min-height: 0; }
.assist.open .as_name { white-space: normal; }
.tb_list a { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.tb_list a:hover { border-color: #9aa3b5; }
.tb_list a.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.tb_list .icon { width: 36px; height: 36px; image-rendering: pixelated; background-repeat: no-repeat; }
.tb_list b { font-size: 11px; line-height: 1; color: #555; white-space: nowrap; } .tb_list a.on b { color: var(--accent); }

.list_avatar { border-top: 1px solid #c9cdd4; padding-top: 14px; padding-bottom: 80px; }
.category { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; font-size: 15px; font-weight: 700; color: #333; }
.category .btn_show { width: 16px; height: 16px; border: 1px solid #999; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; color: #666; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 8px; }
.cards.closed { display: none; }
.avatar { position: relative; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.avatar:hover { border-color: #9aa3b5; }
.avatar.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.avatar .icon { flex: none; width: 42px; height: 42px; image-rendering: pixelated; background-repeat: no-repeat; border: 1px solid #e3e5e9; }
.avatar strong { font-weight: 400; font-size: 12.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.avatar em { position: absolute; right: 4px; top: 3px; font-style: normal; font-size: 10px; color: var(--muted); }
.avatar .types { position: absolute; right: 4px; top: 4px; padding: 0 5px; border-radius: 8px; background: #e7e9f6; color: #4b55c8; font-size: 10.5px; line-height: 16px; font-weight: 700; }
.avatar.on .types { background: var(--accent); color: #fff; }
.avatar.grouped strong { padding-right: 22px; }
/* 무기형상: 무기 탭 맨 위 묶음 · 카드 · 등록 창 */
.category.wf_cat .wf_add { margin-left: auto; padding: 3px 10px; border: 1px solid var(--accent); border-radius: 3px; background: #fff; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.category.wf_cat .wf_add:hover { background: var(--accent); color: #fff; }
.wf_empty { grid-column: 1 / -1; margin: 0 0 4px; }
.category.sh_cat .sh_note { margin-left: auto; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.avatar.wf strong { padding-right: 34px; }
.avatar.wf .wtype { position: absolute; right: 4px; top: 4px; padding: 0 5px; border-radius: 8px; background: #f1ece2; color: #8a6418; font-size: 10.5px; line-height: 16px; font-style: normal; font-weight: 700; }
.wf_types { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.wf_types a { padding: 2px 10px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; color: #555; }
.wf_types a.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.wf_list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-top: 8px; max-height: min(52vh, 460px); overflow-y: auto; }
.wf_row { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; min-width: 0; }
.wf_row:hover { border-color: #9aa3b5; } .wf_row.on { border-color: var(--accent); background: var(--accent-soft); }
.wf_row .icon { flex: none; width: 36px; height: 36px; image-rendering: pixelated; background-repeat: no-repeat; border: 1px solid #e3e5e9; }
.wf_txt { min-width: 0; display: flex; flex-direction: column; } .wf_txt b { font-size: 12.5px; font-weight: 700; }
.wf_txt small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf_reg { position: absolute; right: 4px; top: 3px; font-size: 10px; font-style: normal; color: var(--accent); }
/* 희귀도 색 (게임 색을 밝은 바탕에 맞게 어둡게) */
.rar0 { color: #555; } .rar1 { color: #2a8fa8; } .rar2 { color: #7a3fe0; } .rar3 { color: #c41ac4; } .rar4 { color: #c98a00; }
.rar5 { color: #d24a4a; } .rar6 { color: #e06a00; } .rar7 { color: #4f7f1f; } .rar8 { color: #138f8f; }
.avatar:has(> em) strong { padding-right: 16px; }
.avatar .rare { position: absolute; right: 4px; bottom: 3px; font-style: normal; font-size: 10px; color: var(--rare); font-weight: 700; }
.avatar .fav { position: absolute; left: 4px; top: 2px; font-style: normal; font-size: 12px; color: #f0a020; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }   /* 즐겨찾기 */
.empty { padding: 40px; text-align: center; color: var(--muted); }
.bgcard .icon { border-radius: 2px; }
.bgcard.scene .icon { image-rendering: pixelated; }
.bg_note { margin: 10px 2px 0; }

/* 하단 시트 */
.sheet { position: fixed; right: 20px; bottom: 0; width: 520px; z-index: 10; }
.drawer { position: fixed; left: 20px; bottom: 0; width: 520px; z-index: 10; }   /* 최근 · 즐겨찾기: 착용 정보와 같은 꼴로 왼쪽 아래 */
.sheet, .drawer { max-width: calc(50vw - 30px); }
/* 틀(520px)은 버튼(230px) 옆 빈 곳까지 덮어 밑의 내보내기 버튼을 가렸다 — 틀은 클릭을 통과시키고 보이는 버튼 · 펼친 내용만 받는다 */
.sheet, .drawer { pointer-events: none; }
.sheet_btn, .sheet_body { pointer-events: auto; }
.drawer .sheet_btn { margin-left: 0; margin-right: auto; background: #3d4a63; }
.drawer.open .sheet_body { display: block; }
.sheet_btn { display: block; margin-left: auto; width: 230px; text-align: center; padding: 10px; background: #5b5bd6; color: #fff; font-weight: 700; border-radius: 6px 6px 0 0; }
.sheet_body { display: none; background: #fff; border: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(0,0,0,.12); max-height: 60vh; overflow: auto; }
.sheet.open .sheet_body { display: block; }
.sheet_tabs { display: flex; border-bottom: 1px solid var(--line); }
.sheet_tabs a { flex: 1; text-align: center; padding: 8px; color: #666; }
.sheet_tabs a.on { color: #111; font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.sheet_wear, .sheet_layers { padding: 8px 12px; }
.wear_row { display: grid; grid-template-columns: 56px 1fr 24px; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #f0f1f3; }
.wear_row b { color: #555; font-weight: 700; } .wear_row .none { color: #aaa; } .wear_row .def { color: var(--muted); }
.wear_row a.x { color: #aaa; text-align: center; } .wear_row a.x:hover { color: #d33; }
.tchips { display: inline-flex; gap: 2px; margin-left: 4px; vertical-align: 1px; }
.tchips a { min-width: 18px; padding: 0 4px; border: 1px solid var(--line); border-radius: 2px; font-size: 10.5px; line-height: 16px; text-align: center; color: #666; }
.tchips a:hover { border-color: #9aa3b5; } .tchips a.on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700; }
.layer_row { display: grid; grid-template-columns: 20px 56px 54px 1fr; gap: 6px; align-items: center; padding: 3px 0; font-size: 12px; border-bottom: 1px solid #f3f4f6; }
.layer_row code { color: #555; } .layer_row .add { color: #c76b00; font-size: 10px; }
.layer_row.off { opacity: .45; }
.dr_parts { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px 0; }
.dr_parts a { padding: 2px 8px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; color: #555; background: #f7f8fa; }
.dr_parts a small { color: var(--muted); font-size: 10.5px; }
.dr_parts a.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.dr_parts a.none { opacity: .4; cursor: default; }
.dr_bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 4px; font-size: 12px; color: var(--muted); }
.dr_bar a { color: #c0392b; } .dr_bar a[hidden] { display: none; }
.dr_cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 4px 12px 8px; }
.dr_cards .empty { grid-column: 1 / -1; padding: 24px; }
.dr_card { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px; background: #fff; cursor: pointer; min-width: 0; }
.dr_card:hover { border-color: #9aa3b5; }
.dr_card.on { border-color: var(--accent); background: var(--accent-soft); }
.dr_card .icon { flex: none; width: 36px; height: 36px; image-rendering: pixelated; background-repeat: no-repeat; }
.dr_txt { min-width: 0; display: flex; flex-direction: column; }
.dr_txt strong { font-weight: 400; font-size: 12px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dr_txt small { font-size: 10.5px; color: var(--muted); }
.dr_card .fav { position: absolute; left: 3px; top: 1px; font-style: normal; font-size: 11px; color: #f0a020; text-shadow: 0 0 2px #fff; }
.dr_hint { margin: 0; padding: 4px 12px 10px; }
.view_head { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 12px; }
.view_head b { font-size: 15px; } .view_head span { color: var(--muted); font-size: 12px; }
.view_head a { margin-left: auto; color: #c0392b; font-size: 12px; }

/* 염색: 입은 카드의 버튼 · 착용 정보 견본 · 염색 창 (견본에 색이 없으면 빗금) */
.dye_btn { position: absolute; right: 4px; bottom: 3px; display: inline-flex; align-items: center; gap: 3px; height: 17px; padding: 0 6px 0 3px; border: 1px solid var(--accent); border-radius: 9px; background: #fff; color: var(--accent); font-size: 10.5px; font-weight: 700; cursor: pointer; }
.dye_btn:hover { background: var(--accent); color: #fff; }
.dye_btn i, .dye_sw { display: inline-block; flex: none; width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.28); background: repeating-linear-gradient(45deg, #fff 0 2px, #d5d8de 2px 4px); }
.avatar:has(.dye_btn) strong { padding-right: 46px; }
.avatar:has(.dye_btn) .rare { right: 56px; }
.wear_row .dye_sw { width: 14px; height: 14px; margin-left: 6px; border-radius: 3px; vertical-align: -3px; cursor: pointer; }
.wear_row .dye_sw:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--accent); }
.dye_lbl { margin-left: 3px; color: var(--muted); font-size: 11px; }
.dye_tag { display: inline-flex; align-items: center; gap: 3px; } .dye_tag .dye_sw { width: 9px; height: 9px; border-radius: 2px; }
.dye_pop { position: fixed; z-index: 31; width: 300px; padding: 10px 12px 12px; background: #fff; border: 1px solid #c9cdd4; border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.22); font-size: 12.5px; }
.dye_pop[hidden] { display: none; }
.dye_head { display: flex; align-items: center; gap: 8px; } .dye_head b { font-size: 14px; }
.dye_head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.dye_kind { margin: 6px 0 8px; color: #555; font-size: 11.5px; } .dye_kind b { color: var(--accent); }
.dye_grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.dye_grid a { aspect-ratio: 1; border-radius: 3px; border: 1px solid rgba(0,0,0,.18); cursor: pointer; }
.dye_grid a:hover { position: relative; z-index: 1; transform: scale(1.2); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.dye_grid a.on { position: relative; z-index: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.dye_foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.dye_foot span { flex: 1; min-width: 0; font-weight: 700; } .dye_foot .dye_sw { width: 16px; height: 16px; border-radius: 3px; }
.dye_foot button { padding: 3px 9px; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: 12px; cursor: pointer; }
.dye_foot button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); } .dye_foot button:disabled { opacity: .45; cursor: default; }
.dye_custom { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); cursor: pointer; }
.dye_custom input { width: 32px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: none; cursor: pointer; }
.dye_custom small { margin-left: 4px; color: var(--muted); }

/* 카드 오른쪽 클릭 메뉴 */
.ctx { position: fixed; z-index: 30; min-width: 190px; max-width: 280px; padding: 4px; background: #fff; border: 1px solid #c9cdd4; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.ctx[hidden] { display: none; }
.ctx_head { padding: 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx_head b { display: block; font-size: 12px; line-height: 1.35; } .ctx_head small { color: var(--muted); font-size: 11px; }
.ctx button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-radius: 4px; background: none; font-size: 13px; color: #333; cursor: pointer; }
.ctx button:hover, .ctx button:focus { background: var(--accent-soft); color: var(--accent); outline: 0; }

/* 옵션 창 */
.modal { position: fixed; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20,22,28,.45); }
.modal[hidden] { display: none; }
.modal_box { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal_head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal_head b { font-size: 15px; } .modal_x { color: #888; font-size: 16px; } .modal_x:hover { color: #222; }
.modal_box section { padding: 12px 16px 14px; } .modal_box section + section { border-top: 1px solid #f0f1f3; }
.modal_box h4 { margin: 0 0 8px; font-size: 13px; color: #444; }
.modal_box .hint { margin: 2px 0 10px 22px; }
.modal_row { display: flex; flex-wrap: wrap; gap: 6px; }
.modal_row button { padding: 4px 10px; border: 1px solid #e2c4c0; border-radius: 3px; background: #fff7f6; color: #b03a2e; cursor: pointer; font-size: 12px; }
.modal_box.wide { width: min(720px, 100%); }
/* 코디 저장함 · 서랍의 코디 탭 (썸네일 = 대기 포즈, 어두운 바탕) */
.modal_box.xwide { width: min(900px, 100%); }
/* 검색 창(무기형상 등록 · 캐릭터 불러오기): 높이 고정(최소 = 최대) — 글자를 넣는 대로 결과 수가 바뀌어도 창이 출렁이지 않는다.
   머리 · 입력 · 바닥글은 그대로, 결과만 안에서 스크롤 */
#wfModal .modal_box, #charModal .modal_box { height: min(640px, calc(100vh - 32px)); display: flex; flex-direction: column; overflow: hidden; }
#wfModal .modal_box > section, #charModal .modal_box > section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#wfModal .wf_list { flex: 1; min-height: 0; max-height: none; align-content: start; }
#charModal .modal_box > section { overflow-y: auto; }   /* 캐릭터는 고른 뒤 매칭표가 길어 영역 전체가 스크롤 */
#charModal .char_list { flex: none; }
.of_top { display: flex; flex-direction: column; gap: 10px; }
.of_now { display: flex; gap: 12px; align-items: stretch; }
.of_now_main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.of_now_main h4 { margin: 0; } .of_now_main h4 small { margin-left: 6px; color: var(--muted); font-weight: 400; }
.of_row { display: flex; gap: 6px; align-items: center; }
.of_row input { flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #c9cdd4; border-radius: 3px; background: #fff; font-size: 13px; }
.of_row input[readonly] { background: #f5f6f8; color: #444; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.of_row button { height: 32px; padding: 0 12px; border: 1px solid #c9cdd4; border-radius: 3px; background: #fff; cursor: pointer; white-space: nowrap; font-size: 12.5px; }
.of_row button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); } .of_row button:disabled { opacity: .45; cursor: default; }
.of_import { padding-top: 10px; border-top: 1px dashed var(--line); }
.of_share .hint { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* 이미지로 공유 (app.js shareCard) */
.of_pic { flex: none; position: relative; display: flex; align-items: flex-end; justify-content: center; width: 56px; height: 72px; overflow: hidden; border-radius: 3px; background: #2b2f3a; }
.of_pic img { max-width: 100%; max-height: 100%; }   /* 작은 칸은 줄여 보이므로 부드럽게 */
.of_pic img:not([src]), .of_pic img[src=""] { visibility: hidden; }
.of_pic.big { width: 112px; height: 136px; align-items: center; } .of_pic.big img { image-rendering: pixelated; }
.of_pic.none::after { content: "썸네일 없음"; position: absolute; inset: auto 0 6px; text-align: center; font-size: 10px; color: #8d93a0; }
.of_head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.of_head h4 { flex: 1 1 auto; margin: 0; } .of_head h4 small { margin-left: 6px; color: var(--muted); font-weight: 400; }
.of_head select, .of_head input { height: 28px; padding: 0 6px; border: 1px solid #c9cdd4; border-radius: 3px; background: #fff; font-size: 12.5px; }
.of_head input { width: 190px; }
.of_list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 46vh; overflow-y: auto; padding: 1px; }
.of_list .empty { grid-column: 1 / -1; padding: 28px; }
.of_card { position: relative; display: flex; gap: 8px; align-items: center; min-width: 0; padding: 4px 28px 4px 4px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; }
.of_card:hover { border-color: #9aa3b5; } .of_card.cur { border-color: var(--accent); background: var(--accent-soft); }
.of_info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.of_info b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of_info small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .of_info em { font-style: normal; color: var(--accent); font-weight: 700; }
.of_more { position: absolute; right: 2px; top: 2px; width: 24px; height: 22px; border: 0; border-radius: 3px; background: none; color: #888; font-size: 15px; line-height: 1; cursor: pointer; }
.of_more:hover { background: #eef0f4; color: #222; }
.of_rename { width: 100%; height: 22px; padding: 0 4px; border: 1px solid var(--accent); border-radius: 2px; font-size: 13px; }
.of_morelist { grid-column: 1 / -1; height: 32px; border: 1px dashed #c9cdd4; border-radius: 4px; background: #fafbfc; color: #555; cursor: pointer; }
.of_morelist:hover { border-color: var(--accent); color: var(--accent); }
.of_foot { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.of_foot .warn { color: #b03a2e; }
.of_foot_btns { display: flex; gap: 6px; } .of_foot_btns button { padding: 3px 10px; border: 1px solid #c9cdd4; border-radius: 3px; background: #fff; font-size: 12px; cursor: pointer; }
.of_foot_btns button:hover { border-color: var(--accent); color: var(--accent); }
.dr_cards .dr_of { padding-right: 26px; } .dr_cards .dr_of .of_pic { width: 40px; height: 52px; }
.dr_parts a[data-dract] { cursor: pointer; }
@media (max-width: 560px) { .of_now { flex-direction: column; } .of_pic.big { align-self: center; } .of_head input { flex: 1 1 100%; width: auto; } .of_row { flex-wrap: wrap; } }
.modal_foot { margin: 0; padding: 8px 16px 12px; border-top: 1px solid #f0f1f3; color: var(--muted); font-size: 11.5px; }

/* 캐릭터 불러오기 */
.char_form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.char_form select, .char_form input[type=search] { height: 32px; padding: 0 8px; border: 1px solid #c9cdd4; border-radius: 3px; background: #fff; }
.char_form input[type=search] { flex: 1 1 180px; min-width: 0; }
.char_form button { height: 32px; padding: 0 16px !important; border-radius: 3px; cursor: pointer; }
.char_recent { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 8px; font-size: 12px; }
.char_recent:empty { display: none; }
.char_recent b { color: var(--muted); font-weight: 700; margin-right: 2px; }
.char_recent a { padding: 2px 8px; border: 1px solid var(--line); border-radius: 12px; background: #f7f8fa; color: #444; }
.char_recent a:hover { border-color: var(--accent); color: var(--accent); } .char_recent small { color: var(--muted); }
.char_msg { margin: 8px 0 0; color: #555; font-size: 12.5px; } .char_msg:empty { display: none; } .char_msg.err { color: #b03a2e; }
.char_list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 8px; max-height: 260px; overflow-y: auto; }
.char_row { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; min-width: 0; }
.char_row:hover { border-color: #9aa3b5; } .char_row.on { border-color: var(--accent); background: var(--accent-soft); }
/* img-api 이미지는 캐릭터 둘레가 넓게 비어 있어 가운데 아래쪽을 키워 잘라 보인다 */
.char_row .thumb { flex: none; position: relative; width: 44px; height: 50px; overflow: hidden; background: #2b2f3a; border-radius: 3px; }
.char_row .thumb img { position: absolute; left: 50%; bottom: -6px; width: 80px; transform: translateX(-50%); image-rendering: pixelated; }
.char_row span { min-width: 0; display: flex; flex-direction: column; } .char_row b { font-size: 13px; }
.char_row small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char_pick { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pick_head { display: flex; gap: 14px; align-items: flex-start; }
.pick_head figure { flex: none; margin: 0; text-align: center; }
.pick_head .thumb { display: block; position: relative; width: 140px; height: 170px; overflow: hidden; background: #2b2f3a; border-radius: 4px; }
.pick_head .thumb img { position: absolute; left: 50%; bottom: -18px; width: 250px; transform: translateX(-50%); image-rendering: pixelated; }
.pick_head figcaption { margin-top: 3px; font-size: 11px; color: var(--muted); }
.pick_head > div { min-width: 0; } .pick_head > div > b { font-size: 15px; display: block; } .pick_head > div > small { color: var(--muted); }
.pick_head p { margin: 8px 0 10px; font-size: 12.5px; line-height: 1.55; color: #444; }
.pick_head button { padding: 6px 16px !important; border-radius: 3px; cursor: pointer; } .pick_head button:disabled { opacity: .5; cursor: default; }
.pick_rows { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 12.5px; }
.pick_rows th { width: 56px; text-align: left; color: #555; font-weight: 700; }
.pick_rows th, .pick_rows td { padding: 5px 4px; border-bottom: 1px solid #f0f1f3; vertical-align: top; }
.pick_rows td:last-child { width: 38%; color: var(--muted); } .pick_rows tr.ok td:last-child { color: #2e7d32; font-weight: 700; }
.pick_rows tr.no td:first-of-type { color: #999; }
.pick_rows .tag { font-style: normal; font-size: 10.5px; padding: 0 4px; border-radius: 2px; background: #eef0ff; color: #4b55c8; }
.pick_rows .tag.dye { background: #fff4e0; color: #a86400; }
@media (max-width: 560px) { .pick_head { flex-direction: column; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #222; color: #fff; padding: 8px 14px; border-radius: 4px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }   /* 창(연결 창 40) 위에도 보이게 */
.toast.show { opacity: .92; }
@media (max-width: 900px) { .wrap { flex-direction: column; } .left { width: 100%; position: static; } section.left { max-height: none; overflow: visible; }
  /* 좁은 화면: 두 버튼을 반씩 나눠 놓고, 연 쪽만 전체 폭 (하나씩만 열린다 — app.js narrow()) */
  .sheet { left: calc(50% + 4px); right: 8px; width: auto; max-width: none; } .drawer { left: 8px; right: calc(50% + 4px); width: auto; max-width: none; }
  .sheet.open, .drawer.open { left: 8px; right: 8px; } .sheet .sheet_btn, .drawer .sheet_btn { width: 100%; } }

/* 웹판: 던파 폴더 연결 창 (web/client.js) — 다른 창보다 위, 닫기 없음 */
.modal.gate { z-index: 40; background: rgba(20,22,28,.6); }
.gate .modal_box { width: min(520px, 100%); }
.gate p { margin: 0 0 10px; font-size: 13px; line-height: 1.6; }
.gate_list { margin: 0 0 14px; padding-left: 18px; font-size: 12.5px; line-height: 1.7; color: #444; }
.gate code { padding: 0 4px; background: #f3f4f6; border-radius: 3px; font-size: 12px; }
.gate_btns button, .gate_btns .btn_like { padding: 6px 14px !important; font-size: 13px; }
.btn_like { display: inline-block; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.btn_like[hidden] { display: none; }
.gate_btns .btn_primary { color: #fff; }
/* 공유받은 코디 (링크로 왔는데 폴더가 없을 때) · 휴대폰 안내 */
.gate_of h4 { margin: 0 0 10px; font-size: 15px; color: #222; } .gate_of h4 small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.gate_of_list { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: baseline; font-size: 13px; }
.gate_of_list > b { color: #777; font-size: 12px; font-weight: 600; white-space: nowrap; }
.gate_of_list .nm { padding: 0; border: 0; background: none; color: #222; font: inherit; text-align: left; cursor: copy; }
.gate_of_list .nm:hover { color: var(--accent); text-decoration: underline; }
.gate_of_list .tag { margin-left: 6px; padding: 0 4px; border-radius: 2px; background: #f1f2f4; color: #666; font-size: 11px; font-style: normal; }
.gate_of_list .dy { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: #666; font-size: 12px; white-space: nowrap; }
.gate_of_list .dy i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.gate_of_list p.none { grid-column: 1 / -1; margin: 0; }
.gate_of_list .none { color: #999; font-size: 12.5px; }
.gate .gate_of_note { margin: 10px 0 8px; color: var(--muted); font-size: 12px; } .gate .gate_of_note:empty { display: none; }
.gate_phone { margin: 0 0 12px; padding: 10px 12px; border-radius: 4px; background: #fff6e5; color: #6b4500; }
.gate .gate_phone p { margin: 0; } .gate_phone .modal_row { margin-top: 8px; }
.gate.phone .gate_list, .gate.phone .gate_btns, .gate.phone #gateMsg { display: none; }
.gate .modal_row[hidden] { display: none; }   /* .modal_row 의 display: flex 가 hidden 을 이기지 않게 */
#gateOfBtns { margin-top: 12px; }
/* 연결 창의 DLL 단계 (app.js askDll) */
.gate .gate_dll_how { margin: 0 0 12px; padding: 8px 10px; border-radius: 4px; background: #f3f6fb; }
.gate .gate_dll_later { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.gate_btns .btn_quiet { border-color: #d0d4da; background: #fff; color: #555; } .gate_btns .btn_quiet:hover { background: #f5f6f8; }
/* 시스템 폴더(Program Files …)에 설치한 경우 안내 (web/client.js gate) */
.gate .gate_sys_link { margin: 12px 0 0; font-size: 12px; } .gate_sys_link a, .gate_sys_back a { color: var(--muted); }
.gate_sys_link a:hover, .gate_sys_back a:hover { color: var(--accent); }
.gate .gate_sys_lead { font-size: 14px; }
.gate_opts { display: grid; gap: 8px; margin: 0 0 12px; }
.gate_opt { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid #d0d4da; border-radius: 4px; background: #fff; text-align: left; cursor: pointer; font: inherit; }
.gate_opt b { font-size: 13.5px; color: #222; } .gate_opt span { font-size: 12px; color: #666; line-height: 1.5; }
.gate_opt:hover { border-color: var(--accent); }
.gate_opt.on { border-color: var(--accent); background: #f3f6fb; box-shadow: inset 3px 0 0 var(--accent); }
.gate_more { margin: 0 0 4px; padding: 10px 12px 12px; border-radius: 4px; background: #f7f8fa; }
.gate_more .gate_list { margin-bottom: 10px; }
.gate .gate_sys_back { margin: 12px 0 0; font-size: 12px; }
.gate.phone .gate_sys_link { display: none; }

/* ── 불러오는 화면: 동그란 진행 표시 (다 읽기 전에는 쇼룸을 감춘다) ── */
body.booting > .wrap, body.booting > .sheet, body.booting > .drawer { display: none; }
.boot { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 16px 8vh; }
.boot[hidden] { display: none; }
.boot_ring { position: relative; width: 84px; height: 84px; }
.boot_ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.boot_ring circle { fill: none; stroke-width: 5; }
.boot_track { stroke: var(--line); }
.boot_arc { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .35s ease-out, stroke .2s; }
.boot_ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.boot p { margin: 0; color: var(--muted); font-size: 13px; text-align: center; max-width: 520px; }
.boot.err .boot_arc { stroke: #d33; } .boot.err p { color: #c62828; }
.boot a { color: var(--accent); font-weight: 700; }

/* ── 진입 화면 (Pixlr 처럼 가운데 상자: 왼쪽 시작 거리 · 오른쪽 광고) ── */
body.entry_on > .wrap, body.entry_on > .sheet, body.entry_on > .drawer { display: none; }
.entry:not([hidden]), body:not(.booting) > .wrap { animation: fade_in .2s ease-out; }
@keyframes fade_in { from { opacity: 0; } to { opacity: 1; } }
.gnb h1 { cursor: pointer; }
.entry { flex: 1 0 auto; padding: 28px 16px 40px; }
.entry_box { max-width: 1120px; margin: 0 auto; display: flex; gap: 24px; align-items: flex-start; }
.entry_main { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 24px 22px; }
.entry_head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.entry_head b { font-size: 20px; } .entry_head a { color: var(--accent); font-weight: 700; }
.entry_sec { margin-top: 16px; }
.entry_sec h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 14px; }
.entry_sec h3 small { color: var(--muted); font-weight: 400; font-size: 12px; } .entry_sec h3 a { margin-left: auto; font-size: 12px; color: var(--accent); }
.entry_empty { margin: 0; grid-column: 1 / -1; }
.entry_cont { display: flex; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 6px; background: #f8f9fb; }
.entry_cont:hover { border-color: var(--accent); background: var(--accent-soft); }
.ec_pic { flex: none; width: 96px; height: 110px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: #2b2f3a; border-radius: 4px; }
.ec_pic img { image-rendering: pixelated; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.ec_txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; } .ec_txt b { font-size: 15px; }
.ec_txt small { color: var(--muted); font-size: 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ec_txt em { font-style: normal; color: var(--accent); font-weight: 700; font-size: 12.5px; }
.entry_of { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.entry_of_card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 0; }
.entry_of_card:hover { border-color: var(--accent); background: var(--accent-soft); }
.eo_pic { width: 64px; height: 80px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: #2b2f3a; border-radius: 4px; }
.eo_pic img { image-rendering: pixelated; max-width: 100%; max-height: 100%; }
.entry_of_card b { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry_of_card small { font-size: 11px; color: var(--muted); }
.entry_jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.entry_job { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.entry_job:hover { border-color: var(--accent); background: var(--accent-soft); }
.ej_face { width: 64px; height: 64px; border-radius: 50%; background: #2b2f3a no-repeat center 6px; image-rendering: pixelated; }
.entry_job b { font-size: 12px; font-weight: 700; color: #333; white-space: nowrap; }
.entry_ad { flex: none; width: 336px; min-height: 600px; }
@media (max-width: 960px) { .entry_box { flex-direction: column; } .entry_ad { width: 100%; min-height: 280px; } }

/* ── 광고: 양옆 세로 (본문 1320px 양옆 여백에 고정, 넓은 화면만) · 개발용 자리 표시(?adtest) ── */
/* 160×600: 애드센스 틀은 칸 폭을 다 채우고 그 안 광고 자리는 구글이 정해(250 칸이면 160 광고가 왼쪽 · 가운데로 떠 있었다) — 칸을 광고 폭으로 맞춰
   왼쪽 광고는 오른쪽 끝, 오른쪽 광고는 왼쪽 끝이 본문 옆 16px에 붙는다 (2026-11-12 사용자 요청) */
.side_ad { position: fixed; top: 76px; width: 160px; height: 600px; z-index: 5; }
.side_ad.left { right: calc(50% + 676px); } .side_ad.right { left: calc(50% + 676px); }
@media (max-width: 1859px) { .side_ad { display: none !important; } }
.ad_test { display: flex; align-items: center; justify-content: center; outline: 2px dashed #b9bfca; outline-offset: -2px; color: #8a909c; font-size: 12px;
  background: repeating-linear-gradient(45deg, #f2f3f6 0 10px, #e9ebf0 0 20px); }
