/* 강화 대장간 — 어두운 대장간, 불씨 주황 */
:root {
  --bg: #16120f; --bg2: #211a15; --panel: #2a211b; --panel2: #352a22; --line: #4a3b30;
  --text: #f4ebe1; --dim: #b8a898; --faint: #8a7a6c;
  --ember: #ff8a3d; --ember2: #ffb15c; --gold: #ffd166; --good: #7bd88f; --bad: #ff6b6b; --blue: #6cc4ff; --violet: #c77dff;
  --glow: transparent; --glow2: transparent;
  --r: 14px;
}
* { box-sizing: border-box; }
/* body에 height: 100%를 주면 내용이 화면보다 길 때 아래 여백(padding-bottom)이 내용 뒤로 안 늘어나 마지막 줄이 아래 탭에 가린다 — 높이는 min-height로만 */
html, body { margin: 0; }
body {
  background: radial-gradient(120% 70% at 50% 0%, #2b1d13 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text); font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent;
  display: flex; flex-direction: column; min-height: 100dvh; overflow-x: hidden;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
b { font-weight: 700; }
small { font-size: 0.8em; }
kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 0.85em; }

/* 위 막대 */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: rgba(22, 18, 15, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.back-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--dim); text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; white-space: nowrap; }
.back-btn:hover { color: var(--text); border-color: var(--ember); }
.wallet { display: flex; gap: 10px; margin-left: auto; font-size: 14px; }
.coin b { color: var(--gold); font-variant-numeric: tabular-nums; }
.tools { display: flex; gap: 6px; }
.mini { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); }
.who { display: inline-flex; align-items: center; gap: 6px; max-width: 120px; height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 6px var(--good); }
.dot.guest { background: var(--blue); }
.dot.wait { background: var(--gold); animation: blink 1s infinite; }
.dot.off { background: var(--faint); }
@keyframes blink { 50% { opacity: 0.3; } }

