/* 메뉴·로비 화면 */
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; background: var(--bg0); }
#app { position: fixed; inset: 0; z-index: 10; overflow: hidden; }
#hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#screens { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
#screens > * { pointer-events: auto; }
#overlay { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
#overlay > * { pointer-events: auto; }

/* 배경 키아트 (모든 메뉴 화면 공통) */
.menu-bg { position: absolute; inset: 0; overflow: hidden; background: var(--bg0); }
.menu-bg .img { position: absolute; inset: -4%; background-size: cover; background-position: center 40%; filter: saturate(0.9) contrast(1.05); transform-origin: 50% 50%; }
.menu-bg.drift .img { animation: drift 48s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.04) translate(-1.2%, 0.6%); } to { transform: scale(1.12) translate(1.4%, -1%); } }
.menu-bg .dim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 6, 11, 0.94) 0%, rgba(4, 6, 11, 0.78) 34%, rgba(4, 6, 11, 0.35) 62%, rgba(4, 6, 11, 0.55) 100%), linear-gradient(0deg, rgba(4, 6, 11, 0.9) 0%, rgba(4, 6, 11, 0) 35%); }
.menu-bg .flicker { position: absolute; inset: 0; background: radial-gradient(ellipse at 62% 48%, rgba(255, 120, 30, 0.08), transparent 55%); animation: flick 3.2s ease-in-out infinite; }
@keyframes flick { 0%, 100% { opacity: 0.6; } 40% { opacity: 1; } 55% { opacity: 0.7; } 70% { opacity: 0.95; } }
#app.sub > .menu-bg .dim { background: linear-gradient(90deg, rgba(4, 6, 11, 0.96) 0%, rgba(4, 6, 11, 0.9) 50%, rgba(4, 6, 11, 0.82) 100%); }
#app.sub > .menu-bg .img { filter: saturate(0.5) brightness(0.6); animation: none; transform: scale(1.06); }   /* 하위 화면: 블러 대신 어둡게 (소프트웨어 렌더링에서도 가벼움) */
/* 공포 분위기: 배경 채도 낮추고 차갑게, 불빛은 붉게 흔들림 */
.menu-bg.horror .img { filter: saturate(0.62) contrast(1.12) brightness(0.9); }
.menu-bg.horror .flicker { background: radial-gradient(ellipse at 62% 48%, rgba(255, 90, 30, 0.1), transparent 55%), radial-gradient(ellipse at 90% 10%, rgba(160, 0, 12, 0.22), transparent 40%); animation: flick2 2.6s ease-in-out infinite; }
@keyframes flick2 { 0%, 100% { opacity: 0.55; } 30% { opacity: 1; } 42% { opacity: 0.5; } 55% { opacity: 0.9; } 61% { opacity: 0.35; } 70% { opacity: 0.95; } }
.menu-bg.horror .fx-blood { z-index: 1; }
#app.sub > .menu-bg.horror .fx-blood { opacity: calc(0.22 * var(--horror)); }
.horror .menu-tagline { color: #d9b3b3; }
.horror .menu-tagline::after { content: ''; display: block; width: 36px; height: 2px; background: var(--danger); margin-top: 8px; box-shadow: 0 0 10px rgba(255, 59, 48, 0.6); }

/* 화면 공통 */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; animation: fadeIn 0.3s var(--ease) both; }
.scr-content { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.topbar { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 22px 40px 0; gap: 20px; }
.logo { display: flex; flex-direction: column; line-height: 1; cursor: default; }
.logo .ko { font-family: var(--f-title); font-size: 42px; letter-spacing: -0.01em; color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7); }
.logo .en { font-family: var(--f-cap); font-size: 12px; letter-spacing: 0.56em; color: var(--amber); margin-top: 4px; padding-left: 3px; }
.logo img { height: 56px; width: auto; }
.logo.small .ko { font-size: 26px; }
.logo.small .en { font-size: 9px; letter-spacing: 0.44em; margin-top: 2px; }
.player-chip { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); backdrop-filter: blur(8px); }
.player-chip .avatar { width: 30px; height: 30px; border-radius: 2px; background: linear-gradient(160deg, #2a3a5e, #0f172b); border: 1px solid var(--line2); display: grid; place-items: center; font-family: var(--f-num); font-weight: 700; color: var(--amber); font-size: 14px; }
.player-chip .pname { font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-chip .online { display: flex; align-items: center; gap: 6px; font-family: var(--f-cap); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; padding-right: 8px; border-right: 1px solid var(--line); margin-right: 2px; }
.player-chip .online i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.bottombar { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 40px 18px; gap: 20px; font-size: 12px; color: var(--muted); }
.bottombar .links { display: flex; gap: 16px; }
.bottombar .ver { font-family: var(--f-cap); letter-spacing: 0.14em; text-transform: uppercase; font-size: 11px; }

/* 상단 배너 */
.banner { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 32px; background: var(--amber); color: #15120a; font-size: 13px; font-weight: 500; z-index: 2; }
.banner a { color: inherit; text-decoration: underline; }

/* 메인 메뉴 */
.menu-main { position: relative; flex: 1; display: grid; grid-template-columns: minmax(360px, 460px) 1fr minmax(280px, 340px); gap: 40px; padding: 26px 40px 10px; min-height: 0; }
.menu-tagline { font-size: 14px; color: var(--text2); margin: 0 0 18px 2px; letter-spacing: 0.02em; }
.menu-list { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left;
  padding: 11px 18px 11px 22px; border-radius: var(--r); color: var(--text);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.menu-item::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--amber); opacity: 0; transform: scaleY(0.4); transition: opacity 0.18s, transform 0.18s var(--ease); }
.menu-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 178, 30, 0.14), rgba(255, 178, 30, 0) 70%); opacity: 0; transition: opacity 0.18s; border-radius: var(--r); }
.menu-item:hover, .menu-item:focus-visible, .menu-item.sel { transform: translateX(10px); outline: none; }
.menu-item:hover::before, .menu-item:focus-visible::before, .menu-item.sel::before { opacity: 1; transform: scaleY(1); }
.menu-item:hover::after, .menu-item:focus-visible::after, .menu-item.sel::after { opacity: 1; }
.menu-item .en { font-family: var(--f-cap); font-size: 11px; letter-spacing: 0.3em; color: var(--amber); text-transform: uppercase; margin-bottom: 1px; }
.menu-item .ko { font-family: var(--f-title); font-size: 27px; line-height: 1.1; color: #fff; }
.menu-item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.menu-item:hover .sub, .menu-item.sel .sub { color: var(--text2); }
.menu-item .arrow { font-family: var(--f-num); font-size: 20px; color: var(--amber); opacity: 0; transform: translateX(-6px); transition: opacity 0.18s, transform 0.18s var(--ease); }
.menu-item:hover .arrow, .menu-item.sel .arrow { opacity: 1; transform: none; }
.menu-item.primary .ko { font-size: 32px; }
.menu-item:disabled { opacity: 0.35; cursor: default; }
.menu-item:disabled:hover { transform: none; }
.menu-item:disabled:hover::before, .menu-item:disabled:hover::after { opacity: 0; }
/* 좀비서울 다운로드 (PC 설치판, 2026-10-23 U9): 덜 쓰는 길이라 목록 맨 아래에 작게, 위에 가는 선 + 내려받기 아이콘 */
.menu-item.dl { grid-template-columns: auto 1fr auto; column-gap: 14px; margin-top: 10px; padding-top: 12px; padding-bottom: 10px; color: var(--text); text-decoration: none; }
.menu-item.dl { border-top: 1px solid var(--line); border-radius: 0; }
.menu-item.dl .ko { font-size: 20px; }
.menu-item.dl .dl-ico { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255, 178, 30, 0.55); border-radius: var(--r); color: var(--amber); background: rgba(255, 178, 30, 0.08); }
.menu-item.dl .dl-ico svg { width: 20px; height: 20px; display: block; }
.menu-item.dl:hover .dl-ico, .menu-item.dl.sel .dl-ico { background: var(--amber); color: #15120a; }

/* 뉴스 카드 */
.news-col { display: flex; flex-direction: column; gap: 12px; align-self: start; max-height: 100%; overflow: auto; padding-right: 2px; }
.news-col .cap { margin-bottom: 2px; }
.news-card { display: block; flex: none; text-align: left; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(8px); border-radius: var(--r); overflow: hidden; transition: border-color 0.18s, transform 0.18s var(--ease); color: var(--text); }
.news-card:hover { border-color: rgba(255, 178, 30, 0.6); transform: translateY(-2px); }
.news-card .img { aspect-ratio: 16 / 7; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.news-card .body { padding: 10px 12px 12px; }
.news-card .t { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.news-card .b { font-size: 12px; color: var(--text2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .bar { height: 2px; background: var(--amber); width: 28px; margin-bottom: 8px; }

/* 하위 화면 틀 */
.sub-wrap { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 18px 40px 20px; }
.sub-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.sub-head .back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--f-cap); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 8px; transition: color 0.15s; }
.sub-head .back:hover { color: var(--amber); }
.sub-head .back .kbd { height: 20px; min-width: 22px; font-size: 11px; }
.sub-head h1 { font-family: var(--f-title); font-size: 38px; line-height: 1; color: #fff; }
.sub-head .sub { color: var(--text2); margin-top: 6px; font-size: 13px; }
.sub-body { flex: 1; min-height: 0; display: flex; gap: 20px; }

/* 맵 선택 */
.maps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: start; flex: 1.4; min-height: 0; overflow: auto; padding: 2px; }
.map-card { position: relative; text-align: left; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg1); transition: border-color 0.18s, transform 0.18s var(--ease); color: var(--text); }
.map-card .img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.6s var(--ease); }
.map-card .sh { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4, 6, 11, 0.95) 0%, rgba(4, 6, 11, 0.2) 55%, rgba(4, 6, 11, 0) 100%); }
.map-card .tx { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.map-card .area { font-family: var(--f-cap); font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--amber); }
.map-card .t { font-family: var(--f-title); font-size: 21px; color: #fff; line-height: 1.1; margin-top: 2px; }
.map-card .role { font-size: 11px; color: var(--text2); margin-top: 3px; }
.map-card:hover .img, .map-card.sel .img { transform: scale(1.05); }
.map-card:hover, .map-card.sel { border-color: var(--amber); transform: translateY(-2px); }
.map-card.sel::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--amber); border-radius: var(--r); pointer-events: none; }
.map-card.locked .img { filter: grayscale(1) brightness(0.5); }
.map-card.locked .t { color: var(--text2); }
.map-card .lock { position: absolute; top: 10px; right: 10px; }
.map-detail { flex: 1; display: flex; flex-direction: column; min-width: 320px; max-width: 420px; }
.map-detail .hero { position: relative; aspect-ratio: 16 / 9; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.map-detail .hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 13, 26, 1) 0%, rgba(8, 13, 26, 0) 50%); }
.map-detail .hero .tx { position: absolute; left: 18px; right: 18px; bottom: 12px; z-index: 1; }
.map-detail .hero .area { font-family: var(--f-cap); font-size: 12px; letter-spacing: 0.3em; color: var(--amber); text-transform: uppercase; }
.map-detail .hero .t { font-family: var(--f-title); font-size: 30px; color: #fff; line-height: 1.05; margin-top: 2px; }
.map-detail .info { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; overflow: auto; }
.map-detail .meta { display: flex; gap: 20px; }
.map-detail .meta div { display: flex; flex-direction: column; gap: 2px; }
.map-detail .meta b { font-weight: 500; font-size: 13px; }
.map-detail .desc { font-size: 13px; color: var(--text2); line-height: 1.6; }
.map-detail .foot { padding: 14px 18px; border-top: 1px solid var(--line); }

/* 방 만들기 옵션 (모달) */
.opt-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.opt-row:last-of-type { border-bottom: 0; }
.opt-row .lab { font-size: 13px; color: var(--text2); }
.opt-row .ctl { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.opt-row .hint { font-size: 12px; color: var(--muted); }

/* 방 참가 = FPS 방 목록 (2026-10-23 U9 "스타유즈맵이나 카스온라인 같은 FPS의 방처럼"): 위 거르기 탭 + 표(머리 줄·줄마다 칸) + 아래 코드 칸·들어가기
   칸 너비 = 칸마다 정한 값 (menu.js RB_COL_W, 머리 줄과 줄에 같은 grid-template-columns). 고른 줄 = 주황 띠, 게임 중·꽉 찬 방 = 흐리게 */
.sub-body.rb { flex-direction: column; gap: 12px; }
.rb-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.rb-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 6px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); }
.rb-filters { display: flex; }
.rb-filter { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; color: var(--muted); font-weight: 700; font-size: 14px; transition: color 0.15s; }
.rb-filter .n { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); font-family: var(--f-num); font-weight: 700; font-size: 14px; color: var(--text2); }
.rb-filter:hover { color: var(--text); }
.rb-filter.on { color: #fff; }
.rb-filter.on .n { background: var(--amber); color: #15120a; }
.rb-filter.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; background: var(--amber); }
.rb-table { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rb-head, .room-row { display: grid; align-items: center; column-gap: 16px; padding: 0 20px; }
.rb-head { flex: none; height: 38px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.rb-rows { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
.rb-head { padding-right: 28px; }   /* 줄 쪽 스크롤바 자리(8px)만큼 머리 줄도 비워 칸이 맞게 */
.rb-c { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-head [data-col=players], .room-row .c-n { text-align: center; }
.room-row { position: relative; height: 50px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; transition: background 0.12s; }
.room-row:nth-child(even) { background: rgba(255, 255, 255, 0.018); }
.room-row:hover { background: rgba(255, 255, 255, 0.06); }
.room-row.sel { background: linear-gradient(90deg, rgba(255, 178, 30, 0.24), rgba(255, 178, 30, 0.07) 70%, rgba(255, 178, 30, 0.03)); }
.room-row.sel::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--amber); }
.room-row .c-no, .room-row .c-n, .room-row .c-code { font-family: var(--f-num); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.room-row .c-no { color: var(--muted); letter-spacing: 0.08em; }
.room-row .c-title { font-weight: 700; font-size: 15px; color: #fff; }
.room-row .c-map { font-size: 14px; color: var(--text2); }
.room-row .c-n.full { color: #ff8a84; }
.room-row .c-code { color: var(--amber); letter-spacing: 0.16em; }
.room-row .c-diff { font-size: 13px; color: var(--text2); }
.room-row.closed { cursor: default; }
.room-row.closed > .rb-c { opacity: 0.55; }
.room-row.closed:hover { background: rgba(255, 255, 255, 0.03); }
.room-row.closed.sel { background: rgba(255, 255, 255, 0.07); }
.room-row.closed.sel::before { background: var(--line2); }
.room-empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.rb-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.join-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.join-left .input.code { width: 200px; height: 50px; font-size: 22px; letter-spacing: 0.32em; flex: none; }
.join-left .btn { flex-shrink: 0; }
.rb-foot > .btn.primary { min-width: 200px; flex-shrink: 0; }

/* 방 화면 */
.room-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 20px; flex: 1; min-height: 0; }
.room-left { display: flex; flex-direction: column; min-height: 0; gap: 14px; }
.slots { display: grid; gap: 10px; }
.slots.n4 { grid-template-columns: repeat(2, 1fr); }
.slots.n8 { grid-template-columns: repeat(4, 1fr); }
.slots.n16 { grid-template-columns: repeat(4, 1fr); }
.slot { position: relative; display: flex; align-items: center; gap: 12px; height: 72px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.slots.n16 .slot { height: 56px; }
.slot::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line2); }
.slot.ready::before { background: var(--green); box-shadow: 0 0 10px rgba(93, 255, 122, 0.6); }
.slot.me { border-color: rgba(255, 178, 30, 0.5); }
.slot.me::before { background: var(--amber); }
.slot.empty { border-style: dashed; background: rgba(255, 255, 255, 0.02); }
.slot .sil { width: 40px; height: 40px; flex: none; border-radius: 2px; background: linear-gradient(160deg, #22304f, #0d1426); border: 1px solid var(--line); display: grid; place-items: center; }
.slot .sil svg { width: 24px; height: 24px; fill: rgba(255, 255, 255, 0.75); }
.slot.empty .sil { opacity: 0.35; }
.slot .info { flex: 1; min-width: 0; }
.slot .nm { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.slot .nm .host-tag { font-family: var(--f-cap); font-size: 10px; letter-spacing: 0.16em; color: var(--amber); border: 1px solid rgba(255, 178, 30, 0.5); padding: 1px 5px; border-radius: 2px; }
.slot .st { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; }
.slot .st .ping { font-family: var(--f-num); font-weight: 600; }
.slot .badge { font-family: var(--f-cap); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--line2); border-radius: 2px; color: var(--muted); }
.slot.ready .badge { color: var(--green); border-color: rgba(93, 255, 122, 0.5); }
.slot .kick { position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 2px; color: var(--muted); font-size: 14px; line-height: 1; opacity: 0; transition: opacity 0.15s, color 0.15s; }
.slot:hover .kick { opacity: 1; }
.slot .kick:hover { color: var(--danger); background: rgba(255, 59, 48, 0.12); }
.slot.empty .nm { color: var(--muted); font-weight: 400; }
.chat { flex: 1; min-height: 140px; display: flex; flex-direction: column; }
.chat .log { flex: 1; overflow: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.chat .log .m .n { color: var(--amber2); font-weight: 500; margin-right: 6px; }
.chat .log .m.sys { color: var(--muted); font-size: 12px; }
.chat .log .m.me .n { color: var(--cyan); }
.chat form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.chat form .input { height: 36px; background: rgba(0, 0, 0, 0.3); }
.room-right { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: auto; scrollbar-width: none; }
/* 오른쪽 칸 스크롤바 숨김 (대표님 2026-10-22 "인원·캐릭터 고를 때 우측 하단 스크롤바 없게"): 낮은 화면에선 아래 @media 로 줄여서 들어가게 하고, 그래도 넘치면 휠로만 내려감 */
.room-right::-webkit-scrollbar { width: 0; height: 0; display: none; }
.room-map { position: relative; aspect-ratio: 16 / 8; background-size: cover; background-position: center; border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
.room-map::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 13, 26, 1) 0%, rgba(8, 13, 26, 0.1) 60%); }
.room-map .tx { position: absolute; left: 16px; right: 16px; bottom: 10px; z-index: 1; }
.room-map .area { font-family: var(--f-cap); font-size: 11px; letter-spacing: 0.3em; color: var(--amber); text-transform: uppercase; }
.room-map .t { font-family: var(--f-title); font-size: 24px; color: #fff; line-height: 1.05; }
.room-map .chg { position: absolute; top: 10px; right: 10px; z-index: 1; }
.room-opts { padding: 4px 16px 6px; }
.room-opts .opt-row { grid-template-columns: 90px 1fr; padding: 10px 0; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.code-box .code { font-family: var(--f-num); font-weight: 700; font-size: 34px; letter-spacing: 0.3em; color: var(--amber); line-height: 1; }
.code-box .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.room-actions { display: flex; gap: 10px; align-items: center; }
.room-actions .btn.lg { flex: 1; }
.room-actions .note { font-size: 12px; color: var(--muted); flex: 1; }
.btn.ready-on { background: rgba(93, 255, 122, 0.14); border-color: var(--green); color: var(--green); }
.btn.ready-on::before { background: var(--green); }

/* 설정 = 탭 화면 [그래픽 설정] [키보드] (2026-10-23 U9 "실제 fps처럼", 메인 메뉴 설정·조작법과 일시정지 메뉴 공용, js/ui/settings.js)
   위 = 밑줄 탭(작은 영문 + 한글 굵은 제목), 탭 안 = 세로로 한 줄씩(왼쪽 이름, 오른쪽 조절·키 모양 칸), 묶음 머리 = 주황 영문 + 회색 한글 + 가는 선. 탭 안만 스크롤 */
.settings-panel { width: 100%; max-width: 760px; }
.settings-panel.fps { display: flex; flex-direction: column; min-height: 0; max-width: 880px; overflow: hidden; }
.sub-body.set-body > .settings-panel { flex: 1 1 auto; align-self: stretch; }
.set-tabs { flex: none; display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }
.set-tab { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 20px 13px; color: var(--muted); transition: color 0.15s; }
.set-tab .en { font-family: var(--f-cap); font-weight: 500; font-size: 11px; letter-spacing: 0.32em; }
.set-tab .ko { font-family: var(--f-title); font-size: 21px; line-height: 1; letter-spacing: 0.01em; }
.set-tab:hover { color: var(--text); }
.set-tab.on { color: #fff; }
.set-tab.on .en { color: var(--amber); }
.set-tab.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--amber); box-shadow: 0 0 12px rgba(255, 178, 30, 0.45); }
.set-page { flex: 1; min-height: 0; overflow: auto; padding: 2px 0 22px; }
.opt-sec { display: flex; align-items: baseline; gap: 10px; padding: 22px 24px 8px; }
.opt-sec .en { font-family: var(--f-cap); font-weight: 500; font-size: 12px; letter-spacing: 0.3em; color: var(--amber); }
.opt-sec .ko { font-size: 12px; font-weight: 700; color: var(--muted); }
.opt-sec::after { content: ''; flex: 1; height: 1px; background: var(--line); align-self: center; }
.set-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px) 64px; align-items: center; gap: 16px; min-height: 52px; padding: 6px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); transition: background 0.12s; }
.set-row::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--amber); opacity: 0; transition: opacity 0.12s; }
.set-row:hover { background: linear-gradient(90deg, rgba(255, 178, 30, 0.1), rgba(255, 178, 30, 0.02) 70%, rgba(255, 178, 30, 0)); }
.set-row:hover::before { opacity: 1; }
.set-row .lab { font-size: 15px; font-weight: 500; color: var(--text); }
.set-row:hover .lab { color: #fff; }
.set-row .val { font-family: var(--f-num); font-weight: 700; font-size: 16px; text-align: right; color: var(--amber); }
.set-row .ctl { display: flex; align-items: center; justify-content: flex-end; }
.set-row .ctl .range { max-width: 320px; }
/* 키 줄: 오른쪽 = 키 모양 칸 (아래 두꺼운 테두리), 마우스는 둥근 칸 */
.set-row.key-row { grid-template-columns: minmax(0, 1fr) auto; }
.set-row.key-row .keys { gap: 6px; flex-wrap: wrap; }
.keycap { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 32px; padding: 0 11px; border: 1px solid rgba(255, 255, 255, 0.26); border-bottom: 3px solid rgba(255, 255, 255, 0.16); border-radius: 4px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); color: #fff; font-family: var(--f-cap); font-weight: 500; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.keycap.mouse { padding: 0 13px; border-radius: 16px; font-family: var(--f-kr); font-weight: 700; font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.key-or { color: var(--muted); font-family: var(--f-num); font-size: 15px; padding: 0 1px; }
.set-row.key-row:hover .keycap { border-color: rgba(255, 178, 30, 0.7); }

/* 문의 */
.inq-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.inq-form .full { grid-column: 1 / -1; }

/* 닉네임 */
.name-box { margin: auto; width: 420px; max-width: calc(100% - 32px); display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.name-box h1 { font-family: var(--f-title); font-size: 30px; line-height: 1.1; }
.name-box .sub { color: var(--text2); font-size: 13px; margin-top: 4px; }
.name-box .input { height: 50px; font-size: 18px; }
.name-box .rule { font-size: 12px; color: var(--muted); }
.name-box .err { font-size: 12px; color: #ff8a84; min-height: 16px; }

/* 모바일 안내 */
.mobile-box { margin: auto; width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 24px 20px; }
.mobile-box .logo { align-items: center; }
.mobile-box h1 { font-family: var(--f-title); font-size: 26px; line-height: 1.2; }
.mobile-box p { margin: 0; color: var(--text2); font-size: 14px; line-height: 1.6; }
.mobile-box .tip { color: var(--muted); font-size: 12px; }
.mobile-box .ico { width: 64px; height: 64px; border: 1px solid var(--line2); border-radius: 6px; display: grid; place-items: center; }
.mobile-box .ico svg { width: 36px; height: 36px; fill: none; stroke: var(--amber); stroke-width: 1.6; }

/* 모달 */
.modal-back { position: absolute; inset: 0; background: rgba(2, 4, 8, 0.72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s var(--ease) both; padding: 16px; }
.modal { width: 460px; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto; animation: riseIn 0.25s var(--ease) both; }
.modal.wide { width: 640px; }
.modal .panel-head h2 { font-family: var(--f-title); font-size: 24px; font-weight: 400; line-height: 1.1; }
.modal .panel-head .x { width: 30px; height: 30px; color: var(--muted); font-size: 18px; border-radius: 2px; }
.modal .panel-head .x:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.modal .panel-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.modal .pop-img { aspect-ratio: 16 / 7; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.modal .pop-body { padding: 16px; font-size: 14px; color: var(--text2); line-height: 1.65; white-space: pre-line; }
.modal .check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-right: auto; cursor: pointer; }
.modal .check input { accent-color: var(--amber); }

/* 메뉴 토스트 (위 가운데) */
.m-toasts { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 5; }
.m-toast { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--panel-solid); border: 1px solid var(--line2); border-left: 3px solid var(--amber); border-radius: var(--r); font-size: 13px; box-shadow: var(--shadow); animation: riseIn 0.25s var(--ease) both; }
.m-toast.danger { border-left-color: var(--danger); }
.m-toast.success { border-left-color: var(--green); }
.m-toast.out { opacity: 0; transition: opacity 0.3s; }

/* 연결 끊김 */
.conn-box { width: 420px; text-align: center; padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.conn-box h2 { font-family: var(--f-title); font-size: 26px; font-weight: 400; }
.conn-box p { margin: 0; color: var(--text2); font-size: 13px; }
.conn-box .ico { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--danger); display: grid; place-items: center; color: var(--danger); font-family: var(--f-num); font-size: 26px; font-weight: 700; margin-bottom: 4px; }

/* 좁은 화면: 세로 한 줄 배치, 가로 스크롤 없음 */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  .topbar, .sub-wrap, .bottombar { padding-left: 16px; padding-right: 16px; }
  .menu-main { grid-template-columns: 1fr; gap: 20px; padding: 16px; overflow: auto; }
  .news-col { max-height: none; }
  .sub-body, .room-wrap, .maps-grid, .inq-form { grid-template-columns: 1fr; display: flex; flex-direction: column; }
  .map-detail { width: auto; max-width: none; min-width: 0; }
  .rb-foot { flex-direction: column; align-items: stretch; }
  .join-left .input.code { flex: 1; width: auto; min-width: 0; }
  .rb-head, .room-row { column-gap: 10px; padding: 0 12px; }
  .rb-head { padding-right: 20px; }
  .set-tab { padding: 12px 14px 11px; }
  .slots.n8, .slots.n16 { grid-template-columns: repeat(2, 1fr); }
  .set-row { grid-template-columns: 1fr; }
}

/* 낮은 화면의 방 화면: 오른쪽 칸(맵 그림·인원·캐릭터·난이도·방 코드·버튼)이 넘쳐 스크롤바가 생기지 않게 줄임 (1280x720 에서도 다 들어감) */
@media (min-width: 901px) and (max-height: 900px) {
  .sub-wrap:has(> .room-wrap) { padding-top: 14px; padding-bottom: 14px; }
  .sub-wrap:has(> .room-wrap) > .sub-head { margin-bottom: 12px; }
  .sub-wrap:has(> .room-wrap) > .sub-head h1 { font-size: 32px; }
  .room-right { gap: 10px; }
  .room-map { aspect-ratio: 16 / 5.5; }
  .room-map .t { font-size: 21px; }
  .room-opts { padding: 2px 16px 4px; }
  .room-opts .opt-row { padding: 6px 0; }
  .code-box { padding: 8px 16px; }
  .code-box .code { font-size: 28px; }
}
/* 더 낮은 화면(높이 700 이하, 노트북 + 브라우저 막대): 이름 칸이 빈 안내 줄(캐릭터 안내·방장만 바꿈)과 코드 안내를 빼고 맵 그림을 더 납작하게 (1280x600 까지 다 들어감) */
@media (min-width: 901px) and (max-height: 700px) {
  .room-map { aspect-ratio: 16 / 4; }
  .room-opts .opt-row:has(> .lab:empty) { display: none; }
  .code-box .hint { display: none; }
}

/* 낮은 화면(1280x720 등): 메뉴 6개가 아래 버전 줄에 닿지 않게 간격을 줄임 */
@media (min-width: 901px) and (max-height: 800px) {
  .menu-main { padding-top: 18px; }
  .menu-tagline { margin-bottom: 10px; }
  .menu-item { padding-top: 7px; padding-bottom: 7px; }
  .menu-item .ko { font-size: 25px; }
  .menu-item.primary .ko { font-size: 29px; }
}

/* 무적치트 방 작은 표시 (Z11 rooms.cheats.god): 방 목록 제목 옆 · 대기실 방 설정 줄 */
.rb-c.c-title .god-tag { margin-left: 8px; height: 16px; padding: 0 6px; font-size: 9px; vertical-align: middle; }
.room-opts .god-row .ctl { display: flex; align-items: center; gap: 10px; }
/* 보이스톡 마이크 장치 고르기 (V12, ui/settings.js voiceSec) */
.set-row .ctl select.sel { width: 100%; max-width: 320px; height: 34px; padding: 0 30px 0 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 4px; background: rgba(255, 255, 255, 0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffb21e' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 11px center / 11px 8px; color: var(--text); font: inherit; font-size: 14px; appearance: none; -webkit-appearance: none; cursor: pointer; text-overflow: ellipsis; }
.set-row .ctl select.sel:hover, .set-row .ctl select.sel:focus { border-color: rgba(255, 178, 30, 0.7); outline: none; }
.set-row .ctl select.sel:disabled { opacity: 0.45; cursor: default; }
.set-row .ctl select.sel option { background: #10141d; color: #fff; }
