/* UI 초안(보석 강화 게임 목업)의 톤: 어두운 갈색 바탕, 금색 테두리·모서리 장식, Cinzel 숫자, 고운바탕 본문 */
:root {
  --bg0: #0e0c0a; --bg1: #15120f; --bg2: #1b1712; --bg3: #241e18;
  --line: #332817; --line2: #4a3a22; --line3: #3a2f1e;
  --gold: #c9a227; --gold-hi: #e8c75a; --gold-pale: #f6e09a; --gold-dk: #6b5318;
  --text: #ece0c8; --dim: #b6a68a; --dimmer: #8d7f68; --faint: #7a6a50;
  --s: #d9b24c; --k: #8fa3b5; --d: #c08a4e; --x: #d2695a; --blue: #9fb3c8;
  --serif: 'Gowun Batang', 'Noto Serif KR', 'Noto Serif CJK KR', 'AppleMyungjo', serif;
  --num: 'Cinzel', 'Times New Roman', serif;
  --nav-h: 58px;
  /* 노치·홈 바 여백 (테스트에서 덮어써 실제 기기처럼 확인한다) */
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg0); color: var(--text); font-family: var(--serif); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

#app { position: relative; max-width: 480px; height: 100%; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg3) 0%, var(--bg1) 60%, var(--bg0) 100%) fixed; }

/* 상단 */
.top { flex: none; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--sat) + 14px) 16px 10px; border-bottom: 1px solid var(--line);
  background: rgba(21, 18, 15, .92); backdrop-filter: blur(6px); }
.gold { display: flex; align-items: center; gap: 6px; margin-right: auto; margin-left: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gold); background: radial-gradient(circle at 40% 35%, #3a2d14, #15120f);
  display: flex; align-items: center; justify-content: center; flex: none; }
.top-btns { display: flex; gap: 2px; }
.icon-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 37px; color: var(--dim); }
.icon-btn small { font-size: 9px; }
.icon-btn .dot { position: absolute; top: -2px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--x); box-shadow: 0 0 0 2px #15120f; }
.title .cnt { display: block; margin-top: 4px; font-size: 11px; color: var(--dim); letter-spacing: 0; }
.title .cnt b { color: var(--text); font-weight: 400; }
.gold b { font-family: var(--num); font-size: 15px; font-weight: 700; color: var(--gold-hi); letter-spacing: .3px; }
.coin { display: block; flex: none; }

.view { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding-bottom: 36px; }
.view > * { flex-shrink: 0; }

