/* 난세 L 3D 데모 — style.css (owner: engine3d) */
html, body { margin: 0; height: 100%; background: #10141a; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
body { font: 13px/1.4 -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; color: #eee; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: #f2e8d4; background: #3a3128; border: 1px solid #6b5a44; border-radius: 4px; padding: 6px 10px; cursor: pointer; }
button:active { transform: translateY(1px); }
button.primary { background: #8a3a2a; border-color: #c46a4a; }
input, select { font: inherit; color: #fff; background: #0008; border: 1px solid #6b5a44; border-radius: 4px; padding: 7px 8px; }
[hidden] { display: none !important; }
a { color: #e8c37a; }
.panel { background: rgba(24, 20, 16, 0.92); border: 1px solid #6b5a44; border-radius: 6px; padding: 12px; box-shadow: 0 6px 24px #000a; }
.panel-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(#0000, #000c); }
.title-panel { width: min(360px, 92vw); max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.title-panel input { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
h1 { margin: 0 0 4px; font-size: 22px; color: #f0d79a; } h1 small { font-size: 13px; color: #aaa; }
.row { display: flex; gap: 6px; } .row > button { flex: 1; }
.hint { color: #b9ad96; font-size: 12px; margin: 4px 0; } .small { font-size: 11px; }
.msg { color: #ff9a7a; min-height: 1em; }
.seg { display: flex; gap: 4px; margin-bottom: 6px; } .seg button { flex: 1; } .seg button.on { background: #6a4a2a; border-color: #e0b060; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 8px; font-size: 12px; color: #d8cbb0; margin-bottom: 6px; }
.charlist { display: flex; flex-direction: column; gap: 6px; }
.charlist button { text-align: left; display: flex; justify-content: space-between; }
.float { position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(340px, 90vw); max-height: 80vh; overflow: auto; z-index: 20; }
.hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: #f0d79a; }
.x { padding: 2px 8px; background: none; border: none; font-size: 16px; }
#dlg-text { white-space: pre-wrap; margin-bottom: 8px; color: #eadfc8; }
#dlg-opts, #shop-list { display: flex; flex-direction: column; gap: 4px; }
#shop-list .it { display: flex; align-items: center; gap: 6px; } #shop-list .it span { flex: 1; } #shop-list .it button { padding: 4px 8px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .grid a { display: block; text-align: center; padding: 8px 4px; background: #3a3128; border: 1px solid #6b5a44; border-radius: 4px; text-decoration: none; }
#settings label { display: block; margin: 6px 0; }
#death { text-align: center; } #death b { font-size: 18px; color: #ff7a6a; display: block; margin-bottom: 4px; } #death button { margin-top: 8px; width: 100%; }
#loading { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); background: #000a; padding: 10px 16px; border-radius: 4px; pointer-events: none; z-index: 30; }

#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#me-box { position: absolute; left: 10px; top: 8px; width: 200px; text-shadow: 0 1px 2px #000; pointer-events: none !important; }
#me-name { font-weight: 600; } #me-sub { font-size: 11px; color: #d8cbb0; margin-top: 2px; }
.bar { position: relative; height: 12px; background: #000a; border: 1px solid #000; margin-top: 3px; border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; transition: width .15s; } .bar > span { position: absolute; inset: 0; font-size: 10px; line-height: 12px; text-align: center; }
#hp > i { background: linear-gradient(#e44, #a22); } #mp > i { background: linear-gradient(#58f, #23a); }
#mapname { position: absolute; right: 12px; top: 162px; width: 150px; text-align: center; font-size: 12px; text-shadow: 0 1px 2px #000; pointer-events: none !important; }
#minimap { position: absolute; right: 10px; top: 8px; width: 150px; height: 150px; border: 1px solid #6b5a44; border-radius: 4px; background: #000a; }
#perf { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); font: 11px/1.3 ui-monospace, Menlo, monospace; background: #0007; padding: 3px 6px; border-radius: 3px; pointer-events: none !important; white-space: pre; }
#toasts { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none !important; }
#toasts div { background: #000b; padding: 4px 10px; border-radius: 3px; font-size: 13px; animation: fade 2.6s forwards; }
#toasts div.got { color: #ffe08a; } #toasts div.err { color: #ff9a7a; }
@keyframes fade { 0%, 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
#chatlog { position: absolute; left: 10px; bottom: 96px; width: min(380px, 45vw); font-size: 12px; text-shadow: 0 1px 2px #000; pointer-events: none !important; }
#chatlog .sys { color: #ffe08a; } #chatlog .shout { color: #ffb070; } #chatlog .notice { color: #8fd0ff; } #chatlog .err { color: #ff9a7a; }
#chatform { position: absolute; left: 10px; bottom: 66px; width: min(380px, 45vw); } #chatin { width: 100%; box-sizing: border-box; padding: 5px 8px; background: #0009; }
#tgt { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); width: 200px; text-align: center; text-shadow: 0 1px 2px #000; pointer-events: none !important; }
#tgt .bar > i { background: linear-gradient(#e44, #a22); }
#bottom { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 10px; align-items: flex-end; }
#hotbar { display: flex; gap: 4px; }
.slot { position: relative; width: 46px; height: 46px; background: #000a; border: 1px solid #6b5a44; border-radius: 4px; font-size: 10px; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; cursor: pointer; }
.slot .k { position: absolute; left: 2px; top: 0; color: #aaa; } .slot .n { position: absolute; right: 2px; bottom: 0; color: #fff; }
.slot .cd { position: absolute; left: 0; right: 0; bottom: 0; background: #000b; }
.slot.sk { background: #2a2018; color: #f0d79a; } .slot.it { background: #1c2420; color: #c8f0c0; } .slot.dim { opacity: 0.45; }
#btns { display: flex; gap: 4px; } #btns button { height: 46px; white-space: nowrap; } #b-auto.on { background: #2a6a3a; border-color: #6ad08a; }
#expbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #0008; } #expbar > i { display: block; height: 100%; width: 0; background: #e8c37a; }
#joy { position: absolute; left: 24px; bottom: 24px; width: 120px; height: 120px; border-radius: 50%; background: #fff1; border: 2px solid #fff3; display: none; }
#joy > i { position: absolute; left: 40px; top: 40px; width: 40px; height: 40px; border-radius: 50%; background: #fff5; }
#atk { position: absolute; right: 24px; bottom: 24px; width: 80px; height: 80px; border-radius: 50%; background: #a33c; border: 2px solid #fff5; display: none; color: #fff; font-weight: 700; font-size: 15px; }
body.touch #joy, body.touch #atk { display: block; }
body.touch #bottom { left: auto; right: 116px; transform: none; bottom: 14px; flex-direction: column; align-items: flex-end; }
body.touch #hotbar { flex-wrap: wrap; justify-content: flex-end; max-width: 260px; }
body.touch .slot { width: 44px; height: 44px; }
body.touch #chatlog { bottom: 156px; width: 38vw; } body.touch #chatform { bottom: 150px; display: none; }
@media (max-height: 430px) { #minimap { width: 100px; height: 100px; } #mapname { top: 110px; width: 100px; } #chatlog { max-height: 80px; overflow: hidden; } }
#ver { position: fixed; right: 6px; bottom: 6px; font-size: 10px; color: #fff9; text-shadow: 0 1px 2px #000; pointer-events: none; z-index: 40; }
body.touch #ver { bottom: auto; top: 2px; right: 50%; transform: translateX(50%); }
