:root {
  --bg: #0d0b09; --panel: rgba(22, 17, 12, .94); --panel2: rgba(34, 26, 18, .96); --line: #5a4428; --line2: #8a6a3a;
  --gold: #d8b56a; --gold2: #ffd98a; --text: #efe6d2; --dim: #a8987a; --red: #e0503a; --blue: #4a9aff; --green: #6ad860;
  --r0: #e8e0d0; --r1: #6a9aff; --r2: #ffd84a; --r3: #ff9a3a;
  --font: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; --serif: 'Nanum Myeongjo', serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; user-select: none; -webkit-user-select: none; touch-action: none; }
input, select, textarea { user-select: text; -webkit-user-select: text; font-family: inherit; }
canvas#game { position: fixed; inset: 0; display: block; }
.hidden { display: none !important; }
.dim { color: var(--dim); }
.bad { color: #ff6a5a !important; }
.up { color: #7aff7a; } .down { color: #ff7a6a; }
.flex { flex: 1; }
small { font-size: .82em; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; background: #241a10; font: 700 11px var(--font); color: var(--gold2); text-align: center; margin: 0 1px; }

/* ───── 공통 틀 ───── */
.frame { background: linear-gradient(180deg, rgba(40, 30, 20, .97), rgba(18, 13, 9, .97)); border: 1px solid var(--line2); box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(90, 68, 40, .5), 0 18px 50px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 220, 150, .12); border-radius: 6px; }
.frame-sm { background: linear-gradient(180deg, rgba(32, 24, 16, .9), rgba(14, 10, 7, .9)); border: 1px solid var(--line); box-shadow: 0 0 0 1px #000, 0 6px 20px rgba(0, 0, 0, .5); border-radius: 5px; }
.btn { font: 600 13px var(--font); color: var(--text); background: linear-gradient(180deg, #4a3826, #2a1e14); border: 1px solid #6a5030; border-radius: 4px; padding: 6px 11px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 220, 150, .15), 0 1px 2px rgba(0, 0, 0, .5); white-space: nowrap; transition: filter .12s; }
.btn:hover:not(:disabled) { filter: brightness(1.25); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.gold { background: linear-gradient(180deg, #c8963a, #7a5418); border-color: #e8c070; color: #fff8e0; text-shadow: 0 1px 1px #000; }
.btn.red { background: linear-gradient(180deg, #8a2a1a, #4a140c); border-color: #b04a30; }
.btn.on { background: linear-gradient(180deg, #3a6a2a, #1e3a14); border-color: #7ac860; }
.btn.big { width: 100%; padding: 12px; font-size: 16px; font-weight: 800; letter-spacing: .5px; }
.btn.sm { padding: 3px 8px; font-size: 12px; }
input[type=text], input[type=number], input[type=password], input:not([type]), select { background: #120d08; color: var(--text); border: 1px solid #5a4428; border-radius: 4px; padding: 6px 8px; font-size: 13px; outline: none; }
input:focus, select:focus { border-color: var(--gold); }
input[type=checkbox] { accent-color: #c8963a; width: 16px; height: 16px; vertical-align: -3px; }
input[type=range] { accent-color: #c8963a; }
label { cursor: pointer; }

/* 아이콘 시트: 8열 × 32행, 칸 64px */
.ico { display: inline-block; width: 40px; height: 40px; background: url(assets/icons.webp) no-repeat; background-size: 800% 3200%; flex: none; vertical-align: middle; image-rendering: auto; }
.ico.sm { width: 26px; height: 26px; } .ico.xs { width: 18px; height: 18px; vertical-align: -4px; }
.ico.ghost { opacity: .22; filter: grayscale(1); }
.elb { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--c); color: var(--c); background: rgba(0, 0, 0, .55); font: 900 13px var(--serif); margin: 0 1px; vertical-align: middle; box-shadow: 0 0 6px color-mix(in srgb, var(--c) 40%, transparent); }
.elb.sm { width: 18px; height: 18px; font-size: 11px; }

/* ───── 로그인 ───── */
.screen { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 30%, rgba(80, 50, 20, .35), transparent 60%), radial-gradient(ellipse at center, #1a120a 0%, #060403 80%); }
.screen::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 6px); pointer-events: none; }
.login-box { width: min(380px, calc(100vw - 32px)); padding: 30px 28px 22px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.logo { text-align: center; font: 800 46px var(--serif); color: var(--gold2); text-shadow: 0 0 20px rgba(255, 180, 60, .45), 0 3px 0 #3a2410, 0 4px 10px #000; letter-spacing: 6px; line-height: 1; }
.logo small { display: block; font: 700 11px var(--font); letter-spacing: 6px; color: var(--gold); margin-bottom: 8px; text-shadow: none; }
.sub { text-align: center; color: var(--dim); font-size: 12px; margin-top: -4px; margin-bottom: 6px; }
.login-box label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--gold); font-weight: 700; }
.login-box input { padding: 10px 12px; font-size: 15px; }
.login-box details { font-size: 12px; color: var(--dim); } .login-box details input { width: 100%; margin-top: 6px; }
#lgErr { min-height: 18px; text-align: center; color: #ffb08a; font-size: 13px; }
.hint { font-size: 11px; color: var(--dim); text-align: center; line-height: 1.6; }

/* ───── 직업 선택 ───── */
#classSel { flex-direction: column; gap: 14px; padding: 18px; }
.cs-head { text-align: center; position: relative; } .cs-title { font: 800 28px var(--serif); color: var(--gold2); text-shadow: 0 2px 8px #000; } .cs-sub { color: var(--dim); margin-top: 4px; }
#csCards { display: grid; grid-template-columns: repeat(6, minmax(0, 168px)); gap: 10px; position: relative; }
.cs-card { position: relative; padding: 0 10px 10px; border-radius: 8px; cursor: pointer; background: linear-gradient(180deg, rgba(40, 30, 20, .92), rgba(14, 10, 7, .96)); border: 1px solid #4a3820; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); transition: transform .15s, border-color .15s, box-shadow .15s; text-align: center; overflow: hidden; }
.cs-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 150px; background: radial-gradient(ellipse at 50% 80%, color-mix(in srgb, var(--cc) 30%, transparent), transparent 70%); }
.cs-card canvas { position: relative; width: 100%; height: auto; display: block; margin: 0 auto -6px; }
.cs-card:hover { transform: translateY(-3px); border-color: var(--line2); }
.cs-card.sel { border-color: var(--cc); box-shadow: 0 0 0 1px var(--cc), 0 0 30px color-mix(in srgb, var(--cc) 45%, transparent), 0 10px 30px #000; transform: translateY(-5px); }
.cs-race { position: relative; font-size: 11px; color: var(--dim); } .cs-name { position: relative; font: 800 19px var(--serif); color: var(--cc); text-shadow: 0 2px 4px #000; }
.cs-role { font-size: 11.5px; color: var(--text); margin: 2px 0 3px; } .cs-diff { font-size: 12px; color: var(--gold); } .cs-diff small { color: var(--dim); }
.cs-stats { margin: 6px 0; display: flex; flex-direction: column; gap: 2px; }
.cs-st { display: flex; align-items: center; gap: 5px; font-size: 10.5px; } .cs-st span { width: 26px; color: var(--dim); text-align: left; } .cs-st i { flex: 1; height: 5px; background: #000; border-radius: 3px; overflow: hidden; } .cs-st i b { display: block; height: 100%; } .cs-st em { width: 16px; font-style: normal; text-align: right; color: var(--text); }
.cs-sk { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.cs-foot { width: min(1060px, 100%); display: flex; gap: 16px; align-items: center; position: relative; }
#csInfo { flex: 1; font-size: 13px; line-height: 1.6; min-height: 60px; }
.cs-skl { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; } .cs-skl span { display: inline-flex; align-items: center; gap: 3px; } .cs-skl small { color: var(--dim); }
#csGo { width: 240px; }

/* ───── HUD ───── */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: auto; }
#hud > #centerMsg, #hud > #lootLog, #hud > #freeCamBadge, #hud > #joyBase, #hud > #notice, #hud > #tip, #hud > #expbar #expTxt { pointer-events: none; }
/* 상태 */
#status { position: absolute; left: 10px; top: 10px; display: flex; gap: 8px; align-items: flex-start; }
.portrait { position: relative; width: 78px; height: 78px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a2a1a, #0e0a06); border: 2px solid var(--gold); box-shadow: 0 0 0 2px #000, 0 0 0 4px #5a4428, 0 4px 14px #000; overflow: hidden; cursor: pointer; flex: none; }
.portrait canvas { width: 100%; height: 100%; }
#stLv { position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); min-width: 30px; padding: 0 6px; background: linear-gradient(180deg, #c8963a, #6a4410); border: 1px solid #ffe09a; border-radius: 9px; font: 900 12px var(--font); text-align: center; color: #fff; text-shadow: 0 1px 1px #000; }
#ptsBadge { position: absolute; right: -2px; top: 2px; background: #e0503a; color: #fff; border-radius: 9px; padding: 0 5px; font: 900 11px var(--font); border: 1px solid #ffb09a; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.15); } }
.bars { width: 250px; padding-top: 3px; }
.nm { display: flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 15px; text-shadow: 0 1px 2px #000, 0 0 6px #000; } .nm small { color: var(--gold); font-weight: 600; font-size: 11px; }
.gmtag { background: #ff8a2a; color: #000; font-size: 10px; padding: 0 4px; border-radius: 3px; }
.bar { position: relative; height: 17px; margin-top: 3px; background: #0a0705; border: 1px solid #3a2a18; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px #000, inset 0 2px 4px rgba(0, 0, 0, .6); }
.bar > div { position: absolute; left: 0; top: 0; bottom: 0; transition: width .25s; }
.bar.hp > #hpFill { background: linear-gradient(180deg, #ff6a50, #b81e10 55%, #7a0e06); }
.bar.hp > .shield { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 3px, rgba(200, 230, 255, .35) 3px 6px); z-index: 2; right: auto; }
.bar.mp { height: 13px; } .bar.mp > div { background: linear-gradient(180deg, #6ab0ff, #1e5ac0 55%, #0e2a70); }
.bar span { position: absolute; inset: 0; text-align: center; font: 700 11px/15px var(--font); color: #fff; text-shadow: 0 1px 1px #000, 0 0 3px #000; z-index: 3; }
.bar.mp span { line-height: 11px; font-size: 10px; }
#buffs { display: flex; gap: 3px; margin-top: 4px; flex-wrap: wrap; }
.buff { position: relative; width: 28px; height: 28px; border: 1px solid var(--line2); border-radius: 4px; background: #000; overflow: hidden; } .buff .ico { width: 26px; height: 26px; }
.buff small { position: absolute; right: 1px; bottom: 0; font: 800 10px var(--font); text-shadow: 0 0 2px #000, 0 0 2px #000; }
.buff.sh { border-color: #9ad8ff; }
/* 대상 */
#target { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 300px; padding: 6px 10px 7px; text-align: center; }
#target.boss { width: 420px; border-color: #c8862a; box-shadow: 0 0 0 1px #000, 0 0 20px rgba(255, 140, 40, .35); }
.tg-top { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; text-shadow: 0 1px 2px #000; } #tgLv { font-size: 12px; } #target.boss #tgName { color: #ffb030; font-size: 16px; }
.bar.thp { height: 14px; } .bar.thp > div { background: linear-gradient(180deg, #e04a3a, #8a1a10); } .bar.thp span { line-height: 12px; font-size: 10px; }
#tgHint { margin-top: 4px; font-size: 11.5px; color: var(--dim); display: flex; gap: 4px; align-items: center; justify-content: center; flex-wrap: wrap; }
#tgHint b { font-weight: 900; }
#eventBar { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); padding: 4px 14px; border-radius: 14px; background: linear-gradient(90deg, rgba(120, 40, 140, .85), rgba(200, 80, 40, .85)); border: 1px solid #ffb06a; font-weight: 700; font-size: 12px; white-space: nowrap; box-shadow: 0 0 14px rgba(255, 120, 60, .4); animation: evglow 2s infinite; }
@keyframes evglow { 50% { box-shadow: 0 0 24px rgba(255, 160, 80, .7); } }
/* 오른쪽 위 */
#topright { position: absolute; right: 10px; top: 10px; display: flex; gap: 10px; align-items: flex-start; }
#menuBtns { display: grid; grid-template-columns: repeat(4, 50px); gap: 4px; }
.mbtn { position: relative; width: 50px; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 0; cursor: pointer; background: linear-gradient(180deg, rgba(50, 38, 24, .92), rgba(20, 15, 10, .92)); border: 1px solid var(--line); border-radius: 6px; color: var(--text); box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 220, 150, .12); }
.mbtn:hover { border-color: var(--gold); } .mbtn.on { border-color: var(--gold2); box-shadow: 0 0 0 1px #000, 0 0 10px rgba(255, 200, 100, .5); }
.mbtn i { font-style: normal; font-size: 19px; line-height: 1; } .mbtn .ico { width: 30px; height: 30px; }
.mbtn b { font: 600 10px var(--font); color: var(--gold); margin-top: 1px; }
.mbtn.off { opacity: .6; } .mbtn.gmb { border-color: #c87a2a; }
.mbtn .dot { position: absolute; right: 3px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: #ff4a2a; box-shadow: 0 0 6px #ff4a2a; }
.mini-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mini-ring { width: 156px; height: 156px; border-radius: 50%; padding: 4px; background: conic-gradient(from 0deg, #8a6a3a, #e8c87a, #6a4a20, #e8c87a, #8a6a3a); box-shadow: 0 0 0 1px #000, 0 6px 16px #000; }
#minimap { width: 148px; height: 148px; border-radius: 50%; display: block; cursor: pointer; background: #000; }
#zoneName { text-align: center; text-shadow: 0 1px 3px #000, 0 0 6px #000; line-height: 1.15; } #zoneName b { display: block; font: 800 14px var(--serif); color: var(--gold2); } #zoneName small { color: var(--dim); font-size: 11px; }
#coords { font-size: 10px; color: var(--dim); text-shadow: 0 1px 2px #000; }
/* 채팅 */
#chat { position: absolute; left: 10px; bottom: 18px; width: 370px; background: rgba(8, 6, 4, .62); border: 1px solid rgba(90, 68, 40, .6); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; }
#chat .tabs { display: flex; background: rgba(30, 22, 14, .8); border-bottom: 1px solid rgba(90, 68, 40, .5); }
#chat .tabs button { flex: none; padding: 4px 10px; background: none; border: 0; color: var(--dim); font: 600 12px var(--font); cursor: pointer; } #chat .tabs button.on { color: var(--gold2); box-shadow: inset 0 -2px 0 var(--gold); }
#chatMini { margin-left: auto !important; }
#chatLog { height: 150px; overflow-y: auto; padding: 4px 8px; font-size: 12.5px; line-height: 1.5; text-shadow: 0 1px 1px #000; scrollbar-width: thin; }
#chatLog .n b { color: #9ad8ff; } #chatLog .n b.gm { color: #ff9a4a; } #chatLog .w { color: #e89aff; } #chatLog .sys { color: #d8c890; } #chatLog .notice { color: #ffb04a; font-weight: 700; }
.chat-in { display: flex; border-top: 1px solid rgba(90, 68, 40, .5); } #chatInput { flex: 1; border: 0; border-radius: 0; background: rgba(0, 0, 0, .5); padding: 7px 8px; } #chatSend { width: 36px; border: 0; background: rgba(60, 44, 26, .9); color: var(--gold2); cursor: pointer; }
#chat.mini { width: auto; } #chat.mini #chatLog, #chat.mini .chat-in, #chat.mini .tabs button[data-ch] { display: none; }
/* 경험치 */
#expbar { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: #050403; border-top: 1px solid #3a2a18; }
#expFill { height: 100%; background: linear-gradient(180deg, #ffe08a, #c8862a); box-shadow: 0 0 6px rgba(255, 200, 80, .6); transition: width .4s; }
#expTxt { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font: 700 10.5px var(--font); color: var(--gold2); text-shadow: 0 1px 2px #000, 0 0 4px #000; white-space: nowrap; pointer-events: none; }
/* 전투 버튼 */
#actions { position: absolute; right: 14px; bottom: 22px; width: 330px; height: 300px; pointer-events: none; }
#actions > * { pointer-events: auto; }
#skillWheel { position: absolute; right: 0; bottom: 0; width: 330px; height: 300px; pointer-events: none; }
#skillWheel > * { pointer-events: auto; position: absolute; }
#btnAttack { right: 6px; bottom: 6px; width: 104px; height: 104px; border-radius: 50%; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #6a4a2a, #2a1a0e 70%); border: 3px solid var(--gold); box-shadow: 0 0 0 2px #000, 0 0 0 5px rgba(90, 68, 40, .9), 0 6px 20px #000, inset 0 0 20px rgba(0, 0, 0, .7); color: var(--gold2); font: 800 12px var(--font); }
#btnAttack .atk-ico { width: 56px; height: 56px; filter: drop-shadow(0 2px 3px #000); } #btnAttack small { margin-top: -3px; }
#btnAttack.press, .sk.press, .qs:active, .round:active { transform: scale(.92); }
.sk { width: 56px; height: 56px; border-radius: 50%; padding: 0; cursor: pointer; overflow: hidden; background: #120c07; border: 2px solid #8a6a3a; box-shadow: 0 0 0 1px #000, 0 3px 10px #000, 0 0 0 3px color-mix(in srgb, var(--ec) 55%, transparent); }
.sk .sk-ico { width: 100%; height: 100%; } .sk .cd { position: absolute; inset: 0; border-radius: 50%; } .sk .cdt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 900 15px var(--font); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.sk .key { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font: 800 9px var(--font); color: var(--gold2); background: rgba(0, 0, 0, .7); padding: 0 4px; border-radius: 4px 4px 0 0; }
.sk .sel { position: absolute; right: 4px; top: 3px; font: 900 10px var(--serif); color: var(--ec); text-shadow: 0 0 2px #000, 0 0 3px #000; }
.sk.locked { filter: grayscale(1) brightness(.45); } .sk .lk { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 11px var(--font); color: #ffd890; text-shadow: 0 0 3px #000; }
.sk.nomp .sk-ico { filter: saturate(.3) brightness(.7) sepia(.3) hue-rotate(180deg); }
.sk.ready { animation: ready .4s; } @keyframes ready { 50% { box-shadow: 0 0 0 1px #000, 0 0 18px #ffe08a; } }
/* 공격 버튼 주변 호 */
.sk.s0 { right: 128px; bottom: 30px; } .sk.s1 { right: 115px; bottom: 79px; } .sk.s2 { right: 79px; bottom: 115px; } .sk.s3 { right: 30px; bottom: 128px; }
.sk.s4 { right: 192px; bottom: 30px; } .sk.s5 { right: 174px; bottom: 104px; } .sk.s6 { right: 128px; bottom: 159px; } .sk.s7 { right: 58px; bottom: 190px; }
.round { width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #4a3826, #1a120a); border: 2px solid #8a6a3a; box-shadow: 0 0 0 1px #000, 0 3px 10px #000; color: var(--text); padding: 0; }
.round b { font: 900 11px var(--font); } .round small { font-size: 9px; color: var(--dim); }
#btnAuto { right: 254px; bottom: 92px; } #btnAuto.on { border-color: #7aff6a; background: radial-gradient(circle at 50% 35%, #3a7a2a, #123a0a); box-shadow: 0 0 0 1px #000, 0 0 16px rgba(120, 255, 100, .6); animation: autoglow 1.4s infinite; } #btnAuto.on b { color: #c8ffb0; }
@keyframes autoglow { 50% { box-shadow: 0 0 0 1px #000, 0 0 26px rgba(120, 255, 100, .9); } }
#btnPick { right: 254px; bottom: 34px; }
#quickbar { position: absolute; right: 0; bottom: 258px; display: flex; gap: 4px; }
.qs { position: relative; width: 50px; height: 50px; padding: 0; border-radius: 6px; cursor: pointer; background: rgba(14, 10, 6, .85); border: 1px solid var(--line2); box-shadow: 0 0 0 1px #000; display: flex; align-items: center; justify-content: center; }
.qs .ico { width: 40px; height: 40px; } .qs .k { position: absolute; left: 3px; top: 1px; font: 800 10px var(--font); color: var(--gold2); text-shadow: 0 0 2px #000; } .qs .c { position: absolute; right: 3px; bottom: 1px; font: 800 11px var(--font); text-shadow: 0 0 2px #000, 0 0 2px #000; }
.qs.zero { opacity: .45; } .qs.empty { border-style: dashed; opacity: .6; }
/* 창고 */
#roomBar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 12px; background: linear-gradient(180deg, rgba(40, 30, 20, .92), rgba(18, 13, 9, .92)); border: 1px solid var(--line2); border-radius: 6px; box-shadow: 0 0 0 1px #000, 0 6px 20px #000; }
.rb-title { font: 700 15px var(--serif); color: var(--gold2); white-space: nowrap; } .rb-title small { font: 500 11px var(--font); color: var(--dim); }
.rb-btns { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
#decoBar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); padding: 8px 10px 10px; background: linear-gradient(180deg, rgba(36, 27, 18, .96), rgba(16, 12, 8, .96)); border: 1px solid var(--line2); border-radius: 8px; box-shadow: 0 0 0 1px #000, 0 10px 30px #000; z-index: 3; }
.dc-hint { font-size: 12px; color: var(--text); margin-bottom: 6px; text-align: center; } .dc-hint a { color: var(--gold2); cursor: pointer; text-decoration: underline; }
.dc-cats { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.dc-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.dc-it { flex: none; width: 80px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(0, 0, 0, .35); border: 1px solid #4a3820; border-radius: 6px; color: var(--text); cursor: pointer; }
.dc-it:hover { border-color: var(--gold); } .dc-it.on { border-color: #7aff6a; box-shadow: 0 0 10px rgba(120, 255, 100, .4); background: rgba(40, 80, 30, .35); }
.dc-it b { font: 600 11px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 76px; } .dc-it small { color: var(--gold); font-size: 10.5px; }
#hud.editing #chat { display: none; }
.fthumb { position: relative; display: inline-block; overflow: hidden; vertical-align: middle; } .fthumb i { position: absolute; left: 50%; top: 50%; transform-origin: center; }
/* 알림 */
#centerMsg { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
#centerMsg div { padding: 5px 16px; border-radius: 4px; background: rgba(0, 0, 0, .55); font-weight: 700; text-shadow: 0 1px 2px #000; animation: fadeup 3s forwards; white-space: nowrap; }
#centerMsg .warn { color: #ffb08a; } #centerMsg .level { color: #ffe07a; } #centerMsg .gm { color: #ff9a4a; } #centerMsg .zone { color: var(--gold2); font: 800 18px var(--serif); background: none; }
@keyframes fadeup { 0% { opacity: 0; transform: translateY(6px); } 10%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
#lootLog { position: absolute; right: 360px; bottom: 120px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
#lootLog div { display: flex; align-items: center; gap: 4px; padding: 2px 8px; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .65)); font-weight: 700; font-size: 12.5px; text-shadow: 0 1px 2px #000; animation: fadeup 3.6s forwards; }
#lootLog .rare { font-size: 14px; background: linear-gradient(90deg, transparent, rgba(80, 50, 0, .75)); }
#notice { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); max-width: 80vw; padding: 9px 22px; background: linear-gradient(90deg, rgba(60, 20, 10, 0), rgba(80, 30, 10, .9) 15%, rgba(80, 30, 10, .9) 85%, rgba(60, 20, 10, 0)); color: #ffd890; font-weight: 800; font-size: 15px; text-shadow: 0 1px 2px #000; text-align: center; }
.zbanner { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); z-index: 30; text-align: center; pointer-events: none; animation: zban 3.2s forwards; }
.zbanner b { display: block; font: 800 38px var(--serif); color: #ffe9b0; letter-spacing: 4px; text-shadow: 0 0 20px rgba(255, 180, 60, .6), 0 3px 6px #000; } .zbanner small { display: block; color: var(--gold); letter-spacing: 3px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.zbanner::after { content: ''; display: block; height: 2px; margin-top: 6px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
@keyframes zban { 0% { opacity: 0; transform: translate(-50%, 10px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
#freeCamBadge { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); padding: 6px 14px; background: rgba(120, 60, 10, .85); border: 1px solid #ffb04a; border-radius: 14px; font-weight: 700; font-size: 12px; }
#joyBase { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border: 2px solid rgba(255, 220, 150, .35); }
#joyKnob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255, 230, 170, .65), rgba(150, 110, 50, .5)); border: 2px solid rgba(255, 230, 170, .6); }
#death, #disc { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(60, 0, 0, .55), rgba(0, 0, 0, .8)); }
.dbox { width: min(360px, calc(100vw - 32px)); padding: 24px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.dt { font: 800 24px var(--serif); color: #ff7a5a; text-shadow: 0 2px 6px #000; } #deathInfo { color: var(--dim); line-height: 1.6; }

/* ───── 패널 ───── */
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 20px)); max-height: min(86vh, 820px); display: flex; flex-direction: column; z-index: 20;
  background: linear-gradient(180deg, rgba(36, 27, 18, .97), rgba(16, 12, 8, .97)); border: 1px solid var(--line2); border-radius: 8px; box-shadow: 0 0 0 1px #000, 0 0 0 4px rgba(70, 52, 30, .6), 0 20px 60px rgba(0, 0, 0, .8); }
.panel[data-kind=char] { width: min(900px, calc(100vw - 20px)); } .panel[data-kind=inv] { width: min(590px, calc(100vw - 20px)); } .panel[data-kind=shop], .panel[data-kind=gem] { width: min(640px, calc(100vw - 20px)); }
.panel[data-kind=gm] { width: min(740px, calc(100vw - 20px)); } .panel[data-kind=stash] { width: min(900px, calc(100vw - 20px)); } .panel[data-kind=map] { width: min(820px, calc(100vw - 20px)); } .panel[data-kind=skill] { width: min(560px, calc(100vw - 20px)); }
.ph { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(70, 52, 30, .5), transparent); border-radius: 8px 8px 0 0; }
.ph span { flex: 1; font: 800 17px var(--serif); color: var(--gold2); text-shadow: 0 2px 4px #000; letter-spacing: 1px; }
.ph .x { background: none; border: 1px solid var(--line); color: var(--text); width: 30px; height: 30px; border-radius: 4px; cursor: pointer; font-size: 15px; } .ph .x:hover { border-color: var(--gold); }
#panelBody { padding: 12px 14px 14px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #6a5030 transparent; }
.sec { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(138, 106, 58, .35); font: 800 13px var(--font); color: var(--gold); }
.sec:first-child { margin-top: 0; }
.row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.tabsbar { display: flex; align-items: center; gap: 3px; margin-bottom: 8px; flex-wrap: wrap; }
.tab { font: 700 12.5px var(--font); color: var(--dim); background: rgba(0, 0, 0, .3); border: 1px solid #3a2a18; border-radius: 4px 4px 0 0; padding: 6px 11px; cursor: pointer; border-bottom-color: var(--line); }
.tab.on { color: var(--gold2); background: linear-gradient(180deg, rgba(90, 68, 40, .7), rgba(40, 30, 20, .7)); border-color: var(--line2); }
.goldv { color: var(--gold2); font-weight: 800; }
.hintline { margin-top: 6px; font-size: 11.5px; }
/* 아이템 칸 */
.grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.grid.inv { max-height: 400px; overflow-y: auto; padding-right: 2px; }
.cell { position: relative; aspect-ratio: 1; background: radial-gradient(circle at 50% 40%, #2a2016, #100b07); border: 1px solid #3a2a18; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; min-width: 0; }
.cell .ico { width: 88%; height: 88%; }
.cell.empty { cursor: default; background: rgba(0, 0, 0, .35); }
.cell:not(.empty):hover { border-color: var(--gold); filter: brightness(1.15); }
.cell.r1 { border-color: #3a5aa8; box-shadow: inset 0 0 8px rgba(106, 154, 255, .35); } .cell.r2 { border-color: #a88a2a; box-shadow: inset 0 0 10px rgba(255, 216, 74, .4); } .cell.r3 { border-color: #c8662a; box-shadow: inset 0 0 12px rgba(255, 154, 58, .55); animation: leg 2s infinite; }
@keyframes leg { 50% { box-shadow: inset 0 0 16px rgba(255, 154, 58, .8); } }
.cell.bad::after { content: ''; position: absolute; inset: 0; background: rgba(160, 20, 10, .28); }
.cell .c { position: absolute; right: 2px; bottom: 0; font: 800 10.5px var(--font); text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 2px #000; }
.cell .e { position: absolute; left: 2px; top: 0; font: 900 10.5px var(--font); color: #9adfff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.cell .q { position: absolute; right: 2px; top: 0; font-size: 7px; letter-spacing: -1px; } .q1 { color: #b8e0ff; } .q2 { color: #8aff8a; } .q3 { color: #ffd84a; } .q4 { color: #ff7aff; }
.socks { position: absolute; left: 2px; bottom: 2px; display: flex; gap: 1px; } .socks i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid #8a7a5a; background: #000; } .socks i.f { border-color: #fff8; box-shadow: 0 0 3px currentColor; }
.eqrow { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; margin-bottom: 6px; } .eqrow .cell .ico.ghost { width: 70%; height: 70%; }
.invstat { display: flex; gap: 12px; font-size: 12px; color: var(--dim); margin-bottom: 8px; flex-wrap: wrap; } .invstat b { color: var(--text); }
.goldline { display: flex; justify-content: space-between; margin-top: 8px; padding: 6px 10px; background: rgba(0, 0, 0, .35); border: 1px solid #3a2a18; border-radius: 4px; } .goldline b { color: var(--gold2); }
/* 캐릭터 */
.charwrap { display: grid; grid-template-columns: 380px 1fr; gap: 16px; }
.doll { display: grid; grid-template-columns: 76px 1fr 76px; gap: 6px; padding: 10px; background: radial-gradient(ellipse at 50% 45%, rgba(90, 60, 30, .35), rgba(0, 0, 0, .4) 70%); border: 1px solid var(--line); border-radius: 6px; align-self: start; }
.dcol { display: flex; flex-direction: column; gap: 6px; }
.eqs { display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; } .eqs .cell { width: 60px; height: 60px; } .eqs span { font-size: 10px; color: var(--dim); }
.eqs.empty { justify-content: center; width: 60px; height: 60px; margin: 0 auto 14px; border: 1px dashed #4a3820; border-radius: 4px; background: rgba(0, 0, 0, .3); position: relative; } .eqs.empty span { position: absolute; bottom: -14px; } .eqs.empty .ico { width: 44px; height: 44px; }
.dmid { display: flex; flex-direction: column; align-items: center; } #dollCv { width: 200px; height: 250px; }
.dname { font: 800 18px var(--serif); color: var(--text); margin-top: -6px; } .dcls { font-size: 12px; font-weight: 700; }
.dexp { width: 140px; height: 5px; background: #000; border-radius: 3px; overflow: hidden; margin: 6px 0; } .dexp i { display: block; height: 100%; background: var(--gold); }
.dgold { color: var(--gold2); font-weight: 800; font-size: 13px; }
.cstats .sec:first-child { margin-top: 0; }
.pts { font-weight: 600; color: var(--dim); font-size: 12px; margin-left: auto; } .pts.on b { color: #ff8a5a; font-size: 15px; } .pts b { color: var(--text); }
.strow { display: grid; grid-template-columns: 44px 40px 1fr 34px 40px; gap: 6px; align-items: center; padding: 3px 4px; border-radius: 4px; } .strow:hover { background: rgba(255, 220, 150, .05); }
.strow .sn { color: var(--gold); font-weight: 700; } .strow b { font-size: 16px; text-align: right; } .strow small { color: var(--dim); } .strow em { font-style: normal; margin-left: 3px; } .strow em.sp { color: #8aff8a; } .strow em.bn { color: #6a9aff; }
.btn.plus, .btn.plus5 { padding: 2px 0; font-weight: 900; }
.dergrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; font-size: 12.5px; } .dergrid div { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px dotted rgba(138, 106, 58, .2); } .dergrid span { color: var(--dim); }
.elline { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12.5px; } .eldv { display: inline-flex; align-items: center; gap: 2px; margin-right: 6px; font-weight: 700; }
.resgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; } .resrow { display: flex; align-items: center; gap: 6px; font-size: 12px; } .resrow i { flex: 1; height: 6px; background: #000; border-radius: 3px; overflow: hidden; } .resrow i b { display: block; height: 100%; } .resrow em { width: 30px; font-style: normal; text-align: right; }
.wuxing { width: 100%; max-width: 420px; display: block; margin: 0 auto; }
/* 스킬 */
.sklist { display: flex; flex-direction: column; gap: 6px; }
.skrow { display: flex; gap: 10px; padding: 8px; background: rgba(0, 0, 0, .3); border: 1px solid #3a2a18; border-radius: 6px; } .skrow.locked { opacity: .55; filter: grayscale(.6); }
.ski { position: relative; } .ski .ico { width: 48px; height: 48px; border-radius: 6px; border: 1px solid var(--line2); } .ski b { position: absolute; left: -4px; top: -4px; width: 18px; height: 18px; border-radius: 50%; background: #2a1e14; border: 1px solid var(--gold); font-size: 11px; display: flex; align-items: center; justify-content: center; color: var(--gold2); }
.skb { flex: 1; } .skn { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 4px; } .skn small { color: var(--dim); font-weight: 500; margin-left: 4px; } .skd { font-size: 12.5px; margin: 2px 0; color: #d8ccb0; } .skm { font-size: 11.5px; color: var(--dim); }
/* 상점 목록 */
.shoplist { display: flex; flex-direction: column; gap: 4px; max-height: 470px; overflow-y: auto; padding-right: 2px; }
.it { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: rgba(0, 0, 0, .3); border: 1px solid #3a2a18; border-radius: 5px; } .it:hover { border-color: #6a5030; } .it.no { opacity: .5; }
.it > i { font-style: normal; width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; background: #0e0a06; border: 1px solid #3a2a18; border-radius: 4px; font-size: 22px; cursor: help; }
.it .nm { flex: 1; min-width: 0; font-weight: 700; } .it .nm small { display: block; font-weight: 500; color: var(--dim); font-size: 11.5px; margin-top: 1px; }
.it .pr { color: var(--gold2); font-weight: 800; white-space: nowrap; } .it select { padding: 4px; }
.rectag, .hardtag, .eqtag, .ptag { font-style: normal; font-size: 10px; padding: 0 5px; border-radius: 3px; font-weight: 800; vertical-align: 1px; } .rectag { background: #2a6a1a; color: #c8ffb0; } .hardtag { background: #7a1a10; color: #ffc8b0; } .eqtag { background: #2a4a8a; color: #c8dcff; } .ptag { background: #8a4a10; color: #ffe0b0; }
.it.warp.rec { border-color: #4a8a2a; background: rgba(40, 80, 20, .2); }
.zi { font-style: normal; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 4px; font: 900 12px var(--font); color: #000; margin-right: 4px; vertical-align: middle; flex: none; }
.it > i.zi { width: 42px; height: 42px; font-size: 18px; }
.z0 { background: #c8b890; } .z1 { background: #7ac860; } .z2 { background: #2a8a4a; } .z3 { background: #c89a4a; } .z4 { background: #8a8090; } .z5 { background: #b8e0ff; } .z6 { background: #ff6a2a; } .z7 { background: #7a6aa0; } .z8 { background: #d8c070; } .z9 { background: #c82a1a; color: #fff; }
.socks-l { display: flex; gap: 3px; } .gsock { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #6a5a40; background: radial-gradient(circle, #000, #1a140e); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; } .gsock.f { border-color: #c8b890; } .gsock:hover { border-color: var(--gold2); }
.gemtbl { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 8px 0; } .gemcol { display: flex; flex-direction: column; gap: 2px; align-items: center; } .gh { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: var(--dim); }
.gc { position: relative; width: 100%; height: 26px; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .35); border-radius: 3px; } .gc.none { opacity: .25; } .gc b { position: absolute; right: 3px; bottom: 0; font-size: 10px; }
.stashwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid.stash, .stashwrap .grid.inv { max-height: 440px; overflow-y: auto; }
.fl { display: block !important; } .fl-stone { background: #6a645a !important; } .fl-wood { background: linear-gradient(90deg, #7a4a24 0 30%, #6a3e1c 30% 60%, #84522a 60%) !important; } .fl-dirt { background: #7a6040 !important; } .fl-ruin { background: #9a8a6a !important; } .fl-grass { background: #4a7a2a !important; }
#bigmap { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line); background: #000; cursor: crosshair; }
.maplegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--dim); margin: 6px 0; } .maplegend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; border: 1px solid #000; }
.zonelist { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: 12px; } .zonelist div { display: flex; align-items: center; padding: 3px; border-radius: 4px; } .zonelist div.on { background: rgba(255, 220, 150, .12); } .zonelist small { color: var(--dim); margin-left: auto; }
.dialog p { line-height: 1.7; margin: 0 0 6px; }
.qchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: rgba(0, 0, 0, .35); border: 1px solid #3a2a18; border-radius: 4px; font-size: 12px; }
.keys { line-height: 2; }
/* 운영자 */
.gmtabs .tab { padding: 6px 9px; }
.gmgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 5px; margin: 6px 0; }
.gmgrid.z .btn { display: flex; align-items: center; gap: 2px; text-align: left; } .gmgrid.z small { margin-left: auto; color: var(--dim); }
.btn.tog { display: flex; justify-content: space-between; align-items: center; padding: 9px 11px; } .btn.tog b { font-size: 11px; color: var(--dim); } .btn.tog.on b { color: #c8ffb0; }
.plist { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.prow { display: grid; grid-template-columns: 1.3fr 1.4fr 70px 90px auto; gap: 8px; align-items: center; padding: 5px 8px; background: rgba(0, 0, 0, .3); border: 1px solid #2a2016; border-radius: 4px; cursor: pointer; font-size: 12.5px; }
.prow:hover { border-color: #6a5030; } .prow.on { border-color: var(--gold); background: rgba(90, 68, 40, .35); }
.prow .pn { font-weight: 800; } .prow small { color: var(--dim); font-weight: 500; margin-left: 4px; } .prow .ph2 { } .prow .ph i { display: block; height: 5px; background: #000; border-radius: 3px; overflow: hidden; } .prow .ph b { display: block; height: 100%; background: #3ad84a; } .prow .pg { color: var(--gold2); font-size: 11.5px; }
.cfggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; } .cfg { display: flex; align-items: center; gap: 6px; } .cfg span { flex: 1; } .cfg input { width: 70px; }
.bosslist { display: flex; flex-direction: column; gap: 3px; } .bosslist div { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: rgba(0, 0, 0, .3); border-radius: 4px; } .bosslist span { flex: 1; font-weight: 700; } .bosslist b { font-size: 12px; }
.evnow { padding: 8px 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(120, 40, 140, .5), rgba(200, 80, 40, .5)); font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

/* ───── 설명창 · 팝업 ───── */
.tip, .pop { position: fixed; z-index: 60; width: 300px; padding: 10px 12px; background: linear-gradient(180deg, rgba(14, 10, 7, .98), rgba(6, 4, 3, .98)); border: 1px solid #6a5030; border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 10px 30px rgba(0, 0, 0, .9); font-size: 12.5px; line-height: 1.45; text-align: center; pointer-events: none; }
.pop { pointer-events: auto; z-index: 61; width: 310px; }
.tt-name { font: 800 15px var(--serif); margin-bottom: 1px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; } .tt-name small { font: 600 12px var(--font); color: var(--dim); }
.tt-sub { color: var(--dim); font-size: 11.5px; margin-bottom: 6px; }
.tt-big { font-size: 13.5px; } .tt-big b { font-size: 16px; color: #fff; }
.tt-l { color: #d8ccb0; } .tt-l.dim { color: var(--dim); font-size: 11.5px; }
.tt-mods { margin: 6px 0; padding: 5px 0; border-top: 1px solid rgba(138, 106, 58, .3); border-bottom: 1px solid rgba(138, 106, 58, .3); }
.tt-mod { color: #8ab0ff; font-weight: 600; } .tt-mod.fixed { color: #e8d8a8; }
.tt-socks { margin: 5px 0; display: flex; flex-direction: column; gap: 2px; align-items: center; } .tt-sock { display: flex; align-items: center; gap: 5px; font-weight: 600; } .tt-sock.empty { color: #8a7a5a; } .tt-sock.empty i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #6a5a40; background: #000; }
.tt-desc { color: #c8b890; font-style: italic; margin: 5px 0; } .tt-price { color: var(--gold2); margin-top: 6px; font-size: 11.5px; }
.pop .bs { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; } .pop .bs .btn { text-align: left; display: flex; align-items: center; gap: 5px; white-space: normal; } .pop .bs .btn small { color: var(--dim); margin-left: auto; }
.pop-tt { max-height: 46vh; overflow-y: auto; }

/* ───── 모바일 ───── */
@media (max-width: 900px), (max-height: 560px) {
  #csCards { grid-template-columns: repeat(3, minmax(0, 150px)); }
  .charwrap { grid-template-columns: 1fr; }
  .stashwrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px), (max-height: 520px) {
  html, body { font-size: 13px; }
  #classSel { justify-content: flex-start; overflow-y: auto; touch-action: pan-y; padding: 12px; }
  #csCards { grid-template-columns: repeat(3, 1fr); width: 100%; gap: 6px; } .cs-card { padding: 0 5px 6px; } .cs-stats, .cs-sk { display: none; } .cs-name { font-size: 15px; } .cs-role { font-size: 10px; }
  .cs-foot { flex-direction: column; } #csGo { width: 100%; }
  .portrait { width: 56px; height: 56px; } .bars { width: 160px; } .nm { font-size: 13px; } .nm small { display: none; } .bar { height: 14px; } .bar span { font-size: 10px; line-height: 12px; } .bar.mp { height: 10px; } .bar.mp span { font-size: 9px; line-height: 9px; }
  #target { top: 74px; width: 220px; padding: 4px 8px; } #target.boss { width: 280px; } #tgHint { font-size: 10.5px; }
  #topright { gap: 6px; } #menuBtns { grid-template-columns: repeat(4, 38px); } .mbtn { width: 38px; height: 38px; } .mbtn b { display: none; } .mbtn .ico { width: 26px; height: 26px; } .mbtn i { font-size: 16px; }
  .mini-ring { width: 104px; height: 104px; padding: 3px; } #minimap { width: 98px; height: 98px; } #zoneName b { font-size: 12px; }
  #chat { width: 46vw; max-width: 300px; bottom: 14px; } #chatLog { height: 80px; font-size: 11px; } #chat .tabs button { padding: 3px 6px; font-size: 11px; }
  #actions { right: 6px; bottom: 14px; transform: scale(.78); transform-origin: right bottom; }
  #lootLog { right: 10px; bottom: 260px; }
  .panel { width: calc(100vw - 8px) !important; max-height: calc(100vh - 8px); max-height: calc(100dvh - 8px); top: 50%; }
  .grid { grid-template-columns: repeat(8, 1fr); } .eqrow { grid-template-columns: repeat(6, 1fr); }
  .doll { grid-template-columns: 64px 1fr 64px; } .eqs .cell, .eqs.empty { width: 54px; height: 54px; } #dollCv { width: 150px; height: 188px; }
  .prow { grid-template-columns: 1fr 1fr; } .cfggrid { grid-template-columns: 1fr; }
  .zbanner b { font-size: 26px; }
  #roomBar { top: 74px; padding: 5px 8px; } .rb-title { font-size: 12px; } #roomBar .btn { padding: 4px 7px; font-size: 11.5px; }
  #hud.editing #chat, #hud.editing #actions { display: none; }
  #decoBar { bottom: 12px; } .dc-it { width: 68px; }
  .tip { display: none; }
  .zonelist { grid-template-columns: repeat(2, 1fr); }
}
@media (max-height: 520px) and (orientation: landscape) {
  #actions { transform: scale(.66); } #chatLog { height: 60px; } #target { top: 10px; }
}
/* 세로 휴대폰 */
@media (max-width: 520px) and (orientation: portrait) {
  .bars { width: 130px; }
  #topright { flex-direction: column-reverse; align-items: flex-end; gap: 4px; }
  #menuBtns { grid-template-columns: repeat(7, 38px); }
  #target { top: 150px; width: 250px; }
  #roomBar { top: 150px; }
  #eventBar { top: 228px; }
  #chat { width: 62vw; bottom: 250px; } #chatLog { height: 64px; }
  #actions { transform: scale(.74); }
  #lootLog { bottom: 360px; }
}

/* ───── 파티 ───── */
#partyFrame { position: absolute; left: 10px; top: 100px; width: 200px; display: flex; flex-direction: column; gap: 4px; }
.pf-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gold2); text-shadow: 0 1px 2px #000; } .pf-head small { color: var(--dim); }
.pf-x { margin-left: auto; background: rgba(0,0,0,.5); border: 1px solid #5a4428; color: var(--dim); font: 600 10.5px var(--font); border-radius: 3px; padding: 1px 6px; cursor: pointer; }
.pf-m { padding: 4px 6px 5px; background: linear-gradient(90deg, rgba(20,15,10,.85), rgba(20,15,10,.5)); border: 1px solid rgba(90,68,40,.7); border-left: 3px solid #6ad860; border-radius: 4px; cursor: pointer; }
.pf-m:hover { border-color: var(--gold); } .pf-m.far { opacity: .75; } .pf-m.dead { filter: grayscale(1); opacity: .6; }
.pf-n { display: flex; align-items: baseline; gap: 4px; font-size: 12.5px; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; } .pf-n small { color: var(--dim); font-size: 10.5px; }
.pf-bar { height: 5px; background: #000; border-radius: 2px; overflow: hidden; margin-top: 2px; } .pf-bar i { display: block; height: 100%; transition: width .3s; } .pf-bar.hp i { background: linear-gradient(180deg, #ff6a50, #b81e10); } .pf-bar.mp { height: 3px; } .pf-bar.mp i { background: #3a7aff; }
.pf-z { font-size: 10px; color: var(--dim); margin-top: 1px; }
#pinvBox { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); z-index: 25; width: min(300px, calc(100vw - 24px)); padding: 12px 14px; text-align: center; background: linear-gradient(180deg, rgba(40,30,20,.97), rgba(18,13,9,.97)); border: 1px solid var(--gold); border-radius: 8px; box-shadow: 0 0 0 1px #000, 0 0 24px rgba(255,200,100,.3), 0 12px 30px #000; overflow: hidden; }
.pi-t { font: 800 15px var(--serif); color: var(--gold2); } .pi-m { margin: 8px 0 10px; } .pi-b { display: flex; gap: 8px; justify-content: center; } .pi-b .btn { min-width: 90px; }
.pi-time { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--gold); animation: pitime linear forwards; } @keyframes pitime { to { width: 0; } }
#chatLog .pt { color: #8aff7a; } #chatLog .pt b { color: #b8ffa8; }
@media (max-width: 760px), (max-height: 520px) { #partyFrame { top: 72px; width: 150px; } .pf-n small { display: none; } }
@media (max-width: 520px) and (orientation: portrait) { #partyFrame { top: 76px; width: 140px; } }

/* ── 퀘스트 ── */
#qtrack { margin-top: 6px; width: 210px; max-width: 46vw; pointer-events: auto; cursor: pointer; text-align: left; }
#qtrack:empty { display: none; }
#qtrack .qth { font: 800 11px var(--font); color: #ffe9b0; padding: 3px 8px; background: rgba(10,8,6,.62); border-radius: 6px 6px 0 0; display: flex; justify-content: space-between; text-shadow: 0 1px 2px #000; }
#qtrack .qt { background: rgba(10,8,6,.5); padding: 4px 8px; border-top: 1px solid rgba(255,220,150,.08); }
#qtrack .qt:last-child { border-radius: 0 0 6px 6px; }
#qtrack .qt b { display: block; font: 700 12px var(--font); color: #ffe7a8; text-shadow: 0 1px 2px #000; }
#qtrack .qt small { display: block; font: 500 11px var(--font); color: #d8d0c0; text-shadow: 0 1px 2px #000; line-height: 1.35; }
#qtrack .qt.ready b { color: #8aff7a; }
#qtrack .qt.live b { color: #ffd84a; }
.qbox { background: rgba(255,240,200,.05); border: 1px solid rgba(255,220,150,.14); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.qbox.ready { border-color: rgba(140,255,120,.45); background: rgba(120,255,100,.06); }
.qbox.offer { border-color: rgba(255,210,90,.4); }
.qbox.live { border-color: rgba(255,200,60,.6); background: rgba(255,200,60,.08); }
.qh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.qh b { font-size: 15px; color: #ffe7a8; }
.qch { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: rgba(255,220,150,.14); color: #e8d0a0; }
.qobj div { font-size: 13px; padding: 2px 0; color: #e8e0d0; }
.qobj div.ok { color: #8ae07a; }
.qobj b { color: #fff; margin-left: 4px; }
.qmeta { font-size: 12px; color: #c8b890; margin-top: 4px; }
.qrew { font-size: 12px; color: #ffe08a; margin: 6px 0; line-height: 1.7; }
.qrew .ico, .qrew i { vertical-align: middle; }
.qhint { padding: 8px 10px; border-radius: 6px; background: rgba(255,210,90,.1); color: #ffe7a8; font-size: 13px; margin-bottom: 8px; }
.qchs { display: grid; gap: 4px; }
.qchrow { display: grid; grid-template-columns: 1fr 120px 40px; gap: 8px; align-items: center; font-size: 12px; color: #d8d0c0; }
.qchrow i { height: 6px; background: rgba(0,0,0,.5); border-radius: 3px; overflow: hidden; }
.qchrow i b { display: block; height: 100%; background: linear-gradient(90deg,#c9963c,#ffe9a0); }
.qchrow.full span { color: #8ae07a; }
.dgfloors { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.dgfloors div { flex: 1; min-width: 90px; padding: 8px; border-radius: 6px; background: rgba(0,0,0,.3); text-align: center; }
.dgfloors div b { display: block; color: #ffe7a8; font-size: 13px; }
.dgfloors div small { color: #b8a880; font-size: 11px; }
.dgfloors .boss { background: rgba(255,90,30,.15); }
.dgfloors .boss b { color: #ffb070; }
.warnline { color: #ff9a6a; font-weight: 700; }
/* 휴식 경험치 · 빙의 */
#expRest { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, rgba(110,170,255,.55) 0 6px, rgba(110,170,255,.3) 6px 12px); pointer-events: none; }
#possessBar { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: rgba(40,6,6,.86); border: 1px solid #ff7a4a; border-radius: 8px; font-size: 13px; color: #ffd8c0; box-shadow: 0 0 18px rgba(255,80,30,.35); }
#possessBar i { width: 120px; height: 7px; background: #000; border-radius: 3px; overflow: hidden; display: inline-block; }
#possessBar i b { display: block; height: 100%; background: linear-gradient(#ff6b5a,#c62a1d); }
#possessBar .dim { font-size: 11px; }
.z10 { background: #a07a3a; color: #fff; } .z11 { background: #4a4a7a; color: #fff; } .z12 { background: #e0401a; color: #fff; }
@media (max-width: 700px) { #qtrack { width: 160px; } #qtrack .qt small { font-size: 10px; } #possessBar { top: 64px; font-size: 11px; flex-wrap: wrap; justify-content: center; } }
