/* v6.73.319 PC 한 화면 · v6.73.322 좌 메인 · 우 메뉴(HK 「메인 화면 좌측, 기타 메뉴 우측 6:4~7:3 · 메인 아래 정보란 · 오른쪽은 메뉴마다 바뀌고 스크롤」) (HK 10-20 「PC UI 배열이 엉성 — 스크롤 없이 한 화면에서 다 실행, 메뉴 버튼으로 전환은 가능」)
   2서버 마을 화면(body.tv2) · 가로 1180px 이상 · 세로 620px 이상에서만. 휴대폰 · 좁은 창은 그대로.
   원칙: 머리 · 목표 줄 · 아래 줄을 한 줄씩으로 줄이고, 본문은 화면 높이에 맞춘 판(grid) 안에 넣는다.
         넘치는 부속(길잡이 · 소식 · 오른쪽 대장간 칸)은 그 칸 안에서만 굴린다 — 화면 전체는 굴리지 않는다. */
@media (min-width:1180px) and (min-height:520px){
html body.tv2{--pf-gap:8px;max-width:min(1680px,100vw)!important}
/* v6.73.349 HK 「전체화면에서 여전히 스크롤이 안 됨」 — 창 스크롤 잠금은 메인(전장) 화면일 때만. 다른 탭(탑 · 퀘스트 · 친구 …)은 판 높이를 맞추지 않아 아래가 잘린 채 굴릴 수 없었다 */
html body.tv2:has(#t-main.on){overflow:hidden}
/* 머리 — 위아래 여백만 줄인다(배치는 그대로) */
html body.tv2 #brand-header{padding-top:4px!important;padding-bottom:4px!important}
/* 목표 줄 — 한 줄 */
html body.tv2 #goalbar{min-height:0!important;margin:3px 12px 0!important;padding:3px 10px!important;box-sizing:border-box}
html body.tv2 #goalbar #goal-t{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.tv2 #goalbar #goal-t br{display:none}
/* 아래 줄 — 재화 · 강화/채팅/더보기 · 마을/원정/가방/친구를 한 줄로 */
html body.tv2 #game-dock{width:min(1400px,calc(100vw - 24px))!important;display:grid!important;grid-template-columns:auto minmax(260px,.9fr) minmax(360px,1.3fr);align-items:center;gap:10px;padding:4px 10px!important;bottom:6px!important}
html body.tv2 #game-dock #resbar,html body.tv2 #game-dock #wealthbar{grid-column:1;grid-row:1;width:auto!important;white-space:nowrap;min-height:0;padding:0 4px;gap:10px}
html body.tv2 #game-dock #fabs{grid-column:2;grid-row:1;padding:0!important;gap:6px}
html body.tv2 #game-dock #fabs>.btn{min-height:40px!important;padding:4px 10px!important}
html body.tv2 #game-dock nav{grid-column:3;grid-row:1;padding:0!important;border-top:0!important;gap:6px}
html body.tv2 #game-dock nav button{min-height:44px!important;padding:3px 4px!important;flex-direction:row!important;gap:6px!important;justify-content:center}
html body.tv2 #game-dock nav button small{font-size:10px;opacity:.75}
/* 본문 판 — 화면 높이에 맞춘다 */
html body.tv2 main{padding-bottom:0!important;max-width:min(1680px,100vw);margin-inline:auto;box-sizing:border-box}
html body.tv2 #t-main.on{height:var(--pf-h,calc(100dvh - var(--pf-top,120px) - var(--game-dock-height) - 22px));min-height:0;overflow:hidden;box-sizing:border-box;align-content:stretch}

/* ── v6.73.322 판 나누기: 왼쪽 65 = 메인(전장) + 그 아래 정보란 / 오른쪽 35 = 메뉴(누른 메뉴에 따라 바뀜 · 그 칸만 굴림) ── */
html body.tv2 #t-main.on{--pf-side:minmax(340px,35fr)}
html body.tv2 #t-main.on>:is(#a1-focus,#town-weapon-traits,#town-forge-pane,#a1-town,#af-forge,#a1pager){min-height:0}
html body.tv2 #a1-stage #demon .pixel-viewport{height:clamp(200px,calc(100dvh - 480px),520px)!important;max-height:none!important}
html body.tv2 .pf-scroll,html body.tv2 #t-main.on :is(#a1-focus,#town-weapon-traits,#town-forge-pane,#af-forge,#a1pager){overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}

/* 마을(tv-town) — 왼쪽: 전장 / 아래 정보란 [길잡이 · 지금 할 일 | 무기 특성] · 오른쪽: 건물(메뉴) + 대장간 */
html body.tv2.tv-town #t-main.on{display:grid!important;grid-template-columns:minmax(0,42fr) minmax(0,23fr) var(--pf-side)!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:var(--pf-gap) 12px!important;align-items:stretch}
html body.tv2.tv-town #t-main.on>#a1-stage{grid-column:1 / 3;grid-row:1 / 4;min-height:0;overflow:auto}
html body.tv2.tv-town #t-main.on>#a1-stage.town-workbench{display:grid!important;grid-column:1 / -1;grid-row:1 / -1;grid-template-columns:subgrid!important;grid-template-rows:subgrid!important;gap:inherit!important;min-height:0!important;height:auto!important;max-height:100%;align-self:stretch;background:none!important;border:0!important;padding:0!important;margin:0!important;overflow:visible;pointer-events:none}
html body.tv2.tv-town #a1-stage.town-workbench>*{pointer-events:auto}
html body.tv2.tv-town #a1-stage.town-workbench>#demon{grid-column:1 / 3;grid-row:1 / 3;align-self:start;margin:0!important}
html body.tv2.tv-town #a1-stage.town-workbench>#a1-focus{grid-column:1;grid-row:3;margin:0!important}
html body.tv2.tv-town #a1-stage.town-workbench>:is(#a1-focus,#town-weapon-traits,#town-forge-pane){align-self:stretch;height:auto!important;min-height:0!important;max-height:100%!important}
html body.tv2.tv-town #a1-stage.town-workbench>#town-weapon-traits{grid-column:2;grid-row:3;margin:0!important;max-height:none;box-sizing:border-box}
html body.tv2.tv-town #a1-stage.town-workbench>#town-forge-pane{grid-column:3;grid-row:2 / 4;margin:0!important;max-height:none;display:block}
html.gori-art-v2 body.tv2.tv-town #town-forge-pane #growth-center[data-docked]{max-height:none!important;min-height:0!important}
html body.tv2.tv-town #t-main.on>#a1-town{grid-column:3;grid-row:1;margin:0!important;padding:0!important;align-self:start}
html body.tv2.tv-town #a1-town .tv-head{display:none}
html body.tv2.tv-town #a1-town .tv-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-flow:row;gap:5px!important}
html body.tv2.tv-town #a1-town .tv-b{min-height:0!important;height:44px;padding:3px 6px!important;gap:5px!important;overflow:hidden}
html body.tv2.tv-town #a1-town .tv-b *{white-space:nowrap}
html body.tv2.tv-town #a1-town .tv-b .tv-h{width:28px!important;height:28px!important;flex:0 0 28px!important;font-size:16px!important}
html body.tv2.tv-town #a1-town .tv-b .tv-t{min-width:0;overflow:hidden;text-overflow:ellipsis}
html body.tv2.tv-town #a1-town .tv-b.ladder-dim .tv-t :is(em,small){visibility:hidden}
html body.tv2.tv-town #a1-town .tv-b.ladder-dim::after{left:40px;right:auto;bottom:4px}

/* 원정(tv-war) — 왼쪽: 전장 + 아래 길잡이(정보란) · 오른쪽: 방 머리 · 소식 · 전투 상세 */
html body.tv2.tv-war #t-main.on{display:grid!important;grid-template-columns:minmax(0,65fr) var(--pf-side)!important;grid-template-rows:auto minmax(0,1fr)!important;gap:var(--pf-gap) 12px!important}
html body.tv2.tv-war #t-main.on>#a1-stage{grid-column:1;grid-row:1 / -1;min-height:0;height:auto!important;max-height:100%;align-self:stretch;overflow:hidden;display:flex!important;flex-direction:column;gap:var(--pf-gap)}
html body.tv2.tv-war #t-main.on>#a1-stage>#demon{order:1;flex:none;margin:0!important}
/* v6.73.326 HK 「사냥터에서 배치가 이상」: 사냥 중(field-active)엔 town-workbench가 원정 화면에도 무기 특성 · 대장간 칸을 끼워 넣는다 → 원정 화면에선 그 둘을 숨기고 전장 · 길잡이만 */
html body.tv2.tv-war #t-main.on>#a1-stage.town-workbench{display:flex!important;grid-template-columns:none!important;grid-template-rows:none!important}
html body.tv2.tv-war #t-main.on>#a1-stage.town-workbench>:is(#town-weapon-traits,#town-forge-pane){display:none!important}
html body.tv2.tv-war #t-main.on>#a1-stage>#a1-focus{order:2;flex:1 1 auto;min-height:120px;width:auto!important;max-width:none!important;align-self:stretch}
html body.tv2.tv-war #t-main.on>#a1-stage>#a1-focus{order:2;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;margin:0!important}
html body.tv2.tv-war #a1pager :is(.a1pg,#side-col){display:block!important;grid-template-columns:none!important}
html body.tv2.tv-war #a1pager :is(#side-col>*,#newsdock){width:auto!important;max-width:none!important;margin-bottom:8px}
html body.tv2.tv-war #t-main.on>#a1-roomhd{grid-column:2;grid-row:1;margin:0!important}
html body.tv2.tv-war #t-main.on>#a1pager{grid-column:2;grid-row:2;margin:0!important}
html body.tv2.tv-war #t-main.on>:not(#a1-stage):not(#a1-roomhd):not(#a1pager):not(#af-forge){grid-column:2}

/* v6.73.337 방(tv-room: 세력 본부 · 원정 게시판 · 파츠 공방 · 사냥터 · 여관 …) — 원정과 같은 두 칸: 왼쪽 전장, 오른쪽 방 머리 + 방 내용(그 칸만 굴림). 전에는 전장 아래로 밀려 창 밖이었다 */
html body.tv2.tv-room #t-main.on{display:grid!important;grid-template-columns:minmax(0,65fr) var(--pf-side)!important;grid-template-rows:auto minmax(0,1fr)!important;gap:var(--pf-gap) 12px!important}
html body.tv2.tv-room #t-main.on>#a1-stage{grid-column:1;grid-row:1 / -1;min-height:0;height:auto!important;max-height:100%;align-self:stretch;overflow:hidden;display:flex!important;flex-direction:column;gap:var(--pf-gap)}
html body.tv2.tv-room #t-main.on>#a1-stage>#demon{order:1;flex:none;margin:0!important}
html body.tv2.tv-room #t-main.on>#a1-stage.town-workbench{display:flex!important;grid-template-columns:none!important;grid-template-rows:none!important}
html body.tv2.tv-room #t-main.on>#a1-stage.town-workbench>:is(#town-weapon-traits,#town-forge-pane){display:none!important}
html body.tv2.tv-room #t-main.on>#a1-stage>#a1-focus{order:2;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;margin:0!important;width:auto!important;max-width:none!important}
html body.tv2.tv-room #t-main.on>#a1-roomhd{grid-column:2;grid-row:1;margin:0!important}
html body.tv2.tv-room #t-main.on>:is(#a1-room,#a1pager){grid-column:2;grid-row:2;margin:0!important;min-height:0;overflow:auto;overscroll-behavior:contain}
html body.tv2.tv-room:is([data-tvroom=inn],[data-tvroom=trial],[data-tvroom=goal]) #t-main.on>#a1-room{display:none!important}
html body.tv2.tv-room #a1pager :is(.a1pg,#side-col){display:block!important;grid-template-columns:none!important}
html body.tv2.tv-room #t-main.on>:not(#a1-stage):not(#a1-roomhd):not(#a1pager):not(#a1-room):not(#af-forge){grid-column:2}
html body.tv2.fp-inline.tv-room #t-main.on>#a1-room{display:none!important}

/* 강화(fp-inline) — 메인은 그대로 두고, 오른쪽 메뉴 칸이 강화 판으로 바뀐다 */
html body.tv2.fp-inline #t-main.on>#af-forge{grid-column:-2 / -1!important;grid-row:1 / -1!important;margin:0!important;align-self:stretch;max-height:none}
html body.tv2.fp-inline #t-main.on>:is(#a1-town,#a1-roomhd,#a1pager),html body.tv2.fp-inline #a1-stage.town-workbench>#town-forge-pane{display:none!important}
html body.tv2.fp-inline #af-forge .aff-hd{position:sticky;top:0;z-index:2;background:inherit}

/* 무기 강화 판(오른쪽 칸 · 한 줄 흐름): 수치 → 강화 버튼 → 망치 연출 → 결과 → 다음 단계 → 부적 → 연속 · 보호석 → 상태 → 슬롯 */
html body.tv2 #af-forge #forge{display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-areas:"fx" "act" "stage" "msg" "fail" "items" "rep" "status" "slot";gap:7px;align-items:start;padding:8px 10px}
html body.tv2 #af-forge #forge>.fx{grid-area:fx;margin:0}
html body.tv2 #af-forge #forge>#f-items{grid-area:items;margin:0;justify-content:flex-start;flex-wrap:wrap}
html body.tv2 #af-forge #forge>#forge-effect-stage{grid-area:stage;min-height:0!important;height:clamp(96px,calc(100dvh - 600px),156px)!important;max-height:156px!important;margin:0}
html body.tv2 #af-forge #forge>#forge-effect-stage canvas{height:100%!important;min-height:0!important;object-fit:cover}
html body.tv2 #af-forge #forge>#f-msg{grid-area:msg;margin:0;max-height:72px;overflow:auto}
html body.tv2 #af-forge #forge>.act{grid-area:act;margin:0}
html body.tv2 #af-forge #forge>.act .btn{min-height:54px!important;font-size:16px}
html body.tv2 #af-forge #forge>#f-fail{grid-area:fail;margin:0;text-align:left;white-space:normal}
html body.tv2 #af-forge #forge>#wg-repeat{grid-area:rep;margin:0}
html body.tv2 #af-forge #forge>#a1-battle-status{grid-area:status;margin:0}
html body.tv2 #af-forge #forge>#rare-slot-entry{grid-area:slot;margin:0}
html body.tv2 #af-forge #forge>.fx #f-img{flex:0 0 112px!important;width:112px!important;max-width:112px!important;height:auto!important;min-height:112px!important;max-height:none!important;overflow:visible!important;display:flex!important;align-items:center;justify-content:center}
/* v6.73.326 HK 「무기가 잘려 보임」: 무기 그림(.swdwrap 100×200을 줄여 넣던 것)이 108px 칸에 120px로 들어가 위아래가 잘렸다 — 칸 안에 들어가는 크기로 */
html body.tv2 #af-forge #forge>.fx #f-img .swdwrap,html body.tv2 #af-forge #forge>.fx #f-img .swdwrap :is(img.bmp,.swd){width:52px!important;height:104px!important;transform:none!important;zoom:1!important}

/* 가방 · 채팅 — 왼쪽을 덮지 않고 오른쪽 메뉴 칸 자리에 연다(pc-fit.js가 --pf-side-* 를 잰다) */
html body.tv2.drawer-open::before{display:none!important}
html body.tv2 #t-inv.drawer{left:var(--pf-side-l,auto)!important;right:auto!important;top:var(--pf-side-t,110px)!important;bottom:auto!important;width:var(--pf-side-w,420px)!important;height:var(--pf-side-h,60vh)!important;max-height:none!important;padding:12px 14px 16px!important;border:1px solid #ffffff1c!important;border-radius:12px;box-shadow:0 10px 30px #000a!important;box-sizing:border-box}
html body.tv2 #chat.fdock{position:fixed!important;left:var(--pf-side-l,auto)!important;right:auto!important;top:var(--pf-side-t,110px)!important;bottom:auto!important;width:var(--pf-side-w,420px)!important;height:var(--pf-side-h,60vh)!important;max-height:none!important;transform:none!important;box-sizing:border-box;background:#14171d!important;flex-direction:column;border-radius:12px}
html body.tv2 #chat.fdock:not([style*="none"]){display:flex!important}
html body.tv2 #chat.fdock>#ch-body{flex:1 1 auto;min-height:0;max-height:none!important;height:auto!important}

/* ── v6.73.329 고리 홈(body.gori-home — 서버 고르기 첫 화면) 한 화면: #t-home이 창 높이 판이 되고(넘치면 그 안에서만 굴림), 「전체 현황」은 요약 3칸 한 줄 + 세계의 문 4칸 한 줄로 ── */
html body.tv2.gori-home main{padding-bottom:0!important}
html body.tv2.gori-home #t-home.on{height:calc(100dvh - var(--pf-top,64px) - var(--game-dock-height) - 16px)!important;min-height:0;max-width:min(1600px,calc(100vw - 24px))!important;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;box-sizing:border-box;padding:8px 12px 12px!important}
html body.tv2.gori-home #t-home[data-overview] .gori-overview{margin:0}
html body.tv2.gori-home #t-home[data-overview] .go-heading{padding:6px 14px!important;margin-bottom:8px;min-height:0}
html body.tv2.gori-home #t-home[data-overview] .go-heading h2{font-size:20px!important;margin:0}
html body.tv2.gori-home #t-home[data-overview] .go-heading small{display:none}
html body.tv2.gori-home #t-home[data-overview] .go-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px}
html body.tv2.gori-home #t-home[data-overview] .go-summary article{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:10px 14px!important;gap:2px 12px}
html body.tv2.gori-home #t-home[data-overview] .go-summary article>*{margin:0}
html body.tv2.gori-home #t-home[data-overview] .go-summary .btn{grid-column:2;grid-row:1/4;align-self:center;margin:0!important;min-height:40px!important;padding:6px 14px!important;white-space:nowrap}
html body.tv2.gori-home #t-home[data-overview] .gori-status{padding:6px 10px!important;margin:8px 0!important}
html body.tv2.gori-home #t-home[data-overview] .gori-status .btn{min-height:36px!important}
html body.tv2.gori-home #t-home[data-overview] .gori-section-title{margin:6px 0!important}
html body.tv2.gori-home #t-home[data-overview] .gori-portals{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px}
html body.tv2.gori-home #t-home[data-overview] .gori-portal{grid-template-columns:88px minmax(0,1fr)!important;min-height:150px!important}
html body.tv2.gori-home #t-home[data-overview] .portal-copy{padding:10px 12px!important}
html body.tv2.gori-home #t-home[data-overview] .portal-copy strong{font-size:17px!important}
html body.tv2.gori-home #t-home[data-overview] .go-world-info{font-size:12.5px!important;line-height:1.55!important}
html body.tv2.gori-home #t-home[data-overview] .go-extra{margin-top:10px}
}
/* v6.73.502 제보 「PC 웹에서 스크롤이 안 내려가 누를 수 없는 버튼 · 보이지 않는 메뉴가 많다」
   - 원정: 왼쪽(전장 + 정보란)이 칸 밖으로 잘렸다(overflow hidden) → 왼쪽 칸 전체를 굴린다, 정보란은 최소 140px
   - 원정: 오른쪽 메뉴(#a1pager)가 칸보다 길게 늘어나 아래가 화면 밖 → 칸 높이에 맞추고 그 안에서 굴린다
   - 판 높이(--pf-h)는 하단 바뿐 아니라 광장 줄 위까지(pc-fit.js) */
@media (min-width:1180px) and (min-height:520px){
html body.tv2.tv-war #t-main.on>#a1-stage{overflow-y:auto!important;overscroll-behavior:contain;scrollbar-width:thin}
html body.tv2.tv-war #t-main.on>#a1-stage>#a1-focus{flex:1 0 auto!important;min-height:140px!important}
html body.tv2:is(.tv-war,.tv-room) #t-main.on>#a1pager{min-height:0!important;max-height:100%!important;height:auto;align-self:stretch;overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin}
html body.tv2.tv-town #t-main.on>#a1-stage.town-workbench>:is(#a1-focus,#town-weapon-traits,#town-forge-pane){overflow:auto!important}
}
