:root {
  --bg: #0e1211; --bg2: #161b19; --glass: rgba(18, 23, 21, .72); --glass2: rgba(24, 30, 27, .9);
  --line: rgba(255, 255, 255, .09); --line2: rgba(255, 255, 255, .16);
  --ink: #ece7de; --muted: #8e978f; --accent: #ff8a2a; --accent2: #ffb070;
  --boss: #ff4a3d; --elite: #e0b050; --mob: #7d8a84; --route: #ff8a2a; --patrol: #5fb3d9; --obj: #5fd0c8;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 14px/1.5 -apple-system, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif; -webkit-font-smoothing: antialiased; }
body.viewer { overflow: hidden; }
.muted { color: var(--muted); }
kbd { font: 11px/1 ui-monospace, monospace; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; color: var(--muted); }
button { background: transparent; color: var(--ink); border: 1px solid var(--line2); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; white-space: nowrap; }
button:hover { border-color: var(--muted); background: rgba(255,255,255,.04); }
button.on { border-color: var(--accent); background: rgba(255,138,42,.16); color: #fff; }
select.lv { background: rgba(0,0,0,.25); color: var(--ink); border: 1px solid var(--line2); border-radius: 8px; padding: 3px 6px; font: inherit; font-size: 13px; margin-left: 4px; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 10px 40px rgba(0,0,0,.35); }

/* 무대 */
#stage { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 40%, #1b2320 0%, #0e1211 70%); }
#stage canvas { display: block; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tip { position: absolute; pointer-events: none; background: var(--glass2); border: 1px solid var(--line2); border-radius: 10px; padding: 7px 11px; font-size: 13px; white-space: nowrap; z-index: 20; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
#heightbar { position: absolute; left: 14px; top: 84px; width: 92px; height: calc(100% - 250px); max-height: 460px; z-index: 3; }

/* 위 HUD */
.hud.top { position: fixed; left: 12px; right: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 12px; z-index: 10; }
.brand { color: var(--accent); text-decoration: none; font-size: 18px; line-height: 1; }
.title { font-weight: 700; font-size: 16px; margin-right: auto; letter-spacing: -.01em; }
.group, .ctrls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hudrow { display: contents; }   /* 좁은 화면에서만 한 줄로 묶어 옆으로 민다 */
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chk input { accent-color: var(--accent); }

/* 오른쪽 패널 */
#panelwrap { position: fixed; right: 12px; top: 72px; bottom: 150px; width: 360px; z-index: 9; display: flex; transition: transform .25s ease; }
#panelwrap.folded { transform: translateX(calc(100% - 26px)); }
#panelfold { position: absolute; left: -1px; top: 12px; transform: translateX(-100%); border-radius: 10px 0 0 10px; padding: 8px 6px; background: var(--glass2); border-color: var(--line); }
#panel { overflow-y: auto; overflow-x: hidden; padding: 16px 16px 20px; width: 100%; min-width: 0; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
#panel h2 { font-size: 17px; margin: 0 0 2px; letter-spacing: -.01em; }
#panel h3 { font-size: 11.5px; color: var(--muted); margin: 16px 0 6px; font-weight: 600; letter-spacing: .04em; }
#panel p, #panel li { margin: 0 0 4px; }
#panel ul { padding-left: 18px; margin: 0; }
.tabs { display: flex; gap: 6px; margin: 12px 0 4px; flex-wrap: wrap; }
.tabs.small button { font-size: 12px; padding: 2px 10px; }
.route-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 6px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.route-item > div { min-width: 0; overflow-wrap: anywhere; }
.route-item:hover, .route-item.on { background: rgba(255,138,42,.1); }
.route-n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--route); display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255,138,42,.08); }
.route-item.boss .route-n { border-color: var(--boss); background: rgba(255,74,61,.12); }
.route-item.opt .route-n { border-style: dashed; }
.leg { font-size: 11px; margin-top: 2px; }
.pulls { margin-top: 6px; display: grid; gap: 2px; }
.pull-row { font-size: 12px; color: var(--muted); padding: 2px 8px; border-left: 2px solid var(--line2); border-radius: 0 6px 6px 0; }
.pull-row b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.pull-row:hover { border-left-color: var(--accent); color: var(--ink); background: rgba(255,255,255,.03); }
.pulls.fold .pull-row:nth-child(n+4) { display: none; }
.morebtn { font-size: 11px; padding: 0 8px; margin-top: 2px; color: var(--muted); justify-self: start; }
.tag { display: inline-block; font-size: 11px; border: 1px solid var(--line2); border-radius: 999px; padding: 0 8px; margin-left: 6px; color: var(--muted); vertical-align: 2px; }
.tag.warn { color: var(--elite); border-color: rgba(224,176,80,.5); }
.tag.horde { color: #ff6b5a; border-color: rgba(255,107,90,.5); }
.tag.ally { color: #6aa8ff; border-color: rgba(106,168,255,.5); }
.back { font-size: 12px; margin-bottom: 10px; }
.card { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.card h4 { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.card.danger { border-color: rgba(255,74,61,.35); background: rgba(255,74,61,.06); }
.card.tank { border-color: rgba(255,138,42,.35); background: rgba(255,138,42,.06); }
.quest { border-top: 1px solid var(--line); padding: 10px 0; }
.qh b { font-weight: 600; }
.qt { font-size: 13px; margin: 4px 0; }
.qm { font-size: 12px; color: var(--muted); }
.sources a { color: var(--muted); font-size: 12px; word-break: break-all; }
.lootbox ul { list-style: none; padding-left: 0 !important; }

/* 3D 라벨 */
.label3d { font-size: 12px; font-weight: 700; color: var(--ink); background: rgba(14,18,17,.88); border: 1.5px solid var(--route); border-radius: 999px; padding: 0 8px; line-height: 21px; pointer-events: auto; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,.45); transition: box-shadow .15s; }
.label3d:hover { box-shadow: 0 0 0 3px rgba(255,138,42,.3); }
.label3d.boss { border-color: var(--boss); }
.label3d.event { border-style: dashed; }
.label3d.pull { font-size: 10.5px; border-color: rgba(200,210,200,.45); background: rgba(14,18,17,.7); line-height: 17px; padding: 0 6px; font-weight: 600; }
.label3d.obj { font-size: 11px; border-color: var(--obj); color: #c9f2ee; font-weight: 600; line-height: 18px; padding: 0 7px; }
.label3d.pulse { animation: pulse 1.2s ease-out 2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,138,42,.7); } 100% { box-shadow: 0 0 0 16px rgba(255,138,42,0); } }
#compass { position: fixed; left: 26px; bottom: 156px; width: 44px; height: 44px; border: 1px solid var(--line2); border-radius: 50%; background: var(--glass); pointer-events: none; z-index: 8; }
#compass span { position: absolute; left: 50%; top: 3px; transform: translateX(-50%); font-size: 12px; font-weight: 800; color: var(--accent); }
#compass::after { content: ''; position: absolute; left: 50%; top: 18px; width: 2px; height: 14px; margin-left: -1px; background: var(--muted); border-radius: 2px; }

/* 타임라인 */
#timeline { position: fixed; left: 12px; right: 384px; bottom: 12px; height: 126px; z-index: 9; padding: 8px 12px 6px; transition: right .25s ease; }
body.panel-folded #timeline { right: 50px; }
.tl-head { display: flex; gap: 10px; align-items: baseline; font-size: 12px; }
#tl { width: 100%; height: 96px; display: block; cursor: crosshair; }

/* 미니맵·근접 카드 */
#minimap { position: fixed; left: 12px; bottom: 150px; width: 210px; height: 210px; z-index: 8; padding: 4px; }
#mm { width: 100%; height: 100%; display: block; cursor: pointer; }
#compass { bottom: 156px !important; left: 232px !important; }
#near { position: fixed; left: 50%; transform: translateX(-50%); bottom: 150px; z-index: 11; padding: 10px 14px; max-width: 460px; font-size: 13px; cursor: pointer; border-color: rgba(255,74,61,.4); }
#near b { color: #fff; }
.step-chk { accent-color: var(--accent); margin: 0; }
.route-item.done { opacity: .5; }
.route-item.done .route-n { background: var(--accent); color: #111; }
.memo { font-size: 12px; color: var(--accent2); margin-top: 4px; outline: none; border-radius: 6px; padding: 2px 4px; border: 1px dashed transparent; }
.memo:empty::before { content: '+ 메모'; color: var(--muted); }
.memo:focus { border-color: var(--line2); background: rgba(0,0,0,.25); }
.progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: 6px 0 2px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* 팝오버 */
.popover { position: fixed; z-index: 30; padding: 12px 14px; max-width: 540px; }
#layers { top: 66px; right: 140px; display: grid; gap: 4px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#layers h4 { grid-column: 1 / -1; margin: 8px 0 2px; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
#help { top: 66px; right: 12px; font-size: 13px; }
#help h3 { margin: 0 0 8px; font-size: 14px; }
#help ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
[hidden] { display: none !important; }

/* 검색 */
#palette { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; display: grid; justify-items: center; align-items: start; padding-top: 12vh; }
.pal { width: min(620px, calc(100% - 32px)); padding: 10px; }
#palq { width: 100%; background: rgba(0,0,0,.3); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
#palq:focus { border-color: var(--accent); }
#palres { list-style: none; margin: 8px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
#palres li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
#palres li.on, #palres li:hover { background: rgba(255,138,42,.14); }
#palres .k { font-size: 11px; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 0 8px; min-width: 52px; text-align: center; }
#palres .s { margin-left: auto; font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
  /* 위: 1줄(제목·검색·레이어) + 옆으로 미는 1줄(재생·레벨·루트·층·시점) */
  .hud.top { gap: 6px 8px; padding: 6px 10px; left: 8px; right: 8px; top: 8px; }
  .title { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
  .hud.top .tools { order: 1; flex-wrap: nowrap; }
  .hud.top .tools kbd { display: none; }
  .hudrow { display: flex; order: 2; flex: 0 0 100%; min-width: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .hudrow::-webkit-scrollbar { display: none; }
  .hudrow .group, .hudrow .ctrls { flex: none; flex-wrap: nowrap; }
  .hudrow::after { content: ''; flex: 0 0 22px; }
  /* 아래 시트: 접으면 제목·탭만(112px), 펼치면 화면의 58% */
  #panelwrap { left: 8px; right: 8px; width: auto; max-width: none; top: auto; bottom: 8px; height: 58vh; height: 58dvh; }
  #panelwrap.folded { transform: translateY(calc(100% - 112px)); }
  #panelwrap.folded #panel { overflow: hidden; }
  #panelfold { left: 50%; top: -1px; transform: translate(-50%, -100%); border-radius: 10px 10px 0 0; padding: 2px 22px; }
  #timeline, #minimap { display: none; }
  #heightbar { top: 104px; width: 64px; height: calc(100vh - 104px - 58vh - 30px); min-height: 0; }
  body.panel-folded #heightbar { height: calc(100vh - 104px - 150px); max-height: 380px; }
  #panel p, .qt, .qm { overflow-wrap: anywhere; }
  #compass { left: auto !important; right: 14px; bottom: calc(58vh + 34px) !important; }
  body.panel-folded #compass { bottom: 146px !important; }
  #near { bottom: 134px; max-width: calc(100vw - 90px); }
  #flash { top: 100px; max-width: calc(100vw - 32px); }
  #layers { top: 96px; left: 8px; right: 8px; max-width: none; }
  #help { top: 96px; left: 8px; right: 8px; max-width: none; }
}

/* 목록 페이지 */
body.index { padding: 40px 16px; max-width: 760px; margin: 0 auto; }
a.dcard { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 12px 0; color: var(--ink); text-decoration: none; background: var(--bg2); transition: border-color .15s, transform .15s; }
div.drow { display: flex; gap: 8px; align-items: stretch; margin: 12px 0; }
div.drow a.dcard { flex: 1; margin: 0; }
a.dguide { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; color: var(--accent2); text-decoration: none; background: var(--bg2); font-size: 13px; white-space: nowrap; }
a.dguide:hover { border-color: var(--accent); }
a.dcard:hover { border-color: var(--accent); transform: translateY(-1px); }
#graphmodal { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.45); display: grid; place-items: center; }
#graphmodal .gm { position: relative; padding: 14px 16px; }
#graphmodal .gmclose { position: absolute; right: 12px; top: 10px; }
#flash { position: fixed; left: 50%; top: 74px; transform: translateX(-50%); z-index: 50; padding: 8px 14px; font-size: 13px; }

/* 첫 화면 미리보기·썸네일(embed) */
body.embed .hud, body.embed #panelwrap, body.embed #minimap, body.embed #timeline, body.embed #heightbar, body.embed #compass, body.embed #near, body.embed #flash { display: none !important; }
body.embed #stage { background: transparent; }

/* 높이 자르기로 걷어 낸 위층의 루트 단계 — 숨기지 않고 흐리게 + 위층 표시 */
.label3d.above { opacity: .45; }
.label3d.above::after { content: ' ↑위층'; font-size: .85em; color: var(--muted); }

/* 진행 모드(?run=1) — 옆 모니터에 띄워 두고 흘끗 보는 화면 */
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); border: 1px solid var(--line2); border-radius: 10px; padding: 5px 10px; font-size: 13px; background: rgba(255,255,255,.03); }
a.btn:hover { border-color: var(--accent); }
body.run #panelwrap, body.run #timeline, body.run #minimap, body.run #near, body.run .hudrow, body.run #heightbar,
body.run #searchbtn, body.run #layerbtn, body.run #helpbtn, body.run #runbtn { display: none !important; }
body.run .label3d:not(.runcur):not(.pull) { opacity: .55; }
body.run .label3d.runcur { border-color: var(--accent); background: var(--accent); color: #111; font-size: 14px; line-height: 25px; z-index: 2; }
#runcard { position: fixed; z-index: 9; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; overflow-y: auto; }
#runcard .rc-top { display: flex; align-items: center; gap: 12px; }
#runcard .rc-n { font-weight: 800; font-size: 15px; color: var(--accent2); white-space: nowrap; }
#runcard .rc-top .progress { flex: 1; margin: 0; }
#runcard .rc-exit { color: var(--muted); font-size: 12px; white-space: nowrap; }
#runcard h2 { margin: 2px 0 0; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; }
#runcard h2 .tag { font-size: 12px; vertical-align: middle; margin-left: 8px; }
#runcard .rc-sub { margin: 0; color: var(--muted); font-size: 14px; }
#runcard .rc-note { margin: 0; font-size: 15px; line-height: 1.55; }
#runcard .rc-boss { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); font-size: 15px; line-height: 1.5; }
#runcard .rc-boss dt { color: var(--muted); font-weight: 700; }
#runcard .rc-boss dd { margin: 0; }
#runcard .rc-boss .danger { color: #ff8f8f; }
#runcard h4 { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
#runcard .rc-pulls .pull-row { font-size: 14px; }
#runcard .rc-memo { margin: 0; color: var(--accent2); font-size: 14px; }
#runcard .rc-nav { display: flex; gap: 10px; margin-top: auto; position: sticky; bottom: -16px; margin-bottom: -16px; padding: 10px 0 16px; background: linear-gradient(rgba(18,23,21,0), #121715 22px); }   /* 내용이 길어도 버튼은 늘 보이게 */
#runcard .rc-nav button { padding: 14px 16px; font-size: 16px; font-weight: 700; border-radius: 12px; }
#runcard .rc-nav button.primary { flex: 1; background: var(--accent); border-color: var(--accent); color: #111; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#runcard .rc-nav button:disabled { opacity: .35; }
#runcard .rc-keys { margin: 0; font-size: 11px; order: -1; display: none; }
/* 가로로 넓은 창: 카드는 오른쪽, 세로·반쪽 창: 카드는 아래 */
@media (min-aspect-ratio: 5/4) {
  body.run #stage { right: 432px; }
  body.run .hud.top { right: 444px; }
  #runcard { top: 12px; right: 12px; bottom: 12px; width: 420px; }
}
@media (max-aspect-ratio: 5/4) {
  body.run #stage { bottom: 44vh; }
  #runcard { left: 10px; right: 10px; bottom: 10px; height: calc(44vh - 20px); }
  body.run #compass { bottom: calc(44vh + 14px); }
  #runcard h2 { font-size: 24px; }
}

/* 고른 층을 지금 루트가 안 지날 때 안내 */
#cliphint { position: fixed; left: 50%; top: 74px; transform: translateX(-50%); z-index: 11; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; font-size: 13px; max-width: calc(100vw - 32px); }
#cliphint[hidden] { display: none; }
#cliphint button { padding: 5px 10px; font-size: 13px; }
#cliphint button:not(.x) { border-color: var(--accent); color: var(--accent2); }
#cliphint .x { border: 0; background: none; color: var(--muted); font-size: 16px; padding: 2px 6px; }
@media (max-width: 900px) { #cliphint { top: 100px; flex-wrap: wrap; } }
body.embed #cliphint, body.run #cliphint { display: none !important; }

/* 패널 시각화 — 풀 그림 */
.pull-row.viz { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 6px; padding: 3px 8px; cursor: pointer; }   /* 레벨·위험 뱃지는 늘 오른쪽 끝 */
.pull-row.viz b { min-width: 30px; }
.mset { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.ms { display: inline-flex; align-items: center; gap: 2px; }
.ms em { font-style: normal; font-size: 11px; color: var(--ink); margin-left: 1px; }
.ms small { font-size: 12px; color: var(--muted); margin-left: 4px; }
.mg { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #a9b0a6; }
.mg.elite { width: 10px; height: 10px; background: #e0b050; box-shadow: 0 0 0 1.5px rgba(224,176,80,.35); }
.mg.caster { border-radius: 2px; transform: rotate(45deg) scale(.9); background: #6fb7ff; }
.mg.elite.caster { background: #6fb7ff; box-shadow: 0 0 0 1.5px #e0b050; }
.mg.rare { background: #c070ff; box-shadow: 0 0 0 1.5px rgba(192,112,255,.4); }
.lvb { font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 6px; line-height: 16px; white-space: nowrap; }
.lv-r { background: rgba(255,74,61,.2); color: #ff8f8f; }
.lv-o { background: rgba(255,138,42,.2); color: #ffb070; }
.lv-y { background: rgba(255,220,90,.14); color: #f1dc8a; }
.lv-g { background: rgba(140,160,140,.16); color: #9fb09f; }
.heavy { grid-column: 4; white-space: nowrap; font-size: 11px; font-weight: 700; color: #ff8f8f; border: 1px solid rgba(255,74,61,.45); border-radius: 6px; padding: 0 5px; line-height: 15px; }
.pull-row.viz:has(.heavy) { border-left-color: #ff6a5a; }
.mlegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); margin: 4px 0 8px; }
.mlegend > span { display: inline-flex; align-items: center; gap: 5px; }
.mlegend .lvb { margin: 0; }
.pull-row.viz .lvb { grid-column: 3; }
/* 보스 — 역할 아이콘 줄 */
.roles { display: grid; gap: 6px; margin: 10px 0; }
.role { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: start; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.role .ri { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; padding-top: 1px; }
.role .ri b { font-weight: 700; }
.role svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.role .rt .more::before { content: ' — '; color: var(--muted); }
.role .rt .more { color: #c9c4bb; }
.role.fold { cursor: pointer; }
.role.fold .more { display: none; }
.role.fold .lead::after { content: ' ⋯'; color: var(--muted); }
.roles.open .role.fold .more { display: inline; }
.roles.open .role.fold .lead::after { content: none; }
.r-tank .ri { color: #ffb070; } .r-tank { border-color: rgba(255,138,42,.3); }
.r-danger .ri { color: #ff8f8f; } .r-danger { border-color: rgba(255,74,61,.35); background: rgba(255,74,61,.06); }
.r-interrupt .ri { color: #ff9d7a; }
.r-dispel .ri { color: #8fc8ff; }
.r-avoid .ri { color: #f1dc8a; }
.r-before .ri { color: #b8d68f; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid; line-height: 19px; }
.chip.c-interrupt { color: #ffb4a0; border-color: rgba(255,110,80,.55); background: rgba(255,110,80,.1); }
.chip.d-magic { color: #9fd0ff; border-color: rgba(51,153,255,.55); background: rgba(51,153,255,.12); }
.chip.d-curse { color: #d9a8ff; border-color: rgba(153,51,255,.55); background: rgba(153,51,255,.13); }
.chip.d-poison { color: #a6e88a; border-color: rgba(0,153,0,.6); background: rgba(0,153,0,.13); }
.chip.d-disease { color: #e3c28f; border-color: rgba(153,102,0,.65); background: rgba(153,102,0,.15); }
#runcard .roles .role { font-size: 15px; grid-template-columns: 84px 1fr; }
#runcard .pull-row.viz { font-size: 14px; }

/* 전리품 — 부위 아이콘 + 품질 테두리 */
ul.items { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 4px; }
li.item { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.ii { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: #0f1312; border: 1.5px solid #6b716b; }
.ii svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ii.q0 { border-color: #9d9d9d; color: #9d9d9d; } .ii.q1 { border-color: #cfcac2; color: #cfcac2; } .ii.q2 { border-color: #1eff00; color: #1eff00; }
.ii.q3 { border-color: #3d9cff; color: #3d9cff; } .ii.q4 { border-color: #c070ff; color: #c070ff; } .ii.q5 { border-color: #ff8000; color: #ff8000; }
.il { font-size: 11px; color: var(--muted); }
/* 보스 체력 단계 막대 */
.phase { margin: 10px 0 4px; }
.pbar { position: relative; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #3fa34d, #d8b43a 55%, #d2513c); margin: 18px 2px 8px; }
.pbar i { position: absolute; top: -3px; width: 2px; height: 16px; background: #fff; border-radius: 1px; transform: translateX(-1px); box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.pbar b { position: absolute; top: -18px; transform: translateX(-50%); font-size: 11px; color: var(--ink); white-space: nowrap; }
.phase ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: 12px; color: #c9c4bb; }
.phase ol b { color: var(--accent2); margin-right: 4px; }
#runcard .phase ol { font-size: 14px; }
/* 루트 목록 — 세로 노선도 */
.route-item { position: relative; }
.route-item::before { content: ''; position: absolute; left: 19px; top: 34px; bottom: -8px; width: 2px; background: linear-gradient(var(--route), rgba(255,138,42,.35)); opacity: .55; }
.route-item:last-child::before { display: none; }
.route-n { position: relative; z-index: 1; background: var(--glass2); }
.route-item:not(.boss) .route-n { width: 16px; height: 16px; margin: 4px; font-size: 10px; }
.route-item.boss .route-n { width: 26px; height: 26px; margin-left: -1px; font-size: 12px; border-width: 2px; }
.route-item.done::before { background: var(--accent); opacity: .9; }

.label3d b { font-weight: 800; }
.label3d.crowded .lnm { display: none; }
.label3d.crowded:hover .lnm { display: inline; }
.label3d.crowded:hover { z-index: 3; }

.notice-new { font-size: 12px; line-height: 1.6; color: #c9c4bb; background: rgba(95,179,217,.08); border: 1px solid rgba(95,179,217,.3); border-radius: 10px; padding: 8px 10px; margin: 6px 0 10px; }

.label3d.optboss { border-style: dashed; border-color: rgba(255,176,112,.7); color: #e8d9c6; font-weight: 600; font-size: 11px; background: rgba(14,18,17,.75); }

/* 조작법 안내 한 줄 */
#ctrlhint { position: fixed; left: 50%; top: 74px; transform: translateX(-50%); z-index: 12; padding: 7px 14px; font-size: 13px; color: #d6d1c8; white-space: nowrap; transition: opacity .6s; pointer-events: none; }
#ctrlhint b { color: var(--accent2); font-weight: 700; }
#ctrlhint.out { opacity: 0; }
body.run #ctrlhint { top: 64px; }
@media (max-width: 900px) { #ctrlhint { top: 100px; font-size: 12px; white-space: normal; text-align: center; width: calc(100vw - 40px); } }