/* 소식 띠 */
.ticker { display: flex; gap: 6px; padding: 6px 10px; align-items: stretch; }
.fest, .tick { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 10px; font-size: 13px; text-align: left; }
.fest { flex: none; position: relative; overflow: hidden; white-space: nowrap; }
.fest .prog { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--ember), var(--gold)); }
.fest.on { border-color: var(--gold); background: linear-gradient(90deg, #4a2a12, #3a2414); color: var(--gold); animation: festglow 2s infinite; }
@keyframes festglow { 50% { box-shadow: 0 0 12px rgba(255, 209, 102, 0.5); } }
.tick { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tick span { display: block; overflow: hidden; text-overflow: ellipsis; }
.tick.new { animation: ticknew 1.2s; }
@keyframes ticknew { 0% { background: #5a3a1c; border-color: var(--gold); } 100% { background: var(--panel); } }
.lv { color: var(--gold); }

/* 본문 */
.layout { flex: 1; display: flex; gap: 14px; padding: 4px 10px 12px; max-width: 1100px; width: 100%; margin: 0 auto; }
.forge { flex: 1; min-width: 0; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.side { display: none; }
@media (min-width: 960px) {
  .side { display: flex; flex-direction: column; width: 380px; flex: none; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); height: calc(100dvh - 180px - env(safe-area-inset-bottom)); position: sticky; top: 110px; } /* 위 110px + 아래 탭 약 60px + 여백 — 소식이 길어도 끝이 아래 탭에 안 가리게. 높이를 채워 채팅 입력 칸이 늘 맨 아래 */
  .side-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .side-head h3 { margin: 0; font-size: 15px; }
  .side .feed { overflow-y: auto; padding: 8px; }
  .tabbar .feed-tab { display: none; }
}
.online { font-size: 12px; color: var(--dim); }

/* 모루 무대 */
.stage { position: relative; height: clamp(200px, 36vh, 360px); border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(60% 55% at 50% 58%, color-mix(in srgb, var(--glow) 22%, transparent), transparent 70%), radial-gradient(80% 60% at 50% 100%, #4a240e 0%, #20160f 60%, #18120e 100%); }
.stage[data-tier="max"] { background: radial-gradient(60% 55% at 50% 58%, rgba(255, 255, 255, 0.25), transparent 70%), conic-gradient(from 0deg at 50% 55%, #ff5ad1, #ffd166, #7bd88f, #6cc4ff, #c77dff, #ff5ad1); }
.stage.flash::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, var(--glow2), transparent 60%); animation: flash 0.6s forwards; pointer-events: none; }
@keyframes flash { from { opacity: 0.9; } to { opacity: 0; } }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.anvil { position: absolute; left: 50%; bottom: 8%; width: 58%; max-width: 300px; height: 22%; transform: translateX(-50%);
  background: linear-gradient(#5b5e66, #2e3036); clip-path: polygon(0 0, 100% 0, 92% 35%, 72% 45%, 72% 100%, 28% 100%, 28% 45%, 8% 35%); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
.item { position: absolute; left: 50%; top: 46%; width: 52%; max-width: 230px; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; z-index: 2; }
.item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 10px var(--glow)) drop-shadow(0 6px 6px rgba(0, 0, 0, 0.5)); user-select: none; animation: bob 3s ease-in-out infinite; }
.item-emoji { font-size: clamp(80px, 22vw, 140px); filter: drop-shadow(0 0 14px var(--glow)); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.aura { position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--glow) 45%, transparent), transparent 65%); opacity: 0.8; }
.stage[data-tier="gold"] .aura, .stage[data-tier="mythic"] .aura, .stage[data-tier="max"] .aura { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: 1; } }
.item.shake, .stage.shake { animation: shake 0.25s; }
.stage.shake-big { animation: shakebig 0.5s; }
@keyframes shake { 25% { transform: translate(calc(-50% - 3px), -50%); } 75% { transform: translate(calc(-50% + 3px), -50%); } }
.stage.shake { animation-name: shakest; }
@keyframes shakest { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes shakebig { 10%, 50%, 90% { transform: translate(-7px, 2px); } 30%, 70% { transform: translate(7px, -2px); } }
.lv-badge { position: absolute; left: 14px; top: 10px; font-size: 34px; font-weight: 900; z-index: 4; text-shadow: 0 2px 0 #000, 0 0 14px currentColor; font-variant-numeric: tabular-nums; }
.hammer { position: absolute; right: 16%; top: 12%; font-size: 64px; transform-origin: 85% 85%; transform: rotate(35deg); z-index: 4; opacity: 0.0; pointer-events: none; }
.hammer.swing { animation: swing 0.5s ease-in; }
@keyframes swing { 0% { opacity: 1; transform: rotate(50deg); } 45% { opacity: 1; transform: rotate(-35deg) translate(-20px, 30px); } 60% { opacity: 1; transform: rotate(-28deg) translate(-18px, 26px); } 100% { opacity: 0; transform: rotate(10deg); } }
.result { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; z-index: 6; font-size: 17px; text-shadow: 0 2px 4px #000; padding: 0 8px; }
.result b { font-size: 24px; margin-right: 6px; }
.result .ok { color: var(--gold); } .result .boom { color: var(--bad); } .result .saved { color: var(--blue); } .result .down { color: #ff9f6b; } .result .keep { color: var(--dim); } .result .coin { color: var(--gold); }
.result .wait { color: var(--dim); font-size: 14px; }
.result em { font-style: normal; font-weight: 900; }
.k-common { color: var(--good); } .k-rare { color: var(--violet); } .k-legend { color: var(--gold); }
.buff { position: absolute; right: 10px; top: 12px; z-index: 4; background: rgba(255, 209, 102, 0.15); border: 1px solid var(--gold); color: var(--gold); padding: 3px 8px; border-radius: 999px; font-size: 12px; }

.iteminfo { text-align: center; }
.iteminfo h2 { margin: 2px 0; font-size: 21px; }
.iteminfo p { margin: 0; color: var(--dim); font-size: 13px; min-height: 1.4em; }
.kind { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }
.kind:empty { display: none; }
.kind.k-common { border-color: var(--good); } .kind.k-rare { border-color: var(--violet); } .kind.k-legend { border-color: var(--gold); background: rgba(255, 209, 102, 0.1); }

/* 확률 막대 */
.odds .bar { display: flex; height: 28px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); font-size: 11.5px; }
.seg { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; color: #120d0a; font-weight: 700; }
.seg span { overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.seg.ok { background: linear-gradient(#ffd166, #f4a93b); } .seg.keep { background: #8c8f98; } .seg.saved { background: #6cc4ff; } .seg.held { background: #7bd8c8; color: #0e2a26; } .seg.down { background: #ff9f6b; } .seg.boom { background: #ff5a5a; color: #fff; }
.odds-note { text-align: center; font-size: 12px; color: var(--dim); margin-top: 4px; }
.maxed { text-align: center; padding: 8px; border-radius: 8px; background: linear-gradient(90deg, #ff5ad133, #ffd16633, #6cc4ff33); }

.toggles { display: flex; gap: 8px; justify-content: center; }
.tg { flex: 1; min-width: 0; max-width: 200px; padding: 8px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); }
@media (max-width: 360px) { .toggles { gap: 6px; } .tg { font-size: 13px; } }
.tg.on { border-color: var(--blue); color: var(--text); background: #1d2a36; box-shadow: inset 0 0 0 1px var(--blue); }
#blessTg.on { border-color: var(--gold); background: #362a14; box-shadow: inset 0 0 0 1px var(--gold); }

.actions { display: flex; flex-direction: column; gap: 8px; }
.actions .row { display: flex; gap: 8px; }
.act { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; min-height: 54px; transition: transform 0.06s; }
.act small { font-weight: 500; color: var(--dim); font-size: 12px; }
.act:not(:disabled):active { transform: scale(0.97); }
.act:not(:disabled):hover { border-color: var(--ember); }
.act:disabled { opacity: 0.45; }
.act.big { min-height: 72px; font-size: 21px; background: linear-gradient(#ff9a4d, #e2622a); border-color: #ffb27a; color: #1d0f06; box-shadow: 0 4px 0 #8a3812, 0 0 24px rgba(255, 138, 61, 0.25); }
.act.big small { color: #4a230c; font-size: 13px; }
.act.big:disabled { box-shadow: none; }
.act.warm { background: #3b2a16; border-color: var(--gold); }
.broke { display: flex; gap: 8px; }
.hint { color: var(--dim); font-size: 12.5px; text-align: center; margin: 2px 0; }
.netnote { text-align: center; color: var(--gold); font-size: 13px; padding: 6px; border: 1px dashed var(--gold); border-radius: 10px; }
.link { background: none; border: 0; color: var(--ember2); text-decoration: underline; padding: 0; }

/* 아래 탭 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: rgba(28, 22, 18, 0.96); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(6px); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; background: none; border: 0; font-size: 19px; position: relative; color: var(--dim); }
.tabbar button span { font-size: 11px; }
.tabbar button.on { color: var(--ember2); background: rgba(255, 138, 61, 0.08); }
.badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; font-style: normal; line-height: 16px; }
.badge:empty { width: 9px; min-width: 9px; height: 9px; padding: 0; }

/* 패널 */
.sheet { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.45); display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
.sheet[hidden] { display: none; }
.sheet-card { width: 100%; max-width: 640px; max-height: calc(100dvh - 120px); background: var(--bg2); border: 1px solid var(--line); border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: up 0.18s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { margin: 0; font-size: 17px; }
.x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); }
.sheet-body { overflow-y: auto; padding: 12px 14px 18px; }
.lead { color: var(--dim); font-size: 13px; margin: 0 0 10px; }
.empty { color: var(--faint); text-align: center; padding: 20px 0; }
.btn { padding: 9px 14px; border-radius: 10px; border: 1px solid #ffb27a; background: linear-gradient(#ff9a4d, #e2622a); color: #1d0f06; font-weight: 700; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.ghost { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn.danger { background: #5a1d1d; border-color: var(--bad); color: #ffd6d6; }
.btn:disabled { opacity: 0.4; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.chip.on { border-color: var(--ember); color: var(--ember2); }
.chip small { color: var(--dim); }

.thumb { width: 54px; height: 54px; object-fit: contain; flex: none; display: grid; place-items: center; }
.thumb.emo, .fthumb.emo, .mini.emo, .pf-img.emo { font-size: 34px; line-height: 1; }
.slots { display: grid; gap: 8px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.slot.empty { justify-content: center; color: var(--faint); min-height: 56px; border-style: dashed; }
.slot.k-rare { border-color: var(--violet); } .slot.k-legend { border-color: var(--gold); } .slot.k-common { border-color: #4f8a5c; }
.sl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sl-info small { color: var(--dim); }
.sl-btns { display: flex; flex-direction: column; gap: 4px; }

.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ccard { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 12px; text-align: center; }
.ccard.unseen { opacity: 0.55; }
.ccard b { font-size: 12px; }
.dots { display: flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #3a3029; border: 1px solid var(--line); }
.dots i.on { background: var(--gold); border-color: var(--gold); }
.cdetail h3 { margin: 0 0 4px; }
.cdetail .legend { color: var(--gold); font-style: italic; }
.mlist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.mlist li { display: flex; gap: 8px; align-items: center; opacity: 0.6; }
.mlist li.on { opacity: 1; }
.mlist li div { display: flex; flex-direction: column; }
.mlist small { color: var(--dim); }
.mlist i { font-style: normal; font-size: 12px; color: var(--dim); line-height: 1.35; }
.mini { width: 40px; height: 40px; object-fit: contain; display: grid; place-items: center; }

.shoprow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sicon { font-size: 28px; width: 36px; text-align: center; }
.sinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sinfo small { color: var(--dim); }
.have { color: var(--gold); font-weight: 500; }
.sbtns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.feed { display: flex; flex-direction: column; gap: 6px; }
.fitem { display: flex; gap: 8px; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.fitem.mine { border-color: #6b5236; }
.fitem.big { border-color: var(--gold); background: linear-gradient(90deg, #3d2c14, var(--panel)); }
.fitem.t-boom { border-left: 3px solid var(--bad); } .fitem.t-sos { border-left: 3px solid var(--gold); } .fitem.t-fest { border-left: 3px solid var(--ember); } .fitem.t-find { border-left: 3px solid var(--violet); }
.fthumb { width: 40px; height: 40px; object-fit: contain; flex: none; display: grid; place-items: center; }
.fmain { flex: 1; min-width: 0; }
.fmain p { margin: 0 0 4px; font-size: 13.5px; }
.frow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ago { font-size: 11px; color: var(--faint); }
.rcs { margin-left: auto; display: flex; gap: 3px; }
.rc { border: 1px solid var(--line); background: var(--bg2); border-radius: 999px; padding: 1px 7px; font-size: 13px; }
.rc i { font-style: normal; font-size: 11px; color: var(--dim); margin-left: 2px; }
.rc.on { border-color: var(--ember); background: #3a2414; }
.rc:disabled { opacity: 0.5; }
.bread { border: 1px solid var(--gold); background: #3b2a16; color: var(--gold); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; }
.bread i { font-style: normal; color: var(--dim); }
.bread:disabled { opacity: 0.45; }
/* 채팅: 소식 카드와 달리 테두리·배경 없이 보낸 사람과 글만 */
.chatbox { display: flex; gap: 6px; margin: 0 0 8px; }
.side .feed { flex: 1; min-height: 0; }
.side .chatbox { margin: 0; padding: 8px; border-top: 1px solid var(--line); }
.sheet-body .chatbox { position: sticky; bottom: -18px; margin: 8px 0 -18px; padding: 8px 0 18px; background: var(--bg2); }
.chatbox input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; font-size: 14px; }
.chatbox input:disabled { opacity: 0.6; }
.chatbox .btn { flex: none; }
.chatline { padding: 2px 6px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.chatline .nick { margin-right: 6px; text-decoration: none; }
.chatline.mine .nick { color: var(--gold); }
.chatline .ctext { color: var(--text, #eee); }
.chatline.bonk { color: var(--dim); font-size: 13px; }
.chatline.bonk .nick { margin-right: 0; }
.nick { background: none; border: 0; padding: 0; color: var(--ember2); font-weight: 700; text-decoration: underline dotted; }

.ranks { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ranks li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--panel); }
.ranks li.me { border: 1px solid var(--ember); }
.rk { width: 28px; text-align: center; font-weight: 700; }
.sc { margin-left: auto; color: var(--gold); font-weight: 700; text-align: right; }
.sc small { color: var(--dim); font-weight: 400; display: block; font-size: 11px; }
.myrank { text-align: center; margin: 0 0 8px; }

.box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--panel); }
.box h4 { margin: 0 0 8px; font-size: 15px; }
.box h4 small { color: var(--dim); font-weight: 400; margin-left: 4px; }
.atts { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.att { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 8px; border: 1px solid var(--line); font-size: 11px; text-align: center; background: var(--bg2); }
.att.done { opacity: 0.5; background: #23301f; }
.att.next { border-color: var(--gold); box-shadow: 0 0 8px rgba(255, 209, 102, 0.4); }
.att span { font-size: 11px; }
.quests { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.quests li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13.5px; }
.quests li.done span { text-decoration: line-through; color: var(--dim); }
.qbar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #3a3029; overflow: hidden; position: relative; }
.qbar::after { content: ''; position: absolute; inset: 0; width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--ember), var(--gold)); }
.quests small { grid-row: 1; grid-column: 2; color: var(--dim); }
.stats { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--dim); }
.stats b { color: var(--text); }
.achs { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; max-height: 340px; overflow-y: auto; }
.achs li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; opacity: 0.6; }
.achs li.got { opacity: 1; background: #2f2618; }
.achs li div { flex: 1; display: flex; flex-direction: column; }
.achs small { color: var(--dim); }
.ar { font-size: 12px; color: var(--gold); white-space: nowrap; }
.opt { display: block; padding: 4px 0; }

/* 창 */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; animation: up 0.15s ease-out; }
.modal-body { margin-bottom: 12px; }
.modal-body h3 { margin: 4px 0 8px; }
.center { text-align: center; }
.big-emo { font-size: 44px; text-align: center; }
.login { display: flex; flex-direction: column; gap: 10px; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); }
.login input { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #120e0b; color: var(--text); }
.login input:focus { outline: 2px solid var(--ember); border-color: transparent; }
.login form { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.err { color: var(--bad); margin: 0; font-size: 13px; }
.okmsg { color: var(--good); margin: 0; font-size: 13px; }
.tiny { font-size: 11.5px; color: var(--faint); margin: 0; }
.help ul { padding-left: 18px; margin: 0; display: grid; gap: 6px; font-size: 13.5px; }
.profile .pf-item { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 8px 0; }
.pf-img { width: 110px; height: 110px; object-fit: contain; display: grid; place-items: center; }
.profile .pf-img.emo { font-size: 70px; }
.profile .stats { justify-content: center; }

/* 알림 */
.toasts { position: fixed; top: calc(58px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; width: min(440px, calc(100% - 20px)); pointer-events: none; }
.toast { background: rgba(42, 33, 27, 0.97); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); animation: tin 0.2s ease-out; }
.toast.good { border-color: #4f8a5c; } .toast.bad { border-color: var(--bad); } .toast.warn { border-color: var(--gold); } .toast.gold { border-color: var(--gold); background: #3b2c14; } .toast.feed { border-color: var(--ember); }
.toast .g { color: var(--gold); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: 0.35s; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.banner { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 70; pointer-events: none; text-align: center; padding: 16px 26px; border-radius: 18px; background: radial-gradient(circle, #4a2c10, #241710); border: 2px solid var(--gold); color: var(--text); font-size: 20px; box-shadow: 0 0 40px rgba(255, 209, 102, 0.45); max-width: calc(100% - 30px); }
.banner b { color: var(--gold); }
.banner small { display: block; font-size: 13px; color: var(--dim); margin-top: 4px; }
.banner.show { animation: bannerin 0.5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bannerin { from { transform: translate(-50%, -50%) scale(0.6); opacity: 0; } }
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; text-align: center; background: var(--bg); color: var(--dim); font-size: 16px; padding: 20px; }
.boot button { margin-top: 10px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--ember); background: var(--panel); }
.noscript { text-align: center; padding: 40px; }

@media (max-width: 420px) {
  .back-txt { display: none; }
  .wallet { gap: 6px; font-size: 13px; }
  .who { max-width: 90px; }
  .lv-badge { font-size: 28px; }
  .act.big { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .item img, .item-emoji, .aura { animation: none !important; }
}

/* 이달의 한정 무기 */
.k-event { color: #ff6b81; }
.kind.k-event { border-color: #ff6b81; background: rgba(255, 107, 129, 0.1); }
.slot.k-event { border-color: #ff6b81; }
.ccard { position: relative; }
.ccard .evtag { position: absolute; top: 4px; left: 4px; font-size: 10px; font-style: normal; padding: 1px 5px; border-radius: 8px; background: rgba(255, 107, 129, 0.18); color: #ff9aab; }