/* 공용 장식 */
.corner { position: absolute; width: 12px; height: 12px; border: 0 solid var(--gold-hi); filter: drop-shadow(0 0 3px rgba(232,199,90,.7)); }
.corner.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.panel, .card { position: relative; border: 1px solid transparent; border-radius: 5px;
  background: linear-gradient(180deg, #2a231b 0%, #1d1913 55%, #18140f 100%) padding-box,
              linear-gradient(170deg, #7a6236 0%, #3d311d 40%, #2a2216 70%, #5a4726 100%) border-box;
  box-shadow: inset 0 1px 0 rgba(255,236,190,.07), inset 0 -10px 18px rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.45); }
.title { padding: 16px 18px 4px; text-align: center; }
.eyebrow { font-size: 11px; letter-spacing: 4px; color: var(--gold); font-family: var(--num); }
.title .h { margin-top: 5px; font-size: 19px; letter-spacing: 1px; }
.divider { display: flex; align-items: center; gap: 8px; padding: 10px 18px 0; }
.divider i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(138,111,58,0), #8a6f3a); }
.divider i:last-child { background: linear-gradient(90deg, #8a6f3a, rgba(138,111,58,0)); }
.divider b { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.grade { display: inline-block; padding: 1px 6px; border: 1px solid currentColor; border-radius: 2px; font-size: 9px; line-height: 1.5; }
.mini { padding: 4px 10px; border: 1px solid var(--line2); border-radius: 2px; background: var(--bg2); color: var(--dim); font-size: 11px; }
.mini:disabled { opacity: .4; }
.big { position: relative; overflow: hidden; width: 100%; padding: 15px 0; border: 1px solid var(--gold-hi); border-radius: 4px; text-shadow: 0 1px 0 rgba(0,0,0,.6), 0 0 10px rgba(246,224,154,.35);
  background: linear-gradient(180deg, var(--gold-dk) 0%, #4a3a12 100%); color: var(--gold-pale); font-size: 17px; letter-spacing: 4px;
  box-shadow: inset 0 1px 0 rgba(246,224,154,.35), 0 2px 10px rgba(0,0,0,.5); }
.big:active:not(:disabled) { transform: translateY(1px); }
.big:disabled { background: linear-gradient(180deg, #3c3a38, #282625); border-color: #524f4c; color: #8f8b85; box-shadow: none; filter: none; opacity: .88; }

/* 제련 */
.gem-head { padding: 12px 20px 4px; text-align: center; }
.tag { display: inline-block; padding: 2px 10px; border: 1px solid currentColor; border-radius: 2px; font-size: 10px; letter-spacing: 1px; }
.gem-name { display: block; margin: 8px auto 0; font-size: 19px; letter-spacing: 1px; color: var(--text); }
.gem-name::after { content: ' ▾'; font-size: 11px; color: var(--faint); }
.gem-lv { font-family: var(--num); font-size: 46px; font-weight: 700; line-height: 1.05; color: var(--gold-hi);
  text-shadow: 0 0 18px rgba(201,162,39,.35); min-height: 48px; }
.view > .frame { flex: 1 1 auto; min-height: 150px; }
.frame { position: relative; margin: 2px 20px 0; border: 1px solid var(--line3); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(60% 55% at 50% 45%, var(--glow, rgba(122,96,196,.22)) 0%, rgba(20,16,13,0) 70%); }
.frame .corner { z-index: 2; }
.gem-svg { display: block; overflow: visible; }
.frame .gemwrap { position: relative; width: min(200px, 62%); aspect-ratio: 1; max-height: calc(100% - 34px); }
.frame .gemwrap .gem-svg { width: 100%; height: 100%; }
.art { height: 100%; display: flex; align-items: center; justify-content: center; }
.r-success { color: var(--s); } .r-keep { color: var(--k); } .r-down { color: var(--d); } .r-destroyed { color: var(--x); }
.r-destroy_blocked { color: var(--gold-pale); } .r-open, .r-awaken { color: var(--gold-hi); }

.sale-row { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--dim); }
.sale-row b { font-family: var(--num); font-weight: 500; color: var(--text); }

.probs { margin: 12px 20px 0; padding: 12px 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.panel-head span { font-size: 11px; letter-spacing: 1px; color: var(--gold); }
.panel-head small { font-size: 10px; color: var(--dim); }
.prow { display: flex; align-items: center; gap: 10px; }
.prow + .prow { margin-top: 7px; }
.prow .lbl { width: 34px; font-size: 13px; }
.prow .track { flex: 1; height: 9px; background: #120f0c; border: 1px solid var(--line3); border-radius: 2px; overflow: hidden; }
.prow .fill { height: 100%; transition: width .25s; }
.prow .val { width: 92px; text-align: right; white-space: nowrap; }
.prow .old { font-size: 11px; color: var(--dimmer); text-decoration: line-through; margin-right: 6px; }
.prow .new { font-family: var(--num); font-size: 14px; font-weight: 700; }
.prow.blocked .new { text-decoration: line-through; text-decoration-thickness: 1.5px; opacity: .8; }
.prow .shield { font-size: 10px; color: var(--gold-pale); margin-left: 4px; }

.slots { margin: 12px 20px 0; display: flex; gap: 10px; justify-content: center; }
.slot { position: relative; width: 68px; height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.slot .nm { font-size: 10px; color: var(--dim); letter-spacing: -.3px; }
.slot .q { position: absolute; top: 3px; right: 5px; font-size: 9px; color: var(--faint); font-family: var(--num); }
.slot.add { background: var(--bg1); border: 1px dashed var(--line2); border-radius: 4px; }
.slot.locked { opacity: .35; }

.bottom { margin-top: auto; padding: 4px 20px 0; }
.cost-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; font-size: 12px; color: var(--dim); }
.amount { display: flex; align-items: center; gap: 5px; font-family: var(--num); font-size: 14px; color: var(--text); }
.err { min-height: 16px; margin-bottom: 4px; font-size: 12px; color: var(--x); text-align: center; }

/* 목록 */
.seg { display: flex; gap: 7px; padding: 12px 18px 10px; }
.seg button { padding: 4px 10px; border: 1px solid var(--line2); border-radius: 2px; background: var(--bg2); color: var(--dim); font-size: 11px; }
.seg button.on { background: #3a2d14; color: var(--gold-hi); }
.list { padding: 0 18px; display: flex; flex-direction: column; gap: 9px; }
.row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; text-align: left; width: 100%; }
.row.sel { border-color: var(--gold); }
.row .pic { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; }
.row .mid { flex: 1; min-width: 0; }
.row .n { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.row .n .lv { font-family: var(--num); font-weight: 700; color: var(--gold-hi); }
.row .sub { margin-top: 3px; display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--dim); line-height: 1.45; }
.row .right { text-align: right; flex: none; }
.row .right .amount { justify-content: flex-end; }
.row .right small { display: block; margin-top: 3px; font-size: 10px; color: var(--dim); }
.buy { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.empty-card { padding: 26px 16px; text-align: center; background: var(--bg2); border-left: 2px solid #8a6f3a; }
.empty-title { font-size: 14px; color: var(--text); }
.empty-sub { margin-top: 8px; font-size: 11px; color: var(--dim); line-height: 1.7; }
.me-card { padding: 14px; font-size: 12px; color: var(--dim); line-height: 1.8; }
.me-card b { font-family: var(--num); color: var(--gold-hi); font-weight: 500; }

/* 도감 */
.codex { padding: 14px 18px 0; display: grid; }
.codex .cell { position: relative; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.codex .cell.unknown .gem-svg { filter: brightness(0) opacity(.35); }
.codex .cell .cn { font-size: 13px; }
.codex .cell .cs { display: flex; gap: 6px; align-items: center; font-size: 10px; color: var(--dim); }
.foot-note { margin-top: 16px; text-align: center; font-size: 11px; color: var(--dim); line-height: 1.8; }

/* 알림 */
.toast { position: absolute; left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 34px); transform: translate(-50%, 8px);
  z-index: 7; max-width: 88%; padding: 8px 14px; border: 1px solid var(--gold-dk); border-radius: 3px; background: rgba(21,18,15,.95);
  color: var(--gold-pale); font-size: 12px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* 하단 탭 */
.tabs { flex: none; z-index: 6; display: flex; align-items: flex-end; border-top: 1px solid var(--line); background: #120f0c; padding-bottom: var(--sab); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; color: var(--dimmer); font-size: 10px; }
.tabs button svg { stroke: currentColor; }
.tabs button.on { color: var(--gold-hi); }
/* 가운데 제련 버튼: 둥글고 크게, 바 위로 솟게 */
.tabs button.center { flex: 1.2; gap: 4px; padding-top: 0; }
.tabs button.center .orb { width: 64px; height: 64px; margin-top: -26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--gold); background: radial-gradient(circle at 50% 30%, #8a6c22 0%, var(--gold-dk) 55%, #3a2d0c 100%);
  box-shadow: 0 0 0 4px #120f0c, 0 4px 14px rgba(0,0,0,.6), inset 0 1px 0 rgba(246,224,154,.4); color: var(--gold-pale); }
.tabs button.center .orb svg { width: 28px; height: 28px; }
.tabs button.center:not(.on) .orb { filter: saturate(.55) brightness(.8); }
.tabs button.center.on { color: var(--gold-hi); }
.tabs { overflow: visible; }
.sheet .note { margin-top: 12px; padding: 10px 12px; background: var(--bg2); border-left: 2px solid #8a6f3a; font-size: 11px; color: var(--dim); line-height: 1.7; }

/* 아래에서 올라오는 시트 */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); width: 100%; max-width: 480px; margin: auto auto var(--kb, 0px); max-height: 80vh; max-height: calc(100dvh - var(--sat) - 16px - var(--kb, 0px)); }
dialog::backdrop { background: rgba(0,0,0,.65); }
.sheet { background: linear-gradient(180deg, var(--bg3), var(--bg1)); border: 1px solid var(--line2); border-bottom: 0;
  border-radius: 10px 10px 0 0; padding: 14px 16px calc(var(--sab) + 18px); max-height: 80vh; max-height: calc(100dvh - var(--sat) - 16px - var(--kb, 0px)); overflow: auto; }
/* 키보드가 떠 있을 때: 보이는 높이에 맞추고, 홈 바 여백은 뺀다 (키보드가 그 자리를 덮음) */
html.kb dialog, html.kb .sheet { max-height: calc(min(100dvh - var(--kb, 0px), var(--vvh, 100dvh)) - 12px); }
html.kb .sheet { padding-bottom: 18px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 15px; letter-spacing: 1px; }
.sheet .list { padding: 0; }
.sheet .row:disabled { opacity: .4; }
/* 출석 */
.attend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.attend .day { position: relative; padding: 10px 4px 8px; text-align: center; min-height: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.attend .day.wide { grid-column: span 2; }
.attend .day .dn { font-size: 10px; letter-spacing: 1px; color: var(--gold); }
.attend .day .rw { font-size: 10px; color: var(--dim); line-height: 1.45; }
.attend .day.done { opacity: .45; }
.attend .day.done::after { content: '받음'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; letter-spacing: 3px; color: var(--gold-pale); background: rgba(14,12,10,.55); border-radius: 4px; }
.attend .day.today { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,162,39,.25); }
.claim { margin-top: 12px; }
.msg { min-height: 18px; margin-top: 8px; text-align: center; font-size: 12px; color: var(--gold-pale); }
/* 업적 */
.ach .mid .sub { display: block; }
.ach .pbar { height: 5px; margin-top: 6px; background: #120f0c; border: 1px solid var(--line3); border-radius: 2px; overflow: hidden; }
.ach .pbar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6c22, #e8c75a); }
.ach.done { opacity: .5; }
.mini.gold { border-color: var(--gold); color: var(--gold-pale); background: linear-gradient(180deg, var(--gold-dk), #4a3a12); }
/* 도감 수집 */
.prog { margin: 12px 18px 0; padding: 12px 14px; }
.prog .bar { height: 8px; background: #120f0c; border: 1px solid var(--line3); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6c22, #e8c75a); }
.codex { grid-template-columns: repeat(3, 1fr); gap: 9px; }
.codex .cell { padding: 10px 4px; }
.codex .cell.unknown .cn { color: var(--faint); }
.codex .new { position: absolute; top: 6px; right: 6px; font-size: 9px; color: #120f0c; background: var(--gold-hi); padding: 1px 5px; border-radius: 2px; }
.codex .best { font-family: var(--num); color: var(--gold-hi); }
/* 유저 상점 */
.chips { flex-wrap: wrap; padding-top: 4px; }
.mkt-head { display: flex; justify-content: space-between; padding: 0 18px 6px; font-size: 11px; color: var(--dim); }
.mkt-head b { color: var(--text); font-weight: 400; }
.mult { margin-top: 3px; font-size: 10px; color: var(--d); }
.row.mine { border-style: dashed; }
.mine-tag { font-size: 9px; color: var(--gold-pale); border: 1px solid var(--gold-dk); padding: 0 5px; border-radius: 2px; }
#shopMarket .note { margin-top: 12px; padding: 10px 12px; background: var(--bg2); border-left: 2px solid #8a6f3a; font-size: 10px; color: var(--dim); line-height: 1.7; }
.mkt-bottom { padding: 14px 18px 0; }
.detail { text-align: center; padding: 4px 0 8px; }
.detail .gem-svg { margin: 0 auto; }
.detail .nm { font-size: 17px; margin-top: 6px; }
.detail .nm .lv { font-family: var(--num); color: var(--gold-hi); font-weight: 700; margin-left: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0; font-size: 12px; color: var(--dim); }
.kv b { text-align: right; color: var(--text); font-weight: 400; font-family: var(--num); }
.kv b.hi { color: var(--gold-hi); font-size: 15px; }
.price-in { width: 100%; padding: 12px; margin-top: 6px; border: 1px solid var(--gold); border-radius: 3px; background: #120f0c;
  color: var(--gold-hi); font-family: var(--num); font-size: 20px; text-align: right; }
.quick { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* ───────── 입체감·빛 ───────── */
.big { background: linear-gradient(180deg, #8c6c22 0%, #6b5318 45%, #4a3a12 55%, #3a2d0c 100%);
  box-shadow: inset 0 1px 0 rgba(255,240,190,.55), inset 0 -2px 0 rgba(0,0,0,.4), 0 0 0 1px #2a200b, 0 4px 14px rgba(0,0,0,.6), 0 0 18px rgba(201,162,39,.28); }
.big::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,245,210,.28), transparent); animation: sheen 3.6s ease-in-out infinite; }
.big:disabled::after { display: none; }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.tag, .grade { text-shadow: 0 0 6px currentColor; box-shadow: 0 0 6px -1px currentColor, inset 0 0 6px -2px currentColor; }
.gem-lv { background: linear-gradient(180deg, #ffd96a 0%, #e8b830 45%, #9a7414 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)) drop-shadow(0 0 12px rgba(232,199,90,.35)); }
.prow .track { box-shadow: inset 0 1px 2px rgba(0,0,0,.7); }
.prow .fill { position: relative; box-shadow: 0 0 8px -1px currentColor; background-image: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 55%, rgba(0,0,0,.2)) !important; }
.mini { box-shadow: inset 0 1px 0 rgba(255,236,190,.08), 0 2px 4px rgba(0,0,0,.4); }
.seg button.on { box-shadow: inset 0 0 8px rgba(232,199,90,.25), 0 0 8px rgba(232,199,90,.2); border-color: var(--gold-dk); }
.tabs { box-shadow: 0 -6px 16px rgba(0,0,0,.5); background: linear-gradient(180deg, #17130f, #0f0d0a); }
.tabs button.center .orb { animation: orb 3s ease-in-out infinite; }
/* 선택 안 된 제련 버튼은 흐리게(saturate·brightness) 두는데, 위 애니메이션이 filter 를 통째로 바꾸면
   두 값이 이어지지 않아 1.5초마다 흐림↔밝음으로 툭툭 바뀌며 깜빡인다 → 흐린 상태에서는 애니메이션을 끈다 */
.tabs button.center:not(.on):not(.auto-run) .orb { animation: none; }
.tabs button.center.on .orb { box-shadow: 0 0 0 4px #120f0c, 0 4px 14px rgba(0,0,0,.6), 0 0 22px rgba(232,199,90,.55), inset 0 1px 0 rgba(246,224,154,.5); }
@keyframes orb { 50% { filter: brightness(1.15); } }
.top { box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.avatar { box-shadow: 0 0 10px rgba(232,199,90,.3), inset 0 1px 0 rgba(255,236,190,.2); }

/* 판매 버튼: 누르기 쉽게 크게 */
.sell-btn { min-width: 64px; padding: 7px 14px; border-radius: 16px; border: 1px solid var(--gold-dk); color: var(--gold-pale); font-size: 12px;
  background: linear-gradient(180deg, #3a2d14, #241c0e); box-shadow: inset 0 1px 0 rgba(255,236,190,.2), 0 0 8px rgba(201,162,39,.25); }
.sell-btn:active { transform: translateY(1px); }
.sell-btn:disabled { opacity: .45; }

/* ───────── 등급별 배경 (제련 탭에서 화면 전체) ───────── */
#app.graded { background:
    radial-gradient(120% 60% at 50% 22%, color-mix(in srgb, var(--gc) 42%, transparent) 0%, transparent 70%),
    radial-gradient(90% 40% at 50% 100%, color-mix(in srgb, var(--gc) 22%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--gc) 22%, #15120f) 0%, color-mix(in srgb, var(--gc) 9%, #0e0c0a) 100%); }
#app.graded .top { background: color-mix(in srgb, var(--gc) 16%, rgba(21,18,15,.92)); border-bottom-color: color-mix(in srgb, var(--gc) 45%, #332817); }
#app.graded .tabs { border-top-color: color-mix(in srgb, var(--gc) 45%, #332817); }
#app.graded .panel, #app.graded .card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 12%, #2a231b) 0%, color-mix(in srgb, var(--gc) 6%, #1d1913) 55%, #18140f 100%) padding-box,
              linear-gradient(170deg, color-mix(in srgb, var(--gc) 70%, #7a6236) 0%, color-mix(in srgb, var(--gc) 30%, #3d311d) 40%, #2a2216 70%, color-mix(in srgb, var(--gc) 55%, #5a4726) 100%) border-box; }
#app.graded .slot.add { border-color: color-mix(in srgb, var(--gc) 50%, #4a3a22); }
.frame { border-color: color-mix(in srgb, var(--gc, #9a9a8c) 55%, #3a2f1e);
  box-shadow: inset 0 0 30px rgba(0,0,0,.55), inset 0 0 50px -8px color-mix(in srgb, var(--gc, #9a9a8c) 55%, transparent), 0 0 22px -4px var(--gc, transparent); }
/* 화면 전체 빛무리: 강화 단계가 높을수록 진하고 숨쉬듯 */
.aura { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .8s;
  background: radial-gradient(70% 38% at 50% 30%, var(--hc) 0%, transparent 70%); mix-blend-mode: screen; }
#app.graded[data-tier="1"] .aura { opacity: .12; }
#app.graded[data-tier="2"] .aura { opacity: .22; }
#app.graded[data-tier="3"] .aura { opacity: .32; animation: aura 3s ease-in-out infinite; }
#app.graded[data-tier="4"] .aura { opacity: .45; animation: aura 2s ease-in-out infinite; }
@keyframes aura { 50% { filter: brightness(1.4); transform: scale(1.05); } }
.view, .tabs { position: relative; z-index: 1; }
.top { position: relative; z-index: 5; }

/* ───────── 후광 (강화 단계가 오를수록) ───────── */
.halo { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.halo i { position: absolute; border-radius: 50%; opacity: 0; transition: opacity .6s; }
.halo .glow { width: 62%; aspect-ratio: 1; background: radial-gradient(circle, var(--hc) 0%, transparent 65%); }
.halo .rays { width: 120%; aspect-ratio: 1;
  background: var(--rays1, repeating-conic-gradient(var(--hc) 0 4deg, transparent 4deg 22deg));
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 60%); mask: radial-gradient(circle, #000 8%, transparent 60%);
  animation: spin 22s linear infinite; }
.halo .rays.r2 { animation-duration: 34s; animation-direction: reverse; width: 100%;
  background: var(--rays2, repeating-conic-gradient(var(--hc) 0 2deg, transparent 2deg 15deg));
  -webkit-mask: radial-gradient(circle, #000 6%, transparent 52%); mask: radial-gradient(circle, #000 6%, transparent 52%); }
.halo .orbit { width: 78%; aspect-ratio: 1; border: 1px solid var(--hc); box-shadow: 0 0 12px var(--hc), inset 0 0 12px var(--hc); animation: breathe 2.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.06); } }
.halo[data-tier="1"] .glow { opacity: .35; }
.halo[data-tier="2"] .glow { opacity: .55; } .halo[data-tier="2"] .rays:not(.r2) { opacity: .1; }
.halo[data-tier="3"] .glow { opacity: .7; } .halo[data-tier="3"] .rays { opacity: .16; } .halo[data-tier="3"] .orbit { opacity: .22; }
.halo[data-tier="4"] .glow { opacity: .95; } .halo[data-tier="4"] .rays { opacity: .32; } .halo[data-tier="4"] .orbit { opacity: .45; }
.halo[data-tier="4"] .rays:not(.r2) { animation-duration: 12s; }

/* ───────── 보석 동작 ───────── */
.art { position: relative; z-index: 1; transition: opacity .2s, transform .7s cubic-bezier(.3,0,.2,1); transform: scale(var(--zoom, 1)); }
.art.charge .gem-svg { animation: charge .4s ease-in-out infinite alternate; }
@keyframes charge { to { transform: scale(1.04); filter: brightness(1.35) drop-shadow(0 0 14px var(--hc)); } }
.art.pop .gem-svg { animation: pop .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 0% { transform: scale(.85); filter: brightness(2.2); } 40% { transform: scale(1.14); filter: brightness(1.6) drop-shadow(0 0 22px var(--hc)); } 100% { transform: scale(1); } }
.art.wobble .gem-svg { animation: wobble .5s; }
@keyframes wobble { 25% { transform: rotate(-5deg); } 50% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }
.art.sink .gem-svg { animation: sink .8s ease-out; }
@keyframes sink { 15% { transform: translate(-6px, 4px); filter: brightness(.6) sepia(1) hue-rotate(-30deg) saturate(3); } 30% { transform: translate(6px, 8px); }
  45% { transform: translate(-4px, 10px); } 100% { transform: none; filter: none; } }
.art.shattered { opacity: 0; transition: none; }
.art.emerge .gem-svg { animation: emerge .9s cubic-bezier(.2,1.5,.35,1); }
@keyframes emerge { 0% { transform: scale(.2) rotate(-25deg); filter: brightness(4); opacity: 0; } 30% { opacity: 1; }
  60% { transform: scale(1.18) rotate(4deg); filter: brightness(1.8) drop-shadow(0 0 26px var(--hc)); } 100% { transform: none; } }
.art.ascend .gem-svg { animation: ascend 1.6s ease-out; }
@keyframes ascend { 30% { transform: translateY(-10px) scale(1.15); filter: brightness(2.5) drop-shadow(0 0 30px #ffe9a8); } 100% { transform: none; } }
.art.rumble .gemwrap { animation: rumble .09s linear infinite; }
.art.rumble2 .gemwrap { animation: rumble2 .06s linear infinite; }
@keyframes rumble { 50% { transform: translate(1.5px, -1px) rotate(.6deg); } }
@keyframes rumble2 { 25% { transform: translate(-2.5px, 1px) rotate(-1deg); } 75% { transform: translate(2.5px, -1px) rotate(1deg); } }

/* 금 (원석 개봉·파괴) */
.cracks { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cracks path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  transition: stroke-dashoffset .3s ease-out, opacity .4s; }
.cracks path.l { stroke: #fff0b8; }
.cracks path.b { stroke: var(--crack, #ffb21f); opacity: .95; }
.cracks.s1 .k1, .cracks.s2 :is(.k1, .k2), .cracks.s3 :is(.k1, .k2, .k3), .cracks.s4 path { stroke-dashoffset: 0; }
/* 틈 안쪽에서 번지는 빛과 바깥으로 새어 나오는 빛줄기 */
.cracks .core { opacity: 0; transition: opacity .6s; mix-blend-mode: screen; }
.cracks.s1 .core { opacity: .25; } .cracks.s2 .core { opacity: .45; } .cracks.s3 .core { opacity: .7; } .cracks.s4 .core { opacity: 1; }
.cracks .rays { mix-blend-mode: screen; }
.cracks .ray { opacity: 0; transition: opacity .45s; }
.cracks.s2 .ray.k2, .cracks.s3 :is(.ray.k2, .ray.k3), .cracks.s4 .ray { opacity: var(--o, .8); animation-name: rayflicker; animation-iteration-count: infinite; animation-direction: alternate; animation-timing-function: ease-in-out; }
@keyframes rayflicker { 0% { opacity: calc(var(--o, .8) * .45); } 60% { opacity: var(--o, .8); } 100% { opacity: calc(var(--o, .8) * .7); } }
.cracks.fade path, .cracks.fade .ray, .cracks.fade .core { opacity: 0; }
.cracks.fast path { transition-duration: .12s; }
.leak { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(circle at 50% 50%, rgba(255,186,60,.9) 0%, rgba(255,130,20,.35) 20%, transparent 46%); mix-blend-mode: screen;
  transform: scale(var(--zoom, 1)); transition: opacity .5s, transform .7s cubic-bezier(.3,0,.2,1); }

/* 파괴 방지 방패 */
.shield { position: absolute; z-index: 3; width: 70%; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.6);
  border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, transparent 55%, rgba(255,228,140,.35) 70%, rgba(255,240,190,.8) 74%, transparent 76%),
              repeating-conic-gradient(from 0deg, rgba(255,228,140,.18) 0 30deg, transparent 30deg 60deg); }
.shield.show { animation: shield 1.1s ease-out; }
@keyframes shield { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  70% { opacity: .8; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); } }

/* 액자 효과: 캔버스, 붉은 충격, 흔들림 */
.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none; }
.vignette { position: absolute; inset: 0; z-index: 14; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 35%, transparent 30%, var(--vc, rgba(210,60,40,.6)) 100%); }
.screen-flash { position: absolute; inset: 0; z-index: 13; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 32%, var(--fc) 0%, color-mix(in srgb, var(--fc) 40%, transparent) 45%, transparent 85%); mix-blend-mode: screen; }
.screen-flash.show { animation: sflash .9s ease-out; }
@keyframes sflash { 8% { opacity: var(--fa, 1); } 100% { opacity: 0; } }
.vignette.show { animation: vig .9s ease-out; }
@keyframes vig { 10% { opacity: 1; } 100% { opacity: 0; } }
#app.quake { animation: quake .5s; }
@keyframes quake { 10% { transform: translate(-6px, 3px); } 20% { transform: translate(6px, -4px); } 35% { transform: translate(-5px, 2px); }
  50% { transform: translate(4px, 3px); } 70% { transform: translate(-2px, -1px); } }

/* 결과 글자 */
.flash { position: absolute; z-index: 6; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 26px; font-weight: 700; letter-spacing: 6px;
  opacity: 0; pointer-events: none; text-shadow: 0 2px 0 #000, 0 0 12px currentColor, 0 0 26px currentColor; }
.flash.show { animation: flashtxt 1.6s ease-out; }
@keyframes flashtxt { 0% { opacity: 0; transform: scale(1.8); filter: blur(4px); } 14% { opacity: 1; transform: scale(1); filter: none; }
  75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
.flash small { display: block; font-size: 12px; letter-spacing: 3px; margin-top: 2px; }
.gem-lv.lvup { animation: lvup .7s cubic-bezier(.2,1.6,.4,1); }
.gem-lv.lvdown { animation: lvdown .6s; }
@keyframes lvup { 0% { transform: scale(.6); } 50% { transform: scale(1.35); filter: drop-shadow(0 0 22px #ffe9a8); } 100% { transform: scale(1); } }
@keyframes lvdown { 20% { transform: translateY(6px); filter: drop-shadow(0 0 10px #d2695a) grayscale(.5); } 40% { transform: translate(-4px, 6px); } 60% { transform: translate(4px, 4px); } }

/* ───────── 돈 ───────── */
.gold { position: relative; }
.gold b { transition: text-shadow .3s, transform .3s; }
.gold.gain b { text-shadow: 0 0 10px rgba(255,220,120,.9), 0 0 20px rgba(255,200,80,.6); transform: scale(1.08); }
.gold-pop { position: absolute; left: 22px; top: 100%; margin-top: 2px; white-space: nowrap; font-family: var(--num); font-size: 15px; font-weight: 700;
  color: #ffe9a8; text-shadow: 0 0 8px rgba(255,210,100,.9), 0 2px 0 #000; opacity: 0; pointer-events: none; z-index: 10; }
.gold-pop.show { animation: goldpop 1.8s ease-out; }
.gold-pop.minus { color: #e8a090; text-shadow: 0 2px 0 #000; font-size: 12px; }
@keyframes goldpop { 0% { opacity: 0; transform: translateY(10px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.15); }
  30% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.coins { position: absolute; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.coins svg { position: absolute; width: 18px; height: 18px; filter: drop-shadow(0 0 4px rgba(255,210,100,.8)); }

@media (prefers-reduced-motion: reduce) {
  .halo i, .big::after, .tabs button.center .orb { animation: none !important; }
}

/* ───────── 제련 화면: 한 화면에 딱 맞게 (스크롤 없음) ───────── */
.view[data-view="forge"] { overflow-x: hidden; overflow-y: auto; padding-bottom: 34px; scrollbar-width: none; }
.view[data-view="forge"]::-webkit-scrollbar { display: none; }
.view[data-view="forge"] .gem-head { padding: 8px 20px 2px; }
.view[data-view="forge"] .gem-name { margin-top: 4px; }
.view[data-view="forge"] .sale-row { margin-top: 8px; }
.view[data-view="forge"] .probs { margin-top: 8px; padding: 10px 14px; }
.view[data-view="forge"] .prow + .prow { margin-top: 5px; }
#app.fit1 .view[data-view="forge"] .gem-lv { font-size: 36px; min-height: 38px; }
#app.fit1 .view[data-view="forge"] .tag { display: none; }
#app.fit1 .view[data-view="forge"] .panel-head { margin-bottom: 4px; }
#app.fit1 .view[data-view="forge"] .prow + .prow { margin-top: 3px; }
#app.fit1 .view[data-view="forge"] .cost-row { padding: 4px 2px; }
#app.fit1 .view[data-view="forge"] .big { padding: 11px 0; font-size: 16px; }
#app.fit1 .view[data-view="forge"] > .frame { min-height: 110px; }
#app.fit1 .view[data-view="forge"] .gem-name { font-size: 17px; }
#app.fit1 .view[data-view="forge"] .sale-row { margin-top: 5px; }
#app.fit1 .view[data-view="forge"] .probs { padding: 7px 12px; margin-top: 6px; }
#app.fit1 .view[data-view="forge"] .prow .lbl { font-size: 12px; }
#app.fit1 .view[data-view="forge"] .err { min-height: 14px; margin-bottom: 2px; }
#app.fit1 .view[data-view="forge"] { padding-bottom: 30px; }

/* 아이템 칸: 보석 액자 오른쪽 위에 작게 */
.frame .slots { position: absolute; top: 8px; right: 8px; z-index: 7; margin: 0; gap: 5px; justify-content: flex-end; }
.frame .slot { width: 40px; height: 40px; gap: 0; border-radius: 4px; }
.frame .slot svg { width: 20px; height: 20px; }
.frame .slot .nm { display: none; }
.frame .slot .q { top: auto; bottom: 1px; right: 3px; font-size: 8px; color: var(--gold-pale); }
.frame .slot .corner { width: 7px; height: 7px; }
.frame .slot.add { background: rgba(14,12,10,.55); border-color: color-mix(in srgb, var(--gc, #9a9a8c) 50%, #4a3a22); }
.frame .slot.add svg { width: 14px; height: 14px; }
.frame .slot.locked { display: none; }
.frame .slots-label { position: absolute; top: 50px; right: 10px; z-index: 7; font-size: 9px; color: var(--dim); }

/* 클로즈업 때 주변을 어둡게 */
.dim { position: absolute; inset: 0; z-index: 12; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(ellipse at 50% 32%, transparent 18%, rgba(0,0,0,.85) 60%); }

/* 수상한 원석일 때는 어둡게 */
#app.graded.stone { background: radial-gradient(90% 50% at 50% 28%, rgba(60,48,80,.25) 0%, transparent 70%), linear-gradient(180deg, #0d0b09, #050403); }
#app.graded.stone .top { background: rgba(10,9,7,.95); border-bottom-color: #221b12; }
#app.graded.stone .panel, #app.graded.stone .card {
  background: linear-gradient(180deg, #17130f, #0f0d0a) padding-box, linear-gradient(170deg, #4a3c24, #241c11 50%, #3a2f1c) border-box; }
#app.graded.stone .frame { background: radial-gradient(50% 50% at 50% 50%, rgba(70,55,100,.18), transparent 70%), #080706; border-color: #2e2618; box-shadow: inset 0 0 40px rgba(0,0,0,.9); }


.cracks.fade .ray { animation: none; }

/* 화면 들썩임 방지: 상태가 바뀌어도 칸 높이를 고정한다 */
.view[data-view="forge"] .sale-row { height: 32px; margin-top: 8px; }
.view[data-view="forge"] #probRows { height: 118px; display: flex; flex-direction: column; justify-content: space-around; }
.view[data-view="forge"] #probRows .prow + .prow { margin-top: 0; }
.view[data-view="forge"] .gem-head { height: 112px; box-sizing: border-box; overflow: hidden; }
.view[data-view="forge"] .cost-row { height: 36px; }
.view[data-view="forge"] .err { height: 16px; overflow: hidden; }
#app.fit1 .view[data-view="forge"] #probRows { height: 96px; }
#app.fit1 .view[data-view="forge"] .gem-head { height: 74px; }
#app.fit1 .view[data-view="forge"] .sale-row { height: 28px; margin-top: 4px; }
#app.fit1 .view[data-view="forge"] .cost-row { height: 26px; }
/* 2단계: 채팅 줄 대신 작은 채팅 버튼, 액자 더 작게 */
#app.fit2 .chat-strip { display: none; }
#app.fit2 .chat-pill { display: inline-flex; }
#app.fit2 .view[data-view="forge"] > .frame { min-height: 96px; }
#app.fit2 .view[data-view="forge"] { padding-bottom: 30px; }
/* 3단계: 아주 작은 화면 */
#app.fit3 .view[data-view="forge"] .gem-head { height: 60px; padding-top: 4px; }
#app.fit3 .view[data-view="forge"] .gem-lv { font-size: 30px; min-height: 32px; }
#app.fit3 .view[data-view="forge"] .gem-name { font-size: 15px; margin-top: 2px; }
#app.fit3 .view[data-view="forge"] #probRows { height: 88px; }
#app.fit3 .view[data-view="forge"] .prow { line-height: 1.1; }
#app.fit3 .view[data-view="forge"] .prow .lbl { font-size: 11px; }
#app.fit3 .view[data-view="forge"] .prow .new { font-size: 12px; }
#app.fit3 .view[data-view="forge"] .sale-row { height: 24px; margin-top: 2px; }
#app.fit3 .view[data-view="forge"] .big { padding: 9px 0; }
#app.fit3 .view[data-view="forge"] > .frame { min-height: 80px; }
#app.fit3 .view[data-view="forge"] .probs { margin-top: 4px; padding: 6px 12px; }

/* 자동 강화 */
.auto-row { display: flex; justify-content: space-between; align-items: center; height: 28px; margin-bottom: 6px; }
.auto-info { font-size: 11px; color: var(--gold-pale); text-shadow: 0 0 8px rgba(232,199,90,.4); }
.auto-btn { padding: 5px 12px; border-radius: 14px; border: 1px solid var(--gold-dk); color: var(--gold-pale); font-size: 11px; letter-spacing: 1px;
  background: linear-gradient(180deg, #2e2410, #1c160b); box-shadow: inset 0 1px 0 rgba(255,236,190,.15), 0 0 8px rgba(201,162,39,.2); }
.big.stop { background: linear-gradient(180deg, #8a2a1c 0%, #5e1a10 50%, #3d0f08 100%); border-color: #e0705a;
  box-shadow: inset 0 1px 0 rgba(255,200,180,.4), 0 0 18px rgba(224,90,60,.35); color: #ffe0d6; }
.big.stop::after { display: none; }
.auto-set { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 6px; font-size: 13px; color: var(--dim); }
.auto-set .seg { padding: 0; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper b { font-family: var(--num); font-size: 22px; color: var(--gold-hi); min-width: 52px; text-align: center; }
.stepper .mini { width: 36px; height: 32px; font-size: 16px; }
#app.fit1 .auto-row { height: 24px; margin-bottom: 3px; }

/* ───────── 정령 ───────── */
.spirit-svg { display: block; width: 100%; height: 100%; }
.codex.spirits .cell { padding: 10px 4px 10px; text-align: center; width: 100%; color: inherit; }
.codex .sp { width: 78px; height: 78px; }
.codex .cell.unknown .sp { filter: brightness(0) opacity(.4); }
.codex .cs.dim { color: var(--faint); }
.codex .cs.eff { color: var(--gold-pale); font-size: 10px; line-height: 1.4; }
.codex .cell.worn-on { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 14px rgba(232,199,90,.35), 0 6px 14px rgba(0,0,0,.45); }
.equip { margin: 4px 18px 12px; padding: 12px 14px; }
.equip-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.eslot { position: relative; height: 104px; border: 1px dashed var(--line2); border-radius: 5px; background: rgba(14,12,10,.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--faint); font-size: 11px; }
.eslot.on { border-style: solid; border-color: var(--gold-dk); color: var(--gold-pale);
  background: radial-gradient(circle at 50% 40%, rgba(232,199,90,.18), transparent 70%), rgba(14,12,10,.5); }
.eslot .sp { width: 72px; height: 72px; }
.buff { margin-top: 10px; font-size: 11px; color: var(--dim); line-height: 1.7; text-align: center; }
.buff b { color: var(--gold-pale); font-weight: 400; }
.buff small { color: var(--faint); font-size: 10px; }
/* 제련 화면: 장착한 정령 */
.worn { position: absolute; top: 8px; left: 8px; z-index: 7; display: flex; gap: 2px; padding: 2px 4px; border-radius: 14px;
  background: rgba(14,12,10,.55); border: 1px solid color-mix(in srgb, var(--gc, #9a9a8c) 45%, #4a3a22); }
.worn .sp { width: 32px; height: 32px; display: block; }
.codex .cs { flex-wrap: wrap; justify-content: center; }
.codex .cs .grade { white-space: nowrap; }

/* ───────── 정령 중복 각성 +n (보석처럼, 겹칠수록 화려하게) ───────── */
.plus { font-family: var(--display, Cinzel, 'Times New Roman', serif); font-weight: 700; font-size: 1.2em; margin-left: 4px;
  background: linear-gradient(180deg, #ffe08a, #e8b830 50%, #9a7414); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 5px rgba(232,184,48,.6)); }
.t2 .plus { filter: drop-shadow(0 0 7px rgba(255,200,80,.9)) drop-shadow(0 0 14px rgba(255,160,40,.5)); }
.t3 .plus { background: linear-gradient(180deg, #fff0c0, #ff9a3c 50%, #d2452a); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 7px rgba(255,120,60,.9)) drop-shadow(0 0 16px rgba(255,80,40,.6)); animation: plusPulse 1.8s ease-in-out infinite; }
@keyframes plusPulse { 50% { filter: drop-shadow(0 0 10px rgba(255,140,60,1)) drop-shadow(0 0 22px rgba(255,80,40,.75)); } }
.ringfx { display: none; position: absolute; border-radius: 50%; pointer-events: none; }
.t2 .ringfx, .t3 .ringfx { display: block; }
.cell .ringfx { top: 6px; left: 50%; width: 84%; aspect-ratio: 1; transform: translateX(-50%); }
.eslot .ringfx { top: 4px; left: 50%; width: 80px; height: 80px; margin-left: -40px; }
.t2 .ringfx { box-shadow: 0 0 0 1px rgba(232,199,90,.5), 0 0 16px rgba(232,199,90,.35); }
.t3 .ringfx { box-shadow: 0 0 0 2px rgba(255,120,60,.6), 0 0 24px rgba(255,90,50,.5);
  background: repeating-conic-gradient(rgba(255,170,80,.3) 0 6deg, transparent 6deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 47%, #000 50%, #000 60%, transparent 63%);
  mask: radial-gradient(circle, transparent 47%, #000 50%, #000 60%, transparent 63%); animation: ringSpin 7s linear infinite; }
.cell.t3 .ringfx { animation-name: ringSpinX; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes ringSpinX { from { transform: translateX(-50%) rotate(0); } to { transform: translateX(-50%) rotate(360deg); } }
.worn .wsp { position: relative; display: block; }
.worn .wsp .ringfx { inset: -2px; }
.worn .wsp .plus { position: absolute; right: -3px; bottom: -4px; font-size: 11px; margin: 0; }
/* 계열 전집 */
.sets { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 6px 0 4px; }
.setl { font-size: 10px; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--line2); color: var(--dim); }
.setl.on { border-color: var(--gold-dk); color: var(--gold-pale); box-shadow: 0 0 8px rgba(232,199,90,.3); }
.setl b { font-weight: 600; }
/* 칭호 */
.honor { color: #f0a080; font-weight: 600; text-shadow: 0 0 6px rgba(224,80,60,.5); }
.row .pic .item-ico { width: 34px; height: 34px; }
.frame .slot .item-ico { width: 24px; height: 24px; }

/* ───────── 랭킹 ───────── */
.rank-note { padding: 0 18px 8px; font-size: 10.5px; color: var(--dim); line-height: 1.6; }
.rank-list { padding-bottom: 8px; }
.rank-row .rk { width: 34px; flex: none; text-align: center; font-family: Cinzel, serif; font-size: 16px; color: var(--dim); }
.rank-row.top1 .rk { color: #ffd45a; text-shadow: 0 0 10px rgba(255,212,90,.6); font-size: 20px; }
.rank-row.top2 .rk { color: #d8dde6; text-shadow: 0 0 8px rgba(216,221,230,.5); font-size: 18px; }
.rank-row.top3 .rk { color: #d9905a; text-shadow: 0 0 8px rgba(217,144,90,.5); font-size: 18px; }
.rank-row.me { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 12px rgba(232,199,90,.3); }
.amount.minus { color: #d2695a; }
.honor-chip { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid rgba(224,80,60,.5); border-radius: 8px;
  font-size: 10px; line-height: 16px; color: #f0a080; text-shadow: 0 0 6px rgba(224,80,60,.5); vertical-align: 2px; }

/* ───────── 프로필 ───────── */
.sec-title { margin: 14px 2px 6px; font-size: 12px; color: var(--gold); letter-spacing: 1px; }
.sec-title small { margin-left: 6px; font-size: 10px; color: var(--dim); letter-spacing: 0; }
.titles { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.honor-pick { padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: none; font-size: 11px; }
.honor-pick .tchip { margin: 0; }
.honor-pick.on { border-color: var(--gold-hi); box-shadow: 0 0 10px rgba(232,199,90,.35); background: rgba(232,199,90,.06); }
.honor-pick.off { color: var(--dim); }
.acct { padding: 12px 14px; font-size: 11px; color: var(--dim); line-height: 1.7; }
.acct b { color: var(--text); font-weight: 600; }
.row.danger .n { color: #d2695a; }
.big.danger { border-color: #d2452a; background: linear-gradient(180deg, #8a2a1c, #4a120a); }
.note.warn { border-left-color: #d2452a; color: #e8b0a0; }
.nick-in { text-align: center; letter-spacing: 1px; }

/* ───────── 보관함 정렬·일괄 판매 ───────── */
.bag-tools { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 18px 8px; }
.bag-tools[hidden] { display: none; }
.seg.small { padding: 0; gap: 4px; }
.seg.small button { padding: 3px 7px; font-size: 10px; }
.seg.multi { padding: 0; flex-wrap: wrap; gap: 4px; }
.seg.multi button { opacity: .5; }
.seg.multi button.on { opacity: 1; }

/* ───────── 도움말 ───────── */
.help-q { width: 16px; height: 16px; margin-left: 6px; padding: 0; border: 1px solid var(--gold-dk); border-radius: 50%; background: transparent;
  color: var(--gold); font-size: 10px; line-height: 14px; vertical-align: 1px; }
details.help { margin-bottom: 6px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg2); }
details.help summary { padding: 10px 12px; font-size: 13px; color: var(--gold-pale); cursor: pointer; list-style: none; }
details.help summary::after { content: '+'; float: right; color: var(--dim); }
details.help[open] summary::after { content: '−'; }
details.help > div { padding: 0 12px 12px; font-size: 11.5px; color: var(--dim); line-height: 1.8; }
details.help b { color: var(--text); font-weight: 600; }
.guide { padding: 18px 8px 8px; text-align: center; }
.guide .gstep { font-size: 10px; color: var(--dim); letter-spacing: 2px; }
.guide .gtitle { margin: 10px 0; font-size: 20px; color: var(--gold-hi); text-shadow: 0 0 12px rgba(232,199,90,.35); }
.guide .gtext { min-height: 66px; font-size: 13px; color: var(--text); line-height: 1.8; }
.guide .gdots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.guide .gdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line2); }
.guide .gdots i.on { background: var(--gold-hi); box-shadow: 0 0 6px var(--gold-hi); }
.guide-btns { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.guide-btns .mini { flex: none; }
.full-tap { border-bottom: 1px dotted rgba(246,224,154,.35); cursor: pointer; }
.titles .none { color: var(--dim); font-size: 11px; line-height: 1.6; }
.trade-lock { margin-top: 8px; padding: 8px 10px; border: 1px solid rgba(210,69,42,.45); border-radius: 4px; background: rgba(90,20,10,.25);
  color: #f0b8a8; font-size: 11px; line-height: 1.6; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trade-lock .mini { flex: none; }
/* 원석 개봉: 등급 5줄을 좁게 (작은 화면에서 넘치지 않게) */
#probRows.five .prow + .prow { margin-top: 3px; }
#probRows.five .prow .track { height: 7px; }
#probRows.five .prow .lbl, #probRows.five .prow .new { font-size: 12px; }
.view[data-view="forge"] #probRows.five .prow { line-height: 1.05; }
.view[data-view="forge"] #probRows.five .prow .lbl, .view[data-view="forge"] #probRows.five .prow .new { font-size: 12px; }
/* 아주 낮은 화면 (아이폰 SE 1세대 등, 높이 600 이하) */
@media (max-height: 600px) {
  .view[data-view="forge"] .gem-head { padding-top: 2px; }
  .view[data-view="forge"] .gem-name { font-size: 15px; margin-top: 0; }
  .view[data-view="forge"] .gem-lv { font-size: 28px; min-height: 30px; }
  .view[data-view="forge"] > .frame { min-height: 84px; }
  .view[data-view="forge"] .sale-row { margin-top: 3px; }
  .view[data-view="forge"] #probRows { height: 80px; }
  .view[data-view="forge"] .probs { padding: 5px 12px; margin-top: 4px; }
  .view[data-view="forge"] .auto-row { margin-bottom: 2px; }
  .view[data-view="forge"] .big { padding: 9px 0; font-size: 15px; }
}
/* 체크 줄 (자동 판매) */
.check-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line2); border-radius: 4px; background: var(--bg2); color: var(--text); font-size: 13px; }
.check-row .box { flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid var(--gold-dk); border-radius: 3px; position: relative; }
.check-row.on { border-color: var(--gold-dk); box-shadow: 0 0 10px rgba(232,199,90,.2); }
.check-row.on .box { background: var(--gold); border-color: var(--gold-hi); }
.check-row.on .box::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #1a1309; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check-row small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--dim); line-height: 1.5; }
.check-row:disabled { opacity: .5; }

/* ───────── 상단 바: 버튼 5개 (작은 화면에서도 한 줄) ───────── */
.top-btns { gap: 2px; }
.icon-btn { width: 36px; }
@media (max-width: 370px) { .icon-btn { width: 32px; } .top { padding-left: 12px; padding-right: 10px; } .gold { margin-left: 8px; } }
@media (max-width: 340px) { .icon-btn { width: 27px; } .icon-btn small { font-size: 8.5px; } .top { padding-left: 8px; padding-right: 6px; } .gold { margin-left: 6px; gap: 4px; } .gold b { font-size: 13px; white-space: nowrap; } .avatar { width: 30px; height: 30px; } }

/* ───────── 상단 실시간 안내 (누르면 닫힘, 플레이를 막지 않음) ───────── */
.ticker { position: absolute; left: 50%; top: calc(var(--sat) + 64px); z-index: 30; max-width: calc(100% - 24px);
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s;
  padding: 7px 14px; border-radius: 16px; font-size: 12px; line-height: 1.5; text-align: center; color: var(--text);
  background: linear-gradient(180deg, rgba(42,33,23,.96), rgba(24,19,13,.96)); border: 1px solid var(--gold-dk);
  box-shadow: 0 6px 20px rgba(0,0,0,.55), 0 0 14px rgba(232,199,90,.25); }
.ticker.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ticker.admin { border-color: #d2452a; box-shadow: 0 6px 20px rgba(0,0,0,.55), 0 0 16px rgba(224,80,60,.45); font-size: 13px; }
.ticker .tk-badge { font-style: normal; margin-right: 6px; padding: 0 6px; border-radius: 8px; background: #b0281c; color: #fff; font-size: 10px; vertical-align: 1px; }
.ticker .plus { font-size: 1em; }

/* ───────── 직접 수량 ───────── */
.qty-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.qty-head .pic .item-ico, .qty-head .pic svg { width: 40px; height: 40px; }
.qty-head .n { font-size: 15px; } .qty-head .sub { font-size: 11px; color: var(--dim); margin-top: 2px; }
.qty-row { display: flex; gap: 6px; align-items: center; }
.qty-row .qty-in { flex: 1; text-align: center; margin: 0; }
.qty-range { width: 100%; margin: 14px 0 6px; accent-color: var(--gold); }

/* ───────── 글쓰기 입력 ───────── */
.text-in { text-align: left; font-size: 14px; }
.text-area { display: block; width: 100%; min-height: 160px; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 4px;
  background: var(--bg2); color: var(--text); font: inherit; font-size: 13px; line-height: 1.7; resize: vertical; box-sizing: border-box; }
.text-area.short { min-height: 80px; }
.sel { flex: 1; min-width: 0; padding: 9px 8px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg2); color: var(--text); font: inherit; font-size: 13px; }

/* ───────── 공지·우편 ───────── */
.notice-row.pinned { border-color: var(--gold-dk); }
.pin { font-style: normal; margin-right: 6px; padding: 0 6px; border-radius: 8px; background: var(--gold-dk); color: #1a1309; font-size: 10px; vertical-align: 1px; }
.notice-read { margin: 10px 0; }
.notice-read .nt { font-size: 16px; color: var(--gold-pale); line-height: 1.5; }
.notice-read .sub { font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.notice-read .nb { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.admin-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.admin-act { margin-bottom: 10px; }
.mini.danger { border-color: #8a2a1c; color: #f0a090; }
.mail-row.unread .n { color: var(--gold-hi); }
.mail-row.unread .pic::after { content: ''; position: absolute; width: 7px; height: 7px; margin: -18px 0 0 18px; border-radius: 50%; background: var(--x); }
.mail-row .pic { position: relative; }
.mini-tag { display: inline-block; padding: 1px 7px; border: 1px solid var(--line2); border-radius: 8px; font-size: 10px; color: var(--dim); }
.mini-tag.gold { border-color: var(--gold-dk); color: var(--gold-pale); }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.att { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg2);
  font-size: 11px; color: var(--text); }
.att svg, .att .sp svg { width: 22px; height: 22px; flex: none; }
.att .sp { display: inline-flex; width: 22px; height: 22px; }
.att.rm { cursor: pointer; }
.dim-note { font-size: 11px; color: var(--dim); }

/* ───────── 관리자 ───────── */
.admin-entry { border-color: rgba(224,80,60,.5); }
.pick-row { display: flex; gap: 6px; align-items: center; margin: 8px 0; }
.pick-row .price-in { flex: 1; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; border: 1px solid var(--gold-dk); border-radius: 12px; background: var(--bg2); color: var(--gold-pale); font-size: 11px; }
.att-form { margin-top: 8px; padding: 10px; border: 1px dashed var(--line2); border-radius: 4px; }
.att-fields { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.att-fields .price-in { flex: 1; min-width: 70px; margin: 0; }
.row.faded { opacity: .5; }
.log-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; padding: 2px 0; border-bottom: 1px dotted var(--line); }
.log-row b.minus { color: #d2695a; }

/* ───────── 전체 채팅 (시안 그대로) ───────── */
.chat-strip { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 6px; padding: 6px 10px; text-align: left;
  border: 1px solid var(--line2); border-radius: 6px; background: linear-gradient(180deg, rgba(36,29,21,.92), rgba(22,18,13,.92));
  font-size: 11.5px; line-height: 1.45; color: var(--text); }
.chat-strip .lines { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-strip .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-strip .ln + .ln { margin-top: 1px; }
.chat-strip .ln.dim { color: var(--dim); }
.chat-strip .nk { color: var(--gold-pale); font-weight: 600; margin-right: 5px; }
.chat-strip .sys.legend { color: #f2a090; } .chat-strip .sys.success { color: #e8c75a; }
.chat-strip .sys.destroy { color: #b8ad9e; } .chat-strip .sys.awaken { color: #cdb6ff; }
.chat-strip .badge, .chat-pill i { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #b0281c; color: #fff;
  font-size: 10px; line-height: 18px; text-align: center; font-style: normal; }
.chat-strip .open { flex: none; color: var(--dim); font-size: 10px; }
.chat-pill { display: none; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--line2); border-radius: 14px; font-size: 11px;
  color: var(--text); background: rgba(36,29,21,.9); margin-right: 6px; }
.chat-pill i[hidden], .chat-strip .badge[hidden] { display: none; }


.chat-dim { position: absolute; inset: 0; z-index: 39; background: rgba(0,0,0,.55); }
.chat-panel { position: absolute; left: 0; right: 0; bottom: var(--kb, 0px); height: min(74%, calc(100% - var(--kb, 0px) - 8px)); max-height: calc(100% - var(--kb, 0px) - 4px); z-index: 40; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #221b14, #141009); border-top: 1px solid var(--gold-dk); border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 30px rgba(0,0,0,.6); animation: chatUp .22s ease-out; }
.chat-panel[hidden], .chat-dim[hidden] { display: none; }
@keyframes chatUp { from { transform: translateY(30px); opacity: .4; } }
.cp-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.cp-head b { font-size: 15px; letter-spacing: 1px; } .cp-head small { color: var(--dim); font-size: 10.5px; margin-left: 6px; }
.cp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; overscroll-behavior: contain; }
.msg-sys { align-self: center; max-width: 94%; padding: 4px 10px; border-radius: 10px; font-size: 11px; text-align: center; line-height: 1.5; }
.msg-sys b { font-weight: 600; }
.msg-sys .honor-chip { font-size: 9px; line-height: 14px; }
.msg-sys.legend { background: rgba(224,80,60,.14); border: 1px solid rgba(224,80,60,.45); color: #f2b0a0; }
.msg-sys.success { background: rgba(232,199,90,.10); border: 1px solid rgba(232,199,90,.4); color: #f0d890; }
.msg-sys.destroy { background: rgba(120,120,120,.10); border: 1px solid rgba(160,150,140,.35); color: #c8beb0; }
.msg-sys.awaken { background: rgba(150,110,230,.14); border: 1px solid rgba(170,130,240,.45); color: #d8c4ff; }
.cm { display: flex; flex-direction: column; align-self: flex-start; align-items: flex-start; max-width: 78%; text-align: left; }
.cm .who { font-size: 10.5px; color: var(--gold-pale); margin: 0 0 2px 4px; }
.cm .who .honor-chip { margin: 0 4px 0 0; font-size: 9px; line-height: 14px; }
.cm .bub { padding: 6px 10px; border-radius: 12px 12px 12px 3px; background: #2c241a; border: 1px solid var(--line2); font-size: 12.5px; line-height: 1.5;
  color: var(--text); word-break: break-word; white-space: pre-wrap; }
.cm .t { font-size: 9px; color: var(--dim); margin: 2px 0 0 6px; }
.cm.me { align-self: flex-end; align-items: flex-end; }
.cm.me .bub { border-radius: 12px 12px 3px 12px; background: #4a3a1a; border-color: var(--gold-dk); }
.cm.me .t { margin: 2px 6px 0 0; }
.cm .brag { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--gold-dk);
  background: radial-gradient(circle at 20% 50%, rgba(70,120,220,.25), #221b14 70%); white-space: normal; }
.cm .brag svg { width: 44px; height: 44px; flex: none; } .cm .brag .bn { font-size: 13px; }
.cm .brag .bn b { color: var(--gold-hi); font-family: Cinzel, serif; margin-left: 4px; } .cm .brag .bs { font-size: 10px; color: var(--dim); margin-top: 2px; }
.cp-foot { flex: none; border-top: 1px solid var(--line); }
.cp-input { display: flex; gap: 6px; align-items: center; max-width: 100%; overflow: hidden; padding: 8px 10px calc(var(--sab) + 10px); }
html.kb .cp-input { padding-bottom: 8px; }
.cp-input .brag-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold-dk); color: var(--gold); background: transparent; font-size: 15px; }
.cp-input .cin { flex: 1 1 0; width: 0; min-width: 0; height: 36px; border-radius: 18px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text);
  font: inherit; font-size: 13px; padding: 0 14px; line-height: 34px; resize: none; overflow: hidden; white-space: nowrap; display: block; }
.cp-input .send { flex: 0 0 auto; white-space: nowrap; height: 36px; padding: 0 14px; border-radius: 18px; border: 0; background: linear-gradient(180deg, #d8b34a, #8a6c22);
  color: #1a1309; font-size: 12.5px; font-weight: 600; }
@media (max-width: 370px) {
  .cp-input { gap: 4px; padding: 7px 6px calc(var(--sab) + 8px); }
  .cp-input .brag-btn { width: 31px; height: 31px; font-size: 13px; }
  .cp-input #chatHonorPriv { padding: 4px 6px; font-size: 10.5px; }
  .cp-input .cin { height: 32px; line-height: 30px; padding: 0 10px; font-size: 12px; }
  .cp-input .send { height: 32px; padding: 0 10px; font-size: 11.5px; }
}
.cp-lock { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px calc(var(--sab) + 12px);
  font-size: 11.5px; color: var(--dim); line-height: 1.5; }
.cp-lock .mini { flex: none; }
.chat-menu { position: absolute; z-index: 3; min-width: 140px; background: #2a2219; border: 1px solid var(--line2); border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.6); overflow: hidden; display: flex; flex-direction: column; }
.chat-menu button { padding: 9px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font-size: 12px; text-align: left; }
.chat-menu button:last-child { border-bottom: 0; }
.chat-menu .danger { color: #f0a090; }
.chat-menu .cm-title { padding: 7px 16px; font-size: 10.5px; color: var(--dim); border-bottom: 1px solid var(--line); }

/* 관리자 채팅 관리 */
.mod-row .mod-text { margin: 4px 0; padding: 6px 8px; border-radius: 4px; background: var(--bg2); font-size: 12px; line-height: 1.5; word-break: break-word; }
.seg.wrap { flex-wrap: wrap; }

/* 계정 정지 화면 */
.ban-screen { position: absolute; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(8,6,4,.96); }
.ban-screen[hidden] { display: none; }
.ban-box { max-width: 320px; text-align: center; }
.ban-box .bt { font-size: 20px; color: #f0a090; margin-bottom: 10px; }
.ban-box .bs { font-size: 13px; color: var(--text); } .ban-box .br { margin-top: 6px; font-size: 12px; color: var(--dim); }

/* 도감: 다음 공개 · 미공개 */
.codex .soon-head { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 12px; color: var(--gold-pale); letter-spacing: 1px; margin-top: 10px; }
.codex .cell.soon .gem-svg { filter: brightness(0) opacity(.5); }
.codex .cell.soon .cn { color: var(--faint); }
.codex .timer { font-family: var(--num); color: var(--gold-hi); font-size: 12px; letter-spacing: .5px; }
.codex .cell.locked { opacity: .6; color: var(--faint); }
.codex .cell.locked.wide { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 10px; padding: 14px 8px; }
/* 4단계: 아주 낮은 화면 — 확률을 막대 없이 두 줄로 */
#app.fit4 .view[data-view="forge"] #probRows { height: 44px; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 12px; align-content: space-around; }
#app.fit4 .view[data-view="forge"] .prow .track { display: none; }
#app.fit4 .view[data-view="forge"] .prow .val { width: auto; margin-left: auto; }
#app.fit4 .view[data-view="forge"] .prow .old { display: none; }
#app.fit4 .view[data-view="forge"] .panel-head { display: none; }
#app.fit4 .view[data-view="forge"] .gem-head { height: 52px; }
#app.fit4 .view[data-view="forge"] .gem-lv { font-size: 26px; min-height: 28px; }
#app.fit4 .view[data-view="forge"] .cost-row { height: 22px; }

/* 플레이타임 보상 */
.sec-h { margin: 18px 0 8px; display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 2px; color: var(--gold-pale); }
.sec-h::before, .sec-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.play-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--dim); }
.play-head b { font-family: var(--num); font-size: 18px; color: var(--gold-hi); }
.play-head small { margin-left: auto; font-size: 10.5px; }
.play-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pstep { position: relative; padding: 9px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-height: 112px; }
.pstep .pt { font-size: 11px; color: var(--gold-pale); letter-spacing: .5px; }
.pstep .item-ico { width: 26px; height: 26px; }
.pstep .rw { font-size: 9.5px; color: var(--dim); line-height: 1.45; flex: 1; }
.pstep .pbar { width: 80%; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.pstep .pbar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a2a, var(--gold-hi)); }
.pstep .pdone { font-size: 10px; color: var(--faint); }
.pstep.done { opacity: .5; }
.pstep.ready { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 14px rgba(232,199,90,.35); }
.pstep .mini { padding: 3px 12px; }

/* 칭호 칩: 바깥(테두리 색) 안에 안쪽(배경)을 겹친다. 모양: 둥근·각진·깎은 모서리·화살촉·이중 테 */
.tchip { --cut: 5px; display: inline-flex; flex: none; margin-left: 6px; padding: 1.2px; background: var(--tb); vertical-align: middle; line-height: 1; font-size: 10px; }
.tchip.lead { margin: 0 4px 0 0; }
.tchip-in { position: relative; display: inline-flex; align-items: center; padding: 3px 8px 2px; background: var(--tbg); }
.tchip-t { font-weight: 600; letter-spacing: .5px; white-space: nowrap; }
.tchip.pill, .tchip.pill .tchip-in { border-radius: 999px; }
.tchip.rect, .tchip.rect .tchip-in { border-radius: 2px; }
.tchip.cut { clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.tchip.cut .tchip-in { clip-path: polygon(calc(var(--cut) - .5px) 0, calc(100% - var(--cut) + .5px) 0, 100% calc(var(--cut) - .5px), 100% calc(100% - var(--cut) + .5px), calc(100% - var(--cut) + .5px) 100%, calc(var(--cut) - .5px) 100%, 0 calc(100% - var(--cut) + .5px), 0 calc(var(--cut) - .5px)); }
.tchip.tag { clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%); padding: 1.2px 1.6px; }
.tchip.tag .tchip-in { padding: 3px 11px 2px; clip-path: polygon(6.4px 0, calc(100% - 6.4px) 0, 100% 50%, calc(100% - 6.4px) 100%, 6.4px 100%, 0 50%); }
.tchip.double, .tchip.double .tchip-in { border-radius: 4px; }
.tchip.double .tchip-in { padding: 4px 9px 3px; }
.tchip.double .tchip-in::before { content: ''; position: absolute; inset: 1.6px; border: 1px solid var(--tbs); border-radius: 2px; opacity: .8; pointer-events: none; }
.msg-sys .tchip, .cm .who .tchip { font-size: 9px; }
.msg-sys .tchip .tchip-in, .cm .who .tchip .tchip-in { padding: 2px 6px 1px; }
.tchip.tbig { font-size: 15px; margin: 0; }
.tchip.tbig .tchip-in { padding: 7px 16px 6px; }
.tchip.tbig.tag .tchip-in { padding: 7px 20px 6px; }
.tchip.tbig.cut { --cut: 8px; }
/* 칭호 관리 */
.title-row .mid { padding: 4px 0; }
.title-row .right { display: flex; align-items: center; gap: 6px; }
.title-pick, .tshapes { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.tprev { display: flex; align-items: center; justify-content: center; min-height: 86px; margin: 10px 0 4px; border: 1px solid var(--line); border-radius: 6px;
  background: radial-gradient(circle at 50% 40%, rgba(232,199,90,.08), transparent 70%), repeating-conic-gradient(rgba(255,255,255,.02) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.tpaint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tsw { display: inline-flex; align-items: flex-end; justify-content: center; width: 64px; height: 34px; padding: 0 0 2px; border: 1px solid var(--line2); border-radius: 6px; }
.tsw span { font-size: 8.5px; font-family: var(--num); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.tsw.on { box-shadow: 0 0 0 2px var(--gold-hi); }
.tangle { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); flex: 1 1 160px; }
.tangle input { flex: 1; accent-color: var(--gold-hi); }
.tangle b { width: 34px; font-family: var(--num); font-weight: 400; color: var(--gold-pale); }
.cpick { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.25); }
.cpick canvas { width: 150px; height: 150px; border-radius: 50%; touch-action: none; flex: none; box-shadow: 0 0 0 1px var(--line2); }
.cpick-side { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 11px; color: var(--dim); }
.cpick-side label { display: flex; flex-direction: column; gap: 4px; }
.cpick-side input[type="range"] { accent-color: var(--gold-hi); }
.cpick-side .text-in { font-family: var(--num); }
.cdots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cdots button { aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }
/* 상점: 일반·고급 제련 아이템 구분 */
.shop-group { display: flex; flex-direction: column; gap: 9px; }
.shop-group + .shop-group { margin-top: 8px; }
.shop-gh { display: flex; align-items: center; gap: 10px; margin: 6px 2px 0; font-size: 11.5px; letter-spacing: 2px; color: var(--dim); }
.shop-gh::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.shop-group.normal .shop-gh { color: #b9b9ad; }
.shop-group.high .shop-gh { color: #8fd3cc; }
.shop-group.high .shop-gh::after { background: linear-gradient(90deg, rgba(111,163,160,.6), transparent); }
.shop-row .pic { position: relative; }
.tier-tag { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 0 5px; border-radius: 3px; font-size: 9px; letter-spacing: 1px; line-height: 14px; white-space: nowrap; }
.tier-tag.normal { color: #d6d6cc; background: rgba(154,154,140,.18); border: 1px solid rgba(154,154,140,.55); }
.tier-tag.high { color: #0e1b1a; background: linear-gradient(135deg, #a8e4dc, #5fa8a0); border: 1px solid #b8f0e8; font-weight: 700; }
.shop-row.normal { border-left: 3px solid rgba(154,154,140,.6); }
.shop-row.high { border-color: rgba(111,163,160,.6); border-left: 3px solid #6fa3a0;
  background: linear-gradient(100deg, rgba(111,163,160,.16), rgba(111,163,160,.03) 55%), linear-gradient(180deg, #241e18, #1b1712);
  box-shadow: 0 0 14px rgba(111,163,160,.12), inset 0 1px 0 rgba(184,240,232,.08); }
.shop-row.high .pic { filter: drop-shadow(0 0 6px rgba(111,183,175,.55)); }

/* ───────── 랭킹: 1~3위 단상 ───────── */
.rank-list { padding-bottom: 12px; }
.podium { display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: end; gap: 6px; margin: 4px 14px 14px; }
.pod { display: flex; flex-direction: column; align-items: stretch; min-width: 0; --metal: #c9a227; --metal2: #6b4e12; --glow: rgba(255,212,90,.45); }
.pod.p2 { --metal: #dfe4ec; --metal2: #6c7480; --glow: rgba(216,221,230,.35); }
.pod.p3 { --metal: #e0a070; --metal2: #6b3a1a; --glow: rgba(217,144,90,.35); }
.pod-who { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 2px 8px; text-align: center; min-width: 0; }
.pod-badge { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), linear-gradient(150deg, var(--metal), var(--metal2));
  box-shadow: 0 0 0 2px rgba(0,0,0,.5), 0 0 0 3px var(--metal), 0 0 18px var(--glow); }
.pod-badge span { font-family: Cinzel, serif; font-weight: 700; font-size: 20px; color: #1a120a; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.pod.p1 .pod-badge { width: 54px; height: 54px; margin-top: 12px; }
.pod.p1 .pod-badge span { font-size: 25px; }
.pod-badge .crown { position: absolute; top: -17px; width: 30px; height: 20px; color: #ffd45a; filter: drop-shadow(0 0 6px rgba(255,212,90,.8)); }
.pod-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); }
.pod.p1 .pod-name { font-size: 14.5px; color: #ffe9a8; }
.pod-title .tchip { margin: 0; }
.pod-val { font-size: 11px; color: var(--gold-pale); }
.pod-val .amount { justify-content: center; }
.pod-base { position: relative; height: 46px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--metal) 0, var(--metal2) 6px, #2a2016 7px, #17120d 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 -4px 18px -6px var(--glow); }
.pod-base::after { content: ''; position: absolute; inset: 7px 0 0; background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.025) 14px 15px); }
.pod.p1 .pod-base { height: 70px; }
.pod.p3 .pod-base { height: 34px; }
.pod.empty .pod-base { opacity: .35; }
.pod.me .pod-name { color: var(--gold-hi); }
.pod.me .pod-base { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 0 1px var(--gold-hi), 0 -4px 18px -6px var(--glow); }
.rank-row .rk { width: 34px; flex: none; text-align: center; font-family: Cinzel, serif; font-size: 15px; color: var(--dim); }
.rank-row .n .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rank-row .right b, .pod-val b { font-family: var(--num); color: var(--gold-hi); font-weight: 700; }
.rank-row.me { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 12px rgba(232,199,90,.3); }
.rank-row.rk-flash, .pod.rk-flash .pod-who { animation: rkflash 1.2s ease; }
@keyframes rkflash { 0%, 100% { background-color: transparent; } 30% { background-color: rgba(232,199,90,.22); } }
.rank-me { position: sticky; bottom: 34px; z-index: 3; display: flex; align-items: center; gap: 10px; margin: 0 14px 10px; padding: 10px 14px;
  border: 1px solid var(--gold); border-radius: 8px; background: linear-gradient(180deg, #2e2418, #1a140e); box-shadow: 0 6px 20px rgba(0,0,0,.6), 0 0 14px rgba(232,199,90,.18);
  font-size: 12px; cursor: pointer; }
.rank-me[hidden] { display: none; }
.rank-me .mr-rk { font-family: Cinzel, serif; font-size: 20px; color: var(--gold-hi); }
.rank-me .mr-rk small { margin-left: 1px; font-family: inherit; font-size: 11px; color: var(--gold-pale); }
.rank-me .mr-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.rank-me .mr-v { color: var(--gold-pale); }
.rank-me .mr-go { font-size: 10.5px; color: var(--gold-hi); }
.rank-me .mr-go.dim { color: var(--dim); }
.rank-me .mini { margin-left: auto; }

/* ───────── 관리자 도구 (묶음 타일·유저 고르기·처벌 내역) ───────── */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 64px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line2); border-radius: 8px; background: linear-gradient(180deg, #241d15, #18130e); color: var(--text); }
.admin-tile b { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.admin-tile small { font-size: 10.5px; color: var(--dim); line-height: 1.4; }
.admin-tile:active { transform: translateY(1px); }
.tbadge { font-style: normal; min-width: 16px; padding: 0 5px; border-radius: 8px; background: #c0392b; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.tbadge:empty, .tbadge[data-z] { display: none; }
.upick { margin: 8px 0; }
.upick .price-in { width: 100%; margin: 0; box-sizing: border-box; }
.upick-list { display: flex; flex-direction: column; margin-top: 4px; border-radius: 6px; overflow: hidden; }
.upick-list:empty { display: none; }
.upick-row { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg2); color: var(--text); text-align: left; font-size: 13px; }
.upick-row .s { margin-left: auto; font-size: 10.5px; color: var(--dim); }
.pz-target { margin: 6px 0; }
.pz-target .right { display: flex; gap: 6px; }
.pz-custom .price-in { max-width: 110px; }
.pz-reasons { margin: 4px 0 6px; }
.pz-reasons .chip { cursor: pointer; }
.warn-text { color: #f0a090; }
.linkish { padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.sanctions { display: flex; flex-direction: column; gap: 6px; }
.sanction { padding: 7px 10px; border-left: 3px solid var(--line2); background: var(--bg2); border-radius: 0 4px 4px 0; font-size: 12px; }
.sanction.chat, .sanction.account, .sanction.nickname { border-left-color: #c0392b; }
.sanction.lift_chat, .sanction.lift_account { border-left-color: #4f8a5a; }
.sanction.chat_delete, .sanction.chat_hide { border-left-color: var(--gold-dk); }
.sanction .sh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sanction .sh span { color: var(--gold-pale); }
.sanction .sh small { margin-left: auto; color: var(--dim); font-size: 10.5px; }
.sanction .sr { margin-top: 3px; color: var(--dim); }
.sanction .sq { margin-top: 3px; color: var(--text); opacity: .8; word-break: break-word; }
.pw-card { margin-bottom: 10px; padding: 10px 12px; }
.pw-card .n { font-size: 12px; color: var(--dim); }
.chat-menu.admin { border-color: var(--gold-dk); }
#sheet .sheet-head { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* ───────── 보석 잠금 ───────── */
.lock-btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 11px; border-radius: 16px; border: 1px solid var(--line2);
  background: transparent; color: var(--dim); font-size: 12px; }
.lock-btn.on { border-color: #5a7fb0; color: #a9c8f0; background: rgba(90,127,176,.14); }
.lock-btn:disabled { opacity: .45; }
.lock-toggle { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: -6px -4px -6px 0;
  border-radius: 50%; color: #6a5d48; }
.lock-toggle.on { color: #a9c8f0; background: rgba(90,127,176,.16); }
.lock-mark { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: #a9c8f0; }

/* 유저 상점 새로고침 */
.mkt-head { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 6px 0 2px; }
.mkt-time { font-size: 10.5px; color: var(--dim); }
.mkt-refresh i { display: inline-block; font-style: normal; }
.mkt-refresh.spin i { animation: mktSpin .8s linear infinite; }
@keyframes mktSpin { to { transform: rotate(360deg); } }
.claiming { opacity: .6; }

/* 보관함 계열순 묶음 머리 */
.bag-group { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 4px 2px; font-size: 13px; font-weight: 700; color: var(--gold-hi); letter-spacing: .5px; font-family: var(--serif); }
.bag-group span { font-size: 11px; font-weight: 500; color: var(--dimmer); }

/* 유저 상점 판매자 표시 */
.row .sub .seller { color: var(--gold-pale); }
.row .sub .seller.anon { color: var(--dimmer); }
.kv b.anon { color: var(--dimmer); font-family: var(--serif); }
.anon-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 2px 2px; font-size: 12px; color: var(--dim); }
.anon-pick .seg { flex: 0 0 auto; }
.anon-pick .seg button:disabled { opacity: .45; }

/* 자동 강화 진행 표시: 다른 메뉴에 있어도 아래쪽 제련 버튼에 회전 아이콘 */
.tabs button.center .orb { position: relative; }
.tabs button.center .orb .auto-badge { position: absolute; top: 2px; right: 2px; width: 19px; height: 19px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; background: #1d160c; color: var(--gold-hi);
  border: 1px solid var(--gold); box-shadow: 0 0 8px rgba(232,199,90,.6); }
.tabs button.center .orb .auto-badge svg { width: 11px; height: 11px; animation: autoSpin 1.1s linear infinite; }
.tabs button.center.auto-run .orb .auto-badge { display: flex; }
.tabs button.center.auto-run:not(.on) .orb { filter: none; }
@keyframes autoSpin { to { transform: rotate(360deg); } }

/* ───────── AFK 모드: 잠금 화면 ─────────
   전력 절약: 뒤 화면은 그리지 않고(display:none), 배경은 거의 검정에 정적인 장식만. 움직임은 밀어서 해제가 보일 때만 */
html.afk-on #app, html.afk-on #sheet { display: none !important; }
.afk { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--sat) + 9vh) 24px calc(var(--sab) + 40px); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  color: var(--text); background:
    radial-gradient(120% 70% at 50% 18%, rgba(201,162,39,.10), transparent 60%),
    radial-gradient(90% 60% at 50% 100%, rgba(107,83,24,.16), transparent 70%),
    repeating-linear-gradient(45deg, rgba(232,199,90,.018) 0 2px, transparent 2px 14px),
    #070605; }
.afk[hidden] { display: none; }
.afk-frame { position: absolute; inset: calc(var(--sat) + 14px) 14px calc(var(--sab) + 14px); border: 1px solid rgba(201,162,39,.22);
  box-shadow: inset 0 0 0 4px rgba(7,6,5,1), inset 0 0 0 5px rgba(201,162,39,.12); pointer-events: none; }
.afk-frame .c { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(232,199,90,.55); }
.afk-frame .tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.afk-frame .tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.afk-frame .bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.afk-frame .br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.afk-clock { text-align: center; line-height: 1; }
.afk-clock small { display: block; font-size: 14px; letter-spacing: 4px; color: var(--dim); margin-bottom: 6px; }
#afkTime { font-family: var(--num); font-size: clamp(64px, 22vw, 104px); font-weight: 600; letter-spacing: 2px;
  background: linear-gradient(180deg, #f6e09a 0%, #e8c75a 45%, #a8841f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(232,199,90,.12); }
.afk-date { margin-top: 12px; font-size: 16px; letter-spacing: 3px; color: var(--dim); }
.afk-emblem { margin-top: auto; opacity: .22; filter: grayscale(.4) brightness(.8); }
.afk-emblem svg { display: block; }
.afk-auto { min-height: 16px; margin-top: 14px; font-size: 11px; letter-spacing: 1px; color: var(--gold); opacity: .7; }
.afk-hint { margin-top: 18px; font-size: 12px; letter-spacing: 2px; color: var(--faint); transition: opacity .3s; }
.afk-slide { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 54px); display: flex; justify-content: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s; }
.afk.wake .afk-slide { opacity: 1; transform: none; pointer-events: auto; }
.afk.wake .afk-hint { opacity: 0; }
.afk-track { position: relative; width: min(300px, 78vw); height: 60px; border-radius: 30px; border: 1px solid rgba(201,162,39,.45);
  background: rgba(21,18,15,.85); box-shadow: inset 0 0 14px rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; }
.afk-track span { font-size: 14px; letter-spacing: 3px; padding-left: 40px; opacity: calc(1 - var(--p, 0) * 1.6);
  background: linear-gradient(90deg, var(--dimmer) 0%, var(--gold-pale) 50%, var(--dimmer) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.afk.wake .afk-track span { animation: afkShine 2.2s linear infinite; }
@keyframes afkShine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.afk-knob { position: absolute; left: 4px; top: 4px; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #1b1408; background: radial-gradient(circle at 40% 35%, #f6e09a, #c9a227 70%, #6b5318); box-shadow: 0 0 14px rgba(232,199,90,.45);
  transition: transform .25s cubic-bezier(.3,1.4,.5,1); touch-action: none; }
.afk-knob.drag { transition: none; }
.afk-entry .pic { color: var(--gold-hi); display: flex; align-items: center; justify-content: center; }

/* ───────── 인챈트 (21~30강): 같은 배치, 검붉은 흑마법 테마 ───────── */
.ench-flow-a { animation: enchFlowA 16s linear infinite; }
.ench-flow-b { animation: enchFlowB 17s ease-in-out infinite alternate; }
@keyframes enchFlowA { from { transform: translateX(0); } to { transform: translateX(360px); } }
@keyframes enchFlowB { from { transform: translate(360px, 0); } to { transform: translate(0, 40px); } }
@keyframes enchSheen { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
@keyframes enchPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.ebadge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--num); font-weight: 700; line-height: 1; vertical-align: middle; }
.ebadge .lvtxt { background: linear-gradient(90deg, #ff4a5e, #b44dff, #2a0f3a, #ff4a5e); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: enchSheen 6s linear infinite; }
.ebadge .spark { fill: #c86bff; animation: enchPulse 2.6s ease-in-out infinite; }
.ebadge.b2 .lvtxt, .ebadge.b3 .lvtxt, .ebadge.b4 .lvtxt { filter: drop-shadow(0 0 6px rgba(180,60,255,.55)); }
.ebadge.b3, .ebadge.b4 { padding: .18em .4em; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(#120a16, #120a16) padding-box, linear-gradient(90deg, #e0243a, #8e2bd0, #120818, #e0243a) border-box; }
.ebadge.b4 { box-shadow: 0 0 18px rgba(224,36,58,.45), 0 0 32px rgba(142,43,208,.35); }

/* 마법진: 제련칸 가운데에 깔리고 단계가 오를수록 화면 밖까지 */
.sigil { position: absolute; inset: 0; pointer-events: none; z-index: 0; display: none; overflow: hidden; }
#app.ench .sigil { display: block; }
.sigil > * { position: absolute; left: var(--sx, 50%); top: var(--sy, 33%); }
.sigil .sg-glow { border-radius: 50%; }
.sigil .sg { transform-origin: 50% 50%; overflow: visible; }
.sigil .sg.r1 { animation: spin 60s linear infinite; }
.sigil .sg.r2 { animation: spin 42s linear infinite reverse; }
.sigil .sg.r3 { animation: spin 90s linear infinite; }
.sigil.boost { animation: sigBoost 1.4s ease-out; }
.sigil.dim { animation: sigDim 1.1s ease-out; }
.sigil.jolt { animation: sigJolt 1.4s ease-out; }
.sigil.shrink > * { transition: transform .38s ease-in, opacity .38s ease-in; transform: scale(.55); opacity: 0; }
@keyframes sigBoost { 0% { filter: brightness(1); } 18% { filter: brightness(2.4); } 100% { filter: brightness(1); } }
@keyframes sigDim { 0% { opacity: 1; } 25% { opacity: .45; } 100% { opacity: 1; } }
@keyframes sigJolt { 0% { filter: brightness(1); } 10% { filter: brightness(2) hue-rotate(-20deg); } 30% { filter: brightness(.6); } 100% { filter: brightness(1); } }

#app.ench { background: radial-gradient(ellipse at 50% 31%, #2e080e 0%, #170508 45%, #0a0406 80%, #060304 100%); }
#app.ench .aura { opacity: 0 !important; }
#app.ench .top { background: linear-gradient(180deg, rgba(20,6,8,.96), rgba(12,4,5,.92)); border-bottom-color: #3e1018; }
#app.ench .tabs { border-top-color: #3e1018; background: rgba(10,4,5,.96); }
#app.ench .tabs button.center .orb { border-color: #c0283c; background: radial-gradient(circle, #5a0c1a, #1a0408); box-shadow: 0 0 0 4px #0a0406, 0 0 16px rgba(200,30,50,.5); color: #ffb0bc; }
#app.ench .tabs button.center.on { color: #ff9aaa; }
#app.ench .tag { color: #ff8a9a; border-color: #b0283c; background: rgba(30,6,10,.6); }
#app.ench .tag .bound { color: #ff6b7d; }
#app.ench .gem-name { color: #f2e2e4; }
#app.ench .gem-lv { background: none; -webkit-text-fill-color: initial; text-shadow: none; }
#app.ench .frame { border-color: #5a1220; background: radial-gradient(circle at 50% 50%, rgba(110,12,28,.35), rgba(16,4,7,.55) 75%);
  box-shadow: inset 0 0 36px rgba(0,0,0,.75); }
#app.ench .frame .corner { border-color: #ff5a6a; filter: drop-shadow(0 0 3px rgba(255,80,100,.7)); }
#app.ench .halo { display: none; }
#app.ench .panel, #app.ench .card {
  background: linear-gradient(rgb(52,14,20) 0%, rgb(34,10,15) 55%, rgb(20,6,9) 100%) padding-box,
              linear-gradient(170deg, rgb(220,60,80) 0%, rgb(120,26,46) 40%, rgb(40,10,18) 70%, rgb(180,50,90) 100%) border-box; }
#app.ench .probs { background: linear-gradient(180deg, rgba(28,8,12,.88), rgba(14,5,8,.9)) padding-box, linear-gradient(170deg, #6a1828, #3a0c16 50%, #5a1628) border-box; }
#app.ench .panel-head span { color: #e05a6a; }
#app.ench .panel-head small { color: #8a6a70; }
#app.ench .prow .lbl { color: #ecd8da; }
#app.ench .prow .track { background: #140709; border-color: #3a1018; }
#app.ench .slot .q { color: #ffc8d0; }
#app.ench .slot.add { border-color: #6a1a28; background: rgba(20,6,9,.6); }
#app.ench .cost-row { color: #a88a90; }
#app.ench .cost-row .amount { color: #f2e2e4; }
#app.ench .auto-btn { border-color: #7a1a28; background: #14060a; color: #f0a8b8; }
#app.ench #go { border-color: #e0485a; color: #ffd8de; text-shadow: 0 1px 0 rgba(0,0,0,.6), 0 0 10px rgba(255,140,160,.35);
  background: linear-gradient(180deg, #7a1022 0%, #520a18 45%, #34060f 55%, #1e0409 100%);
  box-shadow: inset 0 1px 0 rgba(255,170,180,.45), inset 0 -2px 0 rgba(0,0,0,.4), 0 0 0 1px #2a060c, 0 4px 14px rgba(0,0,0,.6), 0 0 18px rgba(220,40,60,.3); }
#app.ench .chat-strip { border-color: #3e1018; background: rgba(14,5,7,.75); color: #a07880; }
.mana { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.mana[hidden] { display: none; }
.mana > span:first-child { color: #c08a96; }
.mana .bar { width: 150px; height: 6px; border-radius: 3px; background: #14090b; overflow: hidden; display: inline-block; }
.mana .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5a1690, #b44dff); transition: width .4s; }
.mana b { font-family: var(--num); font-weight: 500; color: #d9a3ff; }
#app.ench .sale-row > :not(.mana) { display: none; }
.flash small { display: block; font-size: 12px; letter-spacing: 3px; margin-top: 2px; }

/* 20강 선택 */
.choice20 { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 14px 16px; min-height: 64px; margin-top: 8px;
  border-radius: 10px; font-family: inherit; text-align: left; }
.choice20 b { font-size: 15px; }
.choice20 small { font-size: 12px; }
.choice20.awaken { border: 1px solid #6b5318; background: linear-gradient(180deg, #2a2112, #18130b); color: #f6e09a; }
.choice20.awaken small { color: var(--dim); }
.choice20.ench { border: 1px solid transparent; background: linear-gradient(180deg, #2a0c22, #12080f) padding-box, linear-gradient(90deg, #e0243a, #8e2bd0, #2a0f3a) border-box; color: #f3d6ff; }
.choice20.ench small { color: #c9a8d8; }

/* 보관함 인챈트 보석 */
.row.card.ench-row { background: linear-gradient(90deg, #1d0c1c, #120c12) padding-box, linear-gradient(90deg, #e0243a, #8e2bd0, #2a0f3a) border-box; }
.row.card.ench-row .sub span { color: #c9a8d8; }
.rank-ench { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #e0c0e8; }

/* 보관함 정렬 방향: 작은 위아래 화살표, 지금 방향만 밝게 */
.sort-dir { flex: 0 0 auto; width: 26px; min-height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line2); border-radius: 4px; background: rgba(0,0,0,.25); }
.sort-dir path { fill: var(--faint); transition: fill .2s; }
.sort-dir[data-dir="desc"] .dn, .sort-dir[data-dir="asc"] .up { fill: var(--gold-hi); }

/* 장착칸: 보유 정령 수만큼 열림 */
.eslot.locked { opacity: .55; border-style: dashed; color: var(--faint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.eslot.locked svg { width: 18px; height: 18px; }
.eslot.locked span { font-size: 10px; text-align: center; }
.deck-share { display: block; margin: 10px auto 0; }
/* 채팅: 정령 덱 공유 — 장착칸 모양 3칸 */
.brag-btn.deck-btn { font-size: 15px; }
.cm .bub.deck { display: grid; grid-template-columns: repeat(3, 62px); gap: 6px; padding: 8px; font: inherit; color: inherit; cursor: pointer; }
.dslot { position: relative; height: 70px; border: 1px dashed var(--line2); border-radius: 5px; background: rgba(14,12,10,.5);
  display: flex; align-items: center; justify-content: center; }
.dslot.on { border-style: solid; border-color: var(--gold-dk); background: radial-gradient(circle at 50% 42%, rgba(232,199,90,.18), transparent 70%), rgba(14,12,10,.5); }
.dslot .corner { width: 8px; height: 8px; }
.dslot .sp { width: 52px; height: 52px; display: flex; }
.dslot .sp svg { width: 52px !important; height: 52px !important; }
.dslot .ringfx { top: 8px; left: 50%; width: 52px; height: 52px; margin-left: -26px; }
.dslot .plus { position: absolute; right: 3px; bottom: 1px; margin: 0; font-size: 12px; }
.row.card.deck-pop .pic { position: relative; width: 56px; height: 56px; }
.row.card.deck-pop .pic svg { width: 56px; height: 56px; }
.row.card.deck-pop .pic .ringfx { inset: 0; }
.row.card.deck-pop .sub.eff { color: var(--gold-pale); margin-top: 2px; }

/* 알렉산드라이트 게이지: 그 보석이 성공하지 못할 때마다 차오름 (변색 보석처럼 청록 → 자주) */
.pstack { display: flex; align-items: center; gap: 8px; margin: -2px 0 8px; font-size: 11px; }
.pstack[hidden] { display: none; }
.pstack .pk { color: #8fd8b8; letter-spacing: .5px; flex: 0 0 auto; }
.pstack .bar { flex: 1; height: 6px; border-radius: 3px; background: #0b1414; overflow: hidden; border: 1px solid #1d3a3a; }
.pstack .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #1f8a6a, #4fc8a0 45%, #b0508a 80%, #e060a8); box-shadow: 0 0 8px rgba(200,90,160,.5); transition: width .4s; }
.pstack b { flex: 0 0 auto; font-family: var(--num); font-weight: 500; color: #e8b0d4; }
.pstack.bump .bar i { animation: pstackBump .6s ease-out; }
@keyframes pstackBump { 0% { filter: brightness(1); } 30% { filter: brightness(2.2); } 100% { filter: brightness(1); } }

/* ───────── 가로 화면 (PC) ─────────
   html.land: 설정의 화면 방향이 '가로'이거나, '자동'에서 창이 넓고 충분히 높을 때.
   왼쪽 세로 메뉴 · 가운데 화면 · 오른쪽 채팅(항상 열림). 제련 화면은 보석(왼쪽)과 확률·버튼(오른쪽) 두 단. */
html.land #app { max-width: none; display: grid; grid-template-columns: var(--land-nav) minmax(0, 1fr) var(--land-chat);
  grid-template-rows: auto minmax(0, 1fr); }
html.land .top { grid-column: 1 / -1; grid-row: 1; padding: calc(var(--sat) + 10px) 20px 8px; }
html.land .tabs { grid-column: 1; grid-row: 2; flex-direction: column; justify-content: center; align-items: stretch; gap: 6px;
  padding: 12px 0; border-top: 0; border-right: 1px solid var(--line); box-shadow: 6px 0 16px rgba(0,0,0,.35);
  background: linear-gradient(90deg, #17130f, #0f0d0a); }
html.land .tabs button { flex: none; padding: 12px 0 10px; font-size: 11px; }
html.land .tabs button.center { flex: none; padding: 10px 0 12px; }
html.land .tabs button.center .orb { width: 60px; height: 60px; margin-top: 0; }
html.land .view { grid-column: 2; grid-row: 2; padding-bottom: 20px; }
html.land .view:not([data-view="forge"]) { padding-inline: max(0px, calc((100% - 1180px) / 2)); }
html.land .chat-panel, html.land .chat-panel[hidden] { display: flex !important; position: relative; grid-column: 3; grid-row: 2; inset: auto; height: auto; min-height: 0;
  border-radius: 0; border-top: 0; border-left: 1px solid var(--gold-dk); box-shadow: -6px 0 16px rgba(0,0,0,.35); animation: none; z-index: 2; }
html.land .cp-input { padding-bottom: 12px; }
html.land .chat-dim, html.land #chatClose, html.land .chat-strip, html.land .chat-pill { display: none !important; }
html.land .toast { left: calc(var(--land-nav) + (100% - var(--land-nav) - var(--land-chat)) / 2); bottom: 40px; }
html.land .ticker { top: calc(var(--sat) + 60px); }

/* 제련: 보석·제련하기 버튼을 화면 정중앙에, 확률은 왼쪽.
   왼쪽 메뉴와 오른쪽 채팅 폭이 달라서, 그 차이(--land-shift)만큼 왼쪽에 빈 열을 두면 가운데 열이 화면 한가운데에 온다 */
html.land { --land-nav: 92px; --land-chat: clamp(300px, 24vw, 460px); --land-shift: calc(var(--land-chat) - var(--land-nav));
  --land-mid: clamp(380px, 32vw, 680px); }
html.land .view[data-view="forge"] { display: grid; overflow: hidden; padding: 12px 0 18px; column-gap: 0;
  grid-template-columns: var(--land-shift) minmax(0, 1fr) var(--land-mid) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: ". . head ." "probs probs frame ." ". . sale ." ". . bottom ."; }
html.land .view[data-view="forge"] > .gem-head { grid-area: head; height: auto; min-height: 104px; padding-bottom: 8px; }
html.land .view[data-view="forge"] > .frame { grid-area: frame; min-height: 0; margin: 0; }
html.land .view[data-view="forge"] > .sale-row { grid-area: sale; margin: 10px 0 0; }
html.land .view[data-view="forge"] > .probs { grid-area: probs; align-self: center; justify-self: end; width: min(100% - 48px, 340px);
  margin: 0 28px 0 20px; padding: 14px 16px; }
html.land .view[data-view="forge"] > .bottom { grid-area: bottom; margin: 6px 0 0; padding: 0; }
html.land .view[data-view="forge"] #probRows { height: auto; gap: 12px; }
html.land .view[data-view="forge"] .probs .prow .lbl { font-size: 14px; }
html.land .view[data-view="forge"] .auto-row { justify-content: flex-end; gap: 10px; }

/* 목록은 두 줄로 */
html.land #bagGems, html.land #bagEnch, html.land #bagItems, html.land #mktList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
html.land #bagGems > :not(.card):not(.row), html.land #mktList > :not(.card):not(.row) { grid-column: 1 / -1; }
html.land .codex { grid-template-columns: repeat(5, 1fr); }
html.land .codex.spirits { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 1600px) {
  html.land #bagGems, html.land #bagEnch, html.land #bagItems, html.land #mktList { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.land .codex { grid-template-columns: repeat(6, 1fr); }
  html.land .codex.spirits { grid-template-columns: repeat(5, 1fr); }
}

/* 시트는 가운데 창으로 */
html.land dialog { max-width: 560px; margin: auto; }
html.land .sheet { border-bottom: 1px solid var(--line2); border-radius: 10px; padding-bottom: 18px; max-height: 86vh; }
.orient-row { cursor: default; }
.orient-row .seg.small button { padding: 5px 10px; font-size: 11.5px; }
.buff b small.over-cap { display: inline; color: #e0937a; font-size: 10px; letter-spacing: 0; white-space: nowrap; }

/* 일괄 판매: 조건으로 고른 뒤 하나씩 체크 */
.bulk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 6px; font-size: 10.5px; color: var(--dim); line-height: 1.5; }
.bulk-head .mini { flex: none; }
.bulk-list { max-height: 38vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 2px; overscroll-behavior: contain; }
.bulk-pick { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 10px; text-align: left; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg2); font-size: 12.5px; }
.bulk-pick .box { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--gold-dk); border-radius: 3px; position: relative; }
.bulk-pick.on { border-color: var(--gold-dk); background: #2a2114; }
.bulk-pick.on .box { background: var(--gold); border-color: var(--gold-hi); }
.bulk-pick.on .box::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #1a1309; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.bulk-pick .gi { flex: none; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.bulk-pick .gi svg { width: 28px; height: 28px; }
.bulk-pick .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulk-pick .nm b { color: var(--gold-hi); font-family: var(--num); font-weight: 700; }
.bulk-pick .gr { flex: none; font-size: 10.5px; }
.bulk-pick .pr { flex: none; min-width: 64px; text-align: right; color: var(--text); font-family: var(--num); font-size: 12px; }
html.land .bulk-list { max-height: 44vh; }

/* ───────── 번쩍임 약하게 (가로 화면 기본) ─────────
   보석 개봉·강화 성공 때 보석이 하얗게 번쩍이는 정도를 낮춘다. 캔버스 섬광·화면 섬광은 fx.setQuality / screenFlash 가 줄인다 */
html.softfx .art.charge .gem-svg { animation-name: chargeSoft; }
@keyframes chargeSoft { to { transform: scale(1.04); filter: brightness(1.12) drop-shadow(0 0 8px var(--hc)); } }
html.softfx .art.pop .gem-svg { animation-name: popSoft; }
@keyframes popSoft { 0% { transform: scale(.85); filter: brightness(1.3); } 40% { transform: scale(1.14); filter: brightness(1.18) drop-shadow(0 0 12px var(--hc)); } 100% { transform: scale(1); } }
html.softfx .art.emerge .gem-svg { animation-name: emergeSoft; }
@keyframes emergeSoft { 0% { transform: scale(.2) rotate(-25deg); filter: brightness(1.5); opacity: 0; } 30% { opacity: 1; }
  60% { transform: scale(1.18) rotate(4deg); filter: brightness(1.2) drop-shadow(0 0 14px var(--hc)); } 100% { transform: none; } }
html.softfx .art.ascend .gem-svg { animation-name: ascendSoft; }
@keyframes ascendSoft { 30% { transform: translateY(-10px) scale(1.15); filter: brightness(1.35) drop-shadow(0 0 16px #ffe9a8); } 100% { transform: none; } }
html.softfx .sigil.boost { animation-name: sigBoostSoft; }
@keyframes sigBoostSoft { 0% { filter: brightness(1); } 18% { filter: brightness(1.4); } 100% { filter: brightness(1); } }
html.softfx .sigil.jolt { animation-name: sigJoltSoft; }
@keyframes sigJoltSoft { 0% { filter: brightness(1); } 10% { filter: brightness(1.3) hue-rotate(-20deg); } 30% { filter: brightness(.7); } 100% { filter: brightness(1); } }
html.softfx .pstack.bump .bar i { animation-name: pstackBumpSoft; }
@keyframes pstackBumpSoft { 0% { filter: brightness(1); } 30% { filter: brightness(1.35); } 100% { filter: brightness(1); } }

/* ───────── 저사양 모드 ─────────
   늘 돌아가는 장식 애니메이션과 무거운 그림자·흐림을 끈다. 결과 연출(흔들림·입자)은 fx.setQuality 가 줄인다 */
html.low .big::after, html.low .halo .rays, html.low .halo .orbit, html.low .aura, html.low .tabs button.center .orb,
html.low .t3 .plus, html.low .t3 .ringfx, html.low .ench-flow-a, html.low .ench-flow-b, html.low .ebadge .spark,
html.low .sigil .sg, html.low .afk.wake .afk-track span, html.low .cracks .ray, html.low .ebadge .lvtxt { animation: none !important; }
html.low .big::after { display: none; }
html.low .t2 .plus, html.low .t3 .plus { filter: none; }
html.low .halo .orbit, html.low .t2 .ringfx, html.low .t3 .ringfx { box-shadow: none; }
html.low .art .gem-svg { filter: none !important; }
html.low * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
/* 가로 화면에서는 화면 섬광·붉은 테두리를 제련 화면 칸에만 (메뉴·채팅까지 번쩍이지 않게) */
html.land .screen-flash, html.land .vignette { grid-column: 2; grid-row: 2; }

/* ───────── 환상 등급 ───────── */
:root { --mythic: linear-gradient(100deg, #ff4fa3, #9b5cff 55%, #fff4fb); }
/* 틈의 빛 색이 부드럽게 바뀌도록 */
@property --crack { syntax: '<color>'; inherits: true; initial-value: #ffb21f; }
.cracks { transition: --crack .45s ease-out; }
.cracks.mythic path.b { opacity: 1; }
.cracks.mythic .ray { filter: saturate(1.3); }
.cracks path.late { stroke-dashoffset: var(--len) !important; transition: none !important; }
.leak.mythic { background: radial-gradient(circle at 50% 50%, rgba(255,120,200,.95) 0%, rgba(155,92,255,.45) 22%, transparent 50%); }
.flash.mythic { background: var(--mythic); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none; filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 10px rgba(255,79,163,.7)) drop-shadow(0 0 22px rgba(155,92,255,.5)); }
.flash.mythic small { -webkit-text-fill-color: #ffe0f0; }
html.softfx .flash.mythic { filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 6px rgba(255,79,163,.45)); }
/* 등급 표시 글자: 그라데이션 */
.grade-mythic { background: var(--mythic); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }
.msg-sys.mythic { background: linear-gradient(100deg, rgba(255,79,163,.16), rgba(155,92,255,.16)); border: 1px solid rgba(255,122,192,.5); color: #ffd1e8; }
.honor-chip.mythic { background: var(--mythic); color: #2a0f24; border-color: #ffd1e8; }
.mythic-warn { text-align: center; }
.mythic-warn .mw-art { display: flex; justify-content: center; margin: 4px 0 10px; }
.mythic-warn p { font-size: 14px; line-height: 1.7; color: #ffe0f0; margin: 0 0 6px; }
.mythic-warn .mw-odds { font-size: 11px; color: var(--dim); margin-bottom: 14px; }
.mythic-warn .mw-odds b { color: #ff7ac0; font-weight: 600; }
.grade.grade-mythic { border-color: #ff7ac0; box-shadow: inset 0 0 6px rgba(255,79,163,.25); }
.dust-amt { color: #ff9fd0; font-family: var(--num); font-size: 13px; }
.flash.mythic small { -webkit-text-fill-color: #ffe0f0; }
/* 결과 글자의 넓은 번짐(특히 일반 등급의 회색)이 뿌연 막처럼 보여서, 약하게에서는 좁고 옅게 */
html.softfx .flash { text-shadow: 0 2px 0 #000, 0 0 6px color-mix(in srgb, currentColor 55%, transparent); }

/* 주사위 신의 부름 */
.leak.dice { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,1) 0%, rgba(255,250,235,.55) 24%, transparent 52%); }
.cracks.dice path.b { opacity: 1; }
.dg { position: fixed; inset: 0; z-index: 9000; --mk: 0; }
.dg-veil { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .7s ease-in; }
.dg-veil.on { opacity: 1; }
.dg-scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease;
  background: radial-gradient(ellipse 70% 45% at 50% 34%, #fffdf6 0%, #f6efe0 55%, #e9e0cf 100%); }
.dg-scene.on { opacity: 1; }
.dg-glow { position: absolute; left: 50%; top: 30%; width: 120vmin; height: 120vmin; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255,214,140,.16) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 62%); mask: radial-gradient(circle, #000 0, transparent 62%);
  animation: dgSpin 40s linear infinite; }
@keyframes dgSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.dg-dice { position: absolute; left: 0; right: 0; top: 30%; transform: translateY(-50%); display: flex; justify-content: center; gap: 9vmin; perspective: 600px; }
.dg-die { width: 64px; height: 64px; animation: dgFloat 3.2s ease-in-out infinite; }
.dg-die.d2 { animation-delay: -1.1s; transform: translateY(-18px); }
.dg-die.d3 { animation-delay: -2.2s; }
@keyframes dgFloat { 0%, 100% { translate: 0 6px; } 50% { translate: 0 -8px; } }
.dg-cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: dgRoll 9s linear infinite; }
.dg-die.d2 .dg-cube { animation-duration: 11s; animation-direction: reverse; }
.dg-die.d3 .dg-cube { animation-duration: 13s; }
@keyframes dgRoll { from { transform: rotateX(-24deg) rotateY(0deg) rotateZ(8deg); } to { transform: rotateX(336deg) rotateY(360deg) rotateZ(8deg); } }
.dg-face { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 9px; gap: 3px;
  background: linear-gradient(145deg, #fffef9, #efe5cf); border: 1.5px solid #d8b56a; border-radius: 12px;
  box-shadow: inset 0 0 10px rgba(216,181,106,.45); backface-visibility: hidden; }
.dg-face i { border-radius: 50%; }
.dg-face i.on { background: radial-gradient(circle at 35% 35%, #c99a3c, #6e4c12); box-shadow: 0 0 4px rgba(201,154,60,.6); }
.dg-face.f1 i.on { background: radial-gradient(circle at 35% 35%, #ff6a5a, #9c1e14); }
.f1 { transform: translateZ(32px); } .f6 { transform: rotateY(180deg) translateZ(32px); }
.f2 { transform: rotateY(90deg) translateZ(32px); } .f5 { transform: rotateY(-90deg) translateZ(32px); }
.f3 { transform: rotateX(90deg) translateZ(32px); } .f4 { transform: rotateX(-90deg) translateZ(32px); }
.dg-box { position: absolute; left: 14px; right: 14px; bottom: calc(22px + env(safe-area-inset-bottom)); padding: 26px 18px 18px;
  background: linear-gradient(180deg, rgba(28,22,14,.94), rgba(16,12,8,.96)); border: 1px solid #d8b56a; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(120,90,30,.35), inset 0 0 0 3px rgba(216,181,106,.12);
  opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .5s; max-width: 640px; margin: 0 auto; }
.dg-box.on { opacity: 1; transform: none; }
.dg-name { position: absolute; top: -13px; left: 16px; padding: 3px 14px; border-radius: 999px; font-size: 13px; letter-spacing: .12em;
  background: linear-gradient(90deg, #f6e3a6, #fffaf0); color: #3a2a0c; border: 1px solid #d8b56a; font-weight: 700; }
.dg-text { min-height: 3.2em; font-size: 16px; line-height: 1.7; color: #fbf3df; white-space: pre-wrap; }
.dg-choices { display: grid; gap: 8px; margin-top: 12px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; pointer-events: none; }
.dg-choices.on { opacity: 1; transform: none; pointer-events: auto; }
.dg-choices.wait { opacity: .6; pointer-events: none; }
.dg-choice { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(255,248,230,.05); border: 1px solid rgba(216,181,106,.55); color: #fbf3df; font: inherit; }
.dg-choice b { font-size: 15px; font-weight: 700; color: #f6e3a6; }
.dg-choice small { font-size: 11.5px; color: #b9ab8d; }
.dg-choice:active, .dg-choice.chosen { background: rgba(246,227,166,.18); border-color: #f6e3a6; box-shadow: 0 0 14px rgba(246,227,166,.35); }
.dg-pick { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(30,22,10,.35);
  opacity: 0; transition: opacity .25s; }
.dg-pick.on { opacity: 1; }
.dg-pick-in { width: 100%; max-width: 640px; max-height: 78vh; display: flex; flex-direction: column; background: #17120b; border: 1px solid #d8b56a;
  border-radius: 16px 16px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); transform: translateY(24px); transition: transform .25s; }
.dg-pick.on .dg-pick-in { transform: none; }
.dg-pick-head { display: flex; justify-content: space-between; align-items: center; color: #f6e3a6; font-size: 15px; margin-bottom: 10px; }
.dg-x { background: none; border: 0; color: #b9ab8d; font-size: 16px; cursor: pointer; }
.dg-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 2px; }
.dg-gem { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: rgba(255,248,230,.04);
  border: 1px solid rgba(216,181,106,.22); color: #fbf3df; font: inherit; cursor: pointer; }
.dg-gem.on { border-color: #f6e3a6; background: rgba(246,227,166,.14); box-shadow: 0 0 12px rgba(246,227,166,.3); }
.dg-art svg { width: 56px; height: 56px; display: block; }
.dg-gn { font-size: 12px; text-align: center; line-height: 1.25; }
.dg-gg { font-size: 10.5px; }
.dg-ok { margin-top: 12px; padding: 13px; border-radius: 10px; border: 0; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  background: linear-gradient(180deg, #f6e3a6, #d8b56a); color: #2a1e08; }
.dg-ok:disabled { opacity: .45; cursor: default; }
/* 신기루: 일렁이며 위로 흩어지고 투명해진다 */
.dg.mirage .dg-scene, .dg.mirage .dg-veil { filter: url(#dgMirage) blur(calc(var(--mk) * 6px));
  opacity: calc(1 - var(--mk) * var(--mk)); transform: translateY(calc(var(--mk) * -18px)) scale(calc(1 + var(--mk) * .06)); transition: none; }
.dg.mirage { pointer-events: none; }
html.land .dg-dice { top: 32%; }
html.land .dg-grid { grid-template-columns: repeat(5, 1fr); }

/* ───────── 직업 ───────── */
/* 제련 화면 액자 왼쪽 아래: 직업 능력 */
.job-chip { position: absolute; left: 8px; bottom: 8px; z-index: 7; display: flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px;
  border-radius: 14px; border: 1px solid var(--line2); background: rgba(14,12,10,.72); color: var(--dim); font-size: 11px; letter-spacing: -.2px; }
.job-chip b { color: var(--gold-pale); font-weight: 600; }
.job-chip .job-ic { color: var(--gold); flex: none; }
.job-chip .ring { color: var(--gold); flex: none; }
.job-chip.ready { border-color: var(--gold); color: var(--gold-pale); box-shadow: 0 0 12px rgba(232,199,90,.35); animation: jobReady 1.6s ease-in-out infinite; }
.job-chip.active { border-color: #f6e09a; background: linear-gradient(90deg, rgba(232,199,90,.22), rgba(14,12,10,.72)); color: var(--gold-pale); }
@keyframes jobReady { 50% { box-shadow: 0 0 20px rgba(232,199,90,.6); } }
html.low .job-chip.ready { animation: none; }
#app.ench .job-chip .job-ic, #app.ench .job-chip .ring { color: #d48aff; }
#app.ench .job-chip.ready { border-color: #b46be0; box-shadow: 0 0 12px rgba(180,107,224,.45); }
#app.ench .job-chip.active { border-color: #d48aff; background: linear-gradient(90deg, rgba(150,60,210,.28), rgba(14,12,10,.72)); }

.job-entry .pic { color: var(--gold); display: flex; align-items: center; justify-content: center; }
.job-list { gap: 10px; }
.job-card { position: relative; padding: 12px 12px 10px; }
.job-card.on { border-color: var(--gold-dk); background: linear-gradient(180deg, rgba(201,162,39,.08), transparent 70%); }
.job-card.locked { opacity: .78; }
.job-card.locked .job-emb { filter: grayscale(1) brightness(.7); }
.job-top { display: flex; align-items: center; gap: 10px; }
.job-top .mid { flex: 1; min-width: 0; }
.job-top .n { font-size: 15px; color: var(--gold-pale); display: flex; align-items: center; gap: 6px; }
.job-top .n small { font-size: 10px; color: var(--dim); }
.job-top .n .new { position: static; }
.job-top .sub { font-size: 11px; color: var(--dim); margin-top: 2px; line-height: 1.5; }
.job-emb { width: 44px; height: 44px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-dk); background: radial-gradient(circle at 40% 35%, #3a2d14, #15120f); color: var(--gold-hi); font-size: 20px; }
.hidden-job .job-emb { color: var(--faint); border-style: dashed; }
.job-skill { margin-top: 9px; font-size: 12px; line-height: 1.65; color: var(--text); }
.job-skill > b:first-child { color: var(--gold-hi); margin-right: 4px; }
.job-skill small { display: block; margin-top: 4px; font-size: 10.5px; color: var(--dim); line-height: 1.6; }
.job-cond { margin-top: 9px; display: grid; grid-template-columns: 1fr; gap: 4px; font-size: 10.5px; color: var(--dim); }
.job-cond .bar { height: 5px; border-radius: 3px; background: var(--bg1); border: 1px solid var(--line); overflow: hidden; }
.job-cond .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dk), var(--gold-hi)); }
.job-cond b { font-family: var(--num); color: var(--gold-pale); font-weight: 500; text-align: right; }
.job-go { width: 100%; margin-top: 10px; }
.job-detail .job-ic { color: var(--gold-hi); }
.job-detail .cs { color: var(--dim); font-size: 12px; margin-top: 2px; }

/* 주사위 놀이 */
.dice-table { display: flex; justify-content: center; gap: 16px; margin: 10px 0 8px; perspective: 400px; }
.die2 { width: 64px; height: 64px; padding: 9px; gap: 3px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); border-radius: 13px;
  background: linear-gradient(145deg, #fffef9, #e9dcc0); border: 1.5px solid #d8b56a; box-shadow: 0 4px 12px rgba(0,0,0,.45), inset 0 0 10px rgba(216,181,106,.4); }
.die2 i { border-radius: 50%; }
.die2 i.on { background: radial-gradient(circle at 35% 35%, #c99a3c, #6e4c12); }
.die2.blank { opacity: .35; }
.die2.rolling { animation: dieShake .14s linear infinite; }
.die2.land { animation: dieLand .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes dieShake { 0% { transform: rotate(-8deg) translateY(-3px); } 50% { transform: rotate(8deg) translateY(2px); } 100% { transform: rotate(-8deg) translateY(-3px); } }
@keyframes dieLand { 0% { transform: scale(1.25); } 100% { transform: none; } }
.dice-res { text-align: center; font-size: 15px; min-height: 24px; margin-bottom: 8px; color: var(--text); }
.dice-res b { font-family: var(--num); color: var(--gold-hi); font-size: 18px; }
.dice-res .win { color: var(--gold-pale); font-weight: 700; }
.dice-res .lose { color: var(--x); }
.dice-odds { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.dice-odds span { display: grid; justify-items: center; gap: 1px; padding: 5px 12px; border: 1px solid var(--line2); border-radius: 6px; font-size: 10.5px; color: var(--dim); font-family: var(--num); }
.dice-odds b { font-size: 13px; color: var(--gold-pale); font-family: var(--serif); }
.dice-odds .lose b { color: var(--x); }

/* 정령 진화 · 각성 */
.evo-grades { margin: 10px 0; }
.evo-row .pic.sp { width: 46px; height: 46px; }
.evo-row .pic.sp svg { width: 100%; height: 100%; }
.evo-row.on { border-color: var(--gold-dk); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper b { font-family: var(--num); min-width: 14px; text-align: center; color: var(--gold-pale); }
.stepper .mini { width: 30px; padding: 4px 0; }
.evo-sum { text-align: center; margin: 10px 0 6px; font-size: 13px; color: var(--dim); }
.evo-sum b { font-family: var(--num); color: var(--gold-hi); font-size: 16px; }
.evo-done { text-align: center; padding: 6px 0 12px; }
.evo-art { width: 140px; height: 140px; margin: 0 auto 8px; animation: evoIn .9s cubic-bezier(.2, 1.2, .3, 1); }
.evo-art svg { width: 100%; height: 100%; }
.evo-done .nm { font-size: 18px; color: var(--gold-pale); }
.evo-msg { margin: 8px 0; font-size: 13px; color: var(--text); }
@keyframes evoIn { 0% { transform: scale(.4); opacity: 0; filter: brightness(3); } 100% { transform: none; opacity: 1; filter: none; } }
.evo-entry { display: grid; gap: 2px; justify-items: center; padding: 12px; color: var(--gold-pale); font-size: 14px; border-color: var(--gold-dk); }
.evo-entry small { color: var(--dim); font-size: 10.5px; }
.cell.lost { opacity: .5; }
.cell.lost .sp { filter: grayscale(1) brightness(.6); }
.spare-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 5px; font-size: 10px; color: var(--dim); }
.awaken-btn { padding: 2px 8px; font-size: 10px; }

/* 경매 */
.auc-tag { font-size: 9px; color: #2a1e08; background: linear-gradient(90deg, #f6e3a6, #d8b56a); padding: 0 5px; border-radius: 2px; margin-left: 4px; }
.mine-tag.top { border-color: #6fa3a0; color: #9fd4cf; }
.list-kind { margin: 10px 0 6px; }
.auc-opts .seg { flex-wrap: wrap; }
.price-label { font-size: 11px; color: var(--dim); margin: 8px 0 -4px; }
.codex .cell.evo-entry { grid-column: 1 / -1; }
.auc-opts .anon-pick { flex-direction: column; align-items: stretch; gap: 6px; }
.auc-opts .anon-pick > span { font-size: 11px; color: var(--dim); }

/* ───────── 화면 정리: 탭 묶음 · 프로필 메뉴 ───────── */
.sheet-tabs { padding: 0 2px 10px; }
.sheet-tabs .seg { margin: 0; }
.sheet-tabs .seg button { position: relative; }
.tdot { position: absolute; top: 6px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--x); }
.me-head .pic, .menu-row .pic { display: flex; align-items: center; justify-content: center; }
.me-head .pic svg, .menu-row .pic svg { width: 26px; height: 26px; }
.me-card { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 12px 6px; line-height: 1.5; }
.me-card span { display: grid; gap: 2px; font-size: 10.5px; }
.me-card b { font-size: 14px; }
.titles-head { font-size: 11px; color: var(--dim); margin: 8px 2px 4px; }
.titles-head small { color: var(--faint); margin-left: 4px; }
.back-btn { margin-bottom: 8px; }

/* ───────── 채팅창 탭 · 방 ───────── */
.cp-head { padding: 9px 12px 8px; gap: 8px; }
.cp-tabs { flex: 1; margin: 0; max-width: 260px; }
.cp-tabs button { position: relative; }
.cp-tabs button i { position: absolute; top: 2px; right: 4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--x); color: #fff;
  font-size: 9px; font-style: normal; line-height: 15px; font-family: var(--num); }
.cp-empty { margin: auto; text-align: center; color: var(--dim); font-size: 12.5px; line-height: 1.8; padding: 24px 12px; }
.cp-sec { font-size: 10.5px; color: var(--faint); letter-spacing: 1px; margin: 10px 4px 4px; }
.cp-sec small { margin-left: 4px; letter-spacing: 0; }
.cp-actions { display: flex; justify-content: center; padding: 10px; }
.cp-actions .mini { min-width: 140px; }
.room-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.room-row:active { background: rgba(232,199,90,.06); }
.rr-pic { position: relative; width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--line2); background: var(--bg1); display: flex; align-items: center; justify-content: center; }
.rr-pic svg { width: 22px; height: 22px; }
.rr-pic b { font-family: var(--num); color: var(--gold-pale); font-size: 14px; }
.rr-pic .ondot { position: absolute; right: -1px; bottom: -1px; }
.rr-mid { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rr-n { font-size: 13.5px; color: var(--gold-pale); display: flex; align-items: center; gap: 5px; }
.rr-last { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-right { display: grid; justify-items: end; gap: 3px; color: var(--faint); font-size: 10px; }
.badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--x); color: #fff; font-size: 10px; font-style: normal;
  line-height: 18px; text-align: center; font-family: var(--num); }
.ondot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5a5248; box-shadow: 0 0 0 2px var(--bg0, #15120f); margin-left: 4px; vertical-align: middle; }
.ondot.on { background: #5fd38a; }
.lead-tag { font-size: 9px; color: #2a1e08; background: linear-gradient(90deg, #f6e3a6, #d8b56a); padding: 0 5px; border-radius: 2px; margin-left: 4px; }
.lead-tag.me { background: var(--line2); color: var(--dim); }
.room-head { position: sticky; top: -8px; z-index: 2; display: flex; align-items: center; gap: 8px; margin: -8px -4px 6px; padding: 8px 6px; background: var(--bg0, #15120f); border-bottom: 1px solid var(--line); }
.rh-mid { flex: 1; min-width: 0; display: grid; }
.rh-mid b { font-size: 14px; color: var(--gold-pale); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-mid small { font-size: 10.5px; color: var(--dim); }
.bub.gone { color: var(--faint); font-style: italic; }

/* 친구 · 사람 정보 */
.fr-add { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.fr-add .price-in { flex: 1; margin: 0; }
.fr-row { cursor: pointer; }
.fr-row .pic { position: relative; display: flex; align-items: center; justify-content: center; }
.fr-row .pic svg { width: 24px; height: 24px; }
.fr-row .pic .ondot { position: absolute; right: 2px; bottom: 2px; }
.fr-row .right { display: flex; align-items: center; gap: 6px; }
.pcard { text-align: center; margin-bottom: 10px; }
.pc-pic { position: relative; width: 70px; height: 70px; margin: 4px auto 8px; border-radius: 50%; border: 1px solid var(--gold-dk); background: radial-gradient(circle at 40% 35%, #3a2d14, #15120f);
  display: flex; align-items: center; justify-content: center; }
.pc-pic svg { width: 40px; height: 40px; }
.pc-pic .ondot { position: absolute; right: 4px; bottom: 4px; width: 12px; height: 12px; }
.pc-n { font-size: 18px; color: var(--gold-pale); }
.pc-sub { font-size: 11.5px; color: var(--dim); margin: 2px 0 10px; }
.pc-more { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }

/* 정령 각성 */
.awaken-entry { display: grid; gap: 3px; justify-items: center; padding: 12px; border-color: var(--gold); background: linear-gradient(180deg, rgba(232,199,90,.12), transparent); }
.awaken-entry .ae-n { font-size: 14px; color: var(--gold-pale); }
.awaken-entry .ae-n b { font-family: var(--num); color: var(--gold-hi); }
.awaken-entry small { font-size: 10.5px; color: var(--dim); }
.codex .cell.awaken-entry { grid-column: 1 / -1; }
.spare-tag { position: absolute; top: 6px; right: 6px; font-size: 9.5px; color: #2a1e08; background: linear-gradient(90deg, #f6e3a6, #d8b56a); padding: 1px 6px; border-radius: 8px; }
.cell { position: relative; }
.aw-list { gap: 10px; }
.aw-card { padding: 12px; }
.aw-card.hit { border-color: var(--gold); box-shadow: 0 0 14px rgba(232,199,90,.25); }
.aw-top { display: flex; align-items: center; gap: 10px; }
.aw-top .pic.sp { width: 52px; height: 52px; flex: none; }
.aw-top .pic.sp svg { width: 100%; height: 100%; }
.aw-top .n { font-size: 14px; color: var(--gold-pale); }
.aw-top .sub { font-size: 11px; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.aw-top .sub b { color: var(--gold-hi); font-family: var(--num); }
.aw-cmp { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: stretch; margin: 10px 0; }
.aw-now, .aw-next { padding: 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 11px; line-height: 1.6; color: var(--dim); }
.aw-next { border-color: var(--gold-dk); color: var(--gold-pale); background: rgba(232,199,90,.06); }
.aw-now small, .aw-next small { display: block; font-size: 10px; color: var(--faint); margin-bottom: 2px; }
.aw-next small { color: var(--gold); }
.aw-arrow { align-self: center; color: var(--gold); font-size: 18px; }
.aw-btns { display: flex; gap: 8px; }
.aw-btns .mini { flex: 1; padding: 8px 0; }

/* 직업 설명 (정리된 목록) */
.job-skill > b:first-child { display: block; margin-bottom: 4px; }
.job-eff, .job-note { margin: 0; padding-left: 16px; }
.job-eff li { font-size: 12px; line-height: 1.65; color: var(--text); }
.job-note { margin-top: 5px; }
.job-note li { font-size: 10.5px; line-height: 1.6; color: var(--dim); }
.job-eff li::marker { color: var(--gold); }
.job-note li::marker { color: var(--faint); }

/* 세공 */
.craft-tag { font-size: 9.5px; color: #1c2a1e; background: linear-gradient(90deg, #bff0c9, #7fd39a); padding: 0 5px; border-radius: 2px; margin-left: 4px; font-family: var(--num); }
.craft-tag.neg { background: linear-gradient(90deg, #f5c6c6, #d88a8a); color: #2a1010; }
.craft-pick { display: flex; gap: 10px; align-items: center; padding: 12px; margin: 10px 0 6px; border-color: var(--gold-dk); }
.craft-pick .pic { flex: none; }
.craft-pick .mid { flex: 1; min-width: 0; }
.orders { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.order { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.order .pic { flex: none; }
.order .mid { flex: 1; min-width: 0; }
.order .n .lv { margin-left: 4px; color: var(--gold); font-weight: 700; }
.order .mult { font-size: 12px; opacity: .8; margin-left: 4px; }
.order .price { font-weight: 700; color: var(--gold); margin-top: 2px; font-variant-numeric: tabular-nums; }
.order .mini { flex: none; min-width: 58px; }
.order.done { opacity: .55; }
.order .bonuses { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; font-size: 11px; color: var(--dim); align-items: center; }
.order .bonus { display: inline-flex; align-items: center; gap: 3px; }
.order .bonus svg { width: 16px; height: 16px; }
.order .bonus b { color: var(--gold-pale); font-family: var(--num); }
.order .acts { flex: none; display: flex; flex-direction: column; gap: 6px; }
.order .mini.rej { min-width: 58px; opacity: .85; }
.order .mini.rej.danger { border-color: #e58a8a; color: #f2b0b0; opacity: 1; }
/* 봉인 마법: 막히는 확률에 표시 */
.prow.sealed .new { opacity: .85; }
.prow .seal-tag { font-size: 10px; color: #c8a8ff; margin-left: 4px; border: 1px solid rgba(200,168,255,.5); border-radius: 4px; padding: 0 3px; }
/* 봉인 마법이 막을 때 덮이는 문양 */
.seal-ward { position: absolute; z-index: 4; left: 50%; top: 50%; width: 78%; aspect-ratio: 1; pointer-events: none;
  transform: translate(-50%, -50%) scale(.5) rotate(-30deg); opacity: 0; animation: sealWard 1.25s ease-out forwards; }
.seal-ward svg { width: 100%; height: 100%; fill: none; stroke: #c8a8ff; stroke-width: 2.4; filter: drop-shadow(0 0 6px rgba(170,110,255,.9)); }
.seal-ward .dash { stroke-dasharray: 6 8; stroke-width: 1.6; }
@keyframes sealWard {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-30deg); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.05) rotate(0deg); }
  70% { opacity: .9; transform: translate(-50%, -50%) scale(1) rotate(12deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25) rotate(24deg); }
}
html.low .seal-ward { animation-duration: .8s; }
/* 미치광이: 미다스의 손 */
.job-chip.midas { border-color: #ffd86a; color: #fff0b8; box-shadow: 0 0 14px rgba(255,210,90,.5); }
#app.ench .job-chip.midas { border-color: #ffd86a; box-shadow: 0 0 14px rgba(255,210,90,.5); }
.craft-pick .n { font-size: 15px; color: var(--gold-pale); }
.craft-pick .sub { font-size: 11px; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.craft-range { font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.craft-range b { color: var(--gold-pale); font-family: var(--num); font-weight: 500; }
.craft-done { text-align: center; padding: 6px 0 10px; }
.craft-done .pic { width: 96px; margin: 0 auto 6px; animation: evoIn .8s cubic-bezier(.2, 1.2, .3, 1); }
.craft-done .nm { font-size: 16px; color: var(--gold-pale); }
.craft-delta { font-family: var(--num); font-size: 26px; margin: 6px 0 10px; }
.craft-delta.up { color: #8be0a4; text-shadow: 0 0 14px rgba(139,224,164,.4); }
.craft-delta.down { color: #e58a8a; }
.craft-delta small { font-size: 13px; color: var(--dim); }

/* 광속 채굴 */
.mine-n { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; }
.mine-n .price-in { flex: 1; margin: 0; text-align: center; }
.mine-n .mini { width: 44px; padding: 10px 0; font-size: 16px; }
#mineRange { width: 100%; accent-color: var(--gold); margin: 4px 0 8px; }
.mine-sum { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 2px 0 10px; font-size: 12px; }
.mine-sum b { font-family: var(--num); margin-left: 2px; }
.mine-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 46vh; overflow-y: auto; padding: 2px; margin-bottom: 10px; }
.mine-cell { display: grid; justify-items: center; gap: 1px; padding: 6px 2px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,248,230,.03); }
.mine-cell svg { width: 40px; height: 40px; }
.mine-cell .mn { font-size: 10px; color: var(--text); text-align: center; line-height: 1.2; }
.mine-cell .mg { font-size: 9px; }
.mine-cell.g3 { border-color: rgba(200,140,255,.45); }
.mine-cell.g4 { border-color: rgba(255,200,90,.6); box-shadow: 0 0 10px rgba(255,200,90,.25); }
.mine-cell.mythic { border-color: #ff4fa3; box-shadow: 0 0 14px rgba(255,79,163,.4); }
html.land .mine-grid { grid-template-columns: repeat(6, 1fr); }

/* 직업 목록: 해금 / 미해금 구분선 */
.job-div { display: flex; align-items: center; gap: 10px; margin: 8px 2px 2px; font-size: 11px; color: var(--dim); letter-spacing: .08em; }
.job-div::before, .job-div::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* 연금술 */
.alch-box { display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; margin: 2px 0 10px; border-radius: 12px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 30%, rgba(140,220,180,.08), transparent 70%); }
.alch-box .job-ic { color: #9fdcbc; }
.alch-box.idle .job-ic { opacity: .55; }
.alch-box.fail .job-ic { color: var(--dim); }
.alch-box .pic svg { width: 64px; height: 64px; animation: evoIn .7s cubic-bezier(.2, 1.2, .3, 1); }
.alch-box .nm { font-size: 16px; color: var(--gold-pale); }
.alch-box .nm b { font-family: var(--num); font-weight: 500; color: #9fdcbc; }
.alch-box .sub { font-size: 11px; color: var(--dim); }
.alch-box.t1 { border-color: rgba(120,170,255,.5); }
.alch-box.t2 { border-color: rgba(255,200,90,.7); box-shadow: 0 0 16px rgba(255,200,90,.25); }
.alch-tier { display: inline-block; padding: 0 6px; margin-right: 4px; border-radius: 6px; border: 1px solid var(--line); color: var(--gold-pale); }
.alch-charge { display: flex; justify-content: center; gap: 5px; margin: 2px 0 6px; }
.alch-charge i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(159,220,188,.5); background: transparent; }
.alch-charge i.on { background: radial-gradient(circle at 40% 35%, #d9fbe8, #6fc79a); box-shadow: 0 0 6px rgba(111,199,154,.6); }
.alch-next { text-align: center; font-size: 11px; color: var(--dim); margin-bottom: 8px; }
.alch-next b { font-family: var(--num); color: var(--gold-pale); font-weight: 500; }

/* 마이너스의 손 */
.minus-bar { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px; font-size: 12px; color: var(--dim); }
.minus-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.minus-row .chk { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; color: #1a1712; }
.minus-row.on { border-color: #e58a8a; background: rgba(229,138,138,.08); }
.minus-row.on .chk { background: #e58a8a; border-color: #e58a8a; }
.minus-row:disabled { opacity: .45; }
.minus-dust { display: inline-flex; align-items: center; gap: 4px; }
.minus-dust svg { width: 18px; height: 18px; }
.mine-cell.broken svg { filter: grayscale(.7) brightness(.7); }

/* 보석 수배 */
.want-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.want-cell { display: grid; justify-items: center; gap: 1px; padding: 6px 2px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,248,230,.03); color: inherit; font: inherit; }
.want-cell svg { width: 38px; height: 38px; }
.want-cell .mn { font-size: 10px; text-align: center; line-height: 1.2; }
.want-cell .mg { font-size: 9.5px; font-family: var(--num); }
.want-cell.on { border-color: var(--gold); box-shadow: 0 0 10px rgba(232,199,122,.35); }
html.land .want-grid { grid-template-columns: repeat(6, 1fr); }

/* 관리자 지표 */
.st-wrap { overflow-x: auto; margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 8px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.st-table th, .st-table td { padding: 6px 7px; text-align: right; border-bottom: 1px solid rgba(255,248,230,.06); font-family: var(--num); }
.st-table th:first-child, .st-table td:first-child { text-align: left; }
.st-table th { color: var(--dim); font-weight: 500; position: sticky; top: 0; background: #1d1711; }
.st-table td i { font-style: normal; font-size: 9px; color: var(--gold); margin-left: 4px; }
.st-table td.neg { color: #e58a8a; }
.st-table tr[data-aact] { cursor: pointer; }
.st-table tr.on td { background: rgba(232,199,122,.08); }
.st-table tr.st-detail td { text-align: left; white-space: normal; font-family: inherit; background: rgba(0,0,0,.2); }
.sec-title small { font-weight: 400; color: var(--dim); font-size: 10px; margin-left: 6px; }

/* ───────── 메인(타이틀) 화면 ───────── */
#title { position: fixed; inset: 0; z-index: 8000; overflow: hidden; color: var(--text); font-family: var(--serif);
  background: radial-gradient(110% 62% at 50% 44%, #241b13 0%, #120e0a 48%, #060504 100%); user-select: none; -webkit-user-select: none; }
#title .tt-cave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42%; }
#title .tt-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#title .tt-vign { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.55) 100%); }
#title .tt-dial { position: absolute; left: 50%; top: 47%; width: 0; height: 0; }
#title .tt-dial svg { position: absolute; }
#title .tt-d1 { left: -170px; top: -170px; width: 340px; height: 340px; }
#title .tt-d2 { left: -132px; top: -132px; width: 264px; height: 264px; }
#title .tt-d3 { left: -100px; top: -100px; width: 200px; height: 200px; }
#title .tt-halo { position: absolute; left: -180px; top: -180px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(170,130,220,.11) 0%, rgba(120,90,160,0) 60%); }
#title .tt-stone { position: absolute; left: 50%; top: 47%; width: 190px; height: 190px; transform: translate(-50%, -50%); filter: drop-shadow(0 0 16px rgba(170,130,220,.18)); }
#title .tt-stone svg { width: 100%; height: 100%; display: block; }
#title .tt-logo { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 8.5%); text-align: center; transition: opacity .3s, transform .3s; }
#title .tt-logo .tt-eb { font-family: var(--num); font-size: 10px; letter-spacing: 8px; color: var(--gold); opacity: .8; padding-left: 8px; }
#title .tt-logo h1 { margin: 10px 0 0; font-size: 42px; font-weight: 700; letter-spacing: 7px; padding-left: 7px; line-height: 1.15;
  background: linear-gradient(100deg, #9a7a2c 0%, #e8c75a 32%, #fff3cf var(--sh, 50%), #e8c75a 68%, #9a7a2c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.65)) drop-shadow(0 0 22px rgba(232,199,90,.16)); }
#title .tt-logo .tt-orn { display: block; margin: 12px auto 0; width: 180px; height: 8px; }
#title .tt-logo .tt-tag { margin-top: 12px; font-size: 12.5px; color: rgba(214,198,168,.82); letter-spacing: 1.5px; }
#title .tt-logo .tt-by { margin-top: 5px; font-size: 10.5px; color: rgba(214,198,168,.5); letter-spacing: 2px; }
#title .tt-panel { position: absolute; left: 30px; right: 30px; bottom: calc(var(--sab) + 54px); max-width: 420px; margin: 0 auto; transition: opacity .3s, transform .3s; }
#title .tt-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 48px; margin-top: 9px;
  border-radius: 8px; font: inherit; font-size: 14.5px; letter-spacing: 1.5px; cursor: pointer; overflow: hidden; }
#title .tt-btn svg { width: 18px; height: 18px; flex: none; }
#title .tt-btn.tt-acc { color: var(--text); border: 1px solid rgba(201,162,39,.38); background: linear-gradient(180deg, rgba(36,28,19,.78), rgba(18,14,10,.78));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(255,240,200,.06); }
#title .tt-btn.tt-acc b { font-weight: 700; color: var(--gold-pale); }
#title .tt-btn.tt-guest { color: rgba(214,198,168,.75); height: 38px; font-size: 13px; letter-spacing: 2px; margin-top: 4px; }
#title .tt-btn.tt-guest::after { content: ''; position: absolute; left: 50%; bottom: 8px; width: 92px; height: 1px; margin-left: -46px; background: linear-gradient(90deg, transparent, rgba(214,198,168,.45), transparent); }
#title .tt-btn.tt-start { height: 58px; font-size: 19px; letter-spacing: 12px; padding-left: 12px; font-weight: 700; color: #1d150a; border-radius: 10px;
  background: linear-gradient(180deg, #f1d482 0%, #d6b14c 50%, #9c7a2a 100%);
  box-shadow: inset 0 1px 0 rgba(255,248,220,.7), inset 0 -2px 0 rgba(90,64,18,.35), 0 8px 22px rgba(0,0,0,.5), 0 0 var(--glow, 16px) rgba(232,199,90,.38); }
#title .tt-btn.tt-start::after { content: ''; position: absolute; top: 0; bottom: 0; width: 46px; left: var(--swp, -80px);
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); }
#title .tt-btn.tt-start.tt-small { height: 46px; font-size: 15px; letter-spacing: 6px; padding-left: 6px; margin-top: 12px; }
#title .tt-btn.tt-start:active { transform: scale(.97); }
#title .tt-agree { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 12px 0 0; font-size: 12px; color: rgba(214,198,168,.8); cursor: pointer; }
#title .tt-agree .tt-box { flex: none; width: 17px; height: 17px; border-radius: 4px; border: 1px solid rgba(201,162,39,.6); display: grid; place-items: center; background: rgba(0,0,0,.3); }
#title .tt-agree .tt-box svg { width: 12px; height: 12px; opacity: 0; }
#title .tt-agree.tt-on .tt-box { background: var(--gold); border-color: var(--gold); }
#title .tt-agree.tt-on .tt-box svg { opacity: 1; }
#title .tt-agree u { color: var(--gold-pale); text-decoration: none; border-bottom: 1px solid rgba(246,224,154,.45); padding-bottom: 1px; }
#title .tt-agree.tt-shake { animation: ttShake .45s; }
@keyframes ttShake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
#title .tt-auto { margin-top: 12px; font-size: 11.5px; color: rgba(214,198,168,.65); }
#title .tt-auto .tt-box { width: 15px; height: 15px; }
#title .tt-tip { height: 15px; margin-top: 7px; font-size: 11px; color: #e3a08e; text-align: center; opacity: 0; transition: opacity .2s; }
#title .tt-tip.tt-show { opacity: 1; }
#title .tt-who { display: flex; align-items: baseline; justify-content: center; gap: 7px; font-size: 14px; margin-bottom: 4px; }
#title .tt-who .tt-badge { align-self: center; font-size: 10px; padding: 2px 7px; border-radius: 9px; border: 1px solid rgba(201,162,39,.45); color: var(--gold-pale); }
#title .tt-who .tt-sub { font-size: 12px; color: var(--dim); }
#title .tt-links { display: flex; justify-content: center; margin-top: 14px; font-size: 11.5px; color: rgba(214,198,168,.7); }
#title .tt-links span { padding: 2px 12px; cursor: pointer; }
#title .tt-links span + span { border-left: 1px solid rgba(214,198,168,.25); }
#title .tt-foot { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 16px); display: flex; justify-content: space-between;
  padding: 0 24px; font-size: 9.5px; color: #6d5e47; font-family: var(--num); letter-spacing: 1.5px; transition: opacity .3s; }
#title .tt-foot .tt-ok::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #6fc79a; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 6px #6fc79a; }
#title .tt-terms { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 18px; background: rgba(0,0,0,.45); }
#title .tt-terms[hidden] { display: none; }
#title .tt-terms-in { width: 100%; max-width: 440px; max-height: min(72vh, 600px); display: flex; flex-direction: column; border-radius: 12px; border: 1px solid rgba(201,162,39,.45);
  background: linear-gradient(180deg, #201912, #120e0a); box-shadow: 0 24px 60px rgba(0,0,0,.7); padding: 20px 20px 16px; }
#title .tt-terms h3 { margin: 0 0 12px; font-size: 16px; color: var(--gold-pale); letter-spacing: 2px; }
#title .tt-terms-body { flex: 1; overflow: auto; font-size: 12px; line-height: 1.75; color: var(--dim); }
#title .tt-terms-body b { color: var(--text); }
/* 시작: 버튼·로고가 사라지고 검게 → 게임 화면이 밝아진다 */
#title.tt-out .tt-logo { opacity: 0; transform: translateY(-20px); }
#title.tt-out .tt-panel { opacity: 0; transform: translateY(20px); pointer-events: none; }
#title.tt-out .tt-foot { opacity: 0; }
#title .tt-black { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .6s cubic-bezier(.42,0,1,1); }
#title .tt-black.tt-in { opacity: 1; }
#title .tt-black.tt-away { opacity: 0; transition: opacity .8s cubic-bezier(0,0,.58,1); }
#title.tt-reveal { background: transparent; pointer-events: none; }
html.land #title .tt-dial, html.land #title .tt-stone { top: 50%; }
@media (max-height: 740px) {
  #title .tt-dial { transform: scale(.78); }
  #title .tt-stone { width: 150px; height: 150px; }
  #title .tt-logo { top: calc(var(--sat) + 5.5%); }
  #title .tt-logo h1 { font-size: 36px; }
  #title .tt-panel { bottom: calc(var(--sab) + 44px); }
}

/* ───────── 길드 ───────── */
.guild-tools { display: flex; align-items: center; gap: 6px; padding: 12px 18px 8px; flex-wrap: wrap; }
.guild-tools .guild-q { flex: 1 1 100%; margin: 0 0 4px; padding: 9px 11px; font-size: 13px; }
.guild-tools .seg { padding: 0; flex: 1; }
.guild-row .pic { width: 52px; height: 52px; border-radius: 4px; background: radial-gradient(circle at 50% 70%, #1f2a18, #120f0c); overflow: hidden; }
.guild-row .pic .gtree { width: 52px; height: 52px; }
.gstage-tag { margin-left: 4px; padding: 1px 6px; border: 1px solid #6b5318; border-radius: 2px; font-size: 10px; color: var(--gold-pale); font-family: var(--serif); }
.gstage-tag.tree { border-color: #3c7a43; color: #a8e6a0; background: rgba(60,122,67,.15); }
.gapplied { color: var(--gold-pale) !important; }
.gdetail { text-align: center; }
.gd-tree .gtree { width: 150px; height: 150px; }
.gd-stage { font-size: 15px; color: var(--gold-hi); }
.gd-stage small { font-size: 11px; color: var(--dim); }
.gd-desc { margin: 6px 0 4px; font-size: 12px; color: var(--dim); }
.gd-members { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-m { padding: 3px 8px; border: 1px solid var(--line2); border-radius: 2px; font-size: 11px; background: var(--bg2); }
.gd-m small { margin-right: 4px; font-size: 9px; color: var(--gold); }
.gd-m.master { border-color: var(--gold); }
.big.ghost { background: var(--bg2); border-color: var(--line2); color: var(--dim); text-shadow: none; }

.gtree-card { position: relative; margin: 4px 18px 6px; padding: 10px 12px 12px; border: 1px solid var(--line2); border-radius: 4px; text-align: center;
  background: radial-gradient(90% 70% at 50% 85%, #1d2a17 0%, #14110d 70%); }
.gt-art .gtree { width: 210px; height: 210px; max-width: 70%; }
.gt-art.g-ok .gtree { animation: gOk 1s ease-out; }
.gt-art.g-bad .gtree { animation: gBad .9s ease-out; }
.gt-art.g-down .gtree { animation: gDown .7s ease-out; }
.gt-art.g-keep .gtree { animation: gKeep .5s ease-out; }
@keyframes gOk { 0% { filter: brightness(2.2) drop-shadow(0 0 20px #f6e09a); transform: scale(1.06); } 100% { filter: none; transform: none; } }
@keyframes gBad { 0%, 30% { filter: grayscale(1) brightness(.6); transform: translateX(-4px); } 15% { transform: translateX(4px); } 100% { filter: none; transform: none; } }
@keyframes gDown { 0% { filter: brightness(.6) sepia(.6); transform: translateY(3px); } 100% { filter: none; transform: none; } }
@keyframes gKeep { 0% { transform: scale(.98); } 100% { transform: none; } }
.gt-stage { font-size: 17px; color: var(--gold-hi); letter-spacing: 1px; }
.gt-plat { margin-top: 2px; font-size: 13px; }
.gt-plat small { font-size: 10px; color: var(--dim); }
.amount.plat { display: inline-flex; align-items: center; gap: 4px; color: #dfe8f0; font-family: var(--num); }
.plat-ico { flex: none; }
.gfruit { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; margin-top: 10px; padding: 8px 10px; text-align: left;
  border: 1px solid #2c4a2c; border-radius: 3px; background: rgba(40,70,40,.18); }
.gfruit .gf-n { font-size: 12px; color: #c8ecc0; }
.gfruit .gf-n b { font-family: var(--num); font-size: 15px; color: #e8ffd8; }
.gfruit .gf-t { grid-column: 1; font-size: 10px; color: var(--dim); }
.gfruit .mini { grid-row: 1 / span 2; grid-column: 2; }
.gaction { display: flex; flex-direction: column; gap: 9px; }
.gitems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.gitem { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line2); border-radius: 3px; background: var(--bg2); }
.gitem .gi-pic svg { width: 30px; height: 30px; }
.gitem .gi-n { font-size: 10.5px; color: var(--text); }
.gitem .gi-q { font-size: 10px; color: var(--dim); font-family: var(--num); }
.gitem.on { border-color: var(--gold-hi); background: #3a2d14; box-shadow: 0 0 10px rgba(232,199,90,.25); }
.gitem:disabled { opacity: .4; }
.gprobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 5px; }
.gp { padding: 6px 4px; border: 1px solid var(--line); border-radius: 3px; text-align: center; background: var(--bg1); }
.gp span { display: block; font-size: 10px; color: var(--dim); }
.gp b { font-family: var(--num); font-size: 14px; font-weight: 400; }
.gp.ok b { color: var(--s); } .gp.keep b { color: var(--k); } .gp.down b { color: var(--d); } .gp.bad b { color: var(--x); }
.sub.center { justify-content: center; text-align: center; font-size: 10px; color: var(--dimmer); }
.gstore { display: flex; flex-wrap: wrap; gap: 8px; }
.gs-i { display: flex; flex-direction: column; align-items: center; width: 64px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg2); }
.gs-i svg { width: 28px; height: 28px; }
.gs-i b { font-family: var(--num); font-size: 13px; color: var(--text); font-weight: 400; }
.gs-i small { font-size: 9px; color: var(--dim); text-align: center; line-height: 1.2; }
.gdim { font-size: 11px; color: var(--dimmer); }
#guildSeg button { position: relative; }
.gbadge { display: inline-block; min-width: 15px; margin-left: 2px; padding: 0 4px; border-radius: 8px; background: #c0392b; color: #fff; font-style: normal; font-size: 9px; line-height: 15px; }
.grole { margin-left: 4px; padding: 0 5px; border-radius: 2px; font-size: 9px; color: #1a1309; background: var(--gold); }
.grole.officer { background: #8fa3b5; }
.gcontrib { font-family: var(--num); font-size: 15px; color: var(--gold-hi); font-weight: 400; }
.gmem .sub .on-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #5ad16a; }
.gapp { display: flex; gap: 6px; }
.gbtns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.gbtns.col { flex-direction: column; align-items: stretch; }
.gbtns.col .mini { padding: 9px 10px; font-size: 12px; }
.seg.small.inline { padding: 0; }
.list.tight { padding: 0; gap: 6px; }
.gdist.sel { border-color: var(--gold); }
.sp-pic svg { width: 46px; height: 46px; }
.gcs .sub { flex-wrap: wrap; }
.glog { display: grid; grid-template-columns: 74px 1fr; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.glog .gl-t { font-size: 10px; color: var(--dimmer); font-family: var(--num); }
.glog .gl-b { color: var(--dim); line-height: 1.5; }
.glog .gl-b b { color: var(--text); font-weight: 400; }
.glog.enhance.success .gl-b { color: #e8d48a; }
.glog.enhance.destroyed .gl-b { color: #e08a7a; }
.glog.distribute .gl-b, .glog.harvest .gl-b { color: #b8e0a8; }
.eslot .bw-tag { position: absolute; left: 4px; right: 4px; bottom: 2px; font-style: normal; font-size: 8.5px; color: #a8e6a0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eslot.borrowed { border-color: #3c7a43 !important; }
.spare-tag.consign-tag { left: 6px; right: auto; background: #24402a; color: #b8e8b0; }
.seed-row .pic svg { width: 40px; height: 40px; }
.guild-make { border-color: var(--gold) !important; }
#guildBody .note, #shopGuild .note { padding: 10px 12px; background: var(--bg2); border-left: 2px solid #8a6f3a; font-size: 11px; color: var(--dim); line-height: 1.7; }
#guildBody .list > .note:first-child { margin-top: 4px; }
#guildQ, #gName, #gDesc, #gRename, #gDisband { text-align: left; font-size: 14px; font-family: var(--serif); letter-spacing: 0; }
.eslot .bw-tag { top: 4px; bottom: auto; }
.borrow-box { margin: 8px 0 2px; padding: 8px 10px; border: 1px dashed #3c7a43; border-radius: 5px; background: rgba(40,70,40,.12); }
.borrow-box .bb-head { font-size: 11px; color: #a8e6a0; }
.borrow-box .bb-head small { margin-left: 4px; font-size: 10px; color: var(--dim); }
.borrow-box .bb-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.borrow-box .sp svg { width: 44px; height: 44px; }
.borrow-box .bb-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.borrow-box .bb-mid small { font-size: 10px; color: var(--dim); }
.borrow-box .bb-mid .bb-warn { color: #e0a080; }
.borrow-box .bb-btns { display: flex; flex-direction: column; gap: 5px; }

/* ───────── 길드 화면 (상단 길드 버튼으로 들어가면 화면 전체가 바뀐다) ───────── */
.g-back, .plat-box, .gtabs { display: none !important; }
.gmode .avatar, .gmode #openGuild, .gmode #tabs { display: none !important; }
.gmode .g-back { display: flex !important; flex-direction: column; align-items: center; gap: 0; width: 38px; color: var(--gold-pale); flex: none; }
.gmode .g-back small { font-size: 9px; color: var(--dim); }
.gmode.g-in #goldBox { display: none; }
.gmode.g-in .plat-box { display: flex !important; }
.gmode.g-in .gtabs { display: flex !important; }
.plat-box b { color: #e6eef5; text-shadow: 0 0 10px rgba(180,205,230,.35); }
.plat-box small { margin-left: 2px; font-size: 10px; color: var(--dim); }
#platIcon { display: flex; }
.gtabs button { position: relative; }
.gtabs .gtab-dot { position: absolute; top: 5px; left: calc(50% + 7px); width: 7px; height: 7px; border-radius: 50%; background: var(--x); box-shadow: 0 0 0 2px #15120f; }
.gtabs button.center .orb { background: radial-gradient(circle at 40% 35%, #2f4a2a, #142010 75%); border-color: #5f9a58; }
.gtabs button.center .orb.ripe { box-shadow: 0 0 0 2px rgba(150,230,140,.35), 0 0 18px rgba(150,230,140,.45); }
.gtabs button.center.on { color: #b8ecae; }

#guildBody { display: flex; flex-direction: column; flex: 1 0 auto; }
#guildBody > * { flex-shrink: 0; }
/* 씨앗·세계수: 제련 화면과 같은 배치 (이름표 → 그림 → 확률 → 아이템 칸 → 비용·버튼) */
#guildBody.gpage-seed { flex: 1 0 auto; }
.gpage-seed .frame { flex: 1 1 0; min-height: 130px; --glow: rgba(110,170,90,.24);
  background: radial-gradient(60% 55% at 50% 55%, var(--glow) 0%, rgba(20,16,13,0) 70%), radial-gradient(90% 50% at 50% 100%, rgba(40,70,35,.35), transparent 70%); }
.gpage-seed .gt-art { position: absolute; inset: 8px; display: flex; align-items: center; justify-content: center; }
.gpage-seed .gt-art .gtree { width: auto; height: min(230px, 100%); max-width: 100%; aspect-ratio: 1; }
.g-info { cursor: pointer; color: var(--gold-pale); border-color: #6b5318; background: rgba(60,45,15,.25); letter-spacing: .3px; }
.g-kind { margin-top: 8px; font-size: 19px; letter-spacing: 1px; color: var(--text); }
.gpage-seed .gem-lv { color: #cfeec0; text-shadow: 0 0 18px rgba(140,220,120,.35); }
.g-fruit { position: absolute; z-index: 3; top: 10px; left: 10px; display: flex; align-items: center; gap: 5px; padding: 5px 9px 5px 6px;
  border: 1px solid #2c4a2c; border-radius: 14px; background: rgba(18,26,16,.85); font-size: 11px; color: #c8ecc0; }
.g-fruit b { font-family: var(--num); font-size: 13px; color: #e8ffd8; font-weight: 400; }
.g-fruit em { font-style: normal; margin-left: 2px; padding: 1px 6px; border-radius: 8px; background: #5f9a58; color: #10180e; font-size: 10px; }
.g-fruit.ripe { border-color: #6fbf64; box-shadow: 0 0 10px rgba(140,220,120,.3); }
.g-fruit:disabled { opacity: 1; }
.g-peak { position: absolute; z-index: 3; bottom: 10px; right: 12px; font-size: 10px; color: var(--dim); }
.g-sub { min-height: 18px; text-align: center; padding: 0 20px; }
.g-sub b { color: #cfeec0; font-family: var(--num); font-weight: 400; }
.g-warn { margin: 8px 20px 0; font-size: 10px; color: var(--dimmer); text-align: center; }
.gpage-seed .bottom { margin-top: 6px; }
.gpage-seed .probs { margin-top: 8px; }
/* 정보·보관함 */
.g-sum .pic { width: 64px; height: 64px; border-radius: 4px; background: radial-gradient(circle at 50% 70%, #1f2a18, #120f0c); overflow: hidden; }
.g-sum .pic .gtree { width: 64px; height: 64px; }
.g-menu .n { font-size: 14px; }
.g-store-row .right { display: flex; flex-direction: column; align-items: flex-end; }
.g-store-row .right small { font-size: 10px; color: var(--dim); }
.g-qty { font-family: var(--num); font-size: 18px; color: var(--text); font-weight: 400; }
.g-store-row.zero { opacity: .55; }
.gpage .title .cnt .amount.plat { display: inline-flex; vertical-align: middle; }

/* 씨앗·세계수 연출 */
.gpage-seed .gt-art .gtree { transform-origin: 50% 88%; }
.gt-art.g-charge .gtree { animation: gCharge .08s linear infinite; filter: brightness(1.25) drop-shadow(0 0 10px rgba(220,240,180,.5)); }
@keyframes gCharge { 0% { transform: translate(0, 0); } 25% { transform: translate(-1.5px, .5px); } 50% { transform: translate(1px, -1px); } 75% { transform: translate(1.5px, 1px); } }
.gt-art.g-pop .gtree { animation: gPop .8s cubic-bezier(.2,1.6,.4,1); }
@keyframes gPop { 0% { transform: scale(.88); filter: brightness(2.4); } 40% { transform: scale(1.12); filter: brightness(1.6) drop-shadow(0 0 24px rgba(200,255,160,.8)); } 100% { transform: none; filter: none; } }
.gt-art.g-wobble .gtree { animation: gWobble .55s; }
@keyframes gWobble { 25% { transform: rotate(-4deg); } 50% { transform: rotate(3deg); } 75% { transform: rotate(-1.5deg); } }
.gt-art.g-sink .gtree { animation: gSink .85s ease-out; }
@keyframes gSink { 15% { transform: translate(-5px, 4px) scale(.97); filter: brightness(.55) sepia(1) hue-rotate(-30deg) saturate(2.5); }
  35% { transform: translate(5px, 8px) scale(.96); } 60% { transform: translate(-2px, 6px) scale(.97); filter: brightness(.75) sepia(.5); } 100% { transform: none; filter: none; } }
.gt-art.g-fall .gtree { animation: gFall .9s cubic-bezier(.55,0,.8,.4) forwards; }
@keyframes gFall { 0% { transform: none; } 20% { transform: rotate(-3deg); filter: brightness(1.3); }
  100% { transform: translate(30px, 20px) rotate(78deg) scale(.9); opacity: 0; filter: grayscale(1) brightness(.4); } }
.gt-art.g-sprout .gtree { animation: gSprout 1.2s cubic-bezier(.2,1.3,.4,1); }
@keyframes gSprout { 0% { transform: scale(.25, .1); opacity: .2; filter: brightness(2.6) drop-shadow(0 0 30px rgba(180,255,150,.9)); }
  55% { transform: scale(1.06, 1.12); opacity: 1; filter: brightness(1.5) drop-shadow(0 0 22px rgba(180,255,150,.7)); } 100% { transform: none; filter: none; } }
.gt-art.g-emerge .gtree { animation: gEmerge .9s ease-out; }
@keyframes gEmerge { 0% { transform: scale(.6); opacity: 0; filter: brightness(1.8); } 100% { transform: none; opacity: 1; filter: none; } }
.gt-art.g-glow .gtree { animation: gGlow 1.2s ease-out; }
@keyframes gGlow { 0% { filter: brightness(1.5) drop-shadow(0 0 18px rgba(200,255,160,.7)); } 100% { filter: none; } }
html.softfx .gt-art.g-charge .gtree { animation-duration: .16s; }
.g-frame .flash { bottom: 10px; }

/* 길드 채팅 줄 (제련 화면의 채팅 줄 자리) */
.gmode .g-chat { display: flex !important; margin: 0 0 6px; }
.g-chat .open { color: #a8d8a0; }

/* 씨앗 화면을 한 화면에 (gfit1~3) */
.gpage-seed .gem-head { padding: 8px 20px 2px; }
.gpage-seed .probs { padding: 10px 14px; }
.gpage-seed .prow + .prow { margin-top: 5px; }
.gpage-seed .err { min-height: 14px; margin-bottom: 4px; }
.gpage-seed .cost-row { padding: 6px 2px; }
.gpage-seed .sale-row { margin-top: 6px; }
#app.gfit1 .gpage-seed .gem-lv { font-size: 36px; min-height: 38px; }
#app.gfit1 .gpage-seed .g-kind { font-size: 16px; margin-top: 4px; }
#app.gfit1 .gpage-seed .probs { padding: 7px 12px; margin-top: 6px; }
#app.gfit1 .gpage-seed .panel-head { margin-bottom: 4px; }
#app.gfit1 .gpage-seed .prow + .prow { margin-top: 3px; }
#app.gfit1 .gpage-seed .cost-row { padding: 3px 2px; }
#app.gfit1 .gpage-seed .big { padding: 11px 0; font-size: 16px; }
#app.gfit1 .gpage-seed .frame { min-height: 110px; }
#app.gfit1 .gpage-seed .g-warn { display: none; }
#app.gfit1 .view[data-view="guild"] { padding-bottom: 30px; }
#app.gfit2 .gpage-seed .tag.g-info { padding: 1px 8px; font-size: 9.5px; }
#app.gfit2 .gpage-seed .gem-head { padding-top: 4px; }
#app.gfit2 .gpage-seed .gem-lv { font-size: 30px; min-height: 32px; }
#app.gfit2 .gpage-seed .frame { min-height: 90px; }
#app.gfit2 .gpage-seed .g-chat { padding: 4px 10px; }
#app.gfit2 .gpage-seed .sale-row { margin-top: 3px; font-size: 10px; }
#app.gfit3 .gpage-seed .g-kind { display: none; }
#app.gfit3 .gpage-seed .prow .lbl { font-size: 11px; }
#app.gfit3 .gpage-seed .prow .new { font-size: 12px; }
#app.gfit3 .gpage-seed .big { padding: 9px 0; }
#app.gfit3 .gpage-seed .frame { min-height: 76px; }
#app.gfit3 .gpage-seed .probs { margin-top: 4px; padding: 5px 12px; }
#app.gfit3 .gpage-seed .err { min-height: 12px; margin-bottom: 2px; }
#app.gfit3 .gpage-seed .g-chat { margin-bottom: 4px; }
.chat-strip .ln.muted { color: var(--dim); }

/* 보석 수배: 이번 주기에 산 보석 */
.want-cell.got { opacity: .38; }
.want-cell.got .mg { color: var(--dim) !important; }
/* 길드 기여도 게이지 */
.g-gauge { margin: 8px 0 10px; }
.g-gauge .gg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--dim); }
.g-gauge .gg-top b { font-family: var(--num); font-weight: 400; font-size: 14px; color: var(--text); white-space: nowrap; }
.g-gauge .gg-top small { font-size: 10.5px; color: var(--dim); font-family: inherit; }
.g-gauge.main .gg-top b { font-size: 18px; color: #e6eef5; }
.gg-bar { position: relative; height: 8px; margin-top: 5px; border-radius: 5px; background: rgba(255,248,230,.06); border: 1px solid var(--line); overflow: hidden; }
.gg-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; transition: width .5s ease; }
.gg-bar.share i { background: linear-gradient(90deg, #8aa2b8, #e6eef5); box-shadow: 0 0 8px rgba(200,220,240,.4); }
.gg-bar.play i { background: linear-gradient(90deg, #4f8a48, #a8e09a); }
.gg-bar.open i { background: linear-gradient(90deg, #8a6a2a, #e8c75a); }
.g-gauge.full .gg-bar i { box-shadow: 0 0 10px rgba(232,199,90,.45); }
.g-gauge .gg-note { margin-top: 3px; font-size: 10px; color: var(--gold-pale); }
/* 위탁소 */
.g-lent { color: #a8d8a0; text-align: right; line-height: 1.3; }
.g-mine { color: var(--gold-pale); }
/* 길드 랭킹 */
.pod-tree .gtree { width: 44px; height: 44px; }
.rank-guild { font-size: 12px; color: #cfeec0; }
.rk-sub { margin-left: 6px; font-size: 10px; color: var(--dim); }


/* ───────── 12/01 UI·가시성·편의성 정밀 개선 ───────── */
.top { padding: calc(var(--sat) + 11px) 14px 9px; }
.top .gold {
  padding: 4px 10px 4px 8px;
  border-radius: 16px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: rgba(12, 10, 8, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.08);
}
.top .gold b { font-size: 15px; color: var(--gold-pale); }
html.land #openChatTop { display: none !important; }
.top-btns { gap: 3px; flex: none; }
.icon-btn { width: 38px; padding: 2px 0; border-radius: 6px; color: #cbbba0; gap: 2px; }
.icon-btn small { font-size: 9px; letter-spacing: 0.1px; }
.icon-btn .dot { top: 0; right: 6px; }
@media (max-width: 400px) {
  .top { padding: calc(var(--sat) + 10px) 10px 8px; }
  .top .gold { margin-left: 7px; padding: 3px 8px 3px 6px; }
  .top .gold b { font-size: 13.5px; white-space: nowrap; }
  .top-btns { gap: 1px; }
  .icon-btn { width: 33px; }
}
@media (max-width: 340px) {
  .top { padding: calc(var(--sat) + 8px) 6px 7px; }
  .avatar { width: 28px; height: 28px; }
  .top .gold { margin-left: 5px; padding: 2px 6px; gap: 4px; }
  .top .gold b { font-size: 12px; }
  .icon-btn { width: 29px; }
  .icon-btn small { font-size: 8px; }
}

.amount .unit { margin-left: 2px; font-family: var(--num); font-size: 0.88em; opacity: 0.88; }

.view { scrollbar-width: thin; scrollbar-color: #4a3a22 transparent; }
.view::-webkit-scrollbar { width: 5px; }
.view::-webkit-scrollbar-track { background: transparent; }
.view::-webkit-scrollbar-thumb { background: #4a3a22; border-radius: 3px; }

.frame .worn {
  background: rgba(12, 10, 8, 0.78);
  border-color: rgba(201, 162, 39, 0.45);
  padding: 3px 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}
.frame .slot { background: rgba(14, 12, 10, 0.78); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); }
.frame .slot:not(.add) {
  border: 1px solid rgba(232, 199, 90, 0.65);
  box-shadow: 0 0 12px rgba(232, 199, 90, 0.24), inset 0 0 8px rgba(232, 199, 90, 0.12);
}
.frame .slot.add {
  background: rgba(14, 12, 10, 0.65);
  border-color: color-mix(in srgb, var(--gc, #c9a227) 60%, #5a4726);
}
.frame .slot .q { font-size: 9.5px; text-shadow: 0 1px 3px #000; }
.frame .job-chip {
  background: rgba(16, 13, 10, 0.84);
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.view[data-view="forge"] .sale-row {
  height: 36px;
  margin: 8px 20px 0;
  padding: 0 10px 0 12px;
  border-radius: 5px;
  border: 1px solid rgba(74, 58, 34, 0.7);
  background: rgba(18, 14, 11, 0.72);
  justify-content: center;
  gap: 10px;
  font-size: 11.5px;
  color: #cbbba0;
  white-space: nowrap;
}
.sale-row b { font-size: 13px; color: var(--gold-pale); }
.lock-btn { padding: 5px 10px; font-size: 11px; }
.sell-btn { padding: 5px 14px; font-size: 11.5px; }

.probs { margin-top: 10px; padding: 11px 14px; }
.panel-head span { font-size: 11.5px; color: var(--gold-hi); }
.panel-head small { font-size: 10.5px; color: #cbbba0; }
.prow .lbl { width: 36px; font-size: 13px; color: #dfd2bc; }
.prow .track { height: 9px; border-radius: 3px; }
.prow .new { font-size: 14.5px; }

.chat-pill { display: none !important; }
.chat-strip {
  padding: 7px 11px;
  border-radius: 5px;
  border: 1px solid rgba(74, 58, 34, 0.8);
  background: rgba(14, 11, 9, 0.82);
  color: #cbbba0;
}
.chat-strip .open { color: var(--gold-hi); font-size: 10.5px; }
.auto-row { justify-content: flex-end; gap: 8px; }
.auto-btn { padding: 6px 13px; font-size: 11.5px; border-color: var(--gold); }

.seg { gap: 6px; padding: 12px 18px 10px; }
.seg button { padding: 6px 12px; border-radius: 4px; font-size: 12px; color: #c4b59b; }
.seg button.on { border-color: var(--gold); color: var(--gold-pale); }
.bag-tools .seg.small { gap: 4px; }
.bag-tools .seg.small button { padding: 5px 7px; font-size: 10.5px; white-space: nowrap; }
#bulkSell { white-space: nowrap; padding: 5px 8px; font-size: 10.5px; }

.row { padding: 12px 13px; gap: 12px; border-radius: 6px; }
.row .n { font-size: 14px; gap: 7px; }
.row .sub { margin-top: 4px; font-size: 11px; color: #c4b59b; line-height: 1.5; }
.row .right small { font-size: 10.5px; color: #c4b59b; }
.row.sel { box-shadow: 0 0 0 1px var(--gold-hi), 0 0 14px rgba(232, 199, 90, 0.25), 0 6px 14px rgba(0, 0, 0, 0.45); }
.grade { padding: 1px 7px; font-size: 10px; border-radius: 3px; }
.mini { padding: 5px 11px; border-radius: 4px; font-size: 11.5px; color: #dfd2bc; }
.codex .cell { padding: 11px 6px; border-radius: 6px; }
.codex .cell .cn { font-size: 13px; }
.codex .cell .cs { font-size: 10.5px; color: #c4b59b; }

.tabs button { color: #9e8f77; font-size: 10.5px; position: relative; }
.tabs button.on:not(.center)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24%;
  right: 24%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent);
  box-shadow: 0 0 8px var(--gold-hi);
}

/* ───────── 2026-12-02 대규모 업데이트 UI (전체 버프 칩 · 확성기 · 명예 채팅/프로필 · 명장 · 변경권) ───────── */
.buff-chip {
  position: absolute; top: calc(var(--sat) + 58px); left: 12px; z-index: 12;
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 14px;
  border: 1px solid #f0c451; background: linear-gradient(90deg, rgba(64,34,12,.94), rgba(88,30,36,.94));
  box-shadow: 0 3px 12px rgba(0,0,0,.55), 0 0 10px rgba(240,196,81,.3);
  color: #ffe8a3; font-size: 11px; font-weight: 700;
}
.buff-chip.small {
  border-color: #7eb366; background: linear-gradient(90deg, rgba(24,42,22,.94), rgba(34,58,30,.94));
  color: #d6f5c6; box-shadow: 0 3px 10px rgba(0,0,0,.45);
}
.buff-chip .bc-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.buff-chip .bc-tm { font-family: var(--num); color: #fff6d6; font-size: 11px; }

.mega-float {
  position: absolute; top: calc(var(--sat) + 88px); left: 12px; right: 12px; z-index: 15;
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px;
  border: 1px solid #d9913b; background: linear-gradient(90deg, rgba(53,27,17,.96), rgba(79,40,22,.96), rgba(53,27,17,.96));
  box-shadow: 0 5px 16px rgba(0,0,0,.62), 0 0 12px rgba(217,145,59,.24); font-size: 11px;
  pointer-events: auto; cursor: pointer; touch-action: pan-y; user-select: none;
  transition: transform .22s ease, opacity .22s ease;
}
.mega-float.dragging { transition: none; }
.mega-float .mb-ico { flex: none; color: #ffd67a; display: inline-flex; }
.mega-float .mb-tag { flex: none; padding: 1px 5px; border-radius: 3px; background: #a83718; color: #fff2d6; font-size: 9.5px; font-weight: 700; }
.mega-float .mb-txt { flex: 1; min-width: 0; color: #fff3da; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-float .mb-txt b { color: var(--gold-pale); margin-right: 4px; }
.mega-float .mb-tm { flex: none; font-family: var(--num); font-size: 10px; color: #e6c493; }

/* 전체 채팅창 내 확성기 메시지 전용 표시 */
.cm.mega { max-width: 92%; }
.cm.mega .bub.mega-bub {
  border: 1.5px solid #e09234;
  background: linear-gradient(115deg, rgba(168,55,24,.34) 0%, rgba(44,24,14,.96) 52%, rgba(216,154,54,.24) 100%);
  box-shadow: 0 0 14px rgba(224,146,52,.28), inset 0 1px 0 rgba(255,232,170,.16);
  color: #fff6e0;
}
.mega-chat-head { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 10px; font-weight: 700; color: #ffd479; }
.mega-chat-tag { padding: 1px 6px; border-radius: 3px; background: linear-gradient(180deg, #c94c24, #8c2a12); color: #fff4d6; font-size: 9px; letter-spacing: .3px; }
.chat-strip .mb-tag { display: inline-block; padding: 0 4px; margin-right: 4px; border-radius: 3px; background: #a83718; color: #fff2d6; font-size: 9.5px; font-weight: 700; vertical-align: 1px; }

/* 명예 배지 (기호 없음: 신예 · 명예 · 영예 · 찬사 · 신화) */
.hbadge { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 3px; font-size: 9.5px; font-weight: 700; line-height: 1.55; margin-right: 4px; }
.hbadge.lv1 { background: #3b2816; color: #e8b074; border: 1px solid #9c6f3e; }
.hbadge.lv2 { background: #222e3d; color: #d6e7fa; border: 1px solid #9db4cc; }
.hbadge.lv3 { background: #4a3712; color: #f6e09a; border: 1px solid #e8c75a; }
.hbadge.lv4 { background: #3b1e59; color: #ead4ff; border: 1px solid #c69bff; }
.hbadge.lv5 { background: linear-gradient(90deg, #8c3a14, #c98b1e, #8c3a14); color: #fff6d6; border: 1px solid #ffe28a; }

/* 채팅 명예 Lv.1~5 테두리·배경·연출 */
.cm.hlv-1 .bub { background: linear-gradient(90deg, rgba(168,116,68,.16), rgba(24,20,15,.92)); border: 1px solid #8a6239; border-left: 3px solid #cf9755; }
.cm.hlv-2 .bub { background: linear-gradient(100deg, rgba(180,202,224,.16) 0%, rgba(25,28,33,.94) 60%, rgba(160,184,210,.1) 100%); border: 1px solid #9db4cc; }
.cm.hlv-3 .bub { background: linear-gradient(110deg, rgba(201,162,39,.2) 0%, rgba(38,30,16,.95) 55%, rgba(232,199,90,.16) 100%); border: 1px solid #d9b24c; box-shadow: 0 0 10px rgba(201,162,39,.25); }
.cm.hlv-4 .bub { background: linear-gradient(120deg, rgba(138,84,214,.25) 0%, rgba(32,20,44,.95) 50%, rgba(201,162,39,.2) 100%); border: 1px solid #c69bff; box-shadow: 0 0 12px rgba(176,120,255,.35); }
.cm.hlv-5 .bub { background: linear-gradient(125deg, rgba(232,174,42,.3) 0%, rgba(56,22,18,.95) 48%, rgba(214,82,56,.26) 80%, rgba(255,222,120,.26) 100%); border: 1.5px solid #ffd86b; box-shadow: 0 0 16px rgba(255,204,77,.48); color: #fff8e6; }

/* 명예 레벨별 프로필 카드 (칭호 색을 한 톤 변형한 고급 배경·프레임) */
.prof-card { position: relative; padding: 15px 14px 14px; border-radius: 8px; border: 1px solid #4a3a22; background: linear-gradient(180deg, #241e18 0%, #16130f 100%); box-shadow: inset 0 1px 0 rgba(255,236,190,.08), 0 8px 20px rgba(0,0,0,.5); }
.prof-card.p-lv1 { border-color: #7c5938; background: radial-gradient(90% 60% at 15% 0%, rgba(160,104,54,.18), transparent 65%), linear-gradient(180deg, #231a13 0%, #14100c 100%); }
.prof-card.p-lv2 { border-color: #7a8fa6; background: radial-gradient(90% 60% at 85% 0%, rgba(138,168,198,.18), transparent 65%), linear-gradient(180deg, #1b222a 0%, #12161b 100%); }
.prof-card.p-lv3 { border-color: #b89442; background: radial-gradient(100% 70% at 50% 0%, rgba(214,174,82,.2), transparent 65%), linear-gradient(180deg, #282114 0%, #16120c 100%); box-shadow: inset 0 0 0 2px rgba(214,174,82,.14), 0 8px 22px rgba(0,0,0,.55); }
.prof-card.p-lv4 { border-color: #937bc2; background: radial-gradient(95% 65% at 20% 0%, rgba(102,88,186,.26), transparent 60%), radial-gradient(80% 55% at 90% 100%, rgba(196,154,84,.16), transparent 60%), linear-gradient(180deg, #1d1830 0%, #12101d 100%); box-shadow: 0 0 18px rgba(114,92,196,.25); }
.prof-card.p-lv5 { border: 1.5px solid #e0b454; background: radial-gradient(100% 65% at 50% 0%, rgba(194,78,56,.26), transparent 62%), radial-gradient(80% 55% at 15% 100%, rgba(224,180,84,.2), transparent 60%), linear-gradient(180deg, #2b1619 0%, #150d10 100%); box-shadow: inset 0 0 0 2px rgba(255,224,148,.16), 0 0 22px rgba(224,162,64,.3); }
.prof-top { display: flex; align-items: center; gap: 12px; }
.prof-av { width: 52px; height: 52px; border-radius: 50%; flex: none; border: 1.5px solid #c9a227; background: radial-gradient(circle at 38% 32%, #423217, #16120d); display: flex; align-items: center; justify-content: center; font-size: 20px; color: #f6e09a; }
.p-lv2 .prof-av { border-color: #9bb4cc; background: radial-gradient(circle at 38% 32%, #2c3846, #14191f); color: #dceafa; }
.p-lv4 .prof-av { border-color: #b89ee6; background: radial-gradient(circle at 38% 32%, #342854, #151122); color: #e9dcff; }
.p-lv5 .prof-av { border-color: #ffd86b; background: radial-gradient(circle at 38% 32%, #63271e, #1d0e0f); color: #ffe89e; }
.prof-meta { flex: 1; min-width: 0; }
.prof-nick-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prof-nick { font-size: 16px; font-weight: 700; color: #fff3d6; }
.prof-job { padding: 1px 7px; border-radius: 10px; border: 1px solid #6b5318; background: rgba(45,35,20,.85); font-size: 10.5px; color: var(--gold-pale); }
.prof-title-row { margin-top: 4px; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); }
.prof-honor-box { margin-top: 11px; padding: 9px 11px; border-radius: 6px; background: rgba(14,11,9,.62); border: 1px solid rgba(255,236,190,.14); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prof-honor-info-btn { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--gold); background: #2d2314; color: var(--gold-pale); font-family: var(--num); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.prof-nick-btn { display: inline-flex; align-items: flex-start; gap: 2px; padding: 0; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; transition: opacity .15s; }
.prof-nick-btn:active { opacity: .75; }
.prof-nick-btn .prof-nick { border-bottom: 1px solid rgba(232,199,90,.58); padding-bottom: 1px; line-height: 1.25; }
.prof-pencil { width: 11px; height: 11px; flex: none; color: var(--gold-hi); opacity: .88; }
.prof-nick-btn .prof-pencil { margin-top: -1px; }
.prof-bio { margin-top: 10px; padding: 9px 11px; border-radius: 6px; background: rgba(12,10,9,.65); border: 1px solid rgba(255,236,190,.1); font-size: 12px; line-height: 1.5; color: var(--text); word-break: break-word; }
.prof-bio.editable { cursor: pointer; transition: border-color .15s, background .15s; }
.prof-bio.editable:hover, .prof-bio.editable:active { border-color: rgba(232,199,90,.5); background: rgba(26,21,16,.88); }
.prof-bio-lbl { font-size: 10px; color: var(--dimmer); margin-bottom: 3px; display: flex; justify-content: space-between; align-items: center; }
.prof-bio-lbl-left { display: inline-flex; align-items: center; gap: 4px; }
.prof-actions { margin-top: 11px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.prof-act-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 6px; border-radius: 6px; border: 1px solid rgba(255,236,190,.18); background: rgba(28,22,18,.82); color: var(--text); font-size: 11px; }
.prof-act-btn.accent { border-color: var(--gold); background: linear-gradient(180deg, rgba(68,50,22,.92), rgba(38,27,12,.92)); color: var(--gold-pale); }
.prof-act-btn:disabled, .prof-act-btn.accent:disabled { border-color: #4a4845; background: linear-gradient(180deg, rgba(56,54,52,.85), rgba(38,36,35,.88)); color: #84807b; box-shadow: none; filter: grayscale(1); opacity: .78; }
.prof-act-btn.danger { border-color: #e05a4b; background: linear-gradient(180deg, rgba(168,38,30,.94), rgba(102,20,16,.96)); color: #ffece8; box-shadow: 0 0 12px rgba(224,90,75,.28); }

/* 자기소개 확대 커스텀 팝업 */
.bio-modal-wrap { display: flex; flex-direction: column; gap: 10px; }
.bio-modal-card { position: relative; padding: 13px 13px 10px; border-radius: 8px; border: 1px solid var(--gold-dk); background: linear-gradient(180deg, rgba(28,22,16,.95), rgba(15,12,9,.96)); box-shadow: inset 0 1px 0 rgba(255,236,190,.08); }
.bio-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 11px; color: var(--dim); }
.bio-modal-ta { width: 100%; min-height: 122px; padding: 10px 11px; border-radius: 6px; border: 1px solid var(--line2); background: rgba(10,8,6,.85); color: var(--text); font-family: var(--serif); font-size: 13.5px; line-height: 1.65; resize: none; outline: none; word-break: break-word; }
.bio-modal-ta:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,39,.18); }
.bio-modal-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; font-size: 11px; color: var(--dimmer); }
.bio-modal-cnt { font-family: var(--num); color: var(--gold-pale); }
.bio-modal-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 2px; }
.bio-modal-btns .big { margin-top: 0; padding: 11px 0; font-size: 14px; }
.bio-modal-btns .btn-cancel { border: 1px solid var(--line2); border-radius: 4px; background: rgba(28,22,18,.9); color: var(--dim); font-size: 13px; padding: 11px 0; }

/* 닉네임 변경 쿨타임 · 변경권 상태 박스 */
.nick-status-box { margin-top: 10px; padding: 9px 11px; border-radius: 6px; border: 1px solid rgba(210,105,90,.42); background: rgba(66,26,22,.38); font-size: 11.5px; line-height: 1.55; color: #f3c4bc; display: flex; flex-direction: column; gap: 3px; }
.nick-status-box.ok { border-color: rgba(201,162,39,.42); background: rgba(58,44,18,.35); color: var(--gold-pale); }
.nick-status-box b { color: #fff; font-weight: 600; }

/* 명예 특권 모달 (확성기 · 소형/대형 전체 버프) 가독성·가시성 강화 */
.priv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 7px; border: 1px solid var(--line2); background: rgba(20,16,12,.92); font-size: 12px; }
.priv-top-gold { font-family: var(--num); font-size: 13px; font-weight: 700; color: var(--gold-hi); }
.priv-card { display: flex; flex-direction: column; gap: 9px; padding: 13px 13px 12px; border-radius: 8px; border: 1px solid var(--line2); background: linear-gradient(180deg, rgba(32,26,20,.96), rgba(18,14,11,.98)); box-shadow: inset 0 1px 0 rgba(255,236,190,.06); }
.priv-card.priv-mega { border-color: rgba(216,162,74,.55); background: radial-gradient(90% 60% at 0% 0%, rgba(216,154,54,.12), transparent 65%), linear-gradient(180deg, #251d14, #15110c); }
.priv-card.priv-small { border-color: rgba(114,176,102,.52); background: radial-gradient(90% 60% at 0% 0%, rgba(104,178,98,.13), transparent 65%), linear-gradient(180deg, #192218, #111510); }
.priv-card.priv-large { border-color: rgba(232,184,74,.65); background: radial-gradient(90% 60% at 0% 0%, rgba(216,96,60,.16), transparent 60%), radial-gradient(80% 55% at 100% 100%, rgba(232,184,74,.14), transparent 60%), linear-gradient(180deg, #281915, #150f0d); }
.priv-card.locked { opacity: .78; }
.priv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.priv-title { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #fff4da; }
.priv-dur { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: rgba(255,236,190,.1); color: var(--gold-pale); border: 1px solid rgba(255,236,190,.2); }
.priv-small .priv-dur { background: rgba(130,204,118,.14); color: #cdeec4; border-color: rgba(130,204,118,.32); }
.priv-badge { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; border: 1px solid rgba(255,236,190,.24); background: rgba(16,13,10,.78); color: var(--gold-pale); white-space: nowrap; }
.priv-badge.off { border-color: #4d4945; background: rgba(44,42,40,.85); color: #9c9791; }
.priv-desc { font-size: 11.5px; color: var(--dim); line-height: 1.5; }
.priv-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.priv-stat { display: flex; align-items: center; justify-content: space-between; padding: 6px 9px; border-radius: 5px; background: rgba(10,8,6,.62); border: 1px solid rgba(255,236,190,.1); font-size: 11.5px; color: var(--dim); }
.priv-stat b { font-family: var(--num); font-size: 12px; color: #ffe699; }
.priv-small .priv-stat b { color: #c7f0b4; }
.priv-mega-box { display: flex; flex-direction: column; gap: 6px; }
.priv-mega-in { width: 100%; min-height: 54px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line2); background: rgba(10,8,6,.82); color: var(--text); font-family: var(--serif); font-size: 13px; line-height: 1.5; resize: none; outline: none; }
.priv-mega-in:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,39,.18); }
.priv-mega-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dimmer); }
.priv-btn { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--gold); background: linear-gradient(180deg, #b88c28, #7d5b14); color: #fff8e2; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; box-shadow: inset 0 1px 0 rgba(255,244,200,.25); }
.priv-small .priv-btn { border-color: #7eb366; background: linear-gradient(180deg, #4b823c, #2f5725); color: #eefce8; }
.priv-large .priv-btn { border-color: #f0c451; background: linear-gradient(180deg, #c97f24, #8a381b); color: #fff6dc; }
.priv-btn .priv-cost { font-family: var(--num); font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.32); color: #ffe8a6; }
.priv-btn:disabled { border-color: #4f4c49 !important; background: linear-gradient(180deg, #3c3a38, #282625) !important; color: #8f8b85 !important; box-shadow: none !important; opacity: .88; }
.priv-btn:disabled .priv-cost { background: rgba(0,0,0,.22); color: #8a8680; }
/* 프로필 명예 상세 팝업: 현재 명예 레벨 카드 테마에 맞춰 동적 적용 */
.honor-pop { margin-top: 9px; padding: 9px 11px; border-radius: 6px; border: 1px solid #6b5318; background: rgba(24,20,15,.92); font-size: 11px; }
.honor-pop-title { color: var(--gold-pale); }
.honor-pop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; text-align: center; }
.honor-pop-grid > div { background: rgba(14,11,9,.78); border: 1px solid rgba(255,236,190,.16); border-radius: 4px; padding: 4px 2px; }
.honor-pop-grid small { display: block; font-size: 9.5px; color: var(--dim); }
.honor-pop-grid b { font-family: var(--num); font-size: 11px; color: #ffe699; }
.p-lv1 .honor-pop { border-color: #8c643c; background: rgba(34,24,16,.92); }
.p-lv1 .honor-pop-title { color: #f0be88; }
.p-lv1 .honor-pop-grid > div { background: rgba(20,14,10,.78); border-color: rgba(160,108,60,.36); }
.p-lv1 .honor-pop-grid small { color: #cca886; }
.p-lv2 .honor-pop { border-color: #7e96b0; background: rgba(22,30,38,.92); }
.p-lv2 .honor-pop-title { color: #d6e7fa; }
.p-lv2 .honor-pop-grid > div { background: rgba(14,20,26,.78); border-color: rgba(138,168,198,.34); }
.p-lv2 .honor-pop-grid small { color: #9eb6ce; }
.p-lv3 .honor-pop { border-color: #c8a246; background: rgba(38,30,16,.92); }
.p-lv3 .honor-pop-title { color: #f6e09a; }
.p-lv3 .honor-pop-grid > div { background: rgba(22,17,10,.78); border-color: rgba(214,174,82,.35); }
.p-lv3 .honor-pop-grid small { color: #d2bc86; }
.p-lv4 .honor-pop { border-color: #937bc2; background: rgba(24,18,36,.92); }
.p-lv4 .honor-pop-title { color: #ead4ff; }
.p-lv4 .honor-pop-grid > div { background: rgba(12,10,18,.78); border-color: #3c2c4f; }
.p-lv4 .honor-pop-grid small { color: #b6a6c8; }
.p-lv5 .honor-pop { border-color: #e0b454; background: rgba(42,20,20,.93); }
.p-lv5 .honor-pop-title { color: #ffe89e; }
.p-lv5 .honor-pop-grid > div { background: rgba(24,12,12,.8); border-color: rgba(224,180,84,.38); }
.p-lv5 .honor-pop-grid small { color: #e2b8a8; }

/* 구조화 규칙 안내 카드 (줄글 대신 가독성 높은 항목별 정리) */
.rule-box { padding: 10px 12px; border-radius: 7px; border: 1px solid var(--line2); background: linear-gradient(180deg, rgba(28,22,16,.86), rgba(17,14,10,.9)); font-size: 11.5px; line-height: 1.55; color: var(--dim); }
.rule-box.warn { border-color: rgba(216,142,64,.45); background: linear-gradient(180deg, rgba(42,26,16,.88), rgba(24,15,10,.92)); }
.rule-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid rgba(255,236,190,.1); }
.rule-head b { font-size: 12px; color: var(--gold-pale); letter-spacing: .2px; }
.rule-pill { padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 600; background: rgba(201,162,39,.16); border: 1px solid rgba(201,162,39,.38); color: #ffe699; white-space: nowrap; }
.rule-pill.live { background: rgba(104,178,98,.2); border-color: #7eb366; color: #d4f5c6; }
.rule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.rule-list li { position: relative; padding-left: 11px; }
.rule-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); opacity: .75; }
.rule-list b { color: var(--text); font-weight: 600; }

/* 서버 경매 상세 입찰 모달 */
.sauc-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 12px; }
.sauc-hero .pic { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--gold-dk); background: radial-gradient(circle, rgba(201,162,39,.18), rgba(16,13,10,.9)); }
.sauc-hero .pic svg { width: 48px; height: 48px; }
.sauc-hero .nm { font-size: 17px; font-weight: 700; color: #fff4da; }
.sauc-pts { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--gold); background: rgba(201,162,39,.15); color: #ffe699; font-size: 11px; font-weight: 600; }

.step-chips { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.step-chip { padding: 1px 5px; border-radius: 2px; font-size: 9.5px; border: 1px solid var(--line2); background: var(--bg1); color: var(--dimmer); font-family: var(--num); white-space: nowrap; flex-shrink: 0; }
.step-chip.cur { border-color: var(--gold); background: #3a2d14; color: var(--gold-pale); font-weight: 700; }
.tag-pill { display: inline-block; padding: 1px 5px; border-radius: 2px; font-size: 9.5px; border: 1px solid var(--gold); background: #3a2d14; color: var(--gold-pale); white-space: nowrap; flex-shrink: 0; }
.tag-pill.red { border-color: #a85142; background: #3a201a; color: #f2a89b; }

/* ───────── 2026-12-03 패치 보완: 서버 경매 상단 공지 · 알림 점 · 세로화면 줄바꿈 방지 · 인챈트 자랑 ───────── */
.sauc-banner {
  position: relative; z-index: 16; flex: none;
  display: flex; align-items: stretch;
  background: linear-gradient(90deg, rgba(112,26,20,.96) 0%, rgba(154,54,22,.96) 48%, rgba(92,38,14,.96) 100%);
  border-bottom: 1px solid rgba(240,196,81,.55);
  box-shadow: 0 4px 14px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,232,168,.2);
}
.sauc-banner[hidden] { display: none; }
.sauc-banner-go {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px;
  padding: 7px 6px 7px 12px; color: #fff6df; font-size: 11.5px; text-align: left;
}
.sauc-live {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(210,56,42,.92); border: 1px solid #ff9c8e;
  color: #fff; font-family: var(--num); font-size: 9.5px; font-weight: 700; letter-spacing: .5px; white-space: nowrap;
}
.sauc-live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px #fff; animation: saucPulse 1.3s ease-in-out infinite;
}
@keyframes saucPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.sauc-banner-txt {
  flex: 1; min-width: 0; font-weight: 700; color: #fff5d8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sauc-banner-tm {
  flex: none; font-family: var(--num); font-size: 11px; font-weight: 700; color: #ffe18c; white-space: nowrap;
}
.sauc-banner-cta {
  flex: none; padding: 2px 7px; border-radius: 999px;
  background: rgba(255,234,172,.16); border: 1px solid rgba(255,224,136,.45);
  color: #fff2c2; font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.sauc-banner-x {
  flex: none; width: 32px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,236,196,.72); font-size: 16px; line-height: 1;
}
.sauc-banner-x:hover, .sauc-banner-x:active { color: #fff; }
#app.has-sauc .buff-chip { top: calc(var(--sat) + 96px); }
#app.has-sauc .mega-float { top: calc(var(--sat) + 126px); }

/* 서버 경매 진행 중 빨간 원 알림 (.dot) — 하단 상점 · 경매장 · 서버 경매 */
.seg button { position: relative; white-space: nowrap; }
.tabs button .dot {
  position: absolute; top: 6px; right: calc(50% - 17px);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--x); box-shadow: 0 0 0 2px #16130f, 0 0 8px rgba(210,105,90,.75);
  pointer-events: none;
}
.seg button .dot {
  position: absolute; top: 3px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--x); box-shadow: 0 0 0 2px #1c1813, 0 0 8px rgba(210,105,90,.75);
  pointer-events: none;
}
#aucSubSeg { padding: 0 18px 10px; gap: 6px; }
#aucSubSeg button { flex: 1; padding: 7px 10px; font-size: 11.5px; white-space: nowrap; }
#shopSeg button { flex: 1; text-align: center; padding: 7px 8px; }
#mktFilter { flex-wrap: wrap; }
#mktFilter button { white-space: nowrap; }

/* 세로 화면 줄바꿈 깨짐 방지 (배지 · 등급 · 수치 · 버튼 · 상점 카드) */
.grade, .lv, .mine-tag, .craft-tag, .tier-tag, .rule-pill, .hbadge, .grole, .plus, .seller,
.sauc-pts, .buy button, .row .right .amount, .row .right .mult, .row .right small {
  white-space: nowrap; flex-shrink: 0;
}
.row .mid { min-width: 0; word-break: keep-all; overflow-wrap: break-word; }
.row .n { flex-wrap: wrap; row-gap: 2px; column-gap: 6px; word-break: keep-all; }
.row .sub { flex-wrap: wrap; row-gap: 2px; column-gap: 6px; word-break: keep-all; }
.row .right { flex-shrink: 0; white-space: nowrap; }
.rule-list, .note, .job-eff, .job-note { word-break: keep-all; overflow-wrap: break-word; }
.buy { gap: 5px; flex-wrap: nowrap; }
.buy .mini { padding: 4px 8px; font-size: 11px; white-space: nowrap; }

/* 세로(좁은) 화면: 다중 구매 버튼이 있는 상점 행은 가격·버튼을 하단 바로 내려 텍스트 공간 확보 */
html:not(.land) .shop-row:has(.buy button:nth-child(2)) {
  flex-wrap: wrap; row-gap: 8px;
}
html:not(.land) .shop-row:has(.buy button:nth-child(2)) .mid {
  flex: 1 1 calc(100% - 64px);
}
html:not(.land) .shop-row:has(.buy button:nth-child(2)) .right {
  flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 7px; border-top: 1px solid rgba(255,236,190,.07); text-align: left;
}
html:not(.land) .shop-row:has(.buy button:nth-child(2)) .right .buy { margin-top: 0; }
html:not(.land) .shop-row .pic { width: 44px; height: 44px; }
html:not(.land) .row { padding: 11px 11px; gap: 10px; }

/* 보관함 아이템 사용 버튼 정렬 */
.bag-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.bag-item-right .mini { padding: 3px 9px; font-size: 10.5px; }

/* 인챈트 보석 자랑하기 말풍선 */
.bub.brag.ench-brag {
  border-color: #9e4be0;
  background: linear-gradient(110deg, rgba(114,24,132,.34) 0%, rgba(28,14,34,.95) 55%, rgba(224,36,58,.2) 100%);
  box-shadow: 0 0 12px rgba(158,75,224,.28);
}
.bub.brag.ench-brag .bn { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.bub.brag.ench-brag .bs { color: #d5b4e8; }

/* ── 3D WebGL 아트 통합 (보석 82종 · 수상한 원석 · 가능성의 씨앗 · 세계수 · 정령 82종 · 메인 타이틀) ── */
img.gem-svg, canvas.gem-svg, img.gtree, canvas.gtree, img.sp-img, img.item-ico {
  display: block; object-fit: contain; user-select: none; -webkit-user-drag: none;
}
canvas.live-3d, canvas.tt-stone-3d {
  cursor: grab; touch-action: pan-y; max-width: 100%; max-height: 100%;
}
canvas.live-3d:active, canvas.tt-stone-3d:active { cursor: grabbing; }
.frame .gemwrap canvas.gem-svg, .frame .gemwrap img.gem-svg { width: 100%; height: 100%; }
#title .tt-stone canvas, #title .tt-stone img { width: 100%; height: 100%; display: block; object-fit: contain; }
.sp img.sp-img { width: 100%; height: 100%; }
.att .sp img.sp-img, .att img.gem-svg { width: 22px; height: 22px; flex: none; }
.dslot .sp img.sp-img { width: 52px !important; height: 52px !important; }
.row.card.deck-pop .pic img.sp-img { width: 56px; height: 56px; }
.bulk-pick .gi img.gem-svg { width: 28px; height: 28px; }
.evo-row .pic.sp img.sp-img, .aw-top .pic.sp img.sp-img { width: 100%; height: 100%; }
.me-head .pic img, .menu-row .pic img { width: 26px; height: 26px; }
.fr-row .pic img { width: 24px; height: 24px; }
.mine-cell img.gem-svg { width: 40px; height: 40px; }
.alch-box .pic img.gem-svg { width: 64px; height: 64px; animation: evoIn .7s cubic-bezier(.2,1.2,.3,1); }
.sp-pic img.sp-img { width: 46px; height: 46px; }
.seed-row .pic img { width: 40px; height: 40px; }
.borrow-box .sp img.sp-img { width: 44px; height: 44px; }
.sauc-hero .pic img { width: 48px; height: 48px; }
.qty-head .pic img { width: 40px; height: 40px; }
.dg-art img.gem-svg { width: 64px; height: 64px; }
img.gem-svg.ench-3d {
  filter: drop-shadow(0 0 6px rgba(176, 42, 162, .45));
}
