/* =========================================================
   MONSTER GUILD - 다크 판타지 UI (가로형 16:9 기준)
   ========================================================= */
:root {
  --bg: #0b090c;
  --line: #4a3a28;
  --gold: #d4a84a;
  --gold-hi: #f2d58e;
  --gold-dk: #7a5a26;
  --text: #eadfc8;
  --muted: #a3937a;
  --dim: #6e624f;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", "Times New Roman", serif;
  --sans: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: clamp(13px, calc(9px + 1.05vh), 18px); }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050405; color: var(--text); font-family: var(--sans); }
body { display: flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; -webkit-text-size-adjust: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(120,40,30,0.16), transparent 60%), repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 6px), #050405; }
img.px, .px-icon { image-rendering: pixelated; image-rendering: crisp-edges; }
button { font-family: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- 앱 틀 ---------- */
#app {
  position: relative; width: 100%; height: 100%; max-width: 1680px; max-height: 1000px;
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, #120e13 0%, #0b080b 100%);
  box-shadow: 0 0 0 1px #2a2018, 0 0 80px rgba(0,0,0,0.9);
  padding: var(--st) var(--sr) 0 var(--sl);
}
#screen { flex: 1; min-height: 0; position: relative; padding: 0.55rem 0.7rem 0.45rem; overflow: hidden; }
#screen.scr-hq { padding: 0; }

/* ---------- 하단 도크 ---------- */
#dock {
  flex: none; display: flex; align-items: center; gap: 0.6rem;
  padding: 0.3rem 0.7rem calc(0.3rem + var(--sb));
  background: linear-gradient(180deg, #221913 0%, #0e0a08 100%);
  border-top: 2px solid var(--gold-dk); box-shadow: 0 -2px 0 #000, 0 -6px 14px rgba(0,0,0,0.6); z-index: 5;
}
#dock .tabs { display: flex; gap: 0.25rem; flex: 1; max-width: 46rem; }
.tab { flex: 1; min-width: 3.4rem; height: 3.15rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 0.5rem; border: 1px solid transparent; background: none; color: var(--muted); font-size: 0.74rem; font-weight: 800; cursor: pointer; position: relative; }
.tab img { width: 1.75rem; height: 1.75rem; filter: grayscale(0.6) brightness(0.8); transition: filter .15s, transform .15s; }
.tab.on { color: var(--gold-hi); background: linear-gradient(180deg, rgba(212,168,74,0.2), rgba(212,168,74,0.04)); border-color: rgba(212,168,74,0.4); }
.tab.on img { filter: none; transform: scale(1.08); }
.tab:active img { transform: scale(0.9); }
.tab .dot { position: absolute; top: 0.25rem; right: 22%; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #e04a3a; box-shadow: 0 0 4px #ff4a3a; }
.dock-r { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }
.res { display: flex; align-items: center; gap: 0.2rem; background: rgba(0,0,0,0.5); border: 1px solid #3a2e22; border-radius: 1rem; padding: 0.15rem 0.6rem 0.15rem 0.25rem; white-space: nowrap; }
.res img { width: 1.4rem; height: 1.4rem; }
.res b { font-size: 0.88rem; color: var(--gold-hi); }
.icon-btn { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 0.5rem; border: 1px solid var(--gold-dk);
  background: linear-gradient(180deg, #3a2c20, #1e1610); cursor: pointer; padding: 0; flex: none; }
.icon-btn img { width: 1.5rem; height: 1.5rem; }
.icon-btn:active { transform: translateY(1px); filter: brightness(1.2); }

/* ---------- 2단 레이아웃 ---------- */
.split { display: flex; gap: 0.6rem; height: 100%; }
.pane { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0.55rem 0.6rem;
  background: linear-gradient(180deg, rgba(31,24,28,0.96) 0%, rgba(18,13,17,0.96) 100%);
  border: 1px solid #000; outline: 1px solid var(--line); outline-offset: -3px; border-radius: 0.45rem;
  box-shadow: inset 0 1px 0 rgba(255,220,160,0.06), 0 4px 10px rgba(0,0,0,0.5); }
.pane::before, .pane::after { content: ""; position: absolute; width: 0.5rem; height: 0.5rem; background: var(--gold); transform: rotate(45deg); top: -0.25rem; box-shadow: 0 0 0 1px #000; }
.pane::before { left: 0.7rem; } .pane::after { right: 0.7rem; }
.pane-l { flex: 0 0 41%; }
.pane-r { flex: 1; }
.split.wide-r .pane-l { flex-basis: 36%; }
.split.prep .pane-l { flex-basis: 50%; }
.pane-h { display: flex; align-items: center; gap: 0.5rem; margin: 0.1rem 0.1rem 0.45rem; flex: none; }
.pane-h h2 { margin: 0; font-family: var(--serif); font-size: 1.15rem; color: var(--gold-hi); letter-spacing: 1px; text-shadow: 0 2px 0 #000, 0 0 12px rgba(212,168,74,0.25); white-space: nowrap; }
.pane-h .sub { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.pane-b { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 2px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pane-b::-webkit-scrollbar { width: 5px; }
.pane-b::-webkit-scrollbar-thumb { background: #3a2e22; border-radius: 3px; }
.pane-f { flex: none; display: flex; gap: 0.6rem; align-items: center; padding-top: 0.45rem; margin-top: 0.3rem; border-top: 1px solid #2e2418; }
.card { background: rgba(0,0,0,0.32); border: 1px solid #2e2418; border-radius: 0.4rem; padding: 0.5rem 0.6rem; margin-bottom: 0.5rem; }
.sec-title { font-family: var(--serif); color: var(--gold); font-size: 0.9rem; margin: 0 0 0.35rem; display: flex; align-items: center; gap: 0.4rem; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-dk), transparent); }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.small { font-size: 0.78rem; }
.row { display: flex; align-items: center; gap: 0.45rem; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt6 { margin-top: 0.4rem; } .mt8 { margin-top: 0.5rem; } .mt12 { margin-top: 0.75rem; } .mb8 { margin-bottom: 0.5rem; }
.good { color: #7ed87e; } .bad { color: #ff7a6a; } .warn { color: #f0c060; }
.empty { text-align: center; padding: 1.5rem 0.6rem; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }

/* ---------- 버튼 ---------- */
.btn {
  min-height: 2.75rem; padding: 0.4rem 0.9rem; border-radius: 0.4rem; cursor: pointer;
  font-weight: 800; font-size: 0.92rem; color: #f4e6c8;
  border: 1px solid #000; outline: 1px solid #6a5030; outline-offset: -2px;
  background: linear-gradient(180deg, #4a3826 0%, #2e2216 50%, #22180f 100%);
  box-shadow: inset 0 1px 0 rgba(255,230,180,0.18), 0 3px 0 #000, 0 4px 8px rgba(0,0,0,0.5);
  text-shadow: 0 1px 0 #000; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; white-space: nowrap;
  transition: filter .1s, transform .05s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,230,180,0.1), 0 1px 0 #000; }
.btn.gold { color: #2a1a08; text-shadow: 0 1px 0 rgba(255,240,200,0.6); outline-color: #f6dc9a; background: linear-gradient(180deg, #f2d58e 0%, #d4a84a 45%, #a8782a 100%); }
.btn.red { outline-color: #d86a5a; background: linear-gradient(180deg, #8a2a24 0%, #5e1a16 55%, #3e0f0c 100%); }
.btn.blue { outline-color: #6a9ad8; background: linear-gradient(180deg, #2a4a7a 0%, #1a2e50 55%, #101c34 100%); }
.btn.sm { min-height: 2.35rem; padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.btn.big { min-height: 3.1rem; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn[disabled] { filter: grayscale(0.9) brightness(0.55); cursor: not-allowed; transform: none; }
.btn img { width: 1.35rem; height: 1.35rem; }

/* ---------- 탭 세그먼트 ---------- */
.seg { display: flex; gap: 3px; padding: 3px; background: #0a0709; border: 1px solid #3a2e22; border-radius: 0.5rem; margin-bottom: 0.45rem; flex: none; }
.seg button { flex: 1; min-height: 2.35rem; border: 0; border-radius: 0.35rem; background: none; color: var(--muted); font-weight: 800; font-size: 0.82rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.2rem; white-space: nowrap; padding: 0 0.25rem; }
.seg button.on { background: linear-gradient(180deg, #4a3826, #2a1e14); color: var(--gold-hi); box-shadow: inset 0 0 0 1px #6a5030; }
.seg button img { width: 1.15rem; height: 1.15rem; }

/* ---------- 바 ---------- */
.bar { position: relative; height: 0.75rem; background: #120a0a; border: 1px solid #000; outline: 1px solid #4a3a28; border-radius: 2px; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #ff6a5a, #9a1a1a); transition: width .15s; }
.bar > i::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 35%; background: rgba(255,255,255,0.25); }
.bar.exp > i { background: linear-gradient(180deg, #7ac8ff, #2a5aa8); }
.bar.gold > i, .bar.sg > i { background: linear-gradient(180deg, #ffe08a, #b0781a); }
.bar.thin { height: 0.4rem; }
.bar .lbl { position: absolute; inset: 0; font-size: 0.62rem; line-height: 0.75rem; text-align: center; color: #fff; font-weight: 800; text-shadow: 0 1px 1px #000; }

/* ---------- 등급 ---------- */
.g0 { color: #b8b2a6; } .g1 { color: #6ad078; } .g2 { color: #5aa8f8; } .g3 { color: #c47ef8; } .g4 { color: #ffb44a; }
.badge { display: inline-block; padding: 0 0.45rem; border-radius: 3px; font-size: 0.72rem; font-weight: 800; border: 1px solid currentColor; background: rgba(0,0,0,0.4); line-height: 1.25rem; }
.gframe0 { --gc: #6e6a62; } .gframe1 { --gc: #3a8a46; } .gframe2 { --gc: #2e6ab0; } .gframe3 { --gc: #8a4ac0; } .gframe4 { --gc: #d0881a; }
.portrait { position: relative; display: grid; place-items: center; border-radius: 0.4rem; overflow: hidden; flex: none; width: 3.5rem; height: 4rem;
  background: radial-gradient(circle at 50% 75%, rgba(255,255,255,0.08), transparent 70%), linear-gradient(180deg, #2a2024, #0e0a0c);
  border: 2px solid var(--gc, #555); box-shadow: inset 0 0 10px #000; }
.portrait img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.gframe3.portrait, .gframe3.hd-art { box-shadow: inset 0 0 10px #000, 0 0 8px rgba(196,126,248,0.45); }
.gframe4.portrait, .gframe4.hd-art { animation: legend 2.4s infinite; }
@keyframes legend { 50% { box-shadow: inset 0 0 10px #000, 0 0 14px rgba(255,180,74,0.75); } }

/* ---------- 길드 본부 ---------- */
.hq { position: absolute; inset: 0; overflow: hidden; }
.hq canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hq-fog { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,3,6,0.55) 0%, transparent 28%, transparent 72%, rgba(5,3,6,0.55) 100%), linear-gradient(0deg, rgba(5,3,6,0.6) 0%, transparent 25%); }
.hq-ui { position: absolute; inset: 0; display: flex; gap: 0.7rem; padding: 0.7rem 0.8rem; pointer-events: none; }
.hq-col { width: clamp(13rem, 29%, 21rem); display: flex; flex-direction: column; gap: 0.5rem; pointer-events: auto; overflow-y: auto; min-height: 0; }
.hq-mid { flex: 1; }
.glass { background: rgba(12,8,10,0.74); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); border: 1px solid rgba(212,168,74,0.45); border-radius: 0.5rem; padding: 0.5rem 0.6rem; box-shadow: 0 4px 14px rgba(0,0,0,0.6); }
.plate { display: flex; align-items: center; gap: 0.55rem; }
.plate b { display: block; font-family: var(--serif); color: var(--gold-hi); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate span { font-size: 0.66rem; color: var(--muted); letter-spacing: 2px; }
.crest { width: 2.6rem; height: 2.6rem; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #6a2020, #2a0c0c); border: 2px solid var(--gold); border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  box-shadow: inset 0 0 6px #000, 0 0 0 2px #000; font-family: var(--serif); font-weight: 900; color: var(--gold-hi); font-size: 1.05rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 0.5rem; }
.tile { display: flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0; }
.tile img { width: 1.55rem; height: 1.55rem; flex: none; }
.tile b { display: block; font-size: 0.92rem; color: var(--gold-hi); line-height: 1.1; }
.tile span { font-size: 0.66rem; color: var(--muted); }
.lbl { font-family: var(--serif); color: var(--gold); font-size: 0.82rem; margin-bottom: 0.3rem; }
.quest-card .qthumb { width: 4.6rem; height: 3.3rem; }
.goal { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; padding: 0.22rem 0; border-bottom: 1px dashed rgba(90,70,40,0.5); }
.goal img { width: 1.1rem; height: 1.1rem; }

/* ---------- 헌터 ---------- */
.hunter-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.2rem, 1fr)); gap: 0.4rem; }
.hcard { display: flex; gap: 0.5rem; align-items: center; padding: 0.35rem; cursor: pointer; text-align: left; position: relative; min-height: 4.6rem;
  background: linear-gradient(180deg, #241b1f, #151014); border: 1px solid #000; outline: 1px solid #3a2e22; outline-offset: -2px; border-radius: 0.4rem; }
.hcard:active { filter: brightness(1.2); }
.hcard .nm { font-weight: 800; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard .cl { font-size: 0.72rem; color: var(--muted); }
.hcard .lvpw { display: flex; justify-content: space-between; font-size: 0.74rem; margin-top: 0.15rem; }
.hcard .lvpw b { color: var(--gold); }
.hcard.sel { outline: 2px solid var(--gold); background: linear-gradient(180deg, #3a2c1c, #1e160e); }
.hcard.inparty::after { content: attr(data-slot); position: absolute; top: 3px; right: 3px; font-size: 0.66rem; font-weight: 900; color: #2a1a08; background: var(--gold); padding: 0 0.3rem; border-radius: 3px; }
.trait { display: inline-block; font-size: 0.7rem; font-weight: 800; padding: 0 0.4rem; border-radius: 3px; border: 1px solid; line-height: 1.2rem; white-space: nowrap; }
.trait.good { color: #9fe09f; border-color: #3a6a3a; background: rgba(40,80,40,0.25); }
.trait.bad { color: #ff9a8a; border-color: #7a3a32; background: rgba(100,30,20,0.25); }
.trait.mixed { color: #f0d080; border-color: #6a5a2a; background: rgba(90,70,20,0.25); }
.trait-line { display: flex; gap: 0.4rem; align-items: flex-start; margin-bottom: 0.3rem; }
.hd-top { display: flex; gap: 0.75rem; }
.hd-art { position: relative; width: 8.5rem; height: 10rem; flex: none; border-radius: 0.5rem; overflow: hidden; border: 2px solid var(--gc, #555);
  background: radial-gradient(ellipse at 50% 85%, rgba(255,200,120,0.12), transparent 60%), linear-gradient(180deg, #2a2024, #0c090b); display: grid; place-items: center; }
.hd-art img { width: 92%; height: 92%; object-fit: contain; }
.hd-art .gtag { position: absolute; left: 0.3rem; top: 0.3rem; font-size: 0.68rem; font-weight: 900; background: rgba(0,0,0,0.65); padding: 0 0.35rem; border-radius: 3px; }
.hd-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 900; line-height: 1.2; }
.hd-lv { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 0.2rem; }
.hd-pow { color: var(--gold); font-weight: 800; font-size: 0.85rem; margin: 0.35rem 0 0.15rem; }
.hd-pow b { font-size: 1.05rem; color: var(--gold-hi); }
.hd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.55rem; }
.hd-grid .card { margin: 0; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; }
.stat { display: flex; align-items: center; gap: 0.3rem; background: rgba(0,0,0,0.35); border: 1px solid #2e2418; border-radius: 4px; padding: 0.2rem 0.4rem; font-size: 0.74rem; }
.stat img { width: 1.2rem; height: 1.2rem; }
.stat b { margin-left: auto; color: var(--gold-hi); font-size: 0.85rem; white-space: nowrap; }
.stat .plus { color: #7ed87e; font-size: 0.66rem; font-style: normal; margin-left: 2px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem; }
.slot { min-height: 4.2rem; padding: 0.25rem 0.1rem; border-radius: 0.35rem; cursor: pointer; text-align: center; font-size: 0.68rem; color: var(--muted);
  background: rgba(0,0,0,0.45); border: 1px dashed #4a3a28; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.slot.filled { border-style: solid; color: var(--text); }
.slot img { width: 1.9rem; height: 1.9rem; }
.slot .iname { font-size: 0.66rem; font-weight: 800; line-height: 1.15; }
.skill { display: flex; gap: 0.4rem; padding: 0.35rem 0.45rem; background: rgba(0,0,0,0.35); border: 1px solid #2e2418; border-radius: 4px; margin-bottom: 0.3rem; font-size: 0.85rem; }
.skill b { color: var(--gold-hi); }
.skill.locked { opacity: 0.5; }
.skill .lv { font-size: 0.68rem; color: var(--muted); white-space: nowrap; }

/* ---------- 모집 ---------- */
.banner-card { position: relative; display: flex; gap: 0.6rem; align-items: center; overflow: hidden; border-radius: 0.5rem; padding: 0.55rem; margin-bottom: 0.55rem;
  border: 1px solid #000; outline: 1px solid var(--gold-dk); outline-offset: -3px;
  background: radial-gradient(ellipse at 15% 60%, rgba(212,168,74,0.18), transparent 55%), linear-gradient(135deg, #2a1c18 0%, #140e10 100%); }
.banner-card.elite { background: radial-gradient(ellipse at 15% 60%, rgba(180,110,232,0.25), transparent 55%), linear-gradient(135deg, #2a1830 0%, #120c16 100%); outline-color: #7a4aa0; }
.banner-card .arts { position: relative; width: 6.5rem; height: 5.6rem; flex: none; }
.banner-card .arts img { position: absolute; bottom: 0; height: 5.2rem; }
.banner-card .arts img:first-child { left: 0; } .banner-card .arts img:last-child { right: 0; height: 4.6rem; filter: brightness(0.75); z-index: -0; }
.banner-card .arts img:first-child { z-index: 1; }
.banner-card h3 { margin: 0; font-family: var(--serif); font-size: 1.1rem; color: var(--gold-hi); }
.bc-body { flex: 1; min-width: 0; }
.rates { display: flex; gap: 3px; flex-wrap: wrap; margin: 0.35rem 0; font-size: 0.7rem; }
.rates span { padding: 0 0.35rem; background: rgba(0,0,0,0.45); border-radius: 3px; }
.cls-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.3rem; margin-bottom: 0.45rem; flex: none; }
.cls-tabs button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 0.2rem 0; border-radius: 0.35rem; background: rgba(0,0,0,0.4); border: 1px solid #3a2e22; color: var(--muted); font-size: 0.7rem; font-weight: 800; cursor: pointer; }
.cls-tabs button img { height: 2.6rem; width: 100%; object-fit: contain; }
.cls-tabs button.on { border-color: var(--gold); color: var(--gold-hi); background: rgba(212,168,74,0.12); }
.codex { display: flex; gap: 0.75rem; }
.codex-art { width: 10rem; height: 12rem; flex: none; display: grid; place-items: center; border-radius: 0.5rem; border: 1px solid #4a3a28;
  background: radial-gradient(ellipse at 50% 85%, rgba(255,200,120,0.14), transparent 60%), linear-gradient(180deg, #241c20, #0c090b); }
.codex-art img { max-width: 92%; max-height: 92%; }
.cbar { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; color: var(--muted); margin-bottom: 0.2rem; }
.cbar > span { width: 2rem; }
.reveal { display: flex; gap: 1rem; align-items: center; }
.reveal-art { position: relative; width: 11rem; height: 13rem; flex: none; overflow: hidden; border-radius: 0.6rem; border: 2px solid var(--gc); display: grid; place-items: center; background: #0c090b; }
.reveal-art img { position: relative; z-index: 1; max-width: 90%; max-height: 90%; animation: rise .5s ease-out; }
.reveal-art .rays { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, transparent 0 10deg, var(--rc) 10deg 18deg); opacity: 0.3; animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { transform: translateY(20px) scale(0.7); opacity: 0; } }

/* ---------- 의뢰 ---------- */
.qrow { display: flex; gap: 0.55rem; align-items: center; width: 100%; text-align: left; padding: 0.4rem; margin-bottom: 0.4rem; cursor: pointer; border-radius: 0.4rem;
  background: linear-gradient(180deg, #d4bd92, #bea06c); color: #2a1a0c; border: 1px solid #3a2410; box-shadow: inset 0 0 14px rgba(90,50,10,0.5), 0 2px 0 #000; }
.qrow .nm { font-family: var(--serif); font-weight: 900; font-size: 0.95rem; }
.qrow .muted { color: #6a4a2a; } .qrow .good { color: #1e6a1e; } .qrow .bad { color: #9a1a10; } .qrow .warn { color: #8a5a00; font-weight: 800; }
.qrow.sel { outline: 3px solid var(--gold-hi); outline-offset: 1px; }
.qrow.boss { background: radial-gradient(ellipse at 80% 0%, rgba(160,20,10,0.3), transparent 60%), linear-gradient(180deg, #d0aa84, #b08256); }
.qrow.locked { filter: grayscale(0.85) brightness(0.55); }
.qrow .small img { width: 1rem; height: 1rem; vertical-align: -3px; }
.qthumb { width: 5.2rem; height: 3.7rem; flex: none; display: grid; place-items: center; background: radial-gradient(circle, rgba(40,15,8,0.45), transparent 70%); border-radius: 0.3rem; }
.qthumb img { max-width: 100%; max-height: 3.6rem; object-fit: contain; }
.quest-card .qthumb img { max-height: 3.2rem; }
img.mon.art { image-rendering: auto; }
img.mon.px { image-rendering: pixelated; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars img { width: 0.95rem; height: 0.95rem; } .stars img.off { opacity: 0.2; }
.q-hero { display: flex; gap: 0.6rem; align-items: center; padding: 0.5rem; margin-bottom: 0.5rem; border-radius: 0.5rem; border: 1px solid #4a3a28; min-height: 9rem;
  background: radial-gradient(ellipse at 30% 80%, rgba(90,120,90,0.18), transparent 60%), linear-gradient(180deg, #1c2220 0%, #0c0e0d 100%); }
.q-hero.boss { background: radial-gradient(ellipse at 30% 80%, rgba(160,30,20,0.3), transparent 60%), linear-gradient(180deg, #221616 0%, #0e0909 100%); border-color: #7a2a1a; }
.q-hero.locked { justify-content: center; }
.q-art { width: 48%; height: 8.5rem; display: flex; align-items: flex-end; justify-content: center; gap: 1rem; }
.q-art img.mon { max-width: 100%; max-height: 100%; filter: drop-shadow(0 6px 6px rgba(0,0,0,0.7)); }
.q-art .sil { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 0.8rem; }
.q-art .sil img { width: 3.5rem; height: 3.5rem; opacity: 0.4; }
.q-info { flex: 1; min-width: 0; }
.elem { display: inline-block; padding: 0 0.4rem; border-radius: 3px; background: #1a1210; border: 1px solid #3a2e22; font-weight: 800; font-size: 0.74rem; line-height: 1.3rem; }
.reward-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.chip { display: inline-flex; align-items: center; gap: 0.15rem; padding: 0.05rem 0.45rem 0.05rem 0.15rem; border-radius: 1rem; background: rgba(0,0,0,0.4); border: 1px solid #3a2e22; font-size: 0.74rem; font-weight: 700; }
.chip img { width: 1.2rem; height: 1.2rem; }
.chip.hot { background: rgba(140,30,20,0.45); border-color: #8a3a2a; padding-left: 0.45rem; }
.boss-tag { display: inline-block; background: #7a1010; color: #ffd0b0; font-weight: 900; font-size: 0.64rem; padding: 0 0.35rem; border-radius: 2px; letter-spacing: 1px; margin-right: 0.3rem; vertical-align: 2px; font-family: var(--sans); }
.warnbox { font-size: 0.76rem; color: #f0c060; background: rgba(90,60,10,0.25); border: 1px solid #5a4418; border-radius: 4px; padding: 0.3rem 0.5rem; margin-top: 0.35rem; }
.warnbox img { width: 1rem; height: 1rem; vertical-align: -3px; }

/* ---------- 전투 준비 ---------- */
.field { display: grid; grid-template-columns: 1fr 1fr 0.95fr; gap: 0.45rem; padding: 0.5rem; margin-bottom: 0.5rem; border-radius: 0.5rem; border: 1px solid #3a4a3a;
  background: linear-gradient(180deg, rgba(20,26,24,0.9), rgba(10,12,10,0.95)), #0c0e0c; }
.col-title { font-size: 0.7rem; font-weight: 800; color: var(--muted); text-align: center; margin-bottom: 0.25rem; letter-spacing: 1px; }
.fslot { position: relative; width: 100%; height: 5.2rem; margin-bottom: 0.4rem; border-radius: 0.4rem; padding: 0.2rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); border: 1px dashed #5a4630; color: var(--muted); font-size: 0.74rem; overflow: hidden; }
.fslot.filled { border-style: solid; border-color: #6a5030; background: radial-gradient(ellipse at 50% 90%, rgba(255,200,120,0.12), transparent 70%), rgba(20,14,10,0.9); }
.fslot .fl { position: absolute; left: 0.25rem; top: 0.1rem; font-size: 0.6rem; color: var(--dim); font-weight: 800; }
.fslot .fart { height: 3.3rem; max-width: 90%; object-fit: contain; }
.fslot .fn { font-size: 0.72rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fslot .fp { font-size: 0.62rem; color: var(--gold); }
.fslot .x { position: absolute; top: 0; right: 0.25rem; color: #ff8a7a; font-weight: 900; font-size: 0.9rem; }
.fslot.target { outline: 2px solid var(--gold); animation: pulse 1s infinite; }
@keyframes pulse { 50% { outline-color: rgba(212,168,74,0.3); } }
.f-mon { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 0.3rem; }
.f-mon img { max-width: 100%; max-height: 9rem; filter: drop-shadow(0 6px 4px rgba(0,0,0,0.8)); }
.focus-opts { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.focus-opts button { flex: 1; min-width: 4rem; min-height: 2.35rem; border-radius: 0.35rem; border: 1px solid #4a3a28; background: rgba(0,0,0,0.4); color: var(--muted); font-weight: 800; cursor: pointer; font-size: 0.8rem; }
.focus-opts button.on { background: linear-gradient(180deg, #5a3a1a, #3a240e); color: var(--gold-hi); border-color: var(--gold); }
.power-box { flex: 1; display: flex; justify-content: space-around; gap: 0.5rem; padding: 0.25rem 0.5rem; border-radius: 0.4rem; background: rgba(0,0,0,0.5); border: 1px solid #3a2e22; }
.power-box > div { display: flex; flex-direction: column; align-items: center; }
.power-box b { font-family: var(--serif); font-size: 1.2rem; }
.pattern { font-size: 0.76rem; padding: 0.2rem 0; border-bottom: 1px dashed #2e2418; }
.pattern b { color: #ffb08a; }

/* ---------- 대장간 / 시설 ---------- */
.irow, .frow { display: flex; gap: 0.5rem; align-items: center; width: 100%; text-align: left; padding: 0.35rem 0.45rem; margin-bottom: 0.35rem; cursor: pointer; border-radius: 0.4rem; position: relative;
  background: linear-gradient(180deg, #221a1c, #141012); border: 1px solid #000; outline: 1px solid #3a2e22; outline-offset: -2px; }
.irow.sel, .frow.sel { outline: 2px solid var(--gold); background: linear-gradient(180deg, #3a2c1c, #1e160e); }
.irow.locked { opacity: 0.45; }
.irow .ic, .frow .ic { width: 2.6rem; height: 2.6rem; flex: none; display: grid; place-items: center; background: radial-gradient(circle, #3a2a1a, #120c0a); border: 1px solid #5a4428; border-radius: 0.35rem; }
.irow .ic img, .frow .ic img { width: 1.8rem; height: 1.8rem; }
.okdot { position: absolute; right: 0.5rem; top: 50%; width: 0.5rem; height: 0.5rem; margin-top: -0.25rem; border-radius: 50%; background: #6ad078; box-shadow: 0 0 5px #6ad078; }
.statline { font-size: 0.74rem; color: #c8e0c0; }
.item-hero { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.5rem; }
.ic.big { width: 5rem; height: 5rem; flex: none; display: grid; place-items: center; background: radial-gradient(circle, #3a2a1a, #0e0908); border: 1px solid var(--gold-dk); border-radius: 0.5rem; box-shadow: inset 0 0 12px #000; }
.ic.big img { width: 3.4rem; height: 3.4rem; }
.need { font-size: 0.78rem; display: inline-flex; align-items: center; gap: 2px; margin-right: 0.5rem; }
.need img { width: 1.15rem; height: 1.15rem; }
.need.lack { color: #ff7a6a; }
.item-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem; margin-bottom: 0.35rem; border-radius: 0.35rem; background: rgba(0,0,0,0.35); border: 1px solid #2e2418; cursor: pointer; }
.item-row img { width: 1.9rem; height: 1.9rem; }
.item-row.sel { border-color: var(--gold); background: rgba(212,168,74,0.12); }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: 0.35rem; }
.mat { display: flex; flex-direction: column; align-items: center; padding: 0.35rem 0.1rem; background: rgba(0,0,0,0.35); border: 1px solid #2e2418; border-radius: 0.35rem; font-size: 0.66rem; cursor: pointer; color: var(--muted); }
.mat img { width: 1.9rem; height: 1.9rem; }
.mat b { color: var(--gold-hi); font-size: 0.85rem; }
.mat.sel { border-color: var(--gold); background: rgba(212,168,74,0.12); }
.lvpips { display: flex; gap: 3px; margin: 0.2rem 0; }
.lvpips i { width: 0.85rem; height: 0.35rem; background: #2a2018; border: 1px solid #000; }
.lvpips i.on { background: linear-gradient(180deg, #ffe08a, #a87a2a); }
.eff { font-size: 0.8rem; color: #c8e0c0; margin-bottom: 0.15rem; }

/* ---------- 모달 ---------- */
#modal-root { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
.modal-back { position: absolute; inset: 0; background: rgba(4,2,4,0.78); display: flex; align-items: center; justify-content: center; padding: 0.7rem; pointer-events: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 34rem; max-height: 94%; overflow-y: auto; position: relative; animation: pop .18s ease-out;
  background: linear-gradient(180deg, #241b1e 0%, #141014 100%); border: 1px solid #000; outline: 2px solid var(--gold-dk); outline-offset: -4px; border-radius: 0.5rem; padding: 0.9rem 0.9rem 0.8rem;
  box-shadow: 0 0 0 1px #000, 0 20px 50px rgba(0,0,0,0.9); }
.modal.wide { max-width: 44rem; }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } }
.modal h3 { margin: 0 0 0.6rem; font-family: var(--serif); color: var(--gold-hi); font-size: 1.15rem; text-align: center; letter-spacing: 1px; }
.modal .close { position: absolute; top: 0.4rem; right: 0.4rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--gold-dk); background: #1a1210; color: var(--gold); font-size: 1.2rem; font-weight: 900; cursor: pointer; z-index: 2; }
.modal-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.modal-actions .btn { flex: 1; }
.result-title { font-family: var(--serif); font-size: 2rem; text-align: center; letter-spacing: 4px; margin: 0.1rem 0; }
.result-title.win { color: var(--gold-hi); text-shadow: 0 0 20px rgba(242,213,142,0.5), 0 2px 0 #000; }
.result-title.lose { color: #ff7a6a; text-shadow: 0 0 20px rgba(255,80,60,0.4), 0 2px 0 #000; }
.res-hunter { display: flex; gap: 0.5rem; align-items: center; padding: 0.3rem; background: rgba(0,0,0,0.35); border: 1px solid #2e2418; border-radius: 4px; margin-bottom: 0.3rem; }
.res-hunter .portrait { width: 2.6rem; height: 3rem; }
.lvup { color: #ffe08a; font-weight: 900; font-size: 0.75rem; animation: blink 0.8s 3; }
@keyframes blink { 50% { opacity: 0.3; } }
input.txt, textarea.txt { width: 100%; min-height: 2.75rem; padding: 0.4rem 0.6rem; border-radius: 5px; border: 1px solid var(--gold-dk); background: #0a0709; color: var(--text); font-size: 16px; font-family: inherit; }

/* ---------- 전투 ---------- */
#battle { position: absolute; inset: 0; z-index: 30; background: #000; display: flex; padding: var(--st) var(--sr) var(--sb) var(--sl); }
.b-stage { flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; background: #000; }
.b-stage canvas { display: block; }
.b-side { width: clamp(11.5rem, 23%, 17rem); flex: none; display: flex; flex-direction: column; gap: 0.4rem; padding: 0.45rem; background: linear-gradient(180deg, #17110f, #0b0809); border-left: 2px solid var(--gold-dk); }
.b-side .ctrl { display: flex; gap: 0.3rem; flex: none; }
.b-side .ctrl button { flex: 1; min-height: 2.5rem; border-radius: 0.35rem; border: 1px solid #000; outline: 1px solid #8a6a3a; outline-offset: -2px; background: linear-gradient(180deg, #3a2a1c, #1e150e); color: var(--gold-hi); font-weight: 900; font-size: 0.9rem; cursor: pointer; }
.b-side .ctrl button.on { background: linear-gradient(180deg, #f2d58e, #a8782a); color: #2a1a08; }
.b-side .ctrl button.retreat { outline-color: #a85a4a; color: #ffb0a0; }
.b-cards { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0.3rem; }
.bcard { display: flex; gap: 0.4rem; align-items: center; padding: 0.3rem; border-radius: 0.4rem; background: linear-gradient(180deg, #221a1c, #141012); border: 1px solid #000; outline: 1px solid #3a2e22; outline-offset: -2px; }
.bcard .portrait { width: 2.7rem; height: 3.1rem; }
.bcard .nm { font-size: 0.78rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard .st { font-size: 0.66rem; min-height: 0.9rem; }
.bcard .bar { margin-top: 2px; }
.bcard.dead > :not(.brev) { filter: grayscale(1) brightness(0.5); }
.blog { flex: none; font-size: 0.66rem; color: var(--muted); max-height: 4.5rem; overflow: hidden; }

/* ---------- 토스트 ---------- */
#toast-root { position: absolute; left: 0; right: 0; bottom: 4.6rem; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; pointer-events: none; z-index: 80; }
.toast { max-width: 80%; padding: 0.55rem 1rem; border-radius: 0.4rem; background: rgba(20,14,10,0.95); border: 1px solid var(--gold); color: var(--gold-hi); font-weight: 700; font-size: 0.85rem; box-shadow: 0 6px 20px rgba(0,0,0,0.8); animation: toast 2.4s forwards; text-align: center; }
.toast.err { border-color: #c04a3a; color: #ffb0a0; }
@keyframes toast { 0% { transform: translateY(10px); opacity: 0; } 8%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }

/* ---------- 부팅 / 회전 안내 ---------- */
#boot { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #070608; transition: opacity .6s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-title { font-family: var(--serif); font-size: 2.2rem; font-weight: 900; color: var(--gold-hi); letter-spacing: 6px; text-shadow: 0 0 24px rgba(212,168,74,0.45), 0 3px 0 #000; }
.boot-sub { font-family: var(--serif); color: #a83a32; letter-spacing: 8px; font-size: 0.85rem; margin-top: 4px; }
.boot-msg { color: var(--dim); margin-top: 1.4rem; font-size: 0.85rem; }
#rotate { display: none; position: fixed; inset: 0; z-index: 250; background: radial-gradient(ellipse at 50% 30%, rgba(120,40,30,0.25), transparent 60%), #070608;
  flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem; text-align: center; }
#rotate .phone { width: 46px; height: 78px; border: 3px solid var(--gold); border-radius: 9px; position: relative; animation: rot 2.2s ease-in-out infinite; }
#rotate .phone::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--gold-dk); }
@keyframes rot { 0%, 25% { transform: rotate(0deg); } 55%, 100% { transform: rotate(-90deg); } }
#rotate b { font-family: var(--serif); color: var(--gold-hi); font-size: 1.2rem; }
#rotate p { color: var(--muted); font-size: 0.9rem; margin: 0; line-height: 1.6; }
body.portrait-ok #rotate { display: none !important; }

/* ---------- 세로 화면으로 계속할 때 (보조 레이아웃) ---------- */
/* 세로 모드를 직접 고른 경우의 레이아웃 */
html.port { font-size: 14px; }
body.port #screen { overflow-y: auto; }
body.port .split { flex-direction: column; height: auto; }
body.port .pane { flex: none !important; }
body.port .pane-b { overflow: visible; }
body.port .hq-ui { flex-direction: column; }
body.port .hq-mid { display: none; }
body.port .hq-col { width: 100%; }
body.port .hd-grid { grid-template-columns: 1fr; }
body.port #battle { flex-direction: column; }
body.port .b-stage { flex: none; }
body.port .b-side { width: 100%; flex: 1; border-left: 0; border-top: 2px solid var(--gold-dk); }
body.port .b-side { flex: 1; }
body.port .b-cards { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: min-content; align-content: start; flex: none; }
body.port #dock { flex-wrap: wrap; row-gap: 0.25rem; }
body.port #dock .tabs { max-width: none; width: 100%; flex: none; }
body.port .dock-r { width: 100%; justify-content: flex-end; }
body.port .res.hide-sm { display: none; }
/* 작은 가로 화면 (아이폰 SE 등) */
@media (orientation: landscape) and (max-height: 400px) {
  .hd-grid { grid-template-columns: 1fr; }
  .hd-art { width: 7rem; height: 8.4rem; }
  .res.hide-sm { display: none; }
}
@media (max-width: 720px) and (orientation: landscape) {
  .tab span { font-size: 0.68rem; }
}

/* 모달 하단 버튼 고정 */
.modal .modal-actions { position: sticky; bottom: -0.8rem; margin: 0.75rem -0.9rem -0.8rem; padding: 0.55rem 0.9rem 0.7rem; background: linear-gradient(180deg, rgba(20,16,20,0.85), #141014 40%); z-index: 3; }
.res-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.4rem; }
.pane-f.foot-col { flex-direction: column; align-items: stretch; gap: 0.2rem; }

/* 일러스트 아이콘 */
img.px-icon.art { image-rendering: auto; object-fit: contain; }
.slot .empty-ic img { opacity: 0.25; filter: grayscale(1); }
.px-icon.xl { width: 4rem !important; height: 4rem !important; }
.ic.big img.px-icon { width: 3.9rem; height: 3.9rem; }
.tile img, .res img { filter: drop-shadow(0 1px 1px #000); }

/* 숙소 외관 / 승급 */
.fac-scene { width: 100%; aspect-ratio: 200 / 96; display: block; image-rendering: pixelated; border-radius: 0.4rem; border: 1px solid var(--gold-dk); margin-bottom: 0.5rem; background: #07080f; }
.promo-head { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.5rem; }
.portrait.big { width: 5.5rem; height: 6.4rem; }
.promo-arrow { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; color: var(--gold); font-weight: 900; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.15rem 0.6rem; margin-top: 0.35rem; }
.cmp { display: flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; }
.cmp span { color: var(--muted); width: 3.2rem; }
.cmp i { color: var(--dim); font-style: normal; }
.mat-hunters { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.4rem; }
.mh { display: flex; gap: 0.5rem; align-items: center; text-align: left; padding: 0.4rem; border-radius: 0.4rem; cursor: pointer; background: rgba(0,0,0,0.35); border: 1px solid #3a2e22; }
.mh.sel { border-color: #e05a4a; background: rgba(140,30,20,0.25); box-shadow: inset 0 0 0 1px #e05a4a; }
.mh .nm { font-weight: 800; font-size: 0.85rem; }
.confirm-mat { display: flex; gap: 0.6rem; align-items: center; justify-content: center; margin-bottom: 0.6rem; padding: 0.5rem; border: 1px solid #7a3a32; border-radius: 0.4rem; background: rgba(100,20,10,0.25); }

/* ---------- v0.5 온라인 / 친구 ---------- */
.net-on { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.7rem; color: #9ec8ff; font-weight: 700; }
.net-on img, .sec-title img, .sup-note img { width: 1.1rem; height: 1.1rem; vertical-align: middle; }
.fcode { font-family: var(--serif); font-size: 1.6rem; font-weight: 900; letter-spacing: 0.32em; color: var(--gold-hi); text-shadow: 0 0 10px rgba(212,168,74,0.35); }
.fcode.big { font-size: 1.9rem; margin: 0.4rem 0 0.6rem; user-select: text; -webkit-user-select: text; }
.me-card { background: linear-gradient(180deg, rgba(60,44,26,0.55), rgba(20,14,10,0.6)); border-color: #6a5030; }
.me-card .btn img { width: 1rem; height: 1rem; margin-right: 0.15rem; vertical-align: middle; }
.sup-row { align-items: center; gap: 0.5rem; }
.sup-row .portrait { width: 2.5rem; height: 2.9rem; }
.add-friend { gap: 0.35rem; margin: 0.2rem 0 0.4rem; }
.add-friend .txt, #tcode { flex: 1; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 800; }
textarea.txt { width: 100%; resize: vertical; font-size: 0.72rem; min-height: 3.6rem; user-select: text; -webkit-user-select: text; }
.friend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.35rem; }
.fcard { display: flex; gap: 0.45rem; align-items: center; padding: 0.3rem; text-align: left; cursor: pointer; border-radius: 0.4rem;
  background: linear-gradient(180deg, #221a1c, #141012); border: 1px solid #000; outline: 1px solid #3a2e22; outline-offset: -2px; }
.fcard .portrait { width: 2.6rem; height: 3rem; }
.fcard .portrait img { padding: 0.25rem; }
.fcard .nm { font-weight: 800; font-size: 0.82rem; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 8rem; }
.fcard.sel { outline: 2px solid var(--gold); background: linear-gradient(180deg, #3a2c1c, #1e160e); }
.empty-big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; min-height: 60%; padding: 2rem 1rem; text-align: center; color: var(--muted); line-height: 1.7; font-size: 0.85rem; }
.empty-big img { width: 3.4rem; height: 3.4rem; opacity: 0.8; image-rendering: pixelated; }
.fguild { position: relative; height: 8.5rem; border-radius: 0.5rem; overflow: hidden; border: 1px solid #6a5030; margin-bottom: 0.45rem; background: #0a0709; }
.fguild canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fg-name { position: absolute; left: 0.5rem; bottom: 0.45rem; display: flex; gap: 0.5rem; align-items: center; padding: 0.3rem 0.6rem 0.3rem 0.35rem; border-radius: 0.45rem;
  background: rgba(10,7,9,0.72); border: 1px solid rgba(212,168,74,0.5); }
.fg-name b { display: block; font-family: var(--serif); color: var(--gold-hi); font-size: 1.05rem; }
.fg-name span { font-size: 0.62rem; color: var(--muted); letter-spacing: 2px; }
.ftiles { grid-template-columns: repeat(3, 1fr); background: rgba(0,0,0,0.3); border: 1px solid #2e2418; border-radius: 0.4rem; padding: 0.35rem 0.5rem; margin-bottom: 0.45rem; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.35rem; }
.mini-h { display: flex; gap: 0.45rem; align-items: center; }
.mini-grid .mini-h { padding: 0.3rem; border-radius: 0.4rem; background: rgba(0,0,0,0.3); border: 1px solid #2e2418; }
.mini-h .portrait { width: 2.8rem; height: 3.2rem; }
.mini-h .nm { font-weight: 800; font-size: 0.84rem; }
.sup-card .mini-h .portrait { width: 3.4rem; height: 3.9rem; }
.seg.sub button { min-height: 1.9rem; font-size: 0.74rem; }
.rank-list { display: flex; flex-direction: column; gap: 0.25rem; }
.rrow { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.5rem 0.25rem 0.3rem; text-align: left; cursor: pointer; border-radius: 0.4rem;
  background: rgba(0,0,0,0.3); border: 1px solid #2e2418; }
.rrow .portrait { width: 2.2rem; height: 2.5rem; }
.rrow .rk { width: 1.8rem; text-align: center; font-family: var(--serif); font-weight: 900; font-size: 1rem; color: var(--muted); }
.rrow.top1 .rk { color: #ffd76a; font-size: 1.25rem; } .rrow.top2 .rk { color: #d8dce4; font-size: 1.15rem; } .rrow.top3 .rk { color: #d0905a; font-size: 1.1rem; }
.rrow .rv { font-family: var(--serif); font-weight: 900; color: var(--gold-hi); font-size: 1rem; }
.rrow.me { outline: 2px solid #5a9ad8; background: linear-gradient(180deg, rgba(40,70,110,0.45), rgba(10,14,22,0.6)); }
.rrow b { font-size: 0.86rem; }
.tag { font-size: 0.6rem; font-weight: 900; padding: 0 0.3rem; border-radius: 3px; background: #5a9ad8; color: #08121e; vertical-align: middle; }
.tag.fr { background: var(--gold); color: #2a1a08; }
.fsup { font-size: 0.56rem; font-weight: 900; padding: 0 0.25rem; border-radius: 3px; background: #5a9ad8; color: #08121e; }
.fslot .fsup { position: absolute; left: 0.25rem; bottom: 0.2rem; }
.hcard.sup { border-color: #3a5a80; }
.hcard.sup .owner { font-size: 0.64rem; color: #9ec8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard.used { opacity: 0.45; }
.bcard.sup { outline-color: #3a5a80; }
.sup-note { color: #9ec8ff; }
details summary { cursor: pointer; padding: 0.2rem 0; }

/* ---------- 기본 가로 모드: 세로로 든 휴대폰에서 화면을 돌려 가로로 표시 ---------- */
body.rot { display: block; }
body.rot #app {
  position: fixed; top: 0; left: 0; max-width: none; max-height: none;
  width: var(--lw); height: var(--lh);
  transform-origin: 0 0; transform: translateX(var(--lh)) rotate(90deg);
  /* 돌아간 화면 기준 안전 영역: 노치(위) → 왼쪽, 홈 막대(아래) → 오른쪽 */
  --sl: env(safe-area-inset-top, 0px); --sr: env(safe-area-inset-bottom, 0px); --st: 0px; --sb: 0px;
}
body.rot.sl .hd-grid { grid-template-columns: 1fr; }
body.rot.sl .hd-art { width: 7rem; height: 8.4rem; }
body.rot.sl .res.hide-sm { display: none; }
body.rot.nl .tab span { font-size: 0.68rem; }
.orient-opts { display: flex; gap: 0.35rem; }
.orient-opts .btn { flex: 1; }
.orient-opts .btn.on { outline: 2px solid var(--gold); color: var(--gold-hi); }

/* ---------- v0.8 가방 / 장착 표시 ---------- */
.seg.top button { min-height: 2.5rem; font-size: 0.86rem; color: var(--text); }
.seg.top button img { width: 1.35rem; height: 1.35rem; }
.wear { flex: none; display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.66rem; font-weight: 800; color: #ffd27a; padding: 0.1rem 0.4rem 0.1rem 0.1rem;
  border-radius: 1rem; background: rgba(212,168,74,0.14); border: 1px solid rgba(212,168,74,0.45); white-space: nowrap; max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; }
.wear img { width: 1.35rem; height: 1.35rem; object-fit: contain; border-radius: 50%; background: #1a1412; }
.wear.mine { color: #9fe89f; background: rgba(90,200,90,0.12); border-color: rgba(120,220,120,0.5); }
.wear.free { color: var(--muted); background: rgba(255,255,255,0.04); border-color: #3a2e22; padding: 0.15rem 0.45rem; }
.chk { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--muted); margin: 0 0 0.4rem 0.2rem; cursor: pointer; }
.chk input { width: 1.05rem; height: 1.05rem; accent-color: var(--gold); pointer-events: none; }
.bag-top { display: flex; gap: 0.7rem; align-items: center; padding: 0.5rem; border-radius: 0.5rem; background: rgba(0,0,0,0.3); border: 1px solid #2e2418; }
.px-icon.big { width: 4.2rem; height: 4.2rem; flex: none; }
.equip-to { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.35rem; }
.eq-h { display: flex; gap: 0.45rem; align-items: center; padding: 0.3rem; text-align: left; cursor: pointer; border-radius: 0.4rem;
  background: linear-gradient(180deg, #221a1c, #141012); border: 1px solid #000; outline: 1px solid #3a2e22; outline-offset: -2px; }
.eq-h .portrait { width: 2.4rem; height: 2.8rem; }
.eq-h.sel { outline-color: #5a9a5a; opacity: 0.85; }
.eq-h:active { filter: brightness(1.2); }
.btn.xs { min-height: 1.7rem; padding: 0 0.6rem; font-size: 0.7rem; margin-left: auto; }
.sec-title .btn.xs { flex: none; order: 3; margin-left: 0.2rem; }
.item-row .statline + .small span { margin-right: 0.35rem; }

/* ---------- v0.8 모집 ---------- */
.rc-btns { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.rc-btns .btn { flex-direction: column; line-height: 1.15; min-height: 2.6rem; padding: 0.25rem 0.55rem; font-size: 0.78rem; }
.rc-btns .btn small, .pick-box .btn small { display: block; font-size: 0.6rem; font-weight: 700; opacity: 0.85; }
.rc-btns .btn img, .pick-box .btn img { width: 1rem; height: 1rem; vertical-align: middle; }
.pity { position: relative; font-size: 0.7rem; color: #e0c8ff; margin: 0 0 0.35rem; padding: 0.1rem 0.4rem; border-radius: 3px; background: rgba(0,0,0,0.45); overflow: hidden; }
.pity b { color: #ffd27a; }
.pity i { position: absolute; left: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, #9a5ad8, #ffd27a); }
.pick-box { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 0.45rem;
  background: radial-gradient(ellipse at 10% 50%, rgba(90,140,230,0.18), transparent 60%), rgba(0,0,0,0.35); border: 1px solid #3a5a80; }
.pick-box b { color: var(--gold-hi); }
.multi-reveal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
.mr-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.35rem 0.2rem; border-radius: 0.4rem; cursor: pointer;
  background: linear-gradient(180deg, #221a1c, #141012); opacity: 0; transform: translateY(10px) scale(0.9); animation: mrIn .35s ease-out forwards; animation-delay: var(--d); }
.mr-card img { position: relative; height: 3.6rem; max-width: 100%; object-fit: contain; z-index: 1; }
.mr-card b { position: relative; font-size: 0.72rem; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mr-card span { position: relative; font-size: 0.6rem; color: var(--muted); z-index: 1; }
.mr-card .rays { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 20deg, var(--rc) 25deg, transparent 35deg 70deg, var(--rc) 80deg, transparent 90deg 140deg, var(--rc) 150deg, transparent 160deg 220deg, var(--rc) 230deg, transparent 240deg 300deg, var(--rc) 310deg, transparent 320deg);
  opacity: 0.35; animation: spin 6s linear infinite; }
@keyframes mrIn { to { opacity: 1; transform: none; } }

/* ---------- v0.9 상점 · 출석 · 일일 의뢰 ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: 0.4rem; }
.shop-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.5rem 0.3rem 0.4rem; border-radius: 0.45rem; cursor: pointer;
  background: linear-gradient(180deg, #2a2018, #16100c); border: 1px solid #000; outline: 1px solid #5a4430; outline-offset: -2px; }
.shop-card img { width: 2.6rem; height: 2.6rem; }
.shop-card b { font-size: 0.78rem; text-align: center; line-height: 1.2; }
.shop-card .price { font-size: 0.78rem; font-weight: 900; color: var(--gold-hi); display: inline-flex; align-items: center; gap: 0.15rem; }
.shop-card .price img { width: 1rem; height: 1rem; }
.shop-card .left { font-size: 0.62rem; color: var(--muted); }
.shop-card.sel { outline: 2px solid var(--gold); background: linear-gradient(180deg, #3a2c1c, #1e160e); }
.shop-card.sold { opacity: 0.4; }
.shop-card.rep { outline-color: #6a4a8a; background: linear-gradient(180deg, #2a1e30, #140e16); }
.bag-top img.big, .bag-top .px-icon.big { width: 4.2rem; height: 4.2rem; flex: none; }
.mh.seal { outline-color: #8a3030; }
.mh.seal img { width: 2.6rem; height: 2.6rem; }
.pick-box.hero { border-color: #8a5ab0; background: radial-gradient(ellipse at 10% 50%, rgba(180,110,232,0.25), transparent 60%), rgba(0,0,0,0.35); margin: 0 0 0.55rem; }
.pick-box.hero img { width: 2.4rem; height: 2.4rem; }
.mini-tabs { display: flex; gap: 0.2rem; margin-bottom: 0.35rem; }
.mini-tabs button { flex: 1; border: 0; background: rgba(255,255,255,0.05); color: var(--muted); font-weight: 800; font-size: 0.7rem; padding: 0.25rem 0.2rem; border-radius: 0.3rem; cursor: pointer; }
.mini-tabs button.on { background: rgba(212,168,74,0.2); color: var(--gold-hi); }
.dq { display: flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0; border-bottom: 1px dashed rgba(255,255,255,0.06); }
.dq-n { font-size: 0.74rem; font-weight: 700; }
.dq .bar { margin-top: 0.15rem; }
.dq.done .dq-n { color: var(--gold-hi); }
.dq.claimed { opacity: 0.5; }
.dq-rw .chip, .attend .chip, .dq + .small .chip { font-size: 0.6rem; padding: 0 0.3rem; }
.dq-rw .chip img, .attend .chip img { width: 0.9rem; height: 0.9rem; }
.attend-btn img { width: 1rem; height: 1rem; vertical-align: middle; }
.attend { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
.attend .ad { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.4rem 0.15rem; border-radius: 0.4rem; background: rgba(0,0,0,0.35); border: 1px solid #3a2e22; min-height: 5.2rem; }
.attend .ad .dn { font-size: 0.7rem; font-weight: 900; color: var(--muted); }
.attend .ad.today { border-color: var(--gold); background: rgba(212,168,74,0.15); box-shadow: 0 0 10px rgba(212,168,74,0.35); }
.attend .ad.today .dn { color: var(--gold-hi); }
.attend .ad.got { opacity: 0.45; }
.attend .ad i { position: absolute; inset: auto 0 0.25rem; text-align: center; font-style: normal; font-size: 0.62rem; color: #9fe89f; font-weight: 900; }
.bag-top .grow img { width: 1.1rem !important; height: 1.1rem !important; vertical-align: middle; }
.bag-top > img.big, .bag-top > .px-icon.big, .bag-top > img.px-icon.art.big { width: 4.2rem !important; height: 4.2rem !important; flex: none; }
.bag-top .wear img { width: 1.35rem !important; height: 1.35rem !important; }

/* ---------- v0.9 운영자 모드 · 이벤트 ---------- */
.op-badge { display: inline-block; font-size: 0.6rem; font-weight: 900; padding: 0.05rem 0.35rem; border-radius: 0.25rem; vertical-align: middle; letter-spacing: 0;
  background: linear-gradient(180deg, #8a2a2a, #561414); color: #ffd9c8; border: 1px solid #c0503a; font-family: var(--sans, inherit); }
.op-panel h3 .op-badge { font-size: 0.7rem; }
.op-tabs { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-bottom: 0.5rem; }
.op-tabs button { flex: 1 1 auto; border: 1px solid #3a2e22; background: rgba(0,0,0,0.35); color: var(--muted); font-weight: 800; font-size: 0.72rem; padding: 0.35rem 0.4rem; border-radius: 0.3rem; cursor: pointer; }
.op-tabs button.on { background: rgba(192,80,58,0.25); color: #ffd9c8; border-color: #c0503a; }
.op-body { max-height: 58vh; overflow-y: auto; padding-right: 0.2rem; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.35rem 0.5rem; }
.op-grid.mats { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); }
.op-f { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.68rem; color: var(--muted); font-weight: 700; }
.op-f.wide { grid-column: 1 / -1; }
.op-f .txt, .op-panel select.txt, .op-panel textarea.txt { width: 100%; padding: 0.35rem 0.45rem; font-size: 0.85rem; }
.op-panel textarea.txt { resize: vertical; font-family: inherit; }
.op-btns { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.op-panel .row .op-f { flex: 1; }
.op-panel code.uid { font-size: 0.7rem; word-break: break-all; background: rgba(0,0,0,0.4); padding: 0.3rem 0.4rem; border-radius: 0.3rem; color: var(--gold-hi); }
.op-panel code { background: rgba(0,0,0,0.4); padding: 0 0.25rem; border-radius: 0.2rem; }
.txt.pin { text-align: center; letter-spacing: 0.4rem; font-size: 1.2rem; }
.ml6 { margin-left: 0.4rem; }
.evt-banner { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.55rem; margin-top: 0.35rem; border-color: #c0503a !important;
  background: linear-gradient(90deg, rgba(160,50,30,0.55), rgba(40,14,10,0.6)) !important; animation: evtGlow 2.4s ease-in-out infinite; }
.evt-banner img { width: 1.4rem; height: 1.4rem; }
.evt-banner b { display: block; font-size: 0.8rem; color: #ffd9a8; }
.evt-banner span { font-size: 0.64rem; color: #f0c8a8; }
@keyframes evtGlow { 0%, 100% { box-shadow: 0 0 0 rgba(255,120,60,0); } 50% { box-shadow: 0 0 14px rgba(255,120,60,0.45); } }
.evt-tag { font-size: 0.6rem; background: #c0503a; color: #fff; padding: 0.05rem 0.3rem; border-radius: 0.2rem; vertical-align: middle; font-family: var(--sans, inherit); letter-spacing: 0; }
.evt-now { font-size: 0.75rem; }
.gift-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.4rem 0.2rem; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.gift-row b { color: var(--gold-hi); font-size: 0.82rem; }
.gift-row span { flex: 1; font-size: 0.74rem; color: #d8ccb4; }
.notice-body { line-height: 1.7; font-size: 0.86rem; color: #e8dcc4; white-space: normal; padding: 0.4rem 0.2rem; }
.rrow.op { outline-color: #8a3030 !important; }
.rrow.op .rk img { width: 1rem; height: 1rem; }
.hq .crest { cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }

/* ---------- v0.9.2 전직 ---------- */
.adv-row { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.45rem; padding: 0.4rem 0.5rem; border-radius: 0.45rem; background: rgba(0,0,0,0.3); border: 1px dashed #4a3e2c; }
.adv-row > img, .adv-row > .px-icon { width: 1.8rem; height: 1.8rem; flex: none; }
.adv-row b { font-size: 0.8rem; }
.adv-row.ready { border: 1px solid var(--gold); background: linear-gradient(90deg, rgba(212,168,74,0.22), rgba(0,0,0,0.3)); animation: evtGlow 2.4s ease-in-out infinite; }
.adv-row.ready b { color: var(--gold-hi); }
.adv-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.adv-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.6rem 0.5rem; border-radius: 0.6rem; cursor: pointer; text-align: center; color: inherit;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,216,106,0.12), transparent 60%), #17110d; border: 1px solid #000; outline: 1px solid #5a4430; outline-offset: -2px; }
.adv-card img { height: 7.5rem; max-width: 100%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)); }
.adv-card b { font-size: 1.05rem; color: var(--gold-hi); font-family: var(--serif); }
.adv-card ul { margin: 0.1rem 0; padding: 0; list-style: none; font-size: 0.68rem; color: #cfe8b8; line-height: 1.5; }
.adv-card .adv-k { position: absolute; top: 0.35rem; left: 0.4rem; font-size: 0.6rem; font-weight: 900; color: var(--muted); }
.adv-card.sel { outline: 2px solid var(--gold); box-shadow: 0 0 16px rgba(255,216,106,0.35); background: radial-gradient(ellipse at 50% 30%, rgba(255,216,106,0.25), transparent 65%), #221810; }
.portrait.adv { box-shadow: 0 0 0 1px #ffd86a, 0 0 8px rgba(255,216,106,0.5); }
.portrait.adv img, .hd-art.adv img, .reveal-art.adv img { image-rendering: pixelated; }
.hd-art { position: relative; }
.adv-tag { position: absolute; top: 0.25rem; left: 0.25rem; font-size: 0.6rem; font-weight: 900; padding: 0.05rem 0.3rem; border-radius: 0.2rem; background: linear-gradient(180deg, #ffe07a, #b8862a); color: #2a1a08; }
.badge.adv { border-color: #b8862a !important; color: #ffd86a !important; }
.adv-reveal { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; }
.adv-reveal .ar-art { position: relative; width: 10rem; height: 10rem; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 0.6rem;
  background: radial-gradient(circle at 50% 55%, rgba(255,216,106,0.35), transparent 65%), #120c08; border: 1px solid #b8862a; }
.adv-reveal .ar-art .rays { position: absolute; inset: -40%; background: repeating-conic-gradient(rgba(255,216,106,0.18) 0 10deg, transparent 10deg 20deg); animation: spin 12s linear infinite; }
.adv-reveal .ar-art img { position: relative; height: 90%; image-rendering: pixelated; filter: drop-shadow(0 0 10px rgba(255,216,106,0.6)); }
.adv-reveal .ar-name { font-size: 1.1rem; font-weight: 900; }
.adv-reveal .ar-sub { font-size: 0.9rem; color: #d8ccb4; }
.adv-reveal .ar-sub b { color: #ffd86a; font-size: 1.1rem; }
.adv-reveal .ar-bonus { color: #cfe8b8; }
.adv-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3rem; }
.adv-tiers > div { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; padding: 0.3rem; border-radius: 0.35rem; background: rgba(0,0,0,0.3); border: 1px solid #3a2e22; font-size: 0.66rem; color: var(--muted); }
.adv-tiers > div.on { border-color: var(--gold); background: rgba(212,168,74,0.14); color: #e8dcc4; }
.adv-tiers b { font-size: 0.78rem; }

/* ---------- v0.9.3 난이도 · 심연의 탑 ---------- */
.seg .tower-tab { color: #c8b4ff; }
.seg .tower-tab.on { background: linear-gradient(180deg, #4a3a7a, #241a40) !important; color: #e8deff !important; }
.dbadge { display: inline-block; font-size: 0.58rem; font-weight: 900; padding: 0 0.28rem; border-radius: 0.2rem; margin-left: 0.2rem; vertical-align: middle; }
.dbadge.hard { background: #6a3010; color: #ffcf9a; }
.dbadge.nm { background: #4a1a6a; color: #e8c0ff; }
.diff-seg { margin-bottom: 0.45rem; }
.diff-seg .d-hard.on { background: linear-gradient(180deg, #8a4010, #4a2008) !important; color: #ffd8b0 !important; }
.diff-seg .d-nightmare.on { background: linear-gradient(180deg, #6a2a9a, #34124e) !important; color: #f0d0ff !important; }
.q-hero.d-hard { box-shadow: inset 0 0 0 1px #c0602a, 0 0 14px rgba(255,140,60,0.25); }
.q-hero.d-nightmare { box-shadow: inset 0 0 0 1px #9a4ad0, 0 0 18px rgba(190,90,255,0.35); }
.q-hero.d-nightmare .q-art img, .q-hero.tower .q-art img { filter: drop-shadow(0 0 8px rgba(190,90,255,0.6)); }
.trow { display: flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.45rem; margin-bottom: 0.25rem; border-radius: 0.4rem; background: rgba(0,0,0,0.3); border: 1px solid #2e2440; }
.trow .tf { width: 2.4rem; font-weight: 900; color: #b49aff; text-align: center; font-size: 0.85rem; }
.trow .qthumb { width: 2.4rem; height: 2.4rem; }
.trow .nm { font-size: 0.78rem; font-weight: 800; }
.trow.done { opacity: 0.5; }
.trow.cur { border-color: #9a7aff; background: linear-gradient(90deg, rgba(120,80,220,0.3), rgba(0,0,0,0.3)); box-shadow: 0 0 10px rgba(150,110,255,0.3); }
.trow.up { opacity: 0.75; }
.trow.boss .tf { color: #ff8a6a; }
.seg.reg-seg { flex-wrap: wrap; }
.seg.reg-seg button { flex: 1 1 auto; min-height: 2rem; font-size: 0.76rem; padding: 0 0.45rem; }
.seg.reg-seg .tower-tab { flex-basis: 100%; min-height: 1.9rem; background: linear-gradient(90deg, rgba(90,60,160,0.35), rgba(40,24,70,0.35)); }
.trow .small img, .trow .small .px-icon { width: 0.95rem !important; height: 0.95rem !important; vertical-align: middle; }
.trow .qthumb img { max-height: 2.3rem; }

/* ---------- v0.9.5 본부: 출전 파티가 건물 앞을 걸어 다님 ---------- */
#hqparty { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; cursor: pointer; }
.hq .hq-ui { z-index: 2; }

/* ---------- v0.9.6 ---------- */
/* 본부 왼쪽 패널은 내용 높이만큼만 — 아래 빈 곳은 걸어 다니는 헌터를 누를 수 있게 */
.hq .hq-col:first-child { align-self: flex-start; max-height: 100%; }
.enh-rate { display: flex; align-items: baseline; gap: 0.4rem; margin: 0.45rem 0 0.2rem; }
.enh-rate span { font-size: 0.75rem; color: var(--muted); }
.enh-rate b { font-size: 1.35rem; font-weight: 900; }
.enh-rate small { font-size: 0.66rem; color: #9fe89f; }
.enh-opts { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.4rem; }
.enh-opts .btn { flex: 1 1 auto; font-size: 0.72rem; }
.enh-opts .btn img { width: 1rem; height: 1rem; vertical-align: middle; }
.enh-opts .btn.on { outline: 2px solid var(--gold); background: linear-gradient(180deg, #4a3826, #2a1e14); color: var(--gold-hi); }
.synth-in { padding: 0.2rem 0; border-bottom: 1px dashed rgba(255,255,255,0.08); font-size: 0.8rem; }
.shop-card.ex { outline-color: #3a6a8a; background: linear-gradient(180deg, #1a2630, #0e1418); }
.seg.top { flex-wrap: wrap; }
.lvpips i { flex: 0 1 0.85rem; min-width: 0.28rem; }

/* ---------- v0.9.8 ---------- */
.seg button.rel.on { background: linear-gradient(180deg, #6a2020, #3a1010); color: #ffd0c0; }
.hunter-list.rel-mode .hcard { opacity: 0.75; }
.hunter-list.rel-mode .hcard.rel-on { opacity: 1; outline: 2px solid #ff5a4a; background: linear-gradient(180deg, #3a1414, #1a0a0a); }
.hunter-list.rel-mode .hcard.rel-on::after { content: '✓'; position: absolute; right: 6px; top: 4px; color: #ff7a6a; font-weight: 900; }
.hunter-list.rel-mode .hcard { position: relative; }
.hunter-list.rel-mode .hcard.rel-lock { opacity: 0.35; }
.rel-names { line-height: 1.7; max-height: 7rem; overflow: auto; }
.auto-box { padding: 0.35rem; border: 1px dashed rgba(212,168,74,0.35); border-radius: 6px; }
.auto-chip.on { outline: 2px solid var(--gold); }
.rec-row { display: flex; gap: 0.5rem; align-items: center; padding: 0.4rem 0; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.rec-row .col { display: flex; flex-direction: column; }
.rec-code .fcode { font-size: 1.4rem; letter-spacing: 0.12em; }

/* ---------- v0.9.9 ---------- */
.bcard { position: relative; }
.brev { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); z-index: 3; font-size: 0.7rem; font-weight: 800; padding: 0.25rem 0.45rem;
  background: linear-gradient(180deg, #ffe08a, #b07a2a); color: #2a1a08; border: 1px solid #000; border-radius: 5px; animation: brevPulse 1s infinite; }
.brev img { width: 0.9rem; height: 0.9rem; vertical-align: middle; }
.brev.hidden { display: none; }
@keyframes brevPulse { 50% { filter: brightness(1.3); } }
.bcard.dead .brev { filter: none; opacity: 1; }
.qlist { max-height: 58vh; overflow: auto; }
.qmrow { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.2rem; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.qmrow .qgo { text-align: left; background: none; border: 0; color: inherit; padding: 0; min-width: 0; }
.qmrow .qgo .dq-n { font-size: 0.8rem; font-weight: 700; }
.qmrow .qgo .row { gap: 0.4rem; align-items: center; }
.qmrow .qrw { font-size: 0.7rem; white-space: nowrap; }
.qmrow .qbtn { min-width: 3rem; }
.qmrow.claimed { opacity: 0.5; }
.qmrow.done .dq-n { color: var(--gold-hi); }
.qdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4a3a; margin-left: 4px; vertical-align: top; }
.dq .grow[data-act] { cursor: pointer; }
.qmrow .qgo { background: transparent !important; box-shadow: none !important; border: 0 !important; color: var(--text, #e8dcc4) !important; }

/* ---------- v1.0 스토리 · 튜토리얼 ---------- */
.story-modal { padding: 0 !important; overflow: hidden; }
.story { position: relative; min-height: 15rem; background-size: cover; background-position: center; border-radius: 8px; display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem 1.1rem 0.8rem; }
.story-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.92) 100%); }
.story > *:not(.story-shade) { position: relative; }
.story-title { font-family: var(--serif); font-weight: 900; color: var(--gold-hi, #ffe08a); font-size: 1.05rem; letter-spacing: 0.05em; margin-bottom: 0.4rem; text-shadow: 0 2px 4px #000; }
.story-text { color: #f0e6d0; font-size: 0.95rem; line-height: 1.75; text-shadow: 0 2px 4px #000; min-height: 4.2rem; animation: storyIn 0.5s ease; }
@keyframes storyIn { from { opacity: 0; transform: translateY(6px); } }
.story-nav { display: flex; gap: 0.4rem; align-items: center; justify-content: flex-end; margin-top: 0.6rem; }
.story-nav .dim { margin-right: auto; }
.story-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
#tut-ring { position: fixed; z-index: 9000; pointer-events: none; border: 3px solid #ffe08a; border-radius: 8px; box-shadow: 0 0 0 4000px rgba(0,0,0,0.35), 0 0 14px #ffd060; animation: tutPulse 1.1s infinite; }
@keyframes tutPulse { 50% { box-shadow: 0 0 0 4000px rgba(0,0,0,0.35), 0 0 26px #ffd060; } }
#tut-tip { position: fixed; z-index: 9001; background: linear-gradient(180deg, #2e2214, #18100a); border: 2px solid #d4a84a; border-radius: 8px; padding: 0.5rem 0.6rem; color: #f0e6d0; font-size: 0.8rem; line-height: 1.5; box-shadow: 0 4px 16px #000; }
#tut-tip .tut-step { font-size: 0.65rem; color: #d4a84a; font-weight: 800; }
#tut-tip .tut-btns { display: flex; gap: 0.3rem; justify-content: flex-end; margin-top: 0.35rem; }

/* ---------- v1.1 전장 지도 ---------- */
.bf-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse at 30% 20%, rgba(120,60,30,0.35), transparent 60%), radial-gradient(ellipse at 80% 90%, rgba(80,20,60,0.35), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 6px, transparent 6px 12px), linear-gradient(180deg, #2a1a12, #140c0a); border: 1px solid #4a3220; }
.bf-title { text-align: center; padding-top: 0.35rem; position: relative; z-index: 3; pointer-events: none; }
.bf-title span { display: inline-block; padding: 0.2rem 2.4rem; font-family: var(--serif); font-weight: 900; font-size: 1.05rem; color: #f3e2b8; letter-spacing: 0.2em;
  background: linear-gradient(180deg, #4a3020, #2a1a10); border: 1px solid #8a6a3a; border-radius: 4px; box-shadow: 0 2px 6px #000; }
.bf-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; position: relative; }
.bf-track { position: relative; height: 100%; min-height: 15rem; }
.bf-path { position: absolute; left: 0; top: 0; pointer-events: none; }
.bf-path line { stroke: rgba(160,140,120,0.25); stroke-width: 4; stroke-dasharray: 2 10; stroke-linecap: round; }
.bf-path line.open { stroke: rgba(255,200,110,0.7); }
.bf-node { position: absolute; width: 200px; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
.bf-isle { position: relative; width: 200px; height: 112px; filter: drop-shadow(0 6px 6px rgba(0,0,0,0.7)); transition: transform 0.15s; }
.bf-node:active .bf-isle { transform: scale(0.96); }
.bf-img { position: absolute; inset: 0; background-size: cover; background-position: center 60%; clip-path: polygon(8% 0, 92% 0, 100% 22%, 100% 78%, 88% 100%, 12% 100%, 0 78%, 0 22%);
  border: 0; box-shadow: inset 0 0 0 3px rgba(240,200,120,0.9); }
.bf-isle::after { content: ''; position: absolute; inset: -3px; clip-path: polygon(8% 0, 92% 0, 100% 22%, 100% 78%, 88% 100%, 12% 100%, 0 78%, 0 22%); background: linear-gradient(180deg, #e8c070, #7a5020); z-index: -1; }
.bf-node.tower .bf-isle::after { background: linear-gradient(180deg, #c090ff, #4a2a7a); }
.bf-node.cur .bf-isle::after { background: linear-gradient(180deg, #fff0a0, #d0902a); box-shadow: 0 0 18px #ffcf5a; }
.bf-node.locked .bf-img { filter: grayscale(0.85) brightness(0.45); }
.bf-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, #3a2a22, #140c0a); border: 2px solid #8a6a4a; box-shadow: 0 0 0 4px rgba(0,0,0,0.5); }
.bf-lock img { width: 24px; height: 24px; }
.bf-boss { position: absolute; right: -10px; bottom: -8px; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle, #5a1a14, #1a0806); border: 2px solid #e05a3a; display: grid; place-items: center; }
.bf-boss img { width: 112%; height: 112%; object-fit: contain; }
.bf-boss.done { border-color: #e8c070; }
.bf-boss.done::after { content: '✓'; position: absolute; right: 4px; bottom: 0; color: #ffe08a; font-weight: 900; font-size: 0.9rem; text-shadow: 0 0 3px #000; }
.bf-node.locked .bf-boss { filter: brightness(0.3); }
.bf-banner { position: absolute; left: -16px; top: -6px; writing-mode: vertical-rl; text-orientation: upright; padding: 0.4rem 0.18rem 0.6rem; font-family: var(--serif); font-weight: 900; font-size: 0.72rem; letter-spacing: 0.02em;
  color: #fff0d0; background: linear-gradient(90deg, #7a1a14, #a02a1a 50%, #7a1a14); border: 1px solid #e0a050; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 92%, 0 100%); box-shadow: 0 2px 4px #000; z-index: 2; }
.bf-node.tower .bf-banner { background: linear-gradient(90deg, #3a1a6a, #5a2a9a 50%, #3a1a6a); }
.bf-node.locked .bf-banner { filter: saturate(0.3) brightness(0.7); }
.bf-sub { text-align: center; font-size: 0.68rem; margin-top: 0.3rem; color: #d8c8a8; text-shadow: 0 1px 2px #000; }
.bf-node.locked .bf-sub { color: #9a8a7a; }
.bf-here { position: absolute; left: 50%; top: -1.35rem; transform: translateX(-50%); font-size: 0.66rem; font-weight: 900; color: #2a1a08; background: #ffd060; padding: 0.05rem 0.45rem; border-radius: 9px; animation: bfBounce 1s infinite; white-space: nowrap; }
.bf-here::after { content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #ffd060; border-bottom: 0; }
@keyframes bfBounce { 50% { transform: translate(-50%, -3px); } }
.bf-dot { position: absolute; right: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #ff4a3a; box-shadow: 0 0 6px #ff4a3a; }
.bf-foot { text-align: center; padding: 0.2rem 0 0.35rem; }
.reg-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.reg-head b { font-family: var(--serif); font-size: 1rem; color: #f3e2b8; }
.reg-head .sub { font-size: 0.7rem; color: var(--muted); }

/* ---------- v1.1 가방 ---------- */
.bag-tools { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 0.3rem 0; }
.chipbtn { font-size: 0.68rem; padding: 0.18rem 0.5rem; border-radius: 10px; background: #241a12; color: #c8b898; border: 1px solid #4a3828; }
.chipbtn.on { background: linear-gradient(180deg, #5a4020, #3a2810); color: #ffe08a; border-color: #b08a3a; }
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 0.35rem; }
.bag-tile { position: relative; aspect-ratio: 1; border-radius: 7px; padding: 0; display: grid; place-items: center; border: 2px solid #5a4a3a; background: radial-gradient(circle at 50% 40%, #3a3028, #1a140e); }
.bag-tile img.px-icon { width: 70%; height: 70%; }
.bag-tile.ig0 { border-color: #8a847a; } .bag-tile.ig1 { border-color: #4aa05a; background: radial-gradient(circle at 50% 40%, #234a2a, #0e1a10); }
.bag-tile.ig2 { border-color: #3a7ad0; background: radial-gradient(circle at 50% 40%, #1e3a62, #0c1420); }
.bag-tile.ig3 { border-color: #a05ad8; background: radial-gradient(circle at 50% 40%, #44245e, #160c20); }
.bag-tile.ig4 { border-color: #f0a63a; background: radial-gradient(circle at 50% 40%, #5a3a12, #20140a); box-shadow: 0 0 8px rgba(240,166,58,0.5); }
.bag-tile.sel { outline: 3px solid #ffe08a; outline-offset: 1px; }
.bt-plus { position: absolute; right: 2px; top: 1px; font-size: 0.66rem; font-weight: 900; color: #ffe08a; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.bt-tier { position: absolute; left: 3px; bottom: 1px; font-size: 0.56rem; color: #c8b898; text-shadow: 0 0 2px #000; }
.bt-wear { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; border: 2px solid #ffe08a; background: #1a1410; }
.bt-wear .portrait { width: 100% !important; height: 100% !important; min-width: 0 !important; border: 0 !important; margin: 0 !important; }
.bt-wear .portrait img { width: 140%; height: 140%; object-fit: cover; object-position: 50% 10%; }
.bag-hero { display: flex; gap: 0.6rem; padding: 0.55rem; border-radius: 8px; border: 2px solid #5a4a3a; background: linear-gradient(180deg, #2a2018, #16100c); }
.bag-hero.ig1 { border-color: #4aa05a; } .bag-hero.ig2 { border-color: #3a7ad0; } .bag-hero.ig3 { border-color: #a05ad8; } .bag-hero.ig4 { border-color: #f0a63a; }
.bag-hero-ic { width: 72px; height: 72px; display: grid; place-items: center; background: radial-gradient(circle, #3a3028, #120c08); border-radius: 8px; flex: none; }
.bag-hero-ic img { width: 60px; height: 60px; }
.bh-name { font-family: var(--serif); font-weight: 900; font-size: 1.05rem; }
.bh-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.2rem; font-size: 0.66rem; color: #c8b898; }
.bh-tags span { background: #241a12; padding: 0.05rem 0.4rem; border-radius: 8px; }
.bh-tags .gtag-i { color: #140c08; font-weight: 900; }
.st-chips { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.st-chip { font-size: 0.72rem; background: #1e1610; border: 1px solid #3a2c20; padding: 0.12rem 0.4rem; border-radius: 6px; color: #d8c8a8; }
.st-chip img { width: 0.9rem; height: 0.9rem; vertical-align: -2px; margin-right: 2px; }
.st-chip b { color: #9fe89f; }
.wearing { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: #d8c8a8; }
.wearing .portrait { width: 22px !important; height: 22px !important; min-width: 0 !important; }

/* ---------- v1.1 다이아 · 자동 · 스킵 ---------- */
.res.gem b, .gemtxt { color: #7ad0ff; }
.res.gem { cursor: pointer; }
.start-col { display: flex; flex-direction: column; gap: 0.3rem; }
.start-sub { gap: 0.3rem; }
.start-sub .btn { flex: 1; font-size: 0.7rem; padding: 0.25rem 0.3rem; white-space: nowrap; }
.gem-btn { background: linear-gradient(180deg, #1e4a7a, #0e2440) !important; color: #cfeaff !important; border-color: #3a7ab0 !important; }
.shop-card.gemc { outline-color: #3a7ab0; background: linear-gradient(180deg, #14283a, #0a141e); }
.gem-packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.gem-pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.45rem 0.2rem; border-radius: 8px; background: linear-gradient(180deg, #16304a, #0a1622); border: 1px solid #3a6a9a; }
.gem-pack img { width: 1.6rem; height: 1.6rem; }
.gem-pack b { color: #cfeaff; font-size: 0.85rem; }
.gem-pack .bonus { position: absolute; top: -6px; right: -4px; font-size: 0.58rem; background: #ff5a3a; color: #fff; padding: 0 0.3rem; border-radius: 6px; font-weight: 900; }

/* ---------- v1.2 전장 지도: 건물 그림 ---------- */
.bf-scroll { scrollbar-width: none; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.bf-scroll::-webkit-scrollbar { display: none; }
.bf-node .bf-isle { width: 200px; height: 140px; filter: drop-shadow(0 8px 8px rgba(0,0,0,0.75)); }
.bf-node .bf-isle::after { display: none; }
.bf-bld { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); max-width: 100%; max-height: 100%; pointer-events: none; image-rendering: auto; }
.bf-node.tower .bf-bld { max-height: 112%; }
.bf-node.cur .bf-isle { filter: drop-shadow(0 0 12px rgba(255,207,90,0.65)) drop-shadow(0 8px 8px rgba(0,0,0,0.75)); }
.bf-node.locked .bf-bld { filter: grayscale(0.9) brightness(0.4); }
.bf-node .bf-boss { right: 4px; bottom: 6px; width: 48px; height: 48px; }
.bf-node .bf-banner { left: -6px; top: 6px; }
.bf-node .bf-here { top: -0.6rem; }
.bfeather { font-size: 0.72rem; color: #ffe0a0; margin: 0.25rem 0; }
.bfeather img { width: 1rem; height: 1rem; vertical-align: -3px; margin-right: 2px; }
.gold-gem { align-items: center; padding: 0.4rem; border: 1px solid #3a6a9a; border-radius: 8px; background: #0e1a26; font-size: 0.8rem; }
.gold-gem img { width: 1rem; height: 1rem; vertical-align: -3px; }

/* v1.3 전장 지도: 건물 1.3배, 심연의 탑은 오른쪽 위 따로 */
.bf-node { width: 260px; }
.bf-node .bf-isle { width: 260px; height: 182px; }
.bf-node .bf-boss { width: 56px; height: 56px; }
.bf-node .bf-banner { font-size: 0.8rem; }
.bf-tower { position: absolute; right: 0.5rem; top: 0.35rem; z-index: 4; width: 7.6rem; padding: 0.25rem 0.3rem 0.35rem; border-radius: 0.7rem; cursor: pointer; color: inherit;
  background: radial-gradient(ellipse at 50% 35%, rgba(150,80,255,0.35), rgba(20,8,36,0.88) 70%); border: 1px solid #8a5ad0; box-shadow: 0 0 14px rgba(160,90,255,0.45), inset 0 0 10px rgba(0,0,0,0.6); }
.bf-tower img { display: block; width: 100%; height: 5.6rem; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.7)); pointer-events: none; }
.bf-tower .bft-t { text-align: center; line-height: 1.15; }
.bf-tower .bft-t b { display: block; font-family: var(--serif); font-size: 0.82rem; color: #e8d0ff; text-shadow: 0 0 6px #8a4aff; }
.bf-tower .bft-t span { font-size: 0.62rem; color: #c8b0e8; }
.bf-tower.locked img { filter: grayscale(0.9) brightness(0.45); }
.bf-tower .bf-lock { top: 40%; }
.bf-tower:active { transform: scale(0.97); }
/* 하단 바: 전투력 칩 + 눌러서 이동 */
.res.pow { border-color: #6a3a2a; background: linear-gradient(180deg, rgba(90,30,20,0.7), rgba(0,0,0,0.55)); cursor: pointer; }
.res.pow b { color: #ffb08a; }
.res.tap { cursor: pointer; }
.res.tap:active, .res.pow:active { transform: scale(0.95); }
/* HQ 명성 바 */
.plate .fame { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.2rem; font-size: 0.66rem; color: #e8d8b8; }
.plate .fame span { display: flex; align-items: center; gap: 0.15rem; white-space: nowrap; font-weight: 800; }
.plate .fame span img { width: 1rem; height: 1rem; }
.plate .fame .bar { min-width: 3rem; }
.plate .fame small { color: var(--muted); font-size: 0.58rem; white-space: nowrap; }
/* 신화 */
.myth-c { color: #ff7a8a !important; text-shadow: 0 0 8px rgba(255,70,100,0.55); }
.adv-tag.myth { background: linear-gradient(180deg, #ff9aa8, #c0204a); color: #fff; box-shadow: 0 0 6px #ff4a6a; }
.portrait.myth { box-shadow: 0 0 0 1px #ff6a80, 0 0 10px rgba(255,70,100,0.65); }
.portrait.myth img, .hd-art.myth img, .cx-card img, .cx-big img, .myth-cmp img { image-rendering: pixelated; }
.hd-art.myth { box-shadow: 0 0 0 2px #ff6a80, 0 0 18px rgba(255,70,100,0.5); }
.myth-row { border-color: #7a2a3a; }
.myth-row.ready { border-color: #ff6a80; background: linear-gradient(90deg, rgba(255,70,100,0.22), rgba(0,0,0,0.3)); }
.myth-row.ready b { color: #ffb0bc; }
.myth-cmp { display: flex; align-items: center; justify-content: center; gap: 0.8rem; }
.myth-cmp > div { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.myth-cmp img { height: 7rem; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)); }
.myth-cmp .myth-new img { height: 8.5rem; filter: drop-shadow(0 0 10px rgba(255,80,110,0.6)); }
.myth-cmp .myth-new b { color: #ff9aa8; font-family: var(--serif); }
.myth-cmp .arrow { color: #ff7a8a; font-size: 1.3rem; }
.myth-ul { margin: 0.4rem 0; padding: 0 0 0 1rem; font-size: 0.72rem; line-height: 1.6; color: #e8dcc4; }
.soon-box, .cx-soon { display: grid; place-items: center; text-align: center; width: 5.5rem; height: 6.5rem; border: 1px dashed #7a5a6a; border-radius: 0.5rem; color: #b89aa8; font-size: 0.7rem; background: rgba(0,0,0,0.3); }
.adv-reveal.myth .ar-art { box-shadow: 0 0 24px rgba(255,70,100,0.6); }
.adv-reveal.myth .rays { background: repeating-conic-gradient(rgba(255,90,120,0.22) 0 10deg, transparent 10deg 20deg); }
/* 도감 성장 단계 */
.cx-step { display: flex; gap: 0.4rem; align-items: stretch; margin-bottom: 0.4rem; }
.cx-lbl { flex: none; width: 4.4rem; display: flex; flex-direction: column; justify-content: center; font-weight: 900; font-size: 0.8rem; color: var(--gold-hi); font-family: var(--serif); }
.cx-lbl small { font-family: inherit; font-weight: 400; font-size: 0.56rem; color: var(--muted); line-height: 1.3; margin-top: 0.1rem; }
.cx-row { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.cx-row.g5 { grid-template-columns: repeat(5, 1fr); gap: 0.25rem; }
.cx-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.3rem 0.2rem; border-radius: 0.45rem; background: rgba(0,0,0,0.35); border: 1px solid #3a2e22; color: inherit; cursor: pointer; min-width: 0; }
.cx-card img { height: 4.2rem; max-width: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.6)); }
.cx-card .cx-soon { width: 100%; height: 4.2rem; font-size: 0.6rem; }
.cx-card b { font-size: 0.7rem; color: #f0e0c0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cx-card span { font-size: 0.56rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cx-card.cx-g { border-color: var(--gc); box-shadow: inset 0 0 8px var(--gc); }
.cx-card.cx-g img { height: 3.2rem; }
.cx-card.cx-adv { border-color: #8a6a2a; background: radial-gradient(ellipse at 50% 30%, rgba(255,216,106,0.14), rgba(0,0,0,0.35) 70%); }
.cx-card.cx-myth { border-color: #9a3a4a; background: radial-gradient(ellipse at 50% 30%, rgba(255,80,110,0.2), rgba(0,0,0,0.35) 70%); }
.cx-card.cx-myth b { color: #ffb0bc; }
.cx-card.have { outline: 1px solid #7ac06a; }
.cx-have { position: absolute; top: 0.15rem; right: 0.2rem; font-style: normal; font-size: 0.5rem; font-weight: 900; color: #0a1a06; background: #9ae07a; border-radius: 0.2rem; padding: 0 0.2rem; }
.cx-info { display: flex; gap: 0.8rem; align-items: flex-start; }
.cx-big { flex: none; width: 9rem; height: 10rem; display: grid; place-items: end center; border-radius: 0.6rem; background: radial-gradient(ellipse at 50% 60%, rgba(255,216,106,0.15), rgba(0,0,0,0.4) 70%); border: 1px solid #3a2e22; }
.cx-big.gframe0, .cx-big.gframe1, .cx-big.gframe2, .cx-big.gframe3, .cx-big.gframe4 { border-color: var(--gc); box-shadow: inset 0 0 14px var(--gc); }
.cx-big img { max-height: 9.5rem; max-width: 100%; object-fit: contain; }
.cx-info h3 { margin: 0 0 0.2rem; font-family: var(--serif); }
.bf-tower { width: 6.2rem; padding: 0.2rem 0.25rem 0.3rem; }
.bf-tower img { height: 4.3rem; }
.bf-tower .bf-lock { width: 34px; height: 34px; }
.bf-tower .bft-t b { font-size: 0.74rem; }
.bf-track { padding-right: 7rem; box-sizing: content-box; }

/* v1.3.1 전장 화살표 */
.bf-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 2.4rem; height: 3.4rem; border-radius: 0.6rem; border: 1px solid #a07a3a; cursor: pointer;
  background: linear-gradient(180deg, rgba(70,48,24,0.92), rgba(30,20,10,0.92)); color: #ffd88a; font-size: 1.1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.bf-arrow.l { left: 0.35rem; } .bf-arrow.r { right: 0.35rem; }
.bf-arrow:active { transform: translateY(-50%) scale(0.92); }
/* 헌터 상세 그림: 등급 태그와 전직·신화 태그가 겹치지 않게 (등급은 왼쪽 아래로) */
.hd-art .gtag { top: auto; bottom: 0.3rem; }

/* v1.3.1 방출 또는 레벨업 */
.rel-or { display: flex; align-items: center; gap: 0.4rem; }
.rel-or .btn { flex-direction: column; line-height: 1.15; }
.rel-or .btn small { display: block; font-size: 0.6rem; font-weight: 400; opacity: 0.85; }
.rel-or .or { font-size: 0.7rem; color: var(--muted); flex: none; }
.feed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: 0.3rem; max-height: 11rem; overflow-y: auto; }
.feed-c { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.25rem; border-radius: 0.4rem; background: rgba(0,0,0,0.3); border: 1px solid #3a2e22; color: inherit; cursor: pointer; }
.feed-c .portrait { width: 2.6rem; height: 3rem; }
.feed-c span { font-size: 0.64rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-c small { font-size: 0.58rem; color: var(--muted); }
.feed-c.sel { border-color: var(--gold); box-shadow: 0 0 10px rgba(255,216,106,0.4); }

/* v1.3.2 파티 그룹 */
.grp-row { display: flex; gap: 0.3rem; align-items: stretch; margin-bottom: 0.4rem; }
.grp-b { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 0.25rem 0.2rem; border-radius: 0.45rem; cursor: pointer; color: inherit;
  background: rgba(0,0,0,0.35); border: 1px solid #3a2e22; }
.grp-b b { font-size: 0.72rem; color: #f0e0c0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.grp-b small { font-size: 0.56rem; color: var(--muted); }
.grp-b.on { border-color: var(--gold); background: linear-gradient(180deg, rgba(212,168,74,0.28), rgba(0,0,0,0.35)); box-shadow: 0 0 8px rgba(255,216,106,0.3); }
.grp-b.on b { color: var(--gold-hi); }
.grp-tools { display: flex; flex-direction: column; gap: 0.2rem; }
/* 첫 접속 이름 */
.intro-name { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.25rem; align-items: center; }
.intro-name label { font-weight: 900; color: var(--gold-hi); font-size: 0.85rem; }
.intro-name input { width: 100%; max-width: 16rem; text-align: center; font-size: 1rem; }
.intro-name small { font-size: 0.6rem; color: var(--muted); text-align: center; }

/* v1.3.3 그룹 창 */
.gp { display: flex; flex-direction: column; gap: 0.45rem; }
.gp-name { display: flex; align-items: center; justify-content: center; gap: 0.5rem; background: none; border: 0; color: inherit; cursor: pointer; padding: 0.2rem; }
.gp-name b { font-family: var(--serif); font-size: 1.15rem; color: var(--gold-hi); }
.gp-name span { font-size: 0.65rem; color: var(--muted); border: 1px solid #4a3c28; border-radius: 0.3rem; padding: 0.05rem 0.35rem; }
.gp-name.edit input { max-width: 12rem; text-align: center; font-size: 1rem; }
.gp-faces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.gp-f { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; min-width: 0; }
.gp-f .portrait { width: 3.4rem; height: 4rem; }
.gp-f span { font-size: 0.66rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-f small { font-size: 0.58rem; color: var(--muted); }
.gp-empty { width: 3.4rem; height: 4rem; border: 1px dashed #4a3c28; border-radius: 0.4rem; display: grid; place-items: center; font-size: 0.6rem; color: var(--muted); }
/* 자동 진행 */
.ap-list { display: flex; flex-direction: column; gap: 0.3rem; }
.ap-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: 0.5rem; background: rgba(0,0,0,0.35); border: 1px solid #4a3c28; color: inherit; cursor: pointer; text-align: left; }
.ap-row:disabled { opacity: 0.45; cursor: default; }
.ap-row b { min-width: 4.5rem; color: var(--gold-hi); font-size: 0.8rem; }
.ap-row small { margin-left: auto; font-size: 0.62rem; color: var(--muted); white-space: nowrap; }
.ap-faces { display: flex; gap: 0.15rem; }
.ap-faces .portrait { width: 1.9rem; height: 2.2rem; }
.ap-row:not(:disabled):active { transform: scale(0.98); }
.bf-foot .ap-btn { margin-right: 0.5rem; padding: 0.15rem 0.7rem; }
.auto-box.ap { border: 1px solid #a07a3a; border-radius: 0.4rem; padding: 0.3rem; background: rgba(212,168,74,0.12); }
/* 첫 화면 */
body.pre-start #app > :not(#modal-root):not(#toast-root) { visibility: hidden; }
body.pre-start #app { background: #070305; }
body.pre-start #modal-root .modal-back { background: radial-gradient(ellipse at 50% 45%, rgba(40,6,10,0.35), rgba(4,1,3,0.92) 75%), var(--prebg, none) center / cover no-repeat, #070305; }
.title-scr { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 0.8rem 0.4rem; }
.ts-logo { font-family: var(--serif); font-size: 1.8rem; font-weight: 900; color: #f3e2b8; letter-spacing: 0.08em; text-shadow: 0 0 14px rgba(255,180,80,0.4); }
.ts-sub { color: #a83a32; letter-spacing: 0.4em; font-size: 0.75rem; margin-top: -0.4rem; }
.ts-btns { display: flex; flex-direction: column; gap: 0.45rem; width: 100%; max-width: 17rem; margin-top: 0.5rem; }
.ts-btns .btn small { font-size: 0.62rem; font-weight: 400; opacity: 0.8; }

/* v1.3.4 그룹 편집 창 */
.grp-modal .modal { max-width: 46rem; }
.gp-tabs { display: flex; gap: 0.3rem; }
.gp-tabs button { flex: 1; padding: 0.25rem; border-radius: 0.4rem; border: 1px solid #3a2e22; background: rgba(0,0,0,0.3); color: var(--muted); font-size: 0.72rem; cursor: pointer; }
.gp-tabs button.on { border-color: var(--gold); color: var(--gold-hi); background: rgba(212,168,74,0.18); }
.gp-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.gp-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.05rem; padding: 0.2rem; min-height: 5.2rem; border-radius: 0.45rem; border: 1px dashed #5a4830; background: rgba(0,0,0,0.3); color: inherit; cursor: pointer; }
.gp-slot.filled { border-style: solid; border-color: #6a5434; }
.gp-slot.on { border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(255,216,106,0.4); }
.gp-slot .gp-l { font-size: 0.55rem; color: var(--muted); }
.gp-slot .portrait { width: 2.8rem; height: 3.2rem; }
.gp-slot .gp-n { font-size: 0.62rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-slot small { font-size: 0.55rem; color: var(--muted); }
.gp-plus { flex: 1; display: grid; place-items: center; font-size: 1.4rem; color: #7a6040; }
.gp-x { position: absolute; top: 0.15rem; right: 0.15rem; font-style: normal; font-size: 0.55rem; background: #a83a32; color: #fff; border-radius: 0.2rem; padding: 0 0.25rem; }
.gp-info { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.gp-info .muted { flex: 1; min-width: 8rem; }
.gp-cls { display: flex; gap: 0.2rem; overflow-x: auto; }
.gp-cls button { flex: none; padding: 0.12rem 0.5rem; border-radius: 1rem; border: 1px solid #3a2e22; background: rgba(0,0,0,0.3); color: var(--muted); font-size: 0.65rem; cursor: pointer; }
.gp-cls button.on { border-color: var(--gold); color: var(--gold-hi); }
.gp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); gap: 0.25rem; max-height: 9.5rem; overflow-y: auto; }
.gp-h { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0.2rem; border-radius: 0.4rem; border: 1px solid #3a2e22; background: rgba(0,0,0,0.3); color: inherit; cursor: pointer; min-width: 0; }
.gp-h .portrait { width: 2.5rem; height: 2.9rem; }
.gp-h span { font-size: 0.6rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-h small { font-size: 0.52rem; color: var(--muted); white-space: nowrap; }
.gp-h.in { opacity: 0.4; }
.gp-star { position: absolute; top: 0; left: 0.1rem; font-style: normal; font-size: 0.65rem; }
.gp-oth { position: absolute; top: 0.05rem; right: 0.1rem; font-style: normal; font-size: 0.5rem; color: #9ad0ff; background: rgba(0,0,0,0.6); border-radius: 0.2rem; padding: 0 0.15rem; }
.grp-open { margin-left: auto; display: flex; align-items: center; gap: 0.2rem; padding: 0.2rem 0.55rem; border-radius: 0.45rem; border: 1px solid #a07a3a; background: rgba(212,168,74,0.15); color: var(--gold-hi); font-size: 0.72rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.grp-open img { width: 1rem; height: 1rem; }
/* 자동 진행 시작 위치 */
.ap-start { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem; margin-bottom: 0.4rem; border-radius: 0.5rem; border: 1px solid #a07a3a; background: rgba(212,168,74,0.1); }

/* v1.3.5 특성 */
.trait.rare { box-shadow: 0 0 0 1px #ffd86a, 0 0 6px rgba(255,216,106,0.5); color: #ffe7a0; }
.tbadge { display: inline-block; font-size: 0.62rem; font-weight: 900; padding: 0.05rem 0.4rem; border-radius: 0.3rem; margin: 0 0.25rem 0.3rem 0; }
.tbadge.two { background: linear-gradient(180deg, #8ae08a, #2e8a3a); color: #06200a; animation: evtGlow 1.6s ease-in-out infinite; }
.tbadge.rare { background: linear-gradient(180deg, #ffe07a, #b8862a); color: #2a1a08; }
.mr-tr { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem; margin-top: 0.1rem; }
.mr-tr .trait { font-size: 0.5rem; line-height: 0.9rem; padding: 0 0.2rem; }
.mr-card { position: relative; }
.mr-star { position: absolute; top: 0.15rem; right: 0.25rem; font-style: normal; color: #ffe07a; text-shadow: 0 0 6px #ffcf5a; }
.t-odds summary { cursor: pointer; list-style: none; }
.t-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 0.6rem; }
.t-grid > div { display: flex; align-items: center; gap: 0.3rem; min-width: 0; }
.t-grid b { font-size: 0.7rem; color: var(--gold-hi); min-width: 2.4rem; }
.t-grid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.58rem; }
.t-pick { display: flex; flex-direction: column; gap: 0.3rem; }
.t-pick button { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.5rem; border-radius: 0.45rem; border: 1px solid #3a2e22; background: rgba(0,0,0,0.3); color: inherit; cursor: pointer; text-align: left; }
.t-pick button.sel { border-color: var(--gold); box-shadow: 0 0 8px rgba(255,216,106,0.35); }
.t-res { display: flex; justify-content: center; align-items: center; gap: 0.6rem; font-size: 1.1rem; margin: 0.6rem 0; }
.t-res .trait { font-size: 0.9rem; line-height: 1.6rem; padding: 0 0.6rem; }
.rw-lbl { font-size: 0.62rem; color: var(--muted); margin: 0.3rem 0 0.15rem; }
.chip.dim { opacity: 0.85; font-size: 0.66rem; }

/* v1.3.6 돌아간 화면: 말풍선은 게임 화면 안에 */
#tut-tip.in-app, #tut-ring.in-app { position: absolute; }
/* v1.3.7 궁수 화살 선택 */
.arrow-card .arrow-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; flex-wrap: wrap; }
.arrow-card .arrow-row b { font-size: 0.75rem; min-width: 3.5rem; }
.seg.mini { display: inline-flex; gap: 0.15rem; margin: 0; }
.seg.mini button { padding: 0.1rem 0.5rem; font-size: 0.68rem; border-radius: 0.35rem; }
.seg.mini button.on.ar-fire { background: linear-gradient(180deg, #ff9a4a, #b8401a); color: #fff; }
.seg.mini button.on.ar-ice { background: linear-gradient(180deg, #9fe0ff, #2a7ab8); color: #06202e; }
.seg.mini button.on.ar-normal { background: linear-gradient(180deg, #ffe07a, #b8862a); color: #2a1a08; }

/* v1.3.10 그룹: 누르면 적용, 연필은 편집 */
.grp-w { flex: 1; min-width: 0; display: flex; position: relative; }
.grp-w .grp-b { flex: 1; padding-right: 1.6rem; }
.grp-edit { position: absolute; right: 0.15rem; top: 50%; transform: translateY(-50%); width: 1.5rem; height: 1.5rem; border-radius: 0.4rem; border: 1px solid #5a4830; background: rgba(0,0,0,0.5); font-size: 0.7rem; cursor: pointer; padding: 0; line-height: 1; }
.grp-edit:active { transform: translateY(-50%) scale(0.9); }

/* v1.3.13 물약 고정 슬롯 · 방출 버튼 분리 */
.pot-row { gap: 0.3rem; align-items: center; flex-wrap: wrap; }
.pot-row .pot-lbl { margin-right: 0.2rem; }
.pot-row .pot-btn { padding: 0.15rem 0.45rem; }
.pot-row .pot-btn .px-icon { width: 1.05rem; height: 1.05rem; }
.rel-btn { margin-left: 1.2rem; }
.qty-row { display: flex; align-items: center; gap: 0.3rem; }
.qty-row .qty-n { min-width: 1.8rem; text-align: center; font-size: 0.95rem; }
.set-box { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.66rem; line-height: 1.35; }
.set-line .on { color: #9be89b; } .set-line .off { color: var(--muted); opacity: 0.65; }
#tut-ring.nudge { animation: tutNudge 0.45s 2; }
@keyframes tutNudge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); border-color: #fff; } }
.qty-row .px-icon { width: 1rem; height: 1rem; vertical-align: middle; }
